:root {
  --ink: #202127;
  --muted: #676872;
  --accent: #7540c8;
  --accent-hover: #5d2da9;
  --accent-soft: #f4effb;
  --accent-border: #e3d5f5;
  --pink: #b63778;
  --pink-soft: #fceff6;
  --primary: #24252b;
  --primary-hover: #373840;
  --border: #e7e7ec;
  --panel: #ffffff;
  --canvas: #f7f7f9;
  --danger: #b63847;
  --radius: 12px;
  --sidebar-width: 236px;
  --navy: #202127;
  --on-dark: #c6c6d0;
  --dark-muted: #aaaab9;
  --dark-border: #414149;
  --dark-accent: #dcc6fc;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
main, section, article, aside, form, fieldset { min-width: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.4; font-weight: 700; letter-spacing: -.035em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 1.95rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: .92rem; }
p, h1, h2, h3, h4, dd, td, th, a, label, span { overflow-wrap: anywhere; }
p, h1, h2, h3, h4 { word-break: keep-all; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 700; }
small, .muted, .hint { color: var(--muted); font-size: .8rem; }
small { display: block; }
.hint { line-height: 1.7; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--canvas); padding: 16px; border-radius: 9px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
img, svg { max-width: 100%; }
.icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; transform: translateY(-180%); padding: 12px 18px; border-radius: 8px; background: var(--panel); color: var(--ink); box-shadow: 0 4px 20px #20212724; }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 100px; }

:where(section) { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 20px 0; }
form { margin: 0; }
label { display: block; margin: 12px 0; color: var(--ink); font-size: .85rem; font-weight: 600; }
input, select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; margin-top: 7px; padding: 10px 12px; border: 1px solid #cfcfd8; border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 400; line-height: 1.5; }
input, select { min-height: 44px; }
textarea { min-height: 112px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:disabled, select:disabled, textarea:disabled { background: var(--canvas); color: var(--muted); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: 17px; min-height: 17px; height: 17px; margin: 0; accent-color: var(--accent); vertical-align: middle; flex: 0 0 auto; }
input[type="hidden"] { display: none; }
input[type="file"] { padding: 8px; }
fieldset { margin: 0; padding: 18px; border: 1px solid var(--border); border-radius: 9px; }
legend { padding: 0 7px; font-weight: 600; font-size: .9rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 10px 16px; margin: 0; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary); color: #fff; font: inherit; font-size: .85rem; font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s; }
button:hover, .button:hover, .button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 3px #2021270a; }
.secondary, .button.secondary { background: var(--panel); color: var(--ink); border-color: #cfcfd8; }
button.secondary:hover, .button.secondary:hover { background: var(--canvas); color: var(--ink); border-color: #a4a4b2; }
.danger, .button.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
button.danger:hover, .button.danger:hover { color: #fff; background: #972f3a; border-color: #972f3a; }
.ghost, .button.ghost { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; }
button.ghost:hover, .button.ghost:hover { color: var(--ink); background: var(--canvas); border-color: transparent; }
.button.small, button.small { min-height: 36px; padding: 7px 12px; font-size: .79rem; }
.button.small .icon, button.small .icon { width: 16px; height: 16px; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 650; text-decoration: none; }
.text-link .icon { width: 16px; height: 16px; }
.text-link:hover { text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-span { grid-column: 1 / -1; }
.field-optional { font-weight: 400; color: var(--muted); font-size: .76rem; margin-left: 4px; }
.form-grid > label, .stack > label, .login-form > label { margin: 0; }
.checkbox-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
label.checkbox-row, .checkbox-row label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
.inline-actions, .page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-actions > form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline { display: inline-block; margin-right: 12px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); height: 100vh; height: 100dvh; padding: 30px 16px 20px; background: var(--navy); color: var(--on-dark); overflow-y: auto; overscroll-behavior: contain; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-lockup:hover { color: inherit; }
.brand-mark { display: block; width: 36px; height: 36px; color: var(--accent); flex: 0 0 auto; }
.brand-name { display: block; font-size: 1.35rem; font-weight: 750; letter-spacing: -.045em; line-height: 1.3; }
.brand-tagline { display: block; margin-top: 5px; font-size: .49rem; font-weight: 500; letter-spacing: .14em; color: var(--dark-muted); }
.sidebar-brand { color: #fff; padding: 0 10px; margin-bottom: 34px; }
.sidebar-brand:hover { color: #fff; }
.nav-group-label { margin: 0 14px 10px; color: var(--dark-muted); font-size: .7rem; font-weight: 600; letter-spacing: .02em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px 14px; border-radius: 9px; color: var(--on-dark); font-size: .88rem; font-weight: 500; text-decoration: none; }
.sidebar-nav a:hover { color: #fff; background: #ffffff0b; }
.sidebar-nav a[aria-current="page"] { color: var(--dark-accent); background: #383042; font-weight: 650; }
.sidebar-nav a[aria-current="page"]::before { position: absolute; top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 2px; background: var(--dark-accent); content: ""; }
.sidebar-nav a[aria-current="page"] .icon { color: var(--dark-accent); }
.sidebar-guide { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 36px 13px 22px; color: var(--dark-muted); font-size: .76rem; line-height: 1.75; }
.sidebar-guide .icon { color: var(--dark-accent); margin-top: 3px; width: 18px; height: 18px; }
.sidebar-bottom { border-top: 1px solid #ffffff16; padding-top: 18px; }
.operator-card { display: flex; align-items: center; gap: 11px; padding: 0 10px 10px; }
.operator-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #ffffff18; border-radius: 50%; background: #ffffff09; color: var(--on-dark); }
.operator-avatar .icon { width: 18px; height: 18px; }
.operator-info { display: flex; flex-direction: column; min-width: 0; }
.operator-info strong { color: #ffffff; font-size: .85rem; font-weight: 600; }
.operator-info > span { font-size: .7rem; color: var(--dark-muted); }
.logout-form .button { justify-content: flex-start; width: 100%; min-height: 38px; padding: 9px 13px; color: var(--on-dark); font-size: .8rem; }
.logout-form .button:hover { background: #ffffff0b; color: #fff; }
.logout-form .icon { width: 17px; height: 17px; }
.sidebar :focus-visible, .mobile-navigation :focus-visible { outline-color: var(--dark-accent); }
.workspace { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; min-height: 74px; padding: 16px 34px; border-bottom: 1px solid var(--border); background: var(--panel); }
.topbar-context { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); font-size: .77rem; }
.topbar-context > span:first-child { color: var(--ink); font-weight: 650; }
.context-divider { color: var(--border); }
.workspace-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mobile-navigation { display: none; }
.workspace-content { flex: 1; width: 100%; max-width: 1530px; min-width: 0; margin: 0 auto; padding: 32px 34px 28px; }
.workspace-footer, .auth-footer { display: flex; align-items: flex-start; justify-content: center; gap: 8px; color: var(--muted); font-size: .71rem; line-height: 1.7; }
.workspace-footer { margin: 0 34px; padding: 18px 0 22px; border-top: 1px solid var(--border); }
.workspace-footer .icon, .auth-footer .icon { width: 15px; height: 15px; margin-top: 2px; }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 26px; }
.page-header > div:first-child { min-width: 0; }
.eyebrow { margin-bottom: 7px; font-size: .63rem; font-weight: 750; letter-spacing: .14em; color: var(--accent); line-height: 1.5; }
.page-description { margin-top: 9px; color: var(--muted); font-size: .86rem; line-height: 1.8; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 22px; min-width: 0; }
.grid > *, .form-grid > *, .stats-grid > *, .account-controls > * { min-width: 0; }
.grid > section { margin: 0; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack > * { min-width: 0; }
.stack > section { margin: 0; }
.compact-stack { gap: 16px; }
.stack > button { align-self: flex-start; }
.card { min-width: 0; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: 0 3px 6px #20212703; }
.card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.card-header > div { min-width: 0; }
.card-title { margin: 0; font-size: 1.04rem; letter-spacing: -.025em; }
.card-subtitle { margin-top: 5px; font-size: .77rem; color: var(--muted); line-height: 1.7; }
.card-body { padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 28px 0 15px; }
.section-heading h2 { font-size: 1.03rem; }
.section-heading .hint { margin-top: 5px; }
.heading-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 23px; margin-left: 6px; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 20px 22px 19px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: 0 3px 6px #20212703; }
.stat-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 30px; }
.stat-label { color: var(--muted); font-size: .81rem; font-weight: 600; }
.stat-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--canvas); color: var(--muted); }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-value { display: block; margin: 10px 0 6px; font-size: clamp(1.75rem, 2.6vw, 2.1rem); font-weight: 700; line-height: 1.2; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat-meta { color: var(--muted); font-size: .71rem; line-height: 1.7; }
.stat-meta strong { color: var(--ink); }
.stat-card-accent { background: var(--accent-soft); border-color: var(--accent-border); }
.stat-card-accent .stat-value { color: var(--accent); }
.stat-card-accent .stat-icon { background: var(--accent-soft); color: var(--accent); }
.stat-pair { display: flex; align-items: baseline; flex-wrap: wrap; gap: 11px; }
.stat-separator { color: var(--border); font-size: 1.3rem; font-weight: 400; }
.badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; background: var(--canvas); color: var(--muted); font-size: .7rem; font-weight: 600; line-height: 1.6; vertical-align: middle; }
.badge .icon { width: 13px; height: 13px; }
.badge.success { background: #e9f6ef; color: #247347; border-color: #d4eadf; }
.badge.warning { background: #fff5df; color: #896015; border-color: #f0e3ba; }
.badge.danger { background: #fceef0; color: #a93243; border-color: #f3d7dc; }
.badge.neutral { background: var(--canvas); color: var(--muted); border-color: var(--border); }
.badge.info { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-border); }
.notice { min-width: 0; margin: 0 0 22px; padding: 14px 17px; border: 1px solid #eddfb3; border-radius: 10px; background: #fff8e7; color: #79591f; font-size: .82rem; line-height: 1.7; }
.notice:has(> .icon) { display: flex; align-items: flex-start; gap: 10px; }
.notice > .icon { margin-top: 2px; width: 18px; height: 18px; }
.notice > div { min-width: 0; flex: 1; }
.notice p { margin-top: 3px; }
.notice a { color: inherit; font-weight: 600; }
.notice.warning { background: #fff8e7; color: #79591f; border-color: #eddfb3; }
.notice.info { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-border); }
.notice.danger { background: #fceff0; color: #a93243; border-color: #f0d7dc; }
.overdue { color: var(--danger); font-weight: 700; }

.table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table, .table { width: 100%; min-width: 0; border-collapse: collapse; text-align: left; font-size: .81rem; }
.table-wrap > table { min-width: 560px; }
th, td { padding: 14px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: #fafafa; color: var(--muted); font-weight: 600; font-size: .73rem; }
td { color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--canvas); }
td form { margin: 0; }
td label { margin: 5px 0; }
.table-time { color: var(--muted); font-size: .76rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-error { max-width: 240px; color: #9b4e50; font-size: .76rem; }
.table-username { display: block; max-width: 240px; color: var(--ink); font-weight: 600; }
.table-secondary { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pagination a, .pagination > span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); font-size: .8rem; text-decoration: none; }
.pagination [aria-current="page"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 260px; padding: 36px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 3px; border: 1px solid var(--border); border-radius: 16px; background: var(--canvas); color: var(--muted); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-state h3 { font-size: .98rem; }
.empty-state p { max-width: 390px; color: var(--muted); font-size: .81rem; line-height: 1.8; }
.empty-state .button, .empty-state .text-link { margin-top: 5px; }
.compact-empty { min-height: 220px; padding: 28px 22px; }
.compact-empty .empty-icon { width: 44px; height: 44px; border-radius: 13px; }

.workflow-card { margin-bottom: 24px; }
.workflow-card .card-header { border-bottom: 0; padding-bottom: 18px; }
.workflow-label { color: var(--muted); font-size: .73rem; }
.workflow-card .workflow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0 12px 14px; }
.workflow-card .workflow-steps > li { position: relative; min-width: 0; padding: 0 12px; }
.workflow-card .workflow-steps > li + li { border-left: 1px solid var(--border); }
.workflow-card .workflow-steps a { display: flex; flex-direction: column; gap: 11px; min-height: 135px; padding: 12px; border-radius: 9px; color: var(--ink); text-decoration: none; transition: background-color .15s; }
.workflow-card .workflow-steps a:hover { background: var(--accent-soft); }
.workflow-step-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.workflow-step-top .icon { width: 17px; height: 17px; }
.workflow-number { color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.workflow-step-title { display: flex; align-items: center; gap: 7px; font-size: .87rem; font-weight: 650; }
.workflow-step-title .icon { width: 17px; height: 17px; color: var(--accent); }
.workflow-step-description { color: var(--muted); font-size: .74rem; line-height: 1.7; }
.dashboard-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.campaign-list { list-style: none; padding: 0 24px; margin: 0; }
.campaign-list > li { display: flex; align-items: center; gap: 12px; padding: 19px 0; border-bottom: 1px solid var(--border); }
.campaign-list > li:last-child { border-bottom: 0; }
.campaign-list-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; color: var(--accent); background: var(--accent-soft); }
.campaign-list-icon .icon { width: 18px; height: 18px; }
.campaign-list-content { flex: 1; min-width: 0; }
.campaign-list-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.campaign-list-title h3 { font-size: .86rem; font-weight: 600; }
.campaign-list-content p { margin-top: 5px; color: var(--muted); font-size: .7rem; }
.campaign-order { display: block; }
.campaign-list > li > .badge { flex: 0 0 auto; }
.account-summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 18px 22px; background: #fafafa; border-bottom: 1px solid var(--border); }
.account-summary-stats > div { min-width: 0; text-align: center; }
.account-summary-stats > div + div { border-left: 1px solid var(--border); }
.account-summary-stats dt { color: var(--muted); font-size: .72rem; }
.account-summary-stats dd { margin: 4px 0 0; color: var(--ink); font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.account-summary-table { max-height: 316px; }
.account-summary-table > table { min-width: 380px; }
.account-summary-table th, .account-summary-table td { padding: 13px 18px; }
.account-summary-table th { position: sticky; top: 0; z-index: 1; }
.account-summary-brands { display: flex; flex-direction: column; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); }
.brand-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.jobs-card { margin-top: 24px; }
.jobs-card .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }

.account-list { gap: 18px; }
.account-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 22px 24px; }
.account-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.account-identity > div { min-width: 0; }
.account-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.account-identity h3 { font-size: 1rem; font-weight: 650; }
.account-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.account-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 24px; padding: 17px 0; border-block: 1px solid var(--border); }
.account-facts > div { min-width: 0; }
.account-facts dt { color: var(--muted); font-size: .72rem; }
.account-facts dd { margin: 5px 0 0; font-size: .83rem; font-weight: 550; }
.account-error { margin: 17px 24px 0; }
.account-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; padding: 18px 24px; }
summary { cursor: pointer; }
.details-card > summary, .account-disclosure > summary, .mobile-navigation > summary { list-style: none; }
.details-card > summary::-webkit-details-marker, .account-disclosure > summary::-webkit-details-marker, .mobile-navigation > summary::-webkit-details-marker { display: none; }
.account-disclosure { border: 1px solid var(--border); border-radius: 9px; }
.account-disclosure > summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 11px 15px; border-radius: 8px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.account-disclosure > summary:hover { background: var(--canvas); }
.account-disclosure > summary.connect-summary { color: var(--accent); background: var(--accent-soft); }
.account-disclosure > summary.connect-summary:hover { background: var(--accent-soft); }
.account-disclosure > summary > .icon { width: 17px; height: 17px; }
.disclosure-chevron { margin-left: auto; transition: transform .15s; }
details[open] > summary .disclosure-chevron { transform: rotate(180deg); }
.account-disclosure[open] > summary { border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--border); }
.disclosure-body { padding: 20px; }
.disclosure-body > .hint { margin: 8px 0 18px; }
.account-footnote { display: flex; align-items: flex-start; gap: 7px; margin: 0 24px; padding: 0 0 20px; color: var(--muted); font-size: .73rem; }
.account-footnote .icon { width: 15px; height: 15px; margin-top: 2px; }
.account-empty { min-height: 290px; }
.registration-grid { align-items: start; }
.details-card > summary { display: flex; align-items: center; gap: 12px; padding: 21px 24px; border-radius: var(--radius); }
.details-card > summary:hover { background: #fafafa; }
.details-card[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.disclosure-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.disclosure-heading > span:last-child { min-width: 0; }
.disclosure-heading strong { display: block; font-size: .94rem; }
.disclosure-heading .hint { display: block; margin-top: 3px; font-size: .73rem; }
.section-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; background: var(--canvas); color: var(--accent); }
.registered-brands { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.auth-page { background: var(--canvas); }
.auth-shell { display: flex; flex-direction: column; min-height: 100vh; }
.auth-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; max-width: 1240px; margin: 0 auto; padding: 30px 36px; }
.auth-header-label { color: var(--muted); font-size: .78rem; }
.auth-main { display: flex; flex: 1; flex-direction: column; justify-content: center; width: 100%; max-width: 1130px; margin: 0 auto; padding: 20px 36px 36px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: 0 18px 60px #2021270a; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-width: 0; padding: 46px 40px 34px; border-radius: 21px 0 0 21px; background: var(--navy); color: var(--on-dark); }
.login-story .eyebrow { color: var(--dark-accent); font-size: .61rem; }
.login-story h2 { margin-top: 14px; color: #ffffff; font-size: clamp(1.7rem, 3vw, 2.15rem); line-height: 1.5; letter-spacing: -.045em; }
.login-story-description { max-width: 355px; margin-top: 17px; color: var(--on-dark); font-size: .85rem; line-height: 1.95; }
.login-steps { display: flex; flex-direction: column; gap: 21px; list-style: none; margin: 0; padding: 0; }
.login-steps > li { display: flex; align-items: center; gap: 13px; min-width: 0; }
.story-step-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--dark-border); border-radius: 11px; background: #ffffff08; color: var(--dark-accent); }
.story-step-icon .icon { width: 18px; height: 18px; }
.login-steps strong { display: block; color: #ffffff; font-size: .85rem; font-weight: 600; }
.login-steps li div > span { display: block; margin-top: 2px; color: var(--on-dark); font-size: .73rem; }
.story-step-number { margin-left: auto; color: var(--dark-muted); font-size: .67rem; font-weight: 600; }
.login-story-note { display: flex; align-items: flex-start; gap: 9px; padding-top: 21px; border-top: 1px solid var(--dark-border); color: var(--on-dark); font-size: .71rem; }
.login-story-note .icon { width: 16px; height: 16px; margin-top: 3px; }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin: 0; padding: 48px 42px; border: 0; border-radius: 0 21px 21px 0; background: transparent; }
.login-form-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 25px; border: 1px solid var(--accent-border); border-radius: 13px; color: var(--accent); background: var(--accent-soft); }
.login-form-panel h1 { font-size: 1.6rem; }
.login-form-panel .page-description { margin-top: 8px; }
.local-login-note { margin: 23px 0 0; padding: 13px 14px; font-size: .77rem; }
.local-login-note code { font-weight: 700; font-size: 1.02em; }
.login-form { display: flex; flex-direction: column; gap: 20px; margin-top: 27px; }
.login-form input { min-height: 46px; }
.login-submit { justify-content: space-between; width: 100%; min-height: 46px; margin-top: 4px; }
.login-submit .icon { margin-left: auto; width: 18px; height: 18px; }
.login-help { display: flex; align-items: flex-start; gap: 8px; margin-top: 23px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: .74rem; line-height: 1.8; }
.login-help .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--muted); }
.auth-footer { max-width: 1100px; margin: 0 auto; padding: 0 36px 26px; }
.narrow { width: 100%; max-width: 460px; margin: 30px auto; }
.narrow h1 + p { margin-top: 12px; }

@media (max-width: 1240px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-card .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .workflow-card .workflow-steps > li:nth-child(3) { border-left: 0; }
  .workflow-card .workflow-steps a { min-height: 122px; }
  .account-controls { grid-template-columns: minmax(0, 1fr); }
  .registration-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { position: static; display: block; padding: 0; }
  .topbar-context { display: none; }
  .mobile-navigation { display: block; background: var(--navy); color: var(--on-dark); }
  .mobile-navigation > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 17px 24px; }
  .mobile-navigation .brand-lockup { color: #fff; }
  .mobile-navigation .brand-name { font-size: 1.22rem; }
  .mobile-navigation .brand-mark { width: 32px; height: 32px; }
  .mobile-menu-label { display: inline-flex; align-items: center; gap: 9px; color: var(--on-dark); font-size: .79rem; }
  .mobile-navigation-panel { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); padding: 10px 16px 20px; overflow-y: auto; border-top: 1px solid #ffffff16; }
  .mobile-navigation-panel .sidebar-bottom { margin-top: 18px; }
  .mobile-navigation-panel .logout-form .button { width: auto; }
  .workspace-status { padding: 11px 24px; }
  .workspace-content { padding: 28px 24px; }
  .workspace-footer { margin-inline: 24px; }
  .login-story { padding: 38px 28px 30px; }
  .login-form-panel { padding: 38px 28px; }
  .login-form-panel h1 { font-size: 1.4rem; }
  [id] { scroll-margin-top: 24px; }
}

@media (max-width: 700px) {
  .grid-two, .grid-three, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 18px; }
  .page-header { align-items: flex-start; gap: 17px; margin-bottom: 22px; }
  .page-actions { width: 100%; }
  .card-header, .card-body { padding: 20px; }
  .card-header { align-items: flex-start; }
  .account-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .auth-header { padding: 24px; }
  .auth-main { padding: 0 24px 28px; }
  .login-layout { grid-template-columns: minmax(0, 1fr); border-radius: 16px; }
  .login-form-panel { order: -1; padding: 32px; border-radius: 15px 15px 0 0; }
  .login-form-panel h1 { font-size: 1.6rem; }
  .login-story { padding: 30px 32px; gap: 24px; border-radius: 0 0 15px 15px; }
  .login-story h2 { font-size: 1.7rem; }
  .login-story-description { max-width: none; }
  .login-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
  .login-steps > li { align-items: flex-start; gap: 10px; }
  .story-step-number { display: none; }
  .login-steps li div > span { font-size: .7rem; }
  .story-step-icon { width: 31px; height: 31px; border-radius: 9px; }
  .auth-footer { padding: 0 24px 24px; }
}

@media (max-width: 430px) {
  :root { font-size: 14px; }
  .workspace-content { padding: 24px 16px; }
  .workspace-footer { margin-inline: 16px; }
  .workspace-status { padding: 10px 16px; }
  .mobile-navigation > summary { padding-inline: 16px; }
  .page-description { font-size: .88rem; }
  .page-actions .button { flex: 1; padding-inline: 10px; }
  .stats-grid { gap: 12px; margin-bottom: 20px; }
  .stat-card { padding: 15px 14px; }
  .stat-value { margin-top: 12px; font-size: 2rem; }
  .stat-heading { align-items: flex-start; gap: 5px; }
  .stat-icon { width: 25px; height: 25px; border-radius: 7px; }
  .stat-icon .icon { width: 14px; height: 14px; }
  .stat-label { font-size: .78rem; }
  .stat-meta { font-size: .74rem; }
  .stat-pair { gap: 8px; }
  .card-header, .card-body { padding: 18px; }
  .workflow-card .card-header { padding: 18px; }
  .workflow-label { display: none; }
  .workflow-card .workflow-steps { padding: 0 6px 12px; gap: 8px 0; }
  .workflow-card .workflow-steps > li { padding: 0 5px; }
  .workflow-card .workflow-steps a { padding: 10px; gap: 9px; min-height: 140px; }
  .workflow-step-title { font-size: .85rem; gap: 5px; }
  .workflow-step-title .icon { width: 15px; height: 15px; }
  .workflow-step-description { font-size: .76rem; }
  .campaign-list { padding: 0 18px; }
  .campaign-list > li { flex-wrap: wrap; gap: 9px; }
  .campaign-list-icon { width: 30px; height: 30px; border-radius: 9px; }
  .account-summary-stats { padding-inline: 12px; }
  .account-summary-brands { padding: 16px 18px; }
  .account-card-top { padding: 18px; }
  .account-avatar { width: 38px; height: 38px; border-radius: 11px; }
  .account-facts { margin-inline: 18px; }
  .account-controls { padding: 16px 18px; gap: 10px; }
  .disclosure-body { padding: 16px; }
  .disclosure-body .button { width: 100%; }
  .account-error { margin-inline: 18px; }
  .account-footnote { margin-inline: 18px; }
  .details-card > summary { padding: 18px; }
  .empty-state { padding: 28px 18px; }
  .auth-header { padding: 22px 18px; }
  .auth-header-label { display: none; }
  .auth-main { padding: 0 12px 22px; }
  .login-form-panel { padding: 28px 24px; }
  .login-form-panel h1 { font-size: 1.5rem; }
  .login-form-icon { margin-bottom: 21px; }
  .login-story { padding: 28px 24px; }
  .login-steps { gap: 18px 12px; }
  .login-steps > li { flex-direction: column; gap: 8px; }
  .auth-footer { padding: 0 20px 22px; }
  input, select, textarea { font-size: 16px; }
  th, td { padding: 12px 16px; }
}

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