/* AIDevExpert SEO Audit & Control Studio — Portal Dashboard Styles */
:root {
  --sb-bg: #0C1829;
  --sb-hover: rgba(255, 255, 255, 0.08);
  --sb-text: #CBD5E1;
  --gold: #FFCC00;
  --gold-hover: #F0BE00;
  --navy: #0B1526;
  --bg: #F4F7FC;
  --card: #FFFFFF;
  --border: #E5EAF3;
  --ink: #0F172A;
  --muted: #64748B;
  --green: #16A34A;
  --green-bg: #DCFCE7;
  --amber: #D97706;
  --amber-bg: #FEF3C7;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --blue: #2563EB;
  --blue-bg: #DBEAFE;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(11, 25, 47, 0.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }

/* Layout Shell */
.seo-app { display: flex; min-height: 100vh; }

/* Dark Left Sidebar */
.seo-sidebar {
  width: 248px; flex: 0 0 248px; background: var(--sb-bg); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  z-index: 60; border-right: 1px solid rgba(255,255,255,0.06);
}
.seo-sb-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.seo-sb-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.seo-sb-logo strong { display: block; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.seo-sb-logo span { display: block; font-size: 11px; color: #94A3B8; font-weight: 600; }
.seo-sb-close { display: none; background: transparent; border: 0; color: #CBD5E1; font-size: 24px; cursor: pointer; }

.seo-sb-nav {
  flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 3px;
}
.seo-sb-nav::-webkit-scrollbar { width: 5px; }
.seo-sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 6px; }

.seo-nav-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9.5px 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--sb-text);
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
  text-align: left; transition: background 0.16s, color 0.16s;
}
.seo-nav-btn svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.seo-nav-btn span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-nav-btn:hover { background: var(--sb-hover); color: #fff; }
.seo-nav-btn.active { background: var(--gold); color: var(--navy); font-weight: 800; box-shadow: 0 4px 14px rgba(255,204,0,0.28); }
.seo-nav-btn.active svg { opacity: 1; stroke: var(--navy); }
.seo-nav-pill {
  padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  background: rgba(239,68,68,0.22); color: #FCA5A5;
}
.seo-nav-btn.active .seo-nav-pill { background: var(--navy); color: var(--gold); }

.seo-sb-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 10px; }
.seo-sb-back {
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px;
  border-radius: 9px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: #E2E8F0; text-decoration: none; font-size: 12px; font-weight: 700; transition: background 0.15s;
}
.seo-sb-back:hover { background: rgba(255,255,255,0.14); color: #fff; }
.seo-sb-user { display: flex; align-items: center; gap: 9px; padding: 4px 2px; }
.seo-user-avatar {
  width: 32px; height: 32px; border-radius: 999px; background: var(--gold); color: var(--navy);
  font-weight: 900; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.seo-user-meta { min-width: 0; }
.seo-user-meta strong { display: block; font-size: 12.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-user-meta span { display: block; font-size: 11px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main Column */
.seo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Topbar */
.seo-topbar {
  background: #fff; border-bottom: 1px solid var(--border); padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 40; flex-wrap: wrap;
}
.seo-topbar-left, .seo-topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seo-mobile-menu {
  display: none; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink);
}
.seo-site-switcher {
  display: inline-flex; align-items: center; gap: 8px; background: #F8FAFC;
  border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; height: 38px;
}
.seo-globe-ico { color: var(--navy); display: inline-flex; }
.seo-site-switcher select {
  border: 0; background: transparent; font-family: inherit; font-size: 13.5px; font-weight: 800;
  color: var(--ink); outline: none; cursor: pointer; min-width: 155px;
}
.seo-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; border: 1px solid var(--border); background: #fff;
  color: var(--ink); cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.seo-pill-add:hover { background: #FFFBEB; border-color: var(--gold); }
.seo-pill-conn .seo-dot { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; }
.seo-pill-conn.connected { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.seo-pill-conn.connected .seo-dot { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }

.seo-last-scan { font-size: 12px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.seo-last-scan::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; display: inline-block; }

.seo-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.seo-icon-btn:hover { background: #F8FAFC; }

/* Buttons */
.seo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; font-family: inherit; font-size: 13px;
  font-weight: 700; border: 1px solid transparent; cursor: pointer; transition: all 0.16s;
  text-decoration: none; white-space: nowrap;
}
.seo-btn-gold { background: var(--gold); color: var(--navy); border-color: #EAB308; box-shadow: 0 3px 10px rgba(255,204,0,0.28); }
.seo-btn-gold:hover { background: var(--gold-hover); transform: translateY(-1px); }
.seo-btn-dark { background: var(--navy); color: #fff; }
.seo-btn-dark:hover { background: #172742; }
.seo-btn-outline { background: #fff; color: var(--ink); border-color: #CBD5E1; }
.seo-btn-outline:hover { background: #F8FAFC; border-color: #94A3B8; }
.seo-btn-danger { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.seo-btn-danger:hover { background: #FEE2E2; }
.seo-btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.seo-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Scan Progress Strip */
.seo-scan-banner {
  background: linear-gradient(90deg, #0C1829, #152946); color: #fff;
  padding: 13px 22px; display: flex; align-items: center; gap: 14px;
  border-bottom: 2px solid var(--gold);
}
.seo-spinner {
  width: 22px; height: 22px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold); border-radius: 50%; animation: seoSpin 0.75s linear infinite; flex-shrink: 0;
}
@keyframes seoSpin { to { transform: rotate(360deg); } }
.seo-scan-banner-text strong { display: block; font-size: 13.5px; }
.seo-scan-banner-text span { display: block; font-size: 12px; color: #CBD5E1; margin-top: 2px; }

/* Content Canvas */
.seo-content { padding: 20px 22px 44px; flex: 1; }
.seo-view { display: none; }
.seo-view.active { display: block; }

/* Empty Onboarding */
.seo-empty-state { display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.seo-empty-card {
  max-width: 680px; width: 100%; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px; text-align: center; box-shadow: var(--shadow);
}
.seo-badge-gold {
  display: inline-block; padding: 5px 12px; border-radius: 999px; background: #FEF9C3;
  color: #854D0E; font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
}
.seo-empty-card h1 { font-size: 28px; margin: 14px 0 10px; letter-spacing: -0.02em; }
.seo-empty-card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 22px; }
.seo-empty-form { display: flex; gap: 10px; max-width: 540px; margin: 0 auto 18px; }
.seo-empty-form input {
  flex: 1; padding: 13px 15px; border: 1.5px solid #CBD5E1; border-radius: 11px;
  font-size: 14.5px; font-family: inherit; outline: none;
}
.seo-empty-form input:focus { border-color: var(--navy); }
.seo-empty-platforms { font-size: 12.5px; color: var(--muted); }
.seo-empty-platforms b { color: var(--ink); }

/* 5 KPI Score Cards Row (Matches Mockup) */
.seo-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.seo-kpi-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 13px;
}
.seo-kpi-ring { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.seo-kpi-ring svg { transform: rotate(-90deg); width: 54px; height: 54px; }
.seo-kpi-icon {
  width: 42px; height: 42px; border-radius: 12px; background: #FEF9C3; color: #B45309;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.seo-kpi-meta { min-width: 0; }
.seo-kpi-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.seo-kpi-val { font-size: 25px; font-weight: 900; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; }
.seo-kpi-val small { font-size: 13px; font-weight: 700; color: var(--muted); }
.seo-kpi-sub { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }

/* Overview 3-Column Grid (Matches Mockup) */
.seo-overview-grid { display: grid; grid-template-columns: 256px minmax(0, 1fr) 275px; gap: 14px; align-items: start; }

/* Card Primitive */
.seo-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.seo-card-hdr {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.seo-card-hdr h2, .seo-card-hdr h3 { margin: 0; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.seo-card-body { padding: 16px; }
.seo-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.seo-tag-gold { background: #FEF9C3; color: #854D0E; }
.seo-tag-green { background: var(--green-bg); color: #166534; }
.seo-tag-amber { background: var(--amber-bg); color: #92400E; }
.seo-tag-red { background: var(--red-bg); color: #991B1B; }
.seo-tag-blue { background: var(--blue-bg); color: #1E40AF; }
.seo-tag-slate { background: #F1F5F9; color: #334155; }

/* Priority Issue List */
.seo-issue-list { display: flex; flex-direction: column; gap: 8px; }
.seo-issue-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 11px; border-radius: 10px; border: 1px solid #EEF2F7; background: #FAFCFF;
  cursor: pointer; transition: all 0.15s; text-align: left; width: 100%; font-family: inherit;
}
.seo-issue-row:hover { border-color: #CBD5E1; background: #F1F5F9; }
.seo-issue-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.seo-sev-ico {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 900; flex-shrink: 0;
}
.seo-sev-critical { background: var(--red); color: #fff; }
.seo-sev-warning { background: #F59E0B; color: #fff; }
.seo-sev-pass { background: #22C55E; color: #fff; }
.seo-issue-title { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.seo-issue-cnt { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* Split Page Editor */
.seo-editor-split { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 12px; }
.seo-page-list-col { border-right: 1px solid var(--border); padding-right: 12px; display: flex; flex-direction: column; gap: 8px; }
.seo-page-search {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; font-family: inherit; outline: none; background: #F8FAFC;
}
.seo-page-items { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.seo-page-item {
  width: 100%; border: 1px solid transparent; border-radius: 9px; padding: 8px 9px;
  background: transparent; text-align: left; cursor: pointer; font-family: inherit; transition: all 0.14s;
}
.seo-page-item:hover { background: #F8FAFC; }
.seo-page-item.active { background: #FFFBEB; border-color: #FDE047; }
.seo-page-item strong { display: block; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-page-item span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* Form Inputs */
.seo-field { margin-bottom: 12px; }
.seo-field-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.seo-label { display: block; font-size: 11.5px; font-weight: 800; color: #334155; }
.seo-counter { font-size: 11px; font-weight: 800; color: var(--green); }
.seo-counter.warn { color: var(--amber); }
.seo-counter.bad { color: var(--red); }
.seo-input, .seo-textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #CBD5E1; border-radius: 9px;
  font-family: inherit; font-size: 13px; color: var(--ink); background: #fff; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.seo-input:focus, .seo-textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,21,38,0.08); }
.seo-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seo-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 14px; flex-wrap: wrap; }

/* Live Google SERP Preview */
.seo-serp-box { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 14px; }
.seo-google-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #F1F5F9;
}
.seo-google-logo { font-size: 18px; font-weight: 800; letter-spacing: -0.04em; }
.seo-serp-site { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.seo-serp-fav {
  width: 24px; height: 24px; border-radius: 50%; background: #0C1829; color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900;
}
.seo-serp-domain { font-size: 12px; font-weight: 700; color: #202124; line-height: 1.2; }
.seo-serp-url { font-size: 11px; color: #4D5156; word-break: break-all; }
.seo-serp-title { font-size: 17px; font-weight: 600; color: #1A0DAB; line-height: 1.3; margin: 4px 0 5px; word-break: break-word; }
.seo-serp-desc { font-size: 12.5px; color: #4D5156; line-height: 1.48; word-break: break-word; }
.seo-serp-checks { margin-top: 14px; padding-top: 12px; border-top: 1px solid #F1F5F9; display: flex; flex-direction: column; gap: 6px; }
.seo-check-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }

/* Tables */
.seo-table-wrap { overflow-x: auto; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.seo-table th {
  text-align: left; padding: 10px 12px; background: #F8FAFC; color: #475569;
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.seo-table td { padding: 10px 12px; border-bottom: 1px solid #EEF2F7; vertical-align: middle; }
.seo-table tr:hover td { background: #FAFCFF; }
.seo-cell-input {
  width: 100%; min-width: 160px; padding: 6px 9px; border: 1px solid #E2E8F0; border-radius: 7px;
  font-family: inherit; font-size: 12.5px; background: #fff;
}
.seo-cell-input:focus { border-color: var(--navy); outline: none; }

/* Section Header Toolbar */
.seo-view-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.seo-view-hdr h1 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.seo-view-hdr p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.seo-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Headings Tree */
.seo-h-tree { display: flex; flex-direction: column; gap: 6px; }
.seo-h-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 9px; font-size: 13px;
}
.seo-h-badge {
  padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 900;
  background: var(--navy); color: var(--gold); flex-shrink: 0;
}

/* Image Grid / Table */
.seo-img-thumb {
  width: 56px; height: 40px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--border); background: #F1F5F9; display: block;
}

/* Code / JSON-LD Box */
.seo-code {
  background: #0B1526; color: #E2E8F0; padding: 14px; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  max-height: 360px; overflow-y: auto; margin: 0;
}

/* Filter Pills */
.seo-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.seo-filter-btn {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit;
}
.seo-filter-btn.active { background: var(--navy); color: var(--gold); border-color: var(--navy); }

/* Modals */
.seo-modal-overlay {
  position: fixed; inset: 0; background: rgba(11, 21, 38, 0.58); z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.seo-modal {
  background: #fff; width: 100%; max-width: 500px; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28); overflow: hidden;
}
.seo-modal-lg { max-width: 660px; }
.seo-modal-hdr {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.seo-modal-hdr h3 { margin: 0; font-size: 16px; font-weight: 800; }
.seo-modal-hdr button { background: transparent; border: 0; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.seo-modal-body { padding: 18px 20px; max-height: 75vh; overflow-y: auto; }
.seo-modal-ftr { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #F8FAFC; }
.seo-help { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.seo-conn-tabs { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 10px; flex-wrap: wrap; }
.seo-conn-tab {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: #F8FAFC;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.seo-conn-tab.active { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.seo-info-box { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 14px; font-size: 12.5px; line-height: 1.6; margin-bottom: 14px; }
.seo-info-box ol, .seo-info-box ul { margin: 8px 0 0 18px; padding: 0; }
.seo-link-gold { color: #B45309; font-weight: 800; }
.seo-modal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.seo-inline-msg { margin-top: 12px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; }
.seo-inline-msg.ok { background: var(--green-bg); color: #166534; }
.seo-inline-msg.err { background: var(--red-bg); color: #991B1B; }

/* Toast */
.seo-toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 13px; font-weight: 700; border-left: 4px solid var(--gold);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25); max-width: 420px;
}
.seo-toast.err { border-left-color: #EF4444; }

.seo-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 55; }

/* ---------------- v3.0 EMBED MODE, DEEP PROGRESS & DUAL CTA ---------------- */
.seo-embed-mode { background: #F4F7FC; overflow-x: hidden; }
.seo-app-embed { min-height: 0; align-items: flex-start; }
.seo-embed-mode .seo-topbar { position: relative; }
@media (min-width: 961px) {
  .seo-app-embed { min-height: 760px; }
  .seo-embed-mode .seo-sidebar { position: relative; height: auto; min-height: 760px; align-self: stretch; }
}
@media (max-width: 960px) {
  .seo-embed-mode .seo-sidebar { position: fixed; top: 0; bottom: 0; left: -270px; width: 248px; height: 100vh; min-height: 0; }
  .seo-embed-mode .seo-sidebar.open { left: 0; }
  .seo-embed-mode .seo-main { width: 100%; max-width: 100%; }
}
.seo-embed-domain-bar { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink); }

.seo-deep-progress {
  background: linear-gradient(95deg, #071323, #122645);
  color: #FFFFFF; padding: 16px 20px; border-bottom: 2px solid var(--gold);
}
.seo-dp-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.seo-dp-top strong { display: block; font-size: 14px; color: #FFFFFF; }
.seo-dp-top span { display: block; font-size: 12px; color: #CBD5E1; margin-top: 2px; }
.seo-dp-pct { font-size: 18px; font-weight: 900; color: var(--gold); flex-shrink: 0; }
.seo-dp-track { width: 100%; height: 7px; border-radius: 999px; background: rgba(255,255,255,0.14); margin: 12px 0 10px; overflow: hidden; }
.seo-dp-fill { height: 100%; background: linear-gradient(90deg, #FFCC00, #38BDF8); border-radius: 999px; transition: width 0.35s ease; }
.seo-dp-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-dp-step {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.09); color: #E2E8F0; border: 1px solid rgba(255,255,255,0.14);
}
.seo-dp-step.done { background: rgba(34,197,94,0.18); color: #86EFAC; border-color: rgba(34,197,94,0.38); }

.seo-dual-cta {
  background: linear-gradient(95deg, #0C1829, #182D4F);
  color: #FFFFFF; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,204,0,0.4);
}
.seo-dual-cta-info strong { display: block; font-size: 14px; color: #FFFFFF; }
.seo-dual-cta-info span { display: block; font-size: 12px; color: #CBD5E1; margin-top: 2px; }
.seo-dual-cta-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seo-btn-white-outline {
  background: rgba(255,255,255,0.08); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.32);
}
.seo-btn-white-outline:hover { background: rgba(255,255,255,0.18); color: #FFFFFF; }

.seo-hire-quick-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.seo-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.seo-tech-chip {
  padding: 5px 11px; border-radius: 999px; background: #F1F5F9; border: 1px solid #CBD5E1;
  font-size: 12px; font-weight: 700; color: var(--ink);
}
.seo-fix-promo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.seo-fix-promo-card {
  background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
}
.seo-fix-promo-card h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.seo-fix-promo-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 820px) { .seo-fix-promo-grid { grid-template-columns: 1fr; } }

/* Responsive Grids (Zero inline-style overrides on mobile!) */
.seo-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.seo-grid-editor { display: grid; grid-template-columns: 235px minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.seo-grid-form-kw { display: grid; grid-template-columns: 2fr 1.6fr 1fr auto; gap: 10px; align-items: end; }
.seo-grid-form-rd { display: grid; grid-template-columns: 1.5fr 2fr 110px auto; gap: 10px; align-items: end; }
.seo-bot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }

/* Always-Visible Horizontal Mobile Tab Strip (<= 960px) */
.seo-mobile-tabs {
  display: none;
  background: var(--sb-bg);
  padding: 9px 12px;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.seo-mobile-tabs::-webkit-scrollbar { display: none; }
.seo-mtab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: #E2E8F0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seo-mtab.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(255,204,0,0.28);
}
.seo-mtab-cnt {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(239,68,68,0.28);
  color: #FCA5A5;
}
.seo-mtab.active .seo-mtab-cnt { background: var(--navy); color: var(--gold); }

/* Responsive */
@media (max-width: 1160px) {
  .seo-overview-grid, .seo-grid-editor { grid-template-columns: 260px minmax(0, 1fr); }
  .seo-overview-grid > .seo-card:last-child, .seo-grid-editor > .seo-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1120px) {
  .seo-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .seo-mobile-tabs { display: flex; }
  .seo-sidebar { position: fixed; left: -270px; transition: left 0.22s ease; }
  .seo-sidebar.open { left: 0; }
  .seo-backdrop.open { display: block; }
  .seo-sb-close, .seo-mobile-menu { display: inline-flex; }
  .seo-overview-grid, .seo-grid-2, .seo-grid-editor, .seo-grid-form-kw, .seo-grid-form-rd { grid-template-columns: 1fr; }
  .seo-editor-split { grid-template-columns: 1fr; }
  .seo-page-list-col { border-right: 0; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; }
  .seo-page-items { max-height: 170px; }
}
@media (max-width: 640px) {
  .seo-topbar { padding: 10px 12px; gap: 8px; }
  .seo-topbar-left, .seo-topbar-right { width: 100%; justify-content: space-between; gap: 6px; }
  .seo-topbar-right .seo-btn { flex: 1 1 auto; padding: 7px 9px; font-size: 11.5px; }
  .seo-last-scan { width: 100%; font-size: 11.5px; }
  .seo-dual-cta { padding: 12px; }
  .seo-dual-cta-btns { width: 100%; }
  .seo-dual-cta-btns .seo-btn { flex: 1 1 100%; width: 100%; }
  .seo-content { padding: 12px 10px 30px; }
  .seo-card-hdr { padding: 11px 12px; }
  .seo-card-body { padding: 12px; }
  .seo-view-hdr h1 { font-size: 17px; }
  .seo-view-hdr p { font-size: 12px; }
  .seo-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
  .seo-kpi-card { padding: 11px 10px; gap: 8px; flex-direction: column; align-items: flex-start; }
  .seo-kpi-card:nth-child(5) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .seo-kpi-ring { width: 42px; height: 42px; }
  .seo-kpi-ring svg { width: 42px; height: 42px; }
  .seo-kpi-icon { width: 34px; height: 34px; border-radius: 9px; }
  .seo-kpi-label { font-size: 11px; }
  .seo-kpi-val { font-size: 20px; }
  .seo-kpi-val small { font-size: 11.5px; }
  .seo-kpi-sub { font-size: 10.5px; line-height: 1.3; }
  .seo-bot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-form-grid { grid-template-columns: 1fr; }
  .seo-empty-form { flex-direction: column; }
  .seo-table th, .seo-table td { padding: 8px 9px; font-size: 12px; }
  .seo-table-wrap { -webkit-overflow-scrolling: touch; }
  .seo-issue-row { padding: 9px 10px; }
  .seo-issue-title { font-size: 12px; }
  .seo-modal { border-radius: 14px; }
  .seo-modal-body { padding: 14px; }
  .hide-sm { display: none; }
}
