/* ============================================================
   Royal Travels CRM — Premium UI Stylesheet v2.0
   Font: Inter / Poppins
   Brand: Royal Blue #2563EB | Gold #F59E0B | Navy #1E293B
   ============================================================ */

/* ---------- CSS Variables (Light Theme) ---------- */
:root {
    --font-primary: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --brand-blue:   #2563EB;
    --brand-blue-dark: #1d4ed8;
    --brand-blue-light: #eff6ff;
    --brand-gold:   #F59E0B;
    --brand-gold-dark: #d97706;
    --brand-navy:   #1E293B;
    --brand-purple: #7C3AED;
    --brand-teal:   #14B8A6;
    --brand-rose:   #F43F5E;

    --bg-body:      #F8F9FC;
    --bg-surface:   #FFFFFF;
    --bg-sidebar:   #FFFFFF;
    --bg-sidebar-active: rgba(37,99,235,0.08);
    --bg-header:    #FFFFFF;
    --bg-card:      #FFFFFF;
    --bg-input:     #F8F9FC;
    --bg-hover:     #F1F5F9;

    --text-primary:   #0F172A;
    --text-secondary: #475569;
    --text-muted:     #94A3B8;
    --text-sidebar:   #475569;
    --text-sidebar-active: #2563EB;

    --border-color:   #E2E8F0;
    --border-radius:  18px;
    --border-radius-sm: 12px;
    --border-radius-xs: 8px;
    --border-radius-lg: 18px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:  0 12px 24px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-xl:  0 20px 40px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-blue: 0 8px 24px rgba(37,99,235,0.25);
    --shadow-gold: 0 8px 24px rgba(245,158,11,0.25);
    --shadow-purple: 0 8px 24px rgba(124,58,237,0.25);
    --shadow-glass: 0 4px 16px rgba(0,0,0,0.06);

    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 72px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Status Colors */
    --color-paid:    #10B981;
    --color-partial: #F59E0B;
    --color-unpaid:  #EF4444;
    --color-active:  #10B981;
    --color-inactive:#94A3B8;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
    --bg-body:      linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --bg-surface:   rgba(17, 24, 39, 0.95);
    --bg-sidebar:   rgba(7, 13, 26, 0.98);
    --bg-sidebar-active: rgba(37,99,235,0.25);
    --bg-header:    rgba(17,24,39,0.95);
    --bg-card:      rgba(26, 34, 53, 0.9);
    --bg-input:     rgba(30, 42, 59, 0.85);
    --bg-hover:     rgba(30, 42, 59, 0.9);

    --text-primary:   #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted:     #64748B;

    --border-color:   rgba(255,255,255,0.1);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:  0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg:  0 16px 48px rgba(0,0,0,0.6);

    --glass-bg: rgba(26, 34, 53, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a { color: var(--brand-blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-blue-dark); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-gold { color: var(--brand-gold) !important; }
.required::after { content: ' *'; color: var(--color-unpaid); }

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

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

.page-content {
    flex: 1;
    padding: 28px 28px 40px;
    max-width: 1600px;
}

/* ============================================================
   SIDEBAR - Enterprise Design
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    min-height: 72px;
}

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

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-blue);
}

.brand-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color var(--transition-fast);
}

.sidebar-close-btn:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 12px 4px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-sidebar);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--brand-blue); }
.nav-icon { font-size: 17px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-text { flex: 1; }

.nav-glow {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    opacity: 0;
    background: linear-gradient(135deg, rgba(37,99,235,0.05), transparent);
    transition: opacity var(--transition-fast);
}
.nav-item:hover .nav-glow { opacity: 1; }

.nav-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    margin-left: auto;
}
.badge-warning { background: rgba(245,158,11,0.2); color: var(--brand-gold); }

.nav-logout { margin-top: 4px; }
.nav-logout:hover { background: rgba(239,68,68,0.1); color: #f87171; }

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 16px 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-hover);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--bg-surface);
    transition: all var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-hover);
}

.su-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: var(--shadow-blue);
}

.su-info { flex: 1; min-width: 0; }
.su-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.su-logout {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.su-logout:hover {
    background: rgba(239,68,68,0.1);
    color: #EF4444;
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* ============================================================
   TOP HEADER - Enterprise Design
   ============================================================ */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
    transition: left var(--transition), background var(--transition);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 8px; }

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Breadcrumb */
.breadcrumb-wrap .breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* Global Search */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.search-input {
    width: 280px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 12px 0 36px;
    font-size: 13px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    width: 340px;
}

.search-input::placeholder { color: var(--text-muted); }

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 360px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.search-results.show { display: block; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }

.search-result-icon {
    width: 34px;
    height: 34px;
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.search-result-info { flex: 1; }
.search-result-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.search-result-sub { font-size: 11px; color: var(--text-muted); }

/* Header Buttons */
.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.header-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    background: var(--color-unpaid);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
    display: none;
}
.notif-badge.show { display: flex; }

/* Notification Dropdown */
.notif-menu {
    width: 340px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    background: var(--bg-surface);
    padding: 0;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 13px;
}
.mark-all-read { font-size: 12px; color: var(--brand-blue); font-weight: 400; }
.notif-body { max-height: 300px; overflow-y: auto; }
.notif-empty { text-align: center; padding: 24px; color: var(--text-muted); }
.notif-empty i { font-size: 24px; display: block; margin-bottom: 8px; }

/* Profile Dropdown - Enterprise */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.profile-btn:hover { 
    border-color: var(--brand-blue); 
    box-shadow: var(--shadow-sm);
    background: var(--bg-hover);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: var(--shadow-blue);
}

.profile-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.profile-role { font-size: 11px; color: var(--text-muted); }

.profile-menu {
    min-width: 220px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    background: var(--bg-surface);
    padding: 8px;
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-bottom: 4px;
}

.profile-avatar-lg {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-blue), #7C3AED);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.profile-menu .dropdown-item {
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 10px;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}
.profile-menu .dropdown-item:hover { background: var(--bg-hover); }
.profile-menu .dropdown-item.text-danger:hover { background: rgba(239,68,68,0.07); }
.profile-menu .dropdown-divider { border-color: var(--border-color); margin: 4px 0; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.back-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.back-btn:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

/* ============================================================
   STAT CARDS - Enterprise Design
   ============================================================ */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px 24px 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-blue { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: var(--brand-blue); }
.stat-purple { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); color: var(--brand-purple); }
.stat-gold { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); color: var(--brand-gold); }
.stat-green { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.stat-red { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); color: #EF4444; }
.stat-teal { background: linear-gradient(135deg, #F0FDFA, #CCFBF1); color: var(--brand-teal); }
.stat-indigo { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); color: #6366F1; }

.stat-info { flex: 1; }
.stat-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { display: block; font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }

.stat-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

.stat-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.stat-link:hover { color: var(--brand-blue-dark); }

/* Enhanced KPI Card with Growth */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.kpi-icon-blue { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: var(--brand-blue); }
.kpi-icon-purple { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); color: var(--brand-purple); }
.kpi-icon-gold { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); color: var(--brand-gold); }
.kpi-icon-green { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.kpi-icon-red { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); color: #EF4444; }
.kpi-icon-teal { background: linear-gradient(135deg, #F0FDFA, #CCFBF1); color: var(--brand-teal); }

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.kpi-trend-up { background: #ECFDF5; color: #10B981; }
.kpi-trend-down { background: #FEF2F2; color: #EF4444; }
.kpi-trend-neutral { background: #F1F5F9; color: var(--text-muted); }

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.kpi-comparison {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.kpi-compare-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-compare-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.kpi-compare-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.kpi-mini-chart {
    height: 40px;
    margin-top: 12px;
}

.stat-danger-card .stat-card { border-top: 3px solid rgba(239,68,68,0.4); }

/* Mini Stats */
.mini-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}
.mini-stat:hover { box-shadow: var(--shadow-md); }
.mini-stat i { font-size: 22px; flex-shrink: 0; }
.mini-val { display: block; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.mini-label { display: block; font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   CHART CARDS - Enterprise Design
   ============================================================ */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: all var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

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

.chart-title { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }
.chart-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.chart-body { position: relative; }

.chart-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================================
   DATA CARDS - Enterprise Design
   ============================================================ */
.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition);
}

.data-card:hover { 
    box-shadow: var(--shadow-md);
}

.data-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-hover);
}

.data-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.2px;
}

.card-body-pad { padding: 24px; }

/* Pending Payments List */
.pending-list {
    padding: 16px 24px;
    max-height: 320px;
    overflow-y: auto;
}

.pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.pending-item:last-child { border-bottom: none; }

.pending-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pending-customer {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.pending-ref {
    font-size: 12px;
    color: var(--text-muted);
}

.pending-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-gold);
}

/* Top Agents List */
.agent-list {
    padding: 16px 24px;
    max-height: 320px;
    overflow-y: auto;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.agent-item:last-child { border-bottom: none; }

.agent-rank {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.agent-rank.rank-1 { background: #FEF3C7; color: var(--brand-gold); }
.agent-rank.rank-2 { background: #E2E8F0; color: #64748B; }
.agent-rank.rank-3 { background: #FED7AA; color: #EA580C; }

.agent-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.agent-company {
    font-size: 12px;
    color: var(--text-muted);
}

.agent-stats {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agent-sales {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.agent-bookings {
    font-size: 11px;
    color: var(--text-muted);
}

/* Transaction List */
.transaction-list {
    padding: 16px 24px;
    max-height: 320px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child { border-bottom: none; }

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ECFDF5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #10B981;
    flex-shrink: 0;
}

.transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.transaction-ref {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.transaction-customer {
    font-size: 12px;
    color: var(--text-muted);
}

.transaction-amount {
    font-size: 14px;
    font-weight: 700;
    color: #10B981;
}

/* ============================================================
   TABLES
   ============================================================ */
.rt-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
}

.rt-table thead th {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.rt-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13.5px;
    vertical-align: middle;
    transition: background var(--transition-fast);
}

.rt-table tbody tr:last-child td { border-bottom: none; }
.rt-table tbody tr:hover td { background: var(--bg-hover); }
.rt-table tfoot td { padding: 12px 16px; border-top: 2px solid var(--border-color); font-size: 13.5px; }

.booking-ref {
    font-weight: 600;
    color: var(--brand-blue);
    font-family: monospace;
    font-size: 13px;
}
.booking-ref:hover { color: var(--brand-blue-dark); }

.td-name { font-weight: 500; color: var(--text-primary); }
.td-sub { font-size: 11px; color: var(--text-muted); }
.td-amount { font-weight: 600; }
.td-due { font-size: 11px; color: var(--color-unpaid); }

/* DataTables overrides */
div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text-primary);
}

div.dataTables_wrapper div.dataTables_info { font-size: 12px; color: var(--text-muted); padding-top: 12px; }
div.dataTables_wrapper div.dataTables_paginate { padding-top: 8px; }

.paginate_button { border-radius: 8px !important; font-size: 12px !important; }
.paginate_button.current, .paginate_button.current:hover {
    background: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: #fff !important;
}

/* ============================================================
   STATUS & BADGES
   ============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-paid    { background: rgba(16,185,129,0.12); color: #059669; }
.status-partial { background: rgba(245,158,11,0.12); color: #D97706; }
.status-unpaid  { background: rgba(239,68,68,0.10); color: #DC2626; }
.status-active  { background: rgba(16,185,129,0.12); color: #059669; }
.status-inactive{ background: rgba(148,163,184,0.12); color: #94A3B8; }

.travel-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.travel-flight          { background: rgba(37,99,235,0.12);  color: #2563EB; }
.travel-train           { background: rgba(16,185,129,0.12); color: #059669; }
.travel-bus             { background: rgba(249,115,22,0.12); color: #EA580C; }
.travel-hotel           { background: rgba(124,58,237,0.12); color: #7C3AED; }
.travel-visa            { background: rgba(14,165,233,0.12); color: #0284C7; }
.travel-holiday_package { background: rgba(245,158,11,0.12); color: #D97706; }

.bg-soft-primary { background: rgba(37,99,235,0.10) !important; }

/* ============================================================
   ACTION BUTTONS
   ============================================================ */
.action-btns { display: flex; align-items: center; gap: 4px; }

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-view   { background: rgba(37,99,235,0.1);  color: var(--brand-blue); }
.btn-view:hover { background: var(--brand-blue); color: #fff; }
.btn-edit   { background: rgba(245,158,11,0.1); color: var(--brand-gold); }
.btn-edit:hover { background: var(--brand-gold); color: #fff; }
.btn-delete { background: rgba(239,68,68,0.1);  color: #EF4444; }
.btn-delete:hover { background: #EF4444; color: #fff; }
.btn-success { background: rgba(16,185,129,0.1); color: #10B981; }
.btn-success:hover { background: #10B981; color: #fff; }

/* ============================================================
   PRIMARY BUTTON — GLOW
   ============================================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue), #1d4ed8) !important;
    border: none !important;
    box-shadow: var(--shadow-blue) !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    letter-spacing: 0.2px;
    transition: all var(--transition-fast) !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    box-shadow: 0 12px 32px rgba(37,99,235,0.40) !important;
    transform: translateY(-1px) !important;
}
.btn-glow { animation: glowPulse 3s infinite; }
@keyframes glowPulse {
    0%, 100% { box-shadow: var(--shadow-blue); }
    50% { box-shadow: 0 8px 30px rgba(37,99,235,0.50); }
}

.btn-warning {
    background: linear-gradient(135deg, var(--brand-gold), #d97706) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
}

.btn-outline-primary { border-radius: 12px !important; }
.btn-outline-secondary { border-radius: 12px !important; }
.btn-outline-warning { border-radius: 12px !important; }
.btn-outline-success { border-radius: 12px !important; }
.btn-outline-danger { border-radius: 12px !important; }
.btn-light { border-radius: 12px !important; }

/* ============================================================
   FORMS - Premium Glassmorphism
   ============================================================ */
.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

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

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-floating > .form-control {
    padding: 14px 16px;
    height: 52px;
}

.form-floating > label {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--brand-blue);
    font-weight: 600;
}
.form-floating label { color: var(--text-muted); }

/* Travel Type Selector */
.travel-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.travel-type-opt input[type="radio"] { display: none; }

.travel-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-input);
    min-width: 76px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.travel-type-card i { font-size: 18px; color: var(--text-muted); }
.travel-type-card:hover { border-color: var(--brand-blue); background: var(--brand-blue-light); color: var(--brand-blue); }
.travel-type-card:hover i { color: var(--brand-blue); }

.travel-type-opt input:checked + .travel-type-card {
    border-color: var(--brand-blue);
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    font-weight: 600;
}
.travel-type-opt input:checked + .travel-type-card i { color: var(--brand-blue); }

/* Due Calc Box */
.due-calc-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px;
}

.due-calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    color: var(--text-secondary);
}

.due-calc-total {
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 14px;
}

/* ============================================================
   DASHBOARD SPECIFIC
   ============================================================ */
.pending-list { padding: 4px 0; }
.pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}
.pending-item:last-child { border-bottom: none; }
.pending-item:hover { background: var(--bg-hover); }
.pending-customer { font-size: 13px; font-weight: 500; color: var(--text-primary); display: block; }
.pending-ref { font-size: 11px; color: var(--text-muted); display: block; }
.due-amount { font-size: 14px; font-weight: 700; color: var(--color-unpaid); }

/* Agent List */
.agent-list { padding: 4px 0; }
.agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}
.agent-item:last-child { border-bottom: none; }
.agent-item:hover { background: var(--bg-hover); }

.agent-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rank-1 { background: rgba(245,158,11,0.2); color: var(--brand-gold); }
.rank-2 { background: rgba(148,163,184,0.2); color: #64748b; }
.rank-3 { background: rgba(249,115,22,0.2); color: #F97316; }
.rank-4, .rank-5 { background: var(--bg-hover); color: var(--text-muted); }

.agent-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-blue), #7C3AED);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.agent-info { flex: 1; min-width: 0; }
.agent-name { font-size: 13px; font-weight: 600; color: var(--text-primary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-company { font-size: 11px; color: var(--text-muted); display: block; }
.agent-stats { text-align: right; }
.agent-sales { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.agent-bookings { font-size: 11px; color: var(--text-muted); }

/* Transaction List */
.txn-list { padding: 4px 0; }
.txn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}
.txn-item:last-child { border-bottom: none; }
.txn-item:hover { background: var(--bg-hover); }

.txn-icon {
    width: 36px;
    height: 36px;
    background: rgba(16,185,129,0.12);
    color: #10B981;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.txn-info { flex: 1; min-width: 0; }
.txn-name { font-size: 13px; font-weight: 500; color: var(--text-primary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-ref { font-size: 11px; color: var(--text-muted); display: block; }
.txn-amount { font-size: 14px; font-weight: 700; color: #10B981; white-space: nowrap; }

/* ============================================================
   PAYMENT TIMELINE (Booking View)
   ============================================================ */
.payment-timeline { position: relative; padding-left: 24px; }
.payment-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    border-radius: 2px;
}

.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--brand-blue);
    border-radius: 50%;
    border: 3px solid var(--bg-surface);
    box-shadow: 0 0 0 2px var(--brand-blue);
}

.timeline-content {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.timeline-title { font-weight: 600; font-size: 13px; }
.timeline-amount { font-weight: 700; font-size: 15px; color: #10B981; }
.timeline-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.timeline-balance { font-size: 12px; color: var(--text-muted); }

/* Payment Summary Box */
.payment-summary-box { border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.ps-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.ps-row:last-child { border-bottom: none; }
.ps-divider { border-top: 2px solid var(--border-color); margin: 4px 0; }

/* Detail Fields (view pages) */
.detail-field { margin-bottom: 0; }
.detail-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.detail-field span { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.agent-detail-list { padding: 16px 20px; }
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 12px; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.detail-value { font-size: 13px; color: var(--text-primary); font-weight: 500; text-align: right; }

/* ============================================================
   AGENT AVATAR (small, table)
   ============================================================ */
.agent-avatar-sm {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-blue), #7C3AED);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* ============================================================
   FILTER TABS
   ============================================================/* Travel Type Selector - Premium */
.travel-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.travel-type-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.travel-type-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: rgba(37,99,235,0.05);
}

.travel-type-btn.active {
    border-color: var(--brand-blue);
    background: rgba(37,99,235,0.12);
    color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.travel-type-btn i {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.filter-tab:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.filter-tab.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }

/* ============================================================
   RT TABS
   ============================================================ */
.rt-tabs { border-bottom: 2px solid var(--border-color); }
.rt-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: -2px;
    border-radius: 0;
    transition: all var(--transition-fast);
}
.rt-tabs .nav-link:hover { color: var(--brand-blue); }
.rt-tabs .nav-link.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); font-weight: 600; }

/* ============================================================
   MODAL
   ============================================================ */
.rt-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}
.rt-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}
.rt-modal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 14px 20px;
}
.rt-modal .modal-body { padding: 20px; }
.rt-modal .modal-title { font-size: 15px; font-weight: 600; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.rt-toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 360px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0);   opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

.rt-toast.hide { animation: slideOut 0.3s ease forwards; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-success .toast-icon { color: #10B981; }
.toast-error   .toast-icon { color: #EF4444; }
.toast-warning .toast-icon { color: var(--brand-gold); }
.toast-info    .toast-icon { color: var(--brand-blue); }
.toast-text { font-size: 13px; font-weight: 500; color: var(--text-primary); flex: 1; }

/* ============================================================
   ANIMATIONS - Enterprise Page Transitions
   ============================================================ */
.animate-in {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: var(--delay, 0s);
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to   { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Page transition */
.page-transition {
    animation: pageFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Card hover lift */
.card-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Button press effect */
.btn:active {
    transform: scale(0.97);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Fade in animation for dynamic content */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide in from right */
.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in animation */
.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse animation for notifications */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================================
   LOADING SKELETONS - Enterprise Design
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, #F8F9FC 25%, #E2E8F0 50%, #F8F9FC 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 120px;
    border-radius: 18px;
}

.skeleton-kpi {
    height: 140px;
    border-radius: 18px;
}

.skeleton-chart {
    height: 300px;
    border-radius: 18px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.skeleton-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text-sm { height: 12px; }
.skeleton-text-lg { height: 24px; }
.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--border-radius-lg);
}

.skeleton-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
}

.skeleton-btn {
    height: 48px;
    border-radius: 14px;
    width: 100%;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--brand-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    background: var(--bg-body);
    overflow: hidden;
}

.login-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(37,99,235,0.15);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 440px;
    min-height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 48px 44px;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.login-right {
    flex: 1;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 40%, #1a1e4a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.login-right::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.login-brand { text-align: center; margin-bottom: 40px; }

.login-logo {
    position: relative;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--brand-blue), #7C3AED);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-blue);
}

.login-crown {
    position: absolute;
    top: -10px;
    right: -6px;
    font-size: 18px;
    color: var(--brand-gold);
    filter: drop-shadow(0 0 6px rgba(245,158,11,0.8));
}

.login-title { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.login-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.form-heading { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.form-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.login-form .form-control { height: 52px; font-size: 14px; }
.login-btn {
    height: 52px;
    font-size: 15px;
    font-weight: 700;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    z-index: 10;
    transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--brand-blue); }

/* Illustration Cards */
.login-illustration { position: relative; width: 100%; height: 320px; }

.illustration-card {
    position: absolute;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    animation: float2 4s ease-in-out infinite;
}
.illustration-card i { font-size: 22px; }
.card-1 { top: 10px;  left: 20px;  animation-delay: 0s;   background: rgba(37,99,235,0.2); }
.card-2 { top: 80px;  right: 10px; animation-delay: 0.8s; background: rgba(124,58,237,0.2); }
.card-3 { bottom: 100px; left: 10px; animation-delay: 1.6s; background: rgba(16,185,129,0.2); }
.card-4 { bottom: 30px;  right: 30px; animation-delay: 2.4s; background: rgba(245,158,11,0.2); }

@keyframes float2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
}
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 24px; font-weight: 800; color: #fff; }
.stat-label { display: block; font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.8px; }

.login-feature-title { text-align: center; position: relative; z-index: 1; }
.login-feature-title h2 { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.login-feature-title p { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 8px; max-width: 360px; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .sidebar, .top-header, .page-actions, .no-print, .action-btns, .dt-table_wrapper .dataTables_filter, .dataTables_length, .dataTables_paginate, .dataTables_info { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: #fff !important; }
    .data-card, .stat-card { box-shadow: none !important; border: 1px solid #ddd !important; }
    .print-header { display: flex !important; justify-content: space-between; align-items: center; padding: 16px 0 24px; border-bottom: 2px solid #333; margin-bottom: 24px; }
    .print-brand h2 { font-size: 22px; font-weight: 800; color: #000; }
    .print-brand p { font-size: 12px; color: #555; }
    .print-ref h3 { font-size: 18px; font-weight: 700; text-align: right; }
    .print-ref p { font-size: 14px; font-weight: 600; color: #2563EB; text-align: right; }
}

/* ============================================================
   RESPONSIVE - Enterprise Design for All Devices
   ============================================================ */

/* Tablet (768px - 991px) */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .page-content { padding: 20px; }

    .kpi-card { margin-bottom: 16px; }
    .kpi-value { font-size: 28px; }
    .chart-card { margin-bottom: 20px; }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767.98px) {
    .page-title { font-size: 22px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .page-actions { width: 100%; }
    .page-actions .btn { width: 100%; }

    .kpi-card { margin-bottom: 16px; }
    .kpi-value { font-size: 26px; }
    .kpi-icon { width: 48px; height: 48px; font-size: 20px; }

    .header-search { display: none; }
    .top-header { padding: 0 16px; }
    .profile-info { display: none !important; }
    .profile-btn { padding: 8px; }

    .data-card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .data-card-header .btn { width: 100%; }

    .chart-card { margin-bottom: 20px; }
}

/* Mobile Portrait (< 576px) */
@media (max-width: 575.98px) {
    :root {
        --sidebar-width: 280px;
        --sidebar-collapsed: 0;
    }

    .sidebar { width: 280px; }
    .sidebar.collapsed { width: 280px; }
    .sidebar.collapsed + .main-content { margin-left: 0; }

    .page-content { padding: 16px; }
    .page-title { font-size: 20px; }
    .page-subtitle { font-size: 13px; }

    .kpi-card { padding: 20px; }
    .kpi-header { margin-bottom: 16px; }
    .kpi-icon { width: 44px; height: 44px; font-size: 18px; }
    .kpi-value { font-size: 24px; }
    .kpi-label { font-size: 12px; }
    .kpi-comparison { padding-top: 12px; }

    .data-card { border-radius: var(--border-radius); }
    .data-card-header { padding: 16px; }
    .data-card-title { font-size: 14px; }
    .card-body-pad { padding: 16px; }

    .chart-card { padding: 16px; }
    .chart-card-header { margin-bottom: 16px; }
    .chart-title { font-size: 14px; }

    .rt-table { font-size: 13px; }
    .rt-table th, .rt-table td { padding: 12px 10px; }

    .btn { padding: 10px 16px; font-size: 13px; }
    .btn-lg { padding: 12px 20px; font-size: 14px; }

    .form-control { padding: 10px 14px; font-size: 14px; }
    .form-floating > .form-control { height: 48px; }
    .form-floating > label { padding: 12px 14px; font-size: 12px; }

    .top-header { height: 64px; }
    .sidebar-toggle { width: 36px; height: 36px; }
    .sidebar-toggle i { font-size: 18px; }
}

/* Extra Small Devices (< 400px) */
@media (max-width: 399.98px) {
    .page-content { padding: 12px; }
    .kpi-card { padding: 16px; }
    .kpi-header { gap: 12px; }
    .kpi-icon { width: 40px; height: 40px; font-size: 16px; }
    .kpi-value { font-size: 22px; }

    .data-card-header { padding: 14px; }
    .card-body-pad { padding: 14px; }

    .btn { padding: 8px 14px; font-size: 12px; }
}

/* Large Desktop (> 1400px) */
@media (min-width: 1400px) {
    .page-content { padding: 32px 32px 48px; }
    .kpi-card { padding: 28px; }
    .kpi-header { margin-bottom: 24px; }
    .kpi-icon { width: 60px; height: 60px; font-size: 26px; }
    .kpi-value { font-size: 36px; }
    .kpi-label { font-size: 14px; }
    .kpi-comparison { padding-top: 20px; }

    .data-card-header { padding: 20px 24px; }
    .card-body-pad { padding: 24px; }

    .chart-card { padding: 28px; }
    .chart-card-header { margin-bottom: 24px; }
}

/* Collapsed sidebar (desktop toggle) */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-footer .su-info,
.sidebar.collapsed .sidebar-footer .su-logout,
.sidebar.collapsed .nav-badge { display: none; }
.sidebar.collapsed + .main-content { margin-left: var(--sidebar-collapsed); }
.sidebar.collapsed .brand-logo { justify-content: center; }
.sidebar.collapsed .sidebar-brand { padding: 20px 0; justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .nav-icon { width: auto; }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .su-avatar { margin: 0 auto; }
