/* SAYZ SEO — uygulama stili (Bootstrap 5 üzerine) */
:root {
  --bg: #F6F8FB; --text: #122033; --muted: #5B6B80; --muted2: #8494A8; --card: #fff; --border: #DDE4EC; --border2: #EDF1F6;
  --blue: #0669DB; --blue-50: #EAF3FE; --blue-100: #D3E6FC; --purple: #7457FF; --purple-50: #F0EDFF;
  --green: #16A66A; --green-50: #E6F6EF; --amber: #F5A623; --amber-50: #FEF4E3; --red: #E84A5F; --red-50: #FDECEF; --orange: #F07F2C;
  --side: #081725; --side-2: #0E2236; --side-text: #C5D1DE; --radius: 12px; --shadow: 0 1px 2px rgba(18, 32, 51, .04), 0 2px 8px rgba(18, 32, 51, .04);
  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--text); --bs-body-bg: var(--bg); --bs-primary: var(--blue); --bs-primary-rgb: 6, 105, 219; --bs-border-color: var(--border);
  --bs-link-color: var(--blue); --bs-link-color-rgb: 6, 105, 219; --bs-body-font-size: 14px;
}
html { font-size: 14px; }
body { background: var(--bg); color: var(--text); font-family: var(--bs-body-font-family); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
small, .small { font-size: 12px; }
.text-muted { color: var(--muted) !important; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
kbd { background: #F0F3F7; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12px; font-family: inherit; box-shadow: none; }

/* Buttons & forms */
.btn { font-weight: 600; border-radius: 8px; font-size: 14px; padding: .5rem .95rem; display: inline-flex; align-items: center; gap: .4rem; justify-content: center; }
.btn-sm { font-size: 13px; padding: .32rem .7rem; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: #0558B8; --bs-btn-hover-border-color: #0558B8; --bs-btn-active-bg: #04499A; --bs-btn-disabled-bg: #7FB0EA; --bs-btn-disabled-border-color: #7FB0EA; }
.btn-outline-primary { --bs-btn-color: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue); --bs-btn-hover-border-color: var(--blue); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--border); --bs-btn-hover-bg: #F3F6FA; --bs-btn-hover-border-color: #CBD5E1; }
.btn-purple { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn-purple:hover { background: #5E42EB; color: #fff; }
.form-control, .form-select { border-color: var(--border); border-radius: 8px; font-size: 14px; min-height: 40px; color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(6, 105, 219, .15); }
.form-label { font-weight: 600; font-size: 13px; margin-bottom: .35rem; }
.form-text { font-size: 12px; color: var(--muted); }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.invalid-feedback { font-size: 12px; }

/* App shell */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex: 0 0 240px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px 14px; z-index: 1040; scrollbar-width: thin; scrollbar-color: #22384F transparent; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 0 6px 16px; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--blue), var(--purple)); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; fill: #fff; }
.brand-name { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.3px; line-height: 1.05; }
.brand-name b { color: #4EA0FF; font-weight: 800; }
.brand-sub { display: block; font-size: 12px; color: #9FB2C7; margin-top: 2px; white-space: nowrap; }
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--side-2); border: 1px solid #1B3149; color: #9FB2C7; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 12px; }
.side-search span { flex: 1; text-align: left; }
.side-search kbd { background: transparent; border-color: #2A425C; color: #9FB2C7; }
.side-search:hover { border-color: #2F4D6E; color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); font-size: 14px; font-weight: 500; }
.side-link i:first-child { font-size: 16px; width: 18px; text-align: center; }
.side-link span:not(.side-badge) { flex: 1; }
.side-link:hover { background: var(--side-2); color: #fff; }
.side-link.active { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(6, 105, 219, .35); }
.side-badge { background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; min-width: 22px; height: 20px; padding: 0 7px; display: inline-grid; place-items: center; }
.side-badge.red { background: var(--red); }
.side-link.active .side-badge { background: rgba(255, 255, 255, .25); }
.side-caret { font-size: 12px; opacity: .8; }
.side-sub { display: flex; flex-direction: column; margin: 2px 0 6px 18px; padding-left: 12px; border-left: 1px solid #1F354C; }
.side-sub a { color: #A9B8C9; font-size: 13px; padding: 5px 10px; border-radius: 6px; }
.side-sub a:hover { color: #fff; background: var(--side-2); }
.side-sub a.active { color: #fff; background: rgba(6, 105, 219, .55); }
.side-sep { height: 1px; background: #1B3149; margin: 10px 4px; }
.plan-card { background: var(--side-2); border: 1px solid #1B3149; border-radius: 10px; padding: 12px; margin-top: 14px; }
.plan-title { color: #fff; font-weight: 700; font-size: 14px; }
.plan-title i { color: var(--amber); }
.plan-usage { font-size: 12px; color: #9FB2C7; margin: 4px 0 6px; }
.plan-bar { height: 6px; background: #22384F; border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.plan-bar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.plan-bar.big { height: 8px; background: var(--border2); }
.plan-bar.big span { background: var(--amber); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 0 20px; position: sticky; top: 0; z-index: 1030; }
.top-search { flex: 1 1 200px; max-width: 380px; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; background: #F6F8FB; border: 1px solid var(--border); border-radius: 8px; color: var(--muted2); padding: 0 12px; font-size: 14px; }
.top-search span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-search:hover { border-color: #C2CFDD; }
.ctx-form { display: flex; gap: 8px; align-items: center; margin-left: auto; min-width: 0; }
.ctx { display: flex; align-items: center; gap: 6px; height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 4px 0 10px; background: #fff; margin: 0; font-size: 13px; }
.ctx > span, .ctx > i { color: var(--muted); font-weight: 500; }
.ctx select { border: 0; background: transparent; font-weight: 600; font-size: 13px; color: var(--text); padding: 0 2px; height: 36px; max-width: 150px; cursor: pointer; text-overflow: ellipsis; }
@media (max-width: 1500px) { .ctx select { max-width: 120px; } .ctx { padding-left: 8px; } }
.ctx select:focus { outline: none; }
.ctx:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(6, 105, 219, .12); }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); display: inline-grid; place-items: center; font-size: 19px; position: relative; flex: none; }
.icon-btn:hover { background: #F2F5F9; color: var(--text); }
.bell-count { position: absolute; top: 3px; right: 2px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.user-btn { display: flex; align-items: center; gap: 9px; background: transparent; border: 0; padding: 4px; border-radius: 10px; color: var(--text); }
.user-btn:hover { background: #F2F5F9; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.purple { background: var(--purple); } .avatar.green { background: var(--green); } .avatar.amber { background: var(--amber); } .avatar.red { background: var(--red); }
.user-meta { flex-direction: column; line-height: 1.2; text-align: left; }
.user-meta b { font-size: 14px; } .user-meta small { color: var(--muted); }
.dropdown-menu { border-color: var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(18, 32, 51, .12); font-size: 14px; }
.dropdown-item { display: flex; gap: 8px; align-items: center; padding: 7px 14px; }
.content { padding: 20px 24px 40px; flex: 1; outline: none; }

/* Page header */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--blue); }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Cards */
.card-s { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 16px 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 16px; font-weight: 700; margin: 0; }
.panel-head .ms-auto { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.panel-sub { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-kpi-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-kpi-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mb-16 { margin-bottom: 16px; }

/* KPI */
.kpi { padding: 14px 16px 10px; display: flex; flex-direction: column; min-height: 132px; overflow: hidden; }
.kpi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--text); }
.kpi-label i { color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.6px; margin-top: 4px; line-height: 1.15; }
.kpi-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-unavail { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; background: #F6F8FB; border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; }
.kpi .spark { width: calc(100% + 32px); margin: 6px -16px -10px; height: 36px; display: block; }
.spark-line { stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.spark-up .spark-line { stroke: var(--green); } .spark-up .spark-fill { fill: rgba(22, 166, 106, .10); }
.spark-down .spark-line { stroke: var(--red); } .spark-down .spark-fill { fill: rgba(232, 74, 95, .09); }
.src-badge { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 7px; white-space: nowrap; line-height: 1.5; border: 1px solid transparent; }
.src-gsc { background: #E7F1FD; color: #0558B8; }
.src-serp { background: #EAF6F0; color: #0E7A4D; }
.src-est { background: #F0F3F7; color: #4F5F74; }
.src-crawler { background: #FEF4E3; color: #9A5B00; }
.src-ai { background: var(--purple-50); color: #5B3FE0; }
.src-sayz { background: #E9EEF5; color: #1D3552; border-color: #D5DEE9; }
.demo-badge { font-size: 12px; font-weight: 700; color: #8A5300; background: #FFF3DC; border: 1px dashed #F5A623; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.delta { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.delta i { font-size: 13px; -webkit-text-stroke: .6px; }
.delta-up { color: var(--green); } .delta-down { color: var(--red); } .delta-flat, .delta-na { color: var(--muted2); }
td .delta, .delta.sm { font-size: 13px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: 14px; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 6px 6px 0 0; }
.tabs a:hover, .tabs button:hover { color: var(--text); background: #EFF3F8; }
.tabs a.active, .tabs button.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--blue-50); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a, .seg button { padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border: 0; background: none; border-right: 1px solid var(--border); }
.seg > :last-child { border-right: 0; }
.seg a.active, .seg button.active { background: var(--blue); color: #fff; }
.seg a:hover:not(.active), .seg button:hover:not(.active) { background: #F2F5F9; color: var(--text); }

/* Analysis bar */
.analyze-bar { display: grid; grid-template-columns: minmax(220px, 2.2fr) repeat(4, minmax(120px, 1fr)) auto; gap: 8px; padding: 10px; margin-bottom: 14px; }
.analyze-bar .input-icon { position: relative; }
.analyze-bar .input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.analyze-bar .input-icon input { padding-left: 36px; height: 44px; font-size: 15px; font-weight: 500; }
.analyze-bar .form-select { height: 44px; }
.analyze-bar .btn { height: 44px; padding: 0 22px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #FAFBFD; }
.tbl th a { color: var(--muted); } .tbl th a:hover, .tbl th a.sorted { color: var(--blue); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #F8FAFD; }
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .url { color: var(--blue); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.tbl.compact td, .tbl.compact th { padding: 7px 8px; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px 0; gap: 8px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.pager-info { font-size: 13px; color: var(--muted); }
.pagination { --bs-pagination-color: var(--text); --bs-pagination-active-bg: var(--blue); --bs-pagination-active-border-color: var(--blue); --bs-pagination-border-color: var(--border); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters .form-control, .filters .form-select { width: auto; min-height: 36px; height: 36px; font-size: 13px; }
.filters .search { min-width: 220px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-50); color: var(--blue); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.chip a { color: var(--blue); }
.feat { display: inline-flex; font-size: 12px; background: #F0F3F7; color: var(--muted); border-radius: 5px; padding: 1px 6px; margin: 1px 2px 1px 0; white-space: nowrap; }

/* Badges */
.intent { font-size: 12px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.i-info { background: #E7F1FD; color: #0558B8; } .i-com { background: var(--purple-50); color: #5B3FE0; } .i-tra { background: var(--green-50); color: #0E7A4D; } .i-nav { background: #F0F3F7; color: #4F5F74; }
.kd { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.kd-easy { background: var(--green-50); color: #0E7A4D; } .kd-mid { background: var(--amber-50); color: #9A5B00; } .kd-hard { background: var(--red-50); color: #B8283C; }
.pill { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.pill-gray { background: #EEF2F6; color: #4F5F74; } .pill-blue { background: var(--blue-50); color: var(--blue); } .pill-green { background: var(--green-50); color: #0E7A4D; }
.pill-amber { background: var(--amber-50); color: #9A5B00; } .pill-red { background: var(--red-50); color: #B8283C; } .pill-purple { background: var(--purple-50); color: #5B3FE0; }
.sev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sev-error { background: var(--red); } .sev-warning { background: var(--amber); } .sev-notice { background: var(--blue); }

/* Bars / rings */
.hbar { display: grid; grid-template-columns: 90px 1fr 64px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.hbar-label { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 14px; background: #EEF2F6; border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 4px; }
.hbar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.minibar { height: 6px; background: #EEF2F6; border-radius: 99px; overflow: hidden; min-width: 60px; }
.minibar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); position: absolute; inset: 0; }
.ring-track { fill: none; stroke: #EEF2F6; stroke-width: 9; }
.ring-bar { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring-val { position: relative; font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.ring-empty { border: 9px solid #EEF2F6; border-radius: 50%; color: var(--muted2); font-weight: 700; }

/* Charts */
.chart { position: relative; width: 100%; height: 280px; }
.chart.sm { height: 200px; } .chart.xs { height: 150px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .axis text { font-size: 12px; fill: var(--muted); font-family: inherit; }
.chart .axis-title { font-size: 12px; fill: var(--muted); font-weight: 600; }
.chart .grid-line { stroke: #EDF1F6; stroke-width: 1; }
.chart .hover-line { stroke: #9FB0C4; stroke-dasharray: 3 3; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart-tip { position: absolute; pointer-events: none; background: #0E2236; color: #fff; font-size: 12px; border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); z-index: 5; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); display: none; }
.chart-tip b { display: block; margin-bottom: 3px; }
.chart-tip .row-t { display: flex; gap: 8px; align-items: center; }
.chart-tip .row-t i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bars-v { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 10px; }
.bars-v .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 12px; }
.bars-v .b span.bar { width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; background: var(--blue); min-height: 2px; }
.bars-v .b small { color: var(--muted); white-space: nowrap; }

/* SERP features strip */
.serp-strip { display: grid; grid-template-columns: 150px repeat(6, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 12px 16px; }
.serp-strip h2 { font-size: 16px; font-weight: 700; margin: 0; }
.serp-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--text); }
.serp-item b { margin-left: auto; color: var(--blue); }
.serp-item i { color: var(--purple); }

/* States */
.state { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; }
.state h3 { font-size: 17px; font-weight: 700; margin: 14px 0 6px; }
.state p { color: var(--muted); max-width: 480px; margin: 0 auto; }
.state-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.state-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font-size: 28px; }
.state-icon.amber, .state-unavail .state-icon { background: var(--amber-50); color: #C47F00; }
.state-icon.red { background: var(--red-50); color: var(--red); }
.state-icon.purple { background: var(--purple-50); color: var(--purple); }
.state-unavail { padding: 26px 16px; }
.state-unavail.compact { padding: 14px; }
.state-unavail.compact .state-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
.state-unavail.compact h3 { font-size: 15px; margin-top: 8px; }
.state-big { padding: 70px 20px; }
.state-big .state-icon { width: 88px; height: 88px; font-size: 40px; border-radius: 22px; }
.state-big h3 { font-size: 22px; }
.err-code { font-size: 13px; font-weight: 700; color: var(--muted2); letter-spacing: 2px; }

/* Job progress */
.job-box { display: flex; gap: 16px; align-items: center; padding: 16px 18px; }
.job-box .spinner-border { color: var(--blue); flex: none; }
.progress { height: 8px; border-radius: 99px; background: #EEF2F6; }
.progress-bar { background: var(--blue); border-radius: 99px; }
.skeleton { background: linear-gradient(90deg, #EEF2F6 25%, #F6F8FB 37%, #EEF2F6 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 12px; margin: 8px 0; } .sk-kpi { height: 132px; border-radius: 12px; } .sk-chart { height: 280px; border-radius: 12px; }

/* Lists */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; }
.list-row .s { font-size: 12px; color: var(--muted); }
.ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 17px; background: var(--blue-50); color: var(--blue); }
.ico.green { background: var(--green-50); color: var(--green); } .ico.red { background: var(--red-50); color: var(--red); } .ico.amber { background: var(--amber-50); color: #C47F00; } .ico.purple { background: var(--purple-50); color: var(--purple); } .ico.gray { background: #EEF2F6; color: var(--muted); }
.notif-row.unread { background: #F5F9FF; }
.notif-row.unread .t::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); display: inline-block; margin-right: 6px; vertical-align: middle; }

/* Projects */
.proj-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.proj-card .fav { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; flex: none; }
.proj-card h3 { font-size: 16px; font-weight: 700; margin: 0; }
.proj-card h3 a { color: var(--text); } .proj-card h3 a:hover { color: var(--blue); }
.proj-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--border2); padding-top: 12px; }
.proj-stats div { font-size: 12px; color: var(--muted); } .proj-stats b { display: block; font-size: 16px; color: var(--text); }

/* Wizard */
.wizard-steps { display: flex; gap: 0; margin-bottom: 20px; counter-reset: st; }
.wizard-steps li { flex: 1; list-style: none; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 14px; position: relative; padding-right: 12px; }
.wizard-steps li::after { content: ""; flex: 1; height: 2px; background: var(--border); }
.wizard-steps li:last-child::after { display: none; }
.wizard-steps .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); background: #fff; flex: none; }
.wizard-steps li.active { color: var(--text); } .wizard-steps li.active .n { border-color: var(--blue); background: var(--blue); color: #fff; }
.wizard-steps li.done { color: var(--green); } .wizard-steps li.done .n { border-color: var(--green); background: var(--green); color: #fff; }
.wizard-steps li.done::after { background: var(--green); }
.wizard-pane { display: none; } .wizard-pane.active { display: block; }
.js-off .wizard-pane { display: block; }
.choice { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; cursor: pointer; align-items: flex-start; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.choice input { margin-top: 3px; }
.summary-dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; font-size: 14px; }
.summary-dl dt { color: var(--muted); font-weight: 500; } .summary-dl dd { margin: 0; font-weight: 600; }
.code-box { background: #0E2236; color: #D6E6F7; border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.settings-nav a { padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; display: flex; gap: 10px; align-items: center; }
.settings-nav a:hover { background: #F2F5F9; }
.settings-nav a.active { background: var(--blue-50); color: var(--blue); font-weight: 600; }
.plan-tile { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.plan-tile.current { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(6, 105, 219, .12); }
.plan-tile .price { font-size: 26px; font-weight: 800; }
.plan-tile ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.plan-tile li { padding: 3px 0; } .plan-tile li i { color: var(--green); }

/* Integrations */
.int-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.int-logo { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; background: #F2F5F9; flex: none; }

/* Palette */
.palette-dialog { margin-top: 10vh; }
.palette-dialog .modal-content { border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.palette-input i { color: var(--muted); font-size: 18px; }
.palette-input input { flex: 1; border: 0; outline: 0; font-size: 16px; color: var(--text); }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette-group { font-size: 12px; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: .5px; padding: 10px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.palette-item .ico { width: 32px; height: 32px; font-size: 15px; }
.palette-item small { display: block; color: var(--muted); }
.palette-item.sel, .palette-item:hover { background: var(--blue-50); color: var(--text); }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: #FAFBFD; }
.palette-empty { padding: 30px; text-align: center; color: var(--muted); }

/* Modals */
.modal-content { border-radius: 14px; border-color: var(--border); }
.modal-header { border-bottom-color: var(--border2); } .modal-footer { border-top-color: var(--border2); }
.modal-title { font-weight: 700; font-size: 17px; }

/* Misc */
.info-note { background: var(--blue-50); border: 1px solid var(--blue-100); color: #0B4A96; border-radius: 10px; padding: 10px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.info-note.amber { background: var(--amber-50); border-color: #F9DDA6; color: #7A4A00; }
.info-note.purple { background: var(--purple-50); border-color: #DCD3FF; color: #4428C9; }
.alert { border-radius: 10px; font-size: 14px; }
.flag { font-size: 16px; line-height: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.muted { color: var(--muted); }
.fw-800 { font-weight: 800; }
.big-num { font-size: 32px; font-weight: 800; letter-spacing: -.6px; }
.ai-accent { border-top: 3px solid var(--purple); }
.toast { border-radius: 10px; border-color: var(--border); font-size: 14px; }
.legend-sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.report-doc { max-width: 900px; }
.report-doc .panel + .panel { margin-top: 14px; }

/* Guest */
body.guest { background: var(--bg); }
.guest-wrap { display: grid; grid-template-columns: 440px 1fr; min-height: 100vh; }
.guest-side { background: var(--side); color: var(--side-text); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; background-image: radial-gradient(circle at 20% 90%, rgba(116, 87, 255, .25), transparent 45%), radial-gradient(circle at 90% 10%, rgba(6, 105, 219, .3), transparent 45%); }
.guest-side .brand { padding: 0; }
.guest-pitch h2 { color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1.25; margin-bottom: 20px; }
.guest-pitch ul { list-style: none; padding: 0; } .guest-pitch li { padding: 6px 0; font-size: 15px; } .guest-pitch li i { color: #4EA0FF; margin-right: 6px; }
.guest-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px; }
.guest-card { width: 100%; max-width: 420px; padding: 32px; }
.guest-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.guest-card .sub { color: var(--muted); margin-bottom: 22px; }
.guest-main > .alert { width: 100%; max-width: 420px; }

/* Mobile bottom nav */
.mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); display: flex; z-index: 1035; padding-bottom: env(safe-area-inset-bottom); }
.mobile-nav a, .mobile-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 12px; color: var(--muted); background: none; border: 0; font-weight: 500; }
.mobile-nav i { font-size: 19px; }
.mobile-nav .active { color: var(--blue); }
.sidebar-backdrop { display: none; }

/* Responsive */
@media (max-width: 1400px) {
  .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .serp-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .serp-strip h2 { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .g-21, .g-12 { grid-template-columns: 1fr; }
  .g-kpi-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analyze-bar { grid-template-columns: 1fr 1fr 1fr; } .analyze-bar .input-icon { grid-column: 1 / -1; } .analyze-bar .btn { grid-column: span 1; }
  .ctx select { max-width: 130px; }
}
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(8, 23, 37, .45); z-index: 1039; }
  .content { padding: 16px 16px 90px; }
  .topbar { padding: 0 12px; gap: 6px; }
  .g-3, .g-kpi-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .settings-nav a { white-space: nowrap; }
  .guest-wrap { grid-template-columns: 1fr; } .guest-side { display: none; }
}
@media (max-width: 767.98px) {
  .g-kpi, .g-kpi-5, .g-2, .g-3, .g-kpi-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2.stack-sm, .g-3.stack-sm { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
  .page-actions { margin-left: 0; width: 100%; }
  .top-search span { display: none; } .top-search { flex: 0 0 40px; padding: 0; justify-content: center; }
  .ctx-project { flex: 1; min-width: 0; } .ctx-project select { max-width: 100%; width: 100%; } .ctx-project > span { display: none; }
  .ctx-form { flex: 1; min-width: 0; }
  .analyze-bar { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 22px; } .kpi { min-height: 116px; padding: 12px 12px 8px; } .kpi .spark { width: calc(100% + 24px); margin: 6px -12px -8px; }
  .chart { height: 230px; }
  .serp-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-dl { grid-template-columns: 1fr; }
  .wizard-steps li .lbl { display: none; }
  .hbar { grid-template-columns: 76px 1fr 54px; }
}
@media (max-width: 420px) { .g-kpi, .g-kpi-5 { grid-template-columns: 1fr 1fr; gap: 10px; } .content { padding: 12px 12px 90px; } }
@media print {
  .sidebar, .topbar, .mobile-nav, .page-actions, .no-print { display: none !important; }
  .content { padding: 0; } body { background: #fff; } .card-s { box-shadow: none; break-inside: avoid; }
}
/* Dense top bar on ≤1650px desktops: icon-only search, compact user button */
.topbar > .dropdown, .topbar > .bell { flex: none; }
@media (max-width: 1650px) {
  .top-search span, .top-search kbd { display: none !important; }
  .top-search { flex: 0 0 40px; padding: 0; justify-content: center; }
  .user-meta, .user-btn > .bi-chevron-down { display: none !important; }
}
code { font-size: 12px; }
/* Grid children must be allowed to shrink; wide tables scroll inside their panel */
.grid > * { min-width: 0; }
.panel { overflow-x: auto; }
.analyze-bar.ab-3 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) auto; }
.analyze-bar.ab-2 { grid-template-columns: minmax(0, 1fr) auto; }
.info-note code, .code-box { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 575.98px) {
  .list-row { flex-wrap: wrap; }
  .list-row .grow { flex-basis: calc(100% - 60px); }
  .analyze-bar.ab-3 { grid-template-columns: 1fr 1fr; }
  .analyze-bar.ab-3 .input-icon { grid-column: 1 / -1; }
  .int-card > .d-flex { flex-wrap: wrap; }
}
.main-col, .content { min-width: 0; }
.table-wrap, .panel, .tabs, .seg { position: relative; } /* keep .visually-hidden children inside scroll containers */
.table-wrap { max-width: 100%; }
