﻿/* Blue Glass Modern 2026 - Complete & Functional */
:root {
    --primary-color: #2962ff;
    --secondary-color: #64b5f6;
    --accent-color: #42a5f5;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --border-radius: 20px;
    --shadow-sm: 0 12px 30px rgba(6,30,60,0.04);
    --shadow-lg: 0 22px 60px rgba(6,30,60,0.06);
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg,#eaf6ff 0%, #f7fbff 100%);
    color: #04243a;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== FORM CONTROLS & ACCESSIBILITY ===== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--accent-color);
}

/* ===== ROOT LAYOUT ===== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== SIDEBAR - EXACT REPLICA WITH FULL FUNCTIONALITY ===== */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    padding: 28px 22px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(235,249,255,0.55));
    border-right: 1px solid rgba(15,35,60,0.04);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    box-shadow: 0 18px 50px rgba(6,30,60,0.06);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow: visible !important;
    transition: all 0.3s;
}

    /* Decorative floating bubble behind */
    #sidebar::before {
        content: '';
        position: absolute;
        right: -36px;
        top: -28px;
        width: 140px;
        height: 140px;
        border-radius: 999px;
        background: radial-gradient(circle at 30% 30%, rgba(79,195,247,0.22), rgba(41,98,255,0.12) 40%, transparent 60%);
        filter: blur(6px);
        opacity: 0.95;
        pointer-events: none;
        z-index: -1;
    }

    #sidebar.active {
        min-width: var(--sidebar-collapsed-width);
        max-width: var(--sidebar-collapsed-width);
        padding: 20px 12px;
        margin-left: 0;
    }

    #sidebar .sidebar-header {
        padding: 0;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        flex-shrink: 0;
    }

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.logo {
    background: transparent !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

    .logo img {
        width: 64px;
        height: 64px;
        border-radius: 0; 
    }

.brand-text {
    line-height: 1;
}

    .brand-text h5 {
        font-weight: 900;
        font-size: 16px;
        color: #052139;
        margin: 0;
    }

    .brand-text small {
        font-size: 12px;
        color: rgba(4,36,58,0.6);
        margin-top: 4px;
        display: block;
    }

.btn-toggle {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #052139;
    border-radius: 8px;
    padding: 6px 8px;
    transition: all 0.3s;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

/* Hide collapse button when sidebar is collapsed */
#sidebar.active #sidebarCollapse {
    display: none !important;
}

/* Make logo clickable and show pointer when collapsed */
#sidebar.active .logo {
    cursor: pointer;
}

/* Ensure smooth transitions for logo icon */
.logo i {
    transition: all 0.3s ease;
}

/* Welcome text */
.welcome-text {
    margin-top: 6px;
    font-weight: 700;
    color: #04243a;
}

    .welcome-text strong {
        font-weight: 900;
    }

/* Navigation */
#sidebar ul.components {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow: visible !important;
}

#sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.84));
    box-shadow: 0 8px 22px rgba(6,30,60,0.06);
    font-weight: 800;
    color: #052139;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    border-left: 3px solid transparent;
}

    #sidebar ul li a:hover {
        background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,251,255,0.95));
        transform: translateY(-1px);
        padding-left: 16px;
    }

    #sidebar ul li a.active {
        background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,251,255,0.95));
        border: 2px solid rgba(66,165,245,0.24);
        border-left-color: var(--accent-color);
    }

    #sidebar ul li a i {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #e7f6ff;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #0d4fa8;
        flex-shrink: 0;
        font-size: 14px;
        text-align: center;
    }

    /* Admin menu specific styling */
    #sidebar ul li a.nav-link.text-danger {
        background: linear-gradient(180deg, rgba(255,245,245,0.94), rgba(255,235,235,0.84));
    }

        #sidebar ul li a.nav-link.text-danger i {
            background: #ffe7e7;
            color: #dc2626;
        }

/* ===== DROPDOWN MENUS - RESTORED FUNCTIONALITY ===== */
#sidebar .nav-item.dropdown {
    position: relative;
}

#sidebar .dropdown-menu {
    position: fixed !important;
    left: var(--sidebar-width) !important;
    top: 0;
    margin-left: 5px;
    min-width: 200px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,251,255,0.96));
    border: none;
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(6,30,60,0.1);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    display: block !important;
    backdrop-filter: blur(10px);
}


#sidebar.active .dropdown-menu {
    left: var(--sidebar-collapsed-width) !important;
}

#sidebar .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

#sidebar .dropdown-item {
    padding: 12px 16px;
    color: #052139;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

    #sidebar .dropdown-item:hover {
        background: rgba(66, 165, 245, 0.1);
        color: var(--accent-color);
        border-left-color: var(--accent-color);
        padding-left: 20px;
    }

    #sidebar .dropdown-item i {
        width: 18px;
        text-align: center;
        color: var(--accent-color);
    }

#sidebar .dropdown-toggle::after {
    display: none !important;
}

/* ===== DROPDOWN TOGGLE STYLES - THESE MAKE DROPDOWNS WORK ===== */
.sidebar-footer .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.84));
    box-shadow: 0 8px 22px rgba(6,30,60,0.06);
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    width: 100%;
    cursor: pointer;
}

    .sidebar-footer .dropdown-toggle:hover {
        background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,251,255,0.95));
        transform: translateY(-1px);
    }

.avatar-small.dropdown-toggle {
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
}

    .avatar-small.dropdown-toggle::after {
        display: none;
    }

/* Dropdown menu positioning */
.dropdown-menu {
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    box-shadow: 0 22px 60px rgba(6,30,60,0.1);
    backdrop-filter: blur(10px);
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item {
    padding: 10px 12px;
    border-radius: 8px;
    color: #052139;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .dropdown-item:hover {
        background: rgba(66, 165, 245, 0.1);
        color: var(--accent-color);
    }

    .dropdown-item i {
        width: 16px;
        text-align: center;
    }

/* Collapsed sidebar */
#sidebar.active .brand-text,
#sidebar.active ul li a span,
#sidebar.active .welcome-text {
    display: none;
}

#sidebar.active .sidebar-header {
    justify-content: center;
    padding: 0;
}

#sidebar.active .brand-container {
    justify-content: center;
}

/* ===== USER PROFILE ===== */
.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: transparent;
    padding: 0;
    flex-shrink: 0;
}

.account-label {
    font-size: 12px;
    color: rgba(4,36,58,0.6);
}

.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-compact {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eaf6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d4fa8;
    font-weight: 800;
    flex-shrink: 0;
}

.user-email-compact {
    font-weight: 800;
    color: #052139;
    font-size: 14px;
}

#sidebar.active .user-email-compact {
    display: none;
}

/* ===== CONTENT AREA ===== */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    background: linear-gradient(180deg, rgba(250,252,255,0.6), rgba(244,248,255,0.6));
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
}

#sidebar.active ~ #content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ===== TOPBAR - EXACT REPLICA ===== */
.topbar {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.72));
    border-bottom: 1px solid rgba(10,30,50,0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 20px;
    font-weight: 900;
    color: #07263a;
}

.topbar-subtitle {
    font-size: 13px;
    color: rgba(4,36,58,0.6);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-container {
    position: relative;
}

.search-input {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(10,30,50,0.06);
    width: 340px;
    outline: none;
    background: linear-gradient(180deg,#fff,#f7fbff);
    box-shadow: 0 6px 18px rgba(6,30,60,0.04);
    font-family: inherit;
}

    .search-input:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 0.2rem rgba(66, 165, 245, 0.25);
    }

.search-shortcut {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(4,36,58,0.35);
    font-size: 14px;
}

.btn-new {
    padding: 10px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg,#64b5f6,#2962ff);
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 36px rgba(41,98,255,0.18);
    transition: all 0.3s;
}

    .btn-new:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(41,98,255,0.22);
    }

.avatar-small {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg,#fff,#f0f7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(6,30,60,0.06);
    overflow: hidden;
}

    .avatar-small img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        object-fit: cover;
    }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    overflow: auto;
    padding: 28px;
    background: transparent;
    position: relative;
}

.edit-mode-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.field-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.edit-mode-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

/* Decorative background bubbles */
.bubble-1 {
    position: absolute;
    right: 120px;
    top: 160px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(96,165,250,0.08), rgba(16,143,255,0.04) 40%, transparent 60%);
    filter: blur(18px);
    pointer-events: none;
    transform: translateZ(0);
}

.bubble-2 {
    position: absolute;
    left: 120px;
    top: 340px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle at 40% 40%, rgba(6,182,212,0.08), rgba(41,98,255,0.03) 45%, transparent 70%);
    filter: blur(22px);
    pointer-events: none;
    transform: translateZ(0);
}

/* ===== GLASS CARDS ===== */
.glass-card {
    border-radius: 20px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,251,255,0.96));
    box-shadow: 0 22px 60px rgba(6,30,60,0.06);
    border: none;
}

.glass-card-sm {
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    box-shadow: 0 18px 44px rgba(6,30,60,0.06);
    border: none;
}

.glass-card-inner {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== KPI TILES ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.kpi-tile {
    border-radius: 12px;
    padding: 14px;
    background: linear-gradient(180deg,#ffffff,#f6fbff);
    box-shadow: 0 12px 30px rgba(6,30,60,0.04);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-label {
    font-size: 12px;
    color: rgba(4,36,58,0.6);
}

.kpi-value {
    font-weight: 900;
    font-size: 22px;
    margin-top: 8px;
    color: #052139;
}

.kpi-trend {
    font-size: 12px;
    margin-top: 6px;
}

.trend-positive {
    color: #10b981;
}

.trend-warning {
    color: #f59e0b;
}

/* ===== FORM CONTROLS ===== */
.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: #052139;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,251,255,0.92));
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    box-shadow: 
        0 8px 32px rgba(6,30,60,0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    border-color: rgba(66, 165, 245, 0.6);
    box-shadow: 
        0 12px 40px rgba(41,98,255,0.15),
        0 0 0 4px rgba(66, 165, 245, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.8);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(252,253,255,0.96));
    transform: translateY(-2px);
    outline: none;
}

.intl-tel-input {
    width: 100%;
}

    .intl-tel-input .flag-container {
        padding: 0 8px;
    }

    .intl-tel-input .selected-flag {
        padding: 0 8px 0 12px;
    }

    .intl-tel-input .country-list {
        width: 300px;
        max-height: 200px;
        overflow-y: auto;
    }

.iti__flag {
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags@2x.png");
    }
}

/* ===== CLEAN GLASS DROPDOWNS ===== */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23052439' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

    select.form-control:hover {
        border-color: rgba(66, 165, 245, 0.4);
        box-shadow: 0 8px 32px rgba(6,30,60,0.1);
    }

    select.form-control:focus {
        border-color: rgba(66, 165, 245, 0.6);
        box-shadow: 0 12px 40px rgba(41,98,255,0.15), 0 0 0 4px rgba(66, 165, 245, 0.1);
        transform: translateY(-1px);
    }

    /* Clean dropdown options */
    select.form-control option {
        background: white;
        color: #052139;
        font-weight: 600;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(10,30,50,0.1);
    }

        select.form-control option:hover {
            background: rgba(66, 165, 245, 0.1);
            color: var(--primary-color);
        }

        select.form-control option:checked {
            background: rgba(66, 165, 245, 0.15);
            color: var(--primary-color);
            font-weight: 700;
        }

/* ===== MODERN GLASS ALERTS ===== */
.custom-alert {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1050;
    padding: 18px 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 340px;
    max-width: 500px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
    box-shadow: 0 22px 60px rgba(6,30,60,0.12), 0 8px 20px rgba(41,98,255,0.08);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: glassSlideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .custom-alert::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        z-index: 1;
    }

.alert-success {
    border-left: 4px solid var(--success-color);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
}

    .alert-success::before {
        background: linear-gradient(180deg, #10b981, #059669);
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
    }

.alert-error {
    border-left: 4px solid var(--danger-color);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
}

    .alert-error::before {
        background: linear-gradient(180deg, #ef4444, #dc2626);
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
    }

.alert-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    padding-right: 12px;
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(6,30,60,0.08);
}

.alert-success .alert-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.alert-error .alert-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.alert-text {
    flex: 1;
}

.alert-title {
    font-weight: 900;
    font-size: 15px;
    color: #052139;
    margin-bottom: 2px;
}

.alert-message {
    font-size: 14px;
    color: rgba(4,36,58,0.8);
    font-weight: 600;
    line-height: 1.4;
}

.alert-close {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(4,36,58,0.6);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

    .alert-close:hover {
        background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
        color: #052139;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(6,30,60,0.1);
    }

    .alert-close i {
        font-size: 14px;
    }

/* Success alert specific styling */
.alert-success {
    border-left: 4px solid #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

    .alert-success .alert-message {
        color: rgba(4,36,58,0.8);
    }

/* Error alert specific styling */
.alert-error {
    border-left: 4px solid #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

    .alert-error .alert-message {
        color: rgba(4,36,58,0.8);
    }

/* Animation */
@keyframes glassSlideInRight {
    from {
        transform: translateX(100%) translateY(-10px);
        opacity: 0;
        filter: blur(4px);
    }

    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes glassSlideOutRight {
    from {
        transform: translateX(0) translateY(0);
        opacity: 1;
        filter: blur(0);
    }

    to {
        transform: translateX(100%) translateY(-10px);
        opacity: 0;
        filter: blur(4px);
    }
}

.custom-alert.closing {
    animation: glassSlideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Progress bar for auto-dismiss */
.alert-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    border-radius: 0 0 16px 0;
}

.alert-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: progressBar 5s linear forwards;
}

.alert-success .alert-progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

.alert-error .alert-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* Remove custom arrow from other inputs */
input.form-control,
textarea.form-control {
    background-image: none !important;
    padding-right: 16px;
}

/* Auto-width dropdowns for short options */
select.form-control.auto-width {
    width: auto;
    min-width: 200px;
    display: inline-block;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 800;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
}

    .btn:hover {
        transform: translateY(-2px);
    }

.btn-primary {
    background: linear-gradient(135deg,#64b5f6,#2962ff);
    color: white;
    box-shadow: 0 12px 36px rgba(41,98,255,0.18);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 14px;
    min-height: 44px;
}

.btn-outline {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    color: #052139;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 14px;
    min-height: 44px;
    box-shadow: 0 8px 32px rgba(6,30,60,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}
    .btn-primary:hover, .btn-outline:hover {
        transform: translateY(-2px);
    }
.btn-primary:hover {
    box-shadow: 0 16px 40px rgba(41,98,255,0.22);
}
.btn-outline:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(6,30,60,0.12), inset 0 1px 0 rgba(255,255,255,0.8);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
    align-items: center;
}
form .btn-primary,
form .btn-outline {
    min-width: 140px;
    white-space: nowrap;
}

/* ===== ACTIVITY TIMELINE ===== */
.activity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.activity-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.avatar-blue {
    background: linear-gradient(135deg,#e3f2fd,#d0eaff);
    color: #0d47a1;
}

.avatar-orange {
    background: linear-gradient(135deg,#fff4e6,#ffe7d3);
    color: #b45309;
}

.avatar-green {
    background: linear-gradient(135deg,#e8f5e9,#dcedc8);
    color: #2e7d32;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 800;
    color: #052139;
}

.activity-meta {
    font-size: 13px;
    color: rgba(4,36,58,0.6);
    margin-top: 6px;
}

/* Modern Glass Checkboxes & Radio Buttons */
input[type="radio"],
input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid rgba(66, 165, 245, 0.3);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,251,255,0.8));
    box-shadow: 0 4px 12px rgba(6,30,60,0.08), inset 0 1px 2px rgba(255,255,255,0.8);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="checkbox"] {
    border-radius: 6px;
}

/* Checked States */
input[type="radio"]:checked {
    background: linear-gradient(135deg, #64b5f6, #2962ff);
    border-color: #2962ff;
    box-shadow: 0 6px 20px rgba(41,98,255,0.25), inset 0 1px 2px rgba(255,255,255,0.3);
}

    input[type="radio"]:checked::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 8px;
        height: 8px;
        background: white;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #64b5f6, #2962ff);
    border-color: #2962ff;
    box-shadow: 0 6px 20px rgba(41,98,255,0.25), inset 0 1px 2px rgba(255,255,255,0.3);
}

    input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 12px;
        font-weight: 900;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

/* Hover Effects */
input[type="radio"]:hover,
input[type="checkbox"]:hover {
    border-color: #2962ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(6,30,60,0.12), inset 0 1px 2px rgba(255,255,255,0.8);
}

/* Focus States */
input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.2), 0 6px 20px rgba(41,98,255,0.25);
}

/* ===== MESSAGE PREVIEW BUBBLE ===== */
.preview-bubble {
    position: absolute;
    right: 34px;
    top: 84px;
    width: 168px;
    border-radius: 30px 30px 22px 44px;
    background: linear-gradient(180deg, rgba(3,169,244,0.98), rgba(16,143,255,0.95));
    box-shadow: 0 28px 60px rgba(16,143,255,0.16);
    padding: 14px;
    color: #fff;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.preview-bubble-avatar {
    position: absolute;
    right: 14px;
    top: -34px;
    width: 68px;
    height: 68px;
    border-radius: 999px;
    background: linear-gradient(135deg,#4fc3f7,#2962ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 16px 44px rgba(41,98,255,0.18);
}

.preview-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.96);
    color: #052139;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(6,30,60,0.06);
    margin-bottom: 8px;
}

    .preview-menu-item:last-child {
        margin-bottom: 0;
    }

.preview-menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #eaf6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d4fa8;
    flex-shrink: 0;
}

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: 16px;
    border-left: 4px solid;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,251,255,0.96));
    box-shadow: 0 18px 44px rgba(6,30,60,0.06);
}

.alert-info {
    border-left-color: var(--accent-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

/* ===== MOBILE RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -280px;
        width: 280px;
        z-index: 1001;
        transition: all 0.3s ease;
    }

        #sidebar.active {
            margin-left: 0;
            width: 280px; /* Full width on mobile */
        }

    #content {
        margin-left: 0 !important;
        width: 100%;
    }

    /* Overlay for mobile when sidebar is open */
    #sidebar.active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .topbar {
        padding: 12px 16px;
        height: auto;
        flex-wrap: wrap;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 999;
    }

    .search-input {
        width: 200px;
    }

    .main-content {
        padding: 16px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile sidebar toggle button */
    #sidebarCollapseMobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(10,30,50,0.1);
        background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(245,251,255,0.8));
        border-radius: 10px;
        color: #052139;
    }

    .custom-alert {
        min-width: calc(100vw - 48px);
        max-width: calc(100vw - 48px);
        right: 12px;
        left: 12px;
        top: 12px;
    }

    /* Adjust dropdowns for mobile */
    .dropdown-menu {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 50% !important;
        width: 90%;
        max-width: 300px;
    }
}

@media (min-width: 769px) {
    #sidebarCollapseMobile {
        display: none !important;
    }
}

/* Animation for floating elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }

    33% {
        transform: translateY(-10px) translateX(5px);
    }

    66% {
        transform: translateY(5px) translateX(-3px);
    }
}

.floating {
    animation: float 8s ease-in-out infinite;
}

/* Ensure proper scrolling */
.container-fluid {
    padding-top: 2px !important;
}

.page-header {
    padding: 2px 0 !important;
}

    .page-header h1 {
        margin-bottom: 0 !important;
    }

.toast-success, .toast-error, .toast-info, .toast-warning {
    background: #ffffff !important;
    border-left: 4px solid !important;
    color: #052139 !important;
    font-weight: 600 !important;
    border-radius: 16px !important;
    box-shadow: 0 22px 60px rgba(6,30,60,0.12) !important;
    max-width: 350px !important;
    min-width: 250px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    padding: 16px 20px !important;
    opacity: 1 !important;
}


.toast-success {
    border-left-color: #10b981 !important;
}

.toast-error {
    border-left-color: #ef4444 !important;
}

.toast-info {
    border-left-color: #2962ff !important;
}

.toast-warning {
    border-left-color: #f59e0b !important;
}

.toast-title {
    color: #052139 !important;
    font-weight: 800 !important;
    font-size: 15px !important;
}

.toast-message {
    color: rgba(4,36,58,0.8) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.5 !important; 
    margin-top: 4px !important;
    word-break: break-word !important; 
}

.toast-progress {
    height: 3px !important;
    background: linear-gradient(90deg, #10b981, #059669) !important;
    opacity: 0.3 !important;
}

.toast-close-button {
    color: rgba(4,36,58,0.6) !important;
    opacity: 1 !important;
}

#sidebar.active .brand-text,
#sidebar.active ul li a span,
#sidebar.active .welcome-text,
#sidebar.active .account-label, 
#sidebar.active .user-email-compact, 
#sidebar.active .sidebar-footer div:not(.user-avatar-compact) {
    display: none !important;
}

#sidebar.active ul li a {
    justify-content: center;
    padding: 12px 0;
}

    #sidebar.active ul li a i {
        margin-right: 0;
        width: 36px;
        height: 36px;
    }

#sidebar.active .user-profile-compact {
    justify-content: center;
}

#sidebar.active .user-avatar-compact {
    margin: 0 auto;
}