:root {
  color: #1d1d1b;
  background: #f5f1e8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #1d1d1b;
  --sidebar: #171918;
  --ivory: #f5f1e8;
  --paper: #fffdf8;
  --blue: #0177e2;
  --amber: #d79a3a;
  --muted: #817c73;
  --line: #d9d5cd;
  --green: #55745e;
  --danger: #a44b43;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ivory); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% -10%, #fffdf8 0, transparent 34%), var(--ivory); }
button, input, select { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 138px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 8px 20px; display: flex; flex-direction: column; align-items: stretch; color: #f5f1e8; background: linear-gradient(160deg, #191b1a 0%, #111513 100%); z-index: 10; }
.brand { color: inherit; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 6px 42px; }
.brand-mark { display: none; width: 38px; height: 38px; border: 1px solid #716f68; border-radius: 50%; place-items: center; font-size: 12px; letter-spacing: .08em; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: .15em; }
.nav-list { display: grid; gap: 12px; }
.nav-item { position: relative; width: 100%; min-height: 58px; padding: 9px 6px; border: 0; border-radius: 7px; color: #d8d8d2; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: flex-start; gap: 11px; transition: background 160ms ease, color 160ms ease; }
.nav-item svg { width: 27px; height: 27px; flex: 0 0 auto; }
.nav-item span { font-size: 13px; }
.nav-item:hover { color: white; background: #ffffff0c; }
.nav-item.active { color: white; background: #ffffff0d; }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 4px; bottom: 4px; width: 4px; border-radius: 0 5px 5px 0; background: var(--blue); box-shadow: 0 0 16px #0177e266; }
.sidebar-foot { margin-top: auto; position: relative; display: grid; place-items: center; }
.avatar { width: 58px; height: 58px; border: 1px solid #777169; display: grid; place-items: center; border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.live-dot { position: absolute; width: 10px; height: 10px; right: 34px; top: 3px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--sidebar); }

.workspace { min-width: 0; }
.topbar { height: 70px; padding: 0 42px 0 46px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 318px) 42px 1px auto; align-items: center; gap: 18px; border-bottom: 1px solid #ddd8cf99; }
.studio-label { font-size: 13px; letter-spacing: .22em; font-weight: 650; }
.studio-label span { margin-left: 12px; color: var(--muted); font-size: 19px; }
.search-box { height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf866; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #0177e214; }
.search-box svg { width: 20px; height: 20px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #8c877e; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.icon-button:hover { background: #fffdf8; }
.icon-button svg { width: 22px; height: 22px; }
.icon-button.loading svg { animation: spin .8s linear infinite; }
.divider { width: 1px; height: 36px; background: var(--line); }
.profile-button { border: 0; background: transparent; cursor: pointer; font-size: 14px; white-space: nowrap; }
.profile-button span { margin-left: 8px; }

main { padding: 26px 42px 48px 44px; }
.view { display: none; animation: fade-in 180ms ease; }
.view.active { display: block; }
.hero-row, .page-heading { min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.kicker { margin: 0 0 10px; color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(44px, 5vw, 64px); line-height: 1; }
.hero-row p:not(.kicker), .page-heading p:not(.kicker) { margin: 11px 0 0; color: #6f6a62; font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.date-control { height: 52px; padding: 0 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf866; }
.date-control svg { width: 21px; height: 21px; }
.date-control select, .small-select { border: 0; outline: 0; background: transparent; cursor: pointer; color: var(--ink); }
.primary-button { min-height: 52px; padding: 0 24px; border: 1px solid #0168c6; border-radius: 8px; color: white; background: linear-gradient(180deg, #0980ec, #016ed3); box-shadow: 0 7px 18px #0177e21a; font-weight: 650; cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 9px 20px #0177e22b; }
.primary-button:disabled { opacity: .58; cursor: wait; }
.full-width { width: 100%; }

.metric-strip { min-height: 164px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 22px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fffdf84a; }
.metric { position: relative; min-width: 0; padding: 19px 32px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; transition: background 160ms ease; }
.metric:last-child { border-right: 0; }
.metric:hover { background: #fffdf85e; }
.metric.active::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--blue); }
.metric strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 58px; line-height: 1; font-weight: 400; }
.metric span { display: block; margin-top: 9px; letter-spacing: .13em; font-size: 11px; font-weight: 650; }
.metric small { display: block; margin-top: 15px; color: #69645c; font-size: 12px; }
.metric small.blue { color: var(--blue); }
.metric small.amber { color: #a96c11; }

.overview-grid, .analytics-grid { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(330px, .82fr); gap: 24px; }
.panel { min-width: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf870; box-shadow: 0 9px 24px #423a2c08; }
.panel-heading { min-height: 55px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel h2 { margin: 0; font-size: 34px; line-height: 1; }
.panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.small-select { min-width: 138px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 16px 7px 10px; color: #69645d; font-size: 10px; letter-spacing: .1em; text-align: left; text-transform: uppercase; font-weight: 700; }
td { padding: 12px 7px; border-top: 1px solid #dedad2; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background 140ms ease; }
tbody tr:hover { background: #ffffffa3; }
td.business { max-width: 230px; font-weight: 600; }
td.business span, td.muted-cell span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 6px; color: #3d4e5f; background: #e8eff7; font-size: 11px; white-space: nowrap; }
.status-chip.replied { color: #3e634b; background: #e6ede4; }
.status-chip.researching { color: #75675a; background: #efebe4; }
.status-chip.drafted, .status-chip.approved { color: #2c68a3; background: #e4effb; }
.status-chip.unqualified, .status-chip.suppressed, .status-chip.cancelled { color: #914e49; background: #f4e7e4; }
.fit-score { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.text-link { margin-top: 11px; padding: 4px 2px; border: 0; color: #006ed5; background: transparent; cursor: pointer; font-weight: 600; }
.text-link span { padding-left: 6px; font-size: 18px; }

.performance-summary { min-height: 66px; display: flex; align-items: flex-end; gap: 8px; }
.performance-summary strong { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 400; }
.performance-summary strong.small-number { margin-left: 16px; color: var(--ink); }
.performance-summary small { padding-bottom: 4px; color: var(--muted); }
.vert-rule { width: 1px; height: 50px; margin: 0 4px 0 12px; background: var(--line); }
.chart { height: 132px; margin: 4px 0 4px; }
.chart.large { height: 280px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: #d9d5cd; stroke-width: 1; stroke-dasharray: 4 4; }
.chart .area { fill: url(#chartFill); stroke: none; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 3; }
.chart .dot { fill: var(--blue); stroke: var(--paper); stroke-width: 3; }
.chart .dot:last-of-type { fill: var(--amber); }
.chart text { fill: #746f67; stroke: none; font-family: Inter, sans-serif; font-size: 10px; }
.leader-list { margin-top: 4px; }
.leader-row { min-height: 33px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.leader-row:first-child { border-top: 0; }
.leader-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-row strong { font-weight: 500; }
.leader-row small { display: block; color: var(--muted); }
.leader-list.expanded .leader-row { min-height: 50px; }

.activity-panel { margin-top: 24px; }
.updated-at { color: var(--muted); font-size: 11px; }
.activity-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 10px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.activity-item { min-height: 92px; padding: 16px; display: grid; grid-template-columns: 34px 1fr; gap: 11px; background: var(--paper); }
.activity-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--blue); background: #e7f2fc; font-size: 13px; }
.activity-item.reply .activity-icon { color: var(--green); background: #e8eee7; }
.activity-item.click .activity-icon { color: #9b681b; background: #f4ecdc; }
.activity-item strong { display: block; margin: 1px 0 5px; font-size: 12px; }
.activity-item p { margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-item time { display: block; margin-top: 7px; color: #99938b; font-size: 10px; }

.page-heading { min-height: 142px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.count-pill, .safety-badge { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: #625e57; background: #fffdf866; font-size: 12px; }
.safety-badge::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--amber); }
.full-panel { padding-top: 12px; }
.campaign-toolbar { min-height: 62px; padding: 8px 20px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.campaign-toolbar > div, .detail-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.campaign-toolbar strong { color: var(--muted); font-size: 12px; }
.secondary-button { min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font-weight: 650; cursor: pointer; }
.secondary-button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.secondary-button:disabled, .primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.primary-button.compact { min-height: 40px; padding: 0 16px; }
.select-cell { width: 42px; text-align: center; }
.select-cell input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.row-actions { white-space: nowrap; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.text-button + .text-button { margin-left: 12px; }
.text-button.send { color: #16734a; }
.draft-copy { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; color: #3f3c37; line-height: 1.7; }
.detail-actions { margin-top: 24px; justify-content: flex-end; }
.swal2-popup { border-radius: 14px; background: var(--paper); color: var(--ink); font-family: Arial, sans-serif; }
.swal2-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.swal2-html-container { color: var(--muted); line-height: 1.55; }
.swal-failure-list { max-height: 220px; margin: 16px 0 0; padding: 12px 12px 12px 30px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; text-align: left; }
.swal-failure-list li + li { margin-top: 7px; }
.message-list { display: grid; gap: 12px; }
.message-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf870; }
.message-head { display: flex; justify-content: space-between; gap: 20px; }
.message-head h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 400; }
.message-head time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.message-card .subject { margin: 7px 0; font-weight: 650; font-size: 13px; }
.message-card .excerpt { margin: 0; color: #666159; line-height: 1.6; font-size: 13px; }
.analytics-chart { min-height: 380px; }
.click-history-panel { margin-top: 24px; }
.destination { max-width: 480px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-state { padding: 36px 16px; color: var(--muted); text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.pagination { min-height: 62px; padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.pagination:empty { display: none; }
.pagination.standalone { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf870; }
.pagination-summary { white-space: nowrap; }
.pagination-controls, .pagination-pages { display: flex; align-items: center; gap: 7px; }
.pagination-controls button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
.pagination-controls .pagination-page { width: 34px; padding: 0; }
.pagination-controls .pagination-page.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pagination-ellipsis { width: 22px; text-align: center; color: var(--muted); }
.pagination-controls button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination-controls button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pagination-controls button:disabled { opacity: .4; cursor: not-allowed; }

dialog { color: var(--ink); }
dialog::backdrop { background: #111513b5; backdrop-filter: blur(3px); }
.auth-dialog { width: min(460px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 14px; background: var(--paper); box-shadow: 0 24px 80px #0005; }
.auth-dialog form { padding: 38px; }
.auth-mark { width: 46px; height: 46px; margin-bottom: 24px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; }
.auth-dialog h2 { margin: 0; font-size: 38px; }
.auth-dialog p:not(.kicker) { color: var(--muted); line-height: 1.55; font-size: 13px; }
.auth-dialog label { display: grid; gap: 8px; margin: 24px 0 10px; color: #5d5851; font-size: 12px; font-weight: 650; }
.auth-dialog input { height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 7px; outline: 0; }
.auth-dialog input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #0177e214; }
.form-error { min-height: 19px; color: var(--danger) !important; }
.detail-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 34px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: 0 24px 80px #0005; }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f0ede6; font-size: 23px; cursor: pointer; }
.detail-dialog h2 { margin: 6px 36px 5px 0; font-size: 42px; }
.detail-meta { color: var(--muted); font-size: 12px; }
.detail-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.detail-section p, .detail-section li { color: #5e5a53; line-height: 1.65; font-size: 13px; }
.detail-section ul { padding-left: 18px; }
.draft-copy { padding: 16px; white-space: pre-wrap; border-radius: 8px; background: #f2efe8; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.external-link { color: var(--blue); text-decoration: none; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 360px; padding: 12px 15px; border-radius: 8px; color: white; background: #1d1d1b; box-shadow: 0 9px 25px #0003; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; z-index: 30; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }

/* OAuth approval page */
.oauth-page { min-height: 100vh; }
.oauth-shell { min-height: 100vh; padding: 0; display: grid; grid-template-columns: minmax(390px, .82fr) minmax(520px, 1.18fr); }
.oauth-brand { min-height: 100vh; padding: 42px 48px 38px; display: flex; flex-direction: column; justify-content: space-between; color: #f5f1e8; background: radial-gradient(circle at 18% 80%, #26312c 0, transparent 34%), linear-gradient(155deg, #1b1e1c 0%, #101311 100%); }
.oauth-brand-top { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 650; letter-spacing: .18em; }
.oauth-monogram { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #777169; border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 13px; letter-spacing: .04em; }
.oauth-eyebrow { margin: 0 0 18px; color: #5ca9ee; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.oauth-brand h1 { max-width: 620px; font-size: clamp(48px, 5vw, 76px); line-height: .98; }
.oauth-brand h1 + p { max-width: 520px; margin: 24px 0 0; color: #bbbdb7; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.55; }
.oauth-foot { display: flex; align-items: center; gap: 10px; margin: 0; color: #a8aaa4; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.oauth-foot span { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px #0177e21f; }
.oauth-content { min-height: 100vh; padding: 54px; display: grid; place-items: center; }
.oauth-card { width: min(520px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8cc; box-shadow: 0 20px 60px #423a2c12; }
.oauth-lock { width: 52px; height: 52px; margin-bottom: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); background: #edf6fe; }
.oauth-lock svg { width: 24px; height: 24px; }
.oauth-card h2 { margin: 0; font-size: 48px; line-height: 1; }
.oauth-intro { margin: 15px 0 24px; color: #6f6a62; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.5; }
.oauth-permission { padding: 16px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; border: 1px solid #d7e3d9; border-radius: 8px; background: #edf3ed; }
.oauth-permission > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 12px; font-weight: 700; }
.oauth-permission strong, .oauth-permission small { display: block; }
.oauth-permission strong { color: #3e5444; font-size: 12px; }
.oauth-permission small { margin-top: 4px; color: #68776c; line-height: 1.45; }
.oauth-card form { margin-top: 27px; }
.oauth-card label { display: block; margin-bottom: 9px; color: #5d5851; font-size: 12px; font-weight: 650; }
.oauth-card input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: var(--paper); }
.oauth-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #0177e214; }
.oauth-card input::placeholder { color: #9a958d; }
.oauth-submit { width: 100%; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.oauth-submit span { font-size: 20px; }
.oauth-error { margin: 10px 0 -2px; color: var(--danger); font-size: 12px; line-height: 1.45; }
.oauth-privacy { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

@media (max-width: 850px) {
  .oauth-shell { grid-template-columns: 1fr; }
  .oauth-brand { min-height: auto; padding: 28px 24px; }
  .oauth-brand > div:nth-child(2) { display: none; }
  .oauth-foot { margin-top: 32px; }
  .oauth-content { min-height: auto; padding: 40px 20px 56px; }
  .oauth-card { padding: 30px 24px; }
  .oauth-card h2 { font-size: 40px; }
}

@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .brand-name, .nav-item span { display: none; }
  .brand-mark { display: grid; }
  .nav-item { justify-content: center; }
  .topbar { padding-inline: 28px; grid-template-columns: 1fr minmax(180px, 280px) 42px 1px auto; }
  main { padding-inline: 28px; }
  .overview-grid, .analytics-grid { grid-template-columns: 1fr; }
  .performance-panel { min-height: 390px; }
  .activity-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; padding-bottom: 70px; }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 66px; padding: 5px 8px; flex-direction: row; z-index: 20; border-top: 1px solid #393b38; }
  .brand, .sidebar-foot { display: none; }
  .nav-list { width: 100%; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .nav-item { min-height: 54px; flex-direction: column; gap: 2px; }
  .nav-item svg { width: 20px; height: 20px; }
  .nav-item span { display: block; font-size: 9px; }
  .nav-item.active::before { left: 20%; right: 20%; top: auto; bottom: -5px; width: auto; height: 3px; border-radius: 4px 4px 0 0; }
  .topbar { height: 62px; padding: 0 16px; grid-template-columns: 1fr 42px auto; gap: 8px; }
  .studio-label { font-size: 11px; }
  .search-box, .divider { display: none; }
  .profile-button { font-size: 12px; }
  main { padding: 18px 14px 28px; }
  .hero-row, .page-heading { min-height: 160px; align-items: flex-start; flex-direction: column; justify-content: center; }
  h1 { font-size: 43px; }
  .hero-actions { width: 100%; }
  .date-control, .primary-button { flex: 1; min-width: 0; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 136px; padding: 18px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; }
  .metric strong { font-size: 46px; }
  .panel { padding: 20px 16px; }
  .panel h2 { font-size: 30px; }
  .activity-list { grid-template-columns: 1fr; }
  .activity-item { min-height: 80px; }
  .page-heading { border-bottom: 0; }
  .safety-badge, .count-pill { align-self: flex-start; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-controls { width: 100%; justify-content: space-between; overflow-x: auto; }
  .pagination-direction { flex: 0 0 auto; }
  .pagination-pages { flex: 0 0 auto; }
  .campaign-toolbar { align-items: stretch; flex-direction: column; }
  .campaign-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .campaign-toolbar .primary-button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
