:root {
  --ink: #182224;
  --muted: #667375;
  --line: #dce4e2;
  --soft: #f4f7f6;
  --paper: #ffffff;
  --accent: #147a63;
  --accent-dark: #0c5e4c;
  --accent-soft: #e1f3ed;
  --navy: #172b31;
  --orange: #d97836;
  --red: #c84d4d;
  --shadow: 0 20px 50px rgba(20, 43, 45, .09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(41, 143, 114, .17), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(217, 120, 54, .12), transparent 30%),
    #edf2f0;
}
.login-card {
  width: min(100%, 440px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 30px 90px rgba(24, 50, 49, .16);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent); color: white; font-weight: 800; letter-spacing: -.5px;
  box-shadow: 0 8px 24px rgba(20, 122, 99, .25);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: -.25px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.brand-large { margin-bottom: 42px; }
.brand-large .brand-mark { width: 50px; height: 50px; }
.brand-large strong { font-size: 20px; }
.login-copy h1 { margin: 7px 0 8px; font-size: 32px; letter-spacing: -1px; }
.login-copy p { margin: 0 0 26px; color: var(--muted); line-height: 1.6; }
.login-foot { margin: 24px 0 0; text-align: center; color: #8a9595; font-size: 12px; }
.login-foot a { color: #647777; text-decoration: underline; text-underline-offset: 3px; }
.login-foot a:hover { color: var(--accent); }

.eyebrow, .page-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.stack { display: grid; gap: 17px; }
label > span, .textarea-label > span {
  display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700;
  color: #445153;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #ccd7d5;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 122, 99, .12);
}
label small { display: block; margin-top: 6px; color: var(--muted); }
.button {
  border: 0; border-radius: 10px; min-height: 40px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 700; font-size: 13px;
}
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: white; color: #3f4e50; border: 1px solid var(--line); }
.button.danger { background: #fff0f0; color: var(--red); }
.button.wide { width: 100%; min-height: 46px; }
.text-button {
  border: 0; background: transparent; color: var(--accent);
  font-weight: 700; font-size: 12px; padding: 4px;
}
.icon-button { border: 0; background: transparent; color: #859091; }
.form-error { margin: 0; color: var(--red); font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 236px;
  display: flex; flex-direction: column;
  padding: 26px 18px 18px;
  background: var(--navy); color: #f3f8f7;
}
.sidebar .brand { padding: 0 8px; }
.sidebar .brand small { color: #8da2a5; }
.sidebar .brand-mark { background: #e9f5f1; color: var(--accent-dark); box-shadow: none; }
.nav { display: grid; gap: 5px; margin-top: 43px; }
.nav-item {
  border: 0; border-radius: 10px; padding: 11px 13px;
  text-align: left; background: transparent; color: #a8b8ba; font-weight: 650;
  display: flex; align-items: center; gap: 11px;
}
.nav-item:hover, .nav-item.active { background: rgba(255, 255, 255, .08); color: white; }
.nav-item.active { box-shadow: inset 3px 0 var(--accent); }
.nav-icon { width: 20px; text-align: center; color: #65bea5; }
.sidebar-status {
  margin-top: auto; padding: 13px; display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,.05); border-radius: 11px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #55d59f; box-shadow: 0 0 0 4px rgba(85,213,159,.12); }
.sidebar-status strong, .sidebar-status small, .sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-status strong { font-size: 12px; }
.sidebar-status small, .sidebar-user small { font-size: 10px; color: #8da2a5; margin-top: 3px; }
.sidebar-user {
  margin-top: 12px; border-top: 1px solid rgba(255,255,255,.08);
  padding: 17px 7px 2px; display: grid; grid-template-columns: 34px 1fr auto;
  align-items: center; gap: 10px;
}
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e8a16e; color: #172b31; font-weight: 800; }

.content { grid-column: 2; min-width: 0; }
.topbar {
  min-height: 104px; padding: 26px 34px 22px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.84); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.page-kicker { margin: 0 0 6px; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.7px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.server-time { color: var(--muted); font-size: 12px; margin-right: 8px; }
.workspace-switcher {
  display: flex; align-items: center; gap: 8px; margin-right: 5px;
}
.workspace-switcher[hidden] { display: none; }
.workspace-switcher > span {
  margin: 0; color: var(--muted); font-size: 10px; white-space: nowrap;
}
.workspace-switcher select {
  width: 190px; min-height: 38px; padding: 8px 32px 8px 11px;
  border-radius: 9px; font-size: 12px; font-weight: 700;
}
.view { padding: 28px 34px 45px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.stat-card {
  padding: 20px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--paper); box-shadow: 0 7px 24px rgba(26,54,53,.035);
}
.stat-card .stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-card .stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat-card p { margin: 15px 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-card strong { font-size: 28px; letter-spacing: -1px; }
.stat-card small { color: #879293; font-size: 10px; margin-left: 6px; }
.today-commission-hint {
  margin: -3px 0 18px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid #cfe7df;
  border-radius: 13px;
  background: linear-gradient(135deg, #effaf6, #fbfefd);
}
.today-commission-hint[hidden] { display: none; }
.today-commission-hint strong,
.today-commission-hint small { display: block; }
.today-commission-hint strong {
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 18px;
}
.today-commission-hint small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 18px;
}
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 15px;
  box-shadow: 0 7px 24px rgba(26,54,53,.035); overflow: hidden;
}
.panel-head {
  min-height: 72px; padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #e8eeec;
}
.panel-head h2 { margin: 4px 0 0; font-size: 16px; letter-spacing: -.2px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 11px 14px; text-align: left; color: #879293; background: #fafcfc;
  border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; white-space: nowrap;
}
td { padding: 13px 14px; border-bottom: 1px solid #edf1f0; font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.cell-main strong, .cell-main small { display: block; }
.cell-main strong { max-width: 235px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main small { max-width: 235px; margin-top: 4px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px;
  border-radius: 20px; font-size: 10px; font-weight: 800; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.success { color: #147a63; background: #e5f5f0; }
.badge.error { color: #bd4a4a; background: #fceaea; }
.badge.running, .badge.pending { color: #b0652e; background: #fdf0e5; }
.badge.disabled { color: #718080; background: #edf1f1; }
.row-actions { display: flex; gap: 4px; }
.row-actions button {
  border: 0; background: transparent; color: #627172;
  border-radius: 7px; padding: 6px 7px; font-size: 11px; font-weight: 700;
}
.row-actions button:hover { background: var(--accent-soft); color: var(--accent); }
.row-actions { white-space: nowrap; }
.row-actions .run-action { color: #147a63; }
.row-actions .stop-action { color: #b54708; }
.row-actions .stop-action:hover { color: #9a3412; background: #fff0e5; }
#overview-tasks table { min-width: 840px; table-layout: fixed; }
#overview-tasks th:nth-child(2) { width: 150px; }
#overview-tasks th:nth-child(3) { width: 100px; }
#overview-tasks th:nth-child(4) { width: 130px; }
#overview-tasks th:nth-child(5) { width: 76px; }
#overview-tasks th:nth-child(6) { width: 190px; }
#overview-tasks td, #overview-tasks th { padding-left: 10px; padding-right: 10px; }
#overview-tasks .cell-main strong,
#overview-tasks .cell-main small { max-width: 100%; }
.pagination-bar {
  min-height: 58px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.pagination-controls { display: flex; align-items: center; gap: 5px; }
.pagination-controls button {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #536162;
  font-size: 10px;
  font-weight: 700;
}
.pagination-controls button:hover:not(:disabled),
.pagination-controls button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.pagination-controls i { padding: 0 2px; color: var(--muted); font-style: normal; }
.template-cell { max-width: 260px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #5b696a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }

.activity-list { padding: 7px 18px 14px; }
.activity-item { position: relative; padding: 13px 0 13px 23px; border-bottom: 1px solid #edf1f0; }
.activity-item:last-child { border-bottom: 0; }
.activity-item::before { content: ""; position: absolute; left: 3px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.activity-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.activity-item p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.activity-item time { color: #9aa4a4; font-size: 9px; }
.task-toolbar { gap: 20px; }
.toolbar-controls { display: flex; gap: 8px; }
.search-input { width: 270px; }
.toolbar-controls select { width: 120px; }

.script-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 18px; }
.script-hero { padding: 34px; background: linear-gradient(135deg, #fff 58%, #e9f5f1); }
.script-hero h2 { margin: 9px 0 12px; max-width: 620px; font-size: 27px; letter-spacing: -.8px; }
.script-hero > p { color: var(--muted); max-width: 650px; line-height: 1.7; }
.script-flow { display: flex; align-items: center; gap: 16px; margin: 34px 0; }
.script-flow div { min-width: 150px; }
.script-flow span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: white; font-size: 11px; font-weight: 800; margin-bottom: 10px; }
.script-flow strong, .script-flow small { display: block; }
.script-flow strong { font-size: 12px; }
.script-flow small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.script-flow i { color: #a5b6b3; font-style: normal; }
.checklist ol { margin: 0; padding: 8px 20px 4px; list-style: none; }
.checklist li { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid #edf1f0; }
.checklist li span { color: var(--accent); font-size: 10px; font-weight: 800; }
.checklist li p { margin: 0; color: #536162; font-size: 12px; line-height: 1.5; }
.note { margin: 14px 20px 20px; padding: 12px; border-radius: 9px; background: #fff7eb; color: #8a623f; font-size: 10px; line-height: 1.5; }
.google-ads-connection-panel { margin-top: 18px; }
.google-ads-connection-body {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}
.google-ads-connection-copy h3 { margin: 0 0 7px; font-size: 16px; }
.google-ads-connection-copy > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.google-ads-connection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.google-ads-connection-meta { margin: 17px 0 0; display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 8px; }
.google-ads-connection-meta > div { padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }
.google-ads-connection-meta dt { color: var(--muted); font-size: 8px; }
.google-ads-connection-meta dd { margin: 4px 0 0; color: var(--ink); font-size: 10px; font-weight: 800; }
.google-ads-customer-list { margin-top: 14px; }
.google-ads-customer-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.google-ads-customer-heading strong { font-size: 10px; }
.google-ads-customer-heading small { color: var(--muted); font-size: 8px; }
.google-ads-root-list { display: flex; flex-wrap: wrap; gap: 6px; }
.google-ads-root-list button {
  padding: 6px 9px; border: 1px solid transparent; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px; font-weight: 750; cursor: pointer;
}
.google-ads-root-list button:hover { border-color: var(--accent); background: white; }
.google-ads-account-grid { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 8px; }
.google-ads-account-card {
  position: relative; min-width: 0; padding: 11px 12px; display: grid; gap: 4px;
  border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc;
  color: var(--ink); text-align: left; cursor: pointer;
}
.google-ads-account-card:hover { border-color: #8bc6b8; background: #f4faf8; }
.google-ads-account-card.manager { border-left: 3px solid var(--accent); }
.google-ads-account-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.google-ads-account-name { overflow: hidden; font-size: 10px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.google-ads-account-id { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.google-ads-account-type { position: absolute; right: 8px; top: 8px; padding: 3px 5px; border-radius: 5px; background: white; color: var(--accent-dark); font-size: 7px; font-weight: 850; }
.google-ads-account-card small { padding-right: 62px; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.google-ads-security-note { margin: 0; padding: 12px 24px; border-top: 1px solid var(--line); background: #f7faf9; color: var(--muted); font-size: 9px; line-height: 1.55; }

.member-summary {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr);
  gap: 18px; margin-bottom: 18px;
}
.member-intro { padding: 24px; }
.member-intro h2 { margin: 7px 0 9px; font-size: 22px; }
.member-intro p {
  max-width: 720px; margin: 0; color: var(--muted);
  font-size: 12px; line-height: 1.7;
}
.member-counts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  align-items: stretch; padding: 8px;
}
.member-counts div {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 8px; border-right: 1px solid var(--line);
}
.member-counts div:last-child { border-right: 0; }
.member-counts span { color: var(--muted); font-size: 10px; font-weight: 700; }
.member-counts strong { font-size: 25px; letter-spacing: -.8px; }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell .avatar { flex: 0 0 auto; width: 31px; height: 31px; font-size: 11px; }
.role-chip {
  display: inline-flex; padding: 5px 8px; border-radius: 7px;
  font-size: 10px; font-weight: 800;
}
.role-chip.owner { color: #7c4d13; background: #fff1d8; }
.role-chip.admin { color: #5f4692; background: #f0eafb; }
.role-chip.operator { color: var(--accent-dark); background: var(--accent-soft); }
.role-chip.viewer { color: #5d6a6b; background: #edf1f1; }
.role-description { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.password-note {
  margin: 0; padding: 12px 13px; border-radius: 9px;
  background: #fff7e9; color: #7f5b36; font-size: 11px; line-height: 1.55;
}

.alert-settings-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px; margin-bottom: 18px;
}
.alert-settings-grid + .panel, #alert-members-panel + .panel { margin-bottom: 18px; }
.settings-copy {
  margin: 0; padding: 18px 20px 0; color: var(--muted);
  font-size: 11px; line-height: 1.65;
}
.alert-form { padding: 18px 20px 22px; }
.form-actions { display: flex; gap: 8px; }
.alert-policy { padding: 24px; }
.alert-policy h2 { margin: 7px 0 18px; font-size: 19px; }
.policy-list { display: grid; gap: 10px; }
.policy-list div {
  padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fafcfc;
}
.policy-list strong, .policy-list span { display: block; }
.policy-list strong { color: var(--accent-dark); font-size: 12px; }
.policy-list span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
button:disabled { opacity: .55; cursor: not-allowed; }

.revenue-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 18px;
}
.revenue-tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 11px; background: white;
}
.revenue-tabs button {
  min-height: 34px; padding: 0 13px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 11px; font-weight: 750;
}
.revenue-tabs button.active {
  background: var(--accent); color: white;
  box-shadow: 0 5px 14px rgba(20, 122, 99, .18);
}
.revenue-range {
  display: flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 10px; font-weight: 700;
}
.revenue-range > span { margin: 0; white-space: nowrap; }
.revenue-range select { width: 125px; padding: 8px 10px; }
.revenue-dashboard-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start; gap: 18px;
}
#revenue-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.revenue-attention-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  align-items: start; gap: 18px; margin-bottom: 18px;
}
.revenue-daily-panel { margin-bottom: 18px; }
.revenue-daily-table { min-width: 1120px; }
.revenue-attention-table { min-width: 660px; }
.panel-help { color: var(--muted); font-size: 10px; }
.source-status-list { padding: 7px 18px 16px; }
.source-status-item {
  padding: 14px 0; border-bottom: 1px solid #edf1f0;
}
.source-status-item:last-child { border-bottom: 0; }
.source-status-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.source-status-item strong, .source-status-item small { display: block; }
.source-status-item strong { font-size: 12px; }
.source-status-item small {
  margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.5;
}
.revenue-money { font-variant-numeric: tabular-nums; font-weight: 750; }
.revenue-money.positive { color: var(--accent); }
.revenue-money.negative { color: var(--red); }
.revenue-money.pending-money { color: #a65f16; }
.empty-state.compact { padding: 30px 18px; }
.revenue-metric small { display: block; margin-top: 3px; color: var(--muted); }
#revenue-campaigns table,
#revenue-mappings table,
#revenue-sources table,
#revenue-unmatched-campaigns table,
#revenue-unmatched-offers table,
#revenue-excluded-campaigns table { min-width: 920px; }
.source-error {
  display: block; max-width: 300px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--red);
}
.mapping-confidence {
  display: inline-flex; padding: 4px 7px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 10px; font-weight: 800;
}
.mapping-note { padding: 0; }
.revenue-section > .panel + .panel { margin-top: 18px; }
.campaign-revenue-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.campaign-revenue-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fbfa;
}
.campaign-revenue-summary span,
.campaign-revenue-summary strong,
.campaign-revenue-summary small { display: block; }
.campaign-revenue-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.campaign-revenue-summary strong {
  margin-top: 6px;
  font-size: 13px;
}
.campaign-revenue-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.ads-generator-hero {
  margin-bottom: 18px;
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 1px solid #cfe5de;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5fbf9 35%, #e8f5f1);
}
.ads-generator-hero h2 { margin: 7px 0; font-size: 23px; }
.ads-generator-hero p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ads-generator-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}
.ads-project-panel { position: sticky; top: 94px; }
.ad-project-list { padding: 8px; display: grid; gap: 6px; }
.ad-project-item {
  width: 100%;
  padding: 13px;
  display: block;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.ad-project-item:hover { background: #f7faf9; border-color: var(--line); }
.ad-project-item.active { background: var(--accent-soft); border-color: #bcded5; }
.ad-project-item strong, .ad-project-item small, .ad-project-item i { display: block; }
.ad-project-item strong { margin: 5px 0; font-size: 12px; }
.ad-project-item small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.ad-project-item i { margin-top: 7px; color: var(--accent-dark); font-size: 9px; font-style: normal; font-weight: 750; }
.ad-project-type { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .8px; text-transform: uppercase; }
.ads-workbench { min-width: 0; }
.ad-workbench-head {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.ad-workbench-head h2 { margin: 6px 0; font-size: 21px; }
.ad-workbench-head p { margin: 0; color: var(--muted); font-size: 10px; }
.ad-workbench-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.ad-fact-strip {
  padding: 13px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 110px 150px;
  gap: 14px;
  background: #fafcfc;
  border-bottom: 1px solid var(--line);
}
.ad-fact-strip span, .ad-fact-strip strong { display: block; }
.ad-fact-strip span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.ad-fact-strip strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.ad-variant-switcher { padding: 18px 24px; border-bottom: 1px solid var(--line); background: #f8fbfa; }
.ad-variant-switcher h3 { margin: 4px 0 12px; font-size: 15px; }
.ad-variant-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ad-variant-tabs button {
  min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: white; color: var(--ink); text-align: left;
}
.ad-variant-tabs button:hover { border-color: #9acdbf; }
.ad-variant-tabs button.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(0,122,95,.08); }
.ad-variant-tabs strong, .ad-variant-tabs small { display: block; }
.ad-variant-tabs strong { font-size: 11px; }
.ad-variant-tabs small { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.ad-warning-box {
  margin: 20px 24px 0;
  padding: 13px 15px;
  display: grid;
  gap: 4px;
  border: 1px solid #ecd9b9;
  border-radius: 10px;
  background: #fff9ef;
  color: #775d36;
  font-size: 10px;
  line-height: 1.55;
}
.ad-warning-box strong { color: #65481f; }
.ad-section { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.ad-section:last-child { border-bottom: 0; }
.ad-section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ad-section-head h3 { margin: 4px 0 0; font-size: 15px; }
.ad-section-note { margin: 7px 0 14px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.ad-tracking-link-section { background: linear-gradient(135deg, #f7fcfa, #fff); }
.ad-tracking-link {
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border: 1px solid #bddfd6;
  border-radius: 9px;
  background: white;
  color: var(--accent-dark);
  cursor: copy;
  user-select: none;
}
.ad-tracking-link code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; line-height: 1.65; white-space: normal; }
.ad-copy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ad-copy-grid.descriptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-setup-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ad-setup-value {
  position: relative;
  min-width: 0;
  padding: 11px 55px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdfc;
  cursor: copy;
  user-select: none;
}
.ad-setup-value:nth-child(3) { grid-column: span 2; }
.ad-setup-value small, .ad-setup-value strong { display: block; }
.ad-setup-value small { color: var(--muted); font-size: 8px; }
.ad-setup-value strong { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.ad-setup-value button {
  position: absolute; right: 7px; top: 9px; padding: 4px 6px;
  border: 0; border-radius: 6px; background: white;
  color: var(--accent); font-size: 8px; font-weight: 800;
}
.ad-campaign-section { background: linear-gradient(135deg, #fbfefd, #f5fbf9); }
.ad-final-url-row {
  margin-top: 10px; padding: 10px 12px; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; border: 1px solid #cfe5de; border-radius: 9px; background: white;
}
.ad-final-url-row small { color: var(--muted); font-size: 8px; }
.ad-final-url-row code { overflow: hidden; color: var(--accent-dark); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; cursor: copy; user-select: none; }
.ad-campaign-list { margin-top: 10px; display: grid; gap: 6px; }
.ad-campaign-list article { padding: 9px 11px; display: grid; grid-template-columns: minmax(180px, .9fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.ad-campaign-list strong { font-size: 9px; }
.ad-campaign-list span, .ad-campaign-list small { color: var(--muted); font-size: 8px; }
.ad-copy-card {
  position: relative;
  min-height: 64px;
  padding: 12px 56px 23px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
  cursor: copy;
  user-select: none;
}
.ad-copy-card:hover { border-color: #9acdbf; background: #f4faf8; }
.ad-copy-card > span { font-size: 11px; font-weight: 700; line-height: 1.45; }
.ad-copy-card > em {
  position: absolute; right: 8px; bottom: 7px; padding: 2px 5px; border-radius: 5px;
  background: #edf6f3; color: var(--accent-dark); font-size: 7px; font-style: normal; font-weight: 800;
}
.ad-copy-card > small { position: absolute; left: 12px; bottom: 7px; color: var(--muted); font-size: 8px; }
.ad-copy-card > small.over { color: var(--red); }
.ad-search-score { position: absolute; left: 48px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; font-size: 8px; font-style: normal; font-weight: 800; }
.ad-search-score b { font-size: 10px; }
.ad-search-score.excellent { color: #087a5c; }
.ad-search-score.good { color: #347260; }
.ad-search-score.average { color: #9a6a13; }
.ad-search-score.weak { color: #b64a4a; }
.ad-search-score.pending { color: var(--muted); font-weight: 600; }
.ad-copy-card > button, .ad-keyword-row > button {
  position: absolute;
  right: 7px;
  top: 7px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: white;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
}
.ad-two-column { display: grid; grid-template-columns: 1fr 1fr; }
.ad-two-column > .ad-section:first-child { border-right: 1px solid var(--line); }
.ad-keyword-list { display: grid; gap: 6px; margin-top: 14px; }
.ad-keyword-row {
  position: relative;
  min-height: 39px;
  padding: 8px 52px 8px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  cursor: copy;
  user-select: none;
}
.ad-keyword-row strong { font-size: 10px; }
.ad-keyword-row small { margin-left: auto; color: var(--muted); font-size: 8px; }
.ad-negative-block { margin-top: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }
.ad-negative-block summary { color: var(--accent-dark); font-size: 9px; font-weight: 800; cursor: pointer; }
.ad-negative-block[open] summary { margin-bottom: 6px; }
.ad-asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.ad-subhead { margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.ad-subhead > strong { font-size: 10px; }
.ad-sitelink {
  margin-top: 6px; padding: 10px; display: grid; gap: 3px;
  border: 1px solid var(--line); border-radius: 8px; background: #fbfdfc;
  cursor: copy; user-select: none;
}
.ad-sitelink strong { color: var(--accent-dark); font-size: 10px; }
.ad-sitelink span { color: var(--muted); font-size: 8px; }
.ad-sitelink-list { margin-top: 14px; display: grid; gap: 8px; }
.ad-sitelink-card {
  min-width: 0; padding: 11px 12px; display: grid; grid-template-columns: 26px minmax(130px, .75fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.45fr);
  align-items: start; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; cursor: copy; user-select: none;
}
.ad-sitelink-card:hover { border-color: #9acdbf; background: #f4faf8; }
.ad-sitelink-card > div { min-width: 0; display: grid; gap: 4px; }
.ad-sitelink-card small { color: var(--muted); font-size: 7px; font-weight: 750; }
.ad-sitelink-card strong { color: var(--accent-dark); font-size: 10px; line-height: 1.4; }
.ad-sitelink-card span { color: #536162; font-size: 8px; line-height: 1.45; }
.ad-sitelink-index { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 8px; font-weight: 850; }
.ad-sitelink-url code { overflow: hidden; color: var(--muted); font-size: 7px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.ad-supporting-assets { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.ad-promotion-assets { grid-column: 1 / -1; padding: 13px; border: 1px solid #e5cf9e; border-radius: 10px; background: linear-gradient(135deg, #fffaf0, #fff); }
.ad-promotion-card { display: grid; grid-template-columns: .8fr .7fr 1fr 1.3fr 1.5fr .8fr; gap: 12px; padding: 11px 12px; border: 1px solid #ecd9b9; border-radius: 9px; background: white; cursor: copy; user-select: none; }
.ad-promotion-card > div { min-width: 0; display: grid; gap: 4px; }
.ad-promotion-card small { color: #8a724c; font-size: 7px; font-weight: 800; }
.ad-promotion-card strong { color: #76511f; font-size: 10px; }
.ad-promotion-card span { color: #665a48; font-size: 8px; line-height: 1.45; }
.ad-promotion-card code { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.ad-callout-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-callout-list > span {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 20px;
  background: #fbfdfc; font-size: 9px; cursor: copy; user-select: none;
}
.match-chip { padding: 3px 5px; border-radius: 5px; font-size: 7px; font-weight: 900; }
.match-chip.exact { color: #665128; background: #fff2ce; }
.match-chip.phrase { color: #3d5880; background: #e8f0fc; }
.match-chip.broad { color: #5c536f; background: #eee9f7; }
.ad-qa-summary {
  margin-top: 14px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ad-qa-summary.passed { background: #f2faf7; border-color: #cce4dd; }
.ad-qa-summary.failed { background: #fff5f5; border-color: #efd0d0; }
.ad-qa-summary strong, .ad-qa-summary span { display: block; }
.ad-qa-summary > div > span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.ad-qa-list { margin-top: 8px; }
.ad-qa-list p { margin: 5px 0 0; padding: 8px 10px; border-radius: 7px; font-size: 9px; }
.ad-qa-list p.error { color: #923d3d; background: #fcecec; }
.ad-qa-list p.warning { color: #806132; background: #fff7e8; }
.ad-publisher-section { background: linear-gradient(135deg, #fff, #f3f9f7); }
.ad-score-guide { padding: 16px 24px; display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: #fbfdfc; }
.ad-score-guide h3 { margin: 4px 0 0; font-size: 14px; }
.ad-score-guide p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.ad-score-guide > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.ad-score-guide > div:last-child span { padding: 5px 7px; border-radius: 6px; background: white; font-size: 8px; font-weight: 800; }
.ad-score-guide .excellent { color: #087a5c; }
.ad-score-guide .good { color: #347260; }
.ad-score-guide .average { color: #9a6a13; }
.ad-score-guide .weak { color: #b64a4a; }
.ad-publish-form { display: grid; grid-template-columns: 1fr 1fr .7fr .55fr auto; gap: 9px; align-items: end; margin-top: 14px; }
.ad-publish-form label span { font-size: 8px; }
.ad-publish-form input { padding: 9px; font-size: 10px; }
.ad-publish-jobs { display: grid; gap: 5px; margin-top: 13px; }
.ad-publish-jobs div { padding: 7px 9px; display: flex; justify-content: space-between; border-radius: 7px; background: white; font-size: 9px; }
.ad-publish-jobs span, .ad-publish-jobs small { color: var(--muted); }
.ads-safe-note { color: var(--muted); font-size: 9px; }
.muted-field { opacity: .65; }
.ad-type-fields {
  padding: 14px;
  border: 1px solid #d9e8e4;
  border-radius: 11px;
  background: #f8fbfa;
}
.ad-type-fields[hidden] { display: none; }
.ad-type-fields > label { display: block; margin-top: 12px; }
.ad-type-fields > label textarea { min-height: 116px; }
.ad-type-callout {
  padding: 11px 12px;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.ad-type-callout strong { color: var(--accent-dark); font-size: 11px; }
.ad-type-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ad-type-selector label {
  position: relative; padding: 15px 14px 15px 42px; min-height: 78px;
  display: grid; align-content: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfdfc;
  cursor: pointer;
}
.ad-type-selector label:has(input:checked) { border-color: #7cbfaf; background: var(--accent-soft); box-shadow: inset 0 0 0 1px #7cbfaf; }
.ad-type-selector input { position: absolute; left: 14px; top: 27px; width: auto; accent-color: var(--accent); }
.ad-type-selector strong { font-size: 12px; }
.ad-type-selector small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.ad-advanced-options { margin-top: 4px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfc; }
.ad-advanced-options summary { color: var(--accent-dark); font-size: 10px; font-weight: 800; cursor: pointer; }
.ad-advanced-options[open] summary { margin-bottom: 14px; }
.ad-ai-status-card { padding: 14px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfa; }
.ad-ai-status-card strong { font-size: 11px; }
.ad-ai-status-card small, .ad-ai-status-card em { grid-column: 1 / -1; color: var(--muted); font-size: 9px; font-style: normal; }
.ad-ai-status-card em { color: var(--red); }
.ad-ai-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ad-ai-usage > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; }
.ad-ai-usage span, .ad-ai-usage strong { display: block; }
.ad-ai-usage span { color: var(--muted); font-size: 8px; }
.ad-ai-usage strong { margin-top: 5px; font-size: 11px; }
.ad-facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ad-fact-group { padding: 11px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; }
.ad-fact-group strong { color: var(--accent-dark); font-size: 9px; }
.ad-fact-group span { color: #536162; font-size: 9px; line-height: 1.5; cursor: copy; user-select: none; }
.ad-research-gate { margin-top: 10px; padding: 11px 13px; display: grid; gap: 4px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 9px; }
.ad-evidence-list { display: grid; gap: 6px; margin-top: 12px; }
.ad-evidence-list article { padding: 9px 10px; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.ad-evidence-list strong { font-size: 9px; }
.ad-evidence-list small { grid-column: 2; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ad-source-pages { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad-source-pages strong { margin-right: 4px; font-size: 9px; }
.ad-source-pages a { max-width: 240px; padding: 6px 8px; overflow: hidden; border-radius: 7px; background: #f2f7f5; color: var(--accent-dark); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ad-structured-snippet { margin-top: 7px; padding: 10px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfc; font-size: 9px; }
.ad-structured-snippet > strong { color: var(--accent-dark); }
.ad-structured-snippet > div { display: flex; flex-wrap: wrap; gap: 5px; }
.ad-structured-snippet span { padding: 5px 7px; border-radius: 6px; background: white; color: var(--muted); cursor: copy; user-select: none; }
.ad-structured-snippet small { color: var(--muted); font-size: 8px; }
.ad-landing-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.ad-landing-map article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: copy;
  user-select: none;
}
.ad-landing-map span, .ad-landing-map strong, .ad-landing-map small { display: block; }
.ad-landing-map span { color: var(--accent); font-size: 7px; font-weight: 850; letter-spacing: .6px; }
.ad-landing-map strong { margin-top: 4px; font-size: 10px; }
.ad-landing-map small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.dialog {
  width: min(980px, calc(100vw - 40px)); max-height: calc(100vh - 40px);
  padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(16, 31, 34, .58); backdrop-filter: blur(3px); }
.dialog-head {
  position: sticky; top: 0; z-index: 3; padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  background: white; border-bottom: 1px solid var(--line);
}
.dialog-head h2 { margin: 5px 0 0; font-size: 20px; }
.dialog-close { border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; color: #617071; }
.dialog-body { padding: 24px; overflow-y: auto; }
.dialog-foot {
  position: sticky; bottom: 0; z-index: 3; min-height: 70px; padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: white; border-top: 1px solid var(--line);
}
.dialog-foot > div { display: flex; gap: 8px; margin-left: auto; }
.form-section { margin-bottom: 29px; }
.form-section:last-child { margin-bottom: 0; }
.section-title { display: flex; gap: 12px; align-items: center; margin-bottom: 15px; }
.section-title > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.section-title h3, .section-title p { margin: 0; }
.section-title h3 { font-size: 14px; }
.section-title p { color: var(--muted); font-size: 10px; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.span-2 { grid-column: span 2; }
.checkbox-line { display: flex; align-items: center; gap: 7px; }
.checkbox-line input { width: auto; }
.checkbox-line span { margin: 0; }
.browser-options {
  padding: 16px;
  border: 1px solid #dbe7e4;
  border-radius: 12px;
  background: #f8fbfa;
}
.ratio-input { display: flex; align-items: center; gap: 13px; }
.ratio-input input { padding: 0; accent-color: var(--accent); }
.ratio-input strong { min-width: 118px; color: var(--accent-dark); font-size: 11px; }
.device-pools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.device-pools fieldset { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.device-pools legend { padding: 0 5px; color: #445153; font-size: 11px; font-weight: 800; }
.device-pools label { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #536162; font-size: 11px; }
.device-pools input { width: auto; accent-color: var(--accent); }
.device-pools label span { margin: 0; }
.browser-disclaimer { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.auto-environment {
  margin-top: 15px; padding: 13px; display: grid; gap: 5px;
  border: 1px solid var(--line); border-radius: 10px; background: white;
  color: #536162; font-size: 11px; line-height: 1.45;
}
.auto-environment strong { color: var(--accent-dark); }
.mode-note {
  padding: 13px 14px; border: 1px solid #cfe4de; border-radius: 10px;
  background: #f2faf7; color: #506260; font-size: 11px; line-height: 1.55;
}
.mode-note strong, .mode-note span { display: block; }
.mode-note strong { margin-bottom: 3px; color: var(--accent-dark); }
.hours-block { margin-top: 17px; }
.hours-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 12px; font-weight: 700; color: #445153; }
.hours-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.hour-check input { position: absolute; opacity: 0; pointer-events: none; }
.hour-check span {
  margin: 0; height: 31px; border: 1px solid var(--line); border-radius: 7px;
  display: grid; place-items: center; background: white; color: #657273; font-size: 10px;
}
.hour-check input:checked + span { color: white; border-color: var(--accent); background: var(--accent); }
.textarea-label { display: block; margin-top: 17px; }
.referer-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.referer-presets button { border: 1px solid var(--line); border-radius: 20px; background: white; padding: 5px 9px; color: #596767; font-size: 10px; }
.referer-presets button:hover { border-color: var(--accent); color: var(--accent); }
.runs-dialog { width: min(880px, calc(100vw - 40px)); }
.small-dialog { width: min(480px, calc(100vw - 40px)); }
.run-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.run-card:last-child { border-bottom: 0; }
.run-top { display: flex; justify-content: space-between; align-items: center; }
.run-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 7px; margin: 11px 0 0; font-size: 11px; }
.run-card dt { color: var(--muted); }
.run-card dd { margin: 0; word-break: break-all; font-family: ui-monospace, monospace; }
.toast {
  position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 360px;
  padding: 12px 16px; border-radius: 11px; background: #173c35; color: white;
  font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #873f3f; }

@media (max-width: 1050px) {
  .google-ads-connection-body { grid-template-columns: 1fr; }
  .google-ads-connection-actions { justify-content: flex-start; }
  .google-ads-connection-meta { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .script-layout, .member-summary, .alert-settings-grid,
  .revenue-dashboard-grid, .revenue-attention-grid { grid-template-columns: 1fr; }
  #revenue-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-revenue-summary { grid-template-columns: 1fr; }
  .ads-generator-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .ad-copy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-sitelink-card { grid-template-columns: 26px repeat(3, minmax(0, 1fr)); }
  .ad-sitelink-url { grid-column: 2 / -1; }
  .ad-promotion-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad-publish-form { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 15px; flex-direction: row; align-items: center; gap: 14px; }
  .sidebar .brand { margin-right: auto; }
  .nav { margin: 0; display: flex; }
  .nav-item { padding: 9px; }
  .nav-item .nav-icon { display: none; }
  .sidebar-status, .sidebar-user { display: none; }
  .content { grid-column: auto; }
  .topbar { padding: 20px; align-items: flex-start; gap: 14px; }
  .server-time, #refresh-button { display: none; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .workspace-switcher select { width: 155px; }
  .view { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  #revenue-stats { grid-template-columns: 1fr 1fr; }
  .toolbar-controls { width: 100%; }
  .task-toolbar { align-items: flex-start; flex-direction: column; }
  .search-input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .device-pools { grid-template-columns: 1fr; }
  .hours-grid { grid-template-columns: repeat(6, 1fr); }
  .script-flow { align-items: flex-start; flex-direction: column; }
  .script-flow i { transform: rotate(90deg); }
  .revenue-toolbar { align-items: stretch; flex-direction: column; }
  .revenue-tabs { width: 100%; overflow-x: auto; }
  .revenue-tabs button { flex: 0 0 auto; }
  .revenue-range { justify-content: flex-end; }
  .ads-generator-hero, .ad-workbench-head { align-items: flex-start; flex-direction: column; }
  .ads-generator-layout { grid-template-columns: 1fr; }
  .ads-project-panel { position: static; }
  .ad-project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-copy-grid, .ad-copy-grid.descriptions, .ad-two-column { grid-template-columns: 1fr; }
  .ad-setup-grid, .ad-asset-grid, .ad-type-selector, .ad-facts-grid, .ad-variant-tabs { grid-template-columns: 1fr; }
  .ad-supporting-assets { grid-template-columns: 1fr; }
  .ad-final-url-row, .ad-campaign-list article { grid-template-columns: 1fr; }
  .ad-sitelink-card { grid-template-columns: 26px minmax(0, 1fr); }
  .ad-sitelink-card > div, .ad-sitelink-url { grid-column: 2; }
  .ad-promotion-card { grid-template-columns: 1fr; }
  .ad-landing-map { grid-template-columns: 1fr; }
  .ad-setup-value:nth-child(3) { grid-column: auto; }
  .ad-two-column > .ad-section:first-child { border-right: 0; }
  .ad-fact-strip { grid-template-columns: 1fr 70px; }
  .ad-score-guide { grid-template-columns: 1fr; }
  .ad-score-guide > div:last-child { justify-content: flex-start; }
  .ad-publish-form { grid-template-columns: 1fr; }
}
