@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/Figtree-400i.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Figtree-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/IBMPlexMono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/IBMPlexMono-600.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/InstrumentSerif-400i.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/InstrumentSerif-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/SpaceGrotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/SpaceGrotesk-700.woff2') format('woff2'); }

/* ═══════════════════════════════════════════════════════════════════
   OpsAims design system — "Ledger Console"
   Ink surface + ExpertAims signal red · tabular numerals for money
   Light/dark via [data-theme] on <html>
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --red: #c8102e;
  --red-dim: #a30d26;
  --ink: #14161c;
  --ink-2: #1c1f27;
  --ink-3: #262a35;
  --paper: #f6f6f4;
  --card: #ffffff;
  --line: #e4e3df;
  --txt: #1a1c22;
  --txt-2: #5c6070;
  --txt-3: #9296a5;
  --green: #1a7f4e; --green-bg: #e3f2ea;
  --blue: #1d5fbf;  --blue-bg: #e5eefb;
  --amber: #9a6a00; --amber-bg: #faf0d7;
  --redb: #b3132f;  --redb-bg: #fbe5e9;
  --purple: #6b3fa0;--purple-bg: #efe7f8;
  --grey: #5c6070;  --grey-bg: #ececea;
  --shadow: 0 1px 2px rgba(20,22,28,.06), 0 4px 16px rgba(20,22,28,.05);
  --radius: 10px;
  --mono: 'IBM Plex Mono', ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}
[data-theme="dark"] {
  --paper: #101218;
  --card: #181b23;
  --line: #262a35;
  --txt: #e8e9ee;
  --txt-2: #a2a6b5;
  --txt-3: #6b7080;
  --green-bg: #12301f; --blue-bg: #14243d; --amber-bg: #33270a;
  --redb-bg: #37121a;  --purple-bg: #241534; --grey-bg: #23262e;
  --green: #4fc088; --blue: #6ba3ef; --amber: #d9a93f; --redb: #f0708a; --purple: #b58ae0; --grey: #a2a6b5;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.55 var(--sans);
  background: var(--paper);
  color: var(--txt);
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .92em; background: var(--grey-bg); padding: 1px 5px; border-radius: 4px; }

/* ── Shell ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 218px; flex: 0 0 218px;
  background: var(--ink);
  color: #c9ccd6;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  color: #fff;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--red);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 16px; font-family: var(--mono);
}
.brand b { font-size: 16px; letter-spacing: .01em; font-family: var(--display); font-weight: 700; }
.brand small { display: block; font-size: 11px; color: #8d92a3; letter-spacing: .04em; font-family: var(--serif); font-style: italic; text-transform: none; }
.nav { padding: 4px 10px 20px; }
.nav .sec { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #7a7f90; margin: 16px 8px 4px; }
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 7px;
  color: #c9ccd6; font-size: 13.5px;
}
.nav a:hover { background: var(--ink-3); color: #fff; text-decoration: none; }
.nav a.on { background: var(--red); color: #fff; font-weight: 600; }
.nav a .ic { width: 17px; text-align: center; opacity: .85; }
.nav .cnt { margin-left: auto; background: var(--ink-3); color: #aab; font-size: 10.5px; border-radius: 9px; padding: 0 7px; }
.nav a.on .cnt { background: rgba(255,255,255,.25); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar .crumbs { font-size: 13px; color: var(--txt-2); }
.crumbs a { color: var(--txt-2); }
.crumbs b { color: var(--txt); font-weight: 600; }
.top-space { flex: 1; }
.searchbox {
  display: flex; align-items: center; gap: 7px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 11px; font-size: 13px; color: var(--txt-3);
  cursor: pointer; min-width: 200px;
}
.searchbox kbd { font-family: var(--mono); font-size: 10.5px; background: var(--grey-bg); border-radius: 4px; padding: 1px 5px; margin-left: auto; }
.bell-dot { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; padding: 0 3px; line-height: 1; }
.entsw { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.entsw-ic { font-size: 13px; opacity: .8; }
.entsw select { border: 0; background: transparent; color: var(--txt); font-size: 12.5px; font-weight: 600; cursor: pointer; max-width: 210px; outline: none; }
.entsw select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.iconbtn { border: 1px solid var(--line); background: var(--card); color: var(--txt-2); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.iconbtn:hover { color: var(--txt); }
.userchip { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }

.content { padding: 22px; max-width: 1360px; width: 100%; margin: 0 auto; }
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 18px; }
.pagehead h1 { font-size: 22px; margin: 0; letter-spacing: -.015em; font-family: var(--display); font-weight: 700; }
.pagehead .sub { color: var(--txt-2); font-size: 13px; width: 100%; margin-top: -6px; }
.pagehead .spacer { flex: 1; }

/* ── Cards, stats ──────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card h2 { font-size: 15px; margin: 0 0 12px; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.grid { display: grid; gap: 14px; margin-bottom: 18px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .g4, .g3, .g2 { grid-template-columns: 1fr; } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); }
.stat .v { font-size: 22px; font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; margin-top: 3px; }
.stat .d { font-size: 12px; color: var(--txt-2); margin-top: 2px; }
.stat.warn .v { color: var(--amber); }
.stat.bad .v { color: var(--redb); }
.stat.good .v { color: var(--green); }

/* ── Tables ────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--txt-3); font-weight: 600;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.t td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr:hover td { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.t .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .dim { color: var(--txt-3); }
.t a.rowlink { color: var(--txt); font-weight: 600; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--redb-bg); color: var(--redb); }
.b-purple { background: var(--purple-bg); color: var(--purple); }
.b-grey { background: var(--grey-bg); color: var(--grey); }

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 8px 4px; font-size: 12.5px; color: var(--txt-2); }
.pg-btn { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 2px 10px; color: var(--txt); }
.pg-btn.disabled { opacity: .4; }
.pg-pp { border: 1px solid var(--line); background: var(--card); color: var(--txt-2); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-family: var(--sans); }

/* ── Forms & buttons ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red); color: #fff; border: 0; border-radius: 8px;
  font: 500 13.5px var(--display); letter-spacing: .01em; padding: 8px 15px; cursor: pointer;
}
.btn:hover { background: var(--red-dim); text-decoration: none; }
.btn.ghost { background: var(--card); color: var(--txt); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper); }
.btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn.danger { background: var(--redb); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.frm label { display: block; font-size: 12px; font-weight: 600; color: var(--txt-2); margin: 12px 0 4px; }
.frm label .req { color: var(--redb); }
.frm input[type=text], .frm input[type=email], .frm input[type=password], .frm input[type=number],
.frm input[type=date], .frm select, .frm textarea {
  width: 100%; padding: 8px 11px; font: 13.5px var(--sans);
  background: var(--paper); color: var(--txt);
  border: 1px solid var(--line); border-radius: 7px;
}
.frm input:focus, .frm select:focus, .frm textarea:focus { outline: 2px solid color-mix(in srgb, var(--red) 45%, transparent); outline-offset: 0; border-color: var(--red); }
.frm .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.frm .err { color: var(--redb); font-size: 12.5px; margin-top: 3px; }
.frm textarea { min-height: 90px; resize: vertical; }
.frm .hint { font-size: 12px; color: var(--txt-3); margin-top: 3px; }
.formfoot { display: flex; gap: 10px; align-items: center; margin-top: 18px; }

.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.flash.ok { background: var(--green-bg); color: var(--green); }
.flash.err { background: var(--redb-bg); color: var(--redb); }

.empty { text-align: center; color: var(--txt-3); padding: 42px 20px; }
.empty .big { font-size: 30px; margin-bottom: 8px; }
.empty a { font-weight: 600; }

/* ── Filter bar ────────────────────────────────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select {
  padding: 6px 10px; font: 13px var(--sans);
  background: var(--card); color: var(--txt);
  border: 1px solid var(--line); border-radius: 7px;
}

/* ── Login ─────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 500px at 20% -10%, color-mix(in srgb, var(--red) 14%, transparent), transparent), var(--ink); }
.login-card { width: 380px; max-width: 92vw; background: var(--card); border-radius: 14px; padding: 30px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--txt); }

/* ── Command palette ───────────────────────────────────── */
.cmdk { position: fixed; inset: 0; background: rgba(10,12,18,.55); z-index: 100; display: none; }
.cmdk.open { display: block; }
.cmdk-box { width: 560px; max-width: 92vw; margin: 12vh auto 0; background: var(--card); border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.cmdk-box input { width: 100%; border: 0; padding: 15px 18px; font: 15px var(--sans); background: transparent; color: var(--txt); outline: none; border-bottom: 1px solid var(--line); }
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmdk-list a { display: flex; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--txt); font-size: 13.5px; }
.cmdk-list a:hover, .cmdk-list a.sel { background: var(--red); color: #fff; text-decoration: none; }
.cmdk-list .k { color: var(--txt-3); font-size: 11px; margin-left: auto; }
.cmdk-list a:hover .k, .cmdk-list a.sel .k { color: rgba(255,255,255,.7); }

/* ── Kanban ────────────────────────────────────────────── */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.kcol h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-2); margin: 2px 4px 10px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); font-size: 13px; }
.kcard b { display: block; margin-bottom: 2px; }
.kcard .meta { color: var(--txt-3); font-size: 12px; }

/* ── Detail two-col ────────────────────────────────────── */
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 13.5px; }
.dl dt { color: var(--txt-3); }
.dl dd { margin: 0; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; font-size: 13.5px; color: var(--txt-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--txt); }

/* ── Live totals summary (invoice + quotation editors) ─── */
.itsum { max-width: 340px; margin: 14px 0 4px auto; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); }
.itsum > div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.itsum > div[hidden] { display: none; }
.itsum > div span { color: var(--txt-2); }
.itsum > div b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.itsum .grand { background: var(--red); border-bottom: 0; }
.itsum .grand span, .itsum .grand b { color: #fff; font-size: 15px; font-weight: 700; }

/* ── Live document preview (quotation paper) ───────────── */
.qsplit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(320px, 4fr); gap: 18px; align-items: start; }
@media (max-width: 1120px) { .qsplit { grid-template-columns: 1fr; } }
.docprev-wrap { position: sticky; top: 64px; }
.docprev {
  background: #fff; color: #1a1c22;
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 2px 14px rgba(0,0,0,.12);
  padding: 26px 28px; font-size: 12.5px; line-height: 1.45;
  min-height: 420px;
}
[data-theme="dark"] .docprev { border-color: #333; }
.docprev .dp-brand { color: #c8102e; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.docprev .dp-tag { color: #999; font-size: 8px; letter-spacing: .18em; text-transform: uppercase; margin-top: -2px; }
/* ── refreshed print styling: hairline rules + muted small-caps labels, no grid ── */
.docprev .dp-title { color: #c8102e; font-size: 19px; font-weight: 800; text-align: right;
  clear: both; margin-top: 6px; letter-spacing: .01em; }
.docprev .dp-meta { display: grid; grid-template-columns: 1fr auto; border: 0; border-bottom: 1px solid #e4e6ea;
  margin-top: 14px; padding-bottom: 9px; font-size: 11.5px; }
.docprev .dp-meta > div { padding: 0; }
.docprev .dp-billed b { font-size: 14px; display: block; margin: 2px 0 3px; }
.docprev .dp-billed > div { color: #4e525c; }
.docprev .dp-kv { display: grid; grid-template-columns: auto auto; gap: 2px 14px; align-content: start; }
.docprev .dp-kv span:nth-child(odd) { font-weight: 700; font-size: 9px; letter-spacing: .09em;
  text-transform: uppercase; color: #7a808a; align-self: center; }
.docprev .dp-kv span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.docprev table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 11.5px; }
.docprev th { background: #f8f8f6; border: 0; border-bottom: 1px solid #24262c; padding: 6px 8px;
  text-align: center; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; color: #7a808a; font-weight: 700; }
.docprev td { border: 0; border-bottom: 1px solid #e9eaee; padding: 7px 8px; vertical-align: top; }
.docprev td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.docprev .dp-kmeta th, .docprev .dp-kmeta td { text-align: center; white-space: normal; font-weight: inherit; }
.docprev .dp-total td { color: #c8102e; font-weight: 800; font-size: 13.5px;
  border-bottom: 0; border-top: 1px solid #24262c; padding-top: 8px; }
.docprev .dp-words { border: 0; background: none; padding: 9px 0 0; font-size: 10.5px; color: #24262c; font-weight: 500; }
.docprev .dp-terms { margin-top: 14px; border: 0; padding: 0; font-size: 10.5px; color: #4e525c; white-space: pre-wrap; }
.docprev .dp-juris { color: #c8102e; text-align: center; font-weight: 700; font-size: 10px;
  background: #f8f8f6; border: 0; margin-top: 10px; padding: 6px; letter-spacing: .04em; }
.docprev .dp-foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid #e4e6ea;
  font-size: 9.5px; color: #7a808a; text-align: center; }
.docprev .dp-empty { color: #aaa; font-style: italic; }
.docprev-note { font-size: 11.5px; color: var(--txt-3); margin-top: 8px; text-align: center; }

/* ── In-app PDF viewer (canvas-rendered, no browser plugin needed) ──── */
.pdfv { background: var(--paper); border-radius: 6px; padding: 14px; }
.pdfv-toolbar { font-size: 12px; color: var(--txt-3); margin-bottom: 10px; text-align: center; }
.pdfv-pages-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pdfv-page { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.18); border-radius: 2px; max-width: 100%; }
.pdfv-status { text-align: center; padding: 40px 20px; color: var(--txt-3); font-size: 13.5px; }
.pdfv-status.pdfv-err { color: var(--redb); }

/* ── Mobile ────────────────────────────────────────────── */
.menubtn { display: none; }
@media (max-width: 880px) {
  .side { position: fixed; left: -240px; transition: left .18s ease; z-index: 90; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .side.open { left: 0; }
  .menubtn { display: inline-flex; }
  .content { padding: 14px; }
  .searchbox { min-width: 0; }
  .split { grid-template-columns: 1fr; }
}
@media print {
  .side, .topbar, .btn, .filters, .pager { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card, .tablewrap { box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; color: #000; }
}

/* ── dashboard motion + export menu (added) ───────────────────────── */
.pagehead { position: relative; z-index: 20; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s cubic-bezier(.2,.7,.3,1) both; animation-delay: var(--d, 0ms); }
.stat { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.10); border-color: var(--line-strong, var(--line)); }
.stat .v { transition: color .16s ease; }

.exportmenu { position: relative; display: inline-block; }
.expdrop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.16);
  padding: 6px; z-index: 1000; display: none; }
.expdrop.open { display: block; animation: rise .16s ease both; }
.expdrop a { display: block; padding: 8px 12px; border-radius: 7px; font-size: 13px; color: var(--txt-1); text-decoration: none; }
.expdrop a:hover { background: var(--bg-2); }

@media (prefers-reduced-motion: reduce) {
  .rise, .expdrop.open { animation: none; }
  .stat { transition: none; }
  .stat:hover { transform: none; }
}

/* ── print: a clean one-page snapshot (Ctrl/Cmd-P → Save as PDF too) ── */
@media print {
  .side, .topbar, .no-print, .exportmenu, .btn, .filters, .pager, .cmdk, .searchbox { display: none !important; }
  .main, .content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .card, .tablewrap, .stat { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  .rise { animation: none !important; opacity: 1 !important; transform: none !important; }
  .pagehead h1::after { content: " — ExpertAims"; font-weight: 400; color: #666; }
  a { color: #000 !important; text-decoration: none !important; }
}
