:root {
  --bg: #f6f8f6;
  --surface: #ffffff;
  --surface-soft: #f1f4f1;
  --ink: #17211c;
  --ink-soft: #5e6a63;
  --muted: #7b857f;
  --line: #dfe5e0;
  --line-strong: #cbdacf;
  --green-950: #0b1713;
  --green-900: #163326;
  --green-800: #174b34;
  --green-700: #23704c;
  --green: #2e9b65;
  --mint: #dff4e9;
  --lime: #c9f1a9;
  --amber: #d88b22;
  --amber-soft: #fff4df;
  --red: #cf5d55;
  --red-soft: #fff0ef;
  --shadow: 0 8px 24px rgba(22, 51, 38, .06);
  --shadow-lg: 0 24px 60px rgba(22, 51, 38, .16);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, .brand strong { font-family: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 600; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.icon, .svg-icon { width: 16px; height: 16px; display: inline-flex; flex: none; vertical-align: middle; }
.svg-icon { overflow: visible; }
.eyebrow { color: var(--green-700); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.login-card .eyebrow { color: #a8d6b5; }
.stack { display: flex; flex-direction: column; }
.gap-16 { gap: 16px; }
.mobile-only { display: none !important; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, .88fr) 1.12fr; background: var(--green-950); color: #fff; overflow: hidden; position: relative; }
.login-card { width: min(440px, calc(100% - 48px)); align-self: center; justify-self: center; position: relative; z-index: 1; }
.login-card h1 { font-size: clamp(38px, 4vw, 56px); line-height: 1.08; letter-spacing: -.055em; margin: 26px 0 16px; }
.login-card h1 em { color: var(--lime); font-style: normal; }
.login-card .intro { color: #aabdb2; font-size: 15px; line-height: 1.65; max-width: 380px; margin-bottom: 30px; }
.login-note { color: #81988a; text-align: center; font-size: 11px; }
.login-glow { display: none; }
.login-side { min-height: 100vh; padding: 88px 10%; display: flex; flex-direction: column; justify-content: center; background: #142c21; position: relative; overflow: hidden; }
.login-side::before { display: none; }
.login-side-copy, .login-stat-row { position: relative; z-index: 1; }
.login-side-copy { max-width: 460px; }
.login-side-copy > span:not(.status-dot) { font-size: 12px; font-weight: 600; color: var(--lime); margin-left: 8px; }
.login-side h2 { font-size: clamp(38px, 4vw, 64px); line-height: 1.04; letter-spacing: -.06em; margin: 34px 0 22px; }
.login-side p { max-width: 390px; color: #a9c4b3; line-height: 1.7; font-size: 16px; }
.login-stat-row { display: flex; gap: 72px; margin-top: 100px; }
.login-stat-row div { display: flex; flex-direction: column; gap: 7px; }
.login-stat-row strong { font-size: 26px; color: #fff; }
.login-stat-row span { color: #92ad9d; font-size: 12px; }
.status-dot { width: 8px; height: 8px; background: #bcc9c0; display: inline-block; border-radius: 50%; flex: none; }
.status-dot.live { background: var(--lime); }

.brand-mark { width: 32px; height: 32px; border-radius: 10px 10px 10px 2px; background: var(--lime); color: var(--green-950); display: grid; place-items: center; font-weight: 600; }
.brand-mark.large { width: 48px; height: 48px; border-radius: 15px 15px 15px 3px; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.login-card .field { color: #d7e6dc; }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); outline: none; padding: 12px 13px; min-height: 44px; transition: border-color .16s ease, box-shadow .16s ease; font-weight: 400; font-size: 13px; }
.login-card .field input { background: #10231b; border-color: #2d4a3a; color: #fff; }
.field input::placeholder, .field textarea::placeholder { color: #9baaa1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 155, 101, .12); }
.login-card .field input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201, 241, 169, .12); }
.field textarea { resize: vertical; line-height: 1.5; }
.button { border: 1px solid transparent; border-radius: var(--radius-sm); min-height: 42px; padding: 0 16px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; white-space: nowrap; }
.button:hover { background: var(--surface-soft); }
.button:active { transform: scale(.98); }
.button.primary { background: var(--green-800); color: white; }
.button.primary:hover { background: var(--green-700); }
.button.full { width: 100%; min-height: 48px; justify-content: space-between; padding: 0 16px 0 20px; }
.login-card .button.primary { background: var(--lime); color: var(--green-950); box-shadow: none; }
.button.subtle { background: var(--surface); color: var(--green-800); border-color: var(--line); }
.button.subtle:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.button.small { min-height: 38px; padding: 0 13px; }
.button.danger { color: var(--red); background: var(--red-soft); border-color: #ffd8d5; }
.text-button { border: 0; background: transparent; color: var(--green-700); font-size: 11px; font-weight: 800; padding: 0 11px; }
.icon-button { border: 0; background: transparent; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-soft); font-size: 18px; }
.icon-button:hover { background: var(--surface-soft); color: var(--ink); }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 246px; flex: none; display: flex; flex-direction: column; min-height: 100vh; background: var(--green-950); color: #dcebe0; padding: 22px 14px 14px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 30px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { color: #fff; font-size: 16px; letter-spacing: -.03em; display: block; }
.brand small { color: #8ca99a; display: block; font-size: 10px; letter-spacing: .02em; margin-top: 2px; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.06); border-radius: 11px; padding: 10px; margin-bottom: 28px; }
.workspace-avatar, .user-avatar { width: 28px; height: 28px; display: grid; place-items: center; background: #2c6148; border-radius: 8px; color: var(--lime); font-weight: 800; font-size: 11px; }
.workspace-switcher strong { display: block; color: #f5fff7; font-size: 11px; }
.workspace-switcher small { display: block; color: #9ab8a8; font-size: 10px; margin-top: 3px; }
.chevron { margin-left: auto; color: #6e8879; }
.nav-label { padding: 0 11px; color: #87a294; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.nav-label.second { margin-top: 28px; }
.nav-list { display: flex; flex-direction: column; }
.nav-item { width: 100%; color: #bfd0c5; border: 0; background: transparent; min-height: 41px; border-radius: 9px; display: flex; align-items: center; gap: 11px; padding: 0 11px; font-size: 12px; font-weight: 600; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #1b3c2b; box-shadow: inset 3px 0 var(--lime); }
.nav-icon { width: 18px; color: #86a698; }
.nav-item.active .nav-icon { color: var(--lime); }
.nav-count { margin-left: auto; color: #9ab8a8; font-size: 12px; min-width: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.nav-count.accent { color: var(--lime); }
.sidebar-bottom { margin-top: auto; }
.folder-status { border-top: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); margin: 0 -14px; padding: 14px 18px; display: flex; align-items: center; gap: 8px; }
.folder-icon { color: var(--lime); font-size: 19px; }
.folder-status strong { font-size: 11px; color: #dbece0; display: block; font-family: inherit; font-weight: 700; }
.folder-status small { font-size: 10px; color: #9ab8a8; display: block; margin-top: 4px; }
.folder-status .status-dot { margin-left: auto; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 14px 5px 0; }
.user-avatar { border-radius: 50%; background: #8eaf9c; color: var(--green-950); }
.user-copy { flex: 1; min-width: 0; }
.user-copy strong { display: block; color: #e3f1e7; font-family: inherit; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { color: #9ab8a8; font-size: 10px; display: block; margin-top: 2px; }
.sidebar-user .icon-button { color: #789688; font-size: 15px; }

.main-content { min-width: 0; flex: 1; }
.topbar { height: 70px; padding: 0 4.5%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(245,248,246,.78); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 5; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.breadcrumbs b { color: var(--line-strong); font-weight: 500; }
.breadcrumbs strong { color: var(--ink); font-size: 12px; }
.topbar-actions { display: flex; gap: 9px; }
.content-wrap { max-width: 1450px; margin: 0 auto; padding: 38px 4.5% 70px; }
.view { display: none; animation: fade-in .25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-intro h1 { font-size: 29px; letter-spacing: -.055em; margin: 8px 0 8px; }
.page-intro p { font-size: 13px; color: var(--ink-soft); }
.date-control { display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; height: 38px; }
.date-control select { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; font-weight: 700; }
.date-control span { color: var(--green); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 17px; min-width: 0; }
.metric-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.metric-label { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.metric-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--mint); color: var(--green-700); display: grid; place-items: center; font-size: 15px; }
.metric-value { font-size: 25px; letter-spacing: -.05em; margin-top: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.metric-bottom { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-size: 11px; color: var(--ink-soft); }
.metric-bottom .trend { color: var(--green-700); font-weight: 800; background: var(--mint); border-radius: 20px; padding: 3px 6px; }
.metric-bottom .trend.secondary { color: var(--amber); background: var(--amber-soft); }
.metric-bottom .trend.important { color: var(--green-950); background: var(--lime); }
.trend-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; background: currentColor; margin: 0 4px 1px 1px; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-header { padding: 19px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 14px; letter-spacing: -.02em; }
.panel-header p { color: var(--ink-soft); font-size: 12px; margin-top: 5px; }
.panel-link { border: 0; background: transparent; color: var(--green-700); font-size: 11px; font-weight: 800; }
.chart-area { padding: 19px 20px 11px; }
.chart-legend { display: flex; gap: 15px; justify-content: flex-end; margin-bottom: 18px; font-size: 11px; color: var(--ink-soft); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; background: var(--green); }
.legend-dot.sales { background: var(--green-950); }
.bar-chart { height: 192px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line); background: transparent; padding: 0 3px; position: relative; }
.bar-chart::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: #edf1ee; height: 1px; top: 25%; box-shadow: 0 48px #edf1ee, 0 96px #edf1ee; }
.chart-column { flex: 1; min-width: 15px; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; z-index: 1; }
.chart-column .bar { width: 9px; border-radius: 4px 4px 0 0; background: var(--green); min-height: 2px; }
.chart-column .bar.sales { background: var(--green-950); opacity: .86; }
.chart-column label { position: absolute; bottom: -22px; color: var(--muted); font-size: 10px; }
.chart-empty { color: var(--muted); font-size: 12px; align-self: center; margin: auto; }
.category-list { padding: 0 20px; }
.category-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.category-row:last-child { border-bottom: 0; }
.category-row-top { display: flex; align-items: center; justify-content: space-between; }
.category-name { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.category-chip { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--green); }
.category-chip.women { background: #9ab8a8; }
.category-row-top strong { font-size: 13px; }
.category-meta { display: flex; justify-content: space-between; margin-top: 12px; color: var(--ink-soft); font-size: 11px; }
.category-meta b { color: var(--ink); }
.progress-track { height: 5px; background: #edf2ee; border-radius: 5px; margin-top: 12px; overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.insight-panel { margin-top: 16px; padding: 18px 20px; background: var(--green-900); color: #fff; border-radius: var(--radius); display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow); }
.insight-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--lime); color: var(--green-950); font-size: 17px; }
.insight-panel .eyebrow { color: var(--lime); }
.insight-panel p { color: #c2d7c8; font-size: 12px; line-height: 1.6; margin-top: 6px; }

.library-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 13px; margin-bottom: 21px; }
.tabs { background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 10px; display: flex; gap: 3px; }
.tabs button { border: 0; background: transparent; border-radius: 7px; padding: 8px 13px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.tabs button.active { color: var(--green-950); background: var(--lime); }
.filters { display: flex; gap: 7px; align-items: center; }
.filters select, .search-input { height: 37px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); outline: 0; padding: 0 11px; font-size: 11px; font-weight: 700; }
.search-input { width: 190px; font-weight: 500; }
.creative-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.creative-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.creative-preview { height: 168px; position: relative; background: #274b38; overflow: hidden; display: grid; place-items: center; }
.creative-preview.poster { background: #e8ece7; }
.creative-preview.women { background: #274b38; }
.creative-preview.local { background: #0f1e17; }
.creative-preview img, .creative-preview video { width: 100%; height: 100%; object-fit: cover; }
.creative-preview::after { display: none; }
.preview-fallback { z-index: 1; text-align: center; color: rgba(255,255,255,.8); padding: 18px; }
.creative-preview.poster .preview-fallback { color: var(--green-800); }
.preview-fallback strong { display: block; font-size: 33px; letter-spacing: -.08em; opacity: .9; }
.preview-fallback small { display: block; font-size: 10px; margin-top: 6px; opacity: .85; }
.creative-type { position: absolute; top: 11px; left: 11px; z-index: 2; border-radius: 6px; padding: 5px 8px; background: rgba(6,22,14,.78); color: #fff; font-size: 10px; font-weight: 600; }
.creative-status { position: absolute; right: 10px; top: 10px; z-index: 2; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 5px 8px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.winning { color: #155a38; background: var(--lime); }
.badge.monitor { color: #8f5d16; background: var(--amber-soft); }
.badge.kill { color: #a84039; background: var(--red-soft); }
.badge.learning { color: #5e7267; background: #edf2ee; }
.creative-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.creative-title { font-size: 13px; line-height: 1.35; margin-bottom: 6px; }
.creative-filename { color: var(--green-700); font-family: monospace; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creative-copy { color: var(--ink-soft); font-size: 11px; line-height: 1.5; margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 33px; }
.creative-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.creative-metrics div { min-width: 0; }
.creative-metrics span { display: block; color: var(--muted); font-size: 10px; }
.creative-metrics b { display: block; font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.creative-actions { display: flex; gap: 6px; margin-top: 14px; }
.creative-actions button { flex: 1; min-height: 31px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--green-800); font-size: 11px; font-weight: 700; }
.creative-actions button:hover { border-color: var(--green); background: var(--mint); }
.creative-actions button.edit { flex: 0 0 34px; font-size: 14px; }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line-strong); background: var(--surface); padding: 52px 20px; text-align: center; border-radius: var(--radius); color: var(--ink-soft); }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 7px; }
.empty-state p { font-size: 12px; }

.winning-hero { background: var(--green-900); color: #fff; border-radius: var(--radius); padding: 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 17px; overflow: hidden; position: relative; }
.winning-hero::after { display: none; }
.winning-hero > * { position: relative; z-index: 1; }
.winning-hero h2 { font-size: 24px; letter-spacing: -.05em; margin: 9px 0 7px; }
.winning-hero p { color: #b9cfbf; font-size: 12px; }
.winning-count { text-align: right; }
.winning-count strong { color: var(--lime); font-size: 46px; letter-spacing: -.08em; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.winning-count span { color: #99b2a2; font-size: 10px; }
.split-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 17px; }
.small-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; }
.small-stat span { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.small-stat strong { display: block; font-size: 20px; margin-top: 10px; }
.small-stat p { color: var(--muted); font-size: 10px; margin-top: 5px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 16px; }
.settings-card { padding: 22px; }
.settings-card h2 { font-size: 15px; margin-bottom: 6px; }
.settings-card > p { color: var(--ink-soft); font-size: 11px; line-height: 1.5; margin-bottom: 21px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid .full-span { grid-column: 1 / -1; }
.input-with-action { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-height: 44px; overflow: hidden; }
.input-with-action input { flex: 1; border: 0; min-width: 0; }
.input-with-action:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,155,101,.12); }
.integration-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); gap: 14px; }
.integration-row > div:first-child { display: flex; align-items: center; gap: 11px; }
.integration-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; background: #1c75ea; font-size: 11px; }
.integration-logo.omnix { background: var(--green); }
.integration-row strong { display: block; font-family: inherit; font-size: 12px; }
.integration-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.integration-state { color: var(--muted); font-size: 10px; font-weight: 800; }
.integration-state.connected { color: var(--green-700); }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.sync-date { display: flex; gap: 8px; margin: 17px 0 2px; }
.sync-date label { flex: 1; }
.sync-date input { width: 100%; }
.last-sync { padding: 13px; border-radius: 9px; background: var(--surface-soft); color: var(--ink-soft); font-size: 10px; line-height: 1.5; margin-top: 16px; }
.folder-card { background: var(--green-900); color: #fff; padding: 22px; }
.folder-card h2 { color: #fff; }
.folder-card > p { color: #b5cdbd; }
.folder-card .button { margin-top: 6px; }
.folder-guide { margin-top: 25px; }
.folder-guide li { color: #b5cdbd; font-size: 11px; line-height: 1.5; margin-bottom: 11px; }
.folder-guide ol { padding-left: 17px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(6, 18, 12, .55); backdrop-filter: blur(5px); z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal-card { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal-card.wide { width: min(700px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 23px 24px 20px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 20px; letter-spacing: -.04em; margin-top: 7px; }
.modal-form { padding: 21px 24px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 22px; margin-top: 21px; border-top: 1px solid var(--line); }

#toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { max-width: 340px; background: var(--green-950); color: #fff; border-radius: 10px; padding: 12px 15px; font-size: 11px; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; }
.toast.error { background: #8e3e39; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

::selection { color: var(--green-950); background: var(--lime); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(46, 155, 101, .28); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .62; transform: none !important; }

@media (max-width: 1100px) {
  .sidebar { width: 220px; }
  .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .login-shell { display: block; }
  .login-card { padding: 62px 0 50px; }
  .login-side { min-height: 380px; padding: 55px 9%; }
  .login-stat-row { margin-top: 52px; }
  .sidebar { position: fixed; z-index: 15; left: 0; top: 0; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 15px 0 40px rgba(0,0,0,.2); }
  .app-shell.menu-open .sidebar { transform: none; }
  .mobile-only { display: grid !important; }
  .topbar { height: 62px; padding: 0 18px; gap: 12px; }
  .topbar .mobile-only { flex: none; }
  .breadcrumbs { flex: 1; }
  .topbar-actions .subtle { display: none; }
  .content-wrap { padding: 27px 18px 50px; }
  .page-intro { display: block; }
  .page-intro .date-control { margin-top: 18px; width: max-content; }
  .section-grid, .settings-grid { grid-template-columns: 1fr; }
  .creative-grid { grid-template-columns: 1fr; }
  .split-summary { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
  .form-grid .full-span { grid-column: auto; }
  .filters { width: 100%; flex-wrap: wrap; }
  .search-input { flex: 1; width: auto; }
  .winning-hero { display: block; }
  .winning-count { text-align: left; margin-top: 22px; }
}
@media (max-width: 460px) {
  .metric-grid { grid-template-columns: 1fr; }
  .login-card { width: calc(100% - 36px); }
  .topbar-actions .primary { padding: 0 10px; font-size: 0; }
  .topbar-actions .primary span { font-size: 20px; }
  .chart-area { overflow-x: auto; }
  .bar-chart { min-width: 420px; }
}
