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

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

: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;
}

* { 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; }

.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; }
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 8px; flex-wrap: wrap; }
.trend-title { display: flex; align-items: center; gap: 12px; }
.trend-title h2 { margin: 0; font-size: 16px; }
.trend-title .trend-sub { 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: 6px 13px; border-radius: 4px; 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 16px 14px; position: relative; }
.trend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-empty { padding: 50px 24px; text-align: center; color: var(--muted); }
.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); }

@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; }
}

@media (max-width: 560px) {
  .nav { grid-template-columns: repeat(2, 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: 1200px) {
  #keywords-table .col-cann { display: none; }
}
@media (max-width: 1000px) {
  #keywords-table .col-first { display: none; }
}
@media (max-width: 820px) {
  #keywords-table .col-url { display: none; }
}
