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

/* ══════════════════════════════════════════════════════════════
   NAPOLEON SENDER — design system (dark)
   Deep-navy workspace matching the logo · gold accents.
   Variable NAMES are kept so inline styles using var(--…) keep working.
   ══════════════════════════════════════════════════════════════ */
:root {
    --bg-primary: #060e1c;
    --bg-secondary: #0d1627;
    --bg-card: #0d1627;
    --bg-card-hover: #111c31;
    --bg-subtle: #091222;
    --border: #18233a;
    --border-strong: #24324b;
    --border-focus: rgba(227, 179, 65, 0.7);
    --accent: #c9952a;
    --accent-2: #e3b341;
    --accent-dark: #f2d27a;
    --accent-soft: rgba(227, 179, 65, 0.10);
    --accent-glow: rgba(227, 179, 65, 0.18);
    --navy: #020916;
    --navy-2: #081429;
    --green: #22c55e;
    --red: #f04438;
    --yellow: #f79009;
    --text-primary: #eef2f8;
    --text-secondary: #a3aec2;
    --text-muted: #6b778c;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    --transition: all .18s cubic-bezier(.4, 0, .2, 1);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background:
        radial-gradient(900px circle at 100% 0%, rgba(227, 179, 65, .05), transparent 45%),
        var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

input, textarea, select, button { font-family: var(--font); }

/* ── SIDEBAR (navy — the logo blends into its top) ─────────── */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 252px;
    background: linear-gradient(180deg, var(--navy) 0, var(--navy) 230px, var(--navy-2) 100%);
    border-right: 1px solid rgba(255, 255, 255, .05);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-img { width: 172px; height: auto; display: block; }

/* legacy logo helpers (kept for compatibility) */
.logo-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-text { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }
.logo-text span { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); }

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #a9b3c7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }

.nav-link.active {
    background: rgba(227, 179, 65, .12);
    border-color: rgba(227, 179, 65, .22);
    color: #f2d27a;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.nav-icon svg { width: 19px; height: 19px; }

.sidebar-footer {
    padding: 14px 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-footer .nav-link { color: var(--text-muted); }
.sidebar-footer .nav-link:hover { color: #fda4a4; background: rgba(240, 68, 56, .12); }

/* ── MAIN ──────────────────────────────────────────────────── */
.main {
    margin-left: 252px;
    min-height: 100vh;
    padding: 34px 40px 48px;
}

.page-header {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.page-header-text h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -.025em;
    margin-bottom: 4px;
}

.page-header-text p { font-size: 14px; color: var(--text-secondary); }

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover { border-color: var(--border-strong); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg { width: 18px; height: 18px; color: var(--accent-2); }

/* ── NOTICE BANNERS ────────────────────────────────────────── */
.notice {
    display: block;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 22px;
}

.notice-gold { background: rgba(227, 179, 65, .09); border-color: rgba(227, 179, 65, .28); color: #f2d27a; }
.notice-red  { background: rgba(240, 68, 56, .09); border-color: rgba(240, 68, 56, .3); color: #fda4a4; }

/* ── STAT CARDS ────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card::before { display: none; }

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 36px rgba(0, 0, 0, .35);
}

.stat-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 12px;
    padding-right: 52px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.05;
    letter-spacing: -.025em;
    word-break: break-word;
}

.stat-value.sm { font-size: 22px; }

.stat-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
    color: var(--text-secondary);
    font-size: 19px;
    opacity: 1;
}

.stat-icon svg { width: 20px; height: 20px; }

.stat-card.blue   .stat-icon { background: rgba(227, 179, 65, .13); color: #f2d27a; }
.stat-card.purple .stat-icon { background: rgba(139, 92, 246, .15); color: #c4b5fd; }
.stat-card.gray   .stat-icon { background: rgba(97, 114, 243, .15); color: #a5b4fc; }
.stat-card.green  .stat-icon { background: rgba(34, 197, 94, .14); color: #4ade80; }
.stat-card.red    .stat-icon { background: rgba(240, 68, 56, .14); color: #fb7185; }
.stat-card.yellow .stat-icon { background: rgba(247, 144, 9, .14); color: #fdb022; }
.stat-card.teal   .stat-icon { background: rgba(21, 183, 158, .14); color: #5eead4; }

.stat-progress { margin-top: 14px; }

.stat-progress-bar {
    height: 7px;
    background: rgba(255, 255, 255, .07);
    border-radius: 50px;
    overflow: hidden;
}

.stat-progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 50px;
    transition: width .4s ease;
}

.stat-card.green .stat-progress-bar div { background: linear-gradient(90deg, #16a34a, #4ade80); }
.stat-card.gray  .stat-progress-bar div { background: linear-gradient(90deg, #4f5bd5, #818cf8); }

.stat-progress-label, .stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ── CHARTS ────────────────────────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-box { position: relative; }

#noDataLabel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 12px;
    display: none;
}

canvas { max-height: 220px; }

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #cdd5e2;
    margin-bottom: 7px;
}

.required { color: var(--red); margin-left: 3px; }

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    background: #0b1528;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-control::placeholder { color: #56627a; }
.form-control[readonly] { background: #070f1e; color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }

select.form-control {
    cursor: pointer;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a3aec2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}

.btn svg { width: 17px; height: 17px; }

.btn-primary {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border-color: #b9861f;
    color: #1b1405;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(201, 149, 42, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-secondary {
    background: var(--bg-card-hover);
    color: #dbe2ee;
    border-color: var(--border-strong);
}

.btn-secondary:hover { background: #16233b; color: #fff; }

.btn-success {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border-color: #b9861f;
    color: #1b1405;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(201, 149, 42, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn-danger { background: var(--red); border-color: #d92d20; color: #fff; }
.btn-danger:hover { background: #d92d20; transform: translateY(-1px); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }

.btn[disabled], .btn.disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── ALERTS ────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    line-height: 1.55;
    border: 1px solid transparent;
}

.alert-warning { background: rgba(247, 144, 9, .1); border-color: rgba(247, 144, 9, .3); color: #fdb022; }
.alert-success { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .3); color: #86efac; display: block; }
.alert-danger  { background: rgba(240, 68, 56, .1); border-color: rgba(240, 68, 56, .3); color: #fda4a4; }

/* ── ACTIVATION TOAST (legacy) ─────────────────────────────── */
#activationModal {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(240, 68, 56, .35);
    border-left: 4px solid var(--red);
    color: #fda4a4;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    width: 320px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
}

#activationModal .title { font-weight: 700; margin-bottom: 4px; }
#activationModal .msg { opacity: .9; }
#activationModal .close { position: absolute; top: 8px; right: 10px; cursor: pointer; font-size: 16px; opacity: .6; }
#activationModal .close:hover { opacity: 1; }

/* ── BADGES ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge.active, .badge-success { background: rgba(34, 197, 94, .12); color: #4ade80; border-color: rgba(34, 197, 94, .3); }
.badge.inactive, .badge-danger { background: rgba(240, 68, 56, .12); color: #fb7185; border-color: rgba(240, 68, 56, .3); }
.badge.admin, .badge-info { background: rgba(227, 179, 65, .12); color: #f2d27a; border-color: rgba(227, 179, 65, .3); }
.badge-warning { background: rgba(247, 144, 9, .12); color: #fdb022; border-color: rgba(247, 144, 9, .3); }

/* ── TABLE ─────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--bg-card); }

thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

tbody tr { border-bottom: 1px solid #142036; transition: var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
tbody tr.user-inactive td { opacity: .6; }

tbody td {
    padding: 14px 16px;
    color: var(--text-secondary);
    vertical-align: middle;
    white-space: nowrap;
}

td.email { color: var(--text-primary); font-weight: 600; text-align: left; }
.table-empty { text-align: center; color: var(--text-muted); padding: 32px !important; }

/* ── SEARCH ────────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

.search-input {
    background: var(--bg-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b778c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 10px 14px 10px 38px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
    width: 280px;
}

.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.search-input::placeholder { color: #56627a; }

/* ── ADMIN MANAGE ──────────────────────────────────────────── */
.manage { position: relative; display: inline-block; }

.manage-btn {
    background: rgba(227, 179, 65, .12);
    color: #f2d27a;
    border: 1px solid rgba(227, 179, 65, .3);
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12.5px;
    transition: var(--transition);
}

.manage-btn:hover { background: rgba(227, 179, 65, .2); transform: translateY(-1px); }

.dropdown {
    display: none;
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 14px;
    min-width: 240px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.dropdown.show { display: block; }
.dropdown.up { transform: translateY(-100%); }
.dd-group { margin-bottom: 10px; }

.dd-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.dd-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.dd-btn.activate   { background: #16a34a; color: #fff; }
.dd-btn.deactivate { background: var(--red); color: #fff; }
.dd-btn.add        { background: #1c2a45; color: #fff; border-color: var(--border-strong); }
.dd-btn.set        { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1b1405; border-color: #b9861f; }
.dd-btn.reset      { background: rgba(247, 144, 9, .12); color: #fdb022; border-color: rgba(247, 144, 9, .3); }
.dd-btn.delete     { background: rgba(240, 68, 56, .12); color: #fb7185; border-color: rgba(240, 68, 56, .3); }
.dd-btn.full       { width: 100%; }

.small-input {
    width: 100%;
    background: var(--bg-subtle);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 13px;
    margin-bottom: 6px;
    outline: none;
}

.small-input:focus { border-color: var(--accent); }

#blurOverlay {
    position: fixed;
    top: 0;
    left: 252px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    z-index: 900;
    display: none;
}

/* ── AUTH (split screen: navy brand panel + form) ──────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
    background:
        radial-gradient(800px circle at 0% 0%, rgba(227, 179, 65, .08), transparent 50%),
        radial-gradient(700px circle at 100% 100%, rgba(80, 110, 200, .08), transparent 50%),
        var(--bg-primary);
}

.auth-card {
    width: 100%;
    max-width: 900px;
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    flex: 0 0 400px;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 32px;
    text-align: center;
    border-right: 1px solid rgba(227, 179, 65, .22);
}

.auth-logo-img { width: 300px; max-width: 100%; height: auto; display: block; }

.auth-tagline {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    color: #c8a95a;
}

.auth-body {
    flex: 1;
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.auth-head { margin-bottom: 26px; }
.auth-head h2 { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -.025em; margin-bottom: 6px; }
.auth-head p { font-size: 14px; color: var(--text-secondary); }

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.auth-footer a { color: #f2d27a; text-decoration: none; font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }

/* ── CAMPAIGN ALERTS ───────────────────────────────────────── */
#alertBox {
    display: none;
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid rgba(240, 68, 56, .35);
    border-left: 4px solid var(--red);
    color: #fda4a4;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    min-width: 340px;
    max-width: 520px;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
}

#alertBox .alert-row { display: flex; align-items: center; gap: 10px; }
#alertBox .title { font-weight: 700; color: #fb7185; }
#alertBox .msg { font-size: 12.5px; margin-top: 2px; color: var(--text-secondary); }
#alertBox .close { margin-left: auto; cursor: pointer; font-size: 16px; opacity: .6; }
#alertBox .close:hover { opacity: 1; }

#errorBox { color: var(--red); font-size: 13px; margin-top: 10px; display: none; }

#successBox {
    margin-top: 10px;
    display: none;
    padding: 14px 16px;
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .3);
    border-radius: var(--radius-sm);
    color: #86efac;
    font-size: 13.5px;
}

.success-title { font-weight: 700; margin-bottom: 4px; }

.toast {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid rgba(240, 68, 56, .35);
    border-left: 4px solid var(--red);
    color: #fda4a4;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    text-align: center;
}

.field-warning {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(240, 68, 56, .1);
    border: 1px solid rgba(240, 68, 56, .3);
    color: #fda4a4;
    font-size: 12.5px;
    font-weight: 600;
}

/* ── RECIPIENT COUNTER ─────────────────────────────────────── */
.recipient-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(227, 179, 65, .12);
    border: 1px solid rgba(227, 179, 65, .3);
    color: #f2d27a;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}

/* ── FILE DROP ─────────────────────────────────────────────── */
.file-drop {
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    padding: 26px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--bg-subtle);
    color: var(--text-muted);
}

.file-drop svg { width: 28px; height: 28px; color: var(--accent-2); margin-bottom: 8px; }
.file-drop:hover { border-color: var(--accent); background: rgba(227, 179, 65, .06); }

.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

/* ── DOTS ──────────────────────────────────────────────────── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-blue { background: var(--accent); }
.dot.pulse { animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* ── PAGINATION ────────────────────────────────────────────── */
#paginationWrap { text-align: center; margin-top: 20px; }

#paginationWrap a, #paginationWrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 7px 12px;
    margin: 0 2px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}

#paginationWrap .active-page {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #1b1405;
    font-weight: 700;
}

/* ── CAMPAIGN LAYOUT ───────────────────────────────────────── */
.campaign-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    align-items: start;
}

/* ── TOGGLE ────────────────────────────────────────────────── */
.toggle-switch { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }

.toggle-track {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--border-strong);
    border-radius: 50px;
    transition: background .25s ease;
}

.toggle-track.on { background: var(--accent); }

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.toggle-track.on .toggle-thumb { transform: translateX(18px); }

/* ── STATUS DOT BLINK ──────────────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(16, 185, 129, .8); }
    50% { opacity: .4; box-shadow: none; }
}

.dot-blink { animation: blink 1.5s ease-in-out infinite; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #22304a; border-radius: 6px; border: 2px solid var(--bg-primary); }
::-webkit-scrollbar-thumb:hover { background: #33445f; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1000px) {
    .campaign-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .auth-card { flex-direction: column; max-width: 460px; }
    .auth-logo { flex: 0 0 auto; padding: 22px; border-right: none; border-bottom: 1px solid rgba(227, 179, 65, .22); }
    .auth-logo-img { width: 170px; }
    .auth-body { padding: 32px 26px; }
}

@media (max-width: 768px) {
    .sidebar { width: 72px; }
    .sidebar-logo { padding: 12px 8px; }
    .sidebar-logo-img { width: 52px; }
    .sidebar-nav { padding: 16px 10px; }
    .nav-link { justify-content: center; padding: 11px; }
    .nav-link span:not(.nav-icon), .logo-text { display: none; }
    .nav-link.active::before { left: -10px; }
    .sidebar-footer { padding: 12px 10px; }
    .sidebar-footer > div { display: none; }
    .main { margin-left: 72px; padding: 22px 16px 36px; }
    .form-row, .charts-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    #blurOverlay { left: 72px; }
    .dropdown {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0;
        min-width: unset;
        padding: 28px 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}
