:root {
  --bg: #0b1119;
  --panel: rgba(20, 28, 40, 0.86);
  --panel-solid: #171f2c;
  --panel-soft: #111a26;
  --line: rgba(218, 231, 230, 0.11);
  --line-strong: rgba(218, 231, 230, 0.18);
  --ink: #eef3f1;
  --muted: #93a0aa;
  --muted-strong: #bdc8ca;
  --mint: #b5f0d3;
  --mint-strong: #6ee0b4;
  --teal: #2bbf98;
  --blue: #9fb6ff;
  --amber: #f2c477;
  --red: #ff8b91;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(65, 145, 126, 0.14), transparent 28rem),
    radial-gradient(circle at 96% 12%, rgba(84, 100, 180, 0.11), transparent 26rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, label:focus-within { outline: 2px solid var(--mint-strong); outline-offset: 3px; }
[hidden] { display: none !important; }

.ambient { position: fixed; pointer-events: none; border-radius: 999px; filter: blur(20px); opacity: .7; z-index: -1; }
.ambient-one { width: 440px; height: 440px; top: 44vh; left: -280px; background: rgba(32, 130, 107, .16); }
.ambient-two { width: 380px; height: 380px; top: 68vh; right: -220px; background: rgba(106, 102, 188, .11); }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .018; z-index: 100; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.48'/%3E%3C/svg%3E"); }

.app-shell { display: grid; grid-template-columns: 254px minmax(0, 1fr); min-height: 100vh; }

.sidebar { display: flex; flex-direction: column; gap: 28px; width: 254px; padding: 30px 18px 20px; border-right: 1px solid var(--line); background: rgba(13, 19, 29, .75); }
.brand-lockup, .workspace-switcher, .profile-row, .topbar, .topbar-left, .topbar-right, .card-heading, .section-row, .table-toolbar, .documents-page-toolbar, .page-heading, .hero-actions, .recommendation-main, .recommendation-title, .topbar-right, .risk-card-top, .print-header, .viewer-topline, .modal-footer-actions { display: flex; align-items: center; }
.brand-lockup { gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border: 1px solid rgba(181, 240, 211, .25); border-radius: 13px; color: var(--mint); background: linear-gradient(145deg, rgba(181, 240, 211, .14), rgba(38, 84, 77, .25)); box-shadow: 0 10px 26px rgba(38, 200, 156, .09); }
.brand-mark svg { width: 27px; height: 27px; }
.brand-name { color: var(--ink); font-size: 15px; font-weight: 750; letter-spacing: -.04em; }
.brand-name span { color: var(--mint-strong); }
.brand-caption { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .01em; }

.workspace-switcher { gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.workspace-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.workspace-copy strong { overflow: hidden; color: var(--muted-strong); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow, .nav-label, .micro-label, .stat-label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.chevron { color: var(--muted); font-size: 15px; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; border: 1px solid rgba(181, 240, 211, .21); border-radius: 10px; color: #152a26; background: var(--mint); font-size: 10px; font-weight: 800; }
.avatar-small { width: 28px; height: 28px; border-radius: 9px; font-size: 9px; }
.avatar-top { width: 29px; height: 29px; border-radius: 50%; }

.nav-group { display: grid; gap: 12px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 39px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; transition: .2s ease; }
.nav-item:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.nav-item.is-active { border-color: rgba(181, 240, 211, .1); color: var(--mint); background: rgba(181, 240, 211, .09); }
.nav-icon { width: 17px; color: currentColor; font-size: 16px; text-align: center; }
.nav-count { min-width: 19px; margin-left: auto; padding: 2px 5px; border-radius: 99px; color: var(--muted); background: rgba(255, 255, 255, .07); font-size: 10px; text-align: center; }
.nav-count-alert { color: var(--amber); background: rgba(242, 196, 119, .1); }
.sidebar-spacer { flex: 1; min-height: 70px; }
.sidebar-note { display: flex; gap: 10px; padding: 13px 12px; border: 1px solid rgba(110, 224, 180, .16); border-radius: 13px; background: rgba(110, 224, 180, .055); }
.note-icon, .impact-mark, .tip-symbol { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; border-radius: 8px; color: var(--mint); background: rgba(110, 224, 180, .12); }
.sidebar-note strong { display: block; color: var(--muted-strong); font-size: 11px; }
.sidebar-note p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.profile-row { gap: 9px; padding-top: 17px; border-top: 1px solid var(--line); }
.profile-row > div:nth-child(2) { display: grid; gap: 2px; min-width: 0; flex: 1; }
.profile-row strong { overflow: hidden; color: var(--muted-strong); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.profile-row span { color: var(--muted); font-size: 9px; }

.main-content { min-width: 0; max-width: 1440px; width: 100%; margin: 0 auto; padding: 0 38px 24px; }
.topbar { justify-content: space-between; min-height: 88px; border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right { gap: 14px; }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb b { margin: 0 8px; color: #52606b; font-weight: 500; }
.breadcrumb strong { color: var(--muted-strong); font-weight: 600; }
.topbar-right { gap: 14px; }
.prototype-pill, .live-indicator, .secure-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 25px; padding: 0 9px; border: 1px solid rgba(181, 240, 211, .15); border-radius: 99px; color: var(--mint-strong); background: rgba(110, 224, 180, .07); font-size: 10px; font-weight: 650; }
.pulse-dot, .mini-dot, .status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 4px rgba(110, 224, 180, .1); }
.topbar-button, .icon-button { border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.topbar-button:hover, .icon-button:hover { color: var(--ink); }
.icon-button { padding: 4px; letter-spacing: 2px; }
.mobile-menu { display: none; border: 0; color: var(--muted-strong); background: transparent; font-size: 20px; }

.view-stack { padding-top: 31px; }
.view { display: none; animation: fade-in .25s ease; }
.view.is-visible { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(24, 33, 47, .86), rgba(17, 25, 36, .86)); box-shadow: var(--shadow); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.46fr) minmax(300px, .85fr); gap: 14px; }
.hero-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(220px, .65fr); min-height: 324px; overflow: hidden; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 37px 34px; }
.accent-eyebrow { color: var(--mint-strong); }
.sparkle { color: var(--mint); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.055em; }
.hero-copy h1 { max-width: 8.6ch; margin: 17px 0 17px; color: var(--ink); font-size: clamp(34px, 4vw, 58px); font-weight: 620; line-height: .98; }
.hero-copy h1 em { color: var(--mint); font-style: normal; }
.hero-copy p { max-width: 455px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.hero-actions { gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; font-size: 11px; font-weight: 700; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #10231e; background: var(--mint); box-shadow: 0 9px 22px rgba(110, 224, 180, .12); }
.button-primary:hover { background: #d0f8e2; }
.button-quiet { border-color: transparent; color: var(--muted-strong); background: transparent; }
.button-quiet:hover { color: var(--mint); background: rgba(255, 255, 255, .04); }
.button-outline { border-color: var(--line-strong); color: var(--muted-strong); background: rgba(255, 255, 255, .025); }
.button-outline:hover { border-color: rgba(181, 240, 211, .25); color: var(--mint); background: rgba(181, 240, 211, .05); }
.full-width { width: 100%; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 324px; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(circle at 50% 45%, rgba(110, 224, 180, .16), transparent 37%), rgba(12, 24, 31, .35); }
.hero-visual::before { position: absolute; inset: 18px; border: 1px dashed rgba(181, 240, 211, .14); border-radius: 50%; content: ""; }
.visual-orbit { position: absolute; border: 1px solid rgba(181, 240, 211, .15); border-radius: 50%; }
.orbit-one { width: 196px; height: 196px; transform: rotate(32deg) skewX(-12deg); }
.orbit-two { width: 140px; height: 140px; transform: rotate(-37deg) skewX(-17deg); border-color: rgba(181, 240, 211, .12); }
.shield-core { display: grid; place-items: center; width: 82px; height: 82px; border: 1px solid rgba(181, 240, 211, .24); border-radius: 25px; color: var(--mint); background: linear-gradient(145deg, rgba(181, 240, 211, .19), rgba(20, 65, 55, .55)); box-shadow: 0 0 55px rgba(110, 224, 180, .16); z-index: 1; }
.shield-core svg { width: 47px; height: 47px; }
.pulse-readout { position: absolute; left: 28px; bottom: 29px; display: grid; gap: 3px; }
.pulse-readout span, .visual-caption { color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.pulse-readout strong { font-size: 25px; font-weight: 650; letter-spacing: -.08em; }
.pulse-readout small { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 0; }
.pulse-readout b { color: var(--mint-strong); font-size: 10px; font-weight: 700; }
.visual-caption { position: absolute; right: 22px; bottom: 33px; display: flex; align-items: center; gap: 8px; letter-spacing: 0; }

.ai-card { min-height: 324px; padding: 26px; }
.card-heading { justify-content: space-between; gap: 10px; }
.card-heading h2, .section-row h2, .risk-card h2, .timeline-card h2 { margin: 5px 0 0; font-size: 18px; font-weight: 650; }
.ai-chip { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(181, 240, 211, .16); border-radius: 9px; color: var(--mint); background: rgba(110, 224, 180, .1); font-size: 9px; font-weight: 800; }
.recommendation-main { gap: 12px; margin-top: 24px; }
.doc-mini-icon { display: grid; place-items: center; width: 36px; height: 43px; flex: 0 0 auto; border-radius: 7px; color: #182217; font-size: 15px; }
.passport-icon { background: linear-gradient(145deg, #e7c68b, #bb8f52); }
.recommendation-main strong { display: block; max-width: 205px; overflow: hidden; color: var(--muted-strong); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-main p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.micro-label { display: block; margin-bottom: 4px; font-size: 8px; }
.recommendation-box { margin-top: 22px; padding: 13px; border: 1px solid rgba(181, 240, 211, .12); border-radius: 12px; background: rgba(110, 224, 180, .045); }
.recommendation-title { gap: 7px; }
.recommendation-title strong { color: var(--muted-strong); font-size: 10px; }
.confidence { margin-left: auto; color: var(--mint-strong); font-size: 9px; }
.recommendation-box ul { display: grid; gap: 9px; margin: 13px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 10px; }
.recommendation-box li { display: flex; align-items: center; gap: 8px; }
.recommendation-box li > span { width: 14px; color: var(--mint-strong); font-size: 13px; text-align: center; }
.recommendation-box li strong { color: var(--muted-strong); font-weight: 650; }
.text-button { display: inline-flex; align-items: center; gap: 7px; margin-top: 19px; padding: 0; border: 0; color: var(--mint); background: transparent; font-size: 10px; font-weight: 750; }
.text-button:hover { color: #ddffea; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.stat-card { min-height: 132px; padding: 18px 19px; border-radius: 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { letter-spacing: .08em; }
.stat-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 12px; }
.stat-icon.mint { color: var(--mint); background: rgba(181, 240, 211, .1); }
.stat-icon.blue { color: var(--blue); background: rgba(159, 182, 255, .1); }
.stat-icon.amber { color: var(--amber); background: rgba(242, 196, 119, .1); }
.stat-icon.green { color: var(--mint-strong); background: rgba(110, 224, 180, .1); }
.stat-card > strong { display: block; margin: 15px 0 9px; color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -.08em; line-height: 1; }
.stat-risk > strong span, .risk-score span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: -.02em; }
.stat-foot { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.trend-up { color: var(--mint-strong); }
.status-dot { width: 5px; height: 5px; box-shadow: 0 0 0 3px rgba(110, 224, 180, .09); }

.section-row { justify-content: space-between; gap: 16px; margin: 34px 0 14px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 14px; }
.documents-card, .activity-card, .documents-page-card, .timeline-card, .risk-card { padding: 22px; }
.table-toolbar { justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.filter-tabs { display: flex; gap: 18px; }
.filter-tab { position: relative; padding: 0 0 8px; border: 0; color: var(--muted); background: transparent; font-size: 10px; }
.filter-tab span { margin-left: 4px; color: var(--muted); font-size: 9px; }
.filter-tab.is-active { color: var(--muted-strong); font-weight: 700; }
.filter-tab.is-active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 3px; background: var(--mint); content: ""; }
.search-trigger { font-size: 21px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 0 12px 12px; color: #697782; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; vertical-align: middle; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.file-cell { display: flex; align-items: center; gap: 10px; min-width: 168px; }
.file-icon { display: grid; place-items: center; width: 27px; height: 31px; flex: 0 0 auto; border-radius: 6px; color: #233125; font-size: 9px; font-weight: 800; }
.file-icon.pdf { background: #f1b3ac; }
.file-icon.doc { background: #a9baf2; }
.file-icon.img { background: #f1d08e; }
.file-cell strong { display: block; color: var(--muted-strong); font-size: 10px; font-weight: 650; }
.file-cell span { display: block; margin-top: 3px; color: #6e7a84; font-size: 9px; }
.class-pill, .rule-pill, .status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 6px; font-size: 9px; }
.class-pill { color: var(--blue); background: rgba(159, 182, 255, .1); }
.class-pill.personal { color: var(--amber); background: rgba(242, 196, 119, .1); }
.class-pill.work { color: #d3b4ff; background: rgba(190, 155, 249, .1); }
.rule-pill { color: var(--muted-strong); background: rgba(255, 255, 255, .05); }
.rule-pill + .rule-pill { margin-left: 4px; }
.status-pill { gap: 5px; color: var(--mint-strong); background: rgba(110, 224, 180, .09); }
.status-pill.warning { color: var(--amber); background: rgba(242, 196, 119, .09); }
.row-action { padding: 6px 0 6px 10px; border: 0; color: var(--mint); background: transparent; font-size: 10px; font-weight: 700; }
.row-action:hover { color: #dcffea; }
.mobile-doc-list { display: none; }

.activity-card .card-heading { margin-bottom: 19px; }
.live-indicator { color: var(--mint-strong); }
.activity-list { display: grid; gap: 0; }
.activity-item { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 0 0 18px; }
.activity-item:not(:last-child)::before { position: absolute; top: 19px; bottom: 0; left: 11px; width: 1px; background: var(--line); content: ""; }
.activity-dot { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid rgba(110, 224, 180, .17); border-radius: 50%; color: var(--mint-strong); background: rgba(110, 224, 180, .1); font-size: 9px; z-index: 1; }
.activity-dot.amber { color: var(--amber); border-color: rgba(242, 196, 119, .17); background: rgba(242, 196, 119, .08); }
.activity-dot.red { color: var(--red); border-color: rgba(255, 139, 145, .17); background: rgba(255, 139, 145, .08); }
.activity-copy strong { display: block; color: var(--muted-strong); font-size: 10px; font-weight: 650; }
.activity-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.activity-time { color: #6d7a82; font-size: 9px; white-space: nowrap; }

.impact-strip, .security-tip { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 18px 20px; border-radius: 18px; background: linear-gradient(100deg, rgba(44, 82, 75, .38), rgba(24, 33, 47, .8)); }
.impact-strip > div:nth-child(2), .security-tip > div:nth-child(2) { min-width: 0; flex: 1; }
.impact-strip strong, .security-tip strong { display: block; margin-top: 4px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.impact-strip p, .security-tip p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }

.page-heading { justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading h1 { margin: 7px 0 6px; font-size: clamp(30px, 4vw, 44px); font-weight: 620; line-height: 1; }
.page-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.documents-page-card { border-radius: 20px; }
.documents-page-toolbar { justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.search-box { display: flex; align-items: center; gap: 9px; width: min(310px, 100%); padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255, 255, 255, .025); }
.search-box input { width: 100%; min-height: 34px; border: 0; outline: 0; color: var(--muted-strong); background: transparent; font-size: 10px; }
.search-box input::placeholder { color: #66737c; }
.toolbar-actions { display: flex; gap: 8px; }
.toolbar-actions .button { min-height: 34px; font-size: 10px; }
.security-tip { margin-top: 14px; border-color: rgba(181, 240, 211, .09); }

.activity-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.summary-card { min-height: 117px; padding: 20px; border-radius: 18px; }
.summary-card strong { display: block; margin: 12px 0 7px; color: var(--ink); font-size: 27px; font-weight: 600; letter-spacing: -.07em; line-height: 1; }
.summary-card .trend-up { font-size: 9px; }
.unit { color: var(--muted); font-size: 13px; letter-spacing: 0; }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 14px; }
.timeline-card, .risk-card { border-radius: 20px; }
.date-filter { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 9px; }
.timeline { margin-top: 24px; }
.timeline-day { margin: 0 0 12px; color: #6d7a82; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.timeline-day:not(:first-child) { padding-top: 17px; border-top: 1px solid var(--line); }
.timeline-event { position: relative; display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; gap: 12px; padding: 0 0 22px; }
.timeline-event:not(:last-child)::before { position: absolute; top: 26px; bottom: 0; left: 13px; width: 1px; background: var(--line); content: ""; }
.timeline-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: var(--mint-strong); background: rgba(110, 224, 180, .1); font-size: 11px; z-index: 1; }
.timeline-icon.amber { color: var(--amber); background: rgba(242, 196, 119, .1); }
.timeline-icon.red { color: var(--red); background: rgba(255, 139, 145, .1); }
.timeline-event strong { color: var(--muted-strong); font-size: 11px; font-weight: 650; }
.timeline-event p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.timeline-event time { color: #6d7a82; font-size: 9px; white-space: nowrap; }
.risk-card { display: flex; flex-direction: column; }
.risk-score { display: flex; align-items: baseline; gap: 3px; color: var(--muted); }
.risk-score strong { color: var(--mint); font-size: 28px; font-weight: 600; letter-spacing: -.08em; }
.risk-meter { height: 7px; margin: 25px 0 12px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.risk-meter span { display: block; width: 12%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint-strong), #b4e7a8); transition: width .35s ease, background .35s ease; }
.risk-status { display: flex; align-items: center; gap: 8px; color: var(--mint-strong); font-size: 10px; }
.risk-card > p { margin: 17px 0 24px; color: var(--muted); font-size: 10px; line-height: 1.65; }

.footer { display: flex; justify-content: space-between; gap: 20px; padding: 26px 3px 0; color: #65727c; font-size: 9px; }
.footer b { margin: 0 5px; color: #44515b; }
.footer-lock { color: var(--mint-strong); }

.mobile-overlay { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(3, 7, 12, .72); backdrop-filter: blur(8px); }
.modal { position: fixed; inset: 0; z-index: 21; display: grid; place-items: center; padding: 20px; overflow: auto; }
.modal-card { position: relative; width: min(100%, 560px); padding: 28px; border: 1px solid var(--line-strong); border-radius: 24px; background: #182230; box-shadow: 0 28px 100px rgba(0, 0, 0, .48); animation: modal-in .2s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, .04); font-size: 19px; line-height: 1; }
.modal-close:hover { color: var(--ink); background: rgba(255, 255, 255, .09); }
.modal-kicker { color: var(--mint-strong); font-size: 10px; font-weight: 700; }
.modal-card h2 { margin: 8px 0 8px; color: var(--ink); font-size: 25px; font-weight: 650; letter-spacing: -.06em; }
.modal-intro { max-width: 440px; margin-bottom: 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 155px; padding: 20px; border: 1px dashed rgba(181, 240, 211, .27); border-radius: 16px; color: var(--muted); background: rgba(110, 224, 180, .04); text-align: center; transition: .2s ease; }
.dropzone:hover, .dropzone.drag-over { border-color: var(--mint); background: rgba(110, 224, 180, .09); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-symbol { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 9px; border-radius: 10px; color: var(--mint); background: rgba(110, 224, 180, .11); font-size: 19px; }
.dropzone strong { color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.dropzone > span:not(.upload-symbol):not(.browse-link) { margin-top: 5px; font-size: 9px; }
.browse-link { margin-top: 11px; color: var(--mint); font-size: 10px; font-weight: 750; }
.ai-scan-preview { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.scan-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--mint); background: rgba(110, 224, 180, .1); }
.ai-scan-preview strong { display: block; color: var(--muted-strong); font-size: 10px; }
.ai-scan-preview p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.scan-status { margin-left: auto; color: var(--mint-strong); font-size: 9px; font-weight: 700; }
.modal-footer-actions { justify-content: flex-end; gap: 7px; margin-top: 20px; }

.viewer-topline { justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.secure-badge { color: var(--mint); }
.viewer-timer { color: var(--amber); font-size: 10px; }
.viewer-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: center; }
.document-preview { position: relative; min-height: 265px; overflow: hidden; padding: 19px; border-radius: 10px; color: #30362d; background: #eee8da; box-shadow: 8px 12px 28px rgba(0, 0, 0, .19); transform: rotate(-2deg); }
.doc-preview-bar { display: flex; justify-content: space-between; align-items: center; }
.doc-redaction { display: block; width: 46px; height: 7px; border-radius: 4px; background: #a9af9c; }
.redaction-two { width: 29px; opacity: .7; }
.doc-preview-tag { padding: 3px 4px; color: #5a6e54; border: 1px solid #a7b8a0; font-size: 6px; font-weight: 800; letter-spacing: .11em; }
.doc-preview-lines { display: grid; gap: 8px; margin-top: 27px; }
.doc-preview-lines > span { display: block; width: 85%; height: 5px; border-radius: 4px; background: #c8c8b9; }
.doc-preview-lines > span.short { width: 57%; }
.doc-photo { width: 59px; height: 73px; margin: 7px 0 4px; border: 5px solid #d1d1bd; background: linear-gradient(145deg, #8da4a1, #4a6060); }
.preview-stamp { position: absolute; right: 7px; bottom: 20px; color: #a87b4a; border: 1px solid #cfab7d; padding: 4px 7px; font-size: 7px; font-weight: 800; letter-spacing: .1em; transform: rotate(-22deg); }
.viewer-copy h2 { margin-top: 8px; font-size: 22px; }
.viewer-copy > p { margin: 0 0 18px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.rule-list { display: grid; gap: 9px; padding-top: 13px; border-top: 1px solid var(--line); }
.rule-list > div, .print-rule { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.rule-list strong { margin-left: auto; color: var(--muted-strong); font-size: 9px; font-weight: 650; }
.rule-icon { display: grid; place-items: center; width: 17px; height: 17px; flex: 0 0 auto; border-radius: 6px; font-size: 10px; }
.rule-icon.ok { color: var(--mint-strong); background: rgba(110, 224, 180, .1); }
.viewer-actions { display: grid; gap: 6px; margin-top: 20px; }
.viewer-actions .button { width: 100%; min-height: 36px; font-size: 10px; }

.print-header { gap: 12px; }
.print-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(242, 196, 119, .2); border-radius: 12px; color: var(--amber); background: rgba(242, 196, 119, .1); font-size: 17px; }
.token-panel { display: flex; align-items: center; gap: 20px; margin: 24px 0 16px; padding: 20px; border: 1px solid rgba(181, 240, 211, .19); border-radius: 18px; background: linear-gradient(135deg, rgba(110, 224, 180, .11), rgba(18, 39, 41, .5)); }
.fake-qr { display: grid; grid-template-columns: repeat(5, 10px); grid-auto-rows: 10px; gap: 3px; width: 62px; height: 62px; padding: 7px; border: 1px solid rgba(181, 240, 211, .25); border-radius: 8px; background: rgba(234, 255, 245, .91); }
.fake-qr span { background: #20382f; }
.fake-qr span:nth-child(2n), .fake-qr span:nth-child(5n) { background: transparent; }
.fake-qr span:nth-child(3n) { background: #6ebd9b; }
.token-copy strong { display: block; margin: 4px 0 3px; color: var(--mint); font-size: 31px; font-weight: 650; letter-spacing: .07em; line-height: 1; }
.token-expiry { color: var(--amber); font-size: 10px; }
.print-rule { padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); line-height: 1.45; }
.token-panel.is-invalid { filter: saturate(.25); opacity: .72; }
.token-panel.is-invalid .token-copy strong { color: var(--red); text-decoration: line-through; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 9px; min-width: 230px; max-width: min(360px, calc(100vw - 44px)); padding: 12px 14px; border: 1px solid rgba(181, 240, 211, .2); border-radius: 12px; color: var(--muted-strong); background: #1b2a32; box-shadow: var(--shadow); font-size: 10px; transform: translateY(16px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast-icon { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; color: #123328; background: var(--mint); font-size: 11px; font-weight: 800; }

@media (max-width: 1100px) {
  .main-content { padding: 0 24px 22px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 295px; }
  .hero-visual { min-height: 250px; border-top: 1px solid var(--line); border-left: 0; }
  .ai-card { min-height: auto; }
  .content-grid, .activity-layout { grid-template-columns: 1fr; }
  .activity-card { min-height: 100%; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: min(280px, 86vw); transform: translateX(-101%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .32); }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-overlay { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(3, 7, 12, .65); opacity: 0; pointer-events: none; transition: .25s ease; }
  body.menu-open .mobile-overlay { opacity: 1; pointer-events: auto; }
  .main-content { padding: 0 16px 18px; }
  .topbar { min-height: 72px; }
  .mobile-menu { display: inline-block; }
  .topbar-button { display: none; }
  .prototype-pill { padding: 0 7px; font-size: 9px; }
  .view-stack { padding-top: 22px; }
  .hero-card { display: block; }
  .hero-copy { padding: 30px 24px 28px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-visual { min-height: 235px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 121px; }
  .section-row { margin-top: 27px; }
  .documents-card, .activity-card, .documents-page-card, .timeline-card, .risk-card { padding: 17px; }
  .table-wrap { display: none; }
  .mobile-doc-list { display: grid; gap: 8px; }
  .mobile-doc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
  .mobile-doc:first-child { border-top: 0; }
  .mobile-doc-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .mobile-doc-main .file-cell { min-width: 0; }
  .mobile-doc-main > div:last-child { min-width: 0; }
  .mobile-doc-main strong { display: block; overflow: hidden; color: var(--muted-strong); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-doc-main span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
  .mobile-doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
  .mobile-doc-side .row-action { padding: 0; }
  .impact-strip, .security-tip { align-items: flex-start; flex-wrap: wrap; }
  .impact-strip .button, .security-tip .button { margin-left: 36px; }
  .page-heading { display: block; }
  .page-heading .button { margin-top: 17px; }
  .documents-page-toolbar { display: block; }
  .search-box { width: 100%; }
  .toolbar-actions { margin-top: 10px; }
  .activity-summary-grid { grid-template-columns: 1fr; gap: 8px; }
  .summary-card { min-height: 95px; padding: 15px 17px; }
  .summary-card strong { margin: 8px 0 4px; }
  .page-heading h1 { font-size: 35px; }
  .footer { display: grid; gap: 5px; }
  .viewer-layout { grid-template-columns: 1fr; }
  .document-preview { width: 190px; min-height: 220px; margin: 0 auto; }
  .viewer-copy h2 { font-size: 19px; }
}

@media (max-width: 430px) {
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-copy h1 { font-size: 38px; }
  .ai-card { padding: 21px; }
  .token-panel { gap: 12px; padding: 14px; }
  .fake-qr { width: 52px; height: 52px; grid-template-columns: repeat(5, 8px); grid-auto-rows: 8px; gap: 2px; padding: 6px; }
  .token-copy strong { font-size: 25px; }
  .modal-card { padding: 23px 18px 18px; }
}
