/* Helion DRT · Document Review Tracking */
:root {
  --navy: #14213d; --navy-2: #1d2d52; --ink: #1f2933; --ink-2: #3e4c59; --muted: #7b8794; --line: #e4e7eb; --line-2: #cbd2d9;
  --bg: #f5f7fa; --card: #ffffff; --accent: #3e63dd; --accent-2: #2f4fb8; --accent-soft: #edf2fe; --teal: #12a594;
  --ok: #067647; --ok-bg: #dcfae6; --warn: #b54708; --warn-bg: #fef0c7; --err: #b42318; --err-bg: #fee4e2;
  --ins: #d3f9d8; --ins-ink: #05603a; --del: #ffe3e3; --del-ink: #b42318; --mv: #ebe4ff; --mv-ink: #5925dc;
  --crit: #e5484d; --major: #f79009; --minor: #3e63dd;
  --r: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
  color-scheme: light;
}
body[data-module="pharma"] { --accent: #0e7c7b; --accent-2: #0a6160; --accent-soft: #e6f6f5; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0 0 8px; } h3 { font-size: 15px; margin: 0 0 10px; } h4 { font-size: 14px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11px; } .mono { font-family: var(--mono); }
.grow { flex: 1; } .nowrap { white-space: nowrap; } .mt { margin-top: 10px; } .block { display: block; width: 100%; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); }
button, input, select, textarea { font: inherit; color: inherit; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: #f8fafc; border-color: #9aa5b1; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--err); border-color: #fda29b; } .btn.danger:hover { background: var(--err-bg); }
.btn.lg { padding: 11px 22px; font-size: 15px; } .btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.dashed { border-style: dashed; width: 100%; justify-content: center; color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { justify-content: center; }
.icon-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: #eef1f5; } .icon-btn:disabled { opacity: .3; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* forms */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input.sm, select.sm { padding: 5px 8px; font-size: 13px; width: auto; }
input.sm.block { width: 100%; }
input.need { border-color: var(--err) !important; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field.sm { margin-bottom: 6px; } .field.sm input { padding: 5px 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.end { justify-content: flex-end; }
.checks { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.form-error { color: var(--err); min-height: 20px; font-size: 13px; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13px; margin-bottom: 10px; }
.kv > span { color: var(--muted); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.err { background: var(--err-bg); color: var(--err); }
.badge.t-inserted { background: var(--ins); color: var(--ins-ink); } .badge.t-deleted { background: var(--del); color: var(--del-ink); }
.badge.t-modified { background: #fff1d6; color: #93370d; } .badge.t-moved { background: var(--mv); color: var(--mv-ink); }
.badge.status.s-Draft { background: #eef1f5; } .badge.status.s-InReview { background: #e0eaff; color: #2f4fb8; } .badge.status.s-Reviewed { background: #e6f6f5; color: #0a6160; }
.badge.status.s-Approved { background: var(--ok-bg); color: var(--ok); } .badge.status.s-Rejected { background: var(--err-bg); color: var(--err); }
.badge.rev { color: #fff; }
.rev0 { --rc: #3e63dd; } .rev1 { --rc: #e5484d; } .rev2 { --rc: #12a594; } .rev3 { --rc: #f76b15; } .rev4 { --rc: #8e4ec6; } .rev5 { --rc: #0090ff; } .rev6 { --rc: #d6409f; }
.badge.rev { background: var(--rc); }
.sev-dot { font-size: 11px; font-weight: 600; text-transform: capitalize; display: inline-flex; align-items: center; gap: 4px; }
.sev-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sev-dot.critical { color: var(--crit); } .sev-dot.major { color: var(--major); } .sev-dot.minor { color: var(--minor); }

/* notices */
.notice { padding: 10px 14px; border-radius: 8px; margin: 10px 0; border: 1px solid; font-size: 13.5px; }
.notice.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.notice.warn { background: var(--warn-bg); border-color: #fedf89; color: #7a2e0e; }
.notice.error { background: var(--err-bg); border-color: #fecdca; color: #7a271a; }
.notice.ok { background: var(--ok-bg); border-color: #abefc6; color: #054f31; }
.notice.small { padding: 4px 10px; margin: 0; font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* auth */
body.auth { background: linear-gradient(135deg, #0b1530 0%, #14213d 45%, #233a73 100%); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 440px; gap: 48px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 32px; }
.auth-wrap.single { grid-template-columns: 440px; justify-content: center; }
.auth-hero { color: #dbe4ff; }
.auth-hero h1 { color: #fff; font-size: 38px; margin: 28px 0 12px; letter-spacing: -.02em; }
.auth-hero p { font-size: 17px; color: #b8c4e8; max-width: 520px; }
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.hero-points li { padding-left: 28px; position: relative; color: #dbe4ff; }
.hero-points li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(18,165,148,.25); color: #5eead4; display: grid; place-items: center; font-size: 12px; }
.auth-card { background: #fff; border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 22px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { font-size: 18px; letter-spacing: -.01em; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--teal)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; box-shadow: 0 4px 12px rgba(62,99,221,.35); }
.pro { font-size: 10px; font-weight: 800; letter-spacing: .12em; background: linear-gradient(90deg, #f5c451, #e8a317); color: #3b2500; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.auth-hero .brand b { color: #fff; }
.boot-error { max-width: 640px; margin: 80px auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: var(--shadow); }

/* shell */
.shell { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.side { background: var(--navy); color: #c9d3ee; display: flex; flex-direction: column; padding: 18px 12px; overflow: auto; }
.side .brand { padding: 0 8px 18px; color: #fff; }
.nav-items { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c9d3ee; font-weight: 500; }
.nav-item:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav-item.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.ni { width: 22px; text-align: center; opacity: .9; }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7d8cb8; padding: 16px 10px 6px; }
.side-foot { padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot .muted { color: #7d8cb8; }
.main-col { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.top .menu { display: none; }
main { flex: 1; overflow: auto; outline: none; }
.page { padding: 24px 28px 60px; max-width: 1640px; margin: 0 auto; }
.seg { display: inline-flex; background: #eef1f5; border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg.sm button { padding: 4px 10px; font-size: 12.5px; }
.seg .count { font-size: 11px; color: var(--muted); }
.module button.on { color: var(--accent); }
.folder-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; max-width: 260px; font-size: 13px; }
.folder-btn span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-btn.warn { border-color: #fedf89; background: var(--warn-bg); color: #7a2e0e; }
.folder-btn.ok { border-color: #abefc6; }
.bell { position: relative; }
.bell.has::after { content: ''; position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; background: var(--crit); border-radius: 50%; border: 2px solid #fff; }
.user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.user-btn:hover { background: #eef1f5; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.user-meta span { font-size: 11.5px; color: var(--muted); }

/* page */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.lead { color: var(--ink-2); font-size: 15px; max-width: 760px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { padding: 0; overflow: auto; }
.section { margin: 26px 0 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); cursor: pointer; }
.kpi b { font-size: 28px; letter-spacing: -.02em; color: var(--navy); }
.kpi:hover { border-color: var(--accent); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.action { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s, box-shadow .12s; }
.action:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.action span:last-child { color: var(--muted); font-size: 13px; }
.a-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 19px; margin-bottom: 6px; }
.activity { list-style: none; padding: 0; margin: 0; } .activity li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-2); background: #f8fafc; padding: 9px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: #f8fafc; }
.table.audit td.details { max-width: 520px; color: var(--ink-2); word-break: break-word; }
tr.lv-fail td:first-child { color: var(--err); font-weight: 700; } tr.lv-warn td:first-child { color: var(--warn); font-weight: 700; } tr.lv-pass td:first-child { color: var(--ok); font-weight: 700; }
.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; } .mini th, .mini td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.del-t { color: var(--del-ink); } .ins-t { color: var(--ins-ink); }

/* compare setup */
.setup { padding: 24px; }
.setup-grid { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 14px; align-items: stretch; margin-bottom: 16px; }
.vs { display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 170px; background: #fafbfc; transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.has { border-style: solid; border-color: var(--teal); background: #f0fbf9; }
.drop-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.drop-icon { font-size: 26px; color: var(--accent); }
.drop-file { display: flex; align-items: center; gap: 12px; text-align: left; }
.ficon { display: inline-grid; place-items: center; min-width: 38px; height: 22px; padding: 0 5px; font-size: 10px; font-weight: 800; border-radius: 4px; color: #fff; background: #7b8794; letter-spacing: .03em; }
.f-pdf { background: #d92d20; } .f-docx { background: #2b579a; } .f-sheet { background: #217346; } .f-pptx { background: #c43e1c; } .f-image { background: #8e4ec6; } .f-text { background: #52606d; }
.options { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 6px 0 16px; }
.options summary { cursor: pointer; font-weight: 600; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px 20px; margin-top: 10px; }
.opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.opt .muted { width: 100%; padding-left: 24px; margin-top: -4px; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.feature b { display: block; margin-bottom: 4px; color: var(--navy); }
.feature p { color: var(--ink-2); font-size: 13px; margin: 0; }
.revlist { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 16px; }
.rev-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }

/* busy */
.busy-back { position: fixed; inset: 0; background: rgba(15,23,42,.38); display: grid; place-items: center; z-index: 90; backdrop-filter: blur(2px); }
.busy { background: #fff; border-radius: 14px; padding: 26px 34px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 320px; box-shadow: var(--shadow-lg); }
.busy-sub { color: var(--muted); font-size: 12.5px; min-height: 18px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 80; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(1200px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 8px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 8px 20px 12px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
.sign-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }

#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: 440px; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; transition: opacity .3s, transform .3s; }
.toast.ok { background: #054f31; } .toast.error { background: #912018; } .toast.warn { background: #93370d; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* results */
.results-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rh-title { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.rh-title h1 { font-size: 20px; word-break: break-word; }
.rh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.fchip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 3px; font-size: 12.5px; }
.stats-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.stat { display: flex; align-items: baseline; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; box-shadow: var(--shadow); }
.stat b { font-size: 22px; letter-spacing: -.02em; }
.stat.critical b { color: var(--crit); } .stat.major b { color: var(--major); } .stat.minor b { color: var(--minor); } .stat.total b { color: var(--navy); }
.stat-split { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.dot.t-inserted { background: #3ccb7f; } .dot.t-deleted { background: #f97066; } .dot.t-modified { background: #fdb022; } .dot.t-moved { background: #9b8afb; }
.results-body { display: grid; grid-template-columns: 400px 1fr; gap: 14px; height: calc(100vh - 250px); min-height: 520px; }
.results-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.results-view { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.view-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.viewer { flex: 1; overflow: auto; position: relative; min-height: 0; }
.review-progress { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 4px; }
.bar { height: 6px; background: #eef1f5; border-radius: 99px; overflow: hidden; margin: 6px 0; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 99px; transition: width .3s; }
.kbd-hint { font-size: 11px; color: var(--muted); padding: 6px 12px; border-top: 1px solid var(--line); }
.changelist { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cl-head { padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.cl-filters { display: flex; flex-wrap: wrap; gap: 6px; } .cl-filters input { flex: 1; min-width: 140px; }
.cl-count { font-size: 12px; color: var(--muted); }
.cl-items { overflow: auto; flex: 1; }
.cl-item { padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.cl-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--minor); }
.cl-item.sev-critical::before { background: var(--crit); } .cl-item.sev-major::before { background: var(--major); }
.cl-item:hover { background: #f8fafc; } .cl-item.sel { background: var(--accent-soft); }
.cl-item.done { opacity: .78; }
.cl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.cl-id { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.cl-cat { font-size: 11.5px; color: var(--muted); }
.cl-loc { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.cl-old, .cl-new { font-size: 13px; padding: 3px 7px; border-radius: 5px; margin: 2px 0; word-break: break-word; }
.cl-old { background: var(--del); color: var(--del-ink); text-decoration: line-through; text-decoration-color: rgba(180,35,24,.45); }
.cl-new { background: var(--ins); color: var(--ins-ink); }
.cd-del { background: #ffc9c9; font-weight: 700; } .cd-ins { background: #b2f2bb; font-weight: 700; }
.cl-formula { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.cl-imgs { display: flex; align-items: center; gap: 8px; margin: 4px 0; } .cl-imgs img { max-width: 140px; max-height: 80px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.cl-review { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.cl-btns { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.cl-disp { font-size: 12px; margin-top: 4px; color: var(--ink-2); }
.side-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; background: #fafbfc; position: sticky; top: 0; z-index: 2; }
.side-body { display: grid; grid-template-columns: 1fr 1fr; height: calc(100% - 78px); }
.viewer > .sbs { height: 100%; display: flex; flex-direction: column; } .viewer > .sbs .side-body { flex: 1; min-height: 0; }
.pane { overflow: auto; padding: 16px 22px; font-size: 14px; line-height: 1.75; }
.pane + .pane { border-left: 1px solid var(--line); }
.pane.single { max-height: calc(100vh - 380px); }
.pane .b { margin: 0 0 8px; } .pane .k-h { font-weight: 700; font-size: 15px; margin-top: 14px; } .pane .k-cell { display: inline-block; margin: 0 12px 4px 0; padding: 0 6px; background: #f8fafc; border: 1px solid var(--line); border-radius: 4px; }
.pane .k-note { color: var(--ink-2); font-style: italic; } .pane .k-hf { color: var(--muted); font-size: 12px; }
.pg { margin: 18px 0 8px; padding-top: 6px; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.pane .del { background: var(--del); color: var(--del-ink); text-decoration: line-through; text-decoration-color: rgba(180,35,24,.5); border-radius: 3px; cursor: pointer; }
.pane .ins { background: var(--ins); color: var(--ins-ink); border-radius: 3px; cursor: pointer; }
.pane .mv { background: var(--mv); color: var(--mv-ink); border-radius: 3px; cursor: pointer; }
.pane .sv-critical { box-shadow: inset 0 -2px 0 var(--crit); }
.pane .focus { outline: 2px solid var(--accent); outline-offset: 1px; animation: flash 1s ease 2; }
@keyframes flash { 50% { outline-color: transparent; } }
.cid { font-family: var(--mono); font-size: 9px; color: var(--ink-2); margin-right: 2px; text-decoration: none; display: inline-block; }
.gap { display: inline-block; font-family: var(--mono); font-size: 9px; padding: 0 3px; border-radius: 3px; color: #fff; vertical-align: 2px; cursor: pointer; }
.gap-ins { background: #3ccb7f; } .gap-del { background: #f97066; }
.legend { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 6px 14px; border-top: 1px solid var(--line); font-size: 12px; }
.legend > span:not(.muted) { padding: 1px 6px; border-radius: 3px; }
.legend .del { background: var(--del); color: var(--del-ink); text-decoration: line-through; } .legend .ins { background: var(--ins); color: var(--ins-ink); } .legend .mv { background: var(--mv); color: var(--mv-ink); }
.legend .x-mod { background: #fff1d6; } .legend .x-ins { background: var(--ins); } .legend .x-del { background: var(--del); } .legend .x-formula { background: #e0eaff; }
.org { border-radius: 3px; padding: 0 1px; background: color-mix(in srgb, var(--rc) 18%, transparent); box-shadow: inset 0 -2px 0 var(--rc); }
.history .legend { border: 0; padding: 10px 14px; }
.history .pane { padding: 16px 24px; }
.pages, .page-grid { height: 100%; }
.page-nav { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 13px; }
.page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); height: calc(100% - 46px); }
.page-pane { background: #eef1f5; overflow: auto; padding: 12px; text-align: center; }
.page-pane canvas { max-width: 100%; height: auto; box-shadow: var(--shadow-lg); background: #fff; cursor: pointer; }
.vpanel .view-bar { position: sticky; top: 0; background: #fff; z-index: 2; }
.vstage { padding: 12px; background: #eef1f5; min-height: 300px; }
.vside { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vstage figure { margin: 0; text-align: center; } .vstage canvas { max-width: 100%; height: auto; background: #fff; box-shadow: var(--shadow); cursor: crosshair; }
.vstage figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.vstage .one canvas { max-height: 72vh; width: auto; }
.swipe { position: relative; display: inline-block; max-width: 100%; }
.swipe > canvas { display: block; max-width: 100%; height: auto; }
.swipe-top { position: absolute; left: 0; top: 0; bottom: 0; overflow: hidden; border-right: 2px solid var(--accent); }
.swipe-top canvas { max-width: none !important; height: 100% !important; }
.vstage input[type=range] { width: 100%; margin-top: 10px; }
.sheet-grid-wrap { height: calc(100% - 50px); } .sheets { height: 100%; }
.sheets .pane { padding: 0; line-height: 1.3; }
.xgrid { border-collapse: collapse; font-size: 12px; }
.xgrid th { background: #f3f4f6; color: var(--muted); font-weight: 600; padding: 3px 6px; border: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.xgrid tbody th { position: sticky; left: 0; }
.xgrid td { border: 1px solid var(--line); padding: 3px 6px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.x-mod { background: #fff1d6 !important; font-weight: 600; } .x-ins { background: var(--ins) !important; } .x-del { background: var(--del) !important; } .x-formula { background: #e0eaff !important; }
.xgrid td.focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.charts { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .chart-grid figure { margin: 0; } .chart-svg { width: 100%; height: auto; } .chart-grid figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.img-changes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 12px; }
.img-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; } .img-pair img { width: 100%; max-height: 160px; object-fit: contain; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
.viewer > div > p.muted { padding: 12px 14px 0; }

/* reviews */
.timeline { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 0; counter-reset: s; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; box-shadow: var(--shadow); }
.timeline li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; position: relative; }
.timeline li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--line); margin: 0 10px; }
.timeline li.done::after { background: var(--teal); }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; background: #fff; }
.timeline li.done { color: var(--ink); } .timeline li.done .tl-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.timeline li.cur { color: var(--accent); } .timeline li.cur .tl-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li.rejected { color: var(--err); } .timeline li.rejected .tl-dot { border-color: var(--err); color: var(--err); }
.sigs { list-style: none; padding: 0; margin: 0; } .sigs li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sig-meaning { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; margin-right: 8px; background: #eef1f5; }
.sig-meaning.m-Approved { background: var(--ok-bg); color: var(--ok); } .sig-meaning.m-Rejected { background: var(--err-bg); color: var(--err); } .sig-meaning.m-Reviewed { background: #e0eaff; color: var(--accent-2); }
.record-list .changelist { max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; }
.label-preview { text-align: center; background: #eef1f5; padding: 12px; border-radius: 8px; margin: 10px 0; } .label-preview img { max-width: 100%; max-height: 380px; box-shadow: var(--shadow-lg); background: #fff; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; } .role-card p { margin: 4px 0; color: var(--ink-2); }
.checklist { padding-left: 0; list-style: none; } .checklist li { padding: 4px 0 4px 24px; position: relative; } .checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.form { max-width: 760px; }

/* regulatory */
.reg-status { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.reg-status.new { border-color: #fedf89; background: linear-gradient(90deg, #fffcf5, #fff); }
.reg-diff { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; }
.reg-region { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rd-line { font-size: 13px; padding: 3px 8px; border-radius: 5px; margin: 3px 0; }
.rd-line.added { background: var(--ins); color: var(--ins-ink); } .rd-line.removed { background: var(--del); color: var(--del-ink); } .rd-line.changed { background: #fff1d6; color: #7a2e0e; }

/* labels */
.label-setup { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 10px 20px; align-items: start; }
.label-setup > .row, .label-setup > p { grid-column: 1 / -1; }
.label-grid { display: grid; grid-template-columns: 320px 1fr 300px; gap: 14px; align-items: start; }
.req-panel, .props-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); max-height: calc(100vh - 160px); overflow: auto; position: sticky; top: 0; }
.req-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.req-list { list-style: none; padding: 0; margin: 10px 0 0; }
.req { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.req-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.req.ok .req-ico { background: var(--ok-bg); color: var(--ok); } .req.placeholder .req-ico { background: var(--warn-bg); color: var(--warn); } .req.missing .req-ico { background: #eef1f5; color: var(--muted); }
.req-sym svg { display: block; }
.label-stage { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.stage-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.stage-scroll { overflow: auto; padding: 28px; background: repeating-conic-gradient(#f3f4f6 0% 25%, #fafbfc 0% 50%) 0 0 / 20px 20px; min-height: 420px; display: flex; justify-content: center; align-items: flex-start; }
.label { position: relative; background: #fff no-repeat center / 100% 100%; box-shadow: 0 6px 24px rgba(16,24,40,.18); flex-shrink: 0; color: #000; font-family: Arial, Helvetica, sans-serif; }
.le { position: absolute; cursor: move; outline: 1px dashed transparent; overflow: visible; }
.le:hover { outline-color: rgba(62,99,221,.5); }
.le.sel { outline: 1.5px solid var(--accent); z-index: 5; }
.le .handle { position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; background: var(--accent); border: 2px solid #fff; border-radius: 2px; cursor: nwse-resize; display: none; }
.le.sel .handle { display: block; }
.le-text { white-space: pre-wrap; line-height: 1.18; width: 100%; height: 100%; overflow: hidden; }
.le-sym { display: flex; align-items: center; gap: .4em; height: 100%; } .le-sym svg, .le-sym img { display: block; flex-shrink: 0; } .le-sym-text { line-height: 1.15; white-space: pre-wrap; }
.le-bc canvas { width: 100%; height: auto; image-rendering: pixelated; display: block; }
.le-hri { font-family: var(--mono); white-space: nowrap; margin-top: 2px; }
.le-box { width: 100%; height: 100%; border: 1px solid #000; }
.le-img { width: 100%; height: 100%; object-fit: contain; }
.le-err { color: var(--err); font-size: 10px; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; } .palette .btn { justify-content: flex-start; }

/* braille */
.braille-big { font-size: 34px; letter-spacing: 2px; line-height: 1.4; word-break: break-all; padding: 10px 0; }
.braille-mid { font-size: 20px; letter-spacing: 1px; }
.braille-dots { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; margin-bottom: 10px; }
.select-canvas { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; cursor: crosshair; margin: 8px 0; touch-action: none; }
.cell-diff { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.cell-diff span { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; font-size: 18px; line-height: 1.1; }
.cell-diff span i { font-style: normal; color: var(--muted); }
.cell-diff span.bad { border-color: var(--err); background: var(--err-bg); }

/* help */
.help { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.help-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.help-nav a { padding: 7px 10px; border-radius: 7px; color: var(--ink-2); } .help-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; } .help-nav a:hover { text-decoration: none; background: #eef1f5; }
.help-body { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px 28px; box-shadow: var(--shadow); max-width: 860px; line-height: 1.65; }
.help-body li { margin-bottom: 6px; }

/* tour */
.tour-back { position: fixed; inset: 0; z-index: 95; }
.tour-spot { position: fixed; z-index: 96; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(15,23,42,.55), 0 0 0 3px var(--teal); transition: all .25s; pointer-events: none; }
.tour-tip { position: fixed; z-index: 97; width: 330px; background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow-lg); transition: top .25s, left .25s; }
.tour-tip h4 { font-size: 15px; margin: 4px 0 6px; }

@media (max-width: 1280px) {
  .label-grid { grid-template-columns: 280px 1fr; } .props-panel { grid-column: 1 / -1; position: static; max-height: none; }
  .results-body { grid-template-columns: 340px 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 70; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .top .menu { display: inline-grid; }
  .user-meta { display: none; }
  .two-col, .feature-row, .setup-grid, .label-setup, .label-grid, .help, .auth-wrap { grid-template-columns: 1fr; }
  .vs { transform: rotate(90deg); }
  .results-body { grid-template-columns: 1fr; height: auto; }
  .results-list { max-height: 60vh; } .results-view { min-height: 70vh; }
  .page { padding: 16px; } .auth-hero { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .side, .top, .rh-actions { display: none; } .shell { display: block; } }

/* ================= Helion theme ================= */
:root {
  --navy: #11131c; --navy-2: #1a1d2b;
  --accent: #f2541b; --accent-2: #d8430d; --accent-soft: #fff1ea;
  --grad: linear-gradient(135deg, #ff3d1f 0%, #ff7a00 55%, #ffb800 100%);
  --glow: 0 8px 24px -6px rgba(255, 98, 0, .55);
  --ink-dark: #0a0b10;
  --minor: #3e63dd;
  --r: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 8px rgba(16,24,40,.06);
  --shadow-lg: 0 18px 48px -12px rgba(16,24,40,.28);
}
body[data-module="pharma"] { --accent: #0e8f86; --accent-2: #0a6f68; --accent-soft: #e4f7f5; --grad: linear-gradient(135deg, #0e8f86 0%, #14b8a6 60%, #5eead4 100%); --glow: 0 8px 24px -6px rgba(20,184,166,.5); }
body { background: #f4f5f8; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* boot splash */
.boot-splash { min-height: 100vh; display: grid; place-content: center; gap: 22px; background: radial-gradient(60% 50% at 50% 40%, #2a1408 0%, #0a0b10 70%); }
.boot-splash img { width: 260px; filter: drop-shadow(0 0 28px rgba(255,120,0,.35)); animation: pulse 2.4s ease-in-out infinite; }
.boot-bar { width: 260px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, #ff3d1f, #ffb800); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes pulse { 50% { filter: drop-shadow(0 0 44px rgba(255,140,0,.6)); } }

/* buttons */
.btn { border-radius: 10px; }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: var(--glow); text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.btn.primary:hover { background: var(--grad); filter: brightness(1.06) saturate(1.05); transform: translateY(-1px); }
.btn.primary:active { transform: none; }
.btn { transition: background .15s, border-color .15s, box-shadow .15s, transform .15s, filter .15s; }
.btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }
.btn.ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.chip.on { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }

/* sign-in */
body.auth { background: #07080c; color: #e8e9ef; overflow-x: hidden; }
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.aurora .a1 { width: 620px; height: 620px; left: -160px; top: -180px; background: #ff3d1f; }
.aurora .a2 { width: 520px; height: 520px; right: -120px; top: 20%; background: #ff8a00; animation-duration: 22s; opacity: .4; }
.aurora .a3 { width: 680px; height: 680px; left: 30%; bottom: -380px; background: #ffb800; animation-duration: 26s; opacity: .28; }
.grid-fx { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%); }
@keyframes drift { to { transform: translate(80px, 60px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora i, .boot-splash img, .boot-bar i, .orbit { animation: none !important; } }
.auth-wrap { position: relative; z-index: 1; grid-template-columns: 1.15fr 420px; gap: 64px; max-width: 1180px; }
.auth-hero { color: #c9cbd6; }
.hero-logo { width: 300px; max-width: 70%; filter: drop-shadow(0 0 30px rgba(255,110,0,.35)); }
.hero-product { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; }
.hero-product b { font-size: 15px; font-weight: 800; letter-spacing: .32em; color: #fff; padding: 4px 10px 4px 13px; border: 1px solid rgba(255,140,0,.5); border-radius: 8px; background: rgba(255,106,0,.12); }
.hero-product span { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #ffb27a; }
.auth-hero h1 { font-size: 50px; line-height: 1.06; letter-spacing: -.035em; margin: 26px 0 16px; font-weight: 800; }
.auth-hero p { color: #a6a9b8; font-size: 17px; }
.hero-stats { display: flex; gap: 14px; margin: 26px 0 6px; flex-wrap: wrap; }
.hero-stats div { flex: 1; min-width: 140px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.hero-stats b { display: block; font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { font-size: 12.5px; color: #9a9db0; }
.hero-points li { color: #c9cbd6; }
.hero-points li::before { background: rgba(255,106,0,.18); color: #ffa057; }
.auth-card { background: rgba(20,21,30,.72); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 34px; color: #e8e9ef; backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06); position: relative; }
.auth-card::before { content: ''; position: absolute; inset: -1px; border-radius: 22px; padding: 1px; background: linear-gradient(160deg, rgba(255,140,0,.6), transparent 40%, transparent 70%, rgba(255,61,31,.4)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.auth-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.auth-card-head img { width: 46px; height: 46px; filter: drop-shadow(0 0 12px rgba(255,140,0,.5)); }
.auth-card h2 { color: #fff; margin: 0; }
.auth-card .muted { color: #8d90a3; }
.auth-card .field > span { color: #b5b8c8; }
.auth-card input:not([type=checkbox]):not([type=radio]):not([type=range]) { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); color: #fff; padding: 11px 12px; }
.auth-card input:focus { border-color: #ff7a00; box-shadow: 0 0 0 3px rgba(255,122,0,.22); }
.auth-card .form-error { color: #ff8a7a; }
.auth-card .btn.lg { padding: 12px 22px; margin-bottom: 14px; }

/* shell */
.side { background: radial-gradient(120% 40% at 0% 0%, rgba(255,90,0,.20), transparent 60%), linear-gradient(180deg, #0d0e15 0%, #0a0b10 100%); color: #a9acbd; border-right: 1px solid rgba(255,255,255,.04); }
.side .brand { flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 10px 22px; }
.brand-logo { width: 150px; filter: drop-shadow(0 0 16px rgba(255,110,0,.25)); }
.brand-name { display: flex; align-items: center; gap: 8px; }
.brand-name b { font-size: 12px; font-weight: 800; letter-spacing: .26em; color: #fff; padding: 2px 6px 2px 8px; border-radius: 6px; background: var(--grad); }
.brand-name span { font-size: 9.5px; letter-spacing: .08em; white-space: nowrap; text-transform: uppercase; color: #8b8ea0; }
.nav-item { color: #a9acbd; border-radius: 10px; padding: 9px 12px; position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.on { background: linear-gradient(90deg, rgba(255,106,0,.20), rgba(255,106,0,.04)); color: #fff; box-shadow: none; }
.nav-item.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px rgba(255,120,0,.8); }
.nav-item.on .ni { color: #ffa057; }
body[data-module="pharma"] .nav-item.on { background: linear-gradient(90deg, rgba(20,184,166,.2), rgba(20,184,166,.04)); }
body[data-module="pharma"] .nav-item.on .ni { color: #5eead4; }
.nav-sep { color: #5d6073; }
.side-foot { border-top-color: rgba(255,255,255,.06); } .side-foot .muted { color: #5d6073; }
.top { background: rgba(255,255,255,.82); backdrop-filter: blur(12px) saturate(1.4); border-bottom: 1px solid rgba(16,24,40,.06); position: sticky; top: 0; z-index: 20; }
.seg { background: #eceef3; border-radius: 11px; }
.seg button { border-radius: 8px; }
.module button.on { color: #fff; background: var(--grad); box-shadow: var(--glow); }
.avatar { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.folder-btn { border-radius: 10px; }

/* cards */
.card, .kpi, .action { border-color: rgba(16,24,40,.07); }
.card { border-radius: var(--r); }

/* dashboard hero */
.hero-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 24px; border-radius: 22px; padding: 34px 38px; margin-bottom: 22px; color: #e8e9ef;
  background: radial-gradient(80% 140% at 100% 0%, rgba(255,106,0,.45), transparent 55%), radial-gradient(60% 120% at 0% 100%, rgba(255,61,31,.25), transparent 60%), linear-gradient(135deg, #12131b, #0a0b10);
  box-shadow: 0 24px 60px -24px rgba(10,11,16,.6); }
body[data-module="pharma"] .hero-banner { background: radial-gradient(80% 140% at 100% 0%, rgba(20,184,166,.45), transparent 55%), radial-gradient(60% 120% at 0% 100%, rgba(14,143,134,.3), transparent 60%), linear-gradient(135deg, #0f1a1d, #0a0b10); }
.hero-banner::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.hb-text { position: relative; z-index: 1; }
.hb-kicker { display: inline-block; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: #ffb27a; padding: 4px 10px; border-radius: 999px; background: rgba(255,106,0,.14); border: 1px solid rgba(255,140,0,.3); margin-bottom: 12px; }
body[data-module="pharma"] .hb-kicker { color: #7cf0df; background: rgba(20,184,166,.14); border-color: rgba(94,234,212,.3); }
.hero-banner h1 { color: #fff; font-size: 34px; letter-spacing: -.03em; font-weight: 800; }
.hero-banner p { color: #a6a9b8; font-size: 15.5px; max-width: 620px; margin-bottom: 20px; }
.hb-art { position: relative; height: 200px; display: grid; place-items: center; z-index: 1; }
.hb-art img { width: 110px; filter: drop-shadow(0 0 30px rgba(255,140,0,.7)); }
.orbit { position: absolute; width: 190px; height: 190px; border-radius: 50%; border: 1px dashed rgba(255,160,80,.35); animation: spin 30s linear infinite; }
.orbit::after { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: #ffb800; box-shadow: 0 0 14px #ff8a00; }
.orbit.o2 { width: 140px; height: 140px; border-color: rgba(255,90,40,.3); animation-duration: 18s; animation-direction: reverse; }
.orbit.o2::after { background: #ff3d1f; box-shadow: 0 0 14px #ff3d1f; }
@keyframes spin { to { transform: rotate(360deg); } }

.kpi { border-radius: 16px; padding: 18px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad); opacity: .85; }
.kpi b { font-size: 32px; font-weight: 800; background: linear-gradient(135deg, #11131c, #3a3d4f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(255,106,0,.35); }
.action { border-radius: 16px; padding: 18px; }
.action:hover { border-color: rgba(255,106,0,.45); box-shadow: 0 18px 40px -16px rgba(255,98,0,.35); }
body[data-module="pharma"] .action:hover { border-color: rgba(20,184,166,.45); box-shadow: 0 18px 40px -16px rgba(20,184,166,.35); }
.a-icon { background: var(--grad); color: #fff; box-shadow: var(--glow); border-radius: 12px; }
h1 { letter-spacing: -.02em; }
.page-head h1 { font-weight: 800; }

@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; }
  .auth-hero h1 { font-size: 36px; }
  .hero-banner { grid-template-columns: 1fr; padding: 26px; }
  .hb-art { display: none; }
}
.two-col > * { min-width: 0; }
.select-canvas { max-width: 100%; height: auto; display: block; cursor: crosshair; border-radius: 8px; border: 1px solid var(--line); }
.cell-diff { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- side-by-side review tab ---------- */
.viewer > .rt { height: 100%; display: flex; flex-direction: column; }
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.rt-tog { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.rt-rules { position: relative; } .rt-rules summary { cursor: pointer; list-style: none; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.rt-rules[open] > div { position: absolute; z-index: 20; top: 28px; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; box-shadow: 0 10px 30px rgba(15,23,42,.14); display: grid; gap: 4px; min-width: 190px; }
.rt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.rt-legend > * { padding: 1px 6px; }
.rt-key { border: 0; background: none; font: inherit; font-size: 12px; padding: 1px 6px; }
.rt-layout { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.rt-lay { border: 0; font: inherit; font-size: 12px; padding: 3px 8px; }
.rt-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.rt-grid.no-side { grid-template-columns: minmax(0, 1fr); }
.rt-grid > * { min-width: 0; min-height: 0; }
.rt-grid > .sbs { display: flex; flex-direction: column; border-right: 1px solid var(--line); } .rt-grid > .sbs .side-body { flex: 1; min-height: 0; height: auto; }
.rt-grid .pane { max-height: calc(100vh - 330px); }
.card .rt-grid { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sbs.single .side-body, .side-body.one { grid-template-columns: 1fr; }
.rt-sidewrap { display: flex; flex-direction: column; min-height: 0; } .rt-sidewrap > .seg { margin: 8px 10px 0; }
.rt-side { display: flex; flex-direction: column; min-height: 0; background: #fcfcfd; }
.rt-side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px 4px; }
.rt-filters { padding: 4px 12px 8px; gap: 8px; border-bottom: 1px solid var(--line); }
.rt-issues { overflow: auto; flex: 1; max-height: calc(100vh - 380px); }
.rt-issue { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; gap: 4px; }
.rt-issue:hover { background: #f5f7fa; } .rt-issue .row { gap: 6px; }
.rt-issue code { background: #eef2f6; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
.rt-ctx { font-size: 12px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.badge.k-spelling { background: #e0f2fe; color: #075985; } .badge.k-grammar { background: #ede9fe; color: #5b21b6; }
.badge.k-punctuation { background: #fef3c7; color: #92400e; } .badge.k-style { background: #e2e8f0; color: #334155; }
.badge.new { background: #fee4e2; color: #b42318; }
.pane .focus, .rt .focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--trk-mod, #f79009); border-radius: 3px; }
.rt-vside { padding: 12px 14px; } .rt-vside canvas { max-width: 100%; height: auto; }
.rt-foot { padding: 8px 14px; border-top: 1px solid var(--line); gap: 12px; }
.trk-editor { display: grid; gap: 12px; }
.trk-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.trk-swatches { display: inline-flex; margin-right: 6px; } .trk-swatches i { width: 10px; height: 14px; display: inline-block; } .trk-swatches i:first-child { border-radius: 3px 0 0 3px; } .trk-swatches i:last-child { border-radius: 0 3px 3px 0; }
.trk-table { width: 100%; border-collapse: collapse; font-size: 13px; } .trk-table th, .trk-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.trk-color { width: 44px; height: 30px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.trk-prev span { padding: 0 2px; }
@media (max-width: 1100px) { .rt-grid { grid-template-columns: 1fr; } .rt-grid > .sbs { border-right: 0; } .rt-issues { max-height: 360px; } }
.viewer > .rt { overflow: auto; } .rt > .rt-bar, .rt > .rt-layout, .rt > .rt-foot, .rt > div:not(.rt-grid) { flex-shrink: 0; }
.rt-grid { min-height: 440px; } .rt-vside + .muted, .rt > div > .muted.small { padding: 0 14px 8px; }
