/* ============================================================
   TGSBOR · Graphite & Emerald theme (2026-11-14)
   Selected palette: light-green accent on graphite,
   warm sand as secondary. Replaces the old indigo/violet scheme.
   Loaded LAST so it wins over dashboard.css / hub-ui.css / overview-v2.css.
   ============================================================ */
:root {
  /* dashboard.css tokens */
  --bg: #0b0e0d;
  --bg-alt: #0e1211;
  --panel: rgba(18, 22, 21, 0.74);
  --glass-bg: rgba(18, 22, 21, 0.70);
  --glass-border: 1px solid rgba(255, 255, 255, 0.075);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.42);
  --bg-mesh: radial-gradient(circle at 10% 15%, rgba(47, 164, 124, 0.10) 0%, transparent 45%),
             radial-gradient(circle at 90% 85%, rgba(217, 164, 91, 0.07) 0%, transparent 45%),
             radial-gradient(circle at 50% 50%, rgba(95, 174, 156, 0.035) 0%, transparent 60%);
  --sb: rgba(14, 18, 17, 0.90);
  --c1: rgba(18, 22, 21, 0.78);
  --c2: rgba(23, 29, 27, 0.9);
  --border: rgba(255, 255, 255, 0.075);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(47, 164, 124, 0.55);
  --text: #e9eeea;
  --muted: #94a29b;

  --blue: #2fa47c;
  --blue-glow: rgba(47, 164, 124, 0.24);
  --green: #2fa47c;
  --green-glow: rgba(47, 164, 124, 0.2);
  --yellow: #d9a45b;
  --yellow-glow: rgba(217, 164, 91, 0.2);
  --red: #e06c5f;
  --red-glow: rgba(224, 108, 95, 0.2);
  --cyan: #5fae9c;
  --cyan-glow: rgba(95, 174, 156, 0.2);
  --purple: #d9a45b;
  --purple-glow: rgba(217, 164, 91, 0.2);
  --pink: #e0b06a;
  --orange: #d9a45b;
  --head: #e9eeea;
  --card-radius: 14px;

  /* overview-v2 tokens */
  --ink-0: #0b0e0d;
  --ink-1: #0e1211;
  --ink-2: #121615;
  --ink-3: #171d1b;
  --surface: rgba(18, 22, 21, 0.74);
  --surface-2: rgba(23, 29, 27, 0.84);
  --surface-3: rgba(27, 34, 31, 0.9);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --txt: #e9eeea;
  --txt-2: #94a29b;
  --txt-3: #64716b;
  --acc: #2fa47c;
  --acc-2: #d9a45b;
  --ok: #2fa47c;
  --warn: #d9a45b;
  --bad: #e06c5f;

  /* hub-ui tokens */
  --glass-blur: blur(20px);
}

/* global background of the app */
html, body {
  background-color: #0b0e0d !important;
  color: var(--text);
}
body {
  background-image:
    radial-gradient(900px 540px at 8% -6%, rgba(47, 164, 124, 0.13), transparent 62%),
    radial-gradient(820px 500px at 96% 4%, rgba(217, 164, 91, 0.09), transparent 60%),
    radial-gradient(700px 460px at 52% 108%, rgba(95, 174, 156, 0.05), transparent 62%) !important;
}

/* sidebar & brand */
.sidebar { background: linear-gradient(180deg, rgba(14, 18, 17, 0.97), rgba(11, 14, 13, 0.98)) !important; }
.logo-box {
  background: linear-gradient(135deg, #2fa47c 0%, #d9a45b 120%) !important;
  box-shadow: 0 10px 26px -8px rgba(47, 164, 124, 0.6) !important;
}
.nav a.active {
  background: linear-gradient(92deg, rgba(47, 164, 124, 0.16), rgba(217, 164, 91, 0.08)) !important;
  box-shadow: inset 0 0 0 1px rgba(47, 164, 124, 0.24) !important;
}
.nav a.active::before {
  background: linear-gradient(180deg, #2fa47c, #d9a45b) !important;
  box-shadow: 0 0 14px rgba(47, 164, 124, 0.75) !important;
}
.avatar {
  background: linear-gradient(135deg, #2fa47c, #5fae9c) !important;
  box-shadow: 0 8px 20px -8px rgba(47, 164, 124, 0.7) !important;
}
.nav a .badge-new, .badge-new {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #94a29b !important;
}
.nav a[data-tab="warmer"] .badge-new,
.nav a[data-tab="cleaner"] .badge-new,
.nav a[data-tab="safety"] .badge-new,
.nav a[data-tab="schedule"] .badge-new {
  background: rgba(47, 164, 124, 0.14) !important;
  color: #2fa47c !important;
}

/* shell */
.topbar { background: rgba(11, 14, 13, 0.75) !important; border-bottom-color: rgba(255, 255, 255, 0.075) !important; }
#ticker { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.075); }
.top-btn { background: rgba(255, 255, 255, 0.035) !important; border-color: rgba(255, 255, 255, 0.075) !important; }
.top-btn:hover { background: rgba(47, 164, 124, 0.12) !important; border-color: rgba(47, 164, 124, 0.35) !important; color: #e9eeea !important; }

/* overview hero + accents (variables cover most, but gradients are hardcoded) */
.ov-hero {
  background:
    radial-gradient(900px 320px at 12% 0%, rgba(47, 164, 124, 0.20), transparent 60%),
    radial-gradient(700px 300px at 92% 10%, rgba(217, 164, 91, 0.13), transparent 62%),
    linear-gradient(180deg, rgba(20, 25, 23, 0.94), rgba(12, 16, 15, 0.94)) !important;
}
.ov-grad {
  background: linear-gradient(96deg, #7fd4b4 0%, #a8dcc7 45%, #e0b06a 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.ov-eyebrow { color: #5fae9c !important; background: rgba(47, 164, 124, 0.09) !important; border-color: rgba(47, 164, 124, 0.24) !important; }
.ov-btn-primary {
  background: linear-gradient(135deg, #2fa47c 0%, #3fbf92 62%, #d9a45b 120%) !important;
  color: #07130f !important;
  box-shadow: 0 12px 28px -12px rgba(47, 164, 124, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
.ov-btn-ghost { background: rgba(255, 255, 255, 0.045); border-color: var(--line-strong); }
.ov-chip:hover { border-color: rgba(47, 164, 124, 0.3); background: rgba(47, 164, 124, 0.08); }
.ov-clock { color: #e9eeea; }
.ov-pulse { background: #2fa47c; box-shadow: 0 0 0 4px rgba(47, 164, 124, 0.14), 0 0 12px rgba(47, 164, 124, 0.85); }

/* main buttons / links / badges across the app */
.btn-blue, .btn-primary, .login-btn {
  background: linear-gradient(135deg, #217a5b 0%, #2fa47c 55%, #3fbf92 100%) !important;
  border-color: rgba(47, 164, 124, 0.6) !important;
  color: #07130f !important;
  box-shadow: 0 8px 22px -12px rgba(47, 164, 124, 0.7) !important;
}
.btn-blue:hover, .btn-primary:hover { filter: brightness(1.08); }
.login-btn { color: #07130f !important; font-weight: 800; }
.badge-blue { background: rgba(47, 164, 124, 0.12) !important; color: #5fae9c !important; border-color: rgba(47, 164, 124, 0.25) !important; }
.badge-purple { background: rgba(217, 164, 91, 0.12) !important; color: #d9a45b !important; border-color: rgba(217, 164, 91, 0.25) !important; }
.badge-ok { background: rgba(47, 164, 124, 0.12) !important; color: #2fa47c !important; border-color: rgba(47, 164, 124, 0.25) !important; }
.online-dot.dot-g { background: #2fa47c !important; box-shadow: 0 0 8px rgba(47, 164, 124, 0.8) !important; }

a { color: inherit; }
::selection { background: rgba(47, 164, 124, 0.35); }
::-webkit-scrollbar-thumb { background: rgba(47, 164, 124, 0.3) !important; border-color: #0b0e0d !important; }
::-webkit-scrollbar-thumb:hover { background: rgba(47, 164, 124, 0.45) !important; }

/* login screen */
#login-screen {
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(47, 164, 124, 0.2), transparent 62%),
    radial-gradient(800px 520px at 88% 100%, rgba(217, 164, 91, 0.12), transparent 62%),
    #0b0e0d !important;
}
.login-logo-icon {
  background: linear-gradient(135deg, #2fa47c, #5fae9c) !important;
  color: #07130f !important;
}
.login-input:focus { border-color: #2fa47c !important; box-shadow: 0 0 0 3px rgba(47, 164, 124, 0.25) !important; }
#login-screen a[href*="t.me"] {
  background: rgba(47, 164, 124, 0.08) !important;
  border-color: rgba(47, 164, 124, 0.28) !important;
  color: #a8dcc7 !important;
}
#login-screen a[href*="t.me"]:hover { background: rgba(47, 164, 124, 0.16) !important; color: #fff !important; }
#login-screen a[href*="t.me"] i { color: #2fa47c !important; }

/* modals / tables / inputs tinted */
.modal { background: linear-gradient(180deg, rgba(20, 25, 23, 0.98), rgba(13, 17, 16, 0.99)) !important; }
.inp:focus, input:focus, textarea:focus, select:focus { border-color: rgba(47, 164, 124, 0.6) !important; box-shadow: 0 0 0 3px rgba(47, 164, 124, 0.16) !important; }
.hdr-act-pill { border-color: rgba(47, 164, 124, 0.2) !important; }


/* brand media (planet logo) hue-shifted from blue to emerald to match the palette */
#sidebar-video-logo, #login-screen video { filter: hue-rotate(105deg) saturate(.85) brightness(1.08); }
.login-logo-icon video { filter: hue-rotate(105deg) saturate(.85) brightness(1.08); }


/* brand mark: static emerald monogram instead of the blue/purple planet video */
#sidebar-video-logo { display: none !important; }
#login-screen video { display: none !important; }
.logo-mark, .login-logo-icon {
  background: linear-gradient(135deg, #2fa47c, #5fae9c) !important;
  box-shadow: none !important;
  color: #07130f !important;
}
.logo-mark i, .login-logo-icon i { color: #07130f !important; display: grid !important; font-size: 13px !important; }

/* sidebar status badges: muted instead of candy colors */
#main-sidebar .badge-new, #main-sidebar .badge {
  background: rgba(255,255,255,.055) !important;
  color: #94a29b !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

/* ===== legacy tabs clean pass ===== */
/* Flatten legacy panels across all tabs so they match Graphite & Emerald.
   Only presentation: no layout/JS behaviour changes. */
.tab:not(#tab-overview) .card,
.tab:not(#tab-overview) .stat-card,
.tab:not(#tab-overview) .hub-card,
.tab:not(#tab-overview) .ap-banner,
.tab:not(#tab-overview) .stage-card,
.tab:not(#tab-overview) .crawler-card,
.tab:not(#tab-overview) .sched-card,
.tab:not(#tab-overview) .settings-section,
.tab:not(#tab-overview) .safety-card,
.tab:not(#tab-overview) .queue-card,
.tab:not(#tab-overview) .proxy-card,
.tab:not(#tab-overview) .worker-card {
  background: linear-gradient(180deg, rgba(18,22,21,.94), rgba(11,14,13,.96)) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}
.tab:not(#tab-overview) .card::before,
.tab:not(#tab-overview) .stat-card::before,
.tab:not(#tab-overview) .ap-banner::before,
.tab:not(#tab-overview) .stage-card::before,
.tab:not(#tab-overview) .hub-card::before {
  display: none !important;
}
/* one quiet primary style instead of bright gradient candy */
.tab:not(#tab-overview) .btn-green,
.tab:not(#tab-overview) .btn-blue,
.tab:not(#tab-overview) .btn-primary {
  background: rgba(47,164,124,.14) !important;
  border: 1px solid rgba(47,164,124,.42) !important;
  color: #a8dcc7 !important;
  box-shadow: none !important;
}
.tab:not(#tab-overview) .btn-green:hover,
.tab:not(#tab-overview) .btn-blue:hover,
.tab:not(#tab-overview) .btn-primary:hover { background: rgba(47,164,124,.22) !important; }
.tab:not(#tab-overview) .btn-red {
  background: rgba(224,108,95,.10) !important;
  border: 1px solid rgba(224,108,95,.35) !important;
  color: #e06c5f !important;
  box-shadow: none !important;
}
.tab:not(#tab-overview) .btn-outline { border-color: rgba(255,255,255,.12) !important; color: var(--txt-2) !important; }
/* forms / controls */
.tab:not(#tab-overview) input,
.tab:not(#tab-overview) textarea,
.tab:not(#tab-overview) select {
  background: #0f1413 !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  color: #e9eeea !important;
  border-radius: 8px !important;
}
.tab:not(#tab-overview) input:focus,
.tab:not(#tab-overview) textarea:focus,
.tab:not(#tab-overview) select:focus { border-color: rgba(47,164,124,.55) !important; box-shadow: 0 0 0 3px rgba(47,164,124,.12) !important; }
/* tables */
.tab:not(#tab-overview) table thead th {
  background: rgba(255,255,255,.025) !important;
  color: var(--txt-2) !important;
  border-bottom: 1px solid rgba(255,255,255,.075) !important;
  font-weight: 600 !important;
}
.tab:not(#tab-overview) table tbody tr:hover { background: rgba(47,164,124,.045) !important; }
.tab:not(#tab-overview) table td { border-color: rgba(255,255,255,.05) !important; }
/* headings: no glow / gradient */
.tab:not(#tab-overview) h1,
.tab:not(#tab-overview) h2,
.tab:not(#tab-overview) h3,
.tab:not(#tab-overview) .card-title {
  color: #e9eeea !important;
  text-shadow: none !important;
  background: none !important;
}
.tab:not(#tab-overview) .card-title i { color: #5fae9c !important; }
/* tab context switcher */
.hub-context-tabs .btn { box-shadow: none !important; border-radius: 8px !important; }
.hub-context-tabs .btn-blue { background: rgba(47,164,124,.16) !important; color: #a8dcc7 !important; border-color: rgba(47,164,124,.35) !important; }
/* ===== Style A: clean pass for all legacy tabs ===== */
/* decorative neon strips on stat/audit/stage cards */
.tab:not(#tab-overview) .stat-card::before,
.tab:not(#tab-overview) .acc-stat-card-accent-line,
.tab:not(#tab-overview) .stage-card::before,
.tab:not(#tab-overview) .ap-stage::before,
.tab:not(#tab-overview) .audit-stat-card::before,
.tab:not(#tab-overview) [class*="accent-line"] { display:none !important; }
/* flat stat values instead of white gradient text */
.tab:not(#tab-overview) .stat-val,
.tab:not(#tab-overview) .stat-card .stat-val {
  background: none !important;
  -webkit-text-fill-color: #e9eeea !important;
  color: #e9eeea !important;
  text-shadow: none !important;
}
.tab:not(#tab-overview) .stat-icon {
  background: rgba(47,164,124,.10) !important;
  color: #5fae9c !important;
  border-color: rgba(47,164,124,.18) !important;
}
/* quiet semantic pills */
.tab:not(#tab-overview) .stat-tag,
.tab:not(#tab-overview) .badge,
.tab:not(#tab-overview) .status-pill,
.tab:not(#tab-overview) .ov-pill {
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: #94a29b !important;
  box-shadow: none !important;
}
/* unified buttons */
.tab:not(#tab-overview) .btn { box-shadow:none !important; font-weight:600 !important; }
.tab:not(#tab-overview) .btn-outline { border-color: rgba(255,255,255,.12) !important; color: #94a29b !important; }
.tab:not(#tab-overview) .btn:disabled { opacity:.45 !important; }
/* section titles: same weight/size language as Overview */
.tab:not(#tab-overview) .card-title,
.tab:not(#tab-overview) .ap-title,
.tab:not(#tab-overview) h2 { letter-spacing:-.01em !important; font-weight:650 !important; }
.tab:not(#tab-overview) .card-title i,
.tab:not(#tab-overview) h2 i { color: #5fae9c !important; }
/* flat cards everywhere */
.tab:not(#tab-overview) .card,
.tab:not(#tab-overview) .stat-card,
.tab:not(#tab-overview) .hub-card,
.tab:not(#tab-overview) .ap-banner,
.tab:not(#tab-overview) .stage-card,
.tab:not(#tab-overview) .audit-stat-card,
.tab:not(#tab-overview) .settings-card,
.tab:not(#tab-overview) .worker-card,
.tab:not(#tab-overview) .proxy-card {
  background: linear-gradient(180deg, rgba(18,22,21,.94), rgba(11,14,13,.96)) !important;
  border-color: rgba(255,255,255,.075) !important;
  box-shadow: none !important;
}
/* Style A finish: all buttons/filters/tables are quiet; only primary actions stay emerald. */
.tab:not(#tab-overview) button:not(.login-btn),
.tab:not(#tab-overview) .btn,
.tab:not(#tab-overview) .acc-smart-pill,
.tab:not(#tab-overview) .acc-action-btn {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  color: #94a29b !important;
  box-shadow: none !important;
}
.tab:not(#tab-overview) .btn-green,
.tab:not(#tab-overview) .btn-blue,
.tab:not(#tab-overview) .btn-primary,
.tab:not(#tab-overview) button.active,
.tab:not(#tab-overview) .acc-smart-pill.active,
.tab:not(#tab-overview) .sched-mode-btn.active {
  background: rgba(47,164,124,.15) !important;
  border-color: rgba(47,164,124,.40) !important;
  color: #a8dcc7 !important;
}
.tab:not(#tab-overview) .btn-red {
  background: rgba(224,108,95,.09) !important;
  border-color: rgba(224,108,95,.28) !important;
  color: #d89488 !important;
}
.tab:not(#tab-overview) .btn:hover,
.tab:not(#tab-overview) button:not(.login-btn):hover { background: rgba(255,255,255,.065) !important; border-color: rgba(255,255,255,.14) !important; }
/* colored top borders on old pipeline stages */
.tab:not(#tab-overview) .stage {
  border-top: 1px solid rgba(255,255,255,.075) !important;
  background: linear-gradient(180deg, rgba(18,22,21,.94), rgba(11,14,13,.96)) !important;
}
.tab:not(#tab-overview) .stage .badge,
.tab:not(#tab-overview) .stage [class*="status"] {
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #94a29b !important;
}
/* account chips/avatars: keep semantics via dot, not via candy backgrounds */
.tab:not(#tab-overview) .acc-status-pill,
.tab:not(#tab-overview) .acc-role-pill,
.tab:not(#tab-overview) .acc-tag {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: #94a29b !important;
  box-shadow: none !important;
}
.tab:not(#tab-overview) .acc-avatar {
  background: rgba(47,164,124,.12) !important;
  color: #a8dcc7 !important;
  box-shadow: none !important;
}
/* progress bars: emerald only */
.tab:not(#tab-overview) .progress-bar > div,
.tab:not(#tab-overview) .progress > div { background: #2fa47c !important; }
/* ===== Style A: targeted legacy screens (Cleaner / Warmer / Proxies / Schedule / Promo) ===== */
#tab-cleaner .ap-hero {
  background: linear-gradient(180deg, rgba(18,22,21,.94), rgba(11,14,13,.96)) !important;
  border-color: rgba(255,255,255,.075) !important;
}
#cleaner-preset-card-wipe, #cleaner-preset-card-soft {
  background: rgba(255,255,255,.025) !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  box-shadow: none !important;
}
#cleaner-preset-card-wipe *, #cleaner-preset-card-soft * { color: #94a29b !important; }
#tab-cleaner .cl-opt { background: rgba(255,255,255,.025) !important; border-color: rgba(255,255,255,.075) !important; }
#tab-warmer .ap-banner {
  background: linear-gradient(180deg, rgba(18,22,21,.94), rgba(11,14,13,.96)) !important;
  border-color: rgba(255,255,255,.075) !important;
}
#wm-btn-toggle, #wm-btn-run-now, #wm-btn-mesh-contacts, #wm-btn-sync-contacts {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  color: #94a29b !important;
  box-shadow: none !important;
}
#tab-warmer .preset-btn {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(255,255,255,.085) !important;
  color: #94a29b !important;
}
#tab-warmer .check-item {
  background: rgba(255,255,255,.025) !important;
  border-color: rgba(255,255,255,.07) !important;
}
#tab-proxies .btn-blue { background: rgba(47,164,124,.15) !important; border-color: rgba(47,164,124,.40) !important; color: #a8dcc7 !important; }
#tab-proxies .btn-outline { background: rgba(255,255,255,.035) !important; }
/* remove every remaining white→purple accent bar */
#tab-schedule .stat-card::before,
#tab-overview .stat-card::before,
.tab .stat-card::before {
  content: none !important;
  display: none !important;
  background: none !important;
}
.tab .stage { border-top-color: rgba(255,255,255,.075) !important; }
.tab .worker-card { border-top: 1px solid rgba(255,255,255,.075) !important; background: linear-gradient(180deg, rgba(18,22,21,.94), rgba(11,14,13,.96)) !important; }
/* Hide visual scrollbars everywhere; wheel/touch scrolling still works. */
html, body, * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-corner { background: transparent !important; border: 0 !important; }
/* Style A: no absolutely-positioned tags over stat labels; readable values. */
.tab:not(#tab-overview) .stat-card {
  padding: 14px 15px 12px !important;
  min-height: 96px !important;
}
.tab:not(#tab-overview) .stat-card .stat-label {
  font-size: 12px !important;
  line-height: 1.3 !important;
  padding-right: 0 !important;
  margin-bottom: 6px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  align-items: flex-start !important;
  min-height: 30px;
}
.tab:not(#tab-overview) .stat-card .stat-tag { display: none !important; }
.tab:not(#tab-overview) .stat-card .stat-val {
  font-size: 16px !important;
  line-height: 1.3 !important;
  letter-spacing: -.01em !important;
  overflow-wrap: anywhere !important;
}
/* even distribution of KPI cards; 6-in-a-row was squeezing labels/values */
.tab:not(#tab-overview) .grid4 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 12px !important;
}
.tab:not(#tab-overview) .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 12px !important;
}

/* final Style A type scale for legacy tabs */
.tab:not(#tab-overview) .card-title { font-size: 13px !important; letter-spacing: 0 !important; }
.tab:not(#tab-overview) .ap-title { font-size: 18px !important; }
