:root {
  --ink: #16202a;
  --muted: #64717d;
  --canvas: #f3f6f8;
  --panel: #ffffff;
  --border: #d9e1e7;
  --primary: #0b7285;
  --primary-dark: #075766;
  --success: #19734a;
  --warning: #a66300;
  --danger: #b33a3a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: flex; }
.sidebar { width: 232px; flex: 0 0 232px; background: #162b36; color: #dbe8ed; padding: 24px 16px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 28px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #67d4da; color: #8ee9ea; font: 700 12px/1 "Cascadia Code", monospace; letter-spacing: -1px; }
.brand strong, .brand small { display: block; }
.brand strong { color: #fff; font-size: 15px; letter-spacing: .02em; }
.brand small { color: #8fa8b1; font-size: 11px; margin-top: 3px; }
.nav { display: grid; gap: 4px; }
.nav-item { border: 0; background: transparent; color: #adc0c7; text-align: left; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 6px; font-size: 13px; }
.nav-item:hover, .nav-item.active { color: #fff; background: #21434f; }
.nav-item span { font-family: "Cascadia Code", monospace; color: #6f99a4; }
.sidebar-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; color: #8fa8b1; font-size: 11px; padding: 12px 8px 0; border-top: 1px solid #2a4b56; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #66d19e; }
.main { flex: 1; min-width: 0; padding: 26px 34px 48px; }
.topbar, .section-toolbar, .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar { margin-bottom: 26px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; letter-spacing: -.03em; }
h2 { font-size: 23px; letter-spacing: -.025em; }
h3 { font-size: 16px; }
.eyebrow { color: var(--primary); font: 700 10px/1.2 "Cascadia Code", monospace; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.top-actions, .toolbar-controls, .form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { border: 1px solid transparent; border-radius: 6px; padding: 10px 14px; font-weight: 650; font-size: 13px; }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { color: var(--primary-dark); background: #e5f1f2; border-color: #c8e3e5; }
.button.publish-button { color: #fff; background: #a66300; border-color: #8c5200; }
.button.publish-button:hover { background: #8c5200; }
.text-button { border: 0; background: transparent; color: var(--primary); font-size: 12px; font-weight: 650; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-pill.neutral { background: #e7edf0; color: #5c6d76; }
.status-pill.success { background: #e3f3eb; color: var(--success); }
.status-pill.warning { background: #fff2dd; color: var(--warning); }
.hero { display: flex; justify-content: space-between; gap: 22px; background: #dfeef0; border: 1px solid #c7e0e2; padding: 28px; margin-bottom: 18px; }
.hero h2 { max-width: 650px; font-size: 30px; }
.hero-copy { max-width: 680px; color: #4f6872; margin-top: 10px; line-height: 1.7; }
.hero-badge { min-width: 150px; align-self: flex-start; border-left: 1px solid #a8cacc; padding-left: 18px; color: var(--primary-dark); }
.hero-badge span, .hero-badge strong { display: block; }
.hero-badge span { font: 700 10px/1.2 "Cascadia Code", monospace; letter-spacing: .1em; }
.hero-badge strong { margin-top: 8px; font-size: 17px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.metrics article { background: var(--panel); border: 1px solid var(--border); padding: 17px; min-height: 112px; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 12px; }
.metrics strong { display: block; font: 700 26px/1.1 "Cascadia Code", monospace; margin: 12px 0 7px; }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--border); padding: 20px; }
.panel-head { margin-bottom: 16px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.mini-list { display: grid; gap: 8px; }
.mini-item { border-top: 1px solid #edf1f3; padding: 12px 0; display: flex; justify-content: space-between; gap: 15px; }
.mini-item:first-child { border-top: 0; padding-top: 0; }
.mini-item strong, .mini-item small { display: block; }
.mini-item small { color: var(--muted); margin-top: 4px; font-size: 12px; }
.view { display: none; }
.active-view { display: block; }
.section-toolbar { margin-bottom: 20px; }
input, select, textarea { background: #fff; border: 1px solid var(--border); border-radius: 5px; color: var(--ink); padding: 9px 11px; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,114,133,.12); }
.toolbar-controls input { min-width: 210px; }
.table-panel { padding: 0; overflow: hidden; }
.form-panel + .table-panel { margin-top: 18px; }
.keyword-ideas-head { padding: 18px 20px 14px; margin-bottom: 0; background: #f8fafb; border-bottom: 1px solid var(--border); align-items: flex-end; }
.keyword-ideas-head .eyebrow { margin-bottom: 5px; }
.keyword-ideas-actions { justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #edf1f3; white-space: nowrap; font-size: 12px; }
th { color: #687781; background: #f8fafb; font: 700 10px/1.2 "Cascadia Code", monospace; letter-spacing: .05em; text-transform: uppercase; }
td { color: #33434d; }
td strong { color: var(--ink); }
.table-action { color: var(--primary); border: 0; background: transparent; font-weight: 650; margin-right: 8px; }
.table-action.dry-run-action { color: var(--primary-dark); }
.table-action.publish-action { color: #8c5200; }
.table-action.activate-action { color: var(--danger); }
.table-action.danger-action { color: var(--danger); }
#view-links table { min-width: 1120px; table-layout: fixed; }
#view-links th:nth-child(1), #view-links td:nth-child(1) { width: 150px; }
#view-links th:nth-child(2), #view-links td:nth-child(2) { width: 285px; }
#view-links th:nth-child(3), #view-links td:nth-child(3) { width: 78px; }
#view-links th:nth-child(4), #view-links td:nth-child(4) { width: 92px; }
#view-links th:nth-child(5), #view-links td:nth-child(5) { width: 102px; }
#view-links th:nth-child(6), #view-links td:nth-child(6) { width: 190px; }
#view-links th:nth-child(7), #view-links td:nth-child(7) { width: 360px; }
#view-links td.link-source-target { white-space: normal; vertical-align: top; }
#view-links td:nth-child(1), #view-links td.link-source-target { overflow: hidden; }
#view-links td:nth-child(1) strong, #view-links td:nth-child(1) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-url { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; line-height: 1.6; }
.link-result-cell { white-space: normal; vertical-align: top; }
.link-result { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.link-result-detail { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--danger); line-height: 1.6; }
.link-result-time { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; white-space: nowrap; }
.form-panel { max-width: 900px; }
.hidden-panel { display: none; margin-bottom: 18px; }
.hidden-panel.open { display: block; }
.form-panel > label, .form-grid label { display: grid; gap: 7px; color: #43545d; font-size: 12px; font-weight: 650; margin-bottom: 17px; }
.draft-keywords-field { margin-bottom: 17px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.field-label-row label { color: #43545d; font-size: 12px; font-weight: 650; }
.inline-select-label { display: inline-flex; align-items: center; gap: 7px; color: #43545d; font-size: 12px; font-weight: 650; }
.inline-select-label select { padding-top: 7px; padding-bottom: 7px; }
.draft-keywords-field textarea { display: block; width: 100%; }
.button-small { padding: 7px 10px; font-size: 12px; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.keyword-options { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: -3px 0 17px; }
.check-label { display: inline-flex; align-items: center; gap: 8px; color: #43545d; font-size: 12px; font-weight: 650; }
.check-label input { accent-color: var(--primary); }
.quick-choice-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1px; }
.quick-choice { min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafb; color: #43545d; font-size: 11px; font-weight: 700; transition: background 150ms ease, border-color 150ms ease, color 150ms ease; }
.quick-choice:hover { border-color: #9ecdd1; background: #edf8f8; color: var(--primary-dark); }
.quick-choice[aria-pressed="true"] { border-color: var(--primary); background: #e5f4f5; color: var(--primary-dark); box-shadow: inset 0 0 0 1px rgba(11,114,133,.12); }
.quick-choice:focus-visible, .text-button:focus-visible { outline: 3px solid rgba(11,114,133,.25); outline-offset: 2px; }
.draft-link-country-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draft-link-country-tools .text-button { padding: 0; font-size: 11px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { margin-bottom: 0; }
.campaign-link-settings { margin: 2px 0 18px; padding: 16px; border: 1px solid #cfe2e4; background: #f5fbfb; border-radius: 7px; }
.campaign-link-toggle { margin: 2px 0 12px; }
.link-inline-settings { padding-top: 4px; }
.link-inline-settings[hidden] { display: none; }
.campaign-url { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campaign-suffix { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty, .empty-panel { color: var(--muted); text-align: center; }
.empty { padding: 38px 15px; }
.empty-panel { padding: 76px 25px; }
.empty-icon { color: var(--primary); font: 28px/1 "Cascadia Code", monospace; margin-bottom: 14px; }
.empty-panel p { margin: 10px auto 22px; max-width: 480px; }
.settings-row { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid #edf1f3; border-bottom: 1px solid #edf1f3; margin: 16px 0; font-size: 13px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(15, 35, 44, .48); }
.modal-backdrop[hidden] { display: none; }
.modal-open { overflow: hidden; }
.keyword-planner-modal { width: min(1080px, 100%); max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid #c7d6dc; border-radius: 10px; box-shadow: 0 22px 70px rgba(15, 35, 44, .24); padding: 24px; }
.publish-confirm-modal { width: min(620px, 100%); background: var(--panel); border: 1px solid #e4c796; border-radius: 10px; box-shadow: 0 22px 70px rgba(15, 35, 44, .24); padding: 24px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.modal-head .eyebrow { margin-bottom: 6px; }
.modal-intro { margin-bottom: 20px; }
.publish-summary { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; padding: 14px; margin-bottom: 18px; background: #fff8eb; border: 1px solid #f0d7a8; border-radius: 6px; font-size: 12px; }
.publish-summary span { color: var(--muted); }
.publish-summary strong { overflow-wrap: anywhere; }
.confirmation-label { display: grid; gap: 7px; color: #43545d; font-size: 12px; font-weight: 650; margin-bottom: 14px; }
.publish-check { margin: 8px 0 12px; }
.publish-warning { margin-bottom: 4px; }
.activate-confirm-modal { border-color: #e2b9b9; }
.keyword-planner-modal > label { display: grid; gap: 7px; color: #43545d; font-size: 12px; font-weight: 650; margin-bottom: 17px; }
.modal-results { margin-top: 4px; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.modal-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px 12px; background: #f8fafb; border-bottom: 1px solid var(--border); }
.modal-results-head .eyebrow { margin-bottom: 4px; }
.modal-results-head h4 { margin: 0; font-size: 14px; }
.modal-results .table-wrap { max-height: 300px; overflow: auto; }
.modal-results table { min-width: 760px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 980px) { .sidebar { width: 204px; flex-basis: 204px; } .main { padding: 22px; } .metrics { grid-template-columns: repeat(2, 1fr); } .grid-two { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .keyword-ideas-head { align-items: flex-start; flex-direction: column; } .keyword-ideas-actions { width: 100%; justify-content: flex-start; } }
@media (max-width: 700px) { .shell { display: block; } .sidebar { width: 100%; padding: 14px; } .brand { padding-bottom: 14px; } .nav { grid-template-columns: repeat(3, 1fr); } .sidebar-foot { display: none; } .topbar, .section-toolbar { align-items: flex-start; flex-direction: column; } .hero { flex-direction: column; padding: 20px; } .hero h2 { font-size: 24px; } .hero-badge { border-left: 0; border-top: 1px solid #a8cacc; padding: 14px 0 0; } .form-grid { grid-template-columns: 1fr; } .modal-backdrop { padding: 12px; } .keyword-planner-modal { padding: 18px; max-height: 94vh; } .modal-footer { flex-direction: column-reverse; } .modal-footer .button { width: 100%; } }

.notification-button { border: 1px solid var(--border); background: var(--panel); color: var(--ink); border-radius: 7px; padding: 8px 11px; font-weight: 700; cursor: pointer; }
.notification-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 999px; background: #e7edf0; color: var(--muted); font-size: 11px; }
.notification-count.has-alert { background: #ffe4e1; color: var(--danger); }
.notification-panel { position: relative; z-index: 5; max-width: 760px; margin: -4px 0 18px auto; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 16px 34px rgba(15, 35, 44, .12); padding: 16px 18px; }
.notification-panel[hidden] { display: none; }
.notification-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.notification-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 12px; border-left: 3px solid #9aaab2; background: #f7fafb; }
.notification-item.warning { border-left-color: var(--warning); background: #fffaf1; }
.notification-item.error { border-left-color: var(--danger); background: #fff6f5; }
.notification-item.success { border-left-color: var(--success); }
.notification-item.read { opacity: .65; }
.notification-item p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.notification-item small { color: var(--muted); font-size: 11px; }
.profit-statuses { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.profit-statuses strong { color: var(--ink); margin-left: 4px; }
.analytics-controls { max-width: none; margin-bottom: 18px; }
.sort-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.sort-button:hover, .sort-button.active { color: var(--primary-dark); }
.sort-button span { color: var(--muted); font-size: 12px; }

/* ─────────────────────────────────────────────────────────────
   2026 visual refresh · Minimal enterprise operations console
   ───────────────────────────────────────────────────────────── */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --canvas: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --navy: #0f172a;
  --navy-2: #172554;
  --accent: #ea580c;
  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --ring: rgba(37, 99, 235, .22);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 5px 14px rgba(15, 23, 42, .035);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-ui: "Fira Sans", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-data: "Fira Code", "Cascadia Code", Consolas, monospace;
}

html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
}
button, input, select, textarea { font-family: inherit; }
button, .nav-item, .table-action, .text-button { touch-action: manipulation; }
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }
.shell { min-height: 100vh; background: var(--canvas); }
.sidebar {
  width: 248px;
  flex-basis: 248px;
  padding: 22px 14px 18px;
  background: var(--navy);
  border-right: 1px solid rgba(148, 163, 184, .16);
  box-shadow: 10px 0 30px rgba(15, 23, 42, .04);
}
.brand { padding: 6px 10px 30px; gap: 12px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(147, 197, 253, .7);
  border-radius: 10px;
  background: rgba(37, 99, 235, .18);
  color: #bfdbfe;
  font-family: var(--font-data);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { color: #94a3b8; font-size: 11px; }
.nav { gap: 5px; }
.nav-item {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 550;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.nav-item:hover { background: rgba(148, 163, 184, .12); color: #fff; }
.nav-item.active {
  background: rgba(37, 99, 235, .22);
  border-color: rgba(96, 165, 250, .32);
  color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa;
}
.nav-item span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #94a3b8;
  font: 500 13px/1 var(--font-data);
}
.nav-item.active span { color: #bfdbfe; background: rgba(147, 197, 253, .12); }
.sidebar-foot { color: #94a3b8; border-top-color: rgba(148, 163, 184, .18); padding: 16px 10px 0; }
.status-dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .12); }
.main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px clamp(18px, 3.2vw, 48px) 64px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -20px calc(clamp(18px, 3.2vw, 48px) * -1) 24px;
  padding: 18px clamp(18px, 3.2vw, 48px) 16px;
  background: rgba(248, 250, 252, .94);
  border-bottom: 1px solid rgba(226, 232, 240, .72);
  backdrop-filter: blur(14px);
}
h1, h2, h3 { font-family: var(--font-ui); color: var(--ink); }
h1 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 750; letter-spacing: -.035em; }
h2 { font-size: clamp(21px, 1.8vw, 28px); font-weight: 730; letter-spacing: -.03em; }
h3 { font-size: 16px; font-weight: 700; }
.eyebrow {
  color: #2563eb;
  font: 700 10px/1.2 var(--font-data);
  letter-spacing: .14em;
}
.top-actions { gap: 8px; }
.button {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.secondary { background: #fff; border-color: var(--border-strong); color: #334155; }
.button.secondary:hover { background: var(--primary-soft); border-color: #93c5fd; color: #1d4ed8; }
.button.publish-button { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.publish-button:hover { background: #c2410c; border-color: #c2410c; }
.text-button { min-height: 36px; padding: 7px 10px; border-radius: 7px; color: #2563eb; font-weight: 700; transition: background 180ms ease, color 180ms ease; }
.text-button:hover { background: var(--primary-soft); color: var(--primary-dark); }
.status-pill { min-height: 26px; padding: 5px 10px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-pill.neutral { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.status-pill.success { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.status-pill.warning { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 3vw, 36px);
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 72%, #eff6ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.hero::after { content: ""; position: absolute; right: -100px; top: -110px; width: 280px; height: 280px; border-radius: 50%; background: rgba(37, 99, 235, .08); pointer-events: none; }
.hero h2 { position: relative; z-index: 1; max-width: 720px; font-size: clamp(25px, 3vw, 38px); line-height: 1.16; }
.hero-copy { position: relative; z-index: 1; max-width: 720px; margin-top: 12px; color: #475569; line-height: 1.75; }
.hero-badge { position: relative; z-index: 1; min-width: 170px; align-self: flex-start; border-left-color: #bfdbfe; color: #1e3a8a; }
.hero-badge strong { font-size: 16px; }
.metrics { gap: 14px; margin-bottom: 20px; }
.metrics article {
  position: relative;
  min-height: 128px;
  padding: 18px 18px 16px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.metrics article:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metrics article::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: #bfdbfe; }
.metrics article:nth-child(2)::before { background: #60a5fa; }
.metrics article:nth-child(3)::before { background: #34d399; }
.metrics article:nth-child(4)::before { background: #fb923c; }
.metrics span, .metrics small { color: #64748b; font-size: 12px; }
.metrics strong { margin: 16px 0 8px; color: var(--ink); font: 700 27px/1 var(--font-data); letter-spacing: -.04em; }
.grid-two { gap: 20px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.panel-head { margin-bottom: 18px; }
.muted { color: #64748b; font-size: 13px; line-height: 1.65; }
.mini-item { border-top-color: #eef2f7; padding: 14px 0; }
.mini-item strong { font-size: 13px; }
.view.active-view { animation: view-in 180ms ease both; }
@keyframes view-in { from { opacity: .01; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
input, select, textarea {
  min-height: 44px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
textarea { min-height: 112px; line-height: 1.55; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .nav-item:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.form-panel { max-width: 1040px; }
.account-directory-panel { max-width: none; }
.account-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 16px; padding-top: 16px; border-top: 1px solid #eef2f7; }
.account-toolbar label { display: inline-flex; align-items: center; gap: 8px; color: #334155; font-size: 13px; font-weight: 650; }
.account-toolbar select { min-width: 250px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.account-card { min-width: 0; padding: 17px; background: #fbfdff; border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.account-card:hover { border-color: #93c5fd; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.account-card.is-manager { background: #f8fafc; }
.account-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-mcc { margin-bottom: 7px; color: #2563eb; font: 700 10px/1.2 var(--font-data); letter-spacing: .08em; text-transform: uppercase; }
.account-card h4 { overflow-wrap: anywhere; font-size: 16px; }
.account-card-head small { display: block; margin-top: 6px; color: #64748b; font-size: 11px; overflow-wrap: anywhere; }
.account-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 14px; }
.account-card-stats > div, .account-card-facts > div { min-width: 0; padding: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; }
.account-card-stats span, .account-card-facts span { display: block; color: #64748b; font-size: 11px; }
.account-card-stats strong { display: block; margin-top: 7px; color: var(--ink); font: 700 17px/1.1 var(--font-data); overflow-wrap: anywhere; }
.account-card-stats small { display: block; margin-top: 5px; color: #64748b; font-size: 10px; }
.account-card-facts { display: grid; gap: 7px; }
.account-card-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-card-facts strong { color: #9a3412; font-size: 11px; font-weight: 650; text-align: right; }
.account-empty { grid-column: 1 / -1; display: grid; gap: 7px; place-items: center; min-height: 150px; padding: 26px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; text-align: center; }
.account-empty strong { color: var(--ink); }
.form-panel > label, .form-grid label { color: #334155; font-size: 13px; font-weight: 650; }
.field-help { color: #64748b; font-size: 12px; }
.form-actions { margin-top: 20px; }
.table-panel { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.table-wrap { scrollbar-color: #cbd5e1 transparent; }
table { min-width: 900px; }
th, td { padding: 15px 16px; font-size: 13px; }
th { color: #64748b; background: #f8fafc; font: 700 10px/1.2 var(--font-data); letter-spacing: .07em; }
td { color: #334155; }
tbody tr { transition: background 150ms ease; }
tbody tr:hover { background: #f8fbff; }
td strong { color: var(--ink); font-weight: 700; }
.table-action { min-height: 36px; margin-right: 4px; padding: 7px 8px; border-radius: 7px; color: #2563eb; font-weight: 700; transition: background 150ms ease, color 150ms ease; }
.table-action:hover { background: var(--primary-soft); color: var(--primary-dark); }
.table-action.publish-action { color: #c2410c; }
.table-action.publish-action:hover { background: #fff7ed; }
.table-action.activate-action { color: #047857; }
.table-action.danger-action { color: #b91c1c; }
.table-action.danger-action:hover { background: #fef2f2; }
.campaign-link-settings { border-color: #bfdbfe; background: #f8fbff; border-radius: var(--radius-md); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75); }
.campaign-form-layout { display: grid; gap: 16px; }
.campaign-form-section { min-width: 0; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.campaign-form-section-primary { background: #f8fbff; border-color: #bfdbfe; }
.campaign-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.campaign-section-head .eyebrow { margin-bottom: 5px; }
.campaign-section-head h4 { margin: 0; color: var(--ink); font-size: 17px; letter-spacing: -.01em; }
.campaign-section-description { max-width: 420px; margin: 2px 0 0; color: #64748b; font-size: 12px; line-height: 1.55; text-align: right; }
.campaign-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.campaign-section-grid label, .campaign-copy-grid label, .campaign-material-toolbar label { display: grid; align-content: start; gap: 7px; min-width: 0; margin-bottom: 0; color: #334155; font-size: 13px; font-weight: 650; }
.campaign-section-grid input, .campaign-section-grid select, .campaign-section-grid textarea, .campaign-copy-grid input, .campaign-copy-grid select, .campaign-copy-grid textarea, .campaign-material-toolbar input, .campaign-material-toolbar select { width: 100%; min-width: 0; }
.campaign-material-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; margin-bottom: 16px; }
.campaign-material-toolbar label { min-width: 0; margin-bottom: 0; }
.campaign-material-toolbar .material-button { min-height: 44px; white-space: nowrap; }
.campaign-copy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.campaign-copy-grid textarea { min-height: 176px; }
.campaign-form-section .draft-keywords-field { margin: 0; }
.campaign-form-section .campaign-link-settings { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.campaign-submit-section { padding: 0 4px 4px; }
.campaign-submit-section .form-actions { margin-top: 0; padding: 4px 0; }
.quick-more { border-style: dashed; background: #fff; color: var(--primary-dark); }
.geo-choice-modal { width: min(980px, 100%); max-height: 92vh; overflow: auto; padding: 24px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 24px 70px rgba(15, 23, 42, .18); }
.geo-choice-dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.geo-choice-panel { min-width: 0; padding: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-md); }
.geo-choice-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.geo-choice-panel-head h4 { margin: 0; color: var(--ink); font-size: 15px; }
.geo-choice-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 330px; overflow: auto; padding: 2px; }
.geo-choice-options .quick-choice { display: grid; place-items: center start; gap: 2px; min-height: 48px; padding: 8px 10px; text-align: left; }
.geo-choice-options .quick-choice span { font: 700 12px/1 var(--font-data); }
.geo-choice-options .quick-choice small { color: inherit; font-size: 11px; font-weight: 500; line-height: 1.2; }
.geo-choice-options .quick-choice[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12); }
.keyword-planner-modal, .publish-confirm-modal {
  border-color: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}
.modal-backdrop { background: rgba(15, 23, 42, .56); backdrop-filter: blur(3px); }
.publish-confirm-modal { border-top: 4px solid var(--accent); }
.activate-confirm-modal { border-top-color: var(--danger); }
.notification-button { min-height: 44px; border-color: var(--border-strong); border-radius: var(--radius-sm); background: #fff; transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.notification-button:hover { background: #f8fbff; border-color: #93c5fd; box-shadow: var(--shadow-sm); }
.notification-panel { border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.empty { padding: 48px 18px; color: #64748b; }

@media (max-width: 980px) {
  .sidebar { width: 216px; flex-basis: 216px; }
  .main { padding-left: 22px; padding-right: 22px; }
  .topbar { margin-left: -22px; margin-right: -22px; padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { width: 100%; padding: 12px 12px 14px; }
  .brand { padding: 3px 6px 14px; }
  .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .nav-item { min-height: 44px; padding: 8px 9px; font-size: 12px; }
  .nav-item span { display: none; }
  .sidebar-foot { display: none; }
  .main { padding: 16px 14px 40px; }
  .topbar { position: static; display: block; margin: 0 -14px 18px; padding: 14px; background: var(--canvas); border-bottom: 0; }
  .topbar .top-actions { margin-top: 14px; }
  .top-actions .button, .top-actions .notification-button { flex: 1 1 auto; }
  .hero { display: block; padding: 24px 20px; border-radius: var(--radius-md); }
  .hero h2 { font-size: 27px; }
  .hero-badge { min-width: 0; margin-top: 22px; padding: 14px 0 0; border-top: 1px solid #bfdbfe; border-left: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metrics article { min-height: 112px; padding: 15px; }
  .metrics strong { font-size: 22px; }
  .section-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .section-toolbar .toolbar-controls { width: 100%; }
  .toolbar-controls input, .toolbar-controls select { min-width: 0; flex: 1 1 160px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .campaign-form-section { padding: 16px; }
  .campaign-section-head { display: block; }
  .campaign-section-description { max-width: none; margin-top: 7px; text-align: left; }
  .campaign-section-grid, .campaign-copy-grid { grid-template-columns: 1fr; gap: 14px; }
  .campaign-material-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .campaign-material-toolbar .material-button { width: 100%; }
  .geo-choice-modal { max-height: 90dvh; padding: 18px; }
  .geo-choice-dialog-grid { grid-template-columns: 1fr; gap: 12px; }
  .geo-choice-options { max-height: 240px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-grid { grid-template-columns: 1fr; }
  .account-card-stats { grid-template-columns: 1fr 1fr; }
  .account-card-stats > div:last-child { grid-column: 1 / -1; }
  .account-card-facts > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .account-card-facts strong { text-align: left; }
  .account-toolbar { align-items: stretch; flex-direction: column; }
  .account-toolbar select { width: 100%; }
  .form-panel, .panel { padding: 16px; }
  .table-panel { padding: 0; }
  .table-wrap { margin-right: -1px; }
  th, td { padding: 13px 12px; }
  .modal-backdrop { padding: 12px; }
  .keyword-planner-modal, .publish-confirm-modal { max-height: 94dvh; padding: 18px; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Rotation planning workspace */
.section-subtitle { margin-top: 6px; max-width: 680px; }
.rotation-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); gap: 20px; align-items: start; }
.rotation-editor, .rotation-preview-panel, .rotation-plans-panel { max-width: none; min-width: 0; }
.rotation-layout, .rotation-preview-panel, .rotation-plans-panel { min-width: 0; }
.rotation-accounts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.rotation-cycle-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 16px 0 4px; padding: 11px 13px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 9px; color: #1e3a8a; font-size: 12px; }
.rotation-cycle-summary strong { font: 700 12px/1.4 var(--font-data); }
.rotation-cycle-summary span { color: #475569; }
.rotation-editor label.is-disabled { color: #64748b; }
.rotation-editor label.is-disabled input:disabled { color: #64748b; background: #f1f5f9; cursor: not-allowed; }
.rotation-accounts-head h3 { margin-top: 0; }
.rotation-account-list { display: grid; gap: 10px; }
.rotation-account-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; }
.rotation-order-badge { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); font: 700 12px/1 var(--font-data); }
.rotation-account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.rotation-account-fields label { margin: 0; }
.rotation-account-fields .rotation-url-field { grid-column: 1 / -1; }
.rotation-account-actions { display: grid; gap: 7px; justify-items: end; }
.rotation-run-button { white-space: nowrap; }
.rotation-run-button:disabled { opacity: .55; cursor: not-allowed; }
.rotation-run-result { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 10px; border-radius: 8px; background: #f1f5f9; color: #475569; font-size: 11px; }
.rotation-run-result span { font-weight: 750; }
.rotation-run-detail { display: grid; gap: 6px; min-width: 0; }
.rotation-run-result small { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.rotation-run-result.succeeded { background: #ecfdf5; color: #047857; }
.rotation-run-result.failed { background: #fff7ed; color: #c2410c; }
.rotation-run-result.running, .rotation-run-result.queued { background: #eff6ff; color: #1d4ed8; }
.rotation-run-result.pending { background: #f8fafc; color: #64748b; }
.rotation-sync-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rotation-sync-status { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 750; line-height: 1.35; white-space: nowrap; }
.rotation-sync-status.updated { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.rotation-sync-status.skipped { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.rotation-sync-status.failed { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.rotation-sync-status.pending { background: #e0f2fe; border-color: #bae6fd; color: #075985; }
.rotation-sync-reason { color: inherit; opacity: .9; }
.rotation-remove-button { white-space: nowrap; }
.rotation-empty { padding: 22px 12px; }
.rotation-preview-panel { min-height: 100%; }
.rotation-timeline-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.rotation-timeline { min-width: 560px; }
.rotation-timeline th, .rotation-timeline td { padding: 12px 13px; }
.rotation-timeline tbody tr:nth-child(even) { background: #fbfdff; }
.rotation-plans-panel { margin-top: 20px; padding: 0; }
.rotation-plans-panel .panel-head { padding: 20px 20px 14px; margin-bottom: 0; border-bottom: 1px solid var(--border); }
.rotation-plans-panel table { min-width: 900px; }
.rotation-today-label { display: block; margin-top: 4px; color: #2563eb; font-size: 11px; font-weight: 600; }
@media (max-width: 1050px) {
  .rotation-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .rotation-cycle-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  .rotation-account-row { grid-template-columns: 28px minmax(0, 1fr); }
  .rotation-account-actions { grid-column: 2; justify-items: start; display: flex; flex-wrap: wrap; }
  .rotation-remove-button { margin-top: -2px; }
  .rotation-account-fields { grid-template-columns: 1fr; }
  .rotation-account-fields .rotation-url-field { grid-column: auto; }
  .rotation-run-result { grid-column: auto; }
  .rotation-sync-summary { align-items: flex-start; flex-direction: column; }
  .rotation-sync-status { white-space: normal; }
  .rotation-plans-panel .panel-head { align-items: flex-start; flex-direction: column; }
}
