/* MarginScout shared theme for extension pages (popup, welcome). */
:root {
  --bg: #0B1020; --bg2: #0F1528; --card: rgba(255,255,255,.035); --card2: rgba(255,255,255,.06);
  --line: rgba(148,163,184,.14); --line2: rgba(148,163,184,.22);
  --text: #E8ECF4; --muted: #8C97AB; --dim: #5E6A80;
  --mint: #3CF2B5; --cyan: #22C8EE; --gold: #FBBF24; --neg: #FB7185;
  --grad: linear-gradient(135deg, #3CF2B5 0%, #22C8EE 100%);
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 13px/1.45 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--mint); }
.tab-num { font-variant-numeric: tabular-nums; }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
  background: rgba(148,163,184,.12); color: #CBD5E1; border: 1px solid var(--line2); }
.chip.pro { background: var(--grad); color: #04261B; border: 0; }
.chip.trial { background: rgba(34,200,238,.14); color: #7DE3F8; border-color: rgba(34,200,238,.35); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 11px; border: 0; cursor: pointer; font-weight: 700; text-decoration: none; transition: transform .12s, filter .15s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: #04261B; box-shadow: 0 8px 22px -8px rgba(60,242,181,.55); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: rgba(255,255,255,.07); color: var(--text); border: 1px solid var(--line2); }
.btn.ghost:hover { background: rgba(255,255,255,.11); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.btn.block { width: 100%; }
.link { border: 0; background: none; color: var(--mint); font-weight: 650; cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.seg button { flex: 1; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255,255,255,.1); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 8px rgba(0,0,0,.25); }

.inp { display: flex; align-items: center; height: 36px; border-radius: 10px; background: rgba(2,6,23,.55); border: 1px solid var(--line2); transition: border-color .15s, box-shadow .15s; }
.inp:focus-within { border-color: rgba(60,242,181,.6); box-shadow: 0 0 0 3px rgba(60,242,181,.15); }
.inp i { font-style: normal; color: var(--dim); padding-left: 10px; font-size: 12px; }
.inp input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 10px 0 6px; font-variant-numeric: tabular-nums; }
.inp input::-webkit-inner-spin-button { -webkit-appearance: none; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; color: #CBD5E1; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgba(148,163,184,.25); transition: background .2s; flex: none; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--mint); }
.switch input:checked + .track .knob { transform: translateX(14px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(60,242,181,.3); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: rgba(148,163,184,.22); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--mint); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); }

.meter { height: 6px; border-radius: 999px; background: rgba(148,163,184,.2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .4s ease; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
