/* AEK platform – RTL, mobile-first, brand: navy + gold. No inline styles (strict CSP). */
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url("../fonts/vazirmatn-arabic-400-normal.995cd8bfda8c.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url("../fonts/vazirmatn-latin-400-normal.97b491c18ad5.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap;
  src: url("../fonts/vazirmatn-arabic-600-normal.69fcc15b2e4d.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap;
  src: url("../fonts/vazirmatn-latin-600-normal.3ce2c1bb0060.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap;
  src: url("../fonts/vazirmatn-arabic-800-normal.e39b152f735a.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap;
  src: url("../fonts/vazirmatn-latin-800-normal.612f7d165b6b.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --brand: #16223f; --brand-2: #22335c; --brand-ink:#0c1326;
  --gold: #fca311; --gold-soft: #ffb938;
  --bg: #eef1f6; --bg-2:#e7ebf2; --card: #ffffff; --card-2:#f7f9fc;
  --ink: #111a2e; --ink-soft:#30405c; --muted: #68768d; --line: #e0e6ef; --line-soft:#edf1f7;
  --ok: #0f9d58; --ok-bg: #e6f6ec; --warn: #b7791f; --warn-bg: #fbf1dd;
  --bad: #d1333c; --bad-bg: #fbe6e7; --info: #2563eb; --info-bg: #e7effe;
  --violet:#6d28d9; --violet-bg:#efe9fd;
  --r: 16px; --r-sm: 11px;
  --sh-sm: 0 1px 2px rgba(16,26,46,.05);
  --sh: 0 2px 4px rgba(16,26,46,.04), 0 10px 26px -14px rgba(16,26,46,.22);
  --sh-lg: 0 8px 40px -18px rgba(16,26,46,.35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand:#0e1626; --brand-2:#1b2740; --brand-ink:#070c17;
    --bg:#0a0f1a; --bg-2:#0e1524; --card:#141d30; --card-2:#101827;
    --ink:#e8edf6; --ink-soft:#b9c4d6; --muted:#8694ab; --line:#263349; --line-soft:#1e2a3d;
    --ok-bg:#0f2a1c; --warn-bg:#30250f; --bad-bg:#331519; --info-bg:#15264c; --violet-bg:#241a44;
    --ok:#4ade80; --warn:#fbbf24; --bad:#fb7185; --info:#8fb4ff; --violet:#c4b5fd;
    --sh:0 2px 4px rgba(0,0,0,.3), 0 14px 34px -16px rgba(0,0,0,.6);
    --sh-lg:0 10px 46px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
*,*::before,*::after { box-sizing: border-box; }
html,body { margin: 0; }
body {
  font-family: "Vazirmatn", Tahoma, sans-serif; background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.7; -webkit-text-size-adjust: 100%;
  background-image:
    radial-gradient(900px 360px at 100% -5%, color-mix(in srgb, var(--gold) 9%, transparent), transparent 70%),
    radial-gradient(800px 360px at -10% 0, color-mix(in srgb, var(--info) 8%, transparent), transparent 70%);
  background-attachment: fixed;
}
a { color: inherit; }
h1 { font-size: 21px; margin: 0 0 3px; font-weight: 800; letter-spacing: -.2px; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 800; letter-spacing: -.1px; }
h3 { font-size: 14.5px; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { background: linear-gradient(180deg, var(--brand) 0, var(--brand-ink) 140%); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(255,255,255,.04), var(--sh); }
.topbar::after { content:""; display:block; height:3px; background: linear-gradient(90deg, var(--gold), var(--gold-soft) 60%, transparent); }
.topbar-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 11px 18px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.brand small { display: block; font-weight: 500; font-size: 11px; color: #fcd9a0; line-height: 1.25; letter-spacing: .2px; }
.mainnav { display: flex; gap: 3px; flex: 1; }
.mainnav a { text-decoration: none; padding: 7px 14px; border-radius: 10px; color: #cdd7e8; font-weight: 600; font-size: 14px; transition: background .14s, color .14s; }
.mainnav a:hover { background: #ffffff14; color: #fff; }
.mainnav a.on { background: #ffffff1f; color: #fff; box-shadow: inset 0 0 0 1px #ffffff1a; }
.topbar-end { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.bell { position: relative; display: inline-flex; padding: 8px; border-radius: 11px; color: #fff; transition: background .14s; }
.bell:hover { background: #ffffff16; }
.bell svg { width: 21px; height: 21px; }
.badge-dot { position: absolute; top: 1px; inset-inline-end: -1px; background: var(--gold); color: var(--brand-ink); font-size: 10.5px; font-weight: 800; border-radius: 999px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--brand); }
.who { font-size: 12.5px; color: #cdd7e8; text-align: left; line-height: 1.3; }
.who b { display: block; color: #fff; font-weight: 700; }
.linkbtn { background: none; border: 0; color: #cdd7e8; font: inherit; font-size: 13px; cursor: pointer; padding: 7px 10px; border-radius: 10px; transition: background .14s; }
.linkbtn:hover { background: #ffffff16; color: #fff; }

/* ---------- bottom nav (phones) ---------- */
.bottomnav { display: none; }
@media (max-width: 820px) {
  .mainnav, .who { display: none; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0); box-shadow: 0 -8px 24px -18px rgba(16,26,46,.5); }
  .bottomnav a { text-decoration: none; text-align: center; padding: 9px 2px 7px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; transition: color .14s; }
  .bottomnav a svg { display: block; width: 23px; height: 23px; margin: 0 auto 3px; stroke-width: 2; }
  .bottomnav a.on { color: var(--brand); }
  .bottomnav a.on::before { content:""; position:absolute; top:0; left:50%; transform:translateX(-50%); width:26px; height:3px; border-radius:0 0 4px 4px; background: var(--gold); }
  body { padding-bottom: 78px; }
}
@media (max-width: 820px) and (prefers-color-scheme: dark) { .bottomnav a.on { color: var(--gold); } }

/* ---------- layout ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 20px 18px 44px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead .sub { color: var(--muted); font-size: 13px; }
.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)); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.card + .card { margin-top: 16px; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2::before { content:""; width: 4px; height: 15px; border-radius: 3px; background: linear-gradient(var(--gold), var(--gold-soft)); flex: 0 0 auto; }
.stack > * + * { margin-top: 10px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px 14px; text-decoration: none; display: block; overflow: hidden; box-shadow: var(--sh-sm); transition: transform .12s, box-shadow .14s, border-color .14s; }
.stat::before { content:""; position:absolute; inset-inline-start:0; top:0; bottom:0; width:4px; background: var(--info); opacity:.85; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 30px; font-weight: 800; line-height: 1.25; letter-spacing: -.5px; margin-top: 2px; }
.stat.alert::before { background: var(--bad); }
.stat.alert .v { color: var(--bad); }
.stat.good::before { background: var(--ok); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 11px; padding: 10px 18px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; transition: filter .14s, transform .06s, box-shadow .14s; box-shadow: var(--sh-sm); }
.btn:hover { filter: brightness(1.12); box-shadow: var(--sh); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #3a2400; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--card-2); filter: none; }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--card); color: var(--bad); border-color: color-mix(in srgb,var(--bad) 45%,var(--line)); box-shadow:none; }
.btn.big { padding: 15px 20px; font-size: 16.5px; width: 100%; border-radius: 13px; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.form .field { margin-bottom: 14px; }
.form label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 5px; color: var(--ink-soft); }
.form input[type=text], .form input[type=password], .form input[type=date], .form input[type=tel], .form input[type=search],
.form select, .form textarea, .form input[type=file], .form input[type=number] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px; font: inherit; background: var(--card-2); color: var(--ink); transition: border-color .14s, box-shadow .14s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 16%, transparent); background: var(--card); }
.form textarea { resize: vertical; min-height: 80px; }
.form .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form .err { color: var(--bad); font-size: 13px; margin-top: 4px; font-weight: 600; }
.form .actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 8px; }
.inline-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.inline-form select, .inline-form input[type=search] { border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 12px; font: inherit; background: var(--card); color: var(--ink); }
.inline-form input[type=search] { flex: 1; min-width: 180px; }

/* ---------- messages ---------- */
.msgs { list-style: none; padding: 0; margin: 0 0 16px; }
.msgs li { padding: 12px 16px; border-radius: 12px; margin-bottom: 7px; font-weight: 600; display: flex; align-items: center; gap: 9px; box-shadow: var(--sh-sm); }
.msgs li::before { content:""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: currentColor; }
.msgs .success { background: var(--ok-bg); color: var(--ok); }
.msgs .error { background: var(--bad-bg); color: var(--bad); }
.msgs .info, .msgs .warning { background: var(--warn-bg); color: var(--warn); }

/* ---------- status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.pill::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-new { background: var(--warn-bg); color: var(--warn); }
.st-assigned { background: var(--info-bg); color: var(--info); }
.st-in_progress { background: var(--violet-bg); color: var(--violet); }
.st-done { background: var(--warn-bg); color: var(--warn); }
.st-verified { background: var(--ok-bg); color: var(--ok); }
.st-cancelled { background: var(--bg-2); color: var(--muted); }
.pill.urgent { background: var(--bad-bg); color: var(--bad); }
.pill.late { background: var(--bad); color: #fff; } .pill.late::before{ background:#fff; }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-warn { background: var(--warn-bg); color: var(--warn); }
.st-danger { background: var(--bad-bg); color: var(--bad); }

/* ---------- warehouse rows ---------- */
tr.row-warn   td { background: var(--warn-bg); }
tr.row-danger td { background: var(--bad-bg); }
.chk { display:inline-flex; align-items:center; gap:6px; font-size:14px; color:var(--muted); white-space:nowrap; }
.chk input { width:16px; height:16px; }

/* ---------- brand logo & footer ---------- */
.brand-logo { height: 26px; width: auto; object-fit: contain; display: block; }
.loginlogo { text-align: center; margin-bottom: 18px; }
.loginlogo img { max-width: 220px; width: 70%; height: auto; }
.appfoot {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1100px; margin: 24px auto 90px; padding: 14px 18px;
  color: var(--muted); font-size: 12px; border-top: 1px solid var(--line);
}
@media (max-width: 720px) { .appfoot { margin-bottom: 120px; } }

/* ---------- delivery receipt sheet ---------- */
.receipt-sheet { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px; max-width:760px; margin:0 auto; }
.rc-brand { display:flex; align-items:center; gap:10px; font-weight:800; margin-bottom:12px; }
.rc-fields { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:10px; }
.rc-fields label { flex:1; min-width:150px; display:flex; flex-direction:column; font-size:12px; color:var(--muted); gap:4px; }
.rc-fields input, .rc-fields select { padding:7px 9px; border:1px solid var(--line); border-radius:8px; background:var(--card); font-family:inherit; }
.rc-sec { font-size:14px; margin:18px 0 8px; padding-top:12px; border-top:1px solid var(--line); }
.rc-items input { width:100%; padding:6px 8px; border:1px solid var(--line); border-radius:7px; background:var(--card); }
.rc-items .rc-qty { text-align:center; }
.rc-confirms { display:flex; flex-direction:column; gap:8px; }
.rc-chk { display:flex; gap:8px; align-items:flex-start; font-size:13.5px; }
.rc-warranty { width:100%; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--card); font-family:inherit; line-height:1.9; }
.rc-sigs { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.rc-sig label { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
.rc-sig label input { width:100%; padding:5px 8px; border:1px solid var(--line); border-radius:7px; margin-top:4px; }
@media (max-width:560px){ .rc-sigs { grid-template-columns:1fr; } }
@media print {
  .no-print, .topbar, .bottomnav, .appfoot { display:none !important; }
  body { background:#fff; }
  .receipt-sheet { border:none; box-shadow:none; max-width:100%; }
  main { padding:0 !important; }
}

/* ---------- workflow progress bar ---------- */
.wf-bar { display:flex; gap:4px; margin:0 0 16px; flex-wrap:wrap; }
.wf-step { flex:1; min-width:120px; display:flex; align-items:center; gap:8px; padding:8px 12px;
  background:var(--card); border:1px solid var(--line); border-radius:10px; }
.wf-dot { width:24px; height:24px; border-radius:50%; display:inline-flex; align-items:center;
  justify-content:center; font-weight:800; font-size:13px; background:var(--bg-2); color:var(--muted); flex-shrink:0; }
.wf-lbl { font-size:13px; font-weight:700; color:var(--muted); }
.wf-step.done { border-color:var(--ok); background:var(--ok-bg); }
.wf-step.done .wf-dot { background:var(--ok); color:#fff; }
.wf-step.done .wf-lbl { color:var(--ink,#16223f); }
.wf-step.bad { border-color:var(--bad); background:var(--bad-bg); }
.wf-step.bad .wf-dot { background:var(--bad); color:#fff; }

/* ---------- draggable nav ---------- */
.mainnav a { cursor: pointer; }
.mainnav a.dragging { opacity: .4; }
.reject-box summary { list-style: none; }
.reject-box summary::-webkit-details-marker { display: none; }

/* ---------- pricing card ---------- */
.price-card { margin-top:8px; padding:10px 12px; border-radius:10px;
  background:#eef4ff; border:1px solid #cfe0ff; }
.price-buy { font-size:13px; color:#1e3a8a; }
:root:not([data-theme="light"]) .price-card, :root[data-theme="dark"] .price-card { background:#17243b; border-color:#2a3d5f; }
:root:not([data-theme="light"]) .price-buy, :root[data-theme="dark"] .price-buy { color:#9ec1ff; }
.t.mini th, .t.mini td { padding:3px 6px; font-size:12px; }

/* ---------- quantity inputs ---------- */
.qin { width:72px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; text-align:center;
  font-variant-numeric:tabular-nums; background:var(--card); }
.qin:focus { border-color:var(--gold,#fca311); outline:none; }

/* ---------- signature / receipt ---------- */
.sigpad { width:100%; height:200px; border:2px dashed var(--line); border-radius:12px; background:#fff; touch-action:none; cursor:crosshair; }
.sig-thumb { max-width:180px; border:1px solid var(--line); border-radius:8px; background:#fff; margin-top:4px; }
.receipt-item { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); }
.receipt-item:last-child { border-bottom:none; }
.unit-sel { max-width:90px; }

/* ---------- material steppers ---------- */
.mat-table td { vertical-align: middle; }
.stepper { display:inline-flex; align-items:center; gap:4px; }
.stepper form { display:inline-flex; gap:3px; margin:0; }
.stp { border:1px solid var(--line); background:var(--bg-2); border-radius:7px; min-width:26px; height:28px;
  padding:0 6px; cursor:pointer; font-size:12px; font-weight:700; color:var(--ink,#16223f); }
.stp:hover { background:var(--gold,#fca311); color:#fff; border-color:transparent; }
.stp-val { min-width:34px; text-align:center; font-weight:800; font-variant-numeric:tabular-nums; }

/* ---------- inline row edit ---------- */
.rowedit summary { list-style:none; cursor:pointer; display:inline-block; }
.rowedit summary::-webkit-details-marker { display:none; }
.inline-edit { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; align-items:center; }
.inline-edit input, .inline-edit select { max-width:120px; }

/* ---------- quick login picker ---------- */
.pick-role { margin: 10px 0; }
.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pick-grid form { margin: 0; }
.pick-btn { min-width: 120px; }

/* ---------- invoice approvals ---------- */
.approve-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 0; }
.ok-banner { margin-top:10px; padding:8px 12px; border-radius:10px; background:var(--ok-bg); color:var(--ok); font-weight:700; font-size:13px; }

/* ---------- tabs ---------- */
.tabs { display:flex; gap:6px; flex-wrap:wrap; margin: 0 0 14px; }
.tabs .tab { text-decoration:none; font-size:14px; font-weight:700; color:var(--muted);
  padding:8px 16px; border-radius:999px; background:var(--card); border:1px solid var(--line); }
.tabs .tab.on { background:var(--navy,#16223f); color:#fff; border-color:transparent; }
.tabs .tab:hover { border-color:var(--gold,#fca311); }

/* ---------- work cards ---------- */
.wcard { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; position: relative; box-shadow: var(--sh-sm); transition: transform .12s, box-shadow .14s, border-color .14s; }
.wcard::before { content:""; position:absolute; inset-inline-start:0; top:10px; bottom:10px; width:4px; border-radius: 0 4px 4px 0; background: var(--info); }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.wcard.k-urgent::before { background: var(--bad); }
.wcard .t { font-weight: 700; font-size: 15px; margin-bottom: 6px; padding-inline-start: 6px; }
.wcard .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-inline-start: 6px; }
.wcard .meta > span { display: inline-flex; align-items: center; gap: 4px; }
.wlist > * + * { margin-top: 10px; }
.columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; align-items: start; }
@media (max-width: 1040px) { .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .columns { grid-template-columns: 1fr; } }
.col { background: color-mix(in srgb, var(--card) 40%, var(--bg)); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 12px; min-height: 90px; }
.col h2 { font-size: 13.5px; display: flex; justify-content: space-between; margin-bottom: 11px; }
.col h2::before { display: none; }
.col h2 .cnt { color: var(--muted); font-weight: 800; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; font-size: 12px; }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 8px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; background: var(--card-2); }
table.t td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr:hover td { background: color-mix(in srgb, var(--brand) 4%, transparent); }
table.t tr:last-child td { border-bottom: 0; }
meter { width: 130px; height: 9px; border-radius: 999px; }

/* ---------- detail ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 11px; border: 1px solid var(--line); display: block; box-shadow: var(--sh-sm); }
.photos figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.timeline li { padding: 9px 0 9px 0; border-bottom: 1px dashed var(--line); position: relative; padding-inline-start: 16px; }
.timeline li::before { content:""; position:absolute; inset-inline-start:0; top:14px; width:7px; height:7px; border-radius:50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent); }
.timeline li:last-child { border-bottom: 0; }
.notelist .n { padding: 12px 2px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.notelist .n:last-child { border-bottom: 0; }
.notelist .n.unread { position: relative; padding-inline-start: 14px; }
.notelist .n.unread::before { content:""; position:absolute; inset-inline-start:0; top:50%; transform:translateY(-50%); width:7px; height:7px; border-radius:50%; background: var(--gold); }
.notelist .n.unread .txt { font-weight: 700; }
.notelist .n form { margin: 0; }
.notelist button.txt { background: none; border: 0; font: inherit; color: inherit; text-align: right; cursor: pointer; padding: 0; }
.notelist button.txt:hover { color: var(--brand); }
details.more summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 4px 0; }
details.more summary:hover { color: var(--ink); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 18px;
  background: radial-gradient(1100px 500px at 50% -10%, var(--brand-2), var(--brand-ink)); }
.login { width: 100%; max-width: 390px; border-radius: 20px; box-shadow: var(--sh-lg); }
.login .brandrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login .brandrow svg { width: 44px; height: 44px; }
.login .btn.big { margin-top: 4px; }
