:root{
  --navy:#12224F; --green:#6CB33F; --grey:#58585A;
  --paper:#EDEFF3; --card:#FFF; --rule:#D6DAE2; --ink:#1A1D26; --muted:#6B7280;
  --ok:#4C9A2A; --soon:#C8912B; --warn:#DD6B1B; --bad:#C0392B;
  --shadow:0 1px 0 rgba(18,34,79,.06),0 6px 20px rgba(18,34,79,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:#0E1730;font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;
  color:var(--ink);-webkit-font-smoothing:antialiased;display:flex;justify-content:center;min-height:100vh}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
a{color:inherit;text-decoration:none}
#shell{width:100%;max-width:430px;background:var(--paper);min-height:100vh;display:flex;
  flex-direction:column;box-shadow:0 0 60px rgba(0,0,0,.5)}
@media(min-width:640px){body{padding:28px 0}#shell{min-height:calc(100vh - 56px);border-radius:22px;overflow:hidden}}

.topbar{background:var(--navy);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:40}
.logo{display:flex;align-items:center;gap:7px;font-style:italic;font-weight:800;font-size:17px;flex:1}
.bars{display:flex;flex-direction:column;gap:2px}
.bars i{display:block;width:13px;height:3px;background:var(--green);transform:skewX(-20deg)}
.logo .b{color:var(--green)}.logo .c{color:#9AA1B4;font-size:12px}
.topbar h1{font-size:16px;margin:0;font-weight:600;flex:1}
.topbar .back{font-size:22px;line-height:1;padding:0 6px 3px;border-radius:8px}
.bell{position:relative;font-size:18px}
.bell b{position:absolute;top:-4px;right:-6px;background:var(--green);color:var(--navy);font-size:10px;
  min-width:16px;height:16px;border-radius:9px;display:grid;place-items:center;font-weight:700}

.screen{flex:1;padding:16px 14px 92px}
h2.sec{font-size:12px;letter-spacing:.06em;color:var(--grey);margin:22px 4px 8px;font-weight:700}
h2.sec:first-child{margin-top:4px}

.flash{background:#EDF7E6;border:1px solid #CFE8BC;color:#2F6B12;border-radius:9px;
  padding:11px 13px;font-size:13.5px;margin-bottom:12px;line-height:1.5}
.flash.bad{background:#FBE7E5;border-color:#F1C4BF;color:#8E2A1F}

.doc{background:var(--card);border:1px solid var(--rule);border-radius:10px;margin-bottom:10px;
  overflow:hidden;box-shadow:var(--shadow);display:block}
.doc .band{height:4px}
.doc .body{padding:12px 13px}
.doc .row1{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.doc .name{font-weight:700;font-size:15px;line-height:1.25}
.doc .veh{font-size:12.5px;color:var(--muted);margin-top:3px}
.pill{font-size:11.5px;font-weight:700;padding:5px 9px;border-radius:999px;white-space:nowrap;border:1px solid transparent}
.p-ok{background:#EDF7E6;color:#3D7A1F;border-color:#CFE8BC}
.p-soon{background:#FBF2DE;color:#8A6414;border-color:#EFDCAE}
.p-warn{background:#FCEBDF;color:#A34A0F;border-color:#F3D0B6}
.p-bad{background:#FBE7E5;color:#95271C;border-color:#F1C4BF}
.p-arch{background:#EEF0F4;color:#5A6272;border-color:#DDE1E9}
.cells{display:grid;grid-template-columns:1fr 1fr 1fr;border-top:1px solid var(--rule);margin-top:11px}
.cells div{padding:8px 10px;border-right:1px solid var(--rule)}
.cells div:last-child{border-right:none}
.cells span{display:block;font-size:9.5px;letter-spacing:.05em;color:var(--muted);margin-bottom:2px}
.cells b{font-size:12.5px;font-weight:600}

.card{background:var(--card);border:1px solid var(--rule);border-radius:10px;padding:14px;margin-bottom:10px;box-shadow:var(--shadow)}
.btn{display:block;width:100%;text-align:center;padding:13px;border-radius:9px;font-weight:700;font-size:15px;margin-top:9px}
.btn-p{background:var(--green);color:#0F2109}
.btn-n{background:var(--navy);color:#fff}
.btn-o{background:#fff;color:var(--navy);border:1.5px solid var(--navy)}
.btn-d{background:#fff;color:var(--bad);border:1.5px solid #E8BCB7}
.field{margin-bottom:13px}
.field label{display:block;font-size:12.5px;font-weight:600;color:var(--grey);margin-bottom:5px}
.field input,.field select,.field textarea{width:100%;padding:11px 12px;border:1px solid var(--rule);border-radius:8px;background:#fff}
.field input:focus,.field select:focus{outline:2px solid var(--green);outline-offset:-1px;border-color:var(--green)}
.hint{font-size:11.5px;color:var(--muted);margin-top:5px;line-height:1.45}
.empty{text-align:center;padding:34px 20px;color:var(--muted);font-size:14px;line-height:1.55}
.meta{font-size:12.5px;color:var(--muted);line-height:1.6}
.kv{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--rule);font-size:13.5px}
.kv:last-child{border-bottom:none}
.kv span{color:var(--muted)}.kv b{font-weight:600;text-align:right}

.ad{border:1px dashed #B9C0CE;border-radius:10px;padding:14px;background:#F7F8FB;text-align:center;margin:14px 0;display:block}
.ad .tag{font-size:9.5px;letter-spacing:.08em;color:#9AA1B4;margin-bottom:6px}
.ad .msg{font-weight:700;color:var(--navy);font-size:14.5px}
.ad .sub{font-size:12px;color:var(--muted);margin-top:3px}

.chk{display:flex;gap:10px;align-items:flex-start;padding:11px;border:1px solid var(--rule);
  border-radius:9px;margin-bottom:8px;cursor:pointer;background:#fff}
.chk input{margin-top:2px;width:17px;height:17px;accent-color:var(--green);flex:none}
.chk .t{font-size:14px;font-weight:600;display:block}
.chk .s{font-size:11.5px;color:var(--muted);margin-top:2px;line-height:1.45;display:block}

.list{background:#fff;border:1px solid var(--rule);border-radius:10px;overflow:hidden;box-shadow:var(--shadow)}
.msg{display:flex;gap:10px;align-items:center;padding:12px;border-bottom:1px solid var(--rule)}
.msg:last-child{border-bottom:none}
.msg a{flex:1}
.unread{font-weight:700}
.seg{display:flex;gap:6px;margin-bottom:12px}
.seg a{flex:1;padding:8px;border:1px solid var(--rule);background:#fff;border-radius:8px;
  font-size:12.5px;font-weight:600;color:var(--muted);text-align:center}
.seg a.on{background:var(--navy);color:#fff;border-color:var(--navy)}

.tabs{position:sticky;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;
  border-top:1px solid var(--rule);z-index:40}
.tabs a{padding:9px 0 11px;font-size:10.5px;color:var(--muted);display:grid;gap:3px;justify-items:center}
.tabs a em{font-style:normal;font-size:18px;line-height:1}
.tabs a.on{color:var(--navy);font-weight:700}

/* VD-UX-050 — confirmation overlay */
.veil{position:fixed;inset:0;background:rgba(10,18,40,.55);display:none;z-index:60;
  align-items:flex-end;justify-content:center}
.veil.on{display:flex}
.sheet{background:#fff;width:100%;max-width:430px;border-radius:16px 16px 0 0;
  padding:18px 16px 22px;max-height:88vh;overflow:auto}
.sheet h3{margin:0 0 4px;font-size:17px;color:var(--navy)}
.sheet p.sub{margin:0 0 14px;font-size:13.5px;color:var(--muted);line-height:1.5}
.note{background:#FFF8E6;border:1px solid #EEDFAE;border-radius:9px;padding:11px 12px;
  font-size:12.5px;line-height:1.5;color:#6B551A;margin-bottom:12px}
.note b{color:#5E4A0F}

/* ---------------------------------------------------------------------------
   Batch 1 — chrome and navigation
   Append to the end of public/css/app.css. These are additions and overrides;
   nothing above needs deleting except the old .logo .bars rules, which are
   now dead because the markup they styled is gone.
   --------------------------------------------------------------------------- */

/* Brand is now a link. It must not look like one. */
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.topbar .logo:hover,
.topbar .logo:focus { text-decoration: none; }

.topbar .logo .vd-logo-mark { flex: none; display: block; }

/* Envelope: icon plus an unread count that sits on its corner. */
.topbar .bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: inherit;
  text-decoration: none;
}
.topbar .bell b {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #C8322B;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* Tabs now hold SVG rather than a text glyph. */
.tabs a em {
  display: block;
  font-style: normal;
  line-height: 0;
}
.tabs a .ico { stroke-width: 1.8; }
.tabs a.on .ico { stroke-width: 2.2; }

/* A fixed bar covers the foot of the page. Reserve the space it occupies,
   including the home indicator area on iPhone. */
.screen.has-tabs {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
.tabs {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Keyboard focus has to be visible; the tabs are the only way around the app. */
.tabs a:focus-visible,
.topbar .bell:focus-visible,
.topbar .logo:focus-visible {
  outline: 2px solid #6CB33F;
  outline-offset: 2px;
  border-radius: 6px;
}



/* Documents screen — status filters */
.doc-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.doc-filters::-webkit-scrollbar { display: none; }
 
.doc-filters .chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid #D8DCE4;
  border-radius: 999px;
  background: #fff;
  color: #12224F;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.doc-filters .chip span {
  font-size: 12px;
  font-weight: 700;
  color: #6B7280;
}
.doc-filters .chip.on {
  background: #12224F;
  border-color: #12224F;
  color: #fff;
}
.doc-filters .chip.on span { color: #9FB4D8; }
.doc-filters .chip:focus-visible {
  outline: 2px solid #6CB33F;
  outline-offset: 2px;
}
 
/* Empty states */
.empty {
  padding: 32px 16px;
  text-align: center;
  color: #12224F;
}
.empty p { margin: 0 0 8px; font-weight: 600; }
.empty .sub {
  max-width: 34em;
  margin: 0 auto 16px;
  font-weight: 400;
  color: #6B7280;
  font-size: 14px;
  line-height: 1.45;
}
