/* ============================================================
   BeforeYouSign — Main CSS
   Palette: slate/navy headings + teal accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #2d3748;
  --navy-light: #4a5568;
  --teal:       #38b2ac;
  --teal-dark:  #2c7a7b;
  --teal-light: #e6fffa;
  --slate:      #718096;
  --bg:         #f7fafc;
  --bg-card:    #ffffff;
  --border:     #e2e8f0;
  --text:       #2d3748;
  --text-muted: #718096;
  --success:    #38a169;
  --success-bg: #f0fff4;
  --warning:    #d69e2e;
  --warning-bg: #fffbeb;
  --danger:     #e53e3e;
  --danger-bg:  #fff5f5;
  --info:       #3182ce;
  --info-bg:    #ebf8ff;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,.1);
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 15px; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.3; color: var(--navy); }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { color: var(--text-muted); line-height: 1.7; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container    { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrap    { min-height: 100vh; display: flex; flex-direction: column; }
main          { flex: 1; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.4rem; border-radius: 50px; font-size: .9rem;
  font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap; line-height: 1;
  font-family: var(--font);
}
.btn-primary   { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(56,178,172,.4); }
.btn-secondary { background: transparent; color: var(--teal-dark); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal); color: #fff; transform: translateY(-1px); }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c53030; border-color: #c53030; color: #fff; }
.btn-ghost     { background: transparent; color: var(--slate); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--slate); }
.btn-sm        { padding: .4rem 1rem; font-size: .82rem; }
.btn-lg        { padding: .85rem 2rem; font-size: 1rem; }

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.navbar-inner  { display: flex; align-items: center; gap: 1.5rem; }
.navbar-brand  { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.02em; flex-shrink: 0; }
.navbar-brand span { color: var(--teal); }
.navbar-links  { display: flex; gap: 1.5rem; align-items: center; margin-left: auto; }
.navbar-links a { color: rgba(255,255,255,.8); font-size: .9rem; font-weight: 500; transition: color var(--transition); }
.navbar-links a:hover, .navbar-links a.active { color: var(--teal); }
.navbar-links .btn { margin-left: .5rem; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2535 60%, #0d1b2a 100%);
  color: #fff; padding: 5rem 0 4rem; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(56,178,172,.15) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 3rem; margin-bottom: 1rem; }
.hero h1 span { color: var(--teal); }
.hero p { color: rgba(255,255,255,.75); font-size: 1.15rem; max-width: 560px; margin: 0 auto 2rem; }
.hero-search { display: flex; gap: .75rem; max-width: 540px; margin: 0 auto; }
.hero-search input {
  flex: 1; padding: .85rem 1.2rem; border-radius: 50px;
  border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color: #fff; font-size: 1rem; font-family: var(--font);
  backdrop-filter: blur(8px); transition: border var(--transition);
}
.hero-search input::placeholder { color: rgba(255,255,255,.5); }
.hero-search input:focus { outline: none; border-color: var(--teal); }
.hero-divider { margin: 1.5rem 0; color: rgba(255,255,255,.4); font-size: .85rem; }
.hero-badges  { display: flex; gap: 1rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-badge   { display: flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.7); font-size: .88rem; }
.hero-badge svg { color: var(--teal); }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.card-header h2, .card-header h3 { margin: 0; }
.card-body { padding: 1.5rem; }

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stats-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card    { background: var(--bg-card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; }
.stat-value   { font-size: 2.5rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-label   { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .35rem; }
.stat-card.teal .stat-value { color: var(--teal-dark); }

/* ── BADGES / STATUS ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .75rem; border-radius: 50px; font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-verified       { background: #c6f6d5; color: #22543d; }
.badge-pending        { background: #feebc8; color: #7b341e; }
.badge-draft          { background: var(--border); color: var(--slate); }
.badge-changes        { background: #bee3f8; color: #2a4365; }
.badge-rejected       { background: #fed7d7; color: #822727; }
.badge-approved       { background: #c6f6d5; color: #22543d; }
.badge-suspended      { background: #fed7d7; color: #822727; }
.badge-passed         { background: #c6f6d5; color: #22543d; }
.badge-not_passed     { background: #fed7d7; color: #822727; }
.badge-not_checked    { background: #e2e8f0; color: #4a5568; }

/* ── TABLES ──────────────────────────────────────────────────── */
.table-wrap   { overflow-x: auto; }
table         { width: 100%; border-collapse: collapse; }
thead th      { background: #f8fafc; color: var(--navy); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; }
tbody td      { padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group   { margin-bottom: 1.25rem; }
.form-label   { display: block; font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: .4rem; }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-control {
  width: 100%; padding: .65rem 1rem; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: .93rem; font-family: var(--font);
  color: var(--text); background: #fff; transition: border var(--transition);
  appearance: none;
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(56,178,172,.15); }
.form-control::placeholder { color: #a0aec0; }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }
.form-hint    { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }
.form-section { margin-bottom: 2rem; }
.form-section-title { font-size: 1rem; font-weight: 700; color: var(--navy); padding-bottom: .6rem; border-bottom: 2px solid var(--teal); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .5rem; }
.form-grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-row     { display: flex; gap: 1rem; align-items: flex-start; }
.form-row .form-group { flex: 1; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.checkbox-label input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--teal); }

/* ── ALERTS / FLASH ──────────────────────────────────────────── */
.flash-container { padding: 1rem 0; }
.alert {
  padding: .9rem 1.2rem; border-radius: var(--radius-sm);
  margin-bottom: .75rem; display: flex; align-items: flex-start; gap: .75rem;
  font-size: .9rem; font-weight: 500; border-left: 4px solid;
}
.alert-success { background: var(--success-bg); color: #276749; border-color: var(--success); }
.alert-error   { background: var(--danger-bg);  color: #9b2c2c; border-color: var(--danger); }
.alert-info    { background: var(--info-bg);    color: #2c5282; border-color: var(--info); }
.alert-warning { background: var(--warning-bg); color: #744210; border-color: var(--warning); }

/* ── PAGE HEADERS ────────────────────────────────────────────── */
.page-header     { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-header h1  { font-size: 1.9rem; }
.page-header p   { margin-top: .4rem; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ── SECTION TILES ───────────────────────────────────────────── */
.section-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature-card   { background: var(--bg-card); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform var(--transition), box-shadow var(--transition); }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon   { width: 52px; height: 52px; border-radius: 50%; background: var(--teal-light); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--teal-dark); }
.feature-card h3 { margin-bottom: .5rem; }

/* ── VERIFICATION CHECK CARDS ────────────────────────────────── */
.check-card     { background: var(--bg-card); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 1rem; }
.check-header   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.check-header h3 { display: flex; align-items: center; gap: .6rem; font-size: 1rem; }
.check-icon     { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check-icon.passed     { background: #c6f6d5; color: #276749; }
.check-icon.not_passed { background: #fed7d7; color: #9b2c2c; }
.check-icon.not_checked { background: #e2e8f0; color: #4a5568; }

/* ── REPORT LAYOUT ───────────────────────────────────────────── */
.report-header-band {
  background: linear-gradient(135deg, var(--navy), #1a2535);
  color: #fff; padding: 2.5rem 0;
}
.report-header-band h1 { color: #fff; font-size: 1.6rem; }
.report-header-band .vin-tag { font-size: .85rem; color: rgba(255,255,255,.6); margin-top: .25rem; letter-spacing: .08em; font-family: monospace; }
.report-section { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.report-section:last-child { border-bottom: none; }
.report-section-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .6rem; padding-bottom: .75rem; border-bottom: 2px solid var(--teal); }
.spec-grid      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.spec-col       { }
.spec-col h4    { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-dark); margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.spec-row       { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid #f0f4f8; font-size: .88rem; gap: 1rem; }
.spec-key       { color: var(--text-muted); flex-shrink: 0; }
.spec-val       { font-weight: 600; color: var(--navy); text-align: right; }
.value-cards    { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.value-card     { background: linear-gradient(135deg, var(--navy) 0%, #3d4f66 100%); color: #fff; border-radius: var(--radius); padding: 1.5rem; }
.value-card h4  { color: rgba(255,255,255,.7); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.value-main     { font-size: 2rem; font-weight: 800; color: var(--teal); }
.value-range    { font-size: .82rem; color: rgba(255,255,255,.6); margin-top: .25rem; }
.gallery        { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.gallery-main   { grid-column: span 2; border-radius: var(--radius); overflow: hidden; max-height: 340px; }
.gallery-main img { width: 100%; height: 340px; object-fit: cover; }
.gallery-thumb  { border-radius: var(--radius-sm); overflow: hidden; max-height: 160px; }
.gallery-thumb img { width: 100%; height: 160px; object-fit: cover; }
.no-image       { width: 100%; height: 340px; background: linear-gradient(135deg, #e2e8f0, #edf2f7); display: flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--text-muted); flex-direction: column; gap: .5rem; }
.airbag-section { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.airbag-list li { padding: .35rem 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.airbag-list li .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-fitted     { background: var(--success); }
.dot-notfitted  { background: var(--text-muted); }

/* ── IMAGE UPLOAD PREVIEW ────────────────────────────────────── */
.upload-area    { border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--text-muted); cursor: pointer; transition: border var(--transition), background var(--transition); }
.upload-area:hover { border-color: var(--teal); background: var(--teal-light); }
.image-preview-grid { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.image-thumb    { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--border); }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer { background: var(--navy); color: rgba(255,255,255,.6); padding: 2.5rem 0; margin-top: 4rem; }
footer .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer .brand { font-weight: 800; color: #fff; font-size: 1.1rem; }
footer .brand span { color: var(--teal); }
footer a { color: rgba(255,255,255,.6); }
footer a:hover { color: var(--teal); }
footer .footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ── NOTIFICATION BELL ───────────────────────────────────────── */
.notif-badge { background: var(--danger); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; margin-left: -.3rem; margin-top: -.8rem; font-weight: 700; }

/* ── MISC UTILS ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-teal   { color: var(--teal-dark); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none; }
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: var(--teal-light); color: var(--teal-dark); padding: .2rem .6rem; border-radius: 50px; font-size: .78rem; font-weight: 600; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 1rem; opacity: .3; }
.empty-state h3  { color: var(--navy); margin-bottom: .5rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .spec-grid   { grid-template-columns: 1fr 1fr; }
  .gallery     { grid-template-columns: 1fr 1fr; }
  .gallery-main { grid-column: span 2; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
  .value-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero h1     { font-size: 2rem; }
  .hero-search { flex-direction: column; }
  .spec-grid   { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .gallery     { grid-template-columns: 1fr; }
  .navbar-links .hide-mobile { display: none; }
  .page-header-row { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.6rem; }
  .airbag-section { grid-template-columns: 1fr; }
  .value-cards { grid-template-columns: 1fr; }
}

/* ── QR PRINT ────────────────────────────────────────────────── */
@media print {
  .navbar, footer, .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .print-card { border: 2px solid #000; padding: 1.5rem; max-width: 400px; margin: 0 auto; text-align: center; }
}
