/* Marilao Business Permit Portal — design system.
   Brand: My Marilao magenta (#FC186E) paired with deep ink for a trustworthy,
   modern government-service feel. Fonts: Lexend (headings) + Source Sans 3. */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --brand: #FC186E;
  --brand-600: #E60F60;
  --brand-700: #BA356F;
  --brand-900: #7A1E4B;
  --accent: #FF658B;
  --ink: #14121A;
  --ink-2: #3F3A4A;
  --muted: #6B6875;
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-2: #FBF6F8;
  --line: #ECEAF1;
  --line-2: #E1DEE8;
  --ok: #16A34A; --ok-bg: #E7F7EE;
  --warn: #E8590C; --warn-bg: #FFF0E3;
  --err: #E11D48; --err-bg: #FDE7EC;
  --info: #2563EB; --info-bg: #E7EEFF;
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 244px;
  --mtopbar-h: 56px;
  --shadow-sm: 0 1px 2px rgba(20,18,26,.06), 0 2px 8px rgba(20,18,26,.05);
  --shadow: 0 10px 30px rgba(20,18,26,.10);
  --shadow-lg: 0 24px 60px rgba(122,30,75,.18);
  --ease: cubic-bezier(.4,0,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-font { font-family: 'Lexend', sans-serif; letter-spacing: -.01em; }
.container { width: 100%; max-width: 680px; margin: 0 auto; padding: 20px 16px 48px; }
a { color: var(--brand-600); }

/* ---------- App header (dashboard / wizard) ---------- */
/* ---------- Sidebar shell (replaces the old top bar) ---------- */
body.has-sidebar { padding-left: var(--sidebar-w); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  display: flex; flex-direction: column; gap: 6px; padding: 20px 15px;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 62%, var(--brand-900) 100%);
  color: #fff; box-shadow: 6px 0 22px rgba(122,30,75,.18);
}
.sb-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; padding: 4px 6px 16px; }
.sb-brand img { height: 40px; width: 40px; border-radius: 10px; background: #fff; padding: 4px; box-shadow: var(--shadow-sm); }
.sb-brand-txt b { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.02rem; display: block; line-height: 1.12; }
.sb-brand-txt small { font-size: .76rem; opacity: .9; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; }
.sb-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px;
  color: rgba(255,255,255,.9); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.sb-link svg { width: 20px; height: 20px; flex: none; }
.sb-link:hover { background: rgba(255,255,255,.13); color: #fff; }
.sb-link.active { background: rgba(255,255,255,.2); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.sb-foot { margin-top: auto; }
.sb-logout {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 12px; border: none; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 600; font-size: .92rem;
  transition: background .18s var(--ease);
}
.sb-logout:hover { background: rgba(255,255,255,.26); }
.sb-logout svg { width: 18px; height: 18px; flex: none; }

/* Mobile top bar + drawer overlay (hidden on desktop) */
.mtopbar { display: none; }
.sb-overlay { display: none; }

/* In-body page header + Back control (surfaced from the old top bar) */
.page-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 18px; }
.page-back {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: #fff; color: var(--brand-700); font-family: 'Lexend', sans-serif; font-weight: 700;
  font-size: .9rem; cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.page-back:hover { background: var(--surface-2); border-color: var(--brand); }
.page-back svg { width: 17px; height: 17px; }
.page-head .ph-title { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.16rem; line-height: 1.15; color: var(--ink); }
.page-head .ph-sub { font-size: .84rem; color: var(--muted); }

@media (max-width: 860px) {
  body.has-sidebar { padding-left: 0; padding-top: var(--mtopbar-h); }
  .sidebar { transform: translateX(-100%); transition: transform .26s var(--ease); width: 272px; }
  .sidebar.open { transform: translateX(0); }
  .mtopbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; height: var(--mtopbar-h); z-index: 45; padding: 0 14px;
    background: linear-gradient(115deg, var(--brand) 0%, var(--brand-700) 75%, var(--brand-900) 100%);
    color: #fff; box-shadow: 0 4px 16px rgba(122,30,75,.22);
  }
  .mtopbar img { height: 32px; width: 32px; border-radius: 8px; background: #fff; padding: 3px; }
  .mtopbar-title { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1rem; }
  .mburger { background: rgba(255,255,255,.16); border: none; color: #fff; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
  .mburger svg { width: 22px; height: 22px; }
  .sb-overlay.show { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20,18,26,.45); }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 26px; margin: 18px 0;
}
.card h2 { margin: 0 0 4px; font-size: 1.24rem; font-weight: 700; }
.card .muted, .muted { color: var(--muted); }
.card .muted { font-size: .95rem; margin-top: 0; }

/* ---------- Fields ---------- */
.field { margin: 16px 0; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink-2); }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit;
  background: #fff; color: var(--ink); transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input::placeholder { color: #A7A3B0; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(252,24,110,.14);
}
.field.invalid input, .field.invalid select { border-color: var(--err); background: #FFF8FA; }
.field-error { color: var(--err); font-size: .84rem; margin-top: 7px; display: none; font-weight: 500; }
.field.invalid .field-error { display: block; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 44px; }
.hint { font-size: .82rem; color: var(--muted); }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-chip {
  border: 1.5px solid var(--line-2); border-radius: 999px; padding: 10px 18px;
  cursor: pointer; font-size: .92rem; font-weight: 500; user-select: none;
  transition: all .16s var(--ease); background: #fff;
}
.radio-chip:hover { border-color: var(--accent); }
.radio-chip.selected { border-color: var(--brand); background: var(--surface-2); color: var(--brand-700); font-weight: 700; box-shadow: 0 0 0 3px rgba(252,24,110,.10); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 22px; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700;
  font-family: 'Lexend', sans-serif; cursor: pointer; border: none; text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(252,24,110,.30); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 10px 26px rgba(252,24,110,.38); }
.btn-primary:disabled { background: #F4A9C7; box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--brand-700); border: 1.5px solid var(--line-2); }
.btn-secondary:hover { border-color: var(--accent); background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; margin-top: 22px; }
.btn-row .btn { flex: 1; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.badge-checking { background: var(--info-bg); color: #1D4ED8; }
.badge-compliance { background: var(--warn-bg); color: var(--warn); }
.badge-approved { background: var(--ok-bg); color: #15803D; }
.badge-denied { background: var(--err-bg); color: var(--err); }
.badge-default { background: #EEECF2; color: #5A5666; }

/* ---------- Step indicator ---------- */
.step-indicator { display: flex; gap: 6px; margin: 6px 0 6px; }
.step-dot { flex: 1; height: 7px; border-radius: 999px; background: var(--line-2); transition: background .3s var(--ease); }
.step-dot.done { background: var(--accent); }
.step-dot.active { background: var(--brand); box-shadow: 0 0 0 3px rgba(252,24,110,.15); }
.step-label { font-size: .82rem; color: var(--muted); margin-bottom: 10px; font-weight: 600; }

/* ---------- Business cards ---------- */
.biz-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-sm); margin: 14px 0; transition: transform .15s var(--ease), box-shadow .18s var(--ease);
}
.biz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.biz-card .avatar { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; font-weight: 800; font-family: 'Lexend'; flex: none; }
.biz-card .info { flex: 1; min-width: 0; }
.biz-card .name { font-weight: 700; }
.biz-card .id { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.link { color: var(--brand-600); text-decoration: none; font-weight: 700; }
.link:hover { text-decoration: underline; }
.error-banner { background: var(--err-bg); color: var(--err); border: 1px solid #F7C6D2; border-radius: var(--radius-sm); padding: 13px 15px; font-size: .92rem; font-weight: 500; display: none; margin: 14px 0; }
.error-banner.show { display: block; }
.empty { text-align: center; color: var(--muted); padding: 36px 14px; font-size: 1rem; }
.section { display: none; }
.section.active { display: block; animation: fadeUp .28s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ================= AUTH (login) split hero ================= */
.auth {
  min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.auth-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #FF4E92 0%, var(--brand) 35%, var(--brand-700) 72%, var(--brand-900) 100%);
  padding: 56px 52px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::before, .auth-hero::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09);
}
.auth-hero::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.auth-hero::after { width: 300px; height: 300px; left: -110px; bottom: -90px; background: rgba(255,255,255,.06); }
.auth-hero .brandline { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.auth-hero .brandline img { height: 52px; width: 52px; border-radius: 14px; background: #fff; padding: 5px; box-shadow: var(--shadow); }
.auth-hero .brandline .n { font-family: 'Lexend'; font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.auth-hero .brandline .s { font-size: .85rem; opacity: .9; }
.auth-hero .headline { position: relative; z-index: 1; }
.auth-hero .headline h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.08; margin: 0 0 14px; }
.auth-hero .headline p { font-size: 1.08rem; opacity: .95; max-width: 34ch; margin: 0; }
.auth-hero .points { position: relative; z-index: 1; display: grid; gap: 14px; margin-top: 8px; }
.auth-hero .point { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth-hero .point .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.auth-hero .point .ic svg { width: 20px; height: 20px; }
.auth-hero .foot { position: relative; z-index: 1; font-size: .82rem; opacity: .8; }

.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .welcome { font-family: 'Lexend'; font-weight: 800; font-size: 1.7rem; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; }
.auth-mobile-brand { display: none; }

/* Responsive: stack on tablet/mobile */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form { min-height: 100dvh; align-items: flex-start; padding-top: 0; }
  .auth-mobile-brand {
    display: flex; align-items: center; gap: 13px; width: 100%;
    background: linear-gradient(115deg, var(--brand), var(--brand-700) 75%, var(--brand-900));
    color: #fff; padding: 22px 20px; margin: 0 -28px 26px; box-shadow: 0 6px 20px rgba(122,30,75,.22);
  }
  .auth-mobile-brand img { height: 44px; width: 44px; border-radius: 12px; background: #fff; padding: 4px; }
  .auth-mobile-brand .n { font-family: 'Lexend'; font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
  .auth-mobile-brand .s { font-size: .8rem; opacity: .92; }
  .auth-card { padding: 0 4px; }
}
/* ================= DASHBOARD — My Businesses ================= */
.dash-hero {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--radius);
  background: radial-gradient(120% 130% at 0% 0%, #FF4E92 0%, var(--brand) 38%, var(--brand-700) 78%, var(--brand-900) 100%);
  padding: 26px 26px 24px; margin: 18px 0 4px;
  box-shadow: var(--shadow-lg);
}
.dash-hero::before, .dash-hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none; }
.dash-hero::before { width: 260px; height: 260px; right: -90px; top: -110px; }
.dash-hero::after { width: 170px; height: 170px; right: 40px; bottom: -110px; background: rgba(255,255,255,.07); }
.dash-hero .eyebrow { position: relative; z-index: 1; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .88; margin-bottom: 8px; }
.dash-hero h1 { position: relative; z-index: 1; font-family: 'Lexend', sans-serif; font-weight: 800; font-size: 1.72rem; line-height: 1.12; margin: 0 0 8px; }
.dash-hero p { position: relative; z-index: 1; margin: 0; font-size: 1rem; opacity: .95; max-width: 40ch; }

/* Prominent New Permit call-to-action */
.cta-new {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  background: linear-gradient(115deg, var(--brand) 0%, var(--brand-600) 55%, var(--brand-700) 100%);
  color: #fff; border-radius: var(--radius); padding: 18px 20px; margin: 18px 0 6px;
  box-shadow: 0 12px 28px rgba(252,24,110,.30);
  transition: transform .14s var(--ease), box-shadow .2s var(--ease);
}
.cta-new:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(252,24,110,.40); }
.cta-new:active { transform: translateY(0); }
.cta-new .cta-ic { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.20); display: grid; place-items: center; flex: none; }
.cta-new .cta-ic svg { width: 26px; height: 26px; }
.cta-new .cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cta-new .cta-title { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.08rem; line-height: 1.2; }
.cta-new .cta-sub { font-size: .86rem; opacity: .9; }
.cta-new .cta-arrow svg { width: 22px; height: 22px; opacity: .9; }

.list-head { display: flex; align-items: center; gap: 10px; margin: 24px 2px 4px; }
.list-head h2 { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.12rem; margin: 0; }
.list-head .count { font-size: .78rem; font-weight: 700; color: var(--brand-700); background: var(--surface-2); border: 1px solid var(--line-2); padding: 2px 10px; border-radius: 999px; }

/* Business card polish (extends .biz-card) */
.biz-card { text-decoration: none; color: inherit; }
.biz-card .chev { color: var(--line-2); flex: none; transition: color .16s var(--ease), transform .16s var(--ease); }
.biz-card:hover .chev { color: var(--brand); transform: translateX(2px); }

/* Empty state */
.empty-state { text-align: center; padding: 40px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 14px 0; }
.empty-state .empty-ic { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--brand); }
.empty-state .empty-ic svg { width: 38px; height: 38px; }
.empty-state h3 { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.16rem; margin: 0 0 6px; }
.empty-state p { color: var(--muted); margin: 0 auto 20px; max-width: 34ch; }
.empty-state .btn { display: inline-flex; }

/* ================= WIZARD — New Business Permit ================= */
.wizard-progress {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px 18px; margin: 18px 0 4px;
}
.wizard-progress .wp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wizard-progress .wp-name { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.wizard-progress .step-label { margin: 0; }
.wizard-progress .step-indicator { margin: 0; }

/* Section step header: icon + title */
.step-head { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; }
.step-head .step-ic {
  width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--surface-2), #fff); border: 1.5px solid var(--line-2); color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.step-head .step-ic svg { width: 24px; height: 24px; }
.step-head h2 { margin: 0; }
.section.card > .muted:first-of-type, .section.card .step-head + .muted { margin-top: 2px; }
.sub-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 4px; }
.sub-head .sub-ic { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--brand-700); }
.sub-head .sub-ic svg { width: 17px; height: 17px; }
.sub-head h2 { margin: 0 !important; font-size: 1.02rem !important; }

.section.card { padding-top: 22px; }
.btn-row { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 72%, rgba(245,246,250,0)); padding: 14px 0 6px; margin-top: 26px; z-index: 5; }

@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition: none !important; } }

/* ---------- Business item actions (dashboard) ---------- */
.biz-item { margin: 14px 0; }
.biz-item .biz-card { margin: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.biz-actions { display: flex; gap: 0; border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; background: #fff; }
.pill-btn { flex: 1; text-align: center; padding: 11px; font-weight: 700; font-family: 'Lexend';
  font-size: .9rem; text-decoration: none; cursor: pointer; transition: background .15s var(--ease); }
.pill-btn.renew { color: var(--brand-700); border-right: 1px solid var(--line); }
.pill-btn.renew:hover { background: var(--surface-2); }
.pill-btn.close { color: var(--muted); }
.pill-btn.close:hover { background: #F7F5F9; color: var(--err); }

/* ---------- Simple sub-page shell (renew / closure / csm) ---------- */
.subpage { max-width: 560px; }
.rating-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rating-chip { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; font-weight: 700; cursor: pointer; font-family: 'Lexend'; transition: all .15s var(--ease); }
.rating-chip.selected { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 16px rgba(252,24,110,.28); }
.q-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.q-block:last-child { border-bottom: none; }
.q-block .q { font-weight: 600; margin-bottom: 10px; }
.success-hero { text-align: center; padding: 20px 8px; }
.success-hero .ic { width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ok), #0E9F6E); color: #fff; }

/* clickable business card + detail view */
a.biz-card { text-decoration: none; color: inherit; }
a.biz-card .chev { color: var(--muted); flex: none; }
.detail-sec { margin: 18px 0; }
.detail-sec h3 { font-size: 1.02rem; margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: 40% 60%; gap: 6px 10px; }
.kv .k { color: var(--muted); font-size: .9rem; }
.kv .v { font-weight: 600; font-size: .92rem; word-break: break-word; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-item:last-child { border-bottom: none; }
.doc-item .folder { font-size: .78rem; color: var(--muted); }
.insp-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.insp-item:last-child { border-bottom: none; }
.insp-item .dept { font-weight: 600; }

/* ================= Responsive (phones / small tablets) ================= */
@media (max-width: 560px) {
  .container { padding: 14px 12px 40px; }
  .card { padding: 18px; border-radius: 14px; }
  .app-header { padding: 12px 14px; gap: 10px; }
  .app-header img { height: 36px; width: 36px; }
  .app-header .title { font-size: .98rem; }
  .app-header .subtitle { font-size: .74rem; }
  .app-header a.logout, .app-header .logout { padding: 6px 12px; font-size: .8rem; }
  .card h2 { font-size: 1.12rem; }
  .auth-card .welcome { font-size: 1.45rem; }
  /* stack key/value in detail view */
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv .k { margin-top: 8px; font-size: .82rem; }
  .kv .v { font-size: 1rem; }
  /* rating chips fit small screens */
  .rating-row { gap: 6px; }
  .rating-chip { width: 40px; height: 40px; font-size: .95rem; }
  /* buttons stack when cramped */
  .btn-row { flex-direction: column; }
  .btn { padding: 13px 18px; }
  .radio-chip { padding: 9px 15px; font-size: .88rem; }
  /* wizard nav stays usable */
  .field input, .field select, .field textarea { font-size: 16px; } /* avoid iOS zoom */
}
@media (max-width: 380px) {
  .rating-chip { width: 36px; height: 36px; }
  .auth-hero { padding: 40px 24px; }
}
/* dash hero + cta scale down */
@media (max-width: 560px) {
  .dash-hero { padding: 22px 18px !important; }
  .dash-hero h1 { font-size: 1.7rem !important; }
  .cta-new { padding: 16px !important; }
}
