/* ==========================================================================
   RankTracker — sharp light theme (green + sky blue, minimal gradients)
   Full width. Same class names as before.
   ========================================================================== */

:root {
  --green:        #10b981;
  --green-dark:   #059669;
  --green-soft:   #d1fae5;
  --green-tint:   #ecfdf5;
  --sky:          #0ea5e9;
  --sky-dark:     #0284c7;
  --sky-soft:     #e0f2fe;
  --sky-tint:     #f0f9ff;

  --accent:       #10b981;
  --accent-dark:  #059669;

  --ink:          #0b2925;
  --muted:        #5b7a74;
  --navy:         #0d9488;
  --line:         #e2ece9;
  --line-strong:  #cdded9;
  --soft:         #f4faf8;
  --panel:        #ffffff;
  --success:      #10b981;
  --warning:      #d97706;
  --danger:       #dc2626;

  --bg:           #f3f8f6;
  --shadow:       0 1px 2px rgba(11, 41, 37, .06), 0 1px 3px rgba(11, 41, 37, .04);
  --shadow-sm:    0 1px 2px rgba(11, 41, 37, .06);
  --radius:       8px;
  --radius-sm:    6px;
}

/* ==========================================================================
   Unified Voxern product theme — aligned with the public marketing site
   ========================================================================== */

:root {
  --green: #34d399;
  --green-dark: #087a5b;
  --green-soft: #dff8ee;
  --green-tint: #edfaf5;
  --sky: #22d3ee;
  --sky-dark: #087f9b;
  --sky-soft: #ddf7fb;
  --sky-tint: #effcfe;
  --accent: #34d399;
  --accent-dark: #087a5b;
  --ink: #0b1f1a;
  --muted: #5f716b;
  --navy: #071411;
  --line: rgba(10, 47, 38, .12);
  --line-strong: rgba(10, 47, 38, .22);
  --soft: #f3f7f5;
  --panel: #ffffff;
  --success: #0b8f69;
  --bg: #eef4f1;
  --shadow: 0 22px 60px rgba(4, 29, 22, .10);
  --shadow-sm: 0 10px 28px rgba(4, 29, 22, .08);
  --radius: 18px;
  --radius-sm: 10px;
}

body {
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4,
.brand, .toolbar strong, .column-controls strong, .stat-number,
.pkg-name, .pkg-price .amount, .pkg-quota b, .topup-summary .total,
.sync-countdown strong, .cron-diagnostics strong, .trend-tooltip b,
thead th, .explain-item h4 {
  font-family: inherit;
  letter-spacing: -.035em;
}

.json-pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.sidebar {
  width: 240px;
  padding: 18px 14px;
  border-right: 1px solid rgba(255,255,255,.10);
  background: #071411;
  color: #fff;
  box-shadow: 16px 0 50px rgba(4, 20, 16, .12);
}

.brand {
  height: 66px;
  gap: 11px;
  padding: 0 8px;
  color: #fff;
}

.brand-logo { margin-right: 0; }
.brand-logo svg { border-radius: 12px; box-shadow: 0 10px 26px rgba(34,211,238,.14); }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { color: #fff; font-size: 1.08rem; font-weight: 800; letter-spacing: -.04em; }
.brand-copy small { margin-top: 5px; color: #98ada5; font-size: .66rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }

.nav { gap: 5px; padding-top: 18px; }
.nav a {
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 11px;
  color: #b9cbc4;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.is-active {
  border-color: rgba(52,211,153,.16);
  background: rgba(52,211,153,.12);
  color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}
.nav-icon, .nav a.is-active .nav-icon { color: currentColor; }

.main { margin-left: 240px; background: var(--bg); }
.topbar {
  min-height: 76px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(7,20,17,.96);
  color: #fff;
  box-shadow: 0 14px 40px rgba(4,20,16,.12);
  backdrop-filter: blur(18px);
}
.account { color: #fff; }
.sync-countdown {
  border: 1px solid rgba(255,255,255,.12);
  border-left: 3px solid var(--sky);
  background: rgba(255,255,255,.06);
  color: #fff;
}
.sync-countdown-icon { background: rgba(34,211,238,.12); color: var(--sky); }
.trial-countdown .sync-countdown-icon { background: rgba(52,211,153,.12); color: var(--green); }
.sync-countdown-label, .sync-countdown-schedule { color: #9fb3ac; }
.sync-countdown strong { color: #fff; }
.credit-pill, .badge {
  height: 40px;
  border: 1px solid rgba(52,211,153,.38);
  border-radius: 10px;
  background: var(--green);
  color: #071411;
  box-shadow: 0 10px 26px rgba(52,211,153,.16);
}
.credit-pill:hover { background: #5ce3b1; }

.content { padding: 28px 30px 60px; }
.panel, .card, .pkg-card, .auth-card, .install-section {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  padding: 30px;
  border: 1px solid rgba(255,255,255,.10);
  border-top: 1px solid rgba(255,255,255,.10);
  background: #0b1d19;
  color: #fff;
  box-shadow: 0 28px 80px rgba(4,29,22,.18);
}
.hero-panel h1 { color: #fff; font-size: 30px; letter-spacing: -.045em; }
.hero-panel p { color: #a9bbb5; }
.hero-panel .accent-link { color: var(--green); }
.stat-card {
  min-height: 108px;
  border: 1px solid rgba(255,255,255,.10);
  border-top: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: #102721;
}
.stat-number { color: var(--sky); }
.stat-card:nth-child(2) .stat-number { color: var(--green); }
.stat-label { color: #9db2aa; }

.toolbar { padding: 16px 20px; }
.btn, button.btn {
  min-height: 42px;
  border-radius: 10px;
  background: var(--green);
  color: #071411;
  box-shadow: 0 9px 24px rgba(52,211,153,.14);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); background: #5ce3b1; color: #071411; }
.btn-accent { background: var(--green); color: #071411; }
.btn-accent:hover { background: #5ce3b1; color: #071411; }
.btn-muted { border-color: var(--line-strong); background: #fff; color: var(--ink); box-shadow: none; }
.btn-muted:hover { border-color: rgba(8,122,91,.38); background: var(--green-tint); color: var(--green-dark); }
.btn-danger { box-shadow: none; }

.admin-tabs .btn { box-shadow: none; }
.admin-tabs .btn:not(.btn-muted) { background: #0b1d19; color: #fff; }
.panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.panel select, .panel textarea {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
.panel input:focus, .panel select:focus, .panel textarea:focus {
  border-color: var(--green-dark);
  outline: 3px solid rgba(52,211,153,.16);
}

table { background: #fff; }
thead th { background: #eef6f2; }
tbody tr:hover td { background: #f4faf7; }
.column-controls { background: #071411; }
.icon-button { border-radius: 9px; }

.auth-main {
  position: relative;
  overflow: hidden;
  background-color: #071411;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 68px 68px;
}
.auth-main::before {
  position: absolute;
  width: 580px;
  height: 580px;
  right: -160px;
  top: -250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.17), transparent 68%);
  content: "";
}
.auth-card { position: relative; z-index: 1; border-top: 1px solid var(--line); border-radius: 20px; padding: 34px; }
.auth-card h1 { letter-spacing: -.045em; }

dialog { border-radius: 18px; }
.json-pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; min-height: auto; padding: 8px 12px 12px; }
  .brand { height: 58px; }
  .brand-logo svg { width: 38px; height: 38px; }
  .nav { padding-top: 4px; }
  .nav a { border: 1px solid rgba(255,255,255,.10); box-shadow: none; }
  .nav a.is-active { border-color: rgba(52,211,153,.35); box-shadow: inset 0 -3px 0 var(--green); }
  .main { margin-left: 0; }
  .topbar { position: static; min-height: 64px; padding: 10px 14px; }
  .content { padding: 18px 12px 42px; }
}

@media (max-width: 560px) {
  .hero-panel { padding: 23px 19px; }
  .hero-panel h1 { font-size: 26px; }
  .auth-card { padding: 27px 22px; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif; letter-spacing: -.01em; }

/* Sidebar */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 10; width: 218px;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden; padding: 6px 10px 16px;
}
.brand {
  height: 70px; width: 100%; display: flex; align-items: center; gap: 4px; padding: 0 8px;
  text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-size: 22px; line-height: 1; white-space: nowrap;
}
.brand-rank { color: var(--green-dark); font-weight: 700; }
.brand-name { color: var(--sky-dark); font-weight: 500; }
.brand-logo { display: inline-flex; align-items: center; flex: 0 0 auto; margin-right: 8px; }
.brand-logo svg { display: block; border-radius: 9px; box-shadow: 0 2px 6px rgba(5,150,105,.25); }

.nav { padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  text-decoration: none; color: #34504a; font-weight: 600; border-radius: var(--radius-sm);
  border-left: 3px solid transparent; transition: background .12s ease, color .12s ease;
}
.nav a:hover { background: var(--soft); }
.nav a.is-active { background: var(--green-tint); color: var(--green-dark); border-left-color: var(--green); }
.nav-icon { width: 24px; height: 24px; color: #56756e; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nav a.is-active .nav-icon { color: var(--green-dark); }
.nav-icon i, .icon-button i, .device-icon i { font-size: 20px; line-height: 1; display: block; }
.icon-button i { font-size: 16px; }
.device-icon i { font-size: 24px; }

/* Main */
.main { margin-left: 218px; min-height: 100vh; }
.topbar {
  min-height: 66px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 28px;
  position: sticky; top: 0; z-index: 9;
}
.account { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.topbar-timers { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.sync-countdown {
  min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--sky); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); max-width: 100%;
}
.sync-countdown-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; background: var(--sky-soft); color: var(--sky-dark); flex: 0 0 auto; }
.sync-countdown-icon i { font-size: 14px; line-height: 1; }
.sync-countdown-copy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sync-countdown-label { color: var(--muted); font-size: 12.5px; line-height: 1; font-weight: 600; }
.sync-countdown strong { font-family: 'Space Grotesk', sans-serif; font-size: 15px; line-height: 1; white-space: nowrap; color: var(--ink); }
.sync-countdown-schedule { color: var(--muted); font-size: 12px; line-height: 1; white-space: nowrap; }
.trial-countdown { border-left-color: var(--green); }
.trial-countdown .sync-countdown-icon { background: var(--green-soft); color: var(--green-dark); }
.sync-countdown.is-due { border-left-color: var(--warning); }
.sync-countdown.is-due .sync-countdown-icon { background: #fef3c7; color: var(--warning); }

.avatar { width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.credit-pill, .badge {
  display: inline-flex; align-items: center; height: 34px; border-radius: var(--radius-sm); padding: 0 14px;
  background: var(--green-tint); border: 1px solid var(--green-soft); color: var(--green-dark);
  font-weight: 700; white-space: nowrap; text-decoration: none; transition: background .12s ease;
}
.credit-pill:hover { background: var(--green-soft); }
.status-banner { display: block; background: var(--danger); color: #fff; text-align: center; padding: 11px; font-weight: 700; text-decoration: none; }
.impersonation-banner { min-height: 44px; margin: 0; padding: 10px 28px; background: #fffbeb; border-top: 1px solid #fde68a; border-bottom: 1px solid #fde68a; color: #92660b; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }

/* FULL WIDTH content */
.content { padding: 24px 28px 56px; max-width: none; width: 100%; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }

.hero-panel {
  display: grid; grid-template-columns: minmax(280px, 1.4fr) minmax(300px, 1fr); gap: 28px; padding: 26px 28px;
  background: #fff; border-top: 3px solid var(--green);
}
.hero-panel h1 { margin: 0 0 14px; font-size: 28px; line-height: 1.1; color: var(--ink); }
.hero-panel p { margin: 5px 0; font-size: 15px; }
.warning-text { color: var(--danger) !important; font-weight: 600; }
.accent-link { color: var(--green-dark); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 14px; align-items: center; }
.stat-card { min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border-top: 3px solid var(--sky); }
.stat-card:nth-child(2) { border-top-color: var(--green); }
.stat-number { font-family: 'Space Grotesk', sans-serif; color: var(--sky-dark); font-size: 32px; font-weight: 700; line-height: 1; }
.stat-card:nth-child(2) .stat-number { color: var(--green-dark); }
.stat-label { margin-top: 8px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--muted); }

.toolbar { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 14px 20px; flex-wrap: wrap; }
.toolbar strong { font-family: 'Space Grotesk', sans-serif; }
.search-box { height: 40px; min-width: 280px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); padding: 0 14px; color: var(--ink); transition: border-color .12s ease, box-shadow .12s ease; }
.search-box:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* Buttons — solid, sharp */
.btn, button.btn {
  min-height: 40px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0 16px;
  background: var(--sky-dark); color: #fff; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .12s ease, transform .04s ease;
}
.btn:hover { background: #036aa3; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 30px; padding: 0 11px; font-size: 12px; }
.btn-accent { background: var(--green); }
.btn-accent:hover { background: var(--green-dark); color: #fff; }
.btn-muted { color: var(--green-dark); background: #fff; border-color: var(--green-soft); }
.btn-muted:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f3c6c6; }
.btn-danger:hover { background: #fde4e4; color: var(--danger); }

.table-panel { overflow: hidden; }
.column-controls { background: var(--ink); color: #fff; padding: 14px 20px; }
.column-controls strong { display: block; margin-bottom: 10px; font-family: 'Space Grotesk', sans-serif; }
.column-controls label { display: inline-flex; align-items: center; gap: 7px; margin: 0 16px 8px 0; font-weight: 600; }
.column-controls input { accent-color: var(--green); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
thead th { font-family: 'Space Grotesk', sans-serif; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line-strong); }
td { color: var(--ink); }
tbody tr:hover td { background: var(--soft); }
.device-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--sky-dark); }
.device-icon.mobile { color: var(--green-dark); }
.counts span { margin-right: 14px; font-weight: 700; }
.count-up, .rank-good, .delta-up { color: var(--success); }
.count-same { color: var(--warning); }
.count-down, .rank-missing, .delta-down { color: var(--danger); }
.table-actions { display: flex; align-items: center; gap: 10px; }
.inline-actions { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.inline-actions form, .table-actions form { margin: 0; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--green-soft); border-radius: var(--radius-sm); background: #fff; color: var(--green-dark); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 6px; transition: background .12s ease; }
.icon-button i { color: var(--green-dark); }
.icon-button:hover { background: var(--green-soft); }
.keyword-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check-cell { width: 36px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.feature-list { display: inline-flex; gap: 4px; }
.feature-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--sky-soft); color: var(--sky-dark); font-size: 9px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 10px; font-size: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 700; font-size: 13px; }
.field input, .field select, .field textarea { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); min-height: 40px; padding: 9px 12px; color: var(--ink); background: #fff; transition: border-color .12s ease, box-shadow .12s ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.field textarea { min-height: 120px; resize: vertical; }
.checkbox-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; min-height: 40px; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.checkbox-row input, .field input[type=checkbox] { accent-color: var(--green); }
.full { grid-column: 1 / -1; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); width: min(740px, calc(100vw - 30px)); padding: 0; box-shadow: 0 20px 50px -20px rgba(11, 41, 37, .35); }
dialog::backdrop { background: rgba(11, 41, 37, .4); }
.serp-dialog { width: min(1100px, calc(100vw - 24px)); }
.serp-dialog iframe { width: 100%; height: min(720px, calc(100vh - 150px)); border: 0; display: block; background: #fff; }
.json-pre { background: #07261f; border-radius: var(--radius-sm); color: #c7f9e9; font-size: 12px; line-height: 1.55; max-height: 520px; overflow: auto; padding: 16px; white-space: pre-wrap; font-family: 'Space Grotesk', ui-monospace, monospace; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 22px; }

.flash { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; background: var(--green-tint); color: var(--green-dark); border: 1px solid var(--green-soft); border-left: 3px solid var(--green); font-weight: 600; }
.flash-error { background: #fef2f2; color: #b91c1c; border-color: #f3c6c6; border-left-color: var(--danger); }

.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.public-main { max-width: 1280px; margin: 0 auto; padding: 28px; }
.auth-card { width: min(440px, 100%); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; border: 1px solid var(--line); border-top: 3px solid var(--green); }
.auth-card h1 { margin: 0 0 20px; }
.auth-card form { display: grid; gap: 16px; }
.auth-language-switcher { display: flex; justify-content: flex-end; gap: 6px; margin: -8px -5px 15px 0; }
.auth-language-switcher a { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 31px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.auth-language-switcher a:hover, .auth-language-switcher a[aria-current="page"] { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); }
.auth-card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -8px -5px 15px 0; }
.auth-card-toolbar .auth-language-switcher { margin: 0; }
.auth-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #f4f8f5; color: var(--muted); text-decoration: none; }
.auth-close:hover { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); }
.auth-close:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
.auth-card { min-width: 0; }
.auth-google { width: 100%; min-width: 0; max-width: 100%; margin: 20px 0; }
.auth-google-button { display: flex; justify-content: center; min-height: 40px; min-width: 0; }
.auth-google form[hidden], .auth-google-error[hidden] { display: none; }
.auth-google-error { margin: 10px 0 0; color: #a63a3a; font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-divider span { flex: 0 0 auto; }

.install-page { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.install-page h1 { margin-top: 0; }
.install-section { background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

.admin-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-section { margin-bottom: 24px; }
.admin-section > h2 { font-size: 19px; margin: 0 0 14px; }
.package-create { border-top: 1px solid var(--line); padding: 20px; }
.package-create h3 { margin: 0 0 14px; font-size: 17px; }
.package-save-field .btn { width: fit-content; }
.cron-diagnostics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; padding: 0 20px 14px; }
.cron-diagnostics div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--soft); }
.cron-diagnostics span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.cron-diagnostics strong { display: block; overflow-wrap: anywhere; font-family: 'Space Grotesk', sans-serif; }
.cron-note { margin: 0; padding: 0 20px 16px; }
.danger-text { color: var(--danger); }
.danger-zone { border-color: #f3c6c6; }

/* ===================== Pricing / packages cards ===================== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.pkg-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px 20px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pkg-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.pkg-card.is-active { border: 1px solid var(--green); border-top: 3px solid var(--green); box-shadow: 0 0 0 1px var(--green-soft); }
.pkg-active-badge {
  position: absolute; top: -11px; left: 20px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 11px; border-radius: 999px;
}
.pkg-popular-badge {
  position: absolute; top: -11px; right: 20px; background: var(--sky-dark); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.pkg-name { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.pkg-price { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 4px; }
.pkg-price .amount { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; color: var(--ink); }
.pkg-price .per { color: var(--muted); font-size: 13px; font-weight: 600; }
.pkg-quota { font-size: 14px; color: var(--ink); margin: 2px 0 14px; }
.pkg-quota b { font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: var(--green-dark); }
.pkg-features { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.pkg-features li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: #2c4a44; line-height: 1.4; }
.pkg-features li i { color: var(--green); font-size: 15px; flex: 0 0 auto; margin-top: 1px; }
.pkg-features li.muted-feature { color: var(--muted); }
.pkg-features li.muted-feature i { color: var(--muted); }
.pkg-card form { margin-top: auto; }
.pkg-card .btn { width: 100%; }
.pkg-current-note { margin-top: auto; text-align: center; font-weight: 700; color: var(--green-dark); background: var(--green-tint); border: 1px solid var(--green-soft); border-radius: var(--radius-sm); padding: 10px; font-size: 13px; }

/* explanation blocks shared by packages + topup */
.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 4px 20px 20px; }
.explain-item { display: flex; gap: 12px; align-items: flex-start; }
.explain-item .ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.explain-item .ico.g { background: var(--green-tint); color: var(--green-dark); }
.explain-item .ico.b { background: var(--sky-tint); color: var(--sky-dark); }
.explain-item h4 { margin: 0 0 4px; font-family: 'Space Grotesk', sans-serif; font-size: 14.5px; }
.explain-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.section-head { padding: 18px 20px 0; }
.section-head h2 { margin: 0 0 4px; font-size: 20px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* topup amount chooser */
.topup-options { display: flex; gap: 10px; flex-wrap: wrap; }
.topup-chip { border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); padding: 12px 16px; cursor: pointer; font-weight: 700; color: var(--ink); transition: all .12s ease; text-align: center; min-width: 96px; }
.topup-chip small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; margin-top: 3px; }
.topup-chip:hover { border-color: var(--green); }
.topup-chip.is-active { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); box-shadow: inset 0 0 0 1px var(--green); }
.topup-summary { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; }
.topup-summary .total { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; color: var(--green-dark); }

/* Trend graph */
.trend-panel { padding: 0; overflow: hidden; border-top: 4px solid var(--green); }
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; flex-wrap: wrap; }
.trend-title { display: flex; align-items: center; gap: 12px; }
.trend-title h2 { margin: 0; font-size: 20px; }
.trend-title .trend-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.trend-dot { width: 32px; height: 32px; border-radius: var(--radius-sm); flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--green-tint); color: var(--green-dark); font-size: 16px; }
.trend-controls { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.trend-controls button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 12.5px; padding: 7px 14px; border-radius: 6px; transition: all .12s ease; }
.trend-controls button:hover { color: var(--green-dark); }
.trend-controls button.is-active { background: #fff; color: var(--green-dark); box-shadow: var(--shadow-sm); }
.trend-body { padding: 4px 20px 18px; position: relative; }
.trend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-empty { margin: 4px 0 8px; padding: 54px 24px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--soft); text-align: center; color: var(--muted); }
.trend-empty strong { display: inline-block; margin-bottom: 5px; color: var(--ink); font-size: 15px; }
.trend-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 20px 12px; color: var(--muted); font-size: 12px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 7px; }
.trend-legend i { width: 14px; height: 3px; border-radius: 1px; display: inline-block; }
.trend-tooltip { position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -120%); background: #07261f; color: #fff; padding: 7px 11px; border-radius: var(--radius-sm); font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); transition: opacity .1s ease; z-index: 5; }
.trend-tooltip b { font-family: 'Space Grotesk', sans-serif; }
.trend-dotpoint { cursor: pointer; transition: r .1s ease; }
.trend-loading { padding: 40px; text-align: center; color: var(--muted); }
.trend-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 2px 0 16px; }
.trend-summary > div { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.trend-summary span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.trend-summary strong { color: var(--ink); font-size: 18px; }
.trend-summary .is-better strong { color: var(--success); }
.trend-summary .is-worse strong { color: var(--danger); }
.trend-summary .is-same strong { color: var(--muted); }
.trend-chart-wrap { position: relative; min-width: 640px; }
.trend-note { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; }

/* Compact Google rank trend controls and chart. Scoped away from AI Visibility. */
.rank-trend-panel { border-top-width: 3px; }
.rank-trend-panel .trend-head { align-items: flex-start; gap: 12px; padding: 14px 16px 9px; }
.rank-trend-panel .trend-title { gap: 9px; }
.rank-trend-panel .trend-title h2 { font-size: 17px; }
.rank-trend-panel .trend-title .trend-sub { font-size: 11px; }
.rank-trend-panel .trend-dot { width: 28px; height: 28px; font-size: 14px; }
.rank-trend-panel .trend-range-tools { display: grid; gap: 7px; justify-items: end; margin-left: auto; min-width: 0; }
.rank-trend-panel .trend-controls { gap: 3px; padding: 3px; }
.rank-trend-panel .trend-controls button { padding: 6px 10px; font-size: 11px; }
.rank-trend-panel .trend-custom-range { display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; flex-wrap: wrap; padding: 4px; border: 1px solid transparent; border-radius: 8px; }
.rank-trend-panel .trend-custom-range.is-active { border-color: var(--green-soft); background: var(--green-tint); }
.rank-trend-panel .trend-custom-range label { display: grid; gap: 2px; color: var(--muted); font-size: 10px; font-weight: 700; }
.rank-trend-panel .trend-custom-range input { width: 124px; min-height: 30px; padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-size: 11.5px; }
.rank-trend-panel .trend-custom-range input:focus { border-color: var(--green); outline: 2px solid var(--green-soft); outline-offset: 0; }
.rank-trend-panel .trend-custom-range input[aria-invalid="true"] { border-color: var(--danger); }
.rank-trend-panel .trend-custom-range .btn { min-height: 30px; padding: 0 10px; font-size: 11px; }
.rank-trend-panel .trend-range-error { flex-basis: 100%; color: var(--danger); font-size: 10.5px; font-weight: 600; text-align: right; }
.rank-trend-panel .trend-range-error:empty { display: none; }
.rank-trend-panel .trend-legend { gap: 13px; padding: 0 16px 8px; font-size: 11px; }
.rank-trend-panel .trend-body { padding: 2px 16px 14px; }
.rank-trend-panel .trend-summary { gap: 8px; margin: 2px 0 10px; }
.rank-trend-panel .trend-summary > div { gap: 3px; padding: 8px 10px; border-radius: 8px; }
.rank-trend-panel .trend-summary span { font-size: 10px; }
.rank-trend-panel .trend-summary strong { font-size: 15px; }
.rank-trend-panel .trend-chart-wrap { min-width: 560px; }
.rank-trend-panel .trend-tooltip { padding: 6px 9px; font-size: 11px; }
.rank-trend-panel .trend-note { margin-top: 6px; font-size: 10.5px; }
.rank-trend-panel .trend-loading { padding: 30px; font-size: 12px; }
.rank-trend-panel .trend-empty { padding: 36px 20px; font-size: 12px; }
.rank-trend-panel .trend-empty strong { font-size: 13px; }

/* Saved SERP preview */
.serp-loading { display: grid; place-items: center; min-height: 180px; color: var(--muted); font-weight: 700; }
.serp-dialog iframe[hidden], .serp-loading[hidden] { display: none; }
.serp-page { margin: 0; background: #f4f8f7; color: var(--ink); }
.serp-preview { max-width: 980px; margin: 0 auto; padding: 24px; }
.serp-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.serp-preview-head h2 { margin: 4px 0 6px; font-size: 24px; }
.serp-eyebrow { color: var(--green-dark); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.serp-context { margin: 0; white-space: normal; }
.serp-snapshot-meta { display: grid; gap: 3px; flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); text-align: right; }
.serp-snapshot-meta strong { color: var(--green-dark); font-size: 12px; }
.serp-snapshot-meta span { color: var(--muted); font-size: 11px; }
.serp-notice { margin-bottom: 14px; }
.serp-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.serp-summary.is-found { border-color: #bcebd9; background: var(--green-tint); }
.serp-summary.is-missing { border-color: #f0d9ad; background: #fff9eb; }
.serp-summary-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: var(--green); color: #071411; font-weight: 900; }
.serp-summary.is-missing .serp-summary-icon { background: #f0b74b; }
.serp-summary div { display: grid; gap: 2px; }
.serp-summary div span { color: var(--muted); font-size: 12px; }
.serp-results { display: grid; gap: 10px; }
.serp-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.serp-item.is-tracked-domain { border-color: var(--green); box-shadow: inset 4px 0 0 var(--green), var(--shadow-sm); }
.serp-item-top { display: flex; align-items: flex-start; gap: 10px; }
.serp-item-top > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.serp-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 31px; height: 25px; padding: 0 7px; border-radius: 7px; background: #0b1d19; color: #fff; font-weight: 800; }
.serp-match-badge { padding: 3px 7px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.serp-url { margin: 8px 0 0 41px; color: var(--green-dark); font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.serp-description { margin: 7px 0 0 41px; color: var(--muted); line-height: 1.5; white-space: normal; }
.serp-empty { padding: 70px 24px; border: 1px dashed var(--line-strong); border-radius: 14px; background: #fff; text-align: center; }
.serp-empty > span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; background: var(--soft); color: var(--green-dark); font-size: 24px; }
.serp-empty h3 { margin: 0 0 7px; }
.serp-empty p { max-width: 520px; margin: 0 auto; color: var(--muted); }
.delta-up,
.delta-down { display: inline-flex; align-items: center; margin-left: 6px; padding: 3px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.delta-up { background: var(--green-soft); color: var(--green-dark); }
.delta-down { background: #fde8e8; color: var(--danger); }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; min-height: auto; padding: 6px 10px 10px; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; }
  .nav a { min-width: 0; min-height: 40px; padding: 8px 10px; border-left: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); justify-content: center; flex-direction: column; gap: 3px; text-align: center; font-size: 11px; }
  .nav a .nav-icon { width: 20px; height: 20px; }
  .nav a .nav-icon i { font-size: 17px; }
  .nav a.is-active { border-color: var(--green); }
  .brand { height: 54px; }
  .main { margin-left: 0; }
  .topbar { position: static; padding: 10px 14px; min-height: 60px; gap: 10px; flex-wrap: wrap; }
  .sync-countdown { flex: 1 1 220px; }
  .account { flex: 1 1 160px; justify-content: flex-end; }
  .impersonation-banner { padding: 10px 14px; flex-wrap: wrap; }
  .content { padding: 16px 12px 40px; }
  .hero-panel, .form-grid { grid-template-columns: 1fr; }
  .search-box { min-width: 100%; }
  .trend-head { padding: 14px 14px 8px; }
  .trend-body { padding-inline: 14px; overflow-x: auto; }
  .trend-summary { min-width: 640px; }
  .rank-trend-panel .trend-range-tools { justify-items: start; margin-left: 0; width: 100%; }
  .rank-trend-panel .trend-custom-range { justify-content: flex-start; }
  .rank-trend-panel .trend-range-error { text-align: left; }
  .rank-trend-panel .trend-summary { min-width: 520px; }
}

@media (max-width: 560px) {
  .nav { grid-template-columns: repeat(2, 1fr); }
  .rank-trend-panel .trend-controls { width: 100%; }
  .rank-trend-panel .trend-controls button { flex: 1 1 auto; padding-inline: 7px; }
  .rank-trend-panel .trend-custom-range { width: 100%; }
  .rank-trend-panel .trend-custom-range label { flex: 1 1 120px; }
  .rank-trend-panel .trend-custom-range input { width: 100%; }
  .rank-trend-panel .trend-summary { min-width: 0; grid-template-columns: 1fr; }
}


/* Compact ranking table to reduce horizontal scroll */
#keywords-table th, #keywords-table td { padding: 9px 10px; font-size: 13px; }
#keywords-table thead th { font-size: 11px; }
#keywords-table .keyword-title { font-size: 13px; }
#keywords-table td .btn-small { min-height: 26px; padding: 0 8px; font-size: 11px; }
#keywords-table .table-actions { gap: 6px; }
#keywords-table .muted.small { font-size: 11px; }
#keywords-table td a { word-break: break-all; }
.url-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== Custom autosuggest ===================== */
.autosuggest { position: relative; }
.autosuggest-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; display: none;
}
.autosuggest-list.is-open { display: block; }
.autosuggest-item { padding: 9px 12px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid #f0f6f3; }
.autosuggest-item:last-child { border-bottom: 0; }
.autosuggest-item:hover, .autosuggest-item.is-active { background: var(--green-tint); color: var(--green-dark); }
.autosuggest-item small { color: var(--muted); margin-left: 6px; }
.autosuggest-empty { padding: 9px 12px; color: var(--muted); font-size: 13px; }

/* Keep ranking table within screen: hide secondary columns as width shrinks */
#keywords-table .url-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#keywords-table .url-cell a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 1000px) {
  #keywords-table .col-first { display: none; }
}
@media (max-width: 820px) {
  #keywords-table .col-url { display: none; }
}

/* Final cascade: product shell */
body, button, input, select, textarea {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, h4,
.brand, .toolbar strong, .column-controls strong, .stat-number,
.pkg-name, .pkg-price .amount, .pkg-quota b, .topup-summary .total,
.sync-countdown strong, .cron-diagnostics strong, .trend-tooltip b {
  font-family: inherit;
  letter-spacing: -.035em;
}

.sidebar {
  width: 240px;
  padding: 18px 14px;
  border-right: 1px solid rgba(255,255,255,.10);
  background: #071411;
  color: #fff;
  box-shadow: 16px 0 50px rgba(4,20,16,.12);
}
.brand { height: 66px; gap: 11px; padding: 0 8px; color: #fff; }
.brand-logo { margin-right: 0; }
.brand-logo svg { border-radius: 12px; box-shadow: 0 10px 26px rgba(34,211,238,.14); }
.nav { gap: 5px; padding-top: 18px; }
.nav a { min-height: 46px; padding: 9px 13px; border: 1px solid transparent; border-left: 0; border-radius: 11px; color: #b9cbc4; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.is-active { border-color: rgba(52,211,153,.16); background: rgba(52,211,153,.12); color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.nav-icon, .nav a.is-active .nav-icon { color: currentColor; }

.main { margin-left: 240px; background: var(--bg); }
.topbar { min-height: 76px; padding: 12px 28px; border-bottom: 1px solid rgba(255,255,255,.10); background: rgba(7,20,17,.96); color: #fff; box-shadow: 0 14px 40px rgba(4,20,16,.12); backdrop-filter: blur(18px); }
.account { color: #fff; }
.sync-countdown { border: 1px solid rgba(255,255,255,.12); border-left: 3px solid var(--sky); background: rgba(255,255,255,.06); color: #fff; }
.sync-countdown-icon { background: rgba(34,211,238,.12); color: var(--sky); }
.trial-countdown .sync-countdown-icon { background: rgba(52,211,153,.12); color: var(--green); }
.sync-countdown-label, .sync-countdown-schedule { color: #9fb3ac; }
.sync-countdown strong { color: #fff; }
.credit-pill, .badge { height: 40px; border: 1px solid rgba(52,211,153,.38); border-radius: 10px; background: var(--green); color: #071411; box-shadow: 0 10px 26px rgba(52,211,153,.16); }
.credit-pill:hover { background: #5ce3b1; }
.content { padding: 28px 30px 60px; }

.hero-panel { padding: 30px; border: 1px solid rgba(255,255,255,.10); border-top: 1px solid rgba(255,255,255,.10); background: #0b1d19; color: #fff; box-shadow: 0 28px 80px rgba(4,29,22,.18); }
.hero-panel h1 { color: #fff; font-size: 30px; letter-spacing: -.045em; }
.hero-panel p { color: #a9bbb5; }
.hero-panel .accent-link { color: var(--green); }
.stat-card { min-height: 108px; border: 1px solid rgba(255,255,255,.10); border-top: 1px solid rgba(255,255,255,.10); border-radius: 14px; background: #102721; }
.stat-number { color: var(--sky); }
.stat-card:nth-child(2) .stat-number { color: var(--green); }
.stat-label { color: #9db2aa; }

.btn, button.btn { min-height: 42px; border-radius: 10px; background: var(--green); color: #071411; box-shadow: 0 9px 24px rgba(52,211,153,.14); transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); background: #5ce3b1; color: #071411; }
.btn-accent, .btn-accent:hover { color: #071411; }
.btn-muted { border-color: var(--line-strong); background: #fff; color: var(--ink); box-shadow: none; }
.btn-muted:hover { border-color: rgba(8,122,91,.38); background: var(--green-tint); color: var(--green-dark); }
.btn-danger { border-color: #f3c6c6; background: #fff; color: var(--danger); box-shadow: none; }
.btn-danger:hover { border-color: #efb4b4; background: #fde4e4; color: var(--danger); }
.pkg-active-badge, .avatar { color: #071411; }
.admin-tabs .btn { box-shadow: none; }
.admin-tabs .btn:not(.btn-muted) { background: #0b1d19; color: #fff; }

.auth-main { position: relative; overflow: hidden; background-color: #071411; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 68px 68px; }
.auth-main::before { position: absolute; width: 580px; height: 580px; right: -160px; top: -250px; border-radius: 50%; background: radial-gradient(circle, rgba(34,211,238,.17), transparent 68%); content: ""; }
.auth-card { position: relative; z-index: 1; border-top: 1px solid var(--line); border-radius: 20px; padding: 34px; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; min-height: auto; padding: 8px 12px 12px; }
  .brand { height: 58px; }
  .brand-logo svg { width: 38px; height: 38px; }
  .nav { padding-top: 4px; }
  .nav a { border: 1px solid rgba(255,255,255,.10); box-shadow: none; }
  .nav a.is-active { border-color: rgba(52,211,153,.35); box-shadow: inset 0 -3px 0 var(--green); }
  .main { margin-left: 0; }
  .topbar { position: static; min-height: 64px; padding: 10px 14px; }
  .content { padding: 18px 12px 42px; }
}

@media (max-width: 560px) {
  .hero-panel { padding: 23px 19px; }
  .hero-panel h1 { font-size: 26px; }
  .auth-card { padding: 27px 22px; }
  .serp-preview { padding: 12px; }
  .serp-preview-head { flex-direction: column; padding: 16px; }
  .serp-snapshot-meta { width: 100%; text-align: left; }
  .serp-url, .serp-description { margin-left: 0; }
}

/* ===================== AI Visibility ===================== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.btn:disabled, button.btn:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.nav-beta { margin-left: auto; padding: 2px 6px; border: 1px solid rgba(52,211,153,.30); border-radius: 999px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.ai-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ai-hero .ai-eyebrow { color: var(--green); }
.ai-disclaimer { max-width: 760px; margin-top: 16px !important; padding: 10px 12px; border: 1px solid rgba(255,255,255,.10); border-radius: 9px; background: rgba(255,255,255,.05); font-size: 12px !important; line-height: 1.5; }
.ai-disclaimer i { margin-right: 4px; color: var(--sky); }
.ai-credit-guide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px 18px; border-left: 4px solid var(--green); }
.ai-credit-guide > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--green-tint); color: var(--green-dark); font-size: 16px; }
.ai-credit-guide > div { display: grid; gap: 2px; }
.ai-credit-guide > div span { color: var(--muted); line-height: 1.45; }
.ai-notice { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; border-left: 4px solid var(--sky); }
.ai-notice > i { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: var(--sky-soft); color: var(--sky-dark); font-size: 16px; }
.ai-notice > div { display: grid; gap: 2px; }
.ai-notice > div span { color: var(--muted); }
.ai-notice-error { border-left-color: var(--danger); }
.ai-notice-error > i { background: #fde8e8; color: var(--danger); }
.ai-empty-state { padding: 54px 24px; text-align: center; }
.ai-empty-state > span { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 14px; background: var(--green-tint); color: var(--green-dark); font-size: 24px; }
.ai-empty-state h2 { margin: 0 0 6px; }
.ai-empty-state p { margin: 0 auto 18px; color: var(--muted); }

.ai-entry-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 20px 22px; border-left: 4px solid var(--sky); }
.ai-entry-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: linear-gradient(135deg, var(--sky-soft), var(--green-soft)); color: var(--green-dark); font-size: 22px; }
.ai-entry-panel h2 { margin: 3px 0 4px; font-size: 19px; }
.ai-entry-panel p { margin: 0; color: var(--muted); }

.ai-profile-panel { overflow: hidden; }
.ai-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; }
.ai-section-head h2 { margin-bottom: 4px; }
.ai-profile-switcher { display: flex; align-items: center; gap: 8px; flex: 0 1 430px; }
.ai-profile-switcher label { color: var(--muted); font-size: 12px; font-weight: 700; }
.ai-profile-switcher select { min-width: 250px; max-width: 100%; }
.ai-profile-editor { border-top: 1px solid var(--line); }
.ai-profile-editor summary { padding: 14px 20px; background: var(--soft); color: var(--green-dark); cursor: pointer; font-weight: 700; }
.ai-profile-editor form { padding: 20px; }
.ai-form-submit { align-self: end; }

.ai-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.ai-metric, .panel.ai-metric { min-width: 0; margin: 0; padding: 17px 18px; border: 1px solid var(--line); border-top: 3px solid var(--sky); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.ai-metric:nth-child(even) { border-top-color: var(--green); }
.ai-metric > span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ai-metric > strong { display: block; margin: 5px 0 3px; color: var(--ink); font-size: 27px; line-height: 1; }
.ai-metric > small { display: block; color: var(--muted); line-height: 1.35; }
.ai-trend-panel { border-top-color: var(--sky); }
.ai-trend-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 2px 0 16px; }
.ai-trend-summary > div { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.ai-trend-summary span { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ai-trend-summary strong { font-size: 18px; }
.ai-trend-dotpoint { cursor: pointer; transition: r .1s ease; }

.ai-prompts-panel { overflow: hidden; }
.ai-keyword-head { align-items: center; padding: 19px 20px 16px; }
.ai-keyword-head > div:first-child { max-width: 720px; }
.ai-keyword-head p strong { color: var(--ink); }
.ai-keyword-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.ai-keyword-tools .search-box { min-width: 190px; width: 210px; }
.ai-limit { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--muted); font-size: 12px; white-space: nowrap; }
.ai-add-prompt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 10px; padding: 0 20px 20px; }
.ai-add-prompt textarea { min-height: 76px !important; resize: vertical; }
.ai-add-prompt .btn { align-self: stretch; }
.ai-prompt-hint { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 7px; margin: -1px 0 0; padding: 10px 12px; border: 1px solid #cfe9ee; border-radius: 9px; background: var(--sky-tint); color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.ai-prompt-hint i { margin-top: 2px; color: var(--sky-dark); }
.ai-prompt-hint strong { color: var(--ink); }
.ai-prompt-list { border-top: 1px solid var(--line); }
.ai-keyword-table-wrap { border-top: 1px solid var(--line); }
.ai-keyword-table { min-width: 1040px; }
.ai-keyword-table th, .ai-keyword-table td, .ai-mention-table th, .ai-mention-table td { padding: 10px 11px; font-size: 12.5px; vertical-align: middle; }
.ai-keyword-table thead th, .ai-mention-table thead th { font-size: 10.5px; }
.ai-keyword-table tbody tr.is-ai-pending td { background: var(--sky-tint); }
.ai-query-cell { width: 31%; min-width: 270px; white-space: normal; }
.ai-query-cell .ai-prompt-type { margin-bottom: 6px; }
.ai-query-text { display: block; color: var(--ink); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-query-cell small, .ai-check-cell small, .ai-result-cell small, .ai-mention-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.35; white-space: normal; }
.ai-check-cell { min-width: 145px; }
.ai-check-cell .ai-run-badge { margin-left: 4px; }
.ai-result-cell { min-width: 170px; white-space: normal; }
.ai-result-mentioned, .ai-result-not-mentioned { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.ai-result-mentioned { color: var(--success); }
.ai-result-not-mentioned { color: var(--muted); }
.ai-history-cell { width: 20%; min-width: 185px; white-space: normal; }
.ai-history-count { display: inline-flex; align-items: baseline; gap: 4px; color: var(--green-dark); font-size: 11.5px; text-decoration: none; }
.ai-history-count:hover { text-decoration: underline; }
.ai-history-preview { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.ai-history-preview a { padding: 2px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 9.5px; text-decoration: none; }
.ai-history-preview a:hover { border-color: var(--green); color: var(--green-dark); }
.ai-table-actions { min-width: 255px; justify-content: flex-end; gap: 5px; }
.ai-table-actions .btn-small { min-height: 27px; padding-inline: 8px; font-size: 10.5px; }
.ai-table-actions .icon-button { width: 29px; height: 29px; }
.ai-prompt-card { padding: 18px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.ai-prompt-card:last-child { border-bottom: 0; }
.ai-prompt-card[data-ai-pending-run], .ai-prompt-card.is-ai-pending { box-shadow: inset 4px 0 0 var(--sky); background: var(--sky-tint); }
.ai-prompt-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ai-prompt-copy { min-width: 0; }
.ai-prompt-copy h3 { margin: 5px 0 8px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-prompt-type { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: var(--green-tint); color: var(--green-dark); font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.ai-prompt-type.is-branded { background: var(--sky-tint); color: var(--sky-dark); }
.ai-run-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.ai-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ai-status-completed { border-color: #bcebd9; background: var(--green-tint); color: var(--green-dark); }
.ai-status-scheduled { border-color: #eed59b; background: #fff8e7; color: #7a5a1a; }
.ai-status-starting, .ai-status-queued, .ai-status-in_progress { border-color: #b9e8f0; background: var(--sky-tint); color: var(--sky-dark); }
.ai-status-failed, .ai-status-unknown { border-color: #f3c6c6; background: #fef2f2; color: var(--danger); }
.ai-run-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 750; }
.ai-run-badge-daily, .ai-run-badge-package { border-color: #bcebd9; background: var(--green-tint); color: var(--green-dark); }
.ai-run-badge-manual, .ai-run-badge-credits { border-color: #b9e8f0; background: var(--sky-tint); color: var(--sky-dark); }
.ai-answer-run-context { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.is-positive { color: var(--success); font-weight: 700; }
.ai-prompt-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 0 0 auto; }
.ai-prompt-actions form { margin: 0; }
.ai-run-history { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 11px; }
.ai-run-history > span { font-weight: 700; }
.ai-run-history a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); text-decoration: none; }
.ai-run-history a:hover { border-color: var(--green); color: var(--green-dark); }
.ai-run-history .bi-check-circle-fill { color: var(--success); }
.ai-empty-inline { display: flex; align-items: flex-start; gap: 12px; padding: 28px 20px; color: var(--muted); }
.ai-empty-inline > i { color: var(--sky-dark); font-size: 22px; }
.ai-empty-inline > div { display: grid; gap: 2px; }
.ai-empty-inline strong { color: var(--ink); }

.ai-answer-panel { overflow: hidden; }
.ai-answer-panel .section-head { padding-bottom: 16px; }
.ai-answer-panel .section-head h2 { margin-top: 5px; line-height: 1.35; }
.ai-answer-flags { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.ai-answer-flags span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; }
.ai-answer-flags span.is-positive { border-color: #bcebd9; background: var(--green-tint); color: var(--green-dark); }
.ai-query-transparency { max-width: 760px; margin: 9px 0 0 !important; color: var(--muted); font-size: 11px !important; line-height: 1.45; }
.ai-answer-copy { padding: 22px; border-top: 1px solid var(--line); color: #18352e; font-size: 15px; line-height: 1.75; white-space: normal; overflow-wrap: anywhere; }
.ai-inline-citation { padding: 1px 3px; border-radius: 4px; background: var(--green-tint); color: var(--green-dark); font-weight: 750; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; transition: background .15s ease, color .15s ease; }
.ai-inline-citation:hover, .ai-inline-citation:focus-visible { background: #ccefe2; color: #035e4b; text-decoration-style: solid; }
.ai-sources { padding: 20px 22px; border-top: 1px solid var(--line); background: var(--soft); }
.ai-sources h3 { margin: 0 0 12px; font-size: 16px; }
.ai-sources ol { display: grid; gap: 8px; margin: 0; padding-left: 24px; }
.ai-sources li { padding-left: 4px; }
.ai-sources a { display: grid; gap: 2px; color: var(--ink); text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.ai-sources a:hover strong { color: var(--green-dark); text-decoration: underline; }
.ai-sources a span { color: var(--muted); font-size: 11px; }
.ai-answer-disclaimer { margin: 0; padding: 13px 22px; border-top: 1px solid var(--line); background: #fff9eb; color: #7a5a1a; font-size: 11.5px; }
.ai-no-mention-result { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 130px; padding: 25px; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); text-align: left; }
.ai-no-mention-result > i { font-size: 24px; }
.ai-no-mention-result > div { display: grid; gap: 3px; }
.ai-no-mention-result strong { color: var(--ink); font-size: 16px; }

.ai-mention-history-panel { overflow: hidden; }
.ai-mention-history-panel .section-head { padding: 19px 20px 16px; }
.ai-mention-history-panel .section-head h2 { margin: 4px 0; font-size: 18px; }
.ai-mention-history-panel .section-head p { margin: 0; color: var(--muted); }
.ai-mention-table { min-width: 820px; }
.ai-history-query { max-width: 330px; white-space: normal; overflow-wrap: anywhere; }
.ai-history-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: 11px; }

.register-selling-panel { display: flex; align-items: center; gap: 11px; margin: 16px 0 19px; padding: 12px; border: 1px solid var(--line); border-left: 3px solid var(--sky); border-radius: 10px; background: var(--sky-tint); }
.register-selling-panel > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: #fff; color: var(--sky-dark); }
.register-selling-panel > div { display: grid; gap: 2px; }
.register-selling-panel strong { color: var(--ink); }
.register-selling-panel small { color: var(--muted); line-height: 1.35; }

@media (max-width: 1000px) {
  .ai-summary-grid, .ai-trend-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-beta { display: none; }
  .ai-entry-panel { grid-template-columns: auto minmax(0, 1fr); }
  .ai-entry-panel .btn { grid-column: 1 / -1; width: 100%; }
  .ai-credit-guide { grid-template-columns: auto minmax(0, 1fr); }
  .ai-credit-guide .btn { grid-column: 1 / -1; width: 100%; }
  .ai-section-head, .ai-prompt-main { flex-direction: column; }
  .ai-profile-switcher { width: 100%; flex-basis: auto; }
  .ai-profile-switcher select { flex: 1 1 auto; min-width: 0; }
  .ai-prompt-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .ai-keyword-head { align-items: stretch; }
  .ai-keyword-tools { width: 100%; justify-content: flex-start; }
  .ai-keyword-tools .search-box { flex: 1 1 230px; width: auto; min-width: 0; }
  .ai-trend-summary { min-width: 640px; }
}

@media (max-width: 560px) {
  .ai-summary-grid { grid-template-columns: 1fr; }
  .ai-add-prompt { grid-template-columns: 1fr; padding-inline: 14px; }
  .ai-profile-editor form, .ai-prompt-card { padding-inline: 14px; }
  .ai-profile-switcher { align-items: stretch; flex-direction: column; }
  .ai-answer-copy, .ai-sources { padding: 17px 15px; }
}

/* Compact, readable headings across the app and authentication screens. */
h1, h2, h3 { line-height: 1.22; overflow-wrap: break-word; }
h1, .hero-panel h1, .auth-card h1 { font-size: 26px; letter-spacing: -.025em; }
.hero-panel h1 { margin-bottom: 12px; }
h2 { font-size: 21px; }
h3 { font-size: 18px; }
.auth-card h1 { margin-bottom: 16px; }
.account { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.app-language-switcher { display: flex; align-items: center; gap: 3px; }
.app-language-switcher a { padding: 5px 7px; border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 750; text-decoration: none; }
.app-language-switcher a[aria-current="page"] { background: var(--sky-soft, #e7f6f5); color: var(--sky-dark, #0b685b); }
.app-language-switcher a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.subscription-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 1.1fr); gap: 30px; align-items: center; padding: 27px 29px; background: radial-gradient(ellipse at 93% 0, rgba(52,211,153,.11), transparent 62%), #0b211a; color: #fff; border-color: #1d3b2e; }
.subscription-kicker { color: #5a9980; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.subscription-heading .subscription-kicker { color: #79bea1; }
.subscription-heading h1 { display: flex; align-items: center; gap: 12px; margin: 7px 0 9px; color: #fff; font-size: 27px; }
.subscription-trial { padding: 5px 8px; border: 1px solid #36674e; border-radius: 7px; color: #a7d7bf; font-size: 10px; font-weight: 650; letter-spacing: 0; }
.subscription-heading > p { max-width: 430px; margin: 0 0 13px; color: #a8bfb1; font-size: 12px; }
.subscription-date { display: inline-flex; gap: 7px; align-items: center; color: #bbd0c3; font-size: 11px; }
.subscription-manage { margin-top: 14px; }
.subscription-manage .btn { border-color: #335543; background: #163b2b; color: #cce1d2; }
.subscription-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 20px 0; border: 1px solid #2a4737; border-radius: 13px; background: rgba(255,255,255,.025); }
.subscription-metrics > div { display: grid; gap: 7px; padding: 0 20px; border-right: 1px solid #2b4436; }
.subscription-metrics > div:last-child { border: 0; }
.subscription-metrics span, .subscription-metrics small { color: #9bb8a7; font-size: 10px; }
.subscription-metrics strong { color: #fff; font-size: 28px; font-weight: 700; line-height: 1.1; }
.subscription-metrics a { color: #75d4ad; font-size: 10px; text-decoration: none; }
.package-status-note { display: flex; gap: 12px; margin: 15px 0; padding: 14px 17px; border: 1px solid #dbe7e0; border-radius: 11px; background: #f6faf8; }
.package-status-note > i { padding-top: 2px; color: #6c8a79; font-size: 18px; }
.package-status-note > div { display: grid; gap: 2px; }
.package-status-note strong { color: #294c3b; font-size: 12px; }
.package-status-note span { color: #74887b; font-size: 11px; }
.package-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 31px 0 20px; }
.package-section-heading h2 { margin: 6px 0 5px; color: #143c2a; font-size: 22px; }
.package-section-heading p { margin: 0; color: #809086; font-size: 11px; }
.package-currency { margin-bottom: 2px; color: #94a197; font-size: 10px; white-space: nowrap; }
.package-premium-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; align-items: stretch; }
.package-premium-grid .premium-pkg-card { display: flex; flex-direction: column; min-width: 0; padding: 23px; border: 1px solid #dbe7df; border-radius: 16px; background: linear-gradient(145deg, #fff 55%, #f6faf7); box-shadow: 0 5px 23px rgba(6, 43, 27, .025); }
.package-premium-grid .premium-pkg-card.is-featured { border-color: #2b9d72; box-shadow: 0 10px 30px rgba(17, 128, 82, .08); }
.package-premium-grid .premium-pkg-card.is-active { border-color: #75b79b; background: #f1faf5; }
.pkg-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 25px; }
.package-premium-grid .pkg-name { margin: 0; color: #1e4430; font-size: 17px; }
.pkg-card-badge { padding: 4px 7px; border-radius: 6px; background: #def4e8; color: #227a50; font-size: 9px; font-weight: 750; white-space: nowrap; }
.package-premium-grid .pkg-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 20px 0 3px; }
.package-premium-grid .pkg-price .amount { color: #183f2c; font-size: 34px; font-weight: 750; line-height: 1.05; letter-spacing: -.04em; }
.package-premium-grid .pkg-price .per { color: #86988b; font-size: 10px; }
.pkg-price-caption { color: #9ba89f; font-size: 10px; }
.pkg-capacity { display: flex; align-items: center; gap: 10px; margin: 19px 0 16px; padding: 13px 12px; border-radius: 10px; border: 1px solid #dfede3; background: #edf8f1; }
.pkg-capacity-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #d8e9df; border-radius: 8px; color: #40956e; background: #f8fdfa; font-size: 14px; }
.pkg-capacity > strong { color: #23784d; font-size: 26px; line-height: 1; }
.pkg-capacity > span:last-child { color: #37634b; font-size: 10px; font-weight: 750; line-height: 1.35; }
.pkg-capacity small { display: block; margin-top: 3px; color: #94aa9b; font-size: 9px; font-weight: 500; }
.pkg-ai-option { padding: 13px; border: 1px solid #dfe8e2; border-radius: 10px; background: #fff; }
.pkg-ai-heading { display: flex; align-items: center; gap: 6px; }
.pkg-ai-heading > i { color: #3f9471; font-size: 13px; }
.pkg-ai-heading > strong { flex: 1; color: #4c6e59; font-size: 10px; }
.pkg-ai-heading > span { color: #46614e; font-size: 12px; font-weight: 750; white-space: nowrap; }
.pkg-ai-heading small, .pkg-combined small { margin-left: 3px; color: #95a399; font-size: 8px; font-weight: 500; }
.pkg-ai-option p { margin: 7px 0 11px; color: #91a094; font-size: 9px; }
.pkg-combined { display: flex; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid #ecf0ec; }
.pkg-combined > span { color: #91a094; font-size: 9px; }
.pkg-combined strong { color: #557360; font-size: 10px; white-space: nowrap; }
.pkg-ai-option.is-unavailable { background: #f7f8f7; }
.pkg-included { display: grid; gap: 6px; margin: 15px 0 18px; padding: 0; list-style: none; color: #8da093; font-size: 10px; }
.pkg-included li { display: flex; align-items: center; gap: 6px; }
.pkg-included i { color: #4da174; font-size: 12px; }
.pkg-choice-form { margin: auto 0 0; }
.pkg-ai-checkbox { display: flex; gap: 9px; align-items: center; padding: 10px 0 13px; color: #557c64; font-size: 11px; font-weight: 650; cursor: pointer; }
.pkg-ai-checkbox input { width: 15px; height: 15px; margin: 0; accent-color: #14815a; flex: 0 0 auto; }
.pkg-ai-checkbox span { display: grid; gap: 2px; }
.pkg-ai-checkbox small { color: #9aab9e; font-size: 9px; font-weight: 500; }
.pkg-ai-checkbox:has(input:disabled) { cursor: default; }
.pkg-plan-confirm { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 13px; color: #667e6e; font-size: 10px; line-height: 1.5; }
.pkg-plan-confirm input { margin-top: 3px; accent-color: #14815a; flex: 0 0 auto; }
.pkg-checkout-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; padding-top: 11px; border-top: 1px solid #e5ece6; }
.pkg-checkout-total > span { color: #8c9e91; font-size: 10px; }
.pkg-checkout-total strong { color: #345e44; font-size: 13px; }
.pkg-choice-form .btn { display: flex; justify-content: center; gap: 10px; width: 100%; min-height: 39px; font-size: 11px; }
.pkg-choice-form .btn-accent { background: #176e4b; color: #fff; border-color: #176e4b; }
.pkg-choice-form .btn:disabled { opacity: .55; cursor: not-allowed; }
.premium-pkg-card .pkg-current-note { margin-top: auto; padding: 13px 0 2px; color: #438761; font-size: 11px; }
.package-comparison-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 17px 0 25px; color: #99aa9d; font-size: 10px; }
.package-comparison-note i { color: #72a88b; }
.package-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; padding: 21px 0; border-top: 1px solid #dce7df; }
.package-facts > div { display: grid; grid-template-columns: 24px 1fr; align-content: start; column-gap: 8px; }
.package-facts i { color: #72a388; font-size: 18px; }
.package-facts strong { color: #567260; font-size: 11px; }
.package-facts p { grid-column: 2; margin: 4px 0 0; color: #9baa9e; font-size: 10px; line-height: 1.6; }
.package-facts a { color: #448763; }
.package-billing-details { margin-top: 7px; padding: 0 18px; border-color: #e4ebe5; box-shadow: none; }
.package-billing-details summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0; color: #688572; font-size: 11px; font-weight: 650; cursor: pointer; list-style: none; }
.package-billing-details summary::-webkit-details-marker { display: none; }
.package-billing-details > div { padding: 0 0 15px; color: #7c9685; font-size: 11px; }
.catalog-notice { padding: 12px 15px; border-radius: 10px; background: #f0f7f3; color: #62816e; font-size: 12px; }
.pkg-price-caption, .package-currency, .package-section-heading p, .package-comparison-note { color: #667c6e; font-size: 11px; }
.pkg-capacity > span:last-child { font-size: 11px; }
.pkg-capacity small, .pkg-ai-option p, .pkg-included, .pkg-ai-checkbox small, .pkg-checkout-total > span { color: #647d6b; font-size: 11px; }
.pkg-ai-heading > strong, .pkg-combined > span { color: #586f5f; font-size: 11px; }
.pkg-ai-heading small, .pkg-combined small { color: #6c7d71; font-size: 9px; }
.pkg-combined strong { font-size: 11px; }
.pkg-choice-form .btn, .pkg-ai-checkbox { font-size: 12px; }
.package-facts p { color: #6e8275; font-size: 11px; }
.package-facts strong { font-size: 12px; }
.package-billing-details summary, .package-billing-details > div { color: #587563; font-size: 12px; }
.admin-ai-health { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin: 0 20px 20px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f4f8f5; }
.admin-ai-health strong { color: #365e45; font-size: 12px; }
.admin-ai-health p { margin: 4px 0 0; color: #6b8373; font-size: 11px; }
.admin-ai-health form { flex: 0 0 auto; }
@media (max-width: 640px) { .admin-ai-health { align-items: flex-start; flex-direction: column; } }
@media (max-width: 1200px) { .subscription-overview { grid-template-columns: 1fr; gap: 23px; } .subscription-metrics { max-width: 650px; } }
@media (max-width: 1000px) { .package-premium-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .package-premium-grid { grid-template-columns: 1fr; } .subscription-overview { padding: 23px 19px; } .subscription-metrics > div { padding: 0 12px; } .subscription-metrics span { font-size: 9px; } .subscription-metrics strong { font-size: 24px; } .package-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; } .package-section-heading h2 { font-size: 20px; } .package-facts { grid-template-columns: 1fr; gap: 17px; } .package-comparison-note { align-items: flex-start; text-align: center; } }
@media (max-width: 640px) {
  h1, .hero-panel h1, .auth-card h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  .topbar { gap: 12px; }
  .account { gap: 8px; }
}
/* Shared two-line free-trial CTA. */
.btn.btn-trial, button.btn.btn-trial { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; line-height: 1.15; text-align: center; }
.trial-cta-main { display: block; }
.trial-cta-note { display: block; font-size: 11px; font-weight: 500; line-height: 1.2; letter-spacing: 0; opacity: .82; }
.trial-text-link { display: inline-flex; flex-direction: column; gap: 3px; }

/* WPRC domain-length support. */
a[href^="mailto:"]{overflow-wrap:anywhere}
.auth-saas-badge img{max-width:100%;height:auto}

/* Native manual-sync progress feedback. */
.manual-sync-notice[hidden],.manual-sync-spinner[hidden] { display:none !important; }
.manual-sync-notice { position:fixed; right:24px; bottom:24px; z-index:2000; display:flex; align-items:center; gap:14px; width:min(430px,calc(100vw - 32px)); padding:18px 20px; border:1px solid #b2dac8; border-radius:14px; background:#f1fff7; color:#123d2b; box-shadow:0 10px 35px rgba(8,32,22,.18); font-size:15px; font-weight:600; line-height:1.5; }
.manual-sync-notice.is-error { background:#fff4f2; border-color:#e8aaa0; color:#84372d; }
.manual-sync-spinner,.is-manual-sync-loading::before { flex:0 0 auto; display:inline-block; width:20px; height:20px; border:3px solid rgba(18,93,62,.18); border-top-color:#13825b; border-radius:50%; animation:manual-sync-spin .85s linear infinite; }
.is-manual-sync-loading::before { content:''; width:14px; height:14px; border-width:2px; margin-right:7px; vertical-align:-2px; border-color:currentColor; border-right-color:transparent; }
.manual-sync-disabled { cursor:wait !important; opacity:.72; }
@keyframes manual-sync-spin { to { transform:rotate(360deg); } }
@media(max-width:600px) { .manual-sync-notice { right:16px; bottom:16px; padding:15px 16px; } }
@media(prefers-reduced-motion:reduce) { .manual-sync-spinner,.is-manual-sync-loading::before { animation:none; } }
/* Keyword locations stay with the keyword on narrow and wide tables. */
.keyword-detail-cell { min-width: 215px; }
.keyword-location { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-top: 7px; max-width: 310px; white-space: normal; }
.keyword-location-name { color: var(--muted, #54716a); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.keyword-location-edit { appearance: none; border: 0; border-bottom: 1px solid currentColor; padding: 3px 0; background: transparent; color: var(--green-dark, #087f64); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.keyword-location-edit:focus-visible { outline: 2px solid #087f64; outline-offset: 4px; border-radius: 2px; }
.keyword-location-pending { display: block; white-space: normal; max-width: 280px; margin-top: 7px; line-height: 1.5; }
.keyword-location-dialog { width: min(570px, calc(100vw - 28px)); max-width: calc(100vw - 28px); max-height: calc(100dvh - 28px); overflow: auto; }
.keyword-location-dialog-keyword { font-size: 18px; font-weight: 750; overflow-wrap: anywhere; margin-top: 0; }
.keyword-location-inherit { display: flex; align-items: center; gap: 9px; cursor: pointer; line-height: 1.5; }
.keyword-location-inherit input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #087f64; }
.keyword-location-search { position: relative; }
.keyword-location-search input[disabled] { opacity: .65; }
.keyword-location-options { position: relative; z-index: 3; max-height: 220px; overflow-y: auto; margin-top: 5px; border: 1px solid #b9d7cc; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #073d2812; }
.keyword-location-options[hidden] { display: none; }
.keyword-location-options [role="option"] { display: block; width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid #edf3f0; background: #fff; color: #173e32; text-align: left; white-space: normal; overflow-wrap: anywhere; font: inherit; font-size: 13px; cursor: pointer; }
.keyword-location-options [role="option"]:hover, .keyword-location-options [aria-selected="true"], .keyword-location-options .is-active { background: #e4f8ed; }
.keyword-location-dialog [data-location-status] { min-height: 1.5em; line-height: 1.5; }
.keyword-location-dialog [data-location-status].is-error { color: #a82929; }
.keyword-location-dialog-actions { margin-top: 20px; }
@media (max-width: 640px) {
  .keyword-location-dialog .modal-head { align-items: flex-start; gap: 10px; }
  .keyword-location-dialog .modal-head h2 { font-size: 20px; }
  .keyword-location-dialog-actions .btn { width: 100%; justify-content: center; }
  .keyword-location-edit { min-height: 32px; }
}
