/* ============================================================
   AI Marketing Platform — Futuristic Dark Dashboard
   Deep Space · Glassmorphism · Neon Glow · Premium UI
   ============================================================ */

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

/* ===== CSS VARIABLES ===== */
:root {
    --bg-body:       #09011a;
    --bg-card:       rgba(255,255,255,0.028);
    --bg-card-hover: rgba(108,76,241,0.08);
    --bg-sidebar:    rgba(12,6,35,0.85);
    --bg-header:     rgba(9,1,26,0.8);
    --bg-input:      rgba(255,255,255,0.05);
    --bg-modal:      #0f0820;
    --bg-dropdown:   #130d2e;

    --primary:       #9333ea;
    --primary-light: #a855f7;
    --primary-dim:   rgba(147,51,234,0.15);
    --primary-glow:  rgba(147,51,234,0.4);

    --success:  #10b981;
    --warning:  #f59e0b;
    --danger:   #ef4444;
    --info:     #3b82f6;

    --text-main:   #f1f5f9;
    --text-muted:  rgba(241,245,249,0.55);
    --border:      rgba(255,255,255,0.08);
    --border-glow: rgba(147,51,234,0.35);

    --shadow-sm:    0 2px 12px rgba(0,0,0,0.35);
    --shadow-md:    0 8px 30px rgba(0,0,0,0.45);
    --shadow-lg:    0 16px 50px rgba(0,0,0,0.55);
    --shadow-neon:  0 0 20px rgba(147,51,234,0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    --sidebar-width: 260px;
    --header-height: 54px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse 70% 50% at 0% 0%,   rgba(108,76,241,0.12), transparent),
        radial-gradient(ellipse 60% 60% at 100% 100%, rgba(236,72,153,0.08), transparent);
    background-attachment: fixed;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: #d8b4fe; }

p { color: var(--text-muted); margin-bottom: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== LAYOUT ===== */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border);
    position: fixed; top: 0; left: 0;
    height: 100vh;
    overflow-y: auto; overflow-x: hidden;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    flex-shrink: 0;
}
.sidebar-brand-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #6C4CF1);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    box-shadow: 0 0 16px var(--primary-glow);
    flex-shrink: 0;
}
.sidebar-brand-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}

/* Nav */
.sidebar-nav { padding: 16px 12px; flex: 1; }

.nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.35);
    font-weight: 700;
    padding: 18px 10px 8px;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    white-space: nowrap;
}
.nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.nav-link span { color: inherit; }
.nav-link .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}
.nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.nav-link.active {
    background: linear-gradient(135deg, rgba(147,51,234,0.18), rgba(108,76,241,0.18));
    color: #c084fc;
    font-weight: 600;
    border: 1px solid rgba(147,51,234,0.25);
    box-shadow: inset 0 0 15px rgba(108,76,241,0.08);
}
.nav-link.active i { color: #c084fc; }

/* Sidebar footer */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}
.sidebar-footer .nav-link { color: #c084fc; }
.sidebar-footer .link-admin {
    background: rgba(147,51,234,0.08);
    border: 1px solid rgba(147,51,234,0.2);
}

/* ---- MAIN ---- */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- HEADER ---- */
.app-header {
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 150;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--primary-dim); color: #fff; border-color: var(--border-glow); }
.sidebar-toggle i { color: #ffffff; }

.mobile-brand { display: none; }

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.ai-assistant-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--primary), #6C4CF1);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--primary-glow);
    white-space: nowrap;
}
.ai-assistant-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--primary-glow);
    color: #fff !important;
}

.icon-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    border-radius: 9px;
    transition: var(--transition);
    text-decoration: none;
}
.icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--text-main); }

/* User Avatar */
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #6C4CF1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 0 14px var(--primary-glow);
}
.user-avatar:hover { transform: scale(1.05); }

/* Dropdown user info */
.dropdown-header-user {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.user-name { font-size: 0.875rem; font-weight: 700; color: var(--text-main); }
.user-email { font-size: 0.75rem; color: var(--text-muted); }

/* ---- CONTENT AREA ---- */
.app-content {
    flex: 1;
    padding: 28px;
}

/* ---- PAGE HEADER ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-header h1 i { font-size: 1.4rem; }
.page-header .breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: none;
    padding: 0;
    margin: 0;
}

/* ===== CARDS ===== */
.app-card, .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    overflow: hidden;
}
.app-card:hover, .card:hover {
    border-color: rgba(147,51,234,0.25);
    box-shadow: var(--shadow-neon);
}

.app-card-header, .card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.app-card-header h5, .card-header h5, .card-header h6 {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}
.app-card-title, .card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.app-card-body, .card-body {
    padding: 20px 22px;
    overflow-x: auto;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-neon);
}
.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-label {
    font-size: 0.775rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    white-space: nowrap;
}
.stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.primary { color: #a78bfa; background: rgba(167,139,250,0.15); box-shadow: 0 0 12px rgba(167,139,250,0.2); }
.stat-icon.success { color: #34d399; background: rgba(52,211,153,0.15); box-shadow: 0 0 12px rgba(52,211,153,0.2); }
.stat-icon.warning { color: #fbbf24; background: rgba(251,191,36,0.15); box-shadow: 0 0 12px rgba(251,191,36,0.2); }
.stat-icon.info    { color: #60a5fa; background: rgba(96,165,250,0.15); box-shadow: 0 0 12px rgba(96,165,250,0.2); }
.stat-trend { font-size: 0.8rem; font-weight: 600; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: #34d399; }
.stat-trend.down { color: #ef4444; }

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, rgba(147,51,234,0.15), rgba(108,76,241,0.15));
    border: 1px solid rgba(147,51,234,0.25);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.welcome-card::before {
    content: '';
    position: absolute; top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(147,51,234,0.3), transparent 70%);
    border-radius: 50%;
}
.welcome-content { position: relative; z-index: 1; }
.welcome-content h2 { font-size: 1.6rem; margin-bottom: 6px; color: #fff; }
.welcome-content p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

/* ===== BUTTONS ===== */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary), #6C4CF1);
    border: none;
    color: #fff !important;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
    color: #fff !important;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6C4CF1);
    border: none;
    color: #fff !important;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); color: #fff !important; }
.btn-outline-primary {
    background: rgba(147,51,234,0.08);
    border: 1px solid rgba(147,51,234,0.4);
    color: #c084fc !important;
}
.btn-outline-primary:hover { background: rgba(147,51,234,0.18); border-color: var(--primary); color: #fff !important; }
.btn-secondary, .btn-outline-secondary {
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    color: var(--text-muted) !important;
}
.btn-secondary:hover, .btn-outline-secondary:hover { background: rgba(255,255,255,0.12); color: var(--text-main) !important; }
.btn-success, .btn-outline-success {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.4);
    color: #34d399 !important;
}
.btn-success:hover, .btn-outline-success:hover { background: rgba(16,185,129,0.22); color: #fff !important; }
.btn-danger, .btn-outline-danger {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.4);
    color: #f87171 !important;
}
.btn-danger:hover, .btn-outline-danger:hover { background: rgba(239,68,68,0.2); color: #fff !important; }
.btn-warning, .btn-outline-warning {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.4);
    color: #fbbf24 !important;
}
.btn-warning:hover, .btn-outline-warning:hover { background: rgba(245,158,11,0.2); color: #fff !important; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 0.975rem; }

/* ===== FORMS ===== */
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-main); margin-bottom: 6px; display: block; }
.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text-main);
    width: 100%;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(147,51,234,0.15);
    outline: none;
    color: var(--text-main);
}
.form-control::placeholder { color: rgba(255,255,255,0.35); }
.form-select option { background: #1a0e3a; color: var(--text-main); }
.form-text { color: var(--text-muted); font-size: 0.8rem; margin-top: 5px; }
.form-check-input {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
.form-check-label { color: var(--text-main); font-size: 0.875rem; }

/* ===== TABLES ===== */
.table {
    color: var(--text-main);
    margin: 0;
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: rgba(255,255,255,0.015);
    --bs-table-hover-bg: rgba(255,255,255,0.03);
}
.table > :not(caption) > * > * {
    background-color: transparent !important;
    border-bottom-color: var(--border);
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--text-main);
}
.table > thead > * > * {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover > * { background-color: rgba(255,255,255,0.025) !important; }
.table td small, .table td .text-muted { color: var(--text-muted) !important; }
.table-responsive { border-radius: var(--radius-md); overflow: hidden; }

/* ===== BADGES ===== */
.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}
.bg-success, .badge.bg-success  { background: rgba(16,185,129,0.15) !important; color: #34d399 !important; border: 1px solid rgba(16,185,129,0.3); }
.bg-warning, .badge.bg-warning  { background: rgba(245,158,11,0.15) !important; color: #fbbf24 !important; border: 1px solid rgba(245,158,11,0.3); }
.bg-danger,  .badge.bg-danger   { background: rgba(239,68,68,0.15) !important;  color: #f87171 !important; border: 1px solid rgba(239,68,68,0.3); }
.bg-primary, .badge.bg-primary  { background: rgba(147,51,234,0.15) !important; color: #c084fc !important; border: 1px solid rgba(147,51,234,0.3); }
.bg-info,    .badge.bg-info     { background: rgba(59,130,246,0.15) !important;  color: #60a5fa !important; border: 1px solid rgba(59,130,246,0.3); }
.bg-secondary, .badge.bg-secondary { background: rgba(255,255,255,0.07) !important; color: var(--text-muted) !important; border: 1px solid var(--border); }

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--radius-md);
    padding: 14px 18px;
    border: 1px solid;
    font-size: 0.875rem;
    color: var(--text-main);
}
.alert-custom { display: flex; align-items: center; gap: 8px; }
.alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-danger  { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: #fde68a; }
.alert-info    { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93c5fd; }
.btn-close { filter: invert(1) opacity(0.6); }

/* ===== MODALS ===== */
.modal-content {
    background: var(--bg-modal);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    color: var(--text-main);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(147,51,234,0.15);
}
.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
}
.modal-title { color: var(--text-main); font-size: 1.05rem; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    gap: 8px;
}
.modal-backdrop.show { opacity: 0.7; background: rgba(5,0,15,1); }

/* ===== DROPDOWNS ===== */
.dropdown-menu {
    background: var(--bg-dropdown);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
}
.dropdown-item {
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: 0.875rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-item:hover { background: rgba(255,255,255,0.06); color: var(--text-main); }
.dropdown-item.text-danger { color: #f87171 !important; }
.dropdown-item.text-danger:hover { background: rgba(239,68,68,0.1); }
.dropdown-divider { border-color: var(--border); margin: 4px 0; }

/* ===== LIST GROUPS ===== */
.list-group { border-radius: var(--radius-lg); overflow: hidden; }
.list-group-item {
    background: rgba(255,255,255,0.02);
    border-color: var(--border);
    color: var(--text-main);
    padding: 14px 18px;
    transition: var(--transition);
    font-size: 0.875rem;
}
.list-group-item:hover { background: rgba(255,255,255,0.04); }
.list-group-item small, .list-group-item .text-muted { color: var(--text-muted) !important; }
.list-group-item p { color: var(--text-main); }

/* ===== TABS ===== */
.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 18px;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.875rem;
}
.nav-tabs .nav-link:hover { color: var(--text-main); background: transparent; }
.nav-tabs .nav-link.active {
    color: var(--primary-light);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary-light);
}
.nav-pills .nav-link {
    color: var(--text-muted);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
}
.nav-pills .nav-link.active {
    background: var(--primary-dim);
    color: #c084fc;
    border: 1px solid rgba(147,51,234,0.3);
}

/* ===== TOOLTIPS ===== */
.tooltip-inner { background: #1a0e3a; color: var(--text-main); border-radius: 8px; }
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { border-top-color: #1a0e3a; }

/* ===== TEXT UTILITIES ===== */
.text-primary   { color: #c084fc !important; }
.text-success   { color: #34d399 !important; }
.text-warning   { color: #fbbf24 !important; }
.text-danger    { color: #f87171 !important; }
.text-info      { color: #60a5fa !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-white     { color: #fff !important; }
.fw-600         { font-weight: 600; }
.text-gradient  {
    background: linear-gradient(135deg, #c084fc, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== ANIMATIONS ===== */
.animate-fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== INTEGRATION CARDS ===== */
.integration-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    height: 100%;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    overflow: hidden;
}
.integration-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-neon);
    background: var(--bg-card-hover);
}
.integration-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.integration-card > .flex-grow-1 {
    min-width: 0;
    flex: 1 1 auto;
}
.integration-card > .flex-grow-1 > .fw-600 { color: var(--text-main); font-size: 0.9rem; margin-bottom: 3px; }
.integration-card small { font-size: 0.78rem; }
/* Button groups wrap to a new line, full width, aligned right */
.integration-card > .d-flex.ms-auto {
    width: 100%;
    margin-left: 0;
    flex-direction: row !important;
    justify-content: flex-end;
    flex-wrap: wrap;
}
/* Standalone buttons (Connect) wrap to new line, aligned right */
.integration-card > .btn {
    margin-left: auto;
}

/* ===== AI STUDIO SPECIFIC ===== */
.ai-studio-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}
.ai-form-container {
    background: var(--bg-card);
    padding: 22px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}
.ai-result-container {
    background: rgba(255,255,255,0.012);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border);
    padding: 22px;
    display: flex;
    flex-direction: column;
}
.ai-result-area {
    flex: 1;
    background: rgba(255,255,255,0.018);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-top: 14px;
    color: var(--text-main);
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* ===== AUTH LAYOUT ===== */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #09011a, #1a0e3a);
}
.auth-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(147,51,234,0.1);
    backdrop-filter: blur(16px);
}
.auth-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}
.auth-brand i { color: var(--primary); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state-icon { font-size: 3rem; color: rgba(255,255,255,0.15); margin-bottom: 16px; }
.empty-state h5 { color: var(--text-main); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); }

/* ===== BREADCRUMB ===== */
.breadcrumb { background: transparent; padding: 0; margin: 0; }
.breadcrumb-item { color: var(--text-muted); font-size: 0.85rem; }
.breadcrumb-item a { color: var(--primary-light); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ===== PAGINATION ===== */
.page-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm) !important;
    padding: 8px 14px;
    transition: var(--transition);
}
.page-link:hover { background: rgba(255,255,255,0.08); color: var(--text-main); border-color: var(--border); }
.page-item.active .page-link { background: var(--primary-dim); border-color: var(--border-glow); color: #c084fc; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    z-index: 190;
    display: none;
}
.sidebar-overlay.show { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar-toggle { display: flex; }
    .app-main { margin-left: 0; }
    .ai-studio-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-content { padding: 18px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .stat-value { font-size: 1.4rem; }
    .welcome-card { flex-direction: column; gap: 16px; }
}

@media (max-width: 576px) {
    .app-content { padding: 14px; }
    .stat-card { padding: 16px; }
    .app-card-body { padding: 14px; }
}

/* ===== COMPREHENSIVE MOBILE RESPONSIVE ===== */
@media (max-width: 992px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar-toggle { display: flex; }
    .app-main { margin-left: 0; }
    .ai-studio-layout { grid-template-columns: 1fr; }
    .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .table-responsive-stack { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 768px) {
    .app-content { padding: 18px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-header h1, .page-header h4 { font-size: 1.3rem; }
    .stat-value { font-size: 1.4rem; }
    .welcome-card { flex-direction: column; gap: 16px; }
    .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .stat-card { padding: 14px; }
    .stat-label { font-size: 0.75rem; }
    .app-card { margin-bottom: 16px; }
    .app-card-header { padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .app-card-header h5 { font-size: 1rem; }
    .app-card-body { padding: 16px; }
    .table th { font-size: 0.8rem; white-space: nowrap; }
    .table td { font-size: 0.82rem; }
    .table { width: 100%; }
    .btn-sm { font-size: 0.78rem; padding: 4px 10px; }
    .modal-dialog { margin: 8px; }
    .modal-body { padding: 16px; }
    .modal-header { padding: 12px 16px; }
    .modal-title { font-size: 1.05rem; }
    .form-label { font-size: 0.85rem; }
    .form-control, .form-select { font-size: 0.88rem; }
    .input-group .btn { font-size: 0.82rem; }
    .dropdown-menu { min-width: 200px; }
    .app-header { padding: 0 14px; }
    .ai-assistant-btn span { display: none; }
    .ai-assistant-btn { padding: 8px 10px; }
    .icon-btn { width: 36px; height: 36px; }
    .user-avatar { width: 34px; height: 34px; font-size: 0.85rem; }
    .nav-section { font-size: 0.7rem; }
    .nav-link { padding: 10px 16px; font-size: 0.85rem; }
    .nav-link span { font-size: 0.85rem; }
    .sidebar-brand-text { font-size: 1rem; }
    .search-box { display: none !important; }
    .mobile-brand { display: flex !important; align-items: center; gap: 8px; color: var(--text-main); font-weight: 700; font-size: 1rem; }
}

@media (max-width: 576px) {
    .app-content { padding: 12px; }
    .dashboard-stats-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
    .stat-card { padding: 12px; text-align: center; }
    .stat-card .d-flex { justify-content: center; }
    .stat-value { font-size: 1.3rem; }
    .stat-label { font-size: 0.72rem; }
    .app-card-header { padding: 12px 14px; }
    .app-card-header h5 { font-size: 0.95rem; }
    .app-card-body { padding: 14px; }
    .page-header h1, .page-header h4 { font-size: 1.1rem; }
    .page-header .btn { width: 100%; }
    .table th { font-size: 0.75rem; padding: 8px 6px; }
    .table td { font-size: 0.78rem; padding: 8px 6px; }
    .table .btn-sm { padding: 3px 8px; font-size: 0.72rem; }
    .modal-dialog { margin: 6px; }
    .modal-body { padding: 14px; }
    .modal-header { padding: 10px 14px; }
    .modal-title { font-size: 1rem; }
    .modal-footer { padding: 10px 14px; }
    .modal-footer .btn { font-size: 0.82rem; padding: 6px 14px; }
    .form-label { font-size: 0.8rem; margin-bottom: 4px; }
    .form-control, .form-select { font-size: 0.85rem; padding: 8px 10px; }
    .btn { font-size: 0.85rem; padding: 8px 14px; }
    .btn-lg { font-size: 0.95rem; padding: 10px 20px; }
    .alert { padding: 10px 14px; font-size: 0.82rem; }
    .badge { font-size: 0.68rem; }
    .dropdown-menu { min-width: 180px; }
    .dropdown-item { padding: 8px 12px; font-size: 0.85rem; }
    .app-header { padding: 0 10px; height: 50px; }
    .sidebar-toggle { width: 36px; height: 36px; font-size: 1rem; padding: 4px 8px; }
    .sidebar-toggle i { font-size: 1rem; color: #fff; }
    .ai-assistant-btn { padding: 6px 8px; }
    .ai-assistant-btn i { font-size: 0.9rem; }
    .icon-btn { width: 32px; height: 32px; font-size: 0.85rem; }
    .user-avatar { width: 30px; height: 30px; font-size: 0.78rem; }
    .nav-link { padding: 10px 14px; }
    .nav-link i { font-size: 0.9rem; }
    .nav-link span { font-size: 0.82rem; }
    .sidebar-brand-text { font-size: 0.95rem; }
    .sidebar-brand-icon { width: 32px; height: 32px; }
    .sidebar-brand-icon i { font-size: 0.9rem; }
    .nav-section { font-size: 0.68rem; padding: 8px 16px; }
    .app-sidebar { width: 240px; }
    .welcome-card { padding: 16px; }
    .welcome-card h2 { font-size: 1.2rem; }
    .welcome-card p { font-size: 0.82rem; }
}

/* ===== TABLE MOBILE SCROLL ===== */
.table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}
.table-responsive-wrap table {
    min-width: 600px;
}

/* ===== GRID MOBILE FIXES ===== */
@media (max-width: 768px) {
    .row > [class*="col-"] { margin-bottom: 16px; }
    .col-md-6, .col-md-4, .col-md-3 { margin-bottom: 12px; }
    .d-flex.gap-2 { gap: 6px !important; }
    .d-flex.gap-3 { gap: 10px !important; }
    .d-flex.gap-4 { gap: 14px !important; }
    .hstack { flex-direction: column; align-items: stretch; gap: 10px; }
    .hstack.gap-3 { gap: 10px !important; }
}

/* ===== AI STUDIO MOBILE ===== */
@media (max-width: 992px) {
    .ai-studio-layout { grid-template-columns: 1fr; }
    .ai-studio-sidebar { position: relative; top: 0; max-height: none; margin-bottom: 20px; }
}
@media (max-width: 576px) {
    .ai-studio-layout { gap: 14px; }
    .ai-studio-sidebar { padding: 14px; }
    .ai-studio-main { padding: 14px; }
}

/* ===== AUTH PAGES (Login / Admin Login / Register) ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #09011a 0%, #1a0e3a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(147,51,234,0.12), transparent 60%);
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(108,76,241,0.1), transparent 60%);
    pointer-events: none;
}

.auth-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(147,51,234,0.25);
    border-radius: 24px;
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(147,51,234,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}

.auth-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-logo i { color: #c084fc; }

.auth-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}
.auth-brand i { color: #c084fc; }

.auth-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    margin-bottom: 28px;
}
.auth-form .form-label { color: rgba(255,255,255,0.8); font-size: 0.85rem; font-weight: 600; }

/* ===== INPUT GROUP ===== */
.input-group {
    display: flex;
    align-items: stretch;
}
.input-group .form-control { border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text-muted); }
.input-group .btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }

/* ===== BADGE STATUS ===== */
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
}
.badge-status.active, .badge-status.published {
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
}
.badge-status.scheduled {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.3);
}
.badge-status.draft {
    background: rgba(255,255,255,0.07);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge-status.failed {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
}
.badge-status.unread {
    background: rgba(147,51,234,0.15);
    color: #c084fc;
    border: 1px solid rgba(147,51,234,0.3);
}
.badge-status.replied {
    background: rgba(16,185,129,0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16,185,129,0.25);
}
.badge-status.pending {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.3);
}
.badge-status.paid {
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
}
.badge-status.cancelled, .badge-status.canceled {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.25);
}

/* ===== INBOX ===== */
.inbox-layout { display: flex; height: 100%; }
.inbox-list { border-right: 1px solid var(--border); overflow-y: auto; }
.inbox-list-item { transition: var(--transition); }
.inbox-list-item.unread { background: rgba(147,51,234,0.04); }
.inbox-list-item .small.fw-600 { color: var(--text-main) !important; }
.inbox-list-item .text-dark { color: var(--text-main) !important; }
.inbox-list-item .text-secondary { color: var(--text-muted) !important; }
.inbox-chat { display: flex; flex-direction: column; }
.inbox-chat-messages { flex: 1; overflow-y: auto; padding: 24px; }
.ai-empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 300px; text-align: center;
    color: var(--text-muted);
}
.ai-empty-state i { color: rgba(255,255,255,0.15); margin-bottom: 14px; }
.account-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== PROGRESS BARS ===== */
.progress {
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--primary), #6C4CF1);
    border-radius: 999px;
    transition: width 0.6s ease;
}
.progress-bar.bg-primary { background: linear-gradient(90deg, var(--primary), #6C4CF1); }
.progress-bar.bg-success { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar.bg-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-bar.bg-danger  { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ===== DASHBOARD CARDS MISSING CLASSES ===== */
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.border-top    { border-top:    1px solid var(--border) !important; }
.border        { border:        1px solid var(--border) !important; }

/* fix .fw-bold in dark context */
.fw-bold { font-weight: 700 !important; color: var(--text-main); }
.small { font-size: 0.85rem; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* post item in dashboard recent posts */
.app-card-body .d-flex small { color: var(--text-muted) !important; }
.app-card-body p.small { color: var(--text-muted); }

/* ===== TRUSTED BRANDS (Real Brand Colors on Landing) ===== */
.trusted-brand-item[data-brand='google']    { color: rgba(255,255,255,0.7); }
.trusted-brand-item[data-brand='meta']      { color: rgba(255,255,255,0.7); }
.trusted-brand-item[data-brand='hubspot']   { color: rgba(255,255,255,0.7); }
.trusted-brand-item[data-brand='microsoft'] { color: rgba(255,255,255,0.7); }
.trusted-brand-item[data-brand='aws']       { color: rgba(255,255,255,0.7); }
.trusted-brand-item[data-brand='stripe']    { color: rgba(255,255,255,0.7); }

/* ===== BILLING PAGE ===== */
.billing-plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.billing-plan-card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-neon); transform: translateY(-4px); }
.billing-plan-card.popular {
    border-color: rgba(147,51,234,0.4);
    background: rgba(147,51,234,0.06);
}
.billing-plan-card h4 { color: var(--text-main); font-size: 1.1rem; }
.billing-plan-card .price { font-size: 2rem; font-weight: 800; color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; }
.billing-plan-card ul li { color: var(--text-muted); font-size: 0.875rem; display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.billing-plan-card ul li i { color: #34d399; margin-top: 3px; flex-shrink: 0; }

/* Fix duplicate features shown in billing */
.billing-plan-card ul.list-unstyled { list-style: none; padding: 0; margin: 16px 0; }

/* ===== LINK ARROW ===== */
.link-arrow { color: var(--primary-light); display: inline-flex; align-items: center; gap: 4px; transition: var(--transition); }
.link-arrow:hover { gap: 8px; color: #d8b4fe; }

/* ===== SYSTEM MONITOR ===== */
.system-monitor-card { position: relative; }
.monitor-metric {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}
.monitor-metric:hover { border-color: var(--border-glow); }
.monitor-metric .value { font-size: 1.6rem; font-weight: 800; color: var(--text-main); }
.monitor-metric .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

/* ===== PUSH NOTIFICATIONS ===== */
.notification-history-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.notification-history-item:last-child { border-bottom: none; }
.notification-history-item strong { color: var(--text-main); font-size: 0.875rem; }
.notification-history-item small { color: var(--text-muted); font-size: 0.78rem; }

/* ===== DASHBOARD RECENT ACTIVITY ===== */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 6px var(--primary-glow);
}

/* ===== TABLES (.table and .app-table) ===== */
.table, .app-table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-main);
    border-collapse: collapse;
    --bs-table-color: var(--text-main);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: rgba(255,255,255,0.015);
    --bs-table-striped-color: var(--text-main);
    --bs-table-hover-bg: rgba(255,255,255,0.03);
    --bs-table-hover-color: var(--text-main);
}
.table > :not(caption) > * > *,
.app-table > :not(caption) > * > * {
    background-color: transparent !important;
    border-bottom-color: var(--border);
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--text-main);
}
.table > thead > * > *,
.app-table > thead > * > * {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    background-color: rgba(0,0,0,0.15) !important;
}
.table > tbody > tr:hover > *,
.app-table > tbody > tr:hover > * {
    background-color: rgba(255,255,255,0.03) !important;
}
.table td, .app-table td {
    font-size: 0.875rem;
    color: var(--text-main);
}
.table .text-muted, .app-table .text-muted {
    color: var(--text-muted) !important;
}
.table .text-dark, .app-table .text-dark,
.table .text-body, .app-table .text-body {
    color: var(--text-main) !important;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== FORMS (Inputs, Selects, Textareas) ===== */
.form-control, .form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background-color: rgba(255,255,255,0.08);
    border-color: var(--primary-light);
    color: var(--text-main);
    box-shadow: 0 0 0 3px rgba(147,51,234,0.2);
    outline: none;
}
.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}
.form-label {
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.input-group-text {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.form-select option {
    background-color: var(--bg-modal);
    color: var(--text-main);
}
.form-check-input {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid var(--border);
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
.form-switch .form-check-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.5%29'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* ===== STANDARD BOOTSTRAP BADGES (.badge.bg-*) ===== */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: var(--radius-sm);
}
.badge.bg-primary { background-color: var(--primary-dim) !important; color: var(--primary-light) !important; border: 1px solid rgba(147,51,234,0.3); }
.badge.bg-success { background-color: rgba(16,185,129,0.15) !important; color: #34d399 !important; border: 1px solid rgba(16,185,129,0.3); }
.badge.bg-warning { background-color: rgba(245,158,11,0.15) !important; color: #fbbf24 !important; border: 1px solid rgba(245,158,11,0.3); }
.badge.bg-danger  { background-color: rgba(239,68,68,0.15) !important; color: #f87171 !important; border: 1px solid rgba(239,68,68,0.3); }
.badge.bg-info    { background-color: rgba(59,130,246,0.15) !important; color: #60a5fa !important; border: 1px solid rgba(59,130,246,0.3); }
.badge.bg-secondary { background-color: rgba(255,255,255,0.08) !important; color: var(--text-muted) !important; border: 1px solid var(--border); }
.badge.bg-light   { background-color: rgba(255,255,255,0.1) !important; color: var(--text-main) !important; border: 1px solid rgba(255,255,255,0.2); }
.badge.bg-dark    { background-color: rgba(0,0,0,0.3) !important; color: var(--text-muted) !important; border: 1px solid var(--border); }

/* ===== CHART EMPTY STATE ===== */
.chart-empty-state {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 1;
}
.chart-empty-state i {
    font-size: 2.5rem;
    color: rgba(147,51,234,0.3);
    margin-bottom: 12px;
    display: block;
}
.chart-empty-state p {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.chart-empty-state span {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.chart-empty-state a {
    color: var(--primary-light);
    font-size: 0.85rem;
    text-decoration: none;
    pointer-events: auto;
}
.chart-empty-state a:hover {
    text-shadow: 0 0 8px rgba(168,85,247,0.4);
}



