/* SEO Kontrol Merkezi. Same family as the Analytics panel: sidebar shell, IBM Plex, square corners.
   The login and 2FA pages also use this file through the Analytics proxy, so it stays a single stylesheet. */
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0e0e0e;
  --side: #121212;
  --surface: #151515;
  --surface-2: #1b1b1b;
  --surface-3: #232323;
  --field: #101010;
  --line: #262626;
  --line-2: #363636;
  --line-3: #4a4a4a;
  --text: #ecebe8;
  --text-2: #bdb8b3;
  --muted: #8f8a85;
  --accent: #fa5167;
  --accent-ink: #1c0d10;
  --positive: #6fd39a;
  --negative: #ff8f80;
  --warning: #e7b766;
  --info: #71b9ca;
  --grid: rgba(255, 255, 255, 0.028);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --scroll-shadow: rgba(0, 0, 0, 0.75);
  --series-clicks: var(--accent);
  --series-impressions: var(--info);
  --series-ctr: var(--warning);
  --series-position: var(--positive);
  /* Device categorical slots, validated as a set against --surface in each theme. */
  --device-mobile: #3987e5;
  --device-desktop: #d95926;
  --device-tablet: #199e70;
  --sans: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side-width: 248px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.light {
  color-scheme: light;
  --bg: #f3f2ee;
  --side: #ebe9e4;
  --surface: #ffffff;
  --surface-2: #f6f5f1;
  --surface-3: #ecebe6;
  --field: #ffffff;
  --line: #e1ded8;
  --line-2: #ccc8c0;
  --line-3: #aaa59c;
  --text: #1a1918;
  --text-2: #46433f;
  --muted: #6b6761;
  --accent: #d42e48;
  --accent-ink: #ffffff;
  --positive: #1c7d4f;
  --negative: #bf3a2b;
  --warning: #8d5c06;
  --info: #1d7089;
  --device-mobile: #2a78d6;
  --device-desktop: #eb6834;
  --device-tablet: #1baf7a;
  --grid: rgba(0, 0, 0, 0.035);
  --shadow: 0 12px 32px rgba(40, 30, 20, 0.14);
  --scroll-shadow: rgba(40, 30, 20, 0.18);
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: 0; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Controls */
.outline-button, .icon-button, .chip, .pager button, .gsc-pager button,
.alert-actions button, .table-actions button, .rank-row-actions button, .interaction-actions .outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.outline-button { min-height: 34px; padding: 6px 14px; font-size: 13px; font-weight: 500; line-height: 1.3; }
.outline-button:hover:not(:disabled), .icon-button:hover, .pager button:hover:not(:disabled), .gsc-pager button:hover:not(:disabled),
.alert-actions button:hover:not(:disabled), .table-actions button:hover:not(:disabled), .rank-row-actions button:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--line-3);
}
.outline-button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.outline-button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, var(--text)); border-color: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.outline-button.danger { background: transparent; border-color: color-mix(in srgb, var(--negative) 45%, transparent); color: var(--negative); }
.outline-button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--negative) 10%, transparent); border-color: var(--negative); }
:is(.outline-button, .chip, .pager button, .gsc-pager button, .alert-actions button, .table-actions button, .rank-row-actions button, .rank-toggle, .segmented button):disabled { cursor: not-allowed; opacity: 0.45; }
.icon-button { width: 32px; height: 32px; padding: 0; background: transparent; color: var(--text-2); }
.icon-button:hover { color: var(--text); }
.icon-button svg { width: 15px; height: 15px; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  background: var(--field);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
}
textarea { line-height: 1.5; resize: vertical; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.chip { min-height: 30px; padding: 4px 12px; background: transparent; color: var(--text-2); font: 500 12px/1.2 var(--mono); }
.chip:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.chip.is-active, .chip.is-active:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-danger { margin-left: 6px; border-color: color-mix(in srgb, var(--negative) 45%, transparent); color: var(--negative); }
.chip-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--negative) 10%, transparent); color: var(--negative); }

.segmented, .gsc-view-switch { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line-2); background: var(--field); }
.segmented button, .gsc-view-button {
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font: 500 12px/1.2 var(--mono);
  white-space: nowrap;
}
.segmented button:hover, .gsc-view-button:hover { background: var(--surface-3); color: var(--text); }
.segmented button.is-active, .gsc-view-button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.segmented-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.segmented-label { color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }

/* Shell: sidebar on wide screens, a sticky top bar below 1100px. */
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 50; padding: 10px 14px; background: var(--surface-2); color: var(--text); }
.skip-link:focus { top: 12px; }
.shell {
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, 1fr);
  min-height: 100vh;
  background: linear-gradient(to right, var(--side) 0 calc(var(--side-width) - 1px), var(--line) calc(var(--side-width) - 1px) var(--side-width), transparent var(--side-width));
}
.side {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background-color: var(--side);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 20px 20px;
  scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 16px; padding: 26px 6px 20px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.brand-mark { display: grid; flex: none; width: 38px; height: 38px; place-items: center; background: var(--accent); color: var(--accent-ink); font: 500 12px/1 var(--mono); letter-spacing: 0.04em; }
.brand-text { display: flex; min-width: 0; flex-direction: column; }
.brand-text strong { color: var(--text-2); font-size: 12px; font-weight: 500; letter-spacing: 0.01em; }
.brand-text span { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 22px; }
.nav-group { margin: 16px 10px 6px; color: var(--muted); font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-left: 2px solid transparent; color: var(--text-2); font-size: 13.5px; text-decoration: none; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a[aria-current="page"] { border-left-color: var(--accent); background: var(--surface-2); color: var(--text); font-weight: 500; }
.nav-index { min-width: 2ch; color: var(--muted); font: 400 11px/1 var(--mono); }
a[aria-current="page"] .nav-index { color: var(--accent); }
.side-foot { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding: 14px 22px 20px; border-top: 1px solid var(--line); background: var(--side); }
.side-session { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.session-label { display: flex; min-width: 0; align-items: center; gap: 8px; color: var(--text-2); font: 400 12px/1.3 var(--mono); }
.session-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { flex: none; width: 7px; height: 7px; background: var(--positive); box-shadow: 0 0 0 3px color-mix(in srgb, var(--positive) 18%, transparent); }
.side-actions { display: flex; flex: none; align-items: center; gap: 6px; }
.side-actions form { margin: 0; }
.logout-button { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.side-note { color: var(--muted); font: 400 11px/1.4 var(--mono); }

.panel-main { display: flex; width: 100%; min-width: 0; max-width: 1400px; flex-direction: column; gap: 16px; padding: 34px 44px 64px; }
.panel-main:focus { outline: none; }
.panel-main > section:not(.panel), .stack { display: flex; min-width: 0; flex-direction: column; gap: 16px; }

/* Page heading */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; margin-bottom: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.page-head > div:first-child { min-width: 0; max-width: 780px; }
.page-kicker { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.page-kicker span { color: var(--accent); }
h1 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.page-lede { max-width: 70ch; margin-top: 8px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; margin-left: auto; }
.page-note { max-width: 52ch; color: var(--muted); font: 400 11.5px/1.5 var(--mono); text-align: right; }
.hero-status { display: flex; min-width: 220px; flex-direction: column; gap: 6px; padding: 12px 16px; border: 1px solid var(--line); border-left: 2px solid var(--positive); background: var(--surface); }
.hero-status-label { color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.hero-status strong { font-size: 14px; font-weight: 500; }

/* Shared states */
.error-banner { padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--negative) 40%, transparent); border-left-width: 2px; background: color-mix(in srgb, var(--negative) 8%, transparent); color: var(--negative); font-size: 13px; line-height: 1.55; }
.data-empty { padding: 32px 20px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.panel .data-empty { border: 0; border-top: 1px solid var(--line); }
.empty-state { padding: 22px 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.status-line { padding: 14px 0; color: var(--muted); font-size: 13px; }
.chart-note { padding: 0 20px 18px; color: var(--muted); font: 400 11.5px/1.5 var(--mono); }
.form-error { margin-top: 10px; color: var(--negative); font: 400 12px/1.5 var(--mono); }
.skeleton { min-height: 210px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Panels */
.panel, .data-table-card, .performance-chart-card { position: relative; min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.panel-header, .gsc-card-header, .gsc-chart-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.panel-header > div:first-child { min-width: 0; }
.panel-header h2, .gsc-card-header h2, .gsc-chart-header h2 { color: var(--accent); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; }
.panel-sub { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.panel-meta { color: var(--muted); font: 400 11px/1.4 var(--mono); white-space: nowrap; }
.panel-body { padding: 16px 20px; }
p.panel-body { color: var(--text-2); font-size: 13px; line-height: 1.6; }
.snapshot-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; }
.updated-at { color: var(--muted); font: 400 11.5px/1.4 var(--mono); }

/* KPI strips. Each cell draws the line to its right and below, so a short last row leaves a clean empty cell. */
.kpi-grid, .search-metric-grid, .module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--surface); }
.kpi, .search-metric-card, .module-card, .module-grid > .skeleton { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.kpi-grid.cols-3, .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.panel .kpi-grid { border: 0; }
.kpi, .search-metric-card { --tone: var(--muted); position: relative; display: flex; min-width: 0; flex-direction: column; gap: 6px; padding: 16px 20px 18px; background: var(--surface); }
.kpi::before, .search-metric-card::before { position: absolute; inset: 0 0 auto; height: 2px; background: var(--tone); content: ""; }
.kpi > span, .search-metric-label { color: var(--tone); font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.kpi strong { color: var(--text); font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small, .search-metric-card small { color: var(--muted); font: 400 11px/1.5 var(--mono); }
.card-accent { --tone: var(--accent); }
.card-danger { --tone: var(--negative); }
.card-warning { --tone: var(--warning); }
.card-info { --tone: var(--info); }
.card-success { --tone: var(--positive); }

/* Tables */
/* Edge shadows appear only while more columns are hidden to that side. */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left center / 48px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right center / 48px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shadow), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow), transparent) right center / 14px 100% no-repeat scroll;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { padding-top: 10px; padding-bottom: 10px; border-bottom-color: var(--line-2); color: var(--muted); font: 500 11px/1.3 var(--mono); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
td { color: var(--text-2); }
td:first-child { color: var(--text); }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: var(--surface-2); }
td a { color: var(--text); text-decoration: none; }
td a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
td small { display: block; margin-top: 3px; color: var(--muted); font: 400 11px/1.4 var(--mono); }

.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.filter-count { margin-left: auto; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.pager button, .gsc-pager button, .alert-actions button, .table-actions button, .rank-row-actions button { min-height: 30px; padding: 4px 10px; font-size: 12px; font-weight: 500; line-height: 1.2; }
.pager span { min-width: 90px; color: var(--muted); font: 400 11.5px/1 var(--mono); text-align: center; }

/* Tags: priority, status and kind labels in tables and headers. */
.badge, .indexing-status, .opportunity-priority, .opportunity-type, .alert-kind, .rank-toggle {
  --tone: var(--muted);
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
  font: 500 11px/1.2 var(--mono);
  white-space: nowrap;
}
.badge.ready, .badge.connected, .indexing-status.indexed, .indexing-status.technical-clean, .rank-toggle.is-enabled { --tone: var(--positive); }
.badge.running, .indexing-status.waiting, .indexing-status.technical-high, .indexing-status.link-redirect, .opportunity-priority.medium, .opportunity-type.striking_distance, .alert-kind.performance { --tone: var(--warning); }
.badge.error, .indexing-status.review, .indexing-status.technical-critical, .indexing-status.link-broken_internal, .indexing-status.link-broken_external, .opportunity-priority.high, .alert-kind.technical { --tone: var(--negative); }
.opportunity-priority.critical { --tone: var(--negative); background: var(--negative); color: var(--bg); }
.indexing-status.technical-medium, .indexing-status.link-orphan, .opportunity-type.low_ctr, .alert-kind.canonical { --tone: var(--accent); }
.indexing-status.link-blocked_external, .opportunity-type.page_two, .alert-kind.indexing { --tone: var(--info); }
.rank-toggle { cursor: pointer; }
.rank-toggle:hover:not(:disabled) { border-color: var(--tone); }

.metric-change { font: 500 12px/1.3 var(--mono); white-space: nowrap; }
.metric-change.good { color: var(--positive); }
.metric-change.bad { color: var(--negative); }
.metric-change.neutral { color: var(--muted); }

/* Per-table columns */
.opportunity-table { min-width: 1080px; }
.opportunity-table :is(th, td):nth-child(n+4):nth-child(-n+7) { text-align: right; }
.opportunity-page { display: block; max-width: 320px; overflow: hidden; color: var(--text); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.opportunity-action { min-width: 260px; color: var(--text-2); line-height: 1.55; white-space: normal; }
.cannibalization-table { min-width: 1000px; }
.cannibalization-table :is(th, td):nth-child(4), .cannibalization-table :is(th, td):nth-child(5) { text-align: right; }
.cannibalization-query { max-width: 220px; color: var(--text); font-weight: 500; white-space: normal; }
.cannibalization-pages { min-width: 320px; }
.cannibalization-pages > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cannibalization-pages > div:last-child { border-bottom: 0; }
.cannibalization-pages a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cannibalization-pages small { margin: 0; white-space: nowrap; }
.indexing-table { min-width: 1280px; }
.indexing-url { display: block; max-width: 300px; overflow: hidden; color: var(--text); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.indexing-coverage { min-width: 180px; max-width: 240px; line-height: 1.45; white-space: normal; }
.indexing-recommendation { min-width: 260px; color: var(--text-2); line-height: 1.5; white-space: normal; }
.indexing-recommendation a { display: block; width: fit-content; margin-top: 6px; color: var(--accent); font: 500 12px/1.3 var(--sans); }
.indexing-canonical { max-width: 280px; }
.indexing-canonical span, .indexing-canonical small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indexing-canonical.mismatch span { color: var(--negative); }
.indexing-schedule span, .indexing-schedule small { display: block; white-space: nowrap; }
.indexing-table td:nth-child(5) { white-space: nowrap; }
.technical-seo-table { min-width: 1220px; }
.technical-seo-table :is(th, td):nth-child(3), .technical-seo-table :is(th, td):nth-child(5) { text-align: right; white-space: nowrap; }
.technical-directives span { white-space: nowrap; }
.technical-issues { min-width: 200px; white-space: normal; }
.technical-issues ul { display: grid; gap: 3px; margin: 0; padding-left: 16px; }
.technical-issues li::marker { color: var(--muted); }
.technical-seo-table td:last-child { white-space: nowrap; }
.link-crawler-table { min-width: 1300px; }
.link-crawler-table :is(th, td):nth-child(3) { text-align: right; }
.link-target-url { display: block; max-width: 320px; overflow: hidden; color: var(--text); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
td.link-final-url { min-width: 180px; max-width: 280px; overflow-wrap: anywhere; }
.link-source-list { min-width: 220px; }
.link-source-list a, .link-source-list small { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-source-list a + a { margin-top: 3px; }
.link-crawler-table td:nth-child(7) { white-space: nowrap; }
.alerts-table { min-width: 1240px; }
.alerts-table tr.is-new > td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.alerts-table tr.is-new > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.alert-message, .alert-detail { line-height: 1.5; white-space: normal; }
.alert-message { min-width: 220px; }
.alert-message strong, .alert-message span { display: block; }
.alert-message strong { color: var(--text); font-weight: 500; }
.alert-message span { margin-top: 3px; color: var(--text-2); }
.alert-detail { min-width: 260px; color: var(--text-2); }
.alerts-table td:nth-child(5) a { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerts-table td:nth-child(6) { white-space: nowrap; }
.alert-actions, .table-actions { white-space: nowrap; }
.alert-actions button + button { margin-left: 6px; }
.alert-actions span { color: var(--muted); font: 400 11px/1 var(--mono); }
.table-actions button:hover:not(:disabled), .rank-row-actions button.danger:hover:not(:disabled) { border-color: var(--negative); color: var(--negative); }

.rank-table { min-width: 1000px; }
.rank-table :is(th, td):nth-child(3), .rank-table :is(th, td):nth-child(4) { text-align: right; }
.rank-keyword { display: block; color: var(--text); font-weight: 500; }
.rank-table td:first-child small { color: var(--warning); }
.rank-url { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-not-found { color: var(--muted); }
.rank-table td.rank-not-found { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rank-table td:nth-child(3):not(.rank-not-found) { color: var(--text); font-weight: 500; }
.rank-table td:nth-child(6) { white-space: nowrap; }
.rank-frequency-select { min-height: 30px; padding: 3px 8px; font: 400 12px/1.2 var(--mono); }
.rank-row-actions { min-width: 180px; white-space: nowrap; }
.rank-row-actions button + button { margin-left: 6px; }
.rank-row-actions button.is-active { border-color: var(--accent); color: var(--accent); }
.rank-sortable { cursor: pointer; -webkit-user-select: none; user-select: none; }
.rank-sortable:hover { color: var(--text); }
.rank-sort-indicator { display: inline-block; margin-left: 4px; color: var(--accent); font-size: 9px; }
.paa-history-table { min-width: 640px; }
.paa-history-table :is(th, td):nth-child(3), .paa-history-table :is(th, td):nth-child(4) { text-align: right; }
.paa-history-table td:nth-child(5) { white-space: nowrap; }
.rank-serp-table { min-width: 620px; }
.rank-serp-table td { color: var(--text-2); }
.rank-serp-table tr.is-target > td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.rank-serp-table tr.is-target > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.rank-serp-table th:first-child, .rank-serp-position { width: 72px; }
.rank-serp-position { color: var(--text); font: 500 12px/1 var(--mono); }
.rank-serp-domain { display: block; color: var(--text); font-weight: 500; }
.rank-serp-domain.is-target { color: var(--accent); }
.rank-serp-link { display: block; max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-serp-link + small { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Charts */
.trend-chart { position: relative; min-height: 260px; padding: 16px 20px 18px; }
.chart-panel .trend-chart { min-height: 240px; }
.interactive-chart { outline: none; }
.interactive-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.trend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-date-label { fill: var(--muted); font: 11px var(--mono); }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-hover-guide { stroke: var(--text); stroke-dasharray: 3 4; stroke-width: 1; opacity: 0.45; vector-effect: non-scaling-stroke; }
.chart-hover-point { stroke: var(--surface); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart-hit-area { fill: transparent; cursor: crosshair; }
.chart-tooltip { position: absolute; z-index: 2; top: 14px; right: 20px; width: min(320px, calc(100% - 40px)); padding: 12px 14px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); pointer-events: none; }
.chart-tooltip-date { display: block; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 500; }
.chart-tooltip-values { display: grid; gap: 6px; padding-top: 8px; }
.chart-tooltip-headings, .chart-tooltip-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.chart-tooltip-headings { grid-template-columns: minmax(0, 1fr) minmax(56px, auto) minmax(64px, auto); padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--muted); font: 400 11px/1.3 var(--mono); }
.chart-tooltip-headings span:not(:first-child) { text-align: right; }
.chart-tooltip.has-average .chart-tooltip-row { grid-template-columns: 12px minmax(0, 1fr) minmax(56px, auto) minmax(64px, auto); }
.chart-tooltip-row { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.chart-tooltip-row::before { width: 12px; height: 2px; background: currentColor; content: ""; }
.chart-tooltip-row span { overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.chart-tooltip-row strong { color: var(--text); font-weight: 500; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-tooltip-row .chart-average-value { color: var(--muted); font-weight: 400; }
.tooltip-clicks { color: var(--series-clicks); }
.tooltip-impressions { color: var(--series-impressions); }
.tooltip-ctr { color: var(--series-ctr); }
.tooltip-position { color: var(--series-position); }

/* Rank tracking: SERP details and forms */
.rank-serp-feature { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.feature-label { display: block; margin-bottom: 8px; color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.rank-serp-feature-domain { margin-bottom: 2px; color: var(--muted); font: 400 11.5px/1.4 var(--mono); }
.rank-serp-feature-title { color: var(--accent); font-size: 14px; font-weight: 500; text-decoration: none; }
.rank-serp-feature-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.rank-serp-feature-description { margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.rank-serp-related-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rank-serp-related-list li { padding: 3px 10px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12.5px; }
.rank-add-form { display: grid; grid-template-columns: minmax(0, 1fr) 150px 200px auto; gap: 8px; align-items: center; }
.rank-bulk-form { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rank-bulk-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.paa-lookup-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.paa-list { display: grid; margin: 0; padding: 0; list-style: none; }
.paa-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.paa-item:first-child { padding-top: 0; }
.paa-item:last-child { padding-bottom: 0; border-bottom: 0; }
.paa-question { margin-bottom: 4px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.paa-answer { margin-bottom: 4px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.paa-source { color: var(--accent); font: 400 11.5px/1.4 var(--mono); text-decoration: none; word-break: break-all; }
.paa-source:hover { text-decoration: underline; }
#paaResultCard .chart-note { padding: 0; }

/* Modules */
.module-card { --module-color: var(--accent); --module-text: color-mix(in srgb, var(--module-color) 74%, var(--text)); position: relative; display: flex; min-height: 210px; min-width: 0; flex-direction: column; padding: 18px 20px 0; background: var(--surface); }
.module-card::before { position: absolute; inset: 0 0 auto; height: 2px; background: var(--module-color); content: ""; }
.module-card:hover { background: var(--surface-2); }
.module-search-console { --module-color: #4a9eba; }
.module-opportunities { --module-color: #e8a020; }
.module-cannibalization { --module-color: #c25b79; }
.module-indexing { --module-color: #1aab8a; }
.module-technical-seo { --module-color: #8f75c4; }
.module-link-crawler { --module-color: #d06f36; }
.module-alerts { --module-color: #d0533a; }
.module-rank-tracking { --module-color: #45b792; }
.module-paa { --module-color: #c9862f; }
.module-content-freshness { --module-color: #6a7ec4; }
.module-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module-number { color: var(--module-text); font: 500 11px/1 var(--mono); letter-spacing: 0.08em; }
.module-card h3 { margin-top: 20px; color: var(--module-text); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.module-card p { margin: 8px 0 20px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.module-footer { margin: auto -20px 0; padding: 11px 20px; border-top: 1px solid var(--line); color: var(--muted); font: 400 11px/1.4 var(--mono); }

/* System and latest run */
.system-list { margin: 0; }
.system-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.system-list dt { color: var(--text-2); font-size: 13px; }
.system-list dd { margin: 0; color: var(--text); font: 400 12px/1.6 var(--mono); text-align: right; }
.revoke-form { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 16px 20px; }
.revoke-form p { max-width: 60ch; color: var(--text-2); font-size: 13px; line-height: 1.6; }
#latestRun { font-family: var(--mono); font-size: 12.5px; }

/* Site interactions */
.interaction-list { display: flex; flex-direction: column; }
.interaction-item { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.interaction-item:last-child { border-bottom: 0; }
.interaction-item.is-new { box-shadow: inset 2px 0 0 var(--accent); }
.interaction-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.interaction-title { color: var(--text); font-size: 14px; font-weight: 500; }
.interaction-meta { margin-top: 3px; color: var(--muted); font: 400 11.5px/1.4 var(--mono); }
.interaction-anchor { margin-top: 10px; padding-left: 10px; border-left: 2px solid var(--accent); color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.interaction-body { margin-top: 10px; color: var(--text-2); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.interaction-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.interaction-actions .outline-button { min-height: 30px; padding: 4px 10px; font-size: 12px; }

/* Search Console analysis (markup built by gsc-page.js) */
#gscAnalysisApp, #gscContent { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
#gscHeaderFilters .gsc-filters { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 10px; }
#gscHeaderFilters label, .gsc-numeric-filters label { display: grid; gap: 5px; color: var(--muted); font: 500 11px/1.2 var(--mono); }
#gscHeaderFilters select { min-width: 120px; }
.gsc-filter-chip { max-width: 100%; min-height: 34px; padding: 6px 12px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); cursor: pointer; font-size: 12.5px; overflow-wrap: anywhere; text-align: left; }
.gsc-filter-chip:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.search-metric-grid { margin: 0; }
.search-metric-card { border: 0; color: var(--text); cursor: pointer; text-align: left; transition: background 120ms ease; }
.search-metric-card::after { position: absolute; top: 16px; right: 16px; display: grid; width: 16px; height: 16px; place-items: center; border: 1px solid var(--line-2); color: transparent; content: "✓"; font: 500 11px/1 var(--mono); }
.search-metric-card.is-active::after { border-color: var(--tone); background: var(--tone); color: var(--surface); }
.search-metric-card:hover { background: var(--surface-2); }
.search-metric-card:not(.is-active)::before { opacity: 0; }
.search-metric-card:not(.is-active) .search-metric-label { color: var(--muted); }
.search-metric-card:not(.is-active) :is(.gsc-metric-value, small) { opacity: 0.45; }
.search-metric-card:focus-visible { z-index: 1; outline: 2px solid var(--tone); outline-offset: -2px; }
.gsc-metric-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.gsc-metric-value strong { color: var(--text); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gsc-metric-change { padding: 2px 6px; font: 500 11.5px/1.4 var(--mono); white-space: nowrap; }
.gsc-metric-change.is-positive { background: color-mix(in srgb, var(--positive) 14%, transparent); color: var(--positive); }
.gsc-metric-change.is-negative { background: color-mix(in srgb, var(--negative) 14%, transparent); color: var(--negative); }
.gsc-metric-change.is-neutral { background: var(--surface-3); color: var(--muted); }
.gsc-chart-header .gsc-view-switch { margin-left: auto; }
#gscPerformanceChart { min-height: 360px; }
#gscPerformanceChart > p { color: var(--muted); }
.gsc-result-card { --card-tone: var(--accent); }
.gsc-result-card.gsc-rising { --card-tone: var(--positive); }
.gsc-result-card.gsc-falling { --card-tone: var(--negative); }
.gsc-result-card.gsc-updates { --card-tone: var(--info); }
.gsc-card-header h2 { color: var(--card-tone); }
.gsc-card-header .gsc-count { margin-right: auto; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.gsc-card-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.gsc-card-controls > label, .gsc-summary-controls > label { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 500 11px/1 var(--mono); }
.gsc-card-controls input[type="search"] { width: 200px; }
.gsc-summary-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.gsc-numeric-filters { display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.gsc-numeric-filters input { width: 112px; }
.gsc-numeric-filters .outline-button { min-height: 34px; }
.gsc-result-card > p { padding: 12px 20px 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.gsc-result-card div > p { padding: 14px 20px; color: var(--muted); font-size: 13px; }
.gsc-result-card ul { margin: 0; padding: 0; list-style: none; }
.gsc-result-card > p + div > ul, .gsc-result-card > p + div > p { margin-top: 8px; border-top: 1px solid var(--line); }
.gsc-result-card li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 20px; border-bottom: 1px solid var(--line); line-height: 1.5; overflow-wrap: anywhere; }
.gsc-result-card li:last-child { border-bottom: 0; }
.gsc-result-card li:hover { background: var(--surface-2); }
.gsc-result-card li p { color: var(--muted); font: 400 11.5px/1.5 var(--mono); }
.gsc-rising li, .gsc-falling li { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; }
.gsc-rising li > .gsc-drill, .gsc-falling li > .gsc-drill { min-width: 0; flex: 1 1 auto; }
.gsc-rising li > span, .gsc-falling li > span { max-width: 48%; flex: 0 0 auto; color: var(--card-tone); font: 500 12px/1.5 var(--mono); text-align: right; }
.gsc-updates li { flex-direction: row; align-items: baseline; gap: 14px; }
.gsc-updates li time { flex: none; color: var(--muted); font: 400 11.5px/1.5 var(--mono); white-space: nowrap; }
.gsc-updates li .gsc-drill { min-width: 0; flex: 1 1 auto; }
.gsc-drill, .gsc-sort { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.gsc-drill { color: var(--text); font-weight: 500; overflow-wrap: anywhere; white-space: normal; }
.gsc-drill:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gsc-sort { color: var(--muted); font: 500 11px/1.3 var(--mono); white-space: nowrap; }
.gsc-sort:hover { color: var(--text); }
th[aria-sort="ascending"] .gsc-sort, th[aria-sort="descending"] .gsc-sort { color: var(--accent); }
th[aria-sort="ascending"] .gsc-sort::after { content: " ↑"; }
th[aria-sort="descending"] .gsc-sort::after { content: " ↓"; }
.gsc-result-card table { min-width: 860px; }
.gsc-result-card :is(th, td):not(:first-child) { text-align: right; white-space: nowrap; }
.gsc-result-card td:first-child { min-width: 220px; max-width: 420px; }
.gsc-two-column .gsc-result-card table, .gsc-summary-table { min-width: 0; }
td.gsc-change-positive { color: var(--positive); font-weight: 500; }
td.gsc-change-negative { color: var(--negative); font-weight: 500; }
td.gsc-change-neutral { color: var(--muted); }
.gsc-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 20px; border-top: 1px solid var(--line); }
.gsc-pager button { min-width: 32px; }
.gsc-pager [aria-current="page"], .gsc-pager [aria-current="page"]:disabled { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); opacity: 1; }
.gsc-pager > span { color: var(--muted); font: 400 11.5px/1 var(--mono); }
.gsc-pager > span:last-child { margin-left: auto; white-space: nowrap; }
.gsc-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gsc-independent-card { min-width: 0; }
.gsc-independent-card > .gsc-result-card { height: 100%; }
.gsc-tables { display: flex; flex-direction: column; gap: 16px; }
.gsc-opportunities > a { display: inline-block; margin: 12px 20px 16px; font-size: 13px; text-underline-offset: 3px; }
.device-mobile { --swatch: var(--device-mobile); }
.device-desktop { --swatch: var(--device-desktop); }
.device-tablet { --swatch: var(--device-tablet); }
.gsc-device > p { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.gsc-device-shares { display: grid; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.gsc-device-share { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.gsc-device-share > span { color: var(--muted); font: 500 11px/1.3 var(--mono); }
.gsc-device-bar { display: flex; height: 14px; gap: 2px; background: var(--surface); }
.gsc-device-bar > i { display: block; min-width: 3px; flex: 0 1 0; background: var(--swatch); }
.gsc-device-values { display: flex; flex-wrap: wrap; grid-column: 2; gap: 4px 18px; }
.gsc-device-name { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.gsc-device-name strong { color: var(--text); font: 500 12px/1.4 var(--mono); }
.gsc-swatch { display: inline-block; width: 9px; height: 9px; flex: none; background: var(--swatch); }
.gsc-result-card .gsc-device-insight { padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 13px; line-height: 1.6; }
.gsc-result-card .gsc-device-table { min-width: 760px; }
.gsc-result-card .gsc-device-table td:first-child { min-width: 0; white-space: nowrap; }
.gsc-device-table :is(th, td) { padding-right: 12px; padding-left: 12px; }
.gsc-device-table :is(th, td):first-child { padding-left: 20px; }
@media (max-width: 640px) {
  .gsc-device-share { grid-template-columns: minmax(0, 1fr); }
  .gsc-device-values { grid-column: 1; }
}

/* Login and 2FA */
.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 24px 24px;
}
.login-nav { border-bottom: 1px solid var(--line); background: var(--side); }
.login-nav .nav-inner { width: min(100%, 1180px); margin: 0 auto; padding: 0 28px; }
.login-nav .nav-top { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; }
.logo-container { display: flex; align-items: center; text-decoration: none; }
.logo { display: block; width: 168px; height: auto; }
.logo-light { display: none; }
html.light .logo-dark { display: none; }
html.light .logo-light { display: block; }
.login-shell { display: grid; width: min(100%, 1180px); grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: clamp(40px, 7vw, 110px); align-items: center; margin: 0 auto; padding: 56px 28px; }
.login-intro { min-width: 0; }
.eyebrow { margin-bottom: 14px; color: var(--accent); font: 500 11px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.login-intro h1 { margin-bottom: 18px; font-size: clamp(40px, 5.4vw, 68px); letter-spacing: -0.035em; line-height: 1; }
.login-intro p:last-child { max-width: 52ch; color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.login-card { position: relative; padding: 28px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.login-card::before { position: absolute; inset: -1px -1px auto; height: 2px; background: var(--accent); content: ""; }
.login-kicker { color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.login-card h2 { margin: 6px 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.login-copy { margin-bottom: 22px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.login-card form { display: grid; gap: 8px; }
.login-card label { color: var(--muted); font: 500 11px/1.3 var(--mono); }
.login-card input:not([type="checkbox"]) { width: 100%; min-height: 44px; padding: 0 12px; font-size: 14px; }
.login-submit { display: grid; min-height: 44px; margin-top: 8px; place-items: center; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 13.5px; font-weight: 500; text-decoration: none; }
.login-submit:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.login-submit:disabled { cursor: progress; opacity: 0.6; }
.login-security { display: block; margin-top: 16px; color: var(--muted); font: 400 11px/1.5 var(--mono); }
.login-error { margin-bottom: 16px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--negative) 45%, transparent); border-left-width: 2px; background: color-mix(in srgb, var(--negative) 8%, transparent); color: var(--negative); font-size: 12.5px; line-height: 1.5; }
.mfa-setup { display: grid; gap: 10px; margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.mfa-setup p, .mfa-recovery p { color: var(--text-2); font-size: 12.5px; line-height: 1.55; }
.mfa-setup small { color: var(--muted); font: 400 11px/1.5 var(--mono); }
.mfa-secret { display: block; padding: 10px 12px; border: 1px dashed var(--line-3); color: var(--accent); font: 500 14px/1.5 var(--mono); letter-spacing: 0.12em; overflow-wrap: anywhere; }
.mfa-app-link { width: fit-content; color: var(--accent); font-size: 12.5px; text-underline-offset: 3px; }
.mfa-recovery { display: grid; gap: 12px; }
.mfa-recovery h3 { font-size: 17px; font-weight: 700; }
.mfa-recovery pre { margin: 0; padding: 14px; border: 1px dashed var(--line-3); background: var(--surface-2); color: var(--text); font: 500 13px/1.8 var(--mono); letter-spacing: 0.08em; }

/* Responsive */
@media (max-width: 1240px) {
  .kpi-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  html { scroll-padding-top: 120px; }
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side {
    z-index: 20;
    display: grid;
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand foot" "nav nav";
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background-image: none;
    background-color: color-mix(in srgb, var(--side) 94%, transparent);
    backdrop-filter: blur(8px);
  }
  .brand { grid-area: brand; margin: 0; padding: 10px 24px; border: 0; }
  .brand-mark { width: 32px; height: 32px; font-size: 11px; }
  .brand-text strong { display: none; }
  .brand-text span { font-size: 16px; }
  .side-foot { position: static; grid-area: foot; margin: 0; padding: 0 24px 0 0; border: 0; background: none; }
  .session-label, .side-note { display: none; }
  .side-nav { grid-area: nav; flex-direction: row; gap: 0; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-group, .nav-index { display: none; }
  .side-nav a { flex: none; padding: 10px 10px 12px; border-bottom: 2px solid transparent; border-left: 0; font-size: 13px; white-space: nowrap; }
  .side-nav a[aria-current="page"] { border-bottom-color: var(--accent); background: transparent; }
  .panel-main { max-width: none; padding: 28px 24px 48px; }
}
@media (max-width: 900px) {
  .kpi-grid, .kpi-grid.cols-3, .kpi-grid.cols-5, .search-metric-grid, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gsc-two-column { grid-template-columns: minmax(0, 1fr); }
  .login-shell { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 40px 24px; }
  .login-card { max-width: 480px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 108px; }
  .side { grid-template-columns: minmax(0, 1fr) auto; }
  .brand { padding: 10px 14px; }
  .side-foot { padding-right: 14px; }
  .side-nav { padding: 0 4px; }
  .panel-main { gap: 14px; padding: 22px 14px 40px; }
  .page-head { margin-bottom: 4px; padding-bottom: 16px; }
  .page-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
  .page-note { text-align: left; }
  .hero-status { width: 100%; }
  .panel-header, .gsc-card-header, .gsc-chart-header, .filter-bar, .pager, .gsc-pager, .gsc-numeric-filters, .rank-serp-feature, .revoke-form, .panel-body { padding-right: 14px; padding-left: 14px; }
  .snapshot-actions { width: 100%; justify-content: space-between; }
  th, td { padding: 10px 12px; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }
  .kpi, .search-metric-card { padding: 14px 14px 16px; }
  .kpi strong, .gsc-metric-value strong { font-size: 25px; }
  .search-metric-card::after { top: 14px; right: 12px; }
  .filter-count { width: 100%; margin-left: 0; }
  .chip-danger { margin-left: 0; }
  .trend-chart { padding: 12px 10px 14px; }
  #gscPerformanceChart { min-height: 200px; }
  .chart-note { padding: 0 14px 16px; }
  .rank-add-form, .paa-lookup-form { grid-template-columns: minmax(0, 1fr); }
  .gsc-card-controls, .gsc-summary-controls { width: 100%; justify-content: flex-start; margin-left: 0; }
  .gsc-card-controls input[type="search"] { width: 100%; flex: 1 1 160px; }
  .gsc-numeric-filters { justify-content: flex-start; }
  .gsc-numeric-filters input { width: 100%; }
  .gsc-numeric-filters label { flex: 1 1 120px; }
  #gscHeaderFilters .gsc-filters { justify-content: flex-start; }
  #gscHeaderFilters label { flex: 1 1 100px; }
  #gscHeaderFilters select { width: 100%; min-width: 0; }
  .gsc-result-card li, .interaction-item { padding-right: 14px; padding-left: 14px; }
  .gsc-pager > span:last-child { width: 100%; margin-left: 0; }
  .module-grid { grid-template-columns: minmax(0, 1fr); }
  .interaction-top { flex-direction: column; }
  .interaction-actions { justify-content: flex-start; }
  .system-list div { padding-right: 14px; padding-left: 14px; }
  .login-nav .nav-inner { padding: 0 16px; }
  .logo { width: 146px; }
  .login-shell { padding: 32px 16px 40px; }
  .login-card { padding: 22px 18px; }
}
@media (max-width: 380px) {
  .kpi-grid, .kpi-grid.cols-3, .kpi-grid.cols-5, .search-metric-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
