/* Analytics theme: neutral graphite surfaces and a single blue accent (the blue Google Ads users know),
   used for actions, the logo and the plan badge. Green/red appear only where a verdict is shown. Brand gold appears only in the logo and the Pro badge. */
:root {
  --bg: #0b0e11; --panel: #181a20; --panel-2: #1e2329; --line: #2b3139; --line-2: #3c434d;
  --text: #eaecef; --muted: #848e9c; --heading: #ffffff;
  --accent: #2563eb; --accent-2: #3b82f6; --accent-hover: #3b74f2; --on-accent: #ffffff; --accent-soft: rgba(59, 130, 246, .16);
  --accent-fg: #6aa5ff; /* accent as text on dark panels (fill blue is too dim for small text) */
  --logo: #1a4fd6; /* a touch deeper than Google blue */
  --good: #0ecb81; --good-bg: rgba(14, 203, 129, .12); --good-line: rgba(14, 203, 129, .32);
  --warn: #f8a23b; --warn-bg: rgba(248, 162, 59, .12); --warn-line: rgba(248, 162, 59, .32);
  --bad: #f6465d; --bad-bg: rgba(246, 70, 93, .12); --bad-line: rgba(246, 70, 93, .32);
  --info: #5aa2f8;
  --radius: 10px; font-size: 14px;
  --font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: var(--font); /* headings use the same sans face; serif felt decorative for a data tool */
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); display: flex; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* sidebar */
.sidebar { width: 256px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; color: inherit; }
a.brand:hover { text-decoration: none; opacity: .85; }
.brand-name { font-size: 16px; font-weight: 700; color: var(--heading); letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: 11px; }
.logo { width: 34px; height: 34px; border-radius: 9px; display: block; flex-shrink: 0; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; color: var(--text); margin-bottom: 2px; }
nav a:hover { background: var(--panel-2); text-decoration: none; }
nav a.active { background: var(--accent-soft); color: var(--accent-fg); font-weight: 600; }
nav a.nav-switch { margin-top: 14px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; }
nav a.nav-switch:hover { color: var(--accent-fg); border-color: var(--accent-2); }
.admin-badge { align-self: flex-start; font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--on-accent); background: var(--accent); padding: 3px 8px; border-radius: 999px; margin: -10px 0 14px; }
body.admin-mode .sidebar { border-right-color: var(--accent-2); box-shadow: inset -2px 0 0 var(--accent-soft); }
.account { margin-top: auto; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.credits { font-size: 16px; font-weight: 700; color: var(--accent-fg); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.account-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.lang-switch button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; padding: 3px 9px; cursor: pointer; }
.lang-switch button.on { background: var(--accent); color: var(--on-accent); }

/* page */
main { flex: 1; padding: 26px 28px; min-width: 0; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--heading); margin: 0 0 6px; }
.page-head p { margin: 0 0 18px; max-width: 920px; line-height: 1.55; }
.live { font-family: var(--font); font-size: 12px; color: var(--accent-fg); font-weight: 500; margin-left: 8px; vertical-align: middle; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.add { display: flex; gap: 10px; padding: 12px; margin-bottom: 12px; }
textarea, input, select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { flex: 1; resize: vertical; }
input[type="checkbox"] { accent-color: var(--accent-fg); }
.btn { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 8px; padding: 8px 13px; cursor: pointer; font: inherit; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--accent-2); color: var(--accent-fg); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: default; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }

/* tables */
.table-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 10px; padding: 12px; align-items: center; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar input { width: 240px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
.dom { font-weight: 600; color: var(--heading); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line-2); white-space: nowrap; color: var(--text); }
.pill.positive { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.pill.possible { background: rgba(240, 185, 11, .12); color: #f0b90b; border-color: rgba(240, 185, 11, .32); }
.pill.negative { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.pill.gold { background: var(--accent-soft); color: var(--accent-fg); border-color: transparent; }

.jobs { display: flex; flex-direction: column; gap: 3px; }
.job { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); width: max-content; color: var(--muted); }
.job.success { color: var(--good); border-color: var(--good-line); }
.job.error { color: var(--bad); border-color: var(--bad-line); }
.job.queued, .job.running { color: var(--info); border-color: rgba(90, 162, 248, .35); }
.job.stale { color: var(--warn); border-color: var(--warn-line); }
.spin { display: inline-block; width: 9px; height: 9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* compact domain table */
#view-domains table td { padding: 9px 10px; }
#view-domains table th { padding: 10px; }
#view-domains .dom { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-link { font-size: 12px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
tr[data-domain]:hover .detail-link:not(.busy) { color: var(--accent-fg); }
.toolbar-end { margin-left: auto; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.pager:empty { display: none; }
.pager-nav { display: flex; align-items: center; gap: 10px; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .4; cursor: default; }
.upgrade-btn { margin-bottom: 10px; text-decoration: none !important; }
/* upgrade page */
.billing { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; margin-bottom: 16px; }
.billing button { background: none; border: 0; color: var(--muted); font: inherit; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.billing button.on { background: var(--accent-soft); color: var(--accent-fg); font-weight: 600; }
.billing em { font-style: normal; font-size: 11px; color: var(--good); }
.up-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; max-width: 1100px; }
.up-plan, .up-pack { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.up-plan.featured { border-color: var(--accent-2); }
.up-plan h4 { margin: 0; font-size: 16px; color: var(--heading); }
.up-price b { font-size: 26px; color: var(--accent-fg); font-family: var(--serif); }
.up-list { margin: 4px 0 8px; padding-left: 18px; color: var(--text); font-size: 13px; line-height: 1.7; flex: 1; }
.up-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; max-width: 760px; }
.up-pack .up-price b { font-size: 20px; }
/* guide */
.guide-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.guide { max-width: 820px; line-height: 1.7; }
.guide h3 { color: var(--accent-fg); margin: 26px 0 8px; font-size: 17px; }
.guide ol, .guide ul { padding-left: 20px; }
.guide table { margin: 6px 0; }
.tip-box, .guide .tip { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin: 10px 0; max-width: 760px; }
.verdict { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* drawer */
.drawer { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); display: flex; justify-content: flex-end; z-index: 10; }
.drawer-panel { width: min(1000px, 100%); height: 100%; overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line-2); padding: 24px; position: relative; }
.close { position: absolute; right: 16px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding-right: 30px; flex-wrap: wrap; }
.d-head h2 { margin: 0; font-family: var(--serif); font-size: 28px; color: var(--heading); }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; margin-bottom: 14px; }
.section h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-fg); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.section h3 .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.section table td, .section table th { padding: 7px 8px; }
.section tbody tr { cursor: default; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.stat small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.stat b { display: block; font-size: 21px; margin-top: 3px; color: var(--heading); }
.stat .hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.err-box { color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: 8px; padding: 9px 11px; font-size: 13px; margin-bottom: 8px; }
.note { color: var(--warn); font-size: 12px; }
.bar { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.adv-domains { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
ul.evidence { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.locked { color: var(--muted); font-size: 13px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 8px; margin-top: 8px; }

/* advertisers */
.months { font-weight: 600; white-space: nowrap; }
.months.steady { color: var(--accent-fg); }
.adv-detail { background: var(--panel-2); padding: 12px 14px !important; }
.pick-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.found-table { width: 100%; }
.found-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.found-table .group-row td { background: rgba(59, 130, 246, .07); padding-top: 9px; }
.found-table label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.pick-actions { position: sticky; bottom: 0; background: var(--panel-2); padding: 10px 0 4px; margin-top: 8px; }

/* evaluation */
.verdict { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.verdict.test { background: var(--good-bg); color: var(--good); }
.verdict.check { background: transparent; color: #b7bdc6; box-shadow: inset 0 0 0 1px var(--line-2); } /* "look closer" is not a signal: neutral */
.verdict.skip { background: var(--bad-bg); color: var(--bad); }
.profit-pos { color: var(--good); font-weight: 600; }
.profit-neg { color: var(--bad); font-weight: 600; }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.calc label { font-size: 11px; color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 4px; }
.calc input, .calc select { width: 100%; }
.calc .src { display: block; min-height: 15px; margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crit .st { width: 26px; text-align: center; font-weight: 700; }
.st-pass { color: var(--good); } .st-ok { color: var(--warn); } .st-fail { color: var(--bad); } .st-unknown { color: var(--muted); }

/* sign-in gate */
.gate { position: fixed; inset: 0; background: radial-gradient(ellipse at top, #1e2329 0%, var(--bg) 60%); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.gate-card { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 30px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.gate-card h2 { margin: 18px 0 8px; font-family: var(--serif); font-size: 26px; color: var(--heading); }
.gate-card p { color: var(--muted); line-height: 1.55; }
.gate-lang { margin-top: 16px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 10px; background: #fff; color: #1f1f1f; font-weight: 600; margin-top: 18px; }
.google-btn:hover { text-decoration: none; filter: brightness(.96); }
.google-btn svg { width: 18px; height: 18px; }
.device-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* faint user email over the page: discourages sharing screenshots */

/* admin */
.user-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.user-form select, .user-form input { padding: 4px 6px; font-size: 12px; }
.user-form input { width: 70px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi-grid .stat b { font-family: var(--serif); font-size: 26px; }
.kpi-grid .stat.gold { border-color: var(--accent-2); background: linear-gradient(160deg, rgba(59, 130, 246, .14), var(--panel-2)); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }

@media (max-width: 760px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; }
  .brand { margin: 0; } nav { display: flex; gap: 4px; flex-wrap: wrap; } nav a.nav-switch { margin-top: 0; } .account { margin: 0 0 0 auto; }
  .admin-badge { margin: 0; }
  main { padding: 16px; } .add { flex-direction: column; } .toolbar input { width: 100%; }
}

.tip-box.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.pay-box { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--line-2); background: var(--panel); max-width: 1100px; display: flex; align-items: center; gap: 8px; }
.pay-box.ok { background: var(--good-bg); border-color: var(--good-line); color: var(--good); font-weight: 600; }
.pay-box.wait { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }

/* Domain list: profit stays plain text so the coloured labels (affiliate, verdict) stand out. */
#rows .profit-pos { color: var(--heading); }
#rows .profit-neg { color: var(--muted); }

/* network name, trend sparkline */
.net { display: inline-block; font-size: 11px; color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px; white-space: nowrap; margin: 1px 0; }
.trend { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); } .trend.flat { color: var(--muted); }

/* filter bar */
.toolbar.filters { gap: 8px; padding-top: 10px; }
.toolbar.filters select, .toolbar.filters input { padding: 6px 9px; font-size: 13px; }
.toolbar.filters input { width: 150px; }
.toolbar.filters .on { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2) inset; color: var(--heading); }

.stat.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.stat.warn b { color: var(--warn); }
.crit .quote { margin-top: 4px; font-size: 12px; font-style: italic; color: var(--muted); border-left: 2px solid var(--line-2); padding-left: 8px; }

/* Ads project vault: names hidden from the Free plan */
.locked-dom span { filter: blur(4px); user-select: none; }

/* Last-updated date once advertisers are out of date */
.stale { color: #f0b90b; }
.nowrap { white-space: nowrap; }
.nets { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px; }
.updated { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
/* Narrower laptops: tighter cells so the project table still fits without side-scrolling */
@media (max-width: 1400px) {
  th, td { padding-left: 6px; padding-right: 6px; }
  th { letter-spacing: .02em; font-size: 10.5px; }
  main { padding: 22px 18px; }
  #rows .dom, #lib-rows .dom { font-size: 13px; }
  #rows .dom, #lib-rows .dom { max-width: 170px; overflow-wrap: anywhere; }
  #rows .verdict, #lib-rows .verdict { font-size: 11px; padding: 3px 7px; }
  .updated { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Project tables: columns get set shares of the width (colgroup), numbers line up, filters sit on an even grid */
table.projects td { vertical-align: middle; }
table.projects th.num, table.projects td.num { text-align: right; padding-right: 18px; }
.toolbar.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); align-items: stretch; }
.toolbar.filters select, .toolbar.filters input { width: 100%; }
.toolbar #search { flex: 1 1 220px; max-width: 340px; width: auto; }

/* Phones: one card per project instead of a wide table */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; }
  table.projects, table.projects tbody { display: block; }
  table.projects colgroup, table.projects thead { display: none; }
  table.projects tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px; border-bottom: 1px solid var(--line); }
  table.projects td { display: block; padding: 0; border: 0; text-align: left !important; min-width: 0; }
  table.projects td::before { content: attr(data-label); display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
  table.projects td:first-child { grid-column: 1; grid-row: 1; }
  table.projects td:first-child::before { display: none; }
  /* last cell (updated + refresh, or the vault's add button) sits top-right, next to the name */
  table.projects td:last-child { grid-column: 2; grid-row: 1; justify-self: end; }
  table.projects td:last-child::before { display: none; }
  table.projects .updated { flex-direction: row; align-items: center; }
  table.projects .dom { max-width: none; font-size: 15px; }
  table.projects .verdict { white-space: normal; max-width: 100%; }
  .toolbar.filters { grid-template-columns: 1fr 1fr; }
  .toolbar #search { max-width: none; flex-basis: 100%; }
  .drawer-panel { padding: 16px; }
}

/* Phones: the sidebar becomes a compact top bar (brand + credits, then a swipeable menu row) */
@media (max-width: 760px) {
  .sidebar { width: 100%; height: auto; position: sticky; top: 0; z-index: 8; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0; }
  .brand .logo { width: 30px; height: 30px; }
  .brand small { display: none; }
  .brand-name { white-space: nowrap; }
  .account .credits { white-space: nowrap; font-size: 13px; min-width: max-content; }
  .account { gap: 6px; }
  .account #plan-pill { display: none; }
  .account { grid-column: 2; grid-row: 1; margin: 0; flex-direction: row; align-items: center; gap: 8px; }
  .account #credit-note, .account #user-email, .account .account-links { display: none; }
  .account .upgrade-btn { padding: 6px 10px; font-size: 12px; width: auto; }
  .sidebar nav { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; scrollbar-width: none; min-width: 0; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { white-space: nowrap; padding: 6px 11px; margin: 0; font-size: 13px; }
  .sidebar nav a.nav-switch { margin: 0; }
  .admin-badge { grid-column: 1 / -1; }
}
@media (min-width: 761px) and (max-width: 1400px) {
  table.projects th.num, table.projects td.num { padding-right: 8px; }
}
.rep-groups { list-style: none; padding: 0; margin: 4px auto 12px; display: inline-flex; flex-direction: column; gap: 4px; text-align: left; font-size: 14px; }
.rep-groups b { display: inline-block; min-width: 44px; text-align: right; margin-right: 8px; color: var(--heading); }

/* One-line audience note under the plan name (not a feature) */
.plan-tag { font-style: italic; color: var(--muted); font-size: 13px; margin: 2px 0 8px; }

/* Company invoice form on the upgrade page */
.invoice-box { padding: 14px 16px; margin: 16px 0; max-width: 1100px; }
.invoice-box .check { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.inv-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.inv-fields label span { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.inv-fields input { width: 100%; }

/* Menu icons and plan badges */
nav a .ti { font-size: 18px; width: 20px; text-align: center; opacity: .85; flex-shrink: 0; }
nav a > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav a.active .ti { opacity: 1; }
.nav-badge { margin-left: auto; flex-shrink: 0; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 2px 6px; border-radius: 999px; color: var(--accent-fg); background: var(--accent-soft); white-space: nowrap; }
@media (max-width: 760px) { nav a .ti { font-size: 15px; width: auto; } .nav-badge { margin-left: 4px; } }

/* Upgrade page: the plan the account is on */
.up-plan.current { border-color: var(--good-line); box-shadow: 0 0 0 1px var(--good-line) inset; }
.up-renew-note { margin: 0 0 10px; }
.current-plan { max-width: 1100px; }

/* Credit add-on under the plans */
.addon { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin: 14px 0; max-width: 1100px; flex-wrap: wrap; }
.addon-price { color: var(--heading); font-weight: 700; }

/* Checkout confirmation dialog */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(5, 7, 10, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: modal-in .15s ease-out; }
.modal-card { position: relative; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: #1b1f26; border: 1px solid rgba(255, 255, 255, .14); border-top: 3px solid var(--accent); border-radius: 14px; padding: 22px; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.modal-card h3 { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 18px; }
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }
body:has(.modal) { overflow: hidden; }
.modal-card .close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.co-rows td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid var(--line); }
.co-rows td:first-child { width: 90px; white-space: nowrap; }
.co-price { font-size: 20px; color: var(--heading); }
.co-rows tr:last-child td { border-bottom: 0; padding-top: 12px; }
.modal-card .invoice-box { background: rgba(255, 255, 255, .03); }
.modal-card .invoice-box { margin: 14px 0; padding: 12px; }
.co-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* Checkout agreement and purchase conditions */
.co-agree { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 6px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.co-agree input { margin-top: 3px; }
.co-seller .ti { color: var(--good); }
.conditions { padding: 14px 18px; margin: 18px 0 10px; max-width: 1100px; }
.conditions h4 { margin: 0 0 8px; }
.conditions ul { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--text); }
/* Admin data table: one line per domain, actions on the right */
.admin-browse td { white-space: nowrap; }
.admin-browse td:first-child { white-space: normal; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
/* ★ favourites */
.star { background: none; border: 0; padding: 0 6px 0 0; font-size: 16px; line-height: 1; color: var(--muted); cursor: pointer; vertical-align: -1px; }
.star:hover { color: #f0b90b; }
.star.on { color: #f0b90b; }
h2 .star { font-size: 22px; }
.nav-count { margin-left: auto; font-style: normal; font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }

/* support: floating help button and panel (assistant + tickets), admin support list */
.help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 9; display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.help-fab:hover { background: var(--accent-hover); }
.help-fab i { font-size: 18px; }
.help-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); border: 2px solid var(--accent); }
.help-panel { position: fixed; right: 20px; bottom: 20px; z-index: 11; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .55); overflow: hidden; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.help-head .close { position: static; }
.help-tabs { display: flex; gap: 4px; }
.help-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.help-tabs button.on { background: var(--accent-soft); color: var(--accent-fg); }
.help-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.help-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.help-log h4 { margin: 0; font-size: 15px; color: var(--heading); }
.help-log p { margin: 0; }
.help-msg { padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; max-width: 92%; }
.help-msg.assistant { background: var(--panel-2); align-self: flex-start; border-top-left-radius: 4px; }
.help-msg.user { background: var(--accent-soft); align-self: flex-end; border-top-right-radius: 4px; }
.help-msg .muted.small { margin-bottom: 4px; }
.help-escalate { align-self: flex-start; }
.help-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.help-chips .chip { border: 1px solid var(--line-2); background: none; color: var(--text); font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 999px; cursor: pointer; text-align: left; }
.help-chips .chip:hover { border-color: var(--accent-2); color: var(--accent-fg); }
.help-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.help-input textarea { flex: 1; resize: none; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; font: inherit; max-height: 120px; }
.help-foot { padding: 0 12px 10px; margin: 0; }
.help-ticket { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.help-ticket:hover { border-color: var(--accent-2); }
.help-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.help-form input, .help-form textarea, .sup-reply textarea { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; font: inherit; }
.sup-ticket { margin-bottom: 8px; overflow: hidden; }
.sup-ticket.open { border-color: var(--accent-2); }
.sup-row { width: 100%; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: none; border: 0; color: var(--text); font: inherit; text-align: left; padding: 12px 14px; cursor: pointer; }
.sup-detail { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.sup-detail details { border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.sup-detail details[open] > .help-msg { margin-top: 8px; }
.sup-reply { display: flex; flex-direction: column; gap: 8px; }
.sup-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) {
  .help-fab { right: 14px; bottom: 14px; padding: 10px 14px; }
  .help-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
}
body.admin-mode .help-fab, body.admin-mode .help-panel { display: none !important; }
.help-title { font-size: 15px; color: var(--heading); padding-left: 4px; }
.help-form select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; font: inherit; }
.help-verdict { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0 0; }
.help-verdict .muted { width: 100%; }
