/* ============================================================================
   OutreachSphere — premium dark UI
   ========================================================================== */
:root {
  --bg: #07080f;
  --bg-2: #0e1020;
  --panel: rgba(22, 26, 48, 0.72);
  --panel-solid: #141830;
  --panel-2: rgba(30, 35, 64, 0.8);
  --border: rgba(120, 130, 200, 0.16);
  --border-soft: rgba(120, 130, 200, 0.1);
  --border-strong: rgba(140, 150, 220, 0.28);
  --text: #eef0ff;
  --muted: #9aa2cf;
  --muted-2: #6a72a6;
  --accent: #7b6cff;
  --accent-2: #a78bff;
  --accent-3: #5ad1ff;
  --accent-soft: rgba(123, 108, 255, 0.16);
  --accent-glow: rgba(123, 108, 255, 0.45);
  --green: #34e1ae;
  --amber: #ffcb5c;
  --red: #ff6f86;
  --blue: #5ad1ff;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 10px 26px -16px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 12px 40px -12px var(--accent-glow);
  --ring: 0 0 0 3px rgba(123, 108, 255, 0.28);
  --grad: linear-gradient(135deg, #7b6cff 0%, #a78bff 55%, #5ad1ff 130%);
  --grad-soft: linear-gradient(135deg, rgba(123,108,255,0.18), rgba(90,209,255,0.06));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Aurora / ambient background */
body::before, body::after {
  content: '';
  position: fixed;
  z-index: -2;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  border-radius: 50%;
}
body::before {
  width: 720px; height: 720px;
  top: -260px; right: -180px;
  background: radial-gradient(circle, rgba(123,108,255,0.55), transparent 62%);
  animation: drift1 22s var(--ease) infinite alternate;
}
body::after {
  width: 640px; height: 640px;
  bottom: -280px; left: -160px;
  background: radial-gradient(circle, rgba(90,209,255,0.4), transparent 60%);
  animation: drift2 26s var(--ease) infinite alternate;
}
@keyframes drift1 { to { transform: translate(-70px, 80px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(80px, -60px) scale(1.1); } }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; fill: currentColor; }
::selection { background: rgba(123, 108, 255, 0.4); color: #fff; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(123,108,255,0.4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(123,108,255,0.28); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(123,108,255,0.5); background-clip: content-box; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

#app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

/* ─── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  background: linear-gradient(185deg, rgba(20, 24, 46, 0.85), rgba(9, 11, 22, 0.9));
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border-soft);
  padding: 24px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 13px; padding: 4px 8px 26px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 800; font-size: 23px; color: #fff;
  box-shadow: 0 10px 30px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.35);
  position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent 50%);
}
.brand-logo { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; background: #fff; box-shadow: 0 10px 26px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.4); flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.5px; background: linear-gradient(120deg, #fff, #c9c6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-sub { font-size: 10.5px; color: var(--muted-2); letter-spacing: 1.8px; text-transform: uppercase; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.nav-item:hover { background: rgba(123,108,255,0.08); color: var(--text); transform: translateX(2px); }
.nav-item.active {
  background: var(--grad-soft); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(123,108,255,0.3);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--grad);
  box-shadow: 0 0 14px 1px var(--accent-glow);
}
.nav-item.active svg { color: var(--accent-2); }
.nav-item svg { width: 19px; height: 19px; flex: none; transition: transform 0.2s var(--ease); }
.nav-item:hover svg { transform: scale(1.08); }

.sidebar-foot { margin-top: auto; padding: 14px 8px 0; }
.live-badge {
  font-size: 11.5px; font-weight: 600; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04); color: var(--muted); display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-soft); width: 100%;
}
.live-badge.on { color: var(--green); border-color: rgba(52,225,174,0.25); background: rgba(52,225,174,0.07); }
.live-badge.off { color: var(--amber); border-color: rgba(255,203,92,0.22); background: rgba(255,203,92,0.06); }
.sidebar-note { font-size: 11px; color: var(--muted-2); margin-top: 10px; padding-left: 4px; }
.logout-btn { margin-top: 12px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: transparent; border: 1px solid var(--border-soft); color: var(--muted); font-size: 12.5px; font-weight: 600; transition: all 0.18s var(--ease); }
.logout-btn:hover { color: var(--red); border-color: rgba(255,111,134,0.35); background: rgba(255,111,134,0.07); }
.logout-btn svg { width: 16px; height: 16px; }

/* Login screen */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; width: 100%; }
.login-card { background: var(--panel); backdrop-filter: blur(20px); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 38px 34px; width: 100%; max-width: 380px; text-align: center; box-shadow: var(--shadow); animation: pop 0.24s var(--ease); }
.login-card input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: var(--text); padding: 13px 15px; border-radius: 12px; font-size: 15px; font-family: inherit; transition: border 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.login-card form { display: flex; flex-direction: column; gap: 11px; }
.login-err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }
/* Login / Sign-up tabs */
.auth-tabs { display: flex; gap: 6px; background: rgba(0,0,0,0.28); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 9px 10px; border: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; font-family: inherit; border-radius: 9px; cursor: pointer; transition: all 0.18s var(--ease); }
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--accent); color: #fff; box-shadow: var(--ring); }
.auth-switch { margin-top: 14px; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--accent-2, var(--accent)); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════
   Premium animated login (pure CSS — no images)
   ════════════════════════════════════════════════════════════════════ */
.auth-scene {
  position: fixed; inset: 0; overflow: hidden;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1100px 760px at 18% 12%, #1c1750 0%, transparent 60%),
    radial-gradient(1000px 720px at 86% 88%, #2a1a52 0%, transparent 55%),
    linear-gradient(160deg, #08081c 0%, #0d0a26 50%, #08081c 100%);
}

/* Drifting aurora blobs */
.aurora { position: absolute; inset: -25%; z-index: 0; filter: blur(72px); }
.aurora .blob { position: absolute; border-radius: 50%; opacity: 0.55; mix-blend-mode: screen; will-change: transform; }
.blob.b1 { width: 46vw; height: 46vw; left: -6%; top: -10%; background: radial-gradient(circle at 30% 30%, #6d5efc, transparent 70%); animation: drift1 22s ease-in-out infinite; }
.blob.b2 { width: 40vw; height: 40vw; right: -8%; top: 4%;  background: radial-gradient(circle at 30% 30%, #ec4899, transparent 70%); animation: drift2 27s ease-in-out infinite; }
.blob.b3 { width: 52vw; height: 52vw; left: 6%; bottom: -22%; background: radial-gradient(circle at 30% 30%, #22d3ee, transparent 70%); animation: drift3 31s ease-in-out infinite; }
.blob.b4 { width: 36vw; height: 36vw; right: 2%; bottom: -12%; background: radial-gradient(circle at 30% 30%, #3b82f6, transparent 70%); animation: drift1 29s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6%, 8%) scale(1.16); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-7%, 5%) scale(1.22); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(5%, -7%) scale(0.9); } }

/* Floating glass orbs + sparkles */
.orbs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 8px 30px rgba(0,0,0,0.25); animation: floatY 12s ease-in-out infinite; }
.orb.o1 { width: 72px; height: 72px; left: 13%; top: 24%; animation-duration: 11s; }
.orb.o2 { width: 38px; height: 38px; left: 23%; bottom: 18%; animation-duration: 9s; animation-delay: 1s; }
.orb.o3 { width: 100px; height: 100px; right: 11%; top: 15%; animation-duration: 15s; animation-delay: .5s; }
.orb.o4 { width: 26px; height: 26px; right: 19%; bottom: 22%; animation-duration: 8s; animation-delay: 2s; }
.orb.o5 { width: 14px; height: 14px; left: 46%; top: 12%; background: #fff; box-shadow: 0 0 16px 3px rgba(168,150,255,0.7); animation-duration: 7s; }
.orb.o6 { width: 11px; height: 11px; right: 36%; bottom: 13%; background: #fff; box-shadow: 0 0 14px 3px rgba(120,200,255,0.7); animation-duration: 9s; animation-delay: 1.5s; }
@keyframes floatY { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-26px) translateX(10px); } }

/* The glass card */
.auth-card {
  position: relative; z-index: 5;
  width: 100%; max-width: 394px; padding: 40px 34px 34px; text-align: center; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,0.11), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.14); border-radius: 24px;
  backdrop-filter: blur(26px) saturate(150%); -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.18);
  animation: cardIn 0.6s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
/* animated gradient halo border */
.auth-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: 25px; padding: 1px; z-index: -1;
  background: linear-gradient(135deg, rgba(168,150,255,.75), rgba(120,200,255,.25), rgba(236,72,153,.65));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: .6; animation: borderHue 9s linear infinite;
}
@keyframes borderHue { to { filter: hue-rotate(360deg); } }

/* Brand badge with pulsing ring */
.auth-badge { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #7c6bff, #5b8cff); box-shadow: 0 12px 30px rgba(108,94,255,.5); position: relative; }
.auth-badge::after { content: ''; position: absolute; inset: -6px; border-radius: 22px; border: 2px solid rgba(140,160,255,.4); animation: pulseRing 2.6s ease-out infinite; }
.auth-badge-img { display: block; width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 18px; object-fit: cover; background: #fff; box-shadow: 0 14px 34px rgba(91,140,255,.45); animation: badgeGlow 3s ease-in-out infinite; }
@keyframes badgeGlow { 0%,100% { box-shadow: 0 14px 34px rgba(91,140,255,.38); } 50% { box-shadow: 0 16px 46px rgba(91,140,255,.7); } }
@keyframes pulseRing { 0% { transform: scale(.95); opacity: .85; } 100% { transform: scale(1.28); opacity: 0; } }

.auth-title { font-size: 25px; font-weight: 800; letter-spacing: -.5px; margin: 0; background: linear-gradient(90deg,#ffffff,#c9d3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card .muted { color: rgba(255,255,255,.68); }

.auth-card form { display: flex; flex-direction: column; gap: 11px; }
.auth-card input { width: 100%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: #fff; padding: 14px 16px; border-radius: 14px; font-size: 15px; font-family: inherit; transition: all .2s ease; }
.auth-card input::placeholder { color: rgba(255,255,255,.42); }
.auth-card input:focus { outline: none; border-color: rgba(140,150,255,.85); background: rgba(255,255,255,.1); box-shadow: 0 0 0 4px rgba(108,94,255,.22); }

.auth-card .btn.primary { width: 100%; justify-content: center; margin-top: 6px; padding: 14px; border: none; border-radius: 14px; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(135deg, #7c6bff, #5b8cff); box-shadow: 0 12px 30px rgba(108,94,255,.45); position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.auth-card .btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(108,94,255,.62); filter: brightness(1.05); }
.auth-card .btn.primary:active { transform: translateY(0); }
.auth-card .btn.primary:disabled { filter: grayscale(.3) brightness(.9); transform: none; cursor: default; }
.auth-card .btn.primary::after { content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: shimmer 3.6s ease-in-out infinite; }
@keyframes shimmer { 0%, 55% { left: -130%; } 100% { left: 140%; } }

.auth-card .login-err { color: #ffb4b4; font-size: 13px; margin-top: 12px; min-height: 18px; }
.auth-card .auth-switch { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.6); }
.auth-card .auth-switch a { color: #b9c4ff; font-weight: 700; text-decoration: none; }
.auth-card .auth-switch a:hover { text-decoration: underline; }

/* OTP code entry */
.otp-input { text-align: center; letter-spacing: 12px; font-size: 22px; font-weight: 800; }
.otp-dev { background: rgba(124,107,255,.16); border: 1px dashed rgba(168,150,255,.55); color: #dfe3ff; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.otp-dev b { letter-spacing: 3px; color: #fff; }

@media (max-width: 480px) { .orb { display: none; } .auth-card { padding: 32px 24px; } }
@media (prefers-reduced-motion: reduce) {
  .blob, .orb, .auth-badge::after, .auth-badge-img, .auth-card, .auth-card::before, .auth-card .btn.primary::after { animation: none !important; }
}

/* Sidebar account chip */
.user-chip { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 10px; background: var(--panel-2, rgba(255,255,255,0.04)); border: 1px solid var(--border); border-radius: 12px; }
.uc-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent))); flex: 0 0 auto; }
.uc-meta { min-width: 0; }
.uc-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-role { font-size: 11px; color: var(--muted); }

/* Admin panel */
.cfg-status { padding: 10px 13px; border-radius: 10px; font-size: 13.5px; margin: 4px 0 14px; }
.cfg-status.ok { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.35); color: var(--green); }
.cfg-status.warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35); color: var(--amber); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label, .form-col label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form-grid input, .form-col input, .form-col select { background: rgba(0,0,0,0.25); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: 10px; font-size: 14px; font-family: inherit; }
.form-grid input:focus, .form-col input:focus, .form-col select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.form-col { display: flex; flex-direction: column; gap: 14px; }
.cfg-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mini-link.danger { color: var(--red); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ─── Main ────────────────────────────────────────────────────────────── */
.main { padding: 0 34px 64px; overflow-x: hidden; min-width: 0; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 26px 0 22px; margin-bottom: 24px;
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, var(--bg) 55%, rgba(7,8,15,0));
  backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; background: linear-gradient(120deg, #fff, #cfd0ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  border: 1px solid var(--border); background: rgba(255,255,255,0.035);
  color: var(--text); padding: 10px 17px; border-radius: 11px;
  font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.18s var(--ease); backdrop-filter: blur(6px);
}
.btn:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.07); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 10px 26px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative; overflow: hidden;
}
.btn.primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.6s var(--ease);
}
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 16px 34px -10px var(--accent-glow); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: rgba(255,111,134,0.3); background: rgba(255,111,134,0.06); }
.btn.danger:hover { background: rgba(255,111,134,0.14); border-color: var(--red); }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; filter: none; }
.btn.sched-on { color: var(--green); border-color: rgba(52,225,174,0.4); background: rgba(52,225,174,0.1); }
.btn.sched-on:hover { background: rgba(52,225,174,0.16); border-color: var(--green); }
a.icon-btn { text-decoration: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 4px 2px; font-size: 13px; }
.barlist { display: flex; flex-direction: column; gap: 11px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 12px; }
.bar-label { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 6px; box-shadow: 0 0 10px -2px currentColor; transition: width 0.6s var(--ease); }
.bar-val { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bar-row.clickable { cursor: pointer; border-radius: 8px; padding: 4px 6px; margin: -4px -6px; transition: background 0.15s var(--ease); }
.bar-row.clickable:hover { background: rgba(123,108,255,0.1); }
.bar-row.clickable:hover .bar-label { color: var(--accent-2); }

/* Guide page */
.guide-steps { display: grid; gap: 12px; }
.guide-step { display: flex; gap: 14px; align-items: flex-start; background: rgba(0,0,0,0.18); border: 1px solid var(--border-soft); border-radius: 13px; padding: 15px 16px; transition: border-color 0.18s var(--ease); }
.guide-step:hover { border-color: var(--border-strong); }
.guide-num { width: 36px; height: 36px; flex: none; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
.guide-step-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.guide-step-msg { font-size: 13px; color: var(--muted); line-height: 1.6; }
.guide-step-msg b { color: var(--text); font-weight: 600; }
.guide-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.guide-list li { font-size: 13.5px; color: var(--muted); line-height: 1.6; padding-left: 20px; position: relative; }
.guide-list li::before { content: '▸'; position: absolute; left: 2px; color: var(--accent-2); }
.guide-list li b { color: var(--text); }

/* ─── Cards & grid ────────────────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1180px) { .cards-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 920px) { .cards-4, .cards-3, .cards-2 { grid-template-columns: 1fr; } #app { grid-template-columns: 1fr; } .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; } .nav { flex-direction: row; flex-wrap: wrap; } .nav-item.active::before { display: none; } }

.card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 18%);
}
.card-title { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }

/* Stat tiles */
.stat { overflow: hidden; }
.stat:hover { transform: translateY(-3px); border-color: var(--border); box-shadow: var(--shadow); }
.stat::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: 0; transition: opacity 0.25s var(--ease);
}
.stat:hover::after { opacity: 1; }
.stat .stat-ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--accent-2); margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px rgba(123,108,255,0.2);
}
.stat .stat-ico svg { width: 22px; height: 22px; }
.stat-value { font-size: 32px; font-weight: 800; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; font-weight: 500; }
.stat-foot { font-size: 12px; color: var(--muted-2); margin-top: 12px; }
.stat-foot b { color: var(--green); }

/* Progress */
.progress-wrap { margin-top: 6px; }
.progress-bar { height: 12px; background: rgba(0,0,0,0.35); border-radius: 20px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.5), inset 0 0 0 1px var(--border-soft); }
.progress-fill { height: 100%; background: var(--grad); border-radius: 20px; transition: width 0.8s var(--ease); box-shadow: 0 0 16px -2px var(--accent-glow); position: relative; }
.progress-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25)); border-radius: 20px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 9px; }

/* ─── Tables ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-soft); background: rgba(16,18,34,0.55); backdrop-filter: blur(12px); }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--muted-2); font-weight: 700; padding: 14px 18px;
  background: rgba(255,255,255,0.025); border-bottom: 1px solid var(--border-soft); white-space: nowrap;
  position: sticky; top: 0; backdrop-filter: blur(8px);
}
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr { transition: background 0.15s var(--ease); position: relative; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(123,108,255,0.06); }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cell-strong { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--muted-2); }

/* Chips & badges */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--border-soft); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(123,108,255,0.25); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { font-size: 10.5px; font-weight: 700; padding: 4px 11px; border-radius: 20px; text-transform: capitalize; letter-spacing: 0.2px; display: inline-block; }
.badge.sent, .badge.simulated, .badge.active { background: rgba(52,225,174,0.14); color: var(--green); box-shadow: inset 0 0 0 1px rgba(52,225,174,0.25); }
.badge.failed { background: rgba(255,111,134,0.14); color: var(--red); box-shadow: inset 0 0 0 1px rgba(255,111,134,0.25); }
.badge.paused { background: rgba(255,203,92,0.14); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255,203,92,0.22); }
.badge.completed { background: rgba(120,130,200,0.16); color: var(--muted); box-shadow: inset 0 0 0 1px rgba(120,130,200,0.25); }
.badge.bounced { background: rgba(255,111,134,0.14); color: var(--red); box-shadow: inset 0 0 0 1px rgba(255,111,134,0.25); }

/* Avatar */
.avatar { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #3b3f78, #272c52); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #d4d6ff; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); }
.cell-flex { display: flex; align-items: center; gap: 12px; }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(0,0,0,0.28); border: 1px solid var(--border); color: var(--text);
  padding: 11px 14px; border-radius: 11px; font-size: 14px; font-family: inherit; transition: border 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: rgba(0,0,0,0.38); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.5; }
.checkgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 210px; overflow-y: auto; padding: 4px; }
.checkitem { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text); padding: 9px 11px; background: rgba(0,0,0,0.22); border: 1px solid var(--border-soft); border-radius: 10px; cursor: pointer; transition: all 0.15s var(--ease); }
.checkitem:hover { border-color: var(--border-strong); background: rgba(123,108,255,0.06); }
.checkitem input { width: auto; accent-color: var(--accent); }
.checkitem.checked { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.file-input { display: flex; align-items: center; gap: 10px; }
.file-input label.file-btn { background: rgba(123,108,255,0.07); border: 1px dashed var(--border-strong); padding: 11px 15px; border-radius: 11px; font-size: 13px; color: var(--muted); cursor: pointer; transition: all 0.18s var(--ease); }
.file-input label.file-btn:hover { border-color: var(--accent); color: var(--text); background: rgba(123,108,255,0.12); }
.file-name { font-size: 12px; color: var(--muted-2); }

/* Toolbar / filters */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar input, .toolbar select { background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: 10px 13px; border-radius: 11px; font-size: 13px; font-family: inherit; transition: border 0.18s var(--ease), box-shadow 0.18s var(--ease); backdrop-filter: blur(8px); }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.toolbar .grow { flex: 1; min-width: 180px; }
.spacer { flex: 1; }

/* Empty / loading */
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty .empty-ico { font-size: 46px; margin-bottom: 14px; opacity: 0.7; filter: drop-shadow(0 8px 20px var(--accent-glow)); }
.empty h3 { font-weight: 700; color: var(--text); margin-bottom: 7px; font-size: 16px; }
.skeleton {
  color: var(--muted-2); padding: 44px; text-align: center; border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(255,255,255,0.02) 30%, rgba(123,108,255,0.08) 50%, rgba(255,255,255,0.02) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Modal */
.modal-host { position: fixed; inset: 0; background: rgba(4, 5, 12, 0.66); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 100; padding: 24px; animation: fade 0.2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-host.hidden { display: none; }
.modal {
  background: linear-gradient(180deg, rgba(26,30,54,0.96), rgba(18,21,40,0.97));
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: pop 0.24s var(--ease);
}
.modal.wide { max-width: 860px; }
@keyframes pop { from { transform: scale(0.95) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: rgba(22,25,46,0.85); backdrop-filter: blur(12px); z-index: 1; }
.modal-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; }
.modal-head .x { background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft); width: 34px; height: 34px; border-radius: 10px; color: var(--muted); font-size: 19px; display: grid; place-items: center; transition: all 0.18s var(--ease); }
.modal-head .x:hover { color: var(--text); border-color: var(--accent); background: rgba(123,108,255,0.12); transform: rotate(90deg); }
.modal-body { padding: 24px 26px; }
.modal-foot { padding: 18px 26px; border-top: 1px solid var(--border-soft); display: flex; justify-content: flex-end; gap: 11px; position: sticky; bottom: 0; background: rgba(22,25,46,0.85); backdrop-filter: blur(12px); }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted-2); font-weight: 700; margin: 22px 0 13px; }

/* Toasts */
.toasts { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 11px; z-index: 200; }
.toast { background: linear-gradient(135deg, rgba(34,38,66,0.95), rgba(24,27,50,0.95)); backdrop-filter: blur(14px); border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 14px 19px; border-radius: 13px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); min-width: 250px; animation: slidein 0.28s var(--ease); }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Misc */
.row-actions { display: flex; gap: 7px; justify-content: flex-end; }
.icon-btn { background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft); width: 34px; height: 34px; border-radius: 10px; color: var(--muted); display: grid; place-items: center; transition: all 0.18s var(--ease); }
.icon-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(123,108,255,0.12); transform: translateY(-1px); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); background: rgba(255,111,134,0.12); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; }
.kpi-mini { display: flex; gap: 22px; flex-wrap: wrap; }
.kpi-mini div span { display: block; }
.kpi-mini .k { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.kpi-mini .l { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }
canvas { max-width: 100%; }
.chart-box { position: relative; height: 240px; }
.chart-box.sm { height: 200px; }
.pill-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill-legend span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hidden { display: none !important; }
.summary-box { background: rgba(0,0,0,0.25); border: 1px solid var(--border-soft); border-radius: 13px; padding: 15px 17px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.preview { background: rgba(4,6,16,0.6); border: 1px solid var(--border-soft); border-radius: 13px; padding: 18px; white-space: pre-wrap; line-height: 1.7; font-size: 13.5px; max-height: 320px; overflow-y: auto; }
.preview .subj { font-weight: 700; color: var(--text); border-bottom: 1px dashed var(--border); padding-bottom: 11px; margin-bottom: 13px; }

/* ─── Calculator & Schedule ───────────────────────────────────────────── */
.band-rail { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
@media (max-width: 900px) { .band-rail { grid-template-columns: repeat(2, 1fr); } }
.band-seg { background: rgba(0,0,0,0.22); border: 1px solid var(--border-soft); border-top: 3px solid var(--bc); border-radius: 14px; padding: 15px 12px; text-align: center; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease); }
.band-seg:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(0,0,0,0.75); border-color: var(--bc); }
.band-seg:active { transform: translateY(-1px); }
.band-seg-head { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.band-seg-target { font-size: 23px; font-weight: 800; color: var(--text); margin-top: 9px; font-variant-numeric: tabular-nums; }
.band-seg-target span { font-size: 11px; font-weight: 600; color: var(--muted-2); }
.band-seg-clients { font-size: 12px; color: var(--bc); font-weight: 700; margin-top: 9px; }
.inline-select { background: rgba(0,0,0,0.28); border: 1px solid var(--border); color: var(--text); padding: 7px 9px; border-radius: 9px; font-size: 12.5px; font-family: inherit; transition: border 0.15s var(--ease); }
.inline-select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.apps-cell { display: flex; align-items: center; gap: 8px; }
.inline-num { width: 78px; background: rgba(0,0,0,0.28); border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 700; font-family: inherit; font-variant-numeric: tabular-nums; transition: border 0.15s var(--ease); }
.inline-num:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.mini-link { background: transparent; border: 1px solid var(--border-soft); color: var(--muted); font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; transition: all 0.15s var(--ease); }
.mini-link:hover { color: var(--accent-2); border-color: var(--accent); background: rgba(123,108,255,0.1); }

/* Days → Applications calculator widget */
.calc-card { background: linear-gradient(135deg, rgba(123,108,255,0.14), rgba(90,209,255,0.05)); border-color: rgba(123,108,255,0.2); }
.calc-widget { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.calc-field { display: flex; flex-direction: column; gap: 8px; }
.calc-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.calc-field input { width: 160px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: var(--text); padding: 15px 18px; border-radius: 14px; font-size: 26px; font-weight: 800; font-family: inherit; font-variant-numeric: tabular-nums; transition: border 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.calc-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.calc-arrow { font-size: 30px; color: var(--accent-2); font-weight: 700; filter: drop-shadow(0 0 12px var(--accent-glow)); }
.calc-result { display: flex; flex-direction: column; gap: 6px; }
.calc-big { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(120deg, #fff, #c9c6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.calc-big small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; -webkit-text-fill-color: var(--muted); }
.calc-meta { font-size: 13px; color: var(--muted); }
.calc-ref { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.calc-chip { background: rgba(0,0,0,0.25); border: 1px solid var(--border-soft); color: var(--muted); padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; transition: all 0.15s var(--ease); }
.calc-chip b { color: var(--accent-2); }
.calc-chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); background: rgba(123,108,255,0.1); }
.calc-note { margin-top: 16px; font-size: 12.5px; line-height: 1.65; color: var(--muted); background: rgba(255,203,92,0.07); border: 1px solid rgba(255,203,92,0.2); border-radius: 12px; padding: 12px 15px; }

/* Engagement pipeline */
.pipeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1100px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }
.pipe-metric { background: rgba(0,0,0,0.22); border: 1px solid var(--border-soft); border-radius: 14px; padding: 15px 14px; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.pipe-metric:hover { transform: translateY(-3px); border-color: var(--pc); }
.pipe-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pipe-ico { font-size: 15px; }
.pipe-pct { font-size: 11px; font-weight: 700; color: var(--pc); }
.pipe-val { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.pipe-label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.pipe-bar { height: 5px; border-radius: 6px; background: rgba(255,255,255,0.06); margin-top: 11px; overflow: hidden; }
.pipe-bar span { display: block; height: 100%; border-radius: 6px; background: var(--pc); box-shadow: 0 0 10px -1px var(--pc); transition: width 0.7s var(--ease); }

.opened-btn { background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft); color: var(--muted-2); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 9px; white-space: nowrap; transition: all 0.15s var(--ease); }
.opened-btn:hover { border-color: var(--blue); color: var(--text); }
.opened-btn.on { color: var(--blue); border-color: rgba(90,209,255,0.35); background: rgba(90,209,255,0.1); }

/* entrance for view content */
.view > .grid, .view > .card, .view > .table-wrap, .view > .toolbar { animation: rise 0.4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
