/* Mortok design tokens, taken from the Mortok app designs in Figma */
:root {
  --g9: #0E4B3B; --g8: #0B3A2E; --g7: #1E7A55; --g5: #1E9A62; --g3: #A8D9BF; --g2: #CFE6D7; --g1: #DCEFE3; --g0: #F5F0E6;
  --ink: #1D1D1B; --mute: #6F6B62; --line: #E2DACA; --line2: #D3CAB7; --bg: #FBF8F1; --card: #FFFFFF; --chip: #FBF8F1;
  --amber: #A0670E; --amber-bg: #FBF0DA; --red: #E0493E; --red-bg: #FCEAE8;
  --r: 16px; --sh: 0 1px 2px rgba(29, 29, 27, .04), 0 8px 24px rgba(29, 29, 27, .05);
  --serif: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --brand: "Playfair Display", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--g7); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; margin: 0; }
h1 { font-size: 30px; line-height: 1.15; }
h3 { font-size: 18px; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.center { text-align: center; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--g0); padding: 2px 6px; border-radius: 6px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px;
  padding: 12px 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.brand .logo { align-self: center; }
.wordmark { font-family: var(--brand); font-size: 25px; font-weight: 400; letter-spacing: -.01em; line-height: 1; color: var(--ink); }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  color: var(--mute); font-weight: 500; font-size: 14px; white-space: nowrap;
}
.nav a:hover { background: var(--g0); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--g9); color: #fff; }
.me { display: flex; align-items: center; gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 12px; color: var(--ink); }
.who:hover, .who.on { background: var(--g0); text-decoration: none; }
.who-t { display: flex; flex-direction: column; line-height: 1.2; }
.who-t b { font-size: 14px; font-weight: 600; }
.who-t small { font-size: 12px; color: var(--mute); }
.av {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--g9); color: var(--g3); font-weight: 700; font-size: 14px;
}
.av.sm { width: 30px; height: 30px; font-size: 13px; }
.iconbtn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.iconbtn:hover { background: var(--g0); text-decoration: none; }

main.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 28px 64px; }

/* ---------- flash ---------- */
.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; font-size: 14px; border: 1px solid transparent; }
.flash.ok { background: var(--g1); color: var(--g9); border-color: var(--g2); }
.flash.err { background: var(--red-bg); color: var(--red); border-color: #F5C2BD; }
.flash.info { background: var(--chip); color: var(--ink); border-color: var(--line); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--chip); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--g9); border-color: var(--g9); color: #fff; }
.btn.primary:hover { background: var(--g8); }
.btn.danger { color: var(--red); border-color: #F2B8B2; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--g7); font: inherit; font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form .span2 { grid-column: 1 / -1; }
.form label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.form label > input, .form label > select, .form label > textarea { margin-top: 6px; }
.form label small { font-weight: 400; color: var(--mute); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--g9); box-shadow: 0 0 0 4px rgba(14, 75, 59, .12); }
input:disabled { background: var(--chip); color: var(--mute); }
textarea { resize: vertical; }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--g9); flex: none; }
.pill, .tag { border: 1px solid transparent; }
.access-ctl select.limit { background: var(--chip); border-color: var(--line); border-radius: 17px; }
.check small { color: var(--mute); font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 14px; margin: 0; }
legend { font-size: 13px; font-weight: 600; padding: 0 6px; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.btnrow { display: flex; gap: 10px; }
.access-list { display: grid; gap: 0; }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--line); }
.access-row:last-child { border-bottom: 0; }
.access-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.access-ctl select.limit { width: auto; padding: 6px 10px; font-size: 13px; }
.access-ctl .limit-custom { width: 90px; padding: 6px 10px; font-size: 13px; }
.form label.check.mini { font-size: 13px; color: var(--mute); }
.uplimit { margin-bottom: 10px; }
.otp { font-size: 26px; letter-spacing: .5em; text-align: center; font-weight: 700; padding: 14px; }

/* ---------- auth ---------- */
main.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-split {
  width: 100%; max-width: 980px; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff;
  border-radius: 24px; overflow: hidden; box-shadow: var(--sh); border: 1px solid var(--line);
}
.auth-side {
  background: radial-gradient(120% 80% at 0% 0%, #1E6B50 0%, #0E4B3B 55%, #0B2B22 100%); color: #fff;
  padding: 44px 40px; display: flex; flex-direction: column; gap: 22px; position: relative;
}
.auth-side h2 { font-size: 32px; line-height: 1.15; max-width: 360px; }
.side-points { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 14px; }
.side-points li { display: flex; gap: 12px; align-items: center; color: #E9F3EC; font-size: 15px; }
.side-points .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #DCEFE3; }
.side-foot { margin-top: auto; font-size: 13px; color: #B9D3C6; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand b { display: block; font-size: 17px; }
.auth-brand small { display: block; font-size: 13px; color: var(--mute); }
.auth-brand.light small { color: #B9D3C6; }
.auth-brand .wordmark { font-size: 30px; }
.auth-brand.light .wordmark { color: #fff; }
.auth-card { padding: 44px 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.auth-card.solo, .auth-card.wide {
  width: 100%; max-width: 440px; background: #fff; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--sh);
}
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 28px; margin-top: 6px; }
.resend { font-size: 14px; text-align: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.checks .ok span { background: var(--g1); color: var(--g9); }
.checks .bad span { background: var(--red-bg); color: var(--red); }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; max-width: 640px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.warn { background: var(--amber-bg); color: var(--amber); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--sh); margin-bottom: 20px; }
.panel > h3 { margin-bottom: 8px; }
.panel > p.muted { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.panel-head a { font-size: 14px; font-weight: 600; }
.edit-panel { border-color: var(--g2); box-shadow: 0 0 0 4px var(--g0), var(--sh); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid2.wide-left { grid-template-columns: 1.7fr 1fr; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 8px 0 0; font-size: 14px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; font-weight: 500; }
.empty { text-align: center; padding: 64px 20px; background: #fff; border: 1px dashed var(--g2); border-radius: var(--r); }
.empty > .ic { width: 44px; height: 44px; color: var(--g5); }
.empty h3 { margin: 10px 0 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 4px; }
.stat span { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; font-weight: 500; }
.stat b { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.stat small { color: var(--mute); font-size: 13px; }
.stat.alert { background: var(--amber-bg); border-color: #F2DFB8; }
.stat.alert b { color: var(--amber); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--chip); }
.tbl td small { display: block; color: var(--mute); font-size: 12px; }
.tbl td.r { text-align: right; }
.tbl .ua { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person { display: flex; align-items: center; gap: 10px; }
.fileic { width: 34px; height: 34px; border-radius: 9px; background: var(--g1); color: var(--g9); display: grid; place-items: center; flex: none; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.row-item div { flex: 1; }
.row-item small { display: block; color: var(--mute); font-size: 13px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.tag.ok { background: var(--g1); color: var(--g7); }
.tag.off { background: var(--g0); color: var(--mute); }
.tag.warn { background: var(--amber-bg); color: var(--amber); }
.panel-head h3 .tag { margin-left: 8px; font-family: Inter, sans-serif; }
.tag.bad { background: var(--red-bg); color: var(--red); }
.blocked-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--red-bg); border: 1px solid #F2B8B2; color: var(--ink); border-radius: var(--r); padding: 16px 20px; margin-bottom: 20px;
}
.blocked-box b { display: flex; align-items: center; gap: 8px; color: var(--red); }
.blocked-box span { display: block; font-size: 13px; color: var(--mute); margin-top: 4px; }
.secret-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--g9); color: #fff; border-radius: var(--r); padding: 18px 22px; margin-bottom: 20px;
}
.secret-box b { display: block; }
.secret-box span { font-size: 13px; color: #B9D3C6; }
.secret-box code { background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; padding: 10px 14px; user-select: all; }
.danger-row { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; color: var(--mute); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--g9); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters select { width: auto; min-width: 200px; padding: 7px 10px; font-size: 14px; }

/* ---------- document cards ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.doc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--ink);
  box-shadow: var(--sh); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.doc-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(29, 29, 27, .06), 0 14px 34px rgba(29, 29, 27, .09); text-decoration: none; }
.doc-cover {
  height: 120px; position: relative; display: grid; place-items: center;
  background: linear-gradient(135deg, #F5F0E6 0%, #DCEFE3 100%);
}
.doc-ic { width: 54px; height: 54px; border-radius: 14px; background: #fff; color: var(--g9); display: grid; place-items: center; box-shadow: var(--sh); }
.doc-ic .ic { width: 26px; height: 26px; }
.doc-pages { position: absolute; left: 14px; bottom: 12px; font-size: 12px; font-weight: 600; color: var(--g9); background: rgba(255, 255, 255, .8); padding: 3px 9px; border-radius: 999px; }
.doc-new { position: absolute; right: 14px; top: 12px; font-size: 11px; font-weight: 700; color: #fff; background: var(--g9); padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; }
.doc-timer { position: absolute; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--amber); background: var(--amber-bg); padding: 3px 9px; border-radius: 999px; }
.doc-timer .ic { width: 14px; height: 14px; }
.doc-timer.off { color: var(--mute); background: var(--g0); }
.doc-card.ended-card { opacity: .6; pointer-events: none; }
.doc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.doc-cat { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g5); }
.doc-body h3 { font-size: 18px; line-height: 1.25; }
.doc-body p { margin: 0; color: var(--mute); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--mute); }
.doc-meta .open { display: flex; align-items: center; gap: 6px; color: var(--g9); font-weight: 600; }

/* ---------- uploader ---------- */
.drop {
  position: relative; border: 2px dashed var(--line2); border-radius: 16px; padding: 26px; text-align: center;
  background: var(--chip); cursor: pointer; transition: border .15s, background .15s;
}
.drop.over, .drop:hover { border-color: var(--g9); background: var(--g0); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-in { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.drop-in .ic { width: 28px; height: 28px; color: var(--g7); }
.drop-in b { font-size: 15px; }
.drop-in small { color: var(--mute); font-weight: 400; }
.drop-files { display: block; margin-top: 8px; font-size: 13px; color: var(--g9); font-weight: 600; pointer-events: none; }
.progress { display: none; gap: 8px; font-size: 13px; color: var(--mute); }
.progress.on { display: grid; }
.progress .bar { height: 8px; border-radius: 99px; background: var(--g1); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--g5); border-radius: 99px; transition: width .2s; }
.progress.err span { color: var(--red); font-weight: 600; }

/* ---------- viewer ---------- */
body.viewer-body { background: #171C1A; overflow: hidden; }
main.viewer-main { padding: 0; }
.viewer { position: fixed; inset: 0; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.vbar {
  display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); z-index: 5;
}
.vtitle { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.vtitle b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtitle small { color: var(--mute); font-size: 12px; }
.vtools { display: flex; align-items: center; gap: 6px; }
.zval { font-size: 13px; font-weight: 600; min-width: 46px; text-align: center; color: var(--mute); }
.vtimer { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--g9); background: var(--g1); padding: 7px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.vtimer.low { background: var(--red-bg); color: var(--red); }
.locked-card { position: fixed; inset: 0; z-index: 40; display: none; place-items: center; padding: 20px; background: rgba(23, 28, 26, .96); }
.viewer.locked .locked-card { display: grid; }
.viewer.locked .vscroll { visibility: hidden; }
.shield-card.danger { max-width: 420px; text-align: center; }
.shield-card.danger .ic { color: var(--red); }
.ended { position: fixed; inset: 0; z-index: 25; display: none; place-items: center; background: rgba(14, 75, 59, .9); }
.viewer.timeup .ended { display: grid; }
.viewer.timeup .vscroll { visibility: hidden; }
.ended .btn { margin-top: 8px; }
.vbadge { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--g9); background: var(--g1); padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.vstage { position: relative; flex: 1; min-height: 0; display: flex; }
.vscroll { flex: 1; overflow: auto; padding: 28px 24px 60px; }
.lens { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: none; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(23, 28, 26, .25);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(var(--ly, 50%) - 120px), transparent calc(var(--ly, 50%) - 95px), transparent calc(var(--ly, 50%) + 95px), #000 calc(var(--ly, 50%) + 120px), #000 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(var(--ly, 50%) - 120px), transparent calc(var(--ly, 50%) - 95px), transparent calc(var(--ly, 50%) + 95px), #000 calc(var(--ly, 50%) + 120px), #000 100%); }
.viewer.strict .lens { display: block; }
.strictbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.strictbtn[aria-pressed="true"] { background: var(--g9); border-color: var(--g9); color: #fff; }
.strictbtn:disabled { cursor: not-allowed; opacity: .9; }
.vpages { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.vpage { position: relative; background: #fff; border-radius: 6px; box-shadow: 0 6px 30px rgba(0, 0, 0, .35); overflow: hidden; }
.vpage::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, #F5F0E6 30%, #EDE6D8 50%, #F5F0E6 70%); background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
.vpage.ready::before, .vpage.failed::before { display: none; }
.vpage.failed::after { content: "Could not load this page. Scroll away and back to retry."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); font-size: 13px; }
.vpage canvas { position: relative; display: block; pointer-events: none; }
.vnum { position: absolute; right: 10px; top: 8px; font-size: 11px; font-weight: 600; color: var(--mute); background: rgba(255, 255, 255, .85); padding: 2px 8px; border-radius: 999px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.wm-overlay {
  position: fixed; inset: 60px 0 0 0; pointer-events: none; z-index: 3; overflow: hidden;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 90px 110px; padding: 40px; transform: rotate(-24deg) scale(1.5);
  opacity: .045;
}
.wm-overlay span { font-size: 14px; font-weight: 600; color: #000; white-space: nowrap; }
.shield {
  position: fixed; inset: 0; z-index: 20; display: none; place-items: center; cursor: pointer;
  background: rgba(14, 75, 59, .55); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.viewer.hidden .shield { display: grid; }
.viewer.hidden .vscroll { filter: blur(28px); }
.shield-card { background: #fff; border-radius: 16px; padding: 22px 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--sh); }
.shield-card .ic { width: 28px; height: 28px; color: var(--g7); }
.shield-card span { color: var(--mute); font-size: 14px; }

@media print {
  body * { display: none !important; }
  body::after { content: "Printing is disabled for this portal."; display: block !important; font: 16px sans-serif; padding: 40px; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid2.wide-left { grid-template-columns: 1fr; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-side { padding: 32px 28px; }
  .auth-side h2 { font-size: 26px; }
  .who-t { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .brand span { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  main.wrap { padding: 22px 16px 48px; }
  .form.cols { grid-template-columns: 1fr; }
  .tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .vbadge, .zval { display: none; }
  .vscroll { padding: 14px 8px 40px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat b { font-size: 26px; }
  .auth-card { padding: 30px 24px; }
}

/* ---------- Figma details: cream chips, outlined pills, verified green ---------- */
.chip-like, .tag.off { border-color: var(--line); }
.tag.ok { background: var(--g1); color: var(--g7); border-color: transparent; }
.pill.warn, .tag.warn { border-color: #F0DDB4; }
.vbadge { background: var(--chip); color: var(--g9); border: 1px solid var(--line); }
.vtimer { border: 1px solid transparent; }
.stat { border-radius: var(--r); }
.stat b { color: var(--ink); font-weight: 700; letter-spacing: -.02em; }
.panel { border-radius: var(--r); }
.doc-pages { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.doc-new { background: var(--g5); }
.nav a.on .ic { color: #fff; }
