:root {
  color-scheme: light;
  --ink: #192740; --muted: #5b6a80; --faint: #8591a3; --line: #e3e9f2;
  --paper: #fff; --bg: #f4f7fc; --brand: #2857d6; --brand-dark: #1d43ad;
  --nav: #121e34; --nav-line: #2a3850; --nav-muted: #acbbd0;
  --radius: 15px; --shadow: 0 2px 6px #15274a07;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; color: var(--ink); background: var(--bg); }
h1, h2, p { margin: 0; }
h1 { color: #17243c; font-size: clamp(27px, 3vw, 34px); line-height: 1.17; letter-spacing: -.045em; }
h2 { color: #1c2940; font-size: 17px; line-height: 1.42; letter-spacing: -.018em; }
p { line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #87a2ff; outline-offset: 2px;
}
ul { margin: 10px 0; }
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100dvh; display: flex; flex-direction: column; overflow: auto;
  padding: 24px 15px 17px; background: var(--nav); color: white;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 14px; letter-spacing: -.035em; white-space: nowrap; }
.sidebar .brand { padding: 0 0 0 4px; }
.brand small { border: 1px solid #6c8bf877; color: #cedaff; background: #24385c; padding: 2px 4px; border-radius: 4px; font-weight: 750; font-size: 9px; letter-spacing: .07em; margin-left: 2px; }
.brand-icon { width: 33px; height: 33px; flex: 0 0 33px; background: #3463ef; display: flex; align-items: end; justify-content: center; gap: 3px; border-radius: 9px; padding-bottom: 8px; box-shadow: 0 2px 12px #4367e34d; }
.brand-icon i { width: 3px; height: 7px; background: white; border-radius: 1.5px; }
.brand-icon i:nth-child(2) { height: 12px; }
.brand-icon i:nth-child(3) { height: 17px; }
.workspace { margin: 38px 2px 22px; }
.workspace-label { color: #a6b6cc; display: block; margin: 0 0 9px 2px; font-size: 11px; font-weight: 650; }
.workspace select, .side-empty { width: 100%; border: 1px solid var(--nav-line); background: #1d2b44; color: white; padding: 8px 10px; border-radius: 8px; height: 40px; font-size: 12px; font-weight: 650; }
.side-empty { display: flex; align-items: center; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a { color: var(--nav-muted); display: flex; gap: 11px; align-items: center; min-height: 43px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.sidebar nav a:hover { background: #213047; color: white; }
.sidebar nav a.active { color: #f1f5ff; background: #2a406b; font-weight: 700; }
.nav-icon { display: inline-block; width: 18px; text-align: center; font-size: 17px; line-height: 1; }
.nav-count { margin-left: auto; background: #ffffff22; font-variant-numeric: tabular-nums; border-radius: 8px; padding: 2px 5px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--nav-line); padding: 16px 3px 0; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; color: #e6edfa; }
.sidebar-foot small { font-size: 11px; color: var(--nav-muted); margin-top: 3px; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #324977; color: #d7e2ff; font-weight: 750; flex-shrink: 0; }
.sidebar-foot form { margin-left: auto; }
.logout { color: #d6e2f7; background: transparent; border: 0; padding: 6px; }
.topbar { min-height: 60px; background: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 29px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumb span { color: var(--faint); }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.demo-label { display: inline-flex; align-items: center; gap: 6px; line-height: 1.1; border-radius: 999px; padding: 7px 10px; color: #795600; background: #fff3cf; font-size: 11px; font-weight: 700; }
.demo-label i { width: 6px; height: 6px; border-radius: 50%; background: #c48100; }
.menu-btn { display: none !important; }
main { width: 100%; max-width: 1700px; margin: 0 auto; padding: 27px 29px 42px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.title-row > div { min-width: 0; }
.title-row p { margin-top: 7px; color: var(--muted); }
.sep { padding: 0 4px; color: var(--faint); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; text-align: center; gap: 6px; white-space: nowrap; border: 1px solid #dbe3ef; border-radius: 8px; background: white; color: #2a3952; padding: 0 12px; font-size: 12px; font-weight: 700; }
.button:hover { background: #eef3ff; border-color: #c8d6f5; }
.primary { background: var(--brand); color: white; border-color: var(--brand); box-shadow: 0 2px 4px #2958d62b; }
.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-small { min-height: 33px; padding: 0 10px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric { position: relative; display: flex; flex-direction: column; gap: 7px; min-height: 122px; padding: 17px 15px; }
.metric > span:not(.metric-icon) { font-size: 12px; font-weight: 650; color: #4f607a; padding-right: 33px; }
.metric strong { color: #17243c; font-size: 33px; line-height: 1.05; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); font-size: 11px; font-weight: 500; }
.metric-icon { width: 33px; height: 33px; top: 15px; right: 14px; display: grid; place-items: center; position: absolute; border-radius: 9px; font-weight: 750; font-size: 17px; }
.blue, .status-serp_visible { color: #2454ce; background: #e9f0ff; }
.green, .status-indexed_gsc, .priority-ok { color: #11734f; background: #e7f7ef; }
.orange, .status-not_indexed_gsc, .priority-p1 { color: #8a4d04; background: #fff2df; }
.violet, .status-alternate_canonical { color: #6945a8; background: #f0eafa; }
.danger, .priority-p0, .status-source_conflict, .status-api_error { color: #a7333e; background: #fcebef; }
.priority-p2, .status-pending, .status-unknown, .status-serp_not_found, .tag-neutral { color: #53627a; background: #edf1f7; }
.overview-grid, .evidence-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 15px; margin-bottom: 16px; }
.evidence-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-grid.lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 16px; }
.panel { padding: 17px 18px; }
.panel > p, .panel > form, .panel > details, .panel > dl { margin-top: 12px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.panel-heading p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.panel-heading .tag { margin-top: 2px; }
.panel-empty { display: grid; place-content: center; min-height: 86px; text-align: center; color: var(--muted); padding: 14px 7px; }
.ratio-big { font-size: 32px; line-height: 1.1; color: var(--brand); }
.trend .panel-empty, .signals .panel-empty { min-height: 137px; }
.chart-wrap { position: relative; height: 155px; margin-top: 11px; }
canvas { width: 100%; height: 100%; display: block; }
.chart-tooltip { position: absolute; z-index: 1; line-height: 1.55; pointer-events: none; background: #162541; color: white; padding: 7px 9px; border-radius: 6px; white-space: pre-line; font-size: 11px; }
.legend { color: var(--muted); display: flex; justify-content: center; gap: 17px; margin-top: 10px; font-size: 11px; font-weight: 650; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 100%; display: inline-block; }
.blue-dot { background: #3b6bf6; }
.slate-dot { background: #8ca7d4; }
.signal { display: flex; align-items: center; gap: 9px; border-top: 1px solid #edf1f7; padding: 12px 0; }
.signal:first-of-type, .panel-heading + .signal { margin-top: 10px; }
.signal:last-child { padding-bottom: 0; }
.signal-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; font-weight: 800; flex-shrink: 0; }
.signal div { flex: 1; }
.signal strong, .signal small { display: block; }
.signal strong { font-size: 12px; }
.signal small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.inline-link, .back-link { color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.inline-link:hover, .back-link:hover { text-decoration: underline; }
.signals .panel-heading a { flex-shrink: 0; padding-top: 3px; }
.table-card { overflow: hidden; margin-bottom: 16px; scroll-margin-top: 12px; }
.table-heading { padding: 17px 18px 11px; }
.count-tag { vertical-align: 2px; display: inline-block; color: #42557b; font: 650 11px system-ui, sans-serif; margin-left: 4px; padding: 2px 7px; border-radius: 20px; background: #eef2fa; }
.filters { padding: 0 18px 11px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.filters > label { min-width: 0; }
.filters .search { display: flex; align-items: center; gap: 6px; width: max(180px, 26%); height: 34px; background: white; border: 1px solid #dbe3ef; border-radius: 8px; padding: 0 8px; }
.search span { color: var(--muted); font-size: 20px; line-height: 1; }
.search input { border: 0; flex: 1; min-width: 0; padding: 0 1px; height: 27px; font-size: 12px; }
input, select, textarea { color: var(--ink); border-radius: 8px; background: white; border: 1px solid #dbe3ef; padding: 7px 9px; }
input, select { min-height: 35px; }
.filters select, .filters input { min-height: 33px; max-width: 100%; font-size: 12px; }
.filters select { padding-right: 4px; }
.extra-filters { flex: 1 0 100%; }
summary { color: #445b85; font-size: 12px; font-weight: 650; margin: 2px 0; width: fit-content; }
.advanced-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 8px 0 3px; }
.advanced-fields .inline-link { align-self: end; padding: 8px 0; }
.table-scroll { overflow: auto; margin: 0; }
table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; font-size: 12px; }
thead th { background: #f7f9fd; color: #52627d; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; padding: 10px 12px; }
tbody td { border-bottom: 1px solid #edf1f7; padding: 11px 12px; }
tr > :first-child { padding-left: 18px; }
tr > :last-child { padding-right: 18px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
td small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.url-cell { width: 31%; max-width: 220px; }
.url-cell a { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: block; color: #263955; font-weight: 700; }
.url-cell a:hover { color: var(--brand-dark); text-decoration: underline; }
.technical { color: #52617a; max-width: 205px; }
.tag { display: inline-flex; align-items: center; padding: 4px 7px; line-height: 1.2; border-radius: 7px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.mono { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-link { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--brand-dark); }
.row-link:hover { background: #e9f0ff; }
.pagination { border-top: 1px solid var(--line); min-height: 52px; padding: 8px 18px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.pagination div { display: flex; gap: 9px; align-items: center; }
.summary-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.summary-row a { color: #273d65; font-weight: 650; }
.summary-row a:hover { text-decoration: underline; }
.panel-heading + .summary-row { margin-top: 12px; }
.usage { padding: 11px 0 10px; font-size: 12px; }
.usage div { display: flex; justify-content: space-between; align-items: start; gap: 7px; margin-bottom: 7px; }
.usage span, .usage small { color: var(--muted); }
.usage small { display: block; margin-top: 4px; }
progress { width: 100%; height: 7px; border: 0; border-radius: 9px; background: #e9eef8; accent-color: var(--brand); overflow: hidden; }
progress::-webkit-progress-bar { background: #e9eef8; }
progress::-webkit-progress-value { background: var(--brand); }
progress::-moz-progress-bar { background: var(--brand); }
.notice { background: #eaf0ff; color: #254181; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; overflow-wrap: anywhere; }
.notice.danger { background: #fcebef; color: #a7333e; }
.scope { margin: -8px 0 13px; font-size: 12px; color: var(--muted); }
.scope a { margin-left: 5px; color: var(--brand-dark); text-decoration: underline; }
.empty { padding: 45px 20px; text-align: center; }
.empty p { color: var(--muted); margin: 7px 0 17px; }
.form-card { margin-top: 15px; }
.stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.stack label, .advanced-fields label { display: grid; align-content: start; gap: 4px; color: #455674; font-size: 12px; font-weight: 650; min-width: 0; }
.stack label small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.stack label input, .stack label select, .stack label textarea { width: 100%; min-width: 0; font-weight: 500; font-size: 14px; }
.stack textarea { resize: vertical; }
.break, pre, .evidence li { overflow-wrap: anywhere; }
.back-link { display: inline-flex; margin-bottom: 12px; }
.diagnosis { margin-bottom: 16px; }
.evidence { display: grid; grid-template-columns: minmax(65px, .65fr) minmax(0, 1fr); gap: 7px 9px; margin: 0; font-size: 12px; }
.evidence dt { color: var(--muted); font-weight: 650; }
.evidence dd { margin: 0; overflow-wrap: anywhere; }
.panel ul { overflow-wrap: anywhere; padding-left: 18px; }
pre { max-height: 290px; overflow: auto; background: #f3f6fb; border: 1px solid var(--line); padding: 9px; border-radius: 7px; font-size: 11px; white-space: pre-wrap; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top,#e6eeff,#f4f7fc 60%); }
.login-card { width: min(100%,390px); padding: 28px; }
.login-brand { margin-bottom: 18px; }
.login-card h1 { margin-bottom: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .layout { grid-template-columns: 208px minmax(0,1fr); }
  main, .topbar { padding-left: 19px; padding-right: 19px; }
  .sidebar { padding-left: 9px; padding-right: 9px; }
  .metrics { gap: 8px; }
  .metric { padding-left: 11px; }
  .metric-icon { right: 9px; width: 27px; height: 27px; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 790px) {
  .layout { display: block; }
  .sidebar { display: none; height: auto; position: static; min-height: 250px; }
  .sidebar.open { display: flex; }
  .sidebar .workspace { margin: 13px 2px 9px; }
  .sidebar-foot { margin-top: 10px; padding-top: 8px; }
  .menu-btn { display: inline-flex !important; }
  .breadcrumb { margin-right: auto; }
  .topbar { min-height: 53px; }
  main { padding-top: 21px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 555px) {
  main, .topbar { padding-left: 12px; padding-right: 12px; }
  .title-row { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 15px; }
  .metrics { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
  .metric { min-height: 102px; padding-top: 12px; }
  .metric strong { font-size: 27px; }
  .metric-icon { top: 9px; }
  .overview-grid, .overview-grid.lower, .evidence-grid, .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .chart-wrap { height: 140px; }
  .panel { padding: 12px; }
  .table-heading { padding: 13px 12px 9px; }
  .filters { padding: 0 12px 10px; }
  .filters .search { width: 100%; }
  .advanced-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pagination { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 320px) {
  .demo-label { display: none; }
  .metric > span:not(.metric-icon) { padding-right: 0; }
  .metric-icon { display: none; }
}
