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

:root{
  --bg:#FFFFFF;
  --ink:#1E293B;
  --muted:#64748B;
  --muted-2:#94A3B8;
  --border:#E2E8F0;
  --border-light:#F1F5F9;
  --teal:#0F766E;
  --teal-dark:#0b5c56;
  --teal-tint:#F0FDFA;
  --teal-tint-ink:#0f5953;
  --orange:#EA580C;
  --orange-dark:#c2480a;
  --orange-tint:#FFF7ED;
  --orange-tint-ink:#9a3f12;
  --slate-tint:#F8FAFC;
  --red:#B91C1C;
  --red-tint:#FEF2F2;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'IBM Plex Sans', system-ui, sans-serif;
  font-size:14px;
  line-height:1.5;
}
h1,h2,h3,.heading{ font-family:'Manrope', system-ui, sans-serif; font-weight:800; letter-spacing:-0.3px; margin:0; }
a{ color:var(--teal); text-decoration:none; transition:color .15s ease; }
a:hover{ color:var(--teal-dark); }
table{ border-collapse:collapse; width:100%; }
button{ font-family:inherit; cursor:pointer; }
input, select, textarea{ font-family:inherit; font-size:13.5px; }
button, .btn, .filter-pill, .row, .notif-item, .account-menu-item, .type-card, .doc-thumb, .kanban-card{
  transition:background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

/* ---- Top nav ---- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 48px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand .wordmark{ font-size:19px; font-weight:800; letter-spacing:-0.3px; }
.brand .wordmark span{ font-weight:500; color:var(--muted); }
.brand-badge{
  font-size:10px; font-weight:700; letter-spacing:1px; color:var(--orange);
  background:var(--orange-tint); padding:3px 7px; margin-left:6px;
}
.navlinks{ display:flex; gap:30px; font-size:14px; font-weight:600; }
.navlinks a{ color:var(--muted); font-weight:500; }
.navlinks a.active{ color:var(--teal); font-weight:700; }
.navright{ display:flex; align-items:center; gap:40px; }
.avatar{
  width:36px; height:36px; background:var(--teal); color:#fff; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700;
}
.route-dots{
  background-image: radial-gradient(circle, #CBD5E1 1.5px, transparent 1.5px);
  background-size: 10px 3px; background-repeat: repeat-x; background-position: center; height:3px;
}

/* ---- Page shell ---- */
.page{ padding:36px 48px 64px; max-width:1440px; margin:0 auto; }
.page-header{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:28px; flex-wrap:wrap; gap:16px; }
.page-title{ font-size:30px; }
.page-sub{ font-size:13px; color:var(--muted); margin-top:6px; }

/* ---- Stat tiles ---- */
.stat-row{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; margin-bottom:32px; }
.stat-tile{ padding:20px 22px; }
.stat-tile .num{ font-size:30px; font-weight:800; font-family:'Manrope',sans-serif; }
.stat-tile .lbl{ font-size:12.5px; margin-top:4px; font-weight:600; }
.tint-teal{ background:var(--teal-tint); }
.tint-teal .num{ color:var(--teal); } .tint-teal .lbl{ color:var(--teal-tint-ink); }
.tint-orange{ background:var(--orange-tint); }
.tint-orange .num{ color:var(--orange); } .tint-orange .lbl{ color:var(--orange-tint-ink); }
.tint-slate{ background:var(--slate-tint); }
.tint-slate .num{ color:#334155; } .tint-slate .lbl{ color:var(--muted); }

/* ---- Cards ---- */
.card{ border:1px solid var(--border); background:#fff; }
.card-header{
  padding:16px 22px; border-bottom:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center;
}
.card-header .title{ font-size:15px; font-weight:700; font-family:'Manrope',sans-serif; }
.card-header .link{ font-size:12.5px; font-weight:600; }
.row{ display:flex; align-items:center; gap:16px; padding:16px 22px; border-bottom:1px solid var(--border-light); }
.row:last-child{ border-bottom:none; }
.row:hover{ background:var(--slate-tint); }

/* ---- Account menu ---- */
.account-wrap{ position:relative; }
button.avatar{ border:none; padding:0; font-family:inherit; cursor:pointer; }
.account-menu{
  position:absolute; top:calc(100% + 14px); right:0; width:240px; background:#fff; border:1px solid var(--border);
  box-shadow:0 12px 32px rgba(15,23,42,0.16); z-index:130;
  opacity:0; visibility:hidden; transform:translateY(-6px); transition:opacity .15s ease, transform .15s ease;
}
.account-menu.open{ opacity:1; visibility:visible; transform:translateY(0); }
.account-menu-head{ padding:14px 16px; border-bottom:1px solid var(--border); }
.account-menu-head .name{ font-size:13px; font-weight:700; }
.account-menu-head .email{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.account-menu-item{ display:flex; align-items:center; gap:10px; padding:11px 16px; font-size:13px; color:var(--ink); cursor:pointer; text-decoration:none; }
.account-menu-item:hover{ background:var(--slate-tint); }
.account-menu-item.danger{ color:var(--red); }
.account-menu-divider{ border-top:1px solid var(--border-light); margin:4px 0; }

/* ---- Notifications: bell + panel ---- */
.notif-wrap{ position:relative; }
.notif-bell{ position:relative; background:none; border:none; cursor:pointer; padding:6px; color:var(--muted); display:flex; }
.notif-bell:hover{ color:var(--ink); }
.notif-dot{ position:absolute; top:4px; right:5px; width:8px; height:8px; border-radius:50%; background:var(--orange); border:2px solid #fff; }
.notif-dot.hide{ display:none; }
.notif-panel{
  position:absolute; top:calc(100% + 14px); right:0; width:380px; background:#fff; border:1px solid var(--border);
  box-shadow:0 12px 32px rgba(15,23,42,0.16); z-index:130;
  opacity:0; visibility:hidden; transform:translateY(-6px); transition:opacity .15s ease, transform .15s ease;
}
.notif-panel.open{ opacity:1; visibility:visible; transform:translateY(0); }
.notif-panel-head{ padding:14px 18px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.notif-panel-head .heading{ font-size:14px; }
.notif-panel-head button{ background:none; border:none; cursor:pointer; font-size:12px; font-weight:600; color:var(--teal); padding:0; }
.notif-panel-head button:hover{ color:var(--teal-dark); }
.notif-list{ max-height:360px; overflow-y:auto; }
.notif-item{ padding:14px 18px; border-bottom:1px solid var(--border-light); display:flex; gap:12px; align-items:flex-start; cursor:pointer; }
.notif-item:hover{ background:var(--slate-tint); }
.notif-item:last-child{ border-bottom:none; }
.notif-icon{ width:32px; height:32px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.notif-icon.warn{ background:var(--orange-tint); color:var(--orange); }
.notif-icon.info{ background:var(--teal-tint); color:var(--teal); }
.notif-title{ font-size:12.5px; font-weight:600; line-height:1.4; }
.notif-meta{ font-size:11.5px; color:var(--muted); margin-top:3px; }
.notif-unread-dot{ width:7px; height:7px; border-radius:50%; background:var(--teal); flex-shrink:0; margin-top:5px; }
.notif-panel-foot{ padding:12px 18px; display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--border); }
.notif-panel-foot a{ font-size:12.5px; font-weight:600; }

/* ---- Notifications list page ---- */
.notif-row{ display:flex; gap:16px; align-items:flex-start; padding:18px 22px; border-bottom:1px solid var(--border-light); }
.notif-row:last-child{ border-bottom:none; }
.notif-row .notif-icon{ width:38px; height:38px; }

/* ---- Reminder settings drawer content ---- */
.chip-row{ display:flex; flex-wrap:wrap; gap:8px; }
.check-row{ display:flex; align-items:center; gap:10px; font-size:13.5px; padding:10px 0; border-bottom:1px solid var(--border-light); }
.check-row:last-child{ border-bottom:none; }
.check-row input{ width:16px; height:16px; }

/* ---- Applications filter bar ---- */
.filter-bar{
  display:flex; flex-wrap:wrap; align-items:center; gap:22px;
  padding:16px 20px; background:var(--slate-tint); border:1px solid var(--border); margin-bottom:20px;
}
.filter-group{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.filter-label{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.6px; color:var(--muted); margin-right:2px; }
.filter-pill{
  padding:6px 13px; font-size:12.5px; font-weight:600; border:1px solid var(--border);
  background:#fff; color:var(--muted); cursor:pointer; white-space:nowrap;
}
.filter-pill:hover{ border-color:var(--muted-2); color:var(--ink); }
.filter-pill.active{ background:var(--ink); color:#fff; border-color:var(--ink); }
.search-wrap{ position:relative; flex:1; min-width:230px; }
.search-wrap svg{ position:absolute; left:12px; top:50%; transform:translateY(-50%); pointer-events:none; }
.search-wrap input{ width:100%; padding:9px 14px 9px 36px; border:1px solid var(--border); font-size:13px; background:#fff; }
.search-wrap input:focus{ outline:none; border-color:var(--teal); }
.filter-clear{ font-size:12px; font-weight:600; color:var(--teal); cursor:pointer; white-space:nowrap; }
.filter-clear:hover{ color:var(--teal-dark); }
.result-count{ font-size:12.5px; color:var(--muted); padding:14px 22px 0; }
.empty-state{ display:none; padding:60px 20px; text-align:center; }
.empty-state.show{ display:block; }

/* ---- Buttons ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 20px; font-size:13.5px; font-weight:700; border:none; white-space:nowrap;
}
.btn-primary{ background:var(--teal); color:#fff; }
.btn-primary:hover{ background:var(--teal-dark); }
.btn-primary:disabled{ background:#CBD5E1; color:#fff; cursor:not-allowed; }
.btn-secondary{ background:#fff; color:var(--ink); border:1px solid var(--border); }
.btn-secondary:hover{ border-color:var(--muted-2); }
.btn-orange{ background:var(--orange); color:#fff; }
.btn-orange:hover{ background:var(--orange-dark); }
.btn-sm{ padding:7px 14px; font-size:12.5px; }
.btn-block{ width:100%; }

/* ---- Status badges ---- */
.badge{ font-size:11px; letter-spacing:0.3px; padding:4px 9px; font-weight:700; display:inline-block; }
.badge-submitted{ background:#F1F5F9; color:#475569; }
.badge-process{ background:var(--orange-tint); color:var(--orange-tint-ink); }
.badge-issued{ background:var(--teal-tint); color:var(--teal-tint-ink); }
.badge-delivered{ background:var(--ink); color:#fff; }
.badge-missing{ background:var(--red-tint); color:var(--red); }
.badge-uploaded{ background:var(--teal-tint); color:var(--teal-tint-ink); }

/* ---- Route stepper (application status) ---- */
.stepper{ display:flex; align-items:center; }
.stepper .dot{ width:8px; height:8px; border-radius:50%; background:var(--border); flex-shrink:0; }
.stepper .dot.done{ background:var(--teal); }
.stepper .dot.active{ background:var(--orange); }
.stepper .seg{ flex:1; height:2px; background-image:linear-gradient(to right, #CBD5E1 50%, transparent 0%); background-size:8px 2px; }
.stepper .seg.done{ background:var(--teal); }
.stepper-lbl{ font-size:10.5px; font-weight:600; margin-top:4px; }

/* Big stepper for status page */
.stepper-lg{ display:flex; align-items:flex-start; margin:36px 0; }
.stepper-lg .step{ flex:1; text-align:center; position:relative; }
.stepper-lg .circle{
  width:34px; height:34px; border-radius:50%; background:#fff; border:2px solid var(--border);
  display:flex; align-items:center; justify-content:center; margin:0 auto 10px; font-size:14px; font-weight:700; color:var(--muted-2);
}
.stepper-lg .circle.done{ background:var(--teal); border-color:var(--teal); color:#fff; }
.stepper-lg .circle.active{ background:var(--orange); border-color:var(--orange); color:#fff; }
.stepper-lg .line{ position:absolute; top:17px; left:-50%; width:100%; height:2px; background:var(--border); z-index:-1; }
.stepper-lg .line.done{ background:var(--teal); }
.stepper-lg .step:first-child .line{ display:none; }
.stepper-lg .step-name{ font-size:13px; font-weight:700; }
.stepper-lg .step-date{ font-size:11.5px; color:var(--muted); margin-top:2px; }

/* ---- Forms ---- */
.form-section{ border:1px solid var(--border); margin-bottom:20px; }
.form-section-header{
  padding:14px 22px; background:var(--slate-tint); border-bottom:1px solid var(--border);
  font-size:14px; font-weight:700; font-family:'Manrope',sans-serif;
  display:flex; align-items:center; gap:10px;
}
.form-section-header .step-num{
  width:22px; height:22px; background:var(--teal); color:#fff; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0;
}
.form-body{ padding:22px; }
.field-grid{ display:grid; gap:16px; }
.cols-2{ grid-template-columns:1fr 1fr; }
.cols-3{ grid-template-columns:1fr 1fr 1fr; }
.cols-4{ grid-template-columns:repeat(4,1fr); }
.field label{ display:block; font-size:12px; font-weight:600; color:var(--muted); margin-bottom:6px; }
.field input, .field select{
  width:100%; padding:9px 12px; border:1px solid var(--border); background:#fff; color:var(--ink); font-size:13.5px;
}
.field input:focus, .field select:focus{ outline:none; border-color:var(--teal); }
.field .unit{ font-size:11.5px; color:var(--muted-2); margin-top:4px; }

/* ---- Dropzone (registration upload / auto-fill) ---- */
.dropzone{
  border:2px dashed var(--border); background:var(--slate-tint); padding:36px 24px; text-align:center;
  cursor:pointer; transition:border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag{ border-color:var(--teal); background:var(--teal-tint); }
.dropzone .dz-title{ font-size:14px; font-weight:700; font-family:'Manrope',sans-serif; margin-top:12px; }
.dropzone .dz-sub{ font-size:12px; color:var(--muted); margin-top:4px; }
.upload-status{ display:none; align-items:center; gap:10px; margin-top:16px; padding:12px 16px; background:var(--slate-tint); font-size:13px; font-weight:600; }
.upload-status.show{ display:flex; }
.upload-status.success{ background:var(--teal-tint); color:var(--teal-tint-ink); }
.upload-preview-row{ display:flex; align-items:center; gap:16px; margin-top:16px; }
.spinner{ width:14px; height:14px; border:2px solid var(--border); border-top-color:var(--teal); border-radius:50%; animation:spin .7s linear infinite; flex-shrink:0; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ---- Permit type cards ---- */
.type-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; }
.type-card{
  border:1px solid var(--border); padding:26px 22px; text-align:left; background:#fff; cursor:pointer;
  transition:border-color .15s, transform .15s;
}
.type-card:hover{ border-color:var(--teal); transform:translateY(-2px); }
.type-card .icon{ margin-bottom:16px; }
.type-card .name{ font-size:16px; font-weight:700; font-family:'Manrope',sans-serif; margin-bottom:6px; }
.type-card .desc{ font-size:12.5px; color:var(--muted); }
.type-card .tag{ font-size:10.5px; font-weight:700; letter-spacing:0.5px; color:var(--orange); margin-top:12px; display:inline-block; }

/* ---- Compliance calculator ---- */
.compliance-table{ width:100%; border-collapse:collapse; }
.compliance-table th{ font-size:11px; text-transform:uppercase; letter-spacing:0.5px; color:var(--muted); text-align:left; padding:8px 10px; border-bottom:1px solid var(--border); }
.compliance-table td{ padding:8px 10px; border-bottom:1px solid var(--border-light); font-size:13px; }
.compliance-table input{ width:90px; padding:6px 8px; border:1px solid var(--border); font-size:13px; }
.compliance-banner{ padding:16px 20px; display:flex; align-items:center; gap:14px; font-weight:700; font-size:14px; margin-top:16px; }
.compliance-pass{ background:var(--teal-tint); color:var(--teal-tint-ink); }
.compliance-fail{ background:var(--red-tint); color:var(--red); }

/* ---- Kanban ---- */
.kanban{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; align-items:start; }
.kanban-col-header{ display:flex; justify-content:space-between; align-items:center; padding:0 4px 14px; }
.kanban-col-title{ font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--muted); }
.kanban-count{ font-size:11px; font-weight:700; background:var(--slate-tint); color:var(--muted); padding:2px 8px; }
.kanban-col-body{ display:flex; flex-direction:column; gap:10px; min-height:60px; }
.kanban-card{ border:1px solid var(--border); background:#fff; padding:14px 16px; }
.kanban-card.is-overdue{ border-color:#FCA5A5; }
.kanban-card.is-hidden{ display:none; }
.kanban-card-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.kanban-card .co{ font-size:11.5px; color:var(--muted); margin-bottom:4px; }
.kanban-card .app-id{ font-size:13px; font-weight:700; font-family:'IBM Plex Mono', monospace; display:flex; align-items:center; gap:6px; }
.kanban-card .type{ font-size:12px; color:var(--muted); margin-top:2px; }
.kanban-card .move-btn{ margin-top:12px; width:100%; }
.kanban-card .logged-tag{ font-size:11px; color:var(--teal-tint-ink); background:var(--teal-tint); padding:2px 7px; font-weight:700; display:inline-block; margin-top:8px; }
.kanban-card .aging-row{ display:flex; align-items:center; gap:6px; margin-top:10px; }
.detail-btn{
  margin-top:8px; width:100%; padding:8px 10px; font-size:12px; font-weight:600; color:var(--muted);
  background:var(--slate-tint); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; gap:6px;
}
.detail-btn:hover{ color:var(--ink); border-color:var(--muted-2); }

/* Aging / SLA badges */
.age-badge{ font-size:10.5px; font-weight:700; letter-spacing:0.2px; padding:3px 8px; display:inline-flex; align-items:center; gap:4px; }
.age-ontrack{ background:var(--slate-tint); color:var(--muted); }
.age-duesoon{ background:var(--orange-tint); color:var(--orange-tint-ink); }
.age-overdue{ background:var(--red-tint); color:var(--red); }

/* Priority flag */
.priority-flag{ color:var(--red); display:inline-flex; flex-shrink:0; }

/* Assignee avatar (small) */
.assignee{ display:flex; align-items:center; gap:6px; }
.assignee-avatar{
  width:22px; height:22px; border-radius:50%; background:var(--ink); color:#fff; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:9.5px; font-weight:700;
}
.assignee-avatar.unassigned{ background:#fff; border:1.5px dashed var(--muted-2); color:var(--muted-2); }

/* Ops search / filter bar (reuses .filter-bar look) */
.ops-toolbar{ display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin-bottom:20px; }

/* Needs-attention / activity rows (ops dashboard) */
.attn-row{ display:flex; align-items:center; gap:14px; padding:14px 22px; border-bottom:1px solid var(--border-light); cursor:pointer; }
.attn-row:last-child{ border-bottom:none; }
.attn-row:hover{ background:var(--slate-tint); }

/* Report bars */
.report-row{ margin-bottom:18px; }
.report-row:last-child{ margin-bottom:0; }
.report-row-head{ display:flex; justify-content:space-between; font-size:12.5px; margin-bottom:6px; }
.report-row-head .lbl{ font-weight:600; }
.report-row-head .val{ font-weight:700; font-family:'Manrope',sans-serif; }
.report-bar-track{ height:10px; background:var(--slate-tint); overflow:hidden; }
.report-bar-fill{ height:100%; background:var(--teal); }
.report-bar-fill.orange{ background:var(--orange); }

/* Company status badges */
.status-active{ background:var(--teal-tint); color:var(--teal-tint-ink); }
.status-onboarding{ background:var(--orange-tint); color:var(--orange-tint-ink); }
.status-inactive{ background:var(--slate-tint); color:var(--muted); }

/* ---- Ops kanban: detail drawer ---- */
.drawer-overlay{
  position:fixed; inset:0; background:rgba(15,23,42,0.5); z-index:150;
  opacity:0; visibility:hidden; transition:opacity .22s ease;
}
.drawer-overlay.open{ opacity:1; visibility:visible; }
.drawer-panel{
  position:fixed; top:0; right:0; height:100vh; width:480px; max-width:92vw; background:#fff;
  box-shadow:-10px 0 28px rgba(15,23,42,0.18); display:flex; flex-direction:column;
  transform:translateX(100%); transition:transform .22s ease;
}
.drawer-overlay.open .drawer-panel{ transform:translateX(0); }
.drawer-head{ padding:24px 28px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:flex-start; flex-shrink:0; }
.drawer-app-id{ font-family:'IBM Plex Mono', monospace; font-weight:700; font-size:13px; color:var(--muted); }
.drawer-company{ font-family:'Manrope', sans-serif; font-weight:800; font-size:20px; margin-top:4px; }
.drawer-type-badge{ display:inline-block; font-size:11px; font-weight:700; color:var(--teal-tint-ink); background:var(--teal-tint); padding:3px 9px; margin-top:10px; }
.drawer-close{ border:none; background:none; color:var(--muted); padding:4px; flex-shrink:0; }
.drawer-close:hover{ color:var(--ink); }
.drawer-body{ flex:1; overflow-y:auto; padding:24px 28px; }
.drawer-section{ margin-bottom:28px; }
.drawer-section:last-child{ margin-bottom:0; }
.drawer-section-title{ font-size:11px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; color:var(--muted); margin-bottom:14px; }
.drawer-foot{ padding:18px 28px; border-top:1px solid var(--border); display:flex; gap:10px; justify-content:flex-end; flex-shrink:0; background:#fff; }

/* ---- Login ---- */
.login-shell{ min-height:100vh; display:grid; grid-template-columns:1fr 1fr; }
.login-side{ background:var(--ink); color:#fff; padding:56px; display:flex; flex-direction:column; justify-content:space-between; }
.login-form-wrap{ display:flex; align-items:center; justify-content:center; padding:40px; }
.login-card{ width:100%; max-width:380px; }
.tabs{ display:flex; gap:0; border-bottom:1px solid var(--border); margin-bottom:26px; }
.tab{ padding:10px 4px; margin-right:26px; font-size:13.5px; font-weight:700; color:var(--muted); border-bottom:2px solid transparent; cursor:pointer; }
.tab.active{ color:var(--teal); border-bottom-color:var(--teal); }
.field-stack{ display:flex; flex-direction:column; gap:16px; margin-bottom:22px; }

/* ---- Utility ---- */
.mt-8{ margin-top:8px;} .mt-16{ margin-top:16px;} .mt-24{ margin-top:24px;} .mt-32{ margin-top:32px;}
.flex{ display:flex; } .items-center{ align-items:center; } .justify-between{ justify-content:space-between; } .gap-8{gap:8px;} .gap-12{gap:12px;}
.muted{ color:var(--muted); } .mono{ font-family:'IBM Plex Mono', monospace; }
.two-col{ display:grid; grid-template-columns:1.1fr 1fr; gap:20px; }
.pill-note{ font-size:12px; color:var(--muted); background:var(--slate-tint); padding:10px 14px; border-left:3px solid var(--muted-2); }

/* ---- Document thumbnails & lightbox ---- */
.doc-thumb{
  width:56px; height:70px; flex-shrink:0; border:1px solid var(--border); background:#fff;
  overflow:hidden; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.doc-thumb:hover{ border-color:var(--teal); }
.doc-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.doc-thumb svg.doc-mock{ width:100%; height:100%; display:block; }
.doc-thumb.empty{ border-style:dashed; background:var(--slate-tint); cursor:pointer; }
.doc-thumb.empty:hover{ border-color:var(--muted-2); }
.doc-thumb.generic-file{ background:var(--slate-tint); flex-direction:column; gap:4px; }

.lightbox-overlay{
  position:fixed; inset:0; background:rgba(15,23,42,0.62); z-index:200;
  display:flex; align-items:center; justify-content:center; padding:40px;
  opacity:0; visibility:hidden; transition:opacity .18s ease;
}
.lightbox-overlay.open{ opacity:1; visibility:visible; }
.lightbox-box{
  background:#fff; width:100%; max-width:460px; max-height:88vh; display:flex; flex-direction:column;
  transform:scale(0.96) translateY(6px); transition:transform .18s ease;
}
.lightbox-overlay.open .lightbox-box{ transform:scale(1) translateY(0); }
.lightbox-header{ display:flex; justify-content:space-between; align-items:flex-start; padding:16px 20px; border-bottom:1px solid var(--border); }
.lightbox-close{ border:none; background:none; padding:4px; color:var(--muted); }
.lightbox-close:hover{ color:var(--ink); }
.lightbox-body{ padding:28px; background:var(--slate-tint); display:flex; align-items:center; justify-content:center; overflow:auto; flex:1; }
.lightbox-body img{ max-width:100%; max-height:56vh; display:block; box-shadow:0 4px 18px rgba(15,23,42,0.18); }
.lightbox-body svg.doc-mock{ width:260px; height:auto; box-shadow:0 4px 18px rgba(15,23,42,0.18); }
.lightbox-footer{ padding:12px 20px; border-top:1px solid var(--border); font-size:11.5px; color:var(--muted-2); }

/* ---- Toast notifications ---- */
.toast-stack{
  position:fixed; bottom:24px; right:24px; z-index:300;
  display:flex; flex-direction:column-reverse; gap:10px; align-items:flex-end;
}
.toast{
  display:flex; align-items:center; gap:10px; background:var(--ink); color:#fff;
  padding:13px 18px; font-size:13px; font-weight:600; box-shadow:0 10px 28px rgba(15,23,42,0.28);
  max-width:360px; opacity:0; transform:translateY(10px); transition:opacity .2s ease, transform .2s ease;
}
.toast.show{ opacity:1; transform:translateY(0); }
.toast.toast-success{ background:var(--teal-dark); }
.toast .toast-icon{ flex-shrink:0; display:flex; }

/* ---- Responsive ---- */
@media (max-width:960px){
  .page{ padding:26px 24px 56px; }
  .topbar{ padding:16px 24px; flex-wrap:wrap; row-gap:10px; }
  .navlinks{ gap:18px; font-size:13px; }
  .two-col{ grid-template-columns:1fr; }
  .stat-row{ grid-template-columns:1fr 1fr; }
  .type-grid{ grid-template-columns:1fr 1fr; }
  .cols-3, .cols-4{ grid-template-columns:1fr 1fr; }
  .kanban{ grid-template-columns:1fr 1fr; }
  .lp-hero{ grid-template-columns:1fr; }
  .login-shell{ grid-template-columns:1fr; }
  .login-side{ padding:36px 28px; }
  .card{ overflow-x:auto; }
  .card table{ min-width:640px; }
  .filter-bar{ align-items:stretch; }
  .drawer-panel{ width:420px; }
}

@media (max-width:640px){
  .page{ padding:20px 16px 48px; }
  .topbar{ padding:14px 16px; }
  .navlinks{ display:none; }
  .page-title{ font-size:24px; }
  .page-header{ flex-direction:column; align-items:flex-start; }
  .stat-row{ grid-template-columns:1fr; }
  .type-grid{ grid-template-columns:1fr; }
  .cols-2, .cols-3, .cols-4{ grid-template-columns:1fr; }
  .kanban{ grid-template-columns:1fr; }
  .field-grid{ gap:14px; }
  .drawer-panel{ width:100%; max-width:100%; }
  .notif-panel, .account-menu{ width:calc(100vw - 32px); right:-16px; }
  .lightbox-box{ max-width:100%; }
  .toast-stack{ left:16px; right:16px; bottom:16px; align-items:stretch; }
  .toast{ max-width:none; }
}
