/* ═══════════════════════════════════════════════════════
   WhatsApp Dispenser — Premium Design System
   ═══════════════════════════════════════════════════════ */

:root {
    /* WhatsApp-Inspired Palette */
    --wpp-green: #25D366;
    --wpp-green-dark: #128C7E;
    --wpp-teal: #075E54;
    --wpp-light-green: #DCF8C6;

    /* Dark Theme */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-card-hover: #1f2b3d;
    --bg-glass: rgba(26, 35, 50, 0.85);
    --bg-input: #0d1321;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Accents */
    --accent: #25D366;
    --accent-hover: #1ebe5d;
    --accent-glow: rgba(37, 211, 102, 0.15);
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Borders */
    --border-color: rgba(148, 163, 184, 0.1);
    --border-glass: rgba(255, 255, 255, 0.06);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .5);
    --shadow-glow: 0 0 20px rgba(37, 211, 102, 0.2);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ Light Theme ═══ */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --bg-input: #f1f5f9;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent: #128C7E;
    --accent-hover: #075E54;
    --accent-glow: rgba(18, 140, 126, 0.1);

    --border-color: rgba(0, 0, 0, 0.08);
    --border-glass: rgba(0, 0, 0, 0.06);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .1);
    --shadow-glow: 0 0 20px rgba(18, 140, 126, 0.15);
}

/* ═══ Reset & Base ═══ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ═══ Sidebar ═══ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: transparent;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.menu-item:hover {
    background: var(--accent-glow);
    color: var(--accent);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(18, 140, 126, 0.1));
    color: var(--accent);
    font-weight: 600;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    margin-left: auto;
    transition: var(--transition);
}

.status-dot.online {
    background: var(--wpp-green);
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.6);
}

.status-dot.offline {
    background: var(--danger);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--wpp-green-dark), var(--wpp-teal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ═══ Main Content ═══ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.top-bar {
    height: var(--topbar-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-toggle-sidebar {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-toggle-sidebar:hover {
    color: var(--accent);
}

.page-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.content-area {
    padding: 32px;
}

/* ═══ Cards ═══ */
.card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    overflow: hidden;
}

.card-glass:hover {
    background: var(--bg-card-hover);
    border-color: rgba(37, 211, 102, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ═══ Stat Cards ═══ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--wpp-green), var(--wpp-teal));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 211, 102, 0.2);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.stat-icon.green {
    background: rgba(37, 211, 102, 0.12);
    color: var(--wpp-green);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ Tables ═══ */
.table-glass {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-glass thead th {
    background: rgba(17, 24, 39, 0.8);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.table-glass tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.table-glass tbody tr {
    transition: var(--transition);
}

.table-glass tbody tr:hover {
    background: var(--accent-glow);
}

.table-glass tbody tr:last-child td {
    border-bottom: none;
}

/* ═══ Badges ═══ */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-draft {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.badge-running {
    background: rgba(37, 211, 102, 0.15);
    color: var(--wpp-green);
}

.badge-paused {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-completed {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-sent {
    background: rgba(37, 211, 102, 0.15);
    color: var(--wpp-green);
}

.badge-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-pending {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.badge-sending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* ═══ Contact Hover Tooltip ═══ */
.contact-hover {
    cursor: help;
    border-bottom: 1px dashed var(--text-muted);
    padding-bottom: 1px;
    transition: var(--transition);
    white-space: pre-line;
}

.contact-hover:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ═══ Buttons ═══ */
.btn-wpp {
    background: linear-gradient(135deg, var(--wpp-green), var(--wpp-green-dark));
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-wpp:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
    color: white;
}

.btn-wpp:active {
    transform: translateY(0);
}

.btn-outline-glass {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-glass:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn-outline-glass.active {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(18, 140, 126, 0.15));
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(37, 211, 102, 0.3);
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    background: transparent;
}

.btn-action.start {
    color: var(--wpp-green);
}

.btn-action.start:hover {
    background: rgba(37, 211, 102, 0.12);
}

.btn-action.pause {
    color: var(--warning);
}

.btn-action.pause:hover {
    background: rgba(245, 158, 11, 0.12);
}

.btn-action.cancel {
    color: var(--danger);
}

.btn-action.cancel:hover {
    background: rgba(239, 68, 68, 0.12);
}

.btn-action.delete {
    color: var(--danger);
}

.btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.12);
}

.btn-action.view {
    color: var(--info);
}

.btn-action.view:hover {
    background: rgba(59, 130, 246, 0.12);
}

/* ═══ Forms ═══ */
.form-glass {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.875rem;
    transition: var(--transition);
    width: 100%;
}

.form-glass:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-glass::placeholder {
    color: var(--text-muted);
}

textarea.form-glass {
    resize: vertical;
    min-height: 100px;
}

.form-label-glass {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ Modal Glass ═══ */
.glass-modal {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-primary);
}

.glass-modal .modal-header {
    padding: 20px 24px;
}

.glass-modal .modal-body {
    padding: 0 24px 20px;
}

.glass-modal .modal-footer {
    padding: 16px 24px;
}

.glass-modal .modal-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ═══ Progress Bar ═══ */
.progress-glass {
    height: 6px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-glass .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wpp-green), var(--wpp-teal));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ═══ Empty State ═══ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.empty-state-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ═══ Animations ═══ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.05s;
    opacity: 0;
}

.animate-delay-2 {
    animation-delay: 0.1s;
    opacity: 0;
}

.animate-delay-3 {
    animation-delay: 0.15s;
    opacity: 0;
}

.animate-delay-4 {
    animation-delay: 0.2s;
    opacity: 0;
}

/* ═══ Login/Register Page ═══ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.08), transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(7, 94, 84, 0.1), transparent 70%);
    bottom: -150px;
    left: -100px;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease;
}

.auth-logo {
    width: 72px;
    height: 72px;
    background: transparent;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-glow);
    animation: pulse-green 2s infinite;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.auth-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .btn-wpp {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.95rem;
    margin-top: 8px;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.alert-glass {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    padding: 12px 16px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* ═══ Section Header ═══ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══ Responsive — Tablet (≤992px) ═══ */
@media (max-width: 992px) {
    .content-area {
        padding: 24px 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-bar {
        padding: 0 20px;
    }

    /* Price cards stack on tablet */
    .price-card-row .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ═══ Responsive — Mobile (≤768px) ═══ */
@media (max-width: 768px) {

    /* ── Sidebar ── */
    .sidebar {
        transform: translateX(-100%);
        z-index: 2000;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

    /* Overlay backdrop when sidebar is open */
    .sidebar.open~.main-content::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        animation: fadeIn 0.2s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .main-content {
        margin-left: 0;
    }

    .btn-toggle-sidebar {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ── Top Bar ── */
    .top-bar {
        padding: 0 12px;
        height: 54px;
        gap: 10px;
    }

    .page-title {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Content Area ── */
    .content-area {
        padding: 16px 12px;
    }

    /* ── Stats Grid ── */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.68rem;
    }

    /* ── Detail Tiles ── */
    .detail-tiles {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* ── Tables ── */
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }

    .table-glass {
        min-width: 600px;
    }

    .table-glass thead th {
        padding: 10px 12px;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .table-glass tbody td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    /* ── Cards ── */
    .card-glass {
        border-radius: var(--radius);
    }

    .card-glass:hover {
        transform: none;
    }

    /* ── Section Header ── */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 0.9rem;
    }

    /* ── Buttons ── */
    .btn-wpp {
        font-size: 0.8rem;
        padding: 9px 16px;
    }

    .btn-outline-glass {
        font-size: 0.75rem;
        padding: 7px 12px;
    }

    .btn-action {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    /* ── Forms ── */
    .form-glass {
        font-size: 0.85rem;
        padding: 9px 12px;
    }

    textarea.form-glass {
        min-height: 80px;
    }

    /* ── Modals ── */
    .modal-dialog {
        margin: 8px;
    }

    .glass-modal .modal-header {
        padding: 16px;
    }

    .glass-modal .modal-body {
        padding: 0 16px 16px;
    }

    .glass-modal .modal-footer {
        padding: 12px 16px;
    }

    /* ── Auth Pages ── */
    .auth-card {
        margin: 12px;
        padding: 24px 20px;
    }

    .auth-title {
        font-size: 1.2rem;
    }

    .auth-subtitle {
        font-size: 0.8rem;
        margin-bottom: 24px;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
    }

    /* ── Pricing Page ── */
    .price-card {
        margin-bottom: 8px;
    }

    /* ── Empty State ── */
    .empty-state {
        padding: 40px 16px;
    }

    .empty-state-icon {
        font-size: 2rem;
    }

    /* ── Badge ── */
    .badge-status {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    /* ── Progress ── */
    .progress-glass {
        height: 5px;
    }

    /* ── Admin view specific ── */
    .admin-user-card .d-flex {
        flex-wrap: wrap;
    }

    /* ── QR Page ── */
    .qr-image {
        max-width: 220px;
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    /* ── Confirm / Alert modals ── */
    .confirm-modal-icon {
        width: 52px;
        height: 52px;
    }

    /* ── Support FAB ── */
    .support-fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    /* ── Toast ── */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast-glass {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
}

/* ═══ Responsive — Small Mobile (≤480px) ═══ */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
    }

    .stat-icon {
        margin-bottom: 0;
    }

    .stat-value {
        font-size: 1.15rem;
    }

    .content-area {
        padding: 12px 10px;
    }

    .top-bar {
        padding: 0 10px;
        height: 50px;
    }

    .page-title {
        font-size: 0.85rem;
    }

    .btn-theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .auth-card {
        margin: 8px;
        padding: 20px 16px;
    }

    /* ── Sidebar adjustments ── */
    .sidebar {
        width: 280px;
    }
}


/* ═══ Detail View Tiles ═══ */
.detail-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 18px;
}

.detail-tile-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.detail-tile-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ═══ Toast ═══ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-glass {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 8px;
    animation: fadeInUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-glass.success {
    border-left: 3px solid var(--wpp-green);
}

.toast-glass.error {
    border-left: 3px solid var(--danger);
}

.toast-glass.warning {
    border-left: 3px solid var(--warning);
}

/* ═══ WhatsApp QR Page ═══ */
.page-header {
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h2 i {
    color: var(--wpp-green);
}

.page-header p {
    margin: 0;
    font-size: 0.85rem;
}

.qr-placeholder {
    padding: 40px 20px;
}

.qr-image {
    max-width: 300px;
    width: 100%;
    border-radius: var(--radius);
    border: 3px solid var(--wpp-green);
    box-shadow: var(--shadow-glow);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--wpp-green), var(--wpp-teal));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-glow);
}

/* ═══ Custom Confirm Modal ═══ */
.confirm-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn-modal-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.btn-modal-cancel:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* ═══ Theme Toggle Button ═══ */
.btn-theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: rotate(15deg);
}

/* ═══ Light Theme Overrides ═══ */
[data-theme="light"] .table-glass thead th {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
}

[data-theme="light"] .btn-close-white {
    filter: none;
}

[data-theme="light"] .auth-page::before {
    background: radial-gradient(circle, rgba(18, 140, 126, 0.06), transparent 70%);
}

[data-theme="light"] .auth-page::after {
    background: radial-gradient(circle, rgba(37, 211, 102, 0.06), transparent 70%);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

[data-theme="light"] .badge-draft {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

[data-theme="light"] .badge-pending {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

/* ═══ WhatsApp Support FAB ═══ */
.support-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    text-decoration: none;
    z-index: 9000;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.support-fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
    color: white;
}

.support-fab:active {
    transform: scale(0.95);
}

.support-fab-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: support-pulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes support-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}