/* MIMTA EDMS — interface styles. Brand: MIMTA blue #007CC2, navy #0A3460, gold accent #C9A227. */
:root {
  --blue: #007CC2;
  --blue-600: #006BA8;
  --blue-700: #00598C;
  --blue-50: #E6F3FA;
  --blue-100: #CCE6F5;
  --navy: #0A3460;
  --navy-800: #0C2D52;
  --navy-900: #071F3B;
  --gold: #C9A227;
  --gold-50: #FBF6E6;
  --bg: #F3F6F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #DCE5EC;
  --line-2: #EAF0F5;
  --text: #13212F;
  --text-2: #33475B;
  --muted: #5F7184;
  --ok: #17824A;
  --ok-bg: #E4F4EA;
  --warn: #A35F00;
  --warn-bg: #FDF0DA;
  --bad: #BE2F23;
  --bad-bg: #FBE6E4;
  --info: #0067A3;
  --info-bg: #E6F3FA;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(10, 52, 96, .06), 0 1px 3px rgba(10, 52, 96, .05);
  --shadow-lg: 0 10px 30px rgba(7, 31, 59, .18);
  --font: Aptos, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--navy); font-weight: 650; }
h1 { font-size: 22px; letter-spacing: -.01em; }
h2 { font-size: 16.5px; }
h3 { font-size: 14.5px; }
p { margin: 0 0 10px; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--navy-900); color: #C9D6E4;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.07); text-decoration: none !important; }
.brand-crest { width: 42px; height: 46px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; }
.brand-crest img { max-width: 34px; max-height: 38px; width: auto; height: auto; display: block; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .02em; line-height: 1.15; }
.brand-sub { color: #9FB3C8; font-size: 11.5px; line-height: 1.3; }
.nav { padding: 10px 10px 24px; flex: 1; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #7F96AF; padding: 16px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: #D2DEEA;
  font-size: 14px; text-decoration: none; margin-bottom: 1px; position: relative;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--blue); color: #fff; }
.nav a.active .ic { color: #fff; }
.nav a .ic { color: #8EA6C0; }
.nav .count { margin-left: auto; background: var(--gold); color: var(--navy-900); font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.nav a.active .count { background: #fff; color: var(--blue-700); }
.sidebar-foot { padding: 12px 18px 16px; font-size: 11.5px; color: #7F96AF; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar .menu-btn { display: none; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 12px 0 36px; font: inherit; color: var(--text); }
.search input:focus { background: #fff; border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-50); }
.search .ic { position: absolute; left: 11px; top: 10px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--text-2); position: relative; border: 0; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.dot { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 10px; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.user-chip:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.user-chip .who { line-height: 1.2; }
.user-chip .who b { font-size: 13.5px; display: block; font-weight: 600; }
.user-chip .who span { font-size: 11.5px; color: var(--muted); }
.dropdown { position: absolute; right: 0; top: 46px; width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 7px; color: var(--text); font: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .sep { height: 1px; background: var(--line-2); margin: 5px 2px; }

.content { padding: 24px 28px 48px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head .eyebrow { font-size: 12px; font-weight: 600; color: var(--blue-600); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.card-h h2 { flex: 1; }
.card-h .hint { color: var(--muted); font-size: 12.5px; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }

.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; text-decoration: none !important; color: inherit; }
.stat:hover { border-color: var(--blue-100); }
.stat .stat-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-600); flex: none; }
.stat .num { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; }
.stat.warn .stat-ic { background: var(--warn-bg); color: var(--warn); }
.stat.bad .stat-ic { background: var(--bad-bg); color: var(--bad); }
.stat.ok .stat-ic { background: var(--ok-bg); color: var(--ok); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--surface-2); border-color: #C9D6E0; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-800); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #126B3C; }
.btn-danger { color: var(--bad); border-color: #F0C9C5; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-ghost { border-color: transparent; background: none; color: var(--blue-600); }
.btn-ghost:hover { background: var(--blue-50); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- Badges, pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; line-height: 18px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #EEF2F5; color: #586A7C; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--blue-50); color: var(--blue-700); }
.tag.gold { background: var(--gold-50); color: #7A5F0A; }
.ref { font-family: var(--font); font-weight: 650; color: var(--navy); white-space: nowrap; letter-spacing: .01em; }
a .ref, a.ref { color: var(--blue-700); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: var(--surface-2); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFCFE; }
.tbl td.actions { text-align: right; white-space: nowrap; }
.tbl .title-cell { min-width: 260px; }
.tbl.compact td { padding: 7px 12px; }
.row-link { color: inherit; display: block; }
.row-link:hover { text-decoration: none; }
.row-link:hover .t { color: var(--blue-600); text-decoration: underline; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: #A5B6C6; margin-bottom: 8px; }
.empty b { display: block; color: var(--text-2); margin-bottom: 2px; font-size: 14.5px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input, input[type=text].input {
  width: 100%; height: 38px; border: 1px solid #CFDAE3; border-radius: 8px; padding: 0 11px; font: inherit; color: var(--text); background: #fff;
}
textarea.input { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.input[readonly] { background: var(--surface-2); }
.input-sm { height: 32px; font-size: 13px; }
select.input { padding-right: 30px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F7184' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.req { color: var(--bad); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.filters .input { width: auto; min-width: 150px; height: 34px; font-size: 13px; }
.filters .grow { flex: 1; min-width: 200px; }
.file-drop { display: block; cursor: pointer; border: 1.5px dashed #BFD0DD; border-radius: 10px; padding: 16px; text-align: center; background: var(--surface-2); color: var(--muted); position: relative; }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop.has-file { border-color: var(--blue); background: var(--blue-50); color: var(--blue-700); }

/* ---------- Alerts ---------- */
.flash-stack { margin-bottom: 16px; display: grid; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px; border: 1px solid; font-size: 13.5px; }
.alert .ic { margin-top: 1px; }
.alert-success { background: var(--ok-bg); border-color: #BFE3CD; color: #0F5E35; }
.alert-error { background: var(--bad-bg); border-color: #F2C5C0; color: #8F2017; }
.alert-info { background: var(--info-bg); border-color: #BFDDF0; color: #004E7C; }
.alert-warn { background: var(--warn-bg); border-color: #F2D7A6; color: #6E4100; }
.alert .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; }

/* ---------- Key/value ---------- */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; display: flex; align-items: center; gap: 7px; }
.tabs a:hover { color: var(--navy); }
.tabs a.active { color: var(--blue-700); border-bottom-color: var(--blue); }
.tabs .n { background: #EEF2F5; color: var(--muted); font-size: 11px; border-radius: 10px; padding: 0 7px; }
.tabs a.active .n { background: var(--blue-50); color: var(--blue-700); }
.seg { display: inline-flex; background: #EEF2F5; border-radius: 9px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 5px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: none; border: 0; background: none; cursor: pointer; font-family: inherit; }
.seg a.active, .seg button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow); }

/* ---------- Workflow timeline ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .s-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #EEF2F5; color: var(--muted); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); z-index: 1; }
.steps .done .s-dot { background: var(--ok); color: #fff; box-shadow: none; }
.steps .now .s-dot { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-50); }
.steps .back .s-dot { background: var(--bad); color: #fff; box-shadow: none; }
.steps .s-body { flex: 1; min-width: 0; padding-top: 3px; }
.steps .s-title { font-weight: 650; color: var(--navy); }
.steps .s-meta { font-size: 12.5px; color: var(--muted); }
.sig-thumb { height: 34px; max-width: 140px; object-fit: contain; display: block; margin-top: 4px; }

/* ---------- Document header ---------- */
.doc-head { display: flex; gap: 16px; align-items: flex-start; }
.doc-ic { width: 52px; height: 60px; border-radius: 8px; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; flex: none; position: relative; }
.doc-ic .ic { width: 26px; height: 26px; }
.doc-ic .code { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; background: var(--navy); color: #fff; padding: 1px 6px; border-radius: 4px; }
.pdf-frame { width: 100%; height: 72vh; min-height: 520px; border: 0; border-radius: 0 0 var(--radius) var(--radius); background: #525659; display: block; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--navy); color: #E5EEF7; margin-bottom: 16px; flex-wrap: wrap; }
.banner b { color: #fff; }
.banner .btn { margin-left: auto; }

/* ---------- Modal ---------- */
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal.wide { width: min(760px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(7, 31, 59, .45); }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal-h h2 { flex: 1; }
.modal-b { padding: 18px 20px; }
.modal-f { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.sign-preview { border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: repeating-linear-gradient(0deg, #fff, #fff 27px, #EEF3F7 28px); display: flex; align-items: center; justify-content: center; min-height: 80px; }
.sign-preview img { max-height: 70px; max-width: 100%; }
.otp-input { font-size: 24px; letter-spacing: 10px; text-align: center; font-family: var(--mono); height: 50px; }

/* ---------- Signature pad ---------- */
.pad-wrap { border: 1px solid #CFDAE3; border-radius: 12px; background: #fff; position: relative; overflow: hidden; }
.pad-wrap canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; }
.pad-area { position: relative; }
.pad-line { position: absolute; left: 24px; right: 24px; bottom: 48px; border-bottom: 1.5px solid #C8D5E0; pointer-events: none; }
.pad-x { position: absolute; left: 22px; bottom: 52px; color: #A9B9C7; font-size: 18px; pointer-events: none; }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #9BB0C2; pointer-events: none; font-size: 15px; }
.pad-tools { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line-2); background: var(--surface-2); flex-wrap: wrap; }
.ink { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.ink.active { box-shadow: 0 0 0 2px var(--blue); }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #EEF2F5 25%, transparent 25%), linear-gradient(-45deg, #EEF2F5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EEF2F5 75%), linear-gradient(-45deg, transparent 75%, #EEF2F5 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.upload-preview { border: 1px solid var(--line); border-radius: 10px; min-height: 160px; display: grid; place-items: center; padding: 12px; }
.upload-preview img { max-width: 100%; max-height: 200px; }
.range { width: 100%; accent-color: var(--blue); }
.current-sig { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; background: var(--surface-2); }
.current-sig img { height: 64px; max-width: 260px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line-2); padding: 4px 10px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 18px; border-bottom: 1px solid var(--line-2); display: flex; gap: 12px; align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .m { font-size: 12.5px; color: var(--muted); }
.list li.unread { background: #F7FBFE; }
.list li.unread .t::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-right: 7px; vertical-align: 2px; }
.due { font-size: 12px; font-weight: 600; white-space: nowrap; }
.due.late { color: var(--bad); }
.due.soon { color: var(--warn); }
.comment { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2); margin-bottom: 10px; }
.comment.returned { background: var(--gold-50); border-color: #EBDDAF; }
.comment .who { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.perm-grid td, .perm-grid th { text-align: center; }
.perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.pager { display: flex; gap: 4px; padding: 12px 14px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line-2); }
.pg { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--text-2); font-size: 13px; text-decoration: none !important; }
.pg.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pg.disabled { color: #A9B6C2; }
.pg.gap { border: 0; }
.section-chip { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 11.5px; font-weight: 700; margin-right: 6px; }
.progress { height: 6px; background: #EEF2F5; border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.hash { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--text-2); }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); background: #fff; }
.auth-art { background: var(--navy-900); color: #DCE7F2; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -160px; top: -160px; width: 460px; height: 460px; border-radius: 50%; border: 56px solid rgba(0, 124, 194, .16); pointer-events: none; }
.auth-art::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gold); }
.auth-art .crest { width: 92px; background: #fff; border-radius: 16px; padding: 10px 12px; }
.auth-art h1 { color: #fff; font-size: 30px; margin-top: auto; max-width: 480px; letter-spacing: -.015em; }
.auth-art p { color: #A9BDD2; max-width: 460px; font-size: 15px; margin-top: 12px; }
.auth-art .feats { display: flex; gap: 22px; margin-top: 28px; flex-wrap: wrap; position: relative; z-index: 1; }
.auth-art .feats div { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #CFDCE9; }
.auth-art .feats .ic { color: var(--gold); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form h2 { font-size: 22px; margin-bottom: 4px; }
.auth-form .lead { color: var(--muted); margin-bottom: 24px; }

/* ---------- Verify page ---------- */
.verify-wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
.verify-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.verify-head img { max-width: 48px; max-height: 54px; width: auto; height: auto; }
.verdict { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 12px; margin-bottom: 16px; }
.verdict .ic { width: 32px; height: 32px; }
.verdict.ok { background: var(--ok-bg); color: #0F5E35; }
.verdict.bad { background: var(--bad-bg); color: #8F2017; }
.verdict.warn { background: var(--warn-bg); color: #6E4100; }
.verdict b { font-size: 17px; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(7, 31, 59, .4); z-index: 35; }
  .topbar { padding: 0 12px; }
  .topbar .menu-btn { display: grid; }
  .user-chip .who { display: none; }
  .content { padding: 18px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; flex-direction: column; }
  .stat .stat-ic { width: 32px; height: 32px; }
  .stat .num { font-size: 22px; }
  .stat .lbl { font-size: 12px; }
  .current-sig img { max-width: 100%; }
  .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .page-head .actions { width: 100%; }
  .tbl .hide-sm { display: none; }
  .pdf-frame { height: 60vh; min-height: 380px; }
}
@media print {
  .sidebar, .topbar, .page-head .actions, .no-print { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; }
}

/* cards placed in grids or stacks manage their own spacing */
.grid > .card + .card, .split > .card + .card { margin-top: 0; }
.file-drop .ic { display: block; margin: 0 auto 4px; color: var(--blue-600); }
.file-drop .fname { word-break: break-word; }
