/* UnveilPage dashboard. Same language as unveilpage.com: Manrope + DM Sans, navy actions,
   warm off-white canvas, sage surfaces, green accents, thin borders.
   No inline styles anywhere (the CSP forbids them); widths that depend on data are set via CSSOM. */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/dm-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/dm-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f8f9f5;
  --white: #fff;
  --navy: #092842;
  --navy-hover: #1a4a5d;
  --ink: #183c40;
  --green: #007e65;
  --mint: #eaf3e8;
  --sage: #f2f6ec;
  --line: #e1e7de;
  --line-soft: #edf1e7;
  --muted: #7b8981;
  --soft: #8c9b80;
  --amber-bg: #fbf3e7; --amber: #9a7a40; --amber-line: #f1e4cd;
  --red-bg: #fbeeea; --red: #a65a43; --red-line: #f1d8cf;
  --blue-bg: #edf3f4; --blue: #5f8a8e; --blue-line: #dce8e9;
  --sidebar: 230px;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13px/1.6 'DM Sans', system-ui, sans-serif; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a, button, input, select, textarea, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--green); }
.sprite { display: none; }
svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1 { font: 500 32px/1.2 Manrope, sans-serif; letter-spacing: -1.3px; margin: 0 0 10px; }
h2 { font: 600 15px/1.35 Manrope, sans-serif; margin: 0; letter-spacing: -.35px; }
h3 { font-family: Manrope, sans-serif; margin: 0; }
p { margin: 0; }
em { font-style: normal; color: var(--soft); font-weight: 400; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }
.flex1 { flex: 1; min-width: 0; }
.right { text-align: right; }
.mt-8 { margin-top: 8px; }
.section-gap { margin-top: 24px; }
.skip { position: fixed; top: -100px; left: 12px; background: #fff; padding: 12px; z-index: 100; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- shell */
.sidebar { width: var(--sidebar); position: fixed; left: 0; top: 0; bottom: 0; background: #fff; border-right: 1px solid var(--line); padding: 25px 19px 0; display: flex; flex-direction: column; z-index: 30; overflow-y: auto; }
.brand { display: block; width: 157px; margin: 0 8px 24px; flex: none; }
.brand img { display: block; width: 100%; height: auto; }
.ws-switch { position: relative; margin: 0 0 25px; }
.workspace { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fbfcf9; border-radius: 7px; width: 100%; text-align: left; padding: 11px; }
.workspace:hover { background: #f4f7f1; }
.workspace > span:nth-child(2) { min-width: 0; flex: 1; }
.workspace-icon { width: 29px; height: 29px; background: #e1ebdc; color: #52704a; border: 1px solid #d2dfcb; border-radius: 6px; display: flex; align-items: center; justify-content: center; font: 600 14px Manrope, sans-serif; flex: none; }
.workspace strong { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace small { font-size: 11px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron { margin-left: auto; color: var(--muted); }
.chevron svg { width: 14px; height: 14px; }
.ws-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 14px 40px #0d2e3418; padding: 6px; z-index: 5; display: grid; gap: 2px; }
.ws-menu button, .ws-menu a { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 9px; border-radius: 5px; font-size: 12px; color: #4f6656; }
.ws-menu button:hover, .ws-menu a:hover { background: #f4f7f1; }
.ws-menu .on { background: var(--mint); color: #28624b; font-weight: 600; }
.ws-menu svg { width: 14px; height: 14px; }
.ws-menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.nav-label { font-size: 10px; letter-spacing: 1.5px; color: #72856f; margin: 0 13px 10px; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; color: #68796e; border: 1px solid transparent; border-radius: 6px; padding: 10px 12px; font-size: 13px; }
.side-nav a:hover { background: #f4f7f1; }
.side-nav a.active { background: var(--mint); color: #28624b; border-color: #dce8d9; font-weight: 600; }
.side-nav svg { width: 17px; height: 17px; }
.nav-count { margin-left: auto; display: inline-flex; justify-content: center; background: #d7e7d3; border-radius: 4px; min-width: 19px; padding: 0 4px; font-size: 11px; font-weight: 500; }
.new-tag { font-size: 9px; border: 1px solid #dfe7de; padding: 1px 4px; color: #859381; border-radius: 3px; margin-left: auto; font-weight: 500; }
.admin-tag { font-size: 8px; color: #9aa396; margin-left: auto; letter-spacing: .5px; font-weight: 500; }
.sidebar-bottom { margin-top: auto; }
.sidebar-tip { margin: 35px 3px 22px; padding: 17px 14px; background: #f4f6ef; border: 1px solid #e5e9df; border-radius: 7px; }
.sidebar-tip h3 { font-size: 13px; margin: 10px 0 5px; }
.sidebar-tip p { font-size: 12px; color: #7c8979; line-height: 1.7; }
.sidebar-tip a { font-size: 12px; display: flex; justify-content: space-between; margin-top: 15px; font-weight: 600; }
.sidebar-tip a:hover { color: var(--green); }
.tiny-spark { font-size: 22px; color: #6e9b6c; line-height: 1; display: block; }
.profile { display: flex; align-items: center; gap: 9px; padding: 20px 5px; border-top: 1px solid var(--line); margin-top: 14px; }
.profile > a:first-child { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.profile > a:first-child > span:last-child { min-width: 0; }
.profile strong { font-size: 12px; display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile small { font-size: 10px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile button { margin-left: auto; border: 0; background: none; color: var(--muted); padding: 4px; border-radius: 4px; }
.profile button:hover { color: var(--ink); background: #f4f7f1; }
.profile button svg { width: 16px; height: 16px; }

.avatar { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid #d9dfd4; background: #e7ebdf; color: #647458; border-radius: 50%; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.small-avatar { width: 27px; height: 27px; font-size: 10px; }
.c0 { background: #e8eadb; color: #647458; } .c1 { background: #f1dfd2; color: #a37b5e; }
.c2 { background: #dfe9e7; color: #5f8079; } .c3 { background: #e6e1ef; color: #776a92; }
.c4 { background: #f3e3e6; color: #9a6370; } .c5 { background: #dbe8ef; color: #5e7f91; }
.c6 { background: #efe8d4; color: #8b7445; } .c7 { background: #e1ebdc; color: #52704a; }

.app-shell { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 35px; background: #fdfefa; position: sticky; top: 0; z-index: 20; }
.topbar > div:first-child { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb { font-size: 12px; color: #7b8b75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.breadcrumb > span { padding: 0 12px; color: #bdc6bd; }
.breadcrumb strong { font-weight: 500; color: #53685d; }
.breadcrumb a:hover { color: var(--green); }
.topbar-right { display: flex; align-items: center; gap: 20px; font-size: 11px; color: #77877c; flex: none; }
.topbar-right > a { display: inline-flex; gap: 8px; align-items: center; }
.topbar-right > a:hover { color: var(--green); }
.mobile-menu { display: none !important; }
.content { padding: 34px 35px 20px; max-width: 1460px; width: 100%; margin-inline: auto; outline: none; flex: 1; }
.app-footer { padding: 25px 35px; display: flex; gap: 20px; justify-content: space-between; font-size: 10px; color: #77877c; }
.app-footer nav { display: flex; gap: 16px; }
.app-footer a:hover { color: var(--green); }
.scrim { display: none; }

/* ---------------------------------------------------------------- headings */
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.page-heading > div:first-child { min-width: 0; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; color: #7e917e; margin: 0 0 9px; font-weight: 600; text-transform: uppercase; }
.lead, .page-heading > div > p:last-child { font-size: 13px; color: #7b8b7f; line-height: 1.8; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 15px; border: 1px solid var(--navy); border-radius: 5px; background: var(--navy); font-size: 12px; font-weight: 550; color: #fff; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; text-decoration: none; }
.button:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.button svg { width: 14px; height: 14px; }
.button.secondary { background: #fff; color: #4f6656; border-color: #dce4d8; }
.button.secondary:hover { background: #f0f5ec; }
.button.light { background: #e9f4e7; border-color: #d2e3cd; color: #33684c; }
.button.light:hover { background: #dfeedc; }
.button.danger { background: #fff; color: var(--red); border-color: var(--red-line); }
.button.danger:hover, .button.danger.confirm { background: var(--red); border-color: var(--red); color: #fff; }
.button.small { padding: 7px 11px; font-size: 11px; gap: 7px; }
.button.small svg { width: 12px; height: 12px; }
.button.lg { padding: 13px 18px; font-size: 13px; }
.button.block { width: 100%; }
.button:disabled:hover { background: var(--navy); }
.button.secondary:disabled:hover { background: #fff; }
.icon-button { padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #5f7466; flex: none; }
.icon-button:hover { background: var(--mint); }
.icon-button svg { width: 14px; height: 14px; }
.icon-button.danger.confirm { background: var(--red); border-color: var(--red); color: #fff; }
.text-button { border: 0; background: none; padding: 0; color: var(--green); font-size: 12px; font-weight: 550; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- forms */
input[type=text], input[type=email], input[type=search], input[type=url], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #dce5d6; border-radius: 5px; background: #fcfdf9; color: var(--ink); font-size: 13px; min-width: 0;
}
select { padding-right: 28px; }
textarea { resize: vertical; min-height: 44px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6fa587; box-shadow: 0 0 0 3px #dcefe2; }
input:disabled { color: var(--muted); background: #f4f6f1; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #6b8065; min-width: 0; }
.field > span { font-size: 12px; color: #5f765c; font-weight: 500; }
.field > span em { margin-left: 4px; font-size: 11px; }
.field small { font-size: 11px; color: #8e9e83; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 16px; }
.span-2 { grid-column: span 2; }
.form-grid { display: grid; gap: 17px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.row.tight { gap: 6px; }
.row.end { justify-content: flex-end; }
.row.between, .row.spread { justify-content: space-between; }
.form-error { margin: 0; color: var(--red); font-size: 12px; }
.form-error a { text-decoration: underline; }
.help-text { font-size: 12px; line-height: 1.8; color: #85947c; }
.help-text code { font-size: 11.5px; color: var(--ink); }
.notice { padding: 14px 16px; background: var(--sage); border: 1px solid #e0ead6; border-radius: 5px; color: #74866a; font-size: 12px; line-height: 1.8; }
.notice strong { color: #527044; font-weight: 600; }
.notice a { color: var(--green); font-weight: 600; }
.code-label { font-size: 10px; letter-spacing: 1px; color: #88987a; margin: 18px 0 8px; font-weight: 600; }
.code-block { background: #0e2c38; color: #c7dccb; border-radius: 6px; padding: 16px 48px 16px 18px; font: 12px/1.9 var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; position: relative; }
.code-block .icon-button { position: absolute; top: 9px; right: 9px; background: #18394a; border-color: #2a4d5d; color: #c7dccb; }
.code-block .icon-button:hover { background: #22495c; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #f4f7ef; border: 1px solid var(--line); border-radius: 5px; min-width: 0; }
.copy-row code { font-size: 12px; overflow-wrap: anywhere; min-width: 0; }
.copy-row input { border: 0; background: transparent; padding: 0; font: 12px var(--mono); box-shadow: none; }
.expiry { display: flex; gap: 8px; }
.expiry select, .expiry input { flex: 1 1 50%; min-width: 0; }
.toggle-label { display: flex; align-items: center; gap: 15px; justify-content: space-between; border-top: 1px solid var(--line-soft); padding: 16px 0; font-size: 13px; cursor: pointer; }
.toggle-label:first-child { border-top: 0; padding-top: 4px; }
.toggle-label small { display: block; font-size: 11px; color: #93a087; margin-top: 4px; line-height: 1.6; }
.toggle-label input { appearance: none; -webkit-appearance: none; width: 30px; height: 17px; background: #dbe3d4; border-radius: 20px; cursor: pointer; position: relative; flex-shrink: 0; margin: 0; }
.toggle-label input:checked { background: #5b8d65; }
.toggle-label input:disabled { opacity: .5; cursor: not-allowed; }
.toggle-label input::before { content: ''; width: 11px; height: 11px; border-radius: 50%; position: absolute; top: 3px; left: 3px; background: #fff; transition: transform .15s; }
.toggle-label input:checked::before { transform: translateX(13px); }
.toggle-label input:focus-visible { outline: 2px solid var(--green); }
.toggle-list .toggle-label:last-child { padding-bottom: 4px; }

/* ---------------------------------------------------------------- panels & layout */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; min-width: 0; }
.panel-heading { padding: 16px 21px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 58px; }
.panel-heading h2 { font-size: 14px; }
.panel-heading > span { font-size: 10px; color: #97a28c; letter-spacing: .6px; text-transform: uppercase; }
.panel-heading p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.panel-heading select { max-width: 180px; padding-block: 6px; font-size: 12px; }
.panel-body { padding: 21px; }
.panel-body.tight { padding: 0; }
.panel-foot { padding: 14px 21px; border-top: 1px solid var(--line-soft); background: #fbfcf8; display: flex; justify-content: flex-end; gap: 9px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.stack.tight { gap: 10px; }
.two-columns { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
.detail-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.below-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 24px; }
.settings-heading { font-size: 12px; color: #567150; margin-bottom: 6px; font-weight: 600; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- upload */
.upload-zone { padding: 26px; background: linear-gradient(110deg, #e9f1e4, #f1f5ed); border: 1px dashed #bdcfb4; border-radius: 8px; display: flex; align-items: center; gap: 20px; position: relative; margin-bottom: 24px; cursor: pointer; transition: background .15s, border-color .15s; }
.upload-zone:hover { border-color: #9dbb92; }
.upload-zone.over { border: 1px solid var(--green); background: #dcebd6; }
.upload-zone.busy { pointer-events: none; opacity: .6; }
.upload-zone.compact { margin: 0; padding: 18px; gap: 14px; }
.upload-symbol { width: 56px; height: 64px; border: 1px solid #c2d5ba; background: #f8fcf2; border-radius: 8px; display: flex; align-items: center; justify-content: center; transform: rotate(-6deg); color: #6c9163; box-shadow: 4px 4px 0 #d9e6d2; flex: none; }
.upload-symbol svg { width: 26px; height: 26px; }
.upload-zone.compact .upload-symbol { width: 42px; height: 48px; box-shadow: 3px 3px 0 #d9e6d2; }
.upload-zone.compact { flex-wrap: wrap; }
.upload-zone.compact .upload-text { flex: 1 1 180px; }
.upload-zone.compact .upload-buttons { margin-left: 0; flex-basis: 100%; padding-left: 56px; flex-direction: row; align-items: center; }
.upload-zone.compact .upload-symbol svg { width: 20px; height: 20px; }
.upload-text { min-width: 0; }
.upload-text h2 { font-size: 14px; margin-bottom: 6px; }
.upload-text p { font-size: 12px; color: #7f8e77; }
.upload-buttons { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.upload-buttons .button { font-size: 11px; }
.upload-buttons .button.secondary { background: #ffffffa8; }
.stage-card { margin-bottom: 24px; }
.stage-summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 6px; background: var(--sage); border: 1px solid #e0ead6; }
.stage-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 6px; background: #e1ebdc; color: #52704a; flex: none; }
.stage-icon.ok { background: #e6f3de; color: #3f7a4f; }
.stage-meta { display: grid; min-width: 0; flex: 1; }
.stage-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.stage-meta span { color: var(--muted); font-size: 12px; }
.progress { height: 7px; border-radius: 99px; background: #ecf2e5; overflow: hidden; flex: 1; min-width: 140px; }
.progress-bar { height: 100%; width: 0; background: #5b8d65; border-radius: 99px; transition: width .15s; }
.people { display: grid; gap: 8px; }
.person-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; }
.done-links { display: grid; gap: 10px; }
.done-link { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.done-link strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- stats */
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.stat { padding: 17px 19px; background: #fff; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.stat-top { display: flex; justify-content: space-between; font-size: 11px; color: #81907f; align-items: center; gap: 8px; }
.stat-top svg { width: 14px; height: 14px; color: #96a68e; }
.stat-value { font: 500 27px Manrope, sans-serif; letter-spacing: -1px; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value span { font: 11px 'DM Sans', sans-serif; letter-spacing: 0; color: #6f9466; margin-left: 10px; }
.stat small { font-size: 10px; color: #7b8b72; display: block; }
.stat .bar { margin-top: 10px; }

/* ---------------------------------------------------------------- page list */
.section-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 15px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.count-tag { font-size: 10px; color: #788b70; border: 1px solid #dfe6d9; border-radius: 4px; padding: 1px 5px; }
.filters { display: flex; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; }
.search:focus-within { border-color: #6fa587; box-shadow: 0 0 0 3px #dcefe2; }
.search svg { width: 13px; height: 13px; color: #93a08b; }
.search input { border: 0; outline: none; font-size: 11px; background: transparent; width: 150px; padding: 7px 0; box-shadow: none !important; }
.filters select { padding: 7px 26px 7px 9px; font-size: 11px; background-color: #fff; border-color: var(--line); color: #5d6f58; max-width: 180px; }
.page-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.table-head, .page-row { display: grid; grid-template-columns: minmax(200px, 2.2fr) .8fr .7fr .9fr 40px; gap: 15px; align-items: center; padding: 12px 18px; }
.table-head { background: #fbfcf8; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: 1px; color: #8c9c81; font-weight: 600; }
.page-row { border-bottom: 1px solid var(--line-soft); padding-block: 17px; transition: background .15s; cursor: pointer; }
.page-row:last-child { border-bottom: 0; }
.page-row:hover { background: #fbfdf8; }
.page-row:focus-visible { outline-offset: -2px; }
.page-name { display: flex; gap: 12px; align-items: center; min-width: 0; }
.page-name > span:last-child { min-width: 0; }
.page-name strong { font-size: 13px; font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-name small { display: block; font-size: 10px; color: #7d8c73; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumbnail { width: 50px; height: 58px; background: #e2e8d6; border: 1px solid #d9e0cf; border-radius: 4px; overflow: hidden; position: relative; flex-shrink: 0; }
.thumbnail::before { content: ''; width: 18px; height: 22px; border-radius: 15px 15px 0 0; background: #3c6552; position: absolute; bottom: 0; left: 9px; transform: rotate(-25deg); }
.thumbnail::after { content: ''; position: absolute; width: 24px; height: 5px; background: #f9fbf3; top: 10px; left: 8px; border-radius: 1px; }
.thumbnail.peach { background: #eee2d2; }
.thumbnail.peach::before { background: #b67c55; transform: rotate(30deg); left: 22px; width: 26px; height: 29px; }
.thumbnail.blue { background: #dce7e8; }
.thumbnail.blue::before { background: #719394; left: 7px; width: 33px; height: 22px; transform: none; }
.thumbnail.blocked { background: #f1e3df; }
.thumbnail.blocked::before { background: #b9806f; }
.recipient-avatars { display: flex; align-items: center; padding-left: 5px; min-width: 0; }
.recipient-avatars .avatar { width: 23px; height: 23px; font-size: 8px; margin-left: -5px; border: 2px solid #fff; }
.table-number { font-size: 14px; }
.table-number small { font-size: 10px; color: #7c8b71; display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sample-caption { font-size: 10px; color: #a2ad96; }
.pill { font-size: 10px; border: 1px solid #d4e7d3; background: #edf6e9; color: #4f7a42; padding: 3px 7px; border-radius: 4px; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; width: fit-content; font-weight: 500; line-height: 1.4; }
.pill svg { width: 11px; height: 11px; }
.pill.amber, .pill.changes, .pill.pending, .pill.expired, .pill.warn { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.pill.gray, .pill.off, .pill.disabled { background: #f3f5ef; color: #8a9680; border-color: #e5eadf; }
.pill.blue, .pill.accent { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-line); }
.pill.red, .pill.failed, .pill.blocked { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.empty-state { text-align: center; padding: 55px 25px; }
.empty-state > svg { width: 36px; height: 36px; margin: 0 auto 20px; color: #94af7e; stroke-width: 1.3; }
.empty-state h3 { font-size: 17px; letter-spacing: -.5px; font-weight: 500; margin: 0 0 8px; }
.empty-state p { font-size: 13px; color: #8a9781; max-width: 360px; margin: 0 auto 20px; }
.empty-state .button { margin-top: 2px; }
.empty-inline { padding: 25px; text-align: center; color: #8c9b7e; font-size: 12px; line-height: 1.8; }

/* ---------------------------------------------------------------- activity */
.activity-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; position: relative; }
.activity-item:first-child { padding-top: 0; }
.activity-item:last-child { padding-bottom: 0; }
.activity-item:not(:last-child)::before { content: ''; position: absolute; top: 36px; left: 12px; bottom: -12px; width: 1px; background: #e3eadc; }
.activity-item:first-child:not(:last-child)::before { top: 24px; }
.activity-symbol { background: #edf5e8; border: 1px solid #e1ebd9; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: #6f9466; border-radius: 50%; flex-shrink: 0; position: relative; z-index: 1; }
.activity-symbol.amber { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.activity-symbol.blue { background: var(--blue-bg); border-color: var(--blue-line); color: var(--blue); }
.activity-symbol svg { width: 12px; height: 12px; }
.activity-item > div { min-width: 0; flex: 1; }
.activity-item p { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.activity-item p a:hover { color: var(--green); }
.activity-item small { font-size: 11px; color: #7f8e72; display: block; overflow-wrap: anywhere; }
.activity-item > time { margin-left: auto; font-size: 10px; color: #77876f; white-space: nowrap; margin-top: 3px; padding-left: 8px; }
.quick-card { background: #f0f3e9; border: 1px solid #e3e9da; border-radius: 7px; padding: 23px; position: relative; overflow: hidden; min-height: 220px; }
.quick-card h3 { font: 500 22px/1.3 Manrope, sans-serif; letter-spacing: -.8px; margin: 12px 0; position: relative; }
.quick-card p { font-size: 12px; color: #7d8a70; max-width: 230px; margin-bottom: 17px; position: relative; }
.quick-card .eyebrow { font-size: 9px; }
.quick-card > svg { width: 120px; height: 120px; position: absolute; right: -18px; bottom: -14px; color: #d9e3cb; stroke-width: .8; }
.quick-card a { font-size: 12px; font-weight: 600; position: relative; display: inline-flex; gap: 8px; }
.quick-card a:hover { color: var(--green); }

/* ---------------------------------------------------------------- page detail */
.back-link { font-size: 12px; color: #7b8b70; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 21px; }
.back-link:hover { color: var(--green); }
.back-link svg { width: 14px; height: 14px; }
.detail-title { display: flex; gap: 14px; align-items: center; min-width: 0; }
.detail-title > div { min-width: 0; }
.detail-title h1 { margin-bottom: 5px; font-size: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-title p { font-size: 12px; color: #84957a; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.detail-title .thumbnail { width: 45px; height: 54px; }
.detail-actions { display: flex; gap: 8px; flex: none; }
.detail-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 25px; overflow-x: auto; scrollbar-width: none; }
.detail-tabs a { padding: 12px 0; border-bottom: 2px solid transparent; font-size: 12px; color: #8e9b84; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; margin-bottom: -1px; }
.detail-tabs a:hover { color: var(--ink); }
.detail-tabs a.active { border-color: #438265; color: #30624c; font-weight: 600; }
.badge-n { background: #d7e7d3; color: #3d6a4c; border-radius: 4px; font-size: 10px; min-width: 18px; padding: 0 5px; text-align: center; font-weight: 600; }
.mini-proposal { background: #f8f6e9; border: 1px solid #e9e7d6; border-radius: 5px; padding: 23px; min-height: 230px; position: relative; overflow: hidden; }
.mini-proposal > small { font-size: 9px; letter-spacing: 1.5px; color: #7b8770; display: block; }
.mini-proposal h3 { font: 500 27px/1.2 Manrope, sans-serif; letter-spacing: -1px; margin: 25px 0 12px; max-width: 70%; overflow-wrap: anywhere; position: relative; z-index: 1; }
.mini-proposal > span { font-size: 11px; color: #7f8c72; display: block; max-width: 60%; position: relative; z-index: 1; }
.mini-proposal .shape { position: absolute; width: 120px; height: 145px; border-radius: 70px 70px 0 0; right: 35px; bottom: -35px; transform: rotate(-35deg); background: #396d52; }
.mini-proposal .shape::after { content: ''; position: absolute; width: 85px; height: 125px; left: 80px; top: 55px; border-radius: 50px 50px 0 0; background: #b2c3a0; transform: rotate(55deg); }
.mini-proposal.peach .shape { background: #b67c55; }
.mini-proposal.blue .shape { background: #719394; }
.mini-proposal .row { margin-top: 22px; position: relative; z-index: 1; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding-top: 10px; }
.chart > div { flex: 1; display: flex; align-items: center; justify-content: flex-end; flex-direction: column; height: 100%; font-size: 10px; color: #7c8f70; gap: 6px; min-width: 0; }
.chart b { font-weight: 500; font-size: 10px; color: #5f7559; }
.chart span { display: block; background: #b2c9a7; width: 100%; max-width: 35px; border-radius: 3px 3px 0 0; min-height: 3px; }
.chart > div.today span { background: #4f8764; }
.reading-row { display: grid; grid-template-columns: minmax(80px, 160px) 1fr 52px; align-items: center; gap: 15px; font-size: 12px; margin: 18px 0; }
.reading-row:first-child { margin-top: 4px; }
.reading-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reading-row > span:last-child { text-align: right; color: var(--muted); }
.bar { height: 7px; background: #ecf2e5; border-radius: 5px; overflow: hidden; }
.bar > span { height: 100%; display: block; background: #75a07a; border-radius: 5px; width: 0; }
.large-number { font: 500 36px Manrope, sans-serif; letter-spacing: -1px; margin-bottom: 2px; }
.kv-row { padding: 14px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 13px; gap: 15px; }
.kv-row:first-of-type { margin-top: 16px; }
.kv-row strong { font-weight: 600; text-align: right; }
.recipient-table, .data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.recipient-table th, .data-table th { text-align: left; font-size: 9px; letter-spacing: 1px; color: #8f9c84; font-weight: 600; background: #fbfcf7; padding: 12px 18px; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.recipient-table td, .data-table td { padding: 15px 18px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.recipient-table tr:first-child td, .data-table tr:first-child td { border-top: 0; }
.recipient-table td small, .data-table td small { display: block; font-size: 10.5px; color: #93a08a; margin-top: 3px; }
.recipient-table .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.recipient-table .who > div { min-width: 0; }
.recipient-table .who strong, .data-table strong { font-weight: 600; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions > * { display: inline-flex; vertical-align: middle; margin-left: 5px; }
.table-scroll { overflow-x: auto; }
.link-code { font-size: 11px; color: #5f7466; max-width: 240px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.revoke { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 5px 9px; font-size: 10.5px; color: #4f7a42; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.revoke::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #5b8d65; }
.revoke:hover { background: #f4f7f1; }
.revoke.off { color: #a37b5c; background: #f9f2ec; border-color: #efe0d4; }
.revoke.off::before { background: #c69a7a; }
.feedback-card { padding: 20px 21px; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.8; }
.feedback-card:first-child { border-top: 0; }
.feedback-card.resolved { opacity: .62; }
.feedback-card .who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feedback-card .who strong { font-weight: 600; }
.feedback-card small { font-size: 11px; color: #94a08a; }
.feedback-card .quote { margin: 10px 0 0 42px; color: #4f6455; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-card .reply { margin: 12px 0 0 42px; padding-left: 14px; border-left: 2px solid var(--line); }
.feedback-card .reply .quote { margin-left: 0; margin-top: 4px; }
.feedback-card .reply-box { margin: 14px 0 0 42px; display: grid; gap: 8px; }
.visit { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; padding: 16px 21px; border-top: 1px solid var(--line-soft); }
.visit:first-child { border-top: 0; }
.visit-main { min-width: 0; display: grid; gap: 4px; }
.visit-main strong { font-weight: 600; }
.visit-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.visit-time { color: var(--muted); font-size: 11px; text-align: right; white-space: nowrap; }
.metrics { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.metrics b { color: var(--ink); font-weight: 600; }
.bars { display: grid; gap: 4px; margin-top: 4px; max-width: 560px; }
.bars .reading-row { margin: 2px 0; font-size: 11px; grid-template-columns: minmax(80px, 200px) 1fr 44px; }
.bars .bar { height: 5px; }
.files-list { display: grid; }
.files-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 12px; }
.files-list > div:first-child { border-top: 0; }
.files-list code { overflow-wrap: anywhere; }
details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '+'; color: var(--muted); font-size: 16px; }
details[open] > summary::after { content: '–'; }

/* ---------------------------------------------------------------- workspace pages */
.domain-card .panel-heading { flex-wrap: wrap; }
.domain-card .panel-heading > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.domain-card .panel-heading strong { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.domain-card .panel-heading svg { width: 16px; height: 16px; color: #6f9466; }
.dns { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.dns-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line-soft); align-items: center; font-size: 12px; }
.dns-row:first-child { border-top: 0; }
.dns-row.head { background: #fbfcf7; font-size: 9px; letter-spacing: 1px; color: #8f9c84; font-weight: 600; text-transform: uppercase; }
.copyable { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.copyable code { overflow-wrap: anywhere; min-width: 0; }
.copyable .icon-button { padding: 5px; }
.member-row { padding: 15px 21px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.member-row:first-child { border-top: 0; }
.member-row > div:nth-child(2) { min-width: 0; flex: 1; }
.member-row strong { font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-row small { display: block; font-size: 11px; color: #93a087; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-row select { width: auto; padding: 6px 26px 6px 9px; font-size: 12px; }
.member-row .actions { display: flex; gap: 6px; align-items: center; flex: none; }
.integration-card { padding: 24px; background: var(--sage); border: 1px solid #e1ead8; border-radius: 7px; }
.integration-card h2 { font-size: 18px; margin: 13px 0 10px; }
.integration-card > p { font-size: 13px; line-height: 1.9; color: #7d8d6e; margin-bottom: 18px; }
.steps { display: grid; gap: 14px; margin-top: 18px; }
.steps > div { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.steps .num { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid #d8e4cf; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #4f7a42; font-weight: 600; }
.steps strong { font-weight: 600; display: block; font-size: 13px; }
.steps p { font-size: 12px; color: #7d8d6e; line-height: 1.75; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.plan.current { border-color: #9fc5a5; box-shadow: 0 0 0 3px #e3f0e2; }
.plan h2 { font-size: 16px; }
.plan .price { font: 500 32px Manrope, sans-serif; letter-spacing: -1px; }
.plan .price small { font: 12px 'DM Sans', sans-serif; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 12px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 14px; height: 14px; color: #5b8d65; margin-top: 3px; }
.plan li.no { color: #a3ad99; }
.plan li.no svg { color: #c2cab9; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #8e9b84; }
.seg button[aria-pressed=true] { background: var(--mint); color: #30624c; }
.locked { text-align: center; padding: 50px 25px; display: grid; gap: 12px; justify-items: center; }
.locked > svg { width: 32px; height: 32px; color: #94af7e; stroke-width: 1.4; }
.locked strong { font: 500 17px/1.4 Manrope, sans-serif; letter-spacing: -.4px; max-width: 420px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 6px; background: var(--sage); border: 1px solid #e0ead6; color: #4f6e47; font-size: 12px; line-height: 1.7; }
.banner svg { width: 16px; height: 16px; margin-top: 1px; }
.banner a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.banner.warn { background: var(--amber-bg); border-color: var(--amber-line); color: #86662c; }
.banner.ok { background: #edf6e9; border-color: #d4e7d3; color: #3f6e44; }
.banner.danger { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.content > .banner { margin-bottom: 22px; }

/* ---------------------------------------------------------------- auth & consent */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(1200px 600px at 85% -10%, #e4efe0 0%, transparent 60%), var(--paper); }
.auth-card { width: 100%; max-width: 430px; display: grid; gap: 20px; padding: 34px 32px 30px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 25px 70px #18402f10; }
.auth-card .brand { margin: 0 0 4px; width: 150px; }
.auth-card h1 { font-size: 27px; letter-spacing: -1px; margin: 0 0 6px; }
.auth-card .eyebrow { margin-bottom: 8px; }
.auth-card p.muted { font-size: 13px; line-height: 1.7; }
.auth-card .fine { font-size: 11px; color: #94a08a; }
.auth-card .fine a, .auth-card .switch a { color: var(--green); font-weight: 600; }
.auth-card .switch { font-size: 12px; color: var(--muted); }
.google-btn { gap: 10px; background: #fff; color: var(--ink); border-color: #d4ddd0; font-size: 13px; padding: 12px 16px; }
.google-btn:hover { background: #f6f9f3; border-color: #c3d0bd; }
.google-btn svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 10px; color: #9aa592; font-size: 11px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-input { font: 24px var(--mono) !important; letter-spacing: 10px; text-align: center; padding: 14px !important; }
.turnstile:empty { display: none; }
.consent-app { display: flex; align-items: center; gap: 14px; }
.consent-app .app-mark { width: 44px; height: 44px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--mint); color: #30624c; border: 1px solid #d8e6d3; font: 600 18px Manrope, sans-serif; flex: none; }
.consent-app h1 { font-size: 22px; letter-spacing: -.6px; margin: 0; }
.consent-list { margin: 0; padding: 14px 16px 14px 34px; display: grid; gap: 5px; background: var(--sage); border: 1px solid #e0ead6; border-radius: 6px; font-size: 12px; color: #5c7354; }

/* ---------------------------------------------------------------- modal & toast */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: #0b2a385c; backdrop-filter: blur(3px); animation: fade .15s; }
.dialog { width: min(490px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fcfdf9; border: 1px solid #dce6d4; border-radius: 12px; box-shadow: 0 25px 100px #0d2e3435; animation: pop .16s ease-out; }
.dialog.wide { width: min(680px, 100%); }
.dialog > form { display: contents; }
.modal-header { padding: 23px 25px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.modal-header h2 { font-size: 20px; margin-bottom: 6px; letter-spacing: -.6px; }
.modal-header p { font-size: 12px; color: #889779; line-height: 1.7; }
.modal-body { padding: 22px 25px; display: grid; gap: 17px; }
.modal-footer { padding: 15px 25px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #f5f8f0; border-radius: 0 0 12px 12px; flex-wrap: wrap; }
.success-icon { width: 45px; height: 45px; border-radius: 50%; background: #e6f3de; display: flex; align-items: center; justify-content: center; color: #4f8a52; }
.success-icon svg { width: 24px; height: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: .5; } }
.toast { position: fixed; bottom: 25px; left: calc(50% + var(--sidebar) / 2); transform: translateX(-50%) translateY(25px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 6px; background: #163e3f; color: #fff; font-size: 13px; box-shadow: 0 8px 25px #0e293225; z-index: 100; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); width: max-content; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.auth ~ .toast, body:not(.in-app) .toast { left: 50%; }

/* ---------------------------------------------------------------- responsive */
@media (min-width: 1450px) {
  :root { --sidebar: 250px; }
  .sidebar { padding-inline: 23px; }
  .topbar { padding-inline: 50px; }
  .content { padding: 42px 50px 25px; }
  .page-heading { margin-bottom: 32px; }
  .upload-zone { padding: 30px; }
  .summary-grid { gap: 20px; }
  .page-row { padding-block: 22px; }
  .app-footer { padding-inline: 50px; }
  .sidebar-tip { margin-top: 50px; }
}
@media (max-width: 1150px) {
  :root { --sidebar: 205px; }
  .sidebar { padding-inline: 14px; }
  .brand { width: 145px; }
  .topbar { padding-inline: 25px; }
  .content { padding: 28px 25px 20px; }
  .upload-zone { padding: 21px; gap: 15px; }
  .upload-text p { max-width: 280px; font-size: 11px; }
  .upload-buttons { flex-direction: column; align-items: stretch; gap: 6px; }
  .upload-buttons .button { padding: 7px 12px; }
  .stat { padding: 14px; }
  .table-head, .page-row { grid-template-columns: minmax(160px, 2fr) .7fr .7fr .9fr 30px; gap: 10px; padding-inline: 15px; }
  .page-name strong { font-size: 12px; }
  .thumbnail { width: 40px; height: 49px; }
  .topbar-right { gap: 12px; }
  .detail-layout { grid-template-columns: 1.4fr 1fr; }
  .detail-actions .button { padding: 8px 12px; }
  .search input { width: 110px; }
  .app-footer { padding-inline: 25px; }
  .plans { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar: 185px; }
  .sidebar { padding-inline: 10px; }
  .brand { width: 135px; }
  .side-nav a { gap: 9px; font-size: 12px; padding-inline: 10px; }
  .sidebar-tip { padding: 13px 11px; }
  .new-tag, .admin-tag { display: none; }
  .workspace { gap: 7px; padding: 9px; }
  .two-columns, .detail-layout { grid-template-columns: 1fr; }
  .upload-symbol { display: none; }
  .summary-grid { gap: 9px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 23px; }
  .stat-value span { display: none; }
  .below-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 180px; }
  .quick-card p { max-width: 350px; }
  .table-head, .page-row { grid-template-columns: minmax(150px, 2fr) .6fr .9fr 26px; gap: 9px; }
  .col-recipients { display: none !important; }
  .section-toolbar { align-items: flex-start; }
  .section-toolbar .filters { flex-wrap: wrap; justify-content: flex-end; }
  .filters select { max-width: 120px; }
  .topbar-right > a { display: none; }
  .detail-title h1 { font-size: 24px; }
  .detail-heading { align-items: flex-start; }
  .detail-actions { flex-direction: column; }
  .app-footer { flex-direction: column; gap: 6px; }
  .topbar-right .small-avatar { display: none; }
  .plans { grid-template-columns: 1fr; }
  .hide-md { display: none !important; }
}
@media (max-width: 640px) {
  :root { --sidebar: 250px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 5px 0 50px #163f3420; padding-inline: 18px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open ~ .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: #0b2a3833; }
  .sidebar .brand { width: 155px; }
  .side-nav a { font-size: 14px; }
  .sidebar-tip { display: none; }
  .new-tag, .admin-tag { display: inline; }
  .app-shell { margin-left: 0; }
  .topbar { height: 61px; padding-inline: 18px; }
  .mobile-menu { display: inline-flex !important; background: transparent; border: 0; padding: 4px; }
  .mobile-menu svg { width: 20px; height: 20px; }
  .breadcrumb { font-size: 11px; }
  .breadcrumb > span { padding: 0 7px; }
  .content { padding: 26px 18px 15px; }
  .page-heading { align-items: flex-start; margin-bottom: 23px; gap: 12px; }
  h1 { font-size: 29px; }
  .page-heading > div > p:last-child { font-size: 12px; }
  .page-heading > .button, .page-heading > .heading-actions { margin-top: 19px; }
  .page-heading > .button { font-size: 11px; padding: 9px 12px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.2px; }
  .upload-zone { display: block; padding: 20px; }
  .upload-text p { max-width: none; }
  .upload-buttons { flex-direction: row; margin-top: 15px; gap: 8px; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 25px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 24px; margin-top: 6px; }
  .stat small { font-size: 9px; }
  .section-toolbar { display: block; }
  .section-toolbar .filters { margin-top: 13px; flex-wrap: nowrap; justify-content: flex-start; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; }
  .table-head { font-size: 8px; }
  .table-head, .page-row { grid-template-columns: minmax(140px, 1fr) 46px 92px; gap: 8px; padding-inline: 12px; }
  .col-menu { display: none !important; }
  .table-number small { font-size: 8px; }
  .page-name { gap: 9px; }
  .page-name strong { font-size: 12px; }
  .page-name small { font-size: 9px; }
  .thumbnail { width: 32px; height: 41px; }
  .pill { font-size: 9px; padding: 3px 5px; }
  .table-number { font-size: 13px; }
  .page-row { padding-block: 15px; }
  .below-grid { margin-top: 18px; gap: 18px; }
  .panel-heading { padding: 14px 17px; }
  .panel-body { padding: 17px; }
  .panel-foot { padding-inline: 17px; }
  .app-footer { padding: 25px 18px; }
  .two-columns { gap: 18px; }
  .member-row { padding-inline: 15px; flex-wrap: wrap; }
  .member-row .actions { width: 100%; padding-left: 44px; }
  .detail-heading { display: block; }
  .detail-actions { flex-direction: row; margin-top: 20px; flex-wrap: wrap; }
  .detail-tabs { gap: 22px; }
  .detail-title h1 { font-size: 24px; white-space: normal; }
  .recipient-table td, .recipient-table th, .data-table td, .data-table th { padding: 12px 10px; }
  .recipient-table, .data-table { font-size: 11px; }
  .recipient-table .avatar { display: none; }
  .hide-sm { display: none !important; }
  .code-block { font-size: 11px; }
  .fields { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .person-row { grid-template-columns: 1fr 34px; }
  .person-row input:nth-child(2) { grid-column: 1; grid-row: 2; }
  .done-link { grid-template-columns: 1fr auto; }
  .done-link strong { grid-column: 1 / -1; }
  .dns-row { grid-template-columns: 1fr; gap: 4px; }
  .dns-row.head { display: none; }
  .modal-body, .modal-header { padding: 20px; }
  .modal-footer { padding: 15px 20px; }
  .integration-card { padding: 20px; }
  .toast { left: 50%; font-size: 12px; }
  .notice { font-size: 11px; }
  .visit { padding-inline: 15px; grid-template-columns: 28px minmax(0, 1fr); }
  .visit-time { grid-column: 2; text-align: left; }
  .feedback-card .quote, .feedback-card .reply, .feedback-card .reply-box { margin-left: 0; }
  .empty-state { padding: 40px 20px; }
  .reading-row { grid-template-columns: minmax(70px, 110px) 1fr 44px; gap: 10px; }
  .chart { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
