:root{--blue:#0c2d5a;--dark:#081e3b;--bg:#f4f4f5;--card:#fff;--text:#1f2328;--muted:#6b7280;--accent:#c9a227}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
header{background:linear-gradient(135deg,var(--blue),var(--dark));color:#fff;padding:16px;position:sticky;top:0;z-index:5;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.brand{display:flex;align-items:center;gap:12px;max-width:900px;margin:0 auto}
.logo{height:64px;width:64px;object-fit:contain;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))}
h1{font-size:1.25rem;margin:0}
#search{display:block;width:100%;max-width:900px;margin:12px auto 0;padding:10px 14px;border-radius:10px;border:none;font-size:1rem}
main{max-width:900px;margin:0 auto;padding:16px}
.folder{background:var(--card);border-radius:12px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.08);overflow:hidden}
.folder>summary{padding:14px 16px;font-weight:600;cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px}
.folder>summary::after{content:"▸";transition:transform .2s;color:var(--muted)}
.folder[open]>summary::after{transform:rotate(90deg)}
.folder.section>summary{font-size:1.08rem;padding:16px 18px;color:var(--blue)}
.folder.section[open]>summary{border-bottom:1px solid #eef2f6}
.folder .folder{margin:8px 12px 12px;box-shadow:none;border:1px solid #e5e7eb}
.count{font-weight:500;color:var(--muted);font-size:.85rem;margin-right:auto;padding-left:8px}
ul.files{list-style:none;margin:0;padding:0}
ul.files li a{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid #f0f0f0;color:var(--text);text-decoration:none}
ul.files li a:hover{background:#fafafa}
.folder .folder ul.files li:first-child a{border-top:none}
.ic{flex:0 0 38px;height:38px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;color:#fff;background:#6b7280}
.ic.pdf{background:#d32f2f}.ic.doc,.ic.docx{background:#2b579a}.ic.xls,.ic.xlsx,.ic.csv{background:#217346}.ic.ppt,.ic.pptx{background:#d24726}.ic.jpg,.ic.jpeg,.ic.png{background:#7b1fa2}
.name{flex:1;word-break:break-word}
.meta{font-size:.78rem;color:var(--muted);margin-top:2px}
.snippet{font-size:.82rem;color:#374151;margin-top:6px;line-height:1.35}
.snippet mark{background:#fde68a;color:inherit;padding:0 2px;border-radius:2px}
.top{background:var(--card);border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.08);margin-bottom:12px;overflow:hidden}
.top ul.files li:first-child a{border-top:none}
.empty{text-align:center;color:var(--muted);padding:40px 16px}
.folder .empty{padding:24px 16px}
.path{font-size:.75rem;color:var(--muted)}
#updated{text-align:center;color:var(--muted);font-size:.8rem}
.app-bottom{
  position:fixed;
  left:0; right:0;
  bottom:0;
  z-index:18;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background:linear-gradient(to top, var(--bg) 62%, rgba(244,244,245,0));
  pointer-events:none;
}
.app-bottom .app-refresh,
.app-bottom .app-sign-out,
.app-bottom #updated,
.app-bottom #signed-in-as,
.app-bottom .app-change-pw{ pointer-events:auto; }
.app-bottom-actions{
  display:flex;
  gap:8px;
  width:100%;
  max-width:360px;
  pointer-events:none;
}
.app-bottom-actions .app-refresh,
.app-bottom-actions .app-sign-out{
  flex:1;
  margin:0;
  width:auto;
}
.app-sign-out{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:10px 16px;
  border:none;
  border-radius:12px;
  background:#e8eef5;
  color:var(--blue);
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.app-signed-in{
  text-align:center;
  color:var(--muted);
  font-size:.78rem;
}
.app-refresh::before{
  content:"";
  width:1.15em;
  height:1.15em;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M17.65 6.35A7.95 7.95 0 0 0 12 4a8 8 0 1 0 7.9 6.7h-2.02A6 6 0 1 1 12 6c1.55 0 2.95.59 4.04 1.55L13 10.5h7.5V3l-2.85 3.35Z'/></svg>") center / contain no-repeat;
  mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M17.65 6.35A7.95 7.95 0 0 0 12 4a8 8 0 1 0 7.9 6.7h-2.02A6 6 0 1 1 12 6c1.55 0 2.95.59 4.04 1.55L13 10.5h7.5V3l-2.85 3.35Z'/></svg>") center / contain no-repeat;
}
#app{ padding-bottom:calc(180px + env(safe-area-inset-bottom, 0px)); }
body.radio-open .app-bottom{
  bottom:calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom:10px;
}
body.radio-open #app{
  padding-bottom:calc(232px + env(safe-area-inset-bottom, 0px));
}

#gate header{position:relative}
.pin-wrap{max-width:360px;margin:0 auto;padding:28px 16px 40px;text-align:center}
.pin-label{margin:0 0 16px;font-size:1.05rem;color:var(--text);font-weight:600}
.pin-dots{display:flex;justify-content:center;gap:12px;margin-bottom:18px}
.pin-dots span{width:14px;height:14px;border-radius:50%;border:2px solid var(--blue);background:transparent;transition:background .12s}
.pin-dots span.filled{background:var(--blue)}
#pin{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:300px;margin:0 auto}
.keypad button{height:62px;border:none;border-radius:14px;background:var(--card);box-shadow:0 1px 3px rgba(0,0,0,.1);font-size:1.4rem;font-weight:600;color:var(--text);cursor:pointer}
.keypad button:active{background:#e8eef5}
.keypad button.key-util{font-size:1.05rem;color:var(--blue)}
.pin-error{color:#b91c1c;margin:16px 0 0;font-size:.95rem}
.pin-wrap.shake{animation:shake .35s}
@keyframes shake{25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-4px)}}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.login-wrap{max-width:400px;margin:0 auto;padding:28px 16px 40px;text-align:center}
.login-wrap .pin-label{margin-bottom:18px}
.login-form{text-align:left;margin:0}
.login-form .btn{margin-top:4px}
.login-roster{margin:0;text-align:left;line-height:1.45;color:var(--text)}
.login-roster p{margin:0 0 14px}
.login-wrap .pin-error{margin-top:14px}



.fleet-wrap{padding:12px 12px 16px}
.fleet-setup,.fleet-empty{color:var(--muted);padding:12px 4px 16px;line-height:1.45;text-align:center}
.fleet-setup p{margin:0 0 12px}
.fleet-head{margin:0 0 12px}
.fleet-head h3,.fleet-block h3{margin:0 0 4px;font-size:1rem;color:var(--blue)}
.fleet-block{margin:16px 0 0}
.fleet-block:first-child{margin-top:4px}
.fleet-filter{width:100%;padding:10px 12px;border:1px solid #e5e7eb;border-radius:10px;font-size:1rem;margin:8px 0 10px}
.fleet-vehicles{list-style:none;margin:0 0 12px;padding:0;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#fff}
.vehicle-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#fff;border:none;border-top:1px solid #f0f0f0;padding:12px 14px;cursor:pointer;color:var(--text)}
.fleet-vehicles li:first-child .vehicle-row{border-top:none}
.vehicle-row:hover{background:#fafafa}
.vehicle-row.in-service{
  background:#dcfce7;
  border-left:6px solid #16a34a;
  padding-left:12px;
}
.vehicle-row.in-service:hover{background:#bbf7d0}
.vehicle-row.out-of-service{
  background:#fecaca;
  border-left:6px solid #dc2626;
  padding-left:12px;
}
.vehicle-row.out-of-service:hover{background:#fca5a5}
.vehicle-row .chev{color:var(--muted);font-size:1.2rem}
.fleet-badge.oos{background:#dc2626;color:#fff}
.fleet-status{
  display:inline-block;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:3px 8px;
  border-radius:999px;
  margin:6px 0 2px;
}
.fleet-status.in-service{background:#166534;color:#fff}
.fleet-status.out-of-service{background:#991b1b;color:#fff}
.ticket-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px;margin:0 0 10px;cursor:pointer;text-align:left}
.ticket-card:hover{border-color:#c9d4e3}
.ticket-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.ticket-title{font-weight:600}
.ticket-desc{margin:8px 0 0;white-space:pre-wrap;line-height:1.4}
.ticket-badges{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end}
.ticket-photo{display:block;width:100%;max-height:240px;object-fit:cover;border-radius:8px;margin-top:10px}
.ticket-notes,.ticket-done{margin-top:10px}
.ticket-note,.ticket-done{background:#f6f8fb;border-radius:8px;padding:10px 12px;margin-top:8px;font-size:.92rem;line-height:1.4}
.notice-open{background:#fff7e6;border:1px solid #f1d48a;border-radius:10px;padding:12px;margin:0 0 14px}
.notice-open p{margin:8px 0 12px;color:#5c4a12;line-height:1.4}
.fleet-badge{display:inline-block;font-size:.7rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;padding:3px 7px;border-radius:999px;background:#e5e7eb;color:#374151}
.pri-low{background:#e5e7eb;color:#374151}
.pri-medium{background:#fde68a;color:#7c4a00}
.pri-high{background:#ffd7b0;color:#9a3412}
.pri-urgent{background:#fecaca;color:#991b1b}
.st-open{background:#dbeafe;color:#1e3a8a}
.st-in_progress{background:#fef3c7;color:#92400e}
.st-completed{background:#dcfce7;color:#166534}
.fleet-form{display:flex;flex-direction:column;gap:12px;margin:12px 0}
.fleet-field{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:.9rem;color:var(--text)}
.fleet-field input,.fleet-field select,.fleet-field textarea{font-weight:400;font-size:1rem;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;font-family:inherit;width:100%;background:#fff}
.fleet-field textarea{resize:vertical}
.btn{display:inline-block;width:100%;min-height:46px;border:none;border-radius:10px;font-size:1rem;font-weight:600;cursor:pointer;padding:10px 14px;margin:8px 0}
.btn-primary{background:var(--blue);color:#fff}
.btn-primary:active{background:var(--dark)}
.btn-ghost{background:#e8eef5;color:var(--blue)}
.btn-tight{margin-top:0;margin-bottom:12px}
.btn-row{display:flex;flex-direction:column;gap:0}
.fleet-inline-error{background:#fee2e2;color:#991b1b;border-radius:10px;padding:10px 12px;margin:0 0 12px;font-size:.95rem}
@media(min-width:640px){
  .btn-row{flex-direction:row;gap:8px}
  .btn-row .btn{width:auto;flex:1}
}

/* Home tiles */
.tile-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
@media (min-width:640px){
  .tile-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (min-width:980px){
  .tile-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); }
}
.home-tile{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  padding:10px 14px;
  border:0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 1px 3px rgba(8,30,59,.10), 0 8px 20px rgba(8,30,59,.05);
  color:inherit;
  text-align:left;
  cursor:pointer;
  font:inherit;
  -webkit-tap-highlight-color:transparent;
}
.home-tile:active{ transform:scale(.98); }
.tile-icon{
  width:40px;
  height:40px;
  color:var(--blue);
  display:flex;
}
.tile-icon svg{ width:40px; height:40px; display:block; }
.tile-title{
  font-weight:700;
  font-size:1.05rem;
  color:var(--blue);
  line-height:1.25;
}
.home-tile-alert .tile-icon,
.home-tile-alert .tile-title{
  color:#c41e3a;
}
.tile-count{
  color:var(--muted);
  font-size:.88rem;
}
.section-page{ display:flex; flex-direction:column; gap:10px; }
.section-heading{
  margin:0;
  color:var(--blue);
  font-size:1.25rem;
}
.page-back,
.fleet-back,
.app-refresh{
  display:inline-flex;
  align-items:center;
  gap:8px;
  align-self:flex-start;
  min-height:44px;
  padding:8px 16px 8px 14px;
  margin:0;
  border:0;
  border-radius:999px;
  background:var(--blue);
  color:#fff;
  font:inherit;
  font-size:1rem;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  box-shadow:0 1px 2px rgba(8,30,59,.25);
}
.page-back::before,
.fleet-back::before{
  content:"←";
  font-weight:700;
  font-size:1.15em;
  line-height:1;
}
.page-back:hover,
.fleet-back:hover,
.app-refresh:hover{ background:var(--dark); }
.page-back:active,
.fleet-back:active{ transform:scale(.98); }
.app-refresh:active{ transform:scale(.98); }
.app-refresh{ align-self:center; }
.fleet-back{ margin:0 0 8px; }
.fleet-archived{
  margin-top:8px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.fleet-archived > summary{ font-weight:700; color:var(--blue); }
.fleet-archived .fleet-vehicles{ margin:0 12px 12px; }
.fleet-archived .fleet-empty{ margin:0 16px 14px; }


/* Scenario Check */
.scenario-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 1px 3px rgba(8,30,59,.10);
  padding:16px 16px 14px;
  margin:0 0 16px;
}
.scenario-card h3,.scenario-again h3{
  margin:0 0 6px;
  color:var(--blue);
  font-size:1.05rem;
}
.scenario-lead{margin:0 0 12px;color:var(--muted);font-size:.92rem;line-height:1.45}
.scenario-form textarea{
  width:100%;
  min-height:110px;
  padding:12px 14px;
  border:1px solid #d1d5db;
  border-radius:10px;
  font:inherit;
  font-size:1rem;
  line-height:1.4;
  resize:vertical;
  margin-bottom:8px;
}
.scenario-disclaimer{
  margin:10px 0 0;
  padding:10px 12px;
  background:#f8f4e8;
  border-left:3px solid var(--accent);
  color:#5c4a12;
  font-size:.88rem;
  line-height:1.4;
  border-radius:0 8px 8px 0;
}
.scenario-results .scenario-disclaimer{margin:0 0 14px}
.scenario-matched{margin:0 0 14px;font-size:.95rem;line-height:1.45}
.scenario-matched .lbl{font-weight:700;color:var(--blue);margin-right:4px}
.scenario-tag{
  display:inline-block;
  background:#e8eef5;
  color:var(--blue);
  border-radius:999px;
  padding:3px 9px;
  font-size:.78rem;
  font-weight:600;
  margin:0 4px 4px 0;
}
.scenario-doc{
  background:#fff;
  border-radius:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.08);
  padding:14px 16px 8px;
  margin:0 0 12px;
}
.scenario-doc-title{
  color:var(--blue);
  font-weight:700;
  text-decoration:none;
  font-size:1.02rem;
  line-height:1.3;
}
.scenario-doc-title:hover{text-decoration:underline}
.scenario-kind{font-size:.75rem;color:var(--muted)}
.scenario-tags{margin-top:6px}
.scenario-section{border-top:1px solid #eef2f6;padding:10px 0}
.scenario-heading{
  display:block;
  color:var(--text);
  text-decoration:none;
  font-weight:600;
  font-size:.95rem;
  line-height:1.35;
}
.scenario-heading:hover{color:var(--blue)}
.scenario-rules{margin:8px 0 0}
.scenario-rules-label{
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#92400e;
  margin-bottom:4px;
}
.scenario-rules ul{margin:0;padding:0;list-style:none}
.scenario-rules li{
  background:#fffbeb;
  border-radius:8px;
  padding:8px 10px;
  margin:0 0 6px;
  font-size:.9rem;
  line-height:1.4;
}
.scenario-rules mark{background:#fde68a;color:inherit;padding:0 2px;border-radius:2px}
.scenario-again{margin:20px 0 0}
.scenario-again .scenario-card{box-shadow:none;border:1px solid #e5e7eb;padding:0;margin:0}

/* Live Radio */
.radio-tile-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.88rem;
  color:var(--muted);
  font-weight:600;
}
.radio-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#9ca3af;
  display:inline-block;
  flex:0 0 8px;
}
.radio-tile-status.is-live .radio-dot,
.radio-dot.is-live{
  background:#16a34a;
  box-shadow:0 0 0 3px rgba(22,163,74,.2);
}
.radio-tile-status.is-connecting .radio-dot,
.radio-dot.is-connecting{
  background:#d97706;
  animation:radio-pulse 1s ease-in-out infinite;
}
.radio-tile-status.is-error .radio-dot,
.radio-dot.is-error{ background:#dc2626; }
.radio-tile-status.is-live{ color:#166534; }
@keyframes radio-pulse{ 50%{ opacity:.35 } }

.radio-page{
  background:#fff;
  border-radius:16px;
  box-shadow:0 1px 3px rgba(8,30,59,.10);
  padding:28px 20px 24px;
  text-align:center;
}
.radio-kicker{
  margin:0 0 8px;
  color:var(--muted);
  font-size:.9rem;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-weight:600;
}
.radio-status{
  margin:0 0 22px;
  font-size:1.15rem;
  font-weight:700;
  color:var(--blue);
}
.radio-status.is-live{ color:#166534; }
.radio-status.is-connecting{ color:#92400e; }
.radio-status.is-error{ color:#b91c1c; }
.radio-play{
  width:160px;
  height:160px;
  border:0;
  border-radius:50%;
  background:var(--blue);
  color:#fff;
  font:inherit;
  font-size:1.35rem;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(12,45,90,.28);
}
.radio-play.is-on{ background:#166534; }
.radio-play:active{ transform:scale(.97); }
.radio-error{
  margin:16px 16px 0;
  color:#991b1b;
  background:#fee2e2;
  border-radius:10px;
  padding:10px 12px;
  font-size:.95rem;
  line-height:1.4;
}
.radio-vol{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:24px auto 0;
  max-width:280px;
  text-align:left;
  font-weight:600;
  color:var(--text);
  font-size:.9rem;
}
.radio-vol input{ width:100%; }
.radio-note{
  margin:18px auto 0;
  max-width:360px;
  color:var(--muted);
  font-size:.85rem;
  line-height:1.45;
}

#radio-audio{ display:none; }
#radio-bar{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:20;
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--dark);
  color:#fff;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow:0 -4px 16px rgba(0,0,0,.25);
}
#radio-bar[hidden]{ display:none !important; }
.radio-bar-main{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  background:none;
  border:0;
  color:#fff;
  font:inherit;
  text-align:left;
  cursor:pointer;
  padding:6px 4px;
}
.radio-bar-copy{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.radio-bar-title{ font-weight:700; }
.radio-bar-btn{
  flex:0 0 auto;
  background:#e8eef5;
  color:var(--blue);
  border:0;
  border-radius:10px;
  font:inherit;
  font-weight:700;
  padding:10px 16px;
  cursor:pointer;
}

/* In-app document viewer */
.doc-viewer{ display:flex; flex-direction:column; gap:12px; }
.doc-toolbar-nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.doc-open-full{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  min-height:44px;
  padding:8px 16px;
  border-radius:999px;
  border:2px solid var(--blue);
  color:var(--blue);
  background:#fff;
  font:inherit;
  font-size:1rem;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}
.doc-open-full:hover{ background:#eef3f8; }
.doc-pages{
  background:#e5e7eb;
  border-radius:12px;
  box-shadow:0 1px 3px rgba(0,0,0,.08);
  padding:8px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y pinch-zoom;
}
.doc-page-list{ display:flex; flex-direction:column; gap:8px; }
.doc-page{
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.14);
  line-height:0;
}
.doc-page canvas{ display:block; width:100%; height:auto; }

/* Recently Updated board */
.updates-board{
  background:linear-gradient(180deg,#fff8e4,#ffffff);
  border:2px solid var(--accent);
  border-radius:16px;
  box-shadow:0 2px 10px rgba(8,30,59,.12);
  padding:16px 16px 12px;
  margin:0 0 16px;
}
.updates-board h2{
  margin:0 0 10px;
  color:var(--blue);
  font-size:1.15rem;
}
.updates-empty{
  margin:0;
  color:var(--muted);
  font-size:.95rem;
  padding:6px 0 4px;
}
.updates-list{ list-style:none; margin:0; padding:0; }
.updates-list a{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;
  padding:11px 4px;
  border-top:1px solid #f0e6c8;
  color:var(--text);
  text-decoration:none;
}
.updates-list li:first-child a{ border-top:none; }
.updates-list a:hover{ background:#fff3cc; }
.updates-title{ flex:1 1 160px; font-weight:700; color:var(--blue); }
.updates-meta{ color:var(--muted); font-size:.85rem; }
.change-badge{
  display:inline-block;
  flex:0 0 auto;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.04em;
  padding:2px 7px;
  border-radius:999px;
  color:#fff;
  vertical-align:middle;
  margin-right:6px;
}
.change-badge.is-new{ background:#15803d; }
.change-badge.is-updated{ background:#c2410c; }
.updates-show-all{
  display:block;
  width:100%;
  margin-top:8px;
  padding:10px 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--blue);
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.updates-show-all:hover{ background:#fff3cc; }
/* Training & policy acknowledgments */
.ack-bar{
  background:#eef3f8;
  border:1px solid #d5e0ed;
  border-radius:14px;
  padding:12px 14px;
  margin:0 0 14px;
  color:var(--text);
}
.ack-bar p{ margin:0; }
.ack-bar-status{ margin-top:6px !important; }
.ack-lead{ margin:0 0 10px; line-height:1.45; }
.ack-info{
  background:#e8f5e9;
  color:#14532d;
  border-radius:10px;
  padding:10px 12px;
  margin:0 0 12px;
  font-size:.95rem;
}
.ack-text-btn{
  border:0;
  background:none;
  color:var(--blue);
  font:inherit;
  font-weight:700;
  padding:0;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:2px;
}
.ack-need{
  display:inline-block;
  font-size:.75rem;
  font-weight:800;
  letter-spacing:.02em;
  color:#9a3412;
  background:#ffedd5;
  border-radius:999px;
  padding:2px 8px;
}
.ack-ok{ color:#166534; font-weight:700; }
.ack-board-count{ margin:0 0 8px; font-weight:700; color:var(--blue); }
.ack-viewer{
  background:linear-gradient(180deg,#eef6ff,#ffffff);
  border:2px solid var(--blue);
  border-radius:14px;
  padding:14px 16px 12px;
  margin:16px 0 24px;
  scroll-margin-bottom:calc(160px + env(safe-area-inset-bottom, 0px));
}
.ack-viewer p{ margin:0 0 8px; }
.ack-read-btn{ margin:4px 0 8px; }
.ack-confirmed{ font-weight:700; color:#14532d; }
.ack-my-pending{ margin:8px 0 16px; }
.ack-doc-actions{ margin:10px 0 8px; }
.ack-caught-up{ margin:8px 0 14px; }
.ack-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:8px 0 12px;
}
.ack-tab{
  flex:1 1 120px;
  min-height:40px;
  border:2px solid var(--blue);
  background:#fff;
  color:var(--blue);
  border-radius:999px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.ack-tab.is-on{ background:var(--blue); color:#fff; }
.ack-doc-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.ack-doc-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px 14px;
  box-shadow:0 1px 3px rgba(8,30,59,.06);
}
.ack-doc-card h3{ margin:0 0 6px; font-size:1.05rem; }
.ack-doc-card h3 a{ color:var(--blue); text-decoration:none; }
.ack-progress{ margin:6px 0 8px; font-weight:700; }
.ack-people{ margin:6px 0 0; padding-left:1.1em; }
.ack-people li{ margin:0 0 4px; }
.ack-check{ flex-direction:row !important; align-items:center; gap:8px !important; font-weight:600; }
.ack-check input{ width:auto !important; }
.ack-setup code{ font-size:.85em; word-break:break-all; }
.ack-signin .meta{ margin-top:0; }
#ack-home-count{ font-weight:700; }

/* Trespass List and Tow List cards */
.trespass-toolbar{display:flex;flex-direction:column;gap:8px;margin:0 0 8px}
.trespass-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:0;
  margin:0 0 10px;
  text-align:left;
  overflow:hidden;
}
.trespass-summary{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  min-height:52px;
  padding:10px 14px;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
  -webkit-tap-highlight-color:rgba(12,45,90,.12);
}
.trespass-summary-text{flex:1;min-width:0}
.trespass-name{display:block;font-weight:700;font-size:1.02rem;color:var(--blue);margin:0;line-height:1.3;word-break:break-word}
.trespass-meta{display:block;margin:2px 0 0;font-size:.92rem;font-weight:600;color:var(--muted)}
.trespass-chevron{flex:0 0 22px;width:22px;height:22px;color:var(--blue);transition:transform .15s ease}
.trespass-card.is-open .trespass-chevron{transform:rotate(180deg)}
.trespass-detail{padding:0 14px 12px;border-top:1px solid #e5e7eb;padding-top:10px}
.trespass-fields{display:grid;grid-template-columns:1fr;gap:8px;margin:0}
.trespass-fields dt{font-size:.72rem;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--muted)}
.trespass-fields dd{margin:2px 0 0;font-size:.95rem;line-height:1.35}
.trespass-archived{margin-top:16px}
.trespass-archived .trespass-card{margin:0 12px 10px}
.trespass-archived .fleet-empty{margin:0 16px 14px}
@media(min-width:640px){
  .trespass-fields{grid-template-columns:1fr 1fr}
}
.trespass-archive-note{margin:8px 0 0;font-size:.9rem;font-weight:600;color:#7c4a00;background:#fff7e6;border-radius:8px;padding:8px 10px}
.trespass-card .btn-tight{width:auto;margin:10px 0 0}
.trespass-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.trespass-actions .btn-tight{margin:0}
.field-optional{font-style:normal;font-weight:600;color:var(--muted);font-size:.85em}
.trespass-mi{max-width:4.5rem;text-transform:uppercase}
.tow-reason{grid-column:1 / -1}
.tow-upper,.trespass-upper{text-transform:uppercase}
.ack-pw-row{ display:flex; gap:8px; align-items:center; }
.ack-pw-row input{ flex:1; font-family:ui-monospace,Menlo,Consolas,monospace; letter-spacing:.03em; }
.ack-notice{ word-break:break-word; }
.ack-officer-list .vehicle-row{ flex-wrap:wrap; cursor:default; }
.ack-officer-list .vehicle-row > div:first-child{ flex:1 1 100%; min-width:0; }
.ack-officer-list .vehicle-row .btn-row{ flex-direction:row; flex-wrap:wrap; gap:6px; width:100%; }
.ack-officer-list .vehicle-row .btn-row .btn{ flex:1 1 auto; width:auto; min-height:38px; margin:0; padding:8px 12px; font-size:.9rem; }
.ack-officer-list #ack-reset-form{ padding:0 14px 14px; }

.app-change-pw{ background:none; border:none; padding:2px 6px; margin:0; font:inherit; font-size:.78rem; font-weight:600; color:var(--blue); text-decoration:underline; cursor:pointer; }
.pw-sheet{ position:fixed; inset:0; z-index:60; background:rgba(15,23,42,.55); display:flex; align-items:flex-start; justify-content:center; padding:max(24px, env(safe-area-inset-top, 0px)) 16px 24px; overflow-y:auto; }
.pw-card{ background:#fff; border-radius:16px; width:100%; max-width:420px; padding:20px 18px 12px; box-shadow:0 10px 30px rgba(0,0,0,.25); }
.pw-card h2{ margin:0 0 6px; font-size:1.25rem; color:var(--blue); }
.pw-card .meta{ margin:4px 0; }
.pw-card .fleet-form{ margin-top:12px; }
.ack-setup-mail{ flex-direction:row !important; align-items:flex-start; gap:8px !important; font-weight:600; }
.ack-setup-mail input{ width:auto !important; margin-top:3px; }

.pw-rules{ margin:4px 0; font-size:.9rem; font-weight:600; color:var(--text); }
.login-code-toggle{ display:block; margin:10px auto 0; font-size:.9rem; }
