/* Option Digitals Client Portal. One stylesheet; tokens match design-preview/render-portal-v2.py. */
:root {
  color-scheme: light;
  --ink: #17211b; --sub: #55645b; --muted: #617066; --line: #dce4de; --line-soft: #e8ede9;
  --canvas: #f1f4f1; --paper: #fff; --rail: #202522; --bar: #171b18; --rail-text: #e5ece7; --rail-muted: #a4b1a9;
  --green: #11864f; --green-deep: #0b7042; --green-soft: #e8f4ec; --green-tint: #f3faf5; --green-bright: #3fce8a;
  --blue: #2c5d91; --blue-soft: #eaf2fb; --amber: #925b0b; --amber-soft: #fff2d9; --red: #a53b3b; --red-soft: #fcebec;
  --dark-card: #202923; --dark-muted: #b8c9be;
  --rail-w: 260px; --bar-h: 72px; --radius: 14px; --radius-sm: 10px;
  --font: "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
#app { min-height: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 700; }
h3 { font-size: 15px; line-height: 1.35; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: var(--green-deep); }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg { display: block; width: 100%; height: 100%; }
.icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Frame */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--bar-h); display: flex; align-items: center; background: var(--bar); color: #fff; padding: 0 64px 0 20px; }
.brand-home { display: flex; align-items: center; gap: 12px; width: 266px; flex: none; color: #fff; text-align: left; }
.brand-mark { display: block; width: 36px; height: 36px; flex: none; }
.brand-name { font-size: 16.5px; font-weight: 700; line-height: 1.15; letter-spacing: .01em; }
.brand-sub { display: block; font-size: 10.5px; color: var(--rail-muted); line-height: 1.3; margin-top: 3px; letter-spacing: .03em; }
.crumb { flex: 1; min-width: 0; font-size: 13.5px; color: var(--rail-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb i { font-style: normal; color: var(--rail-muted); margin: 0 7px; }
.topbar-right { display: flex; align-items: center; gap: 28px; flex: none; }
.bell { position: relative; width: 24px; height: 24px; color: #fff; }
.count-dot { position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft); color: var(--green-deep); font-weight: 700; font-size: 14px; }
.avatar.sm { width: 38px; height: 38px; font-size: 12.5px; }
.avatar.client { background: var(--blue-soft); color: var(--blue); }
.account-wrap { position: relative; }
.account-menu { position: absolute; right: 0; top: 54px; width: 230px; padding: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(16, 24, 20, .18); }
.account-id { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.account-id strong { display: block; font-size: 14px; }
.account-id span { font-size: 12.5px; color: var(--sub); }
.account-menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.account-menu button:hover { background: var(--canvas); }

.sidebar { position: fixed; top: var(--bar-h); bottom: 0; left: 0; z-index: 30; width: var(--rail-w); display: flex; flex-direction: column; background: var(--rail); color: var(--rail-text); }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 12px 12px; scrollbar-width: thin; scrollbar-color: #3a443e transparent; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-heading { padding: 0 12px 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--rail-muted); }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 39px; margin-bottom: 4px; padding: 0 14px; border-radius: var(--radius-sm); color: var(--rail-text); font-size: 13.5px; text-align: left; }
.nav-link:hover { background: #2a312d; }
.nav-link.active { background: #323c36; color: #fff; font-weight: 700; }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 4px; background: var(--green-bright); }
.nav-link.active .icon { color: var(--green-bright); }
.nav-link .nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.sidebar-foot { padding: 0 20px 16px; }
.secure-note { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; padding: 16px 4px 14px; border-top: 1px solid #3a443e; }
.secure-note .icon { color: var(--green-bright); margin-top: 1px; }
.secure-note strong { font-size: 12.5px; color: #fff; }
.secure-note span:last-child { grid-column: 1 / -1; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--rail-muted); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 2px 4px; }
.sidebar-user strong { display: block; font-size: 12.5px; color: #fff; line-height: 1.3; }
.sidebar-user span.role { display: block; font-size: 11px; color: var(--rail-muted); }

.main { min-height: 100vh; margin-left: var(--rail-w); padding: calc(var(--bar-h) + 32px) 50px 48px 40px; }
.page { display: grid; gap: 16px; max-width: 1540px; }

/* Shared parts */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.page-head p { color: var(--sub); margin-top: 3px; }
.page-head .actions { display: flex; align-items: center; gap: 10px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; white-space: nowrap; border: 1px solid transparent; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--green-tint); border-color: #c9d6cd; }
.btn-dark { background: var(--bar); color: #fff; }
.btn-danger { background: #fff; border-color: #eccbcb; color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.link { color: var(--green-deep); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.panel-head p { color: var(--sub); font-size: 13px; margin-top: 2px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--canvas); color: var(--sub); }
.pill.green { background: var(--green-soft); color: var(--green-deep); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 0; }
.stats.cols-2 { --cols: 2; } .stats.cols-3 { --cols: 3; } .stats.cols-4 { --cols: 4; }
.stat { display: block; width: 100%; padding: 2px 20px; text-align: left; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .k { display: block; font-size: 12px; font-weight: 700; color: var(--sub); }
.stat .v { display: block; font-size: 23px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.stat .v.green { color: var(--green-deep); } .stat .v.amber { color: var(--amber); } .stat .v.red { color: var(--red); }
.stat .f { display: block; font-size: 11.5px; color: var(--sub); }
button.stat:hover .k { color: var(--green-deep); }
.empty { padding: 34px 20px; text-align: center; color: var(--sub); }
.empty .icon { width: 30px; height: 30px; margin: 0 auto 10px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 3px; }
.empty p { max-width: 420px; margin: 0 auto 12px; font-size: 13.5px; }
.inline-error { padding: 12px 14px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 13.5px; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--green-tint); border: 1px solid var(--line); color: var(--sub); font-size: 13.5px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search { position: relative; flex: 1 1 280px; min-width: 200px; }
.search input { width: 100%; height: 43px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: 14.5px; }
.search input::placeholder { color: var(--muted); }
.select { position: relative; display: inline-block; flex: none; }
.select select { appearance: none; height: 43px; padding: 0 34px 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-weight: 700; font-size: 14px; max-width: 240px; }
.select::after { content: ""; position: absolute; right: 14px; top: 16px; width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; color: var(--sub); font-size: 12.5px; }
.pager-controls { display: flex; align-items: center; gap: 6px; }
.pager-controls button { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--ink); font-size: 12.5px; }
.pager-controls button:hover:not(:disabled) { background: var(--canvas); }
.pager-controls button.active { background: var(--green-soft); color: var(--green-deep); font-weight: 700; }

/* Forms */
.field { display: grid; gap: 4px; margin-bottom: 11px; min-width: 0; }
.field > label, .field > legend, .field-label { font-size: 11.5px; font-weight: 700; color: var(--sub); text-transform: uppercase; letter-spacing: .01em; }
.field input, .field select, .field textarea { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: 14.5px; }
.field textarea { min-height: 100px; resize: vertical; }
.field small { color: var(--sub); font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field input[type="datetime-local"] { min-width: 0; padding: 8px 6px 8px 10px; font-size: 12.5px; }
#ticket-progress-form .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
fieldset.field { border: 0; padding: 0; margin: 0 0 11px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--green); }
.form-error { padding: 10px 12px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 13.5px; margin-bottom: 12px; }

.mt-0 { margin-top: 0; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mb-11 { margin-bottom: 11px; } .mb-12 { margin-bottom: 12px; } .mb-14 { margin-bottom: 14px; } .mb-16 { margin-bottom: 16px; } .m-0 { margin: 0; }
.loading.short { min-height: 300px; }
.contact.bare { border: 0; padding: 0; }
.load-row.two { grid-template-columns: minmax(0, 1fr) 90px; }
.field textarea.tall { min-height: 170px; }

/* Stage tracker */
.progress-card { padding: 16px 20px 18px; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; }
.eyebrow { font-size: 11.5px; font-weight: 700; color: var(--sub); text-transform: uppercase; letter-spacing: .01em; }
.progress-count { font-size: 13px; font-weight: 700; color: var(--green-deep); }
.stages { position: relative; display: flex; justify-content: space-between; padding: 8px 22px 0; }
.stages::before, .stages .fill { content: ""; position: absolute; top: 17px; left: 42px; height: 5px; border-radius: 3px; }
.stages::before { right: 42px; background: #dfe7e1; }
.stages .fill { background: var(--green); width: calc((100% - 84px) * var(--p, 0)); }
.stage { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; width: 40px; }
.stage-dot { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 2px solid #b8c4bb; color: #fff; }
.stage-dot .icon { width: 12px; height: 12px; }
.stage.done .stage-dot { background: var(--green); border-color: var(--green); }
.stage.current .stage-dot { border-color: var(--green); background: #fff; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 9px var(--green); }
.stage-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.stage-break { display: none; }
.hero-stage > span { text-align: center; }
.hero-stage:first-child > span { text-align: left; } .hero-stage:last-child > span { text-align: right; }
@media (max-width: 1000px) { .stage-break { display: inline; } }
.stage.done .stage-label { color: var(--green-deep); }
.stage.current .stage-label { color: var(--green-deep); font-weight: 700; }

/* Request page */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); font-weight: 700; font-size: 14px; }
.back .icon { width: 13px; height: 13px; }
.request-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.request-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 3px; color: var(--sub); font-size: 13px; }
.request-meta .num { color: var(--green-deep); font-weight: 700; font-size: 14px; margin-right: 26px; }
.request-head-side { display: flex; align-items: center; gap: 12px; flex: none; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.fact { padding: 2px 18px; min-width: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact dt { font-size: 11px; font-weight: 700; color: var(--sub); text-transform: uppercase; }
.fact dd { margin-top: 6px; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-grid { display: grid; grid-template-columns: minmax(0, 1fr) 381px; gap: 19px; align-items: start; }
.request-side { display: grid; gap: 16px; min-width: 0; }
.convo { padding: 18px 19px 19px; }
.convo-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 4px 12px; gap: 12px; }
.convo-head p { color: var(--sub); font-size: 12.5px; margin-top: 1px; }
.convo-side { display: flex; align-items: center; gap: 12px; }
.thread { display: grid; gap: 13px; }
.email { border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: #fff; min-width: 0; }
.email.internal { background: #fffaf0; border-color: #f0e2c2; }
.email-head { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; column-gap: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); margin-left: 0; }
.email-head .avatar { width: 40px; height: 40px; font-size: 13px; }
.email-from strong { display: block; font-size: 15px; line-height: 1.3; }
.email-from span { display: block; font-size: 12px; color: var(--sub); }
.email-time { font-size: 12px; color: var(--sub); white-space: nowrap; align-self: start; padding-top: 2px; }
.email-body { padding: 11px 0 0 50px; min-width: 0; }
.email-subject { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; overflow-wrap: anywhere; }
.email-text { color: #3d4a42; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.email-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 31px; max-width: 100%; padding: 3px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--green-tint); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 700; }
.file-chip .icon { width: 15px; height: 15px; color: var(--green-deep); }
.file-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { margin-left: 18px; color: var(--sub); font-weight: 400; font-size: 11px; white-space: nowrap; }
.email-state { margin-top: 8px; color: var(--muted); font-size: 11.5px; }

/* Composer */
.composer { border: 1px solid var(--line); border-radius: 12px; padding: 12px 17px 13px; background: #fff; margin-top: 10px; }
.composer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.composer-top strong { font-size: 14px; }
.composer-tabs { display: flex; gap: 10px; }
.composer-tabs button { height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; color: var(--sub); }
.composer-tabs button.active { background: var(--green-soft); color: var(--green-deep); }
.composer-to { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); min-width: 0; }
.composer-to select { border: 0; background: transparent; font-size: 12px; color: var(--ink); font-weight: 700; max-width: 220px; padding: 0 2px; }
.composer-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--sub); }
.composer-line input { flex: 1; min-width: 0; border: 0; padding: 2px 0; background: transparent; font-size: 13px; color: var(--ink); }
.composer textarea { display: block; width: 100%; min-height: 62px; padding: 9px 0 4px; border: 0; resize: none; background: transparent; font-size: 14px; line-height: 1.5; transition: min-height .15s; }
.composer textarea:focus { outline: 0; min-height: 190px; }
.composer.has-text textarea { min-height: 190px; }
.composer input:focus, .composer select:focus { outline: 0; }
.composer-sign { color: var(--muted); font-size: 12.5px; white-space: pre-line; padding-bottom: 6px; }
.composer.internal-mode { background: #fffaf0; border-color: #f0e2c2; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.attach { position: relative; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12.5px; cursor: pointer; }
.attach .icon { width: 17px; height: 17px; }
.attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.attach.disabled { color: var(--muted); cursor: not-allowed; }
.staff-client { padding: 8px 0; border-top: 1px solid var(--line); }
.staff-brands { display: grid; gap: 2px; padding-left: 28px; }
.attach-note { margin: 0 0 10px; color: var(--sub); font-size: 12px; line-height: 1.45; }
.tip { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; width: 270px; padding: 9px 11px; border-radius: 9px; background: var(--bar); color: #fff; font-size: 12px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .12s; }
.attach:hover .tip, .attach:focus-within .tip { opacity: 1; }
.draft-files { display: grid; gap: 6px; padding: 6px 0; }
.draft-files:empty { display: none; }
.draft-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--green-tint); font-size: 12.5px; }
.draft-file button { font-size: 16px; color: var(--sub); width: 22px; height: 22px; }

/* Side panels */
.kv { display: grid; gap: 11px; }
.kv > div { display: grid; grid-template-columns: 142px minmax(0, 1fr); align-items: baseline; font-size: 12.5px; }
.kv dt { color: var(--sub); font-size: 11.5px; }
.kv dd { font-weight: 700; overflow-wrap: anywhere; }
.timeline { position: relative; display: grid; gap: 14px; }
.timeline li { position: relative; padding-left: 28px; min-width: 0; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 3px; width: 13px; height: 13px; border-radius: 50%; background: #a9b6ad; }
.timeline li:first-child::before { background: var(--green); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 19px; bottom: -13px; width: 1.5px; background: #cdd6cf; }
.timeline strong { display: block; font-size: 13.5px; }
.timeline time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.timeline p { font-size: 12.5px; color: var(--sub); margin-top: 2px; overflow-wrap: anywhere; }
.side-foot { margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.side-next { padding: 10px 12px; background: var(--green-tint); border-radius: 10px; margin-bottom: 14px; }
.side-next span { display: block; font-size: 11px; font-weight: 700; color: var(--sub); text-transform: uppercase; }
.side-next strong { font-size: 13.5px; }
.mobile-tabs, .side-files { display: none; }

/* Messages */
.tabs { display: flex; gap: 10px; }
.tab { height: 37px; padding: 0 24px; border-radius: var(--radius-sm); background: #e4eae5; color: var(--sub); font-weight: 700; font-size: 13px; }
.tab.active { background: var(--bar); color: #fff; }
.inbox { display: grid; grid-template-columns: 520px minmax(0, 1fr); gap: 18px; align-items: start; }
.inbox-list { padding: 18px 8px 8px; min-height: 640px; }
.inbox-list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 14px 10px; }
.inbox-list-head span { font-size: 11.5px; color: var(--sub); }
.mrow { display: grid; grid-template-columns: 14px 54px minmax(0, 1fr); width: 100%; padding: 8px 14px 8px 12px; text-align: left; border-radius: 12px; align-items: start; }
.mrow + .mrow { box-shadow: 0 -1px 0 var(--line-soft); }
.mrow:hover { background: var(--green-tint); }
.mrow.active { background: var(--green-soft); box-shadow: none; }
.mrow.active .avatar { background: #fff; }
.mrow .dot { width: 11px; height: 11px; margin-top: 16px; border-radius: 50%; background: transparent; }
.mrow.unread .dot { background: var(--green); }
.mrow .avatar { margin: 4px 0 0 8px; width: 38px; height: 38px; font-size: 12px; }
.mrow-main { min-width: 0; }
.mrow-top { display: flex; justify-content: space-between; gap: 10px; }
.mrow-top strong { font-size: 12.5px; }
.mrow-top time { font-size: 11px; color: var(--sub); white-space: nowrap; }
.mrow-subject { display: block; font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow.unread .mrow-subject { font-weight: 700; }
.mrow-preview { display: block; font-size: 11.5px; color: var(--sub); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-ticket { display: block; font-size: 11px; font-weight: 700; color: var(--green-deep); margin-top: 6px; }
.reader { padding: 20px 24px 22px; min-height: 640px; }
.reader-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.reader-head h2 { font-size: 20px; overflow-wrap: anywhere; }
.reader-head p { font-size: 12.5px; color: var(--sub); margin-top: 2px; }
.reader-side { display: flex; align-items: center; gap: 10px; flex: none; }
.linked { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; padding: 10px 16px; border-radius: 10px; background: var(--green-soft); }
.linked span { display: block; font-size: 10.5px; font-weight: 700; color: var(--sub); text-transform: uppercase; }
.linked strong { display: block; font-size: 13px; color: var(--green-deep); overflow-wrap: anywhere; }
.reader-mail { display: grid; gap: 10px; }
.mail { padding-bottom: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.mail-lines { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; font-size: 12px; color: var(--sub); }
.mail-lines b { font-weight: 400; color: var(--ink); }
.mail-text { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; color: #3d4a42; font-size: 14px; line-height: 1.5; }
.mail-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.file-card { display: flex; align-items: center; gap: 10px; width: 354px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--ink); }
.file-card .ext { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: var(--red-soft); color: var(--red); font-size: 10.5px; font-weight: 700; flex: none; }
.file-card strong { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card small { font-size: 11px; color: var(--sub); }
.file-card > span:last-child { min-width: 0; }
.mail-collapsed { padding: 9px 0; border-bottom: 1px solid var(--line-soft); width: 100%; text-align: left; display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; font-size: 12.5px; color: var(--sub); }
.mail-collapsed strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-collapsed span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader .composer { margin-top: 8px; }
.reader-reply-title { margin-top: 16px; font-size: 14px; font-weight: 700; }

/* Lists */
.row-list > * + * { border-top: 1px solid var(--line-soft); }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px 90px; align-items: center; gap: 12px; width: 100%; padding: 12px 12px; text-align: left; border-radius: 10px; }
.req-row:hover { background: var(--green-tint); }
.req-row.active { background: var(--green-soft); }
.req-num { font-size: 11.5px; font-weight: 700; color: var(--sub); }
.new-pill { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 9px; background: var(--green); color: #fff; font-size: 10.5px; line-height: 16px; }
.nav-link .count-dot { position: static; margin-left: auto; }
.mobile-tab { position: relative; }
.mobile-tab .count-dot { top: 4px; right: calc(50% - 22px); }
.req-row strong { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row small { display: block; color: var(--sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row .who { color: var(--sub); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row time { color: var(--sub); font-size: 12px; text-align: right; white-space: nowrap; }
.upd-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 88px; gap: 12px; width: 100%; padding: 11px 0; text-align: left; align-items: start; }
.upd-row > span:first-child { min-width: 0; }
.upd-row strong { display: block; font-size: 14.5px; }
.upd-row b { display: block; font-size: 13px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-row span.snip { display: block; font-size: 12.5px; color: var(--sub); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-row .num { display: block; font-size: 11px; font-weight: 700; color: var(--green-deep); }
.upd-row time { font-size: 12px; color: var(--sub); text-align: right; padding-top: 36px; }
.upd-row:hover strong { color: var(--green-deep); }

/* Overview */
.hero { position: relative; padding: 22px 24px 18px; background: var(--dark-card); color: #fff; border-radius: var(--radius); }
.hero-kicker { font-size: 11.5px; font-weight: 700; color: #a7dcba; text-transform: uppercase; }
.hero h2 { font-size: 26px; margin-top: 8px; }
.hero p { color: #dbe5de; font-size: 14px; margin-top: 8px; max-width: 780px; }
.hero-stat { position: absolute; top: 20px; right: 82px; }
.hero-stat strong { display: block; font-size: 25px; line-height: 1.2; color: #4fd08f; }
.hero-stat span { font-size: 12px; color: var(--dark-muted); }
.hero-bar { position: relative; height: 9px; margin-top: 16px; background: #3e4a42; border-radius: 5px; overflow: hidden; }
.hero-bar i { position: absolute; inset: 0 auto 0 0; background: #2eb872; border-radius: 5px; }
.hero-stages { display: flex; justify-content: space-between; margin-top: 10px; }
.hero-stage { display: grid; justify-items: center; gap: 5px; width: 76px; font-size: 12px; color: #cfdad3; }
.hero-stage:first-child { justify-items: start; } .hero-stage:last-child { justify-items: end; }
.hero-stage i { width: 11px; height: 11px; border-radius: 50%; background: #5b6a60; }
.hero-stage.done i { background: #a7dcba; } .hero-stage.current { color: #fff; font-weight: 700; }
.hero-stage.current i { background: #a7dcba; box-shadow: 0 0 0 3px rgba(167, 220, 186, .25); }
.hero-actions { margin-top: 14px; }
.btn-hero { background: rgba(255, 255, 255, .1); color: #fff; }
.over-grid { display: grid; grid-template-columns: minmax(0, 1fr) 418px; gap: 17px; align-items: start; }
.side-stack { display: grid; gap: 18px; }
.contact { display: flex; align-items: center; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact strong { display: block; font-size: 15px; }
.contact span { font-size: 12.5px; color: var(--green-deep); }
.contact-note { color: var(--sub); font-size: 13.5px; margin: 14px 0 10px; }
.checkin { display: flex; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.checkin .icon { color: var(--green-deep); margin-top: 2px; }
.checkin strong { display: block; font-size: 14.5px; }
.checkin span { font-size: 13px; color: var(--sub); }
.foot-note { font-size: 12.5px; color: var(--sub); margin-top: 12px; }
.ops-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.ops-low { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: stretch; }
.sel-num { font-size: 12.5px; font-weight: 700; color: var(--sub); }
.sel-title { font-size: 24px; font-weight: 700; margin: 8px 0 12px; line-height: 1.25; }
.sel-meta { font-size: 13px; color: var(--sub); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sel-facts { display: flex; gap: 62px; margin: 14px 0; }
.sel-facts dt { font-size: 11px; font-weight: 700; color: var(--sub); text-transform: uppercase; }
.sel-facts dd { margin-top: 6px; font-weight: 700; }
.int-note { padding: 12px 16px; border-radius: 10px; background: #edf2ee; margin-bottom: 16px; }
.int-note span { display: block; font-size: 11px; font-weight: 700; color: var(--sub); text-transform: uppercase; }
.int-note p { font-size: 13.5px; color: var(--sub); margin-top: 3px; overflow-wrap: anywhere; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.del-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; width: 100%; text-align: left; }
.del-row .icon { color: var(--green-deep); }
.del-row > span:nth-child(2) { min-width: 0; }
.del-row strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.del-row small { font-size: 12px; color: var(--sub); }
.load-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; align-items: baseline; font-size: 13px; padding-top: 6px; }
.load-row strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-row span { color: var(--sub); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-row em { font-style: normal; text-align: right; color: var(--sub); font-size: 12.5px; }
.bar { height: 7px; margin: 7px 0 10px; background: #e3e9e4; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 4px; }

/* Organisations */
.org-row { display: grid; grid-template-columns: minmax(0, 1fr) 184px 254px 164px 130px 30px; gap: 8px; align-items: center; min-height: 92px; padding: 10px 0; }
.org-row > div { min-width: 0; }
.org-row strong.name { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-row small { display: block; color: var(--sub); font-size: 12px; }
.org-col .k { display: block; font-size: 10.5px; font-weight: 700; color: var(--sub); text-transform: uppercase; }
.org-col .v { display: block; font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-col .v.b { font-weight: 700; }
.org-note { font-size: 12px; color: var(--sub); }
.org-open { width: 30px; height: 30px; padding: 5px; color: var(--green-deep); }

/* Deliverables */
.deliv { display: grid; grid-template-columns: 490px minmax(0, 1fr); gap: 19px; align-items: start; }
.deliv-list { min-height: 640px; }
.d-row { display: grid; grid-template-columns: 53px minmax(0, 1fr); width: 100%; padding: 10px 12px; text-align: left; border: 1px solid transparent; border-radius: 12px; }
.d-row > span:last-child { min-width: 0; }
.d-row + .d-row { box-shadow: 0 -1px 0 var(--line-soft); }
.d-row.active { background: var(--green-tint); border-color: var(--green); box-shadow: none; }
.d-icon { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); }
.d-icon.blue { background: var(--blue-soft); color: var(--blue); } .d-icon.green { background: var(--green-soft); color: var(--green-deep); }
.d-icon .icon { width: 20px; height: 20px; }
.d-row strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-row small { display: block; font-size: 11.5px; color: var(--sub); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-row .pill { margin-top: 7px; }
.preview-box { margin: 14px 0 16px; padding: 22px; border-radius: 12px; background: #edf2ee; }
.preview-sheet { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.preview-slide { padding: 20px 22px 24px; border-radius: 6px; background: var(--dark-card); color: #fff; text-align: center; }
.preview-slide .k { display: block; text-align: left; font-size: 10.5px; font-weight: 700; color: #4fd08f; text-transform: uppercase; }
.preview-slide strong { display: block; margin-top: 14px; font-size: 22px; overflow-wrap: anywhere; }
.preview-slide span.s { display: block; margin-top: 6px; font-size: 12.5px; color: var(--dark-muted); }
.review-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-label { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 7px; font-size: 14px; font-weight: 700; }
.hist-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; color: var(--sub); }
.hist-row time { font-size: 11.5px; white-space: nowrap; }

/* Cards and lists */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.proj { display: grid; gap: 10px; align-content: start; }
.proj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.proj-top small { display: block; font-size: 12.5px; color: var(--sub); }
.proj-pct { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--sub); }
.proj-pct strong { color: var(--green-deep); }
.meet { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; }
.date-tile { display: grid; justify-items: center; align-content: center; width: 58px; height: 62px; border-radius: 10px; background: var(--green-soft); color: var(--green-deep); }
.date-tile b { font-size: 11px; text-transform: uppercase; } .date-tile strong { font-size: 21px; line-height: 1.1; }
.meet.past .date-tile { background: var(--canvas); color: var(--sub); }
.meet strong { display: block; font-size: 14.5px; }
.meet small { display: block; color: var(--sub); font-size: 12.5px; }
.doc-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; color: var(--ink); text-decoration: none; }
.doc-row > span:nth-child(2) { min-width: 0; }
.doc-row strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row small { color: var(--sub); font-size: 12.5px; }
.member { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; }
.member strong { display: block; font-size: 14px; }
.member small { color: var(--sub); font-size: 12.5px; overflow-wrap: anywhere; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; color: var(--sub); text-transform: uppercase; padding: 6px 10px 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
/* position: relative keeps hidden screen-reader labels inside the scroll box, so a wide table never widens the page. */
.table-wrap { overflow-x: auto; position: relative; }
/* A long link or word in a privacy request wraps instead of pushing the Status column off screen. */
.privacy-details { min-width: 18ch; max-width: 46ch; max-height: 12em; overflow-y: auto; overflow-wrap: anywhere; color: var(--sub); }
.notif { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; width: 100%; padding: 11px 0; text-align: left; }
.notif i { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; }
.notif.unread i { background: var(--green); }
.notif strong { display: block; font-size: 14px; } .notif small { display: block; color: var(--sub); font-size: 12.5px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.policy { padding-bottom: 14px; }
.policy-copy { max-height: 240px; overflow: auto; padding: 12px; margin: 8px 0; background: var(--canvas); border-radius: 9px; white-space: pre-wrap; font-size: 13.5px; }

/* Modal, menu, toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; overflow: auto; background: rgba(16, 24, 20, .5); }
.modal { width: min(600px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: var(--radius); padding: 22px 24px; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.modal-head p { color: var(--sub); font-size: 13.5px; margin-top: 2px; }
.modal-close { font-size: 22px; line-height: 1; width: 30px; height: 30px; color: var(--sub); flex: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(16, 24, 20, .16); }
.menu button { display: block; width: 100%; padding: 9px 10px; text-align: left; font-size: 14px; border-radius: 8px; }
.menu button:hover { background: var(--canvas); }
#toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 90; }
.toast { display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 12px 14px; border-radius: 10px; background: var(--bar); color: #fff; font-size: 14px; box-shadow: 0 10px 28px rgba(16, 24, 20, .28); }
.toast.error { background: var(--red); }
.toast button { color: #fff; font-size: 18px; line-height: 1; }
.loading { display: grid; place-items: center; min-height: 100vh; color: var(--sub); text-align: center; }
.spinner { width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sidebar dropdown */
.nav-drop-head { position: relative; }
.nav-drop-head .nav-link { padding-right: 40px; }
.nav-toggle { position: absolute; top: 0; right: 2px; display: grid; place-items: center; width: 36px; height: 39px; border-radius: var(--radius-sm); color: var(--rail-text); }
.nav-toggle:hover { background: #38423c; }
.nav-chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: .8; }
.nav-drop.open .nav-chev { transform: rotate(45deg); margin-top: -3px; }
.nav-sub { margin: 0 0 6px 22px; padding-left: 8px; border-left: 1px solid #3a443e; }
.nav-sub .nav-link { height: 35px; margin-bottom: 2px; padding: 0 10px; font-size: 13.5px; }

/* Brands */
.brand-tile { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--green-soft); color: var(--green-deep); font-weight: 700; font-size: 14px; overflow: hidden; }
.brand-tile.has-logo { background: #fff; border: 1px solid var(--line); }
.brand-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-pick { display: flex; align-items: center; gap: 12px; }
.logo-pick small { display: block; margin-top: 5px; color: var(--sub); font-size: 12px; }
.field-label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--sub); }

/* Documents */
.doc-tools { align-items: flex-end; margin-bottom: 8px; }
.doc-filter { display: grid; gap: 4px; color: var(--sub); font-size: 11.5px; font-weight: 700; text-transform: uppercase; }
.doc-filter select { height: 43px; min-width: 128px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 400; text-transform: none; }
.doc-count { margin: 10px 0 6px; color: var(--sub); font-size: 13px; }
.doc-find { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; }
.doc-find small { display: block; overflow-wrap: anywhere; }
.doc-find small b { color: var(--ink); }
.doc-type { font-size: 10.5px; font-weight: 700; }

/* Upload progress */
.upload-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 120px; align-items: center; gap: 10px; margin-bottom: 6px; padding: 9px 10px; border-radius: var(--radius-sm); background: var(--green-soft); font-size: 13px; }
.upload-row progress { width: 100%; height: 6px; accent-color: var(--green); }
.upload-row .spinner { width: 16px; height: 16px; margin: 0; border-width: 2px; }

/* Sign in */
.auth { display: grid; grid-template-columns: minmax(320px, .92fr) 1.08fr; min-height: 100vh; background: var(--canvas); }
.auth-rail { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 68px); background: var(--ink); color: #fff; }
.auth-rail::after { content: ""; position: absolute; right: -130px; bottom: 11%; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.02); pointer-events: none; }
.auth-rail > * { position: relative; z-index: 1; }
.auth-rail .lockup { display: flex; align-items: center; gap: 12px; }
.auth-rail h1 { max-width: 480px; margin: 0 0 20px; font-size: clamp(34px, 4vw, 58px); font-weight: 600; line-height: 1.04; letter-spacing: -.055em; }
.auth-rail p { max-width: 390px; margin: 0; color: #b6c0b9; font-size: 15px; line-height: 1.75; }
.auth-rail small { color: #9da6a0; font-size: 12px; }
.auth-main { display: grid; place-items: center; padding: 36px 24px; }
.auth-card { width: min(100%, 450px); min-width: 0; padding: clamp(26px, 4vw, 44px); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 60px rgba(31,44,35,.07); }
.auth-card h2 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -.04em; }
.auth-card > h2 + p { margin: 10px 0 28px; color: var(--sub); font-size: 14px; line-height: 1.6; }
.auth-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--sub); font-size: 12px; line-height: 1.55; }
.auth-note i { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); }
.invited strong { overflow-wrap: anywhere; }
.auth-foot { overflow-wrap: anywhere; margin-top: 14px; color: var(--sub); font-size: 12.5px; }
.auth-link { display: inline-block; margin-top: 12px; }
.auth-main { align-content: center; gap: 20px; }
.auth-legal { width: min(100%, 450px); color: var(--sub); font-size: 12px; line-height: 1.6; text-align: center; }
.auth-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-bottom: 4px; }
.auth-legal nav a { display: inline-flex; align-items: center; min-height: 24px; }
.auth-legal p { margin: 0; overflow-wrap: anywhere; }
.legal-consent { margin: 2px 0 14px; color: var(--sub); font-size: 12.5px; line-height: 1.55; }
.invited { display: grid; gap: 2px; padding: 12px; background: var(--canvas); border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.invited span { color: var(--sub); }
.invite-box { display: grid; gap: 10px; }
.invite-box input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; }

.mobile-tabbar, .mobile-more, .mobile-next { display: none; }

/* Tablet */
@media (max-width: 1320px) {
  .request-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .inbox { grid-template-columns: 400px minmax(0, 1fr); }
  .deliv { grid-template-columns: 380px minmax(0, 1fr); }
  .over-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .org-row { grid-template-columns: minmax(0, 1fr) 120px 170px 120px 110px 30px; }
  .main { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 1080px) {
  :root { --rail-w: 220px; }
  .brand-home { width: 226px; }
  .request-grid, .over-grid, .ops-grid, .ops-low, .inbox, .deliv, .two-col { grid-template-columns: minmax(0, 1fr); }
  .inbox-list, .reader, .deliv-list { min-height: 0; }
  .org-row { grid-template-columns: minmax(0, 1fr) 150px 120px 30px; }
  .org-row .hide-sm { display: none; }
}
/* Phone */
@media (max-width: 760px) {
  :root { --bar-h: 69px; }
  h1 { font-size: 27px; }
  .topbar { padding: 0 16px; }
  .brand-home { width: auto; flex: 1; }
  .crumb, .account-wrap, .sidebar { display: none; }
  .main { margin-left: 0; padding: calc(var(--bar-h) + 18px) 16px 92px; }
  .page { gap: 13px; }
  .page-head { flex-direction: column; }
  .page-head .actions { width: 100%; flex-wrap: wrap; }
  .page-head .actions .btn { flex: 1; }
  .stats, .stats.cols-2, .stats.cols-3, .stats.cols-4 { grid-template-columns: minmax(0, 1fr); padding: 4px 0; }
  .stat { padding: 10px 16px; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .panel { padding: 16px; }
  .request-head { flex-direction: column; gap: 8px; }
  .request-meta .num { margin-right: 6px; }
  .progress-head .progress-count { display: none; }
  .stages { padding: 8px 6px 0; }
  .stages::before, .stages .fill { left: 22px; }
  .stages::before { right: 22px; }
  .stages .fill { width: calc((100% - 44px) * var(--p, 0)); }
  .request-grid[data-tab="files"] .side-files { display: block; }
  .stage-label { font-size: 11px; }
  .facts { display: none; }
  .mobile-next { display: block; margin-top: 12px; font-size: 13px; font-weight: 700; }
  .mobile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 2px solid var(--line); }
  .mobile-tabs button { padding: 10px 0; font-size: 13.5px; color: var(--sub); margin-bottom: -2px; border-bottom: 3px solid transparent; }
  .mobile-tabs button.active { color: var(--green-deep); font-weight: 700; border-bottom-color: var(--green); }
  .request-grid[data-tab="conversation"] .request-side { display: none; }
  .request-grid[data-tab="files"] .convo, .request-grid[data-tab="activity"] .convo { display: none; }
  .request-grid[data-tab="files"] .side-activity, .request-grid[data-tab="files"] .side-info, .request-grid[data-tab="activity"] .side-files { display: none; }
  .convo { padding: 0; background: transparent; border: 0; }
  .convo-head { display: none; }
  .email-head { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .email-body { padding-left: 0; }
  .composer-foot, .composer-top { flex-wrap: wrap; }
  .composer-top > span, .composer-to { max-width: 100%; }
  .composer-to select { max-width: 240px; }
  .req-row { grid-template-columns: minmax(0, 1fr) auto; }
  .req-row .who, .req-row time { display: none; }
  .upd-row { grid-template-columns: minmax(0, 1fr) auto; }
  .upd-row time { display: none; }
  .hero-stat { position: static; margin-top: 10px; }
  .hero-stage { width: auto; font-size: 10.5px; }
  .org-row { grid-template-columns: minmax(0, 1fr) auto 30px; min-height: 0; padding: 12px 0; }
  .org-row .brand-col { display: none; }
  .field-row, .review-btns { grid-template-columns: 1fr; }
  .meet { grid-template-columns: 58px minmax(0, 1fr); }
  .meet .btn-row { grid-column: 1 / -1; }
  .member { grid-template-columns: 50px minmax(0, 1fr); }
  .member .pill, .member .link { grid-column: 2; justify-self: start; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .mail-collapsed { grid-template-columns: 110px minmax(0, 1fr); }
  .mail-collapsed time { display: none; }
  .reader-head { flex-direction: column; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 0 8px; }
  .search { flex-basis: 100%; }
  .select, .select select { max-width: 100%; }
  .mobile-tabbar { position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); height: 62px; background: var(--bar); }
  .mobile-tab { display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--rail-text); font-size: 11px; }
  .mobile-tab .icon { width: 20px; height: 20px; }
  .mobile-tab.active { color: var(--green-bright); font-weight: 700; }
  .mobile-more { position: fixed; inset: auto 0 62px 0; z-index: 49; display: block; max-height: 70vh; overflow: auto; padding: 12px; background: var(--rail); color: var(--rail-text); border-radius: 14px 14px 0 0; }
  .stage-label { line-height: 1.2; text-align: center; }
  .doc-find { grid-template-columns: 44px minmax(0, 1fr); }
  .doc-find .pill, .doc-find .btn-row { grid-column: 2; justify-self: start; }
  .doc-filter, .doc-filter select { width: 100%; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-rail { min-height: 215px; padding: 24px; }
  .auth-rail h1 { max-width: 420px; margin: 32px 0 4px; font-size: 35px; }
  .auth-rail p, .auth-rail small { display: none; }
  .auth-main { align-items: start; padding: 18px 15px 34px; }
  .auth-card { padding: 25px 22px; }
  #toast-root { left: 12px; right: 12px; bottom: 74px; }
}
@media print { .sidebar, .topbar, .mobile-tabbar { display: none; } .main { margin: 0; padding: 0; } }
@media (max-width: 350px) { .stage-label { font-size: 10px; } .stage.current .stage-label { font-weight: 500; } .stages { padding-left: 4px; padding-right: 4px; } }
