/* =============================================
   WTG CPA Platform - Main Stylesheet
   Premium Modern UI Design
   ============================================= */

/* ---- CSS Variables ---- */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #6366f1;
    --primary-rgb: 99, 102, 241;
    --secondary: #06b6d4;
    --secondary-dark: #0891b2;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --success: #10b981;
    --success-light: #059669;
    --warning: #f59e0b;
    --warning-light: #d97706;
    --danger: #ef4444;
    --danger-light: #dc2626;
    --info: #3b82f6;

    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f8fafc;
    --bg-sidebar: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base Styles ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =============================================
   Auth Pages
   ============================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.1;
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    opacity: 0.08;
    bottom: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 14px;
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 14px;
}

/* ---- Form Styles ---- */
.form-floating {
    position: relative;
    margin-bottom: 20px;
}

.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 12px 16px !important;
    font-size: 14px;
    transition: var(--transition);
    height: auto !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.input-group-text {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    border-radius: var(--radius-sm) !important;
}

/* ---- Buttons ---- */
.btn {
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    color: white !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow) !important;
}

.btn-secondary {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.btn-success {
    background: var(--gradient-success) !important;
    border: none !important;
    color: white !important;
}

.btn-danger {
    background: var(--danger) !important;
    border: none !important;
    color: white !important;
}

.btn-warning {
    background: var(--warning) !important;
    border: none !important;
    color: var(--text-dark) !important;
}

.btn-outline-primary {
    border: 1px solid var(--primary) !important;
    color: var(--primary-light) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: white !important;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* =============================================
   Dashboard Layout
   ============================================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-height);
}

.sidebar-header .logo {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.sidebar-header .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-menu {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-menu .menu-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 12px 8px;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: var(--transition);
}

.sidebar-menu .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.7;
}

.sidebar-menu .nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-menu .nav-link:hover i {
    opacity: 1;
}

.sidebar-menu .nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.sidebar-menu .nav-link.active i {
    opacity: 1;
}

.sidebar-menu .nav-link .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 3px 8px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
}

.sidebar-user .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    overflow: hidden;
}

.sidebar-user .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Top Header ---- */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(20px);
}

.top-header .page-title {
    font-size: 20px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions .btn-icon {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
}

.header-actions .btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ---- Content Area ---- */
.content-area {
    padding: 28px;
    flex: 1;
}

/* =============================================
   Cards
   ============================================= */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 20px 24px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 24px !important;
}

/* ---- Stat Cards ---- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 16px;
}

.stat-card .stat-icon.primary { background: var(--gradient-primary); }
.stat-card .stat-icon.success { background: var(--gradient-success); }
.stat-card .stat-icon.warning { background: var(--gradient-warning); }
.stat-card .stat-icon.info { background: var(--gradient-secondary); }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(30%, -30%);
}

.stat-card:nth-child(1)::after { background: var(--primary); }
.stat-card:nth-child(2)::after { background: var(--success); }
.stat-card:nth-child(3)::after { background: var(--warning); }
.stat-card:nth-child(4)::after { background: var(--info); }

/* =============================================
   Offer Cards
   ============================================= */
.offer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.offer-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.offer-card .offer-header {
    display: flex;
    align-items: start;
    gap: 14px;
    margin-bottom: 14px;
}

.offer-card .offer-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.offer-card .offer-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-card .offer-icon i {
    font-size: 20px;
    color: var(--primary-light);
}

.offer-card .offer-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-card .offer-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.offer-card .offer-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.offer-card .offer-meta .badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.offer-card .offer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.offer-card .offer-payout {
    font-size: 22px;
    font-weight: 800;
    color: var(--success-light);
}

.offer-card .offer-payout small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* =============================================
   Tables
   ============================================= */
.table {
    color: var(--text-primary) !important;
    margin-bottom: 0;
}

.table thead th {
    background: var(--bg-primary) !important;
    color: var(--text-muted) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-top: none !important;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
    vertical-align: middle;
    font-size: 14px;
}

.table tbody tr:hover {
    background: var(--bg-card-hover) !important;
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

/* =============================================
   Badges
   ============================================= */
.badge {
    font-weight: 600;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--success-light) !important;
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: var(--warning-light) !important;
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: var(--danger-light) !important;
}

.badge.bg-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #2563eb !important;
}

.badge.bg-secondary {
    background: rgba(100, 116, 139, 0.15) !important;
    color: var(--text-secondary) !important;
}

.badge.bg-primary {
    background: rgba(99, 102, 241, 0.15) !important;
    color: var(--primary-light) !important;
}

/* =============================================
   Pagination
   ============================================= */
.pagination .page-link {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

.pagination .page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
}

/* =============================================
   Alerts
   ============================================= */
.alert {
    border-radius: var(--radius-sm) !important;
    border: none !important;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: var(--success-light) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: var(--danger-light) !important;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: var(--warning-light) !important;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #2563eb !important;
}

.alert .btn-close {
    opacity: 0.5;
}

/* =============================================
   Announcement Bar
   ============================================= */
.announcement-bar {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.announcement-bar i {
    font-size: 16px;
}

/* =============================================
   Activity Feed
   ============================================= */
.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.activity-icon.earn {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.activity-icon.withdraw {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.activity-icon.referral {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent);
}

.activity-icon.bonus {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.activity-info h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.activity-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.activity-amount {
    margin-left: auto;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.activity-amount.positive { color: var(--success); }
.activity-amount.negative { color: var(--danger); }

/* =============================================
   Referral Section
   ============================================= */
.referral-link-box {
    background: var(--bg-primary);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.referral-link-box input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    font-size: 14px;
    font-family: monospace;
}

.referral-link-box input:focus {
    outline: none;
    box-shadow: none !important;
}

/* =============================================
   Filter Bar
   ============================================= */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.filter-bar .form-control,
.filter-bar .form-select {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* =============================================
   Modal
   ============================================= */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 20px 24px !important;
}

.modal-header .modal-title {
    font-weight: 700;
}

.modal-header .btn-close {
    opacity: 0.5;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
    padding: 16px 24px !important;
}

/* =============================================
   Empty State
   ============================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 56px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state h5 {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* =============================================
   Impersonation Bar
   ============================================= */
.impersonation-bar {
    background: var(--warning);
    color: var(--text-dark);
    padding: 8px 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.impersonation-bar a {
    color: var(--text-dark);
    text-decoration: underline;
    font-weight: 700;
}

/* =============================================
   Chart Container
   ============================================= */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* =============================================
   Form Switch Custom
   ============================================= */
.form-check-input {
    background-color: var(--border-color) !important;
    border-color: var(--border-color) !important;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2) !important;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .content-area {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .top-header {
        padding: 0 16px;
    }

    .auth-card {
        margin: 16px;
        padding: 28px;
    }
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.4s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* =============================================
   Dropdown
   ============================================= */
.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 8px !important;
}

.dropdown-item {
    color: var(--text-secondary) !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
}

/* ---- Tooltip ---- */
.tooltip-inner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
}

/* ---- Tab custom ---- */
.nav-tabs {
    border-bottom: 1px solid var(--border-color) !important;
}

.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: none !important;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border-bottom: 2px solid transparent !important;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary-light) !important;
    background: transparent !important;
    border-bottom-color: var(--primary) !important;
}

/* ---- Custom utilities ---- */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-success { background: var(--gradient-success); }
.bg-gradient-warning { background: var(--gradient-warning); }
.bg-gradient-secondary { background: var(--gradient-secondary); }

.border-dashed { border-style: dashed !important; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.fw-800 { font-weight: 800; }
