@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --navy:#132A45;
  --navy-light:#26456B;
  --amber:#E0A430;
  --amber-dark:#3A2A05;
  --bg:#F4F6F8;
  --card-border:#E1E6EC;
  --text:#132A45;
  --text-muted:#7B8794;
  --muted-blue:#96A9BF;
  --green-bg:#EAF3DE;
  --green-text:#3B6D11;
  --red-bg:#FCEBEB;
  --red-text:#A32D2D;
}

*{ box-sizing:border-box; margin:0; padding:0; }

body{
  background:#DDE3E8;
  font-family:'Inter', sans-serif;
  display:flex;
  justify-content:center;
  padding:24px 0;
  min-height:100vh;
}

.phone{
  width:380px;
  min-height:760px;
  background:var(--bg);
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 20px 50px rgba(0,0,0,0.25);
  display:flex;
  flex-direction:column;
}

header{
  background:var(--navy);
  padding:16px 20px 20px;
}

.statusbar{ font-size:11px; color:#7B93AE; margin-bottom:12px; }

.brand{ display:flex; align-items:center; gap:8px; }
.brand-icon{
  width:28px; height:28px; border-radius:8px;
  background:var(--amber);
  display:flex; align-items:center; justify-content:center;
  font-size:15px;
}
.brand-name{ font-size:20px; font-weight:600; color:var(--bg); }

.eyebrow{
  font-size:10.5px; color:#7B93AE; text-transform:uppercase;
  letter-spacing:0.6px; margin-top:16px;
}
.headline{
  font-size:18px; color:var(--bg); line-height:1.4;
  margin-top:6px; max-width:280px; font-weight:500;
}
.subhead{
  font-size:12.5px; color:var(--muted-blue); line-height:1.5;
  margin-top:8px; max-width:280px;
}

main{ flex:1; padding:16px 18px 18px; }

.card{
  background:#FFFFFF;
  border-radius:14px;
  padding:16px;
  border:1px solid var(--card-border);
  margin-bottom:12px;
}

.field-label{
  display:block; font-size:11px; color:#C4881A;
  letter-spacing:0.3px; margin-bottom:6px; text-transform:uppercase;
}
.field-input{
  width:100%;
  background:var(--bg);
  border:1px solid var(--card-border);
  border-radius:8px;
  padding:11px 12px;
  font-size:15px;
  font-family:'IBM Plex Mono', monospace;
  letter-spacing:1px;
  color:var(--text);
  outline:none;
}
.field-input:focus{ border-color:var(--amber); }

.btn-primary{
  width:100%;
  margin-top:10px;
  background:var(--amber);
  color:var(--amber-dark);
  border:none;
  padding:11px;
  border-radius:8px;
  font-size:13.5px;
  font-weight:600;
  cursor:pointer;
}
.btn-primary:hover{ filter:brightness(1.05); }
.btn-primary:disabled{ opacity:0.6; cursor:default; }

.error-msg{
  margin-top:10px;
  font-size:12.5px;
  color:var(--red-text);
  background:var(--red-bg);
  padding:8px 10px;
  border-radius:6px;
}

.result-top{ display:flex; align-items:center; gap:10px; }
.result-icon{
  width:40px; height:40px; border-radius:10px;
  background:#EFF3F7;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; flex:0 0 auto;
}
.result-info{ flex:1; min-width:0; }
.result-title{ font-size:14px; font-weight:600; color:var(--text); }
.result-subtitle{ font-size:11.5px; color:var(--text-muted); margin-top:2px; }
.bookmark{
  font-size:18px; opacity:0.4; cursor:pointer;
  background:none; border:none; padding:4px;
  transition:opacity .15s, transform .15s;
}
.bookmark:hover{ opacity:0.7; }
.bookmark.saved{ opacity:1; transform:scale(1.1); }

.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%);
  background:var(--navy); color:#fff; font-size:12.5px;
  padding:10px 18px; border-radius:8px; opacity:0;
  transition:opacity .2s; pointer-events:none; z-index:10;
}
.toast.show{ opacity:1; }

.badges{ display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.badge{
  font-size:10px; padding:3px 8px; border-radius:5px; font-weight:500;
}
.badge.green{ background:var(--green-bg); color:var(--green-text); }
.badge.red{ background:var(--red-bg); color:var(--red-text); }
.badge.neutral{ background:#EFF3F7; color:#4A5A6A; }

.divider{ height:1px; background:#EEF1F4; margin:12px 0; }

.action-row{ display:flex; align-items:center; justify-content:space-between; }
.action-title{ font-size:12.5px; font-weight:600; color:var(--text); }
.action-sub{ font-size:10.5px; color:var(--text-muted); margin-top:1px; }

.btn-secondary{
  background:var(--bg); color:var(--text);
  border:1px solid var(--card-border);
  padding:8px 16px; border-radius:7px;
  font-size:11.5px; font-weight:600; cursor:pointer;
}
.btn-amber{
  background:var(--amber); color:var(--amber-dark);
  border:none;
  padding:8px 16px; border-radius:7px;
  font-size:11.5px; font-weight:600; cursor:pointer;
}

.section-label{
  font-size:11px; color:var(--text); letter-spacing:0.3px;
  margin:4px 0 8px;
}
.history-card{ padding:0; }
.history-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 14px; font-size:12px;
}
.history-row-wrap{ border-bottom:1px solid #EEF1F4; }
.history-row-wrap:last-child{ border-bottom:none; }
.history-date{ color:var(--text); font-weight:500; }
.history-result{ font-size:10.5px; padding:2px 7px; border-radius:5px; }
.history-mileage{ color:var(--text-muted); font-size:11px; }
.history-reasons{ padding:0 14px 10px; }
.reason-line{
  font-size:11px; line-height:1.4; padding:5px 8px; border-radius:6px; margin-top:4px;
}
.reason-line.fail{ background:var(--red-bg); color:var(--red-text); }
.reason-line.advisory{ background:#FCF3E3; color:#8A6116; }

.tabbar{
  display:flex; justify-content:space-around;
  padding:12px 4px; background:#FFFFFF; border-top:1px solid var(--card-border);
}
.tab{ text-align:center; opacity:0.5; cursor:pointer; }
.tab.active{ opacity:1; }
.tab-icon{ font-size:18px; }
.tab-label{ font-size:9.5px; color:var(--text-muted); margin-top:2px; }
.tab.active .tab-label{ color:var(--amber); font-weight:600; }

.auth-tabs{ display:flex; gap:6px; margin-bottom:16px; background:var(--bg); border-radius:9px; padding:4px; }
.auth-tab{
  flex:1; text-align:center; padding:9px 4px; border-radius:6px;
  font-size:12.5px; font-weight:600; color:var(--text-muted); cursor:pointer;
}
.auth-tab.active{ background:var(--navy); color:#fff; }

.saved-car-item{
  background:#FFFFFF; border-radius:12px; padding:12px;
  border:1px solid var(--card-border); display:flex; gap:10px; margin-bottom:10px;
}
.saved-car-icon{
  width:44px; height:44px; border-radius:10px; background:#EFF3F7;
  display:flex; align-items:center; justify-content:center; font-size:20px; flex:0 0 auto;
}
.saved-car-info{ flex:1; min-width:0; }
.saved-car-top{ display:flex; justify-content:space-between; align-items:baseline; }
.saved-car-name{ font-size:13.5px; font-weight:600; color:var(--text); }
.saved-car-reg{ font-size:10px; color:var(--text-muted); font-family:'IBM Plex Mono', monospace; }
.empty-state{ text-align:center; color:var(--text-muted); font-size:12.5px; padding:30px 20px; }

/* --- Checklist view --- */
.checklist-top{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.btn-back{
  background:none; border:none; color:var(--navy); font-size:13px; font-weight:600;
  cursor:pointer; padding:6px 0;
}
.checklist-car-label{ font-size:13px; color:var(--text-muted); }

.section-tabs{ display:flex; gap:6px; overflow-x:auto; margin-bottom:12px; padding-bottom:2px; }
.section-tab{
  flex:0 0 auto; font-size:12px; font-weight:600; color:var(--text-muted);
  background:#FFFFFF; border:1px solid var(--card-border); padding:8px 14px;
  border-radius:20px; cursor:pointer; white-space:nowrap;
}
.section-tab.active{ background:var(--navy); color:#fff; border-color:var(--navy); }

.progress-wrap{ display:flex; align-items:center; gap:10px; }
.progress-bar{ flex:1; height:6px; background:var(--bg); border-radius:3px; overflow:hidden; }
.progress-fill{ height:100%; background:var(--amber); width:0%; transition:width .2s; }
.progress-count{ font-size:11px; color:var(--text-muted); font-family:'IBM Plex Mono', monospace; }

.checklist-item{
  background:#FFFFFF; border:1px solid var(--card-border); border-radius:12px;
  padding:12px; margin-top:10px;
}
.checklist-item-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.checklist-item-title-row{ display:flex; gap:10px; align-items:flex-start; flex:1; min-width:0; }
.checklist-stamp{
  width:22px; height:22px; border-radius:50%; border:2px solid var(--card-border);
  flex:0 0 auto; margin-top:1px; display:flex; align-items:center; justify-content:center;
  font-size:12px; color:transparent; transition:all .15s;
}
.checklist-item.done .checklist-stamp{
  background:var(--navy); border-color:var(--navy); color:#fff;
}
.checklist-item-title{ font-size:12.5px; color:var(--text); line-height:1.4; }
.checklist-item.done .checklist-item-title{ color:var(--muted-blue); text-decoration:line-through; text-decoration-color:var(--card-border); }
.checklist-item-why{
  font-size:11px; color:var(--text-muted); margin-top:6px; margin-left:32px; line-height:1.45; display:none;
}
.checklist-item.done .checklist-item-why{ display:block; }
.key-check-tag{
  font-size:9px; background:var(--red-bg); color:var(--red-text); padding:2px 6px;
  border-radius:4px; white-space:nowrap; flex:0 0 auto; height:fit-content; margin-top:2px;
}
.btn-done{
  background:var(--bg); border:1px solid var(--card-border); color:var(--text);
  font-size:10.5px; font-weight:600; padding:6px 12px; border-radius:7px; cursor:pointer;
  flex:0 0 auto; white-space:nowrap;
}
.checklist-item.done .btn-done{ display:none; }

/* --- Compare view --- */
.compare-header-row{ display:grid; gap:10px; margin-bottom:10px; }
.compare-car-card{
  background:#FFFFFF; border-radius:12px; padding:10px; border:1px solid var(--card-border); text-align:center;
}
.compare-car-name{ font-size:12px; font-weight:600; color:var(--text); margin-top:6px; }
.compare-car-reg{ font-size:10px; color:var(--text-muted); }
.compare-table{ background:#FFFFFF; border-radius:12px; border:1px solid var(--card-border); overflow:hidden; }
.compare-row{ display:grid; padding:9px 12px; border-bottom:1px solid #EEF1F4; font-size:12px; align-items:center; }
.compare-row:last-child{ border-bottom:none; }
.compare-row-label{ font-size:11px; color:var(--text-muted); }
.compare-cell{ text-align:center; color:var(--text); }
.compare-actions{ display:grid; gap:8px; margin-top:12px; }
.compare-action-btn{
  background:var(--amber); color:var(--amber-dark); text-align:center; padding:9px 6px;
  border-radius:8px; font-size:11.5px; font-weight:600; border:none; cursor:pointer;
}

/* --- Account view --- */
.account-email-row{ display:flex; align-items:center; gap:12px; }
.account-avatar{
  width:44px; height:44px; border-radius:50%; background:var(--amber);
  color:var(--amber-dark); font-size:16px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex:0 0 auto;
}
.account-email{ font-size:14px; font-weight:600; color:var(--text); }
.account-member-since{ font-size:11px; color:var(--text-muted); margin-top:2px; }
.success-msg{
  margin-top:10px; font-size:12.5px; color:var(--green-text);
  background:var(--green-bg); padding:8px 10px; border-radius:6px;
}
