/* ========================
   🌐 GLOBAL BASE - PREMIUM GLOSSY
======================== */
body {
    margin: 0;
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 10% 20%, rgba(238,243,247,1) 0%, rgba(219,234,254,1) 100%);
    color: #1e293b;
    position: relative;
}

/* Subtle animated background grain */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ========================
   🧱 LAYOUT
======================== */
.wrapper {
    display: flex;
    position: relative;
    z-index: 1;
}

/* CONTENT */
.content {
    margin-left: 280px;
    padding: 28px 32px;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* ========================
   📂 SIDEBAR - ULTRA GLOSSY PREMIUM
======================== */
.sidebar {
    width: 280px;
    min-height: 100vh;
    background: linear-gradient(145deg, rgba(12, 58, 88, 0.96), rgba(7, 42, 68, 0.98));
    backdrop-filter: blur(12px);
    padding: 28px 18px;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2), inset -1px 0 0 rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* Logo/Brand area */
.sidebar-brand {
    padding: 8px 16px 24px 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand h3 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #ffffff, #b8e1fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.sidebar-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin: 5px 0 0 0;
    letter-spacing: 0.5px;
}

/* section title */
.sidebar h4 {
    color: rgba(207, 232, 255, 0.7);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 20px 16px 12px;
    font-weight: 700;
}

/* group box - enhanced glassmorphism */
.menu-group {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.menu-group:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

/* links - premium style with icons */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: 14px;
    color: rgba(224, 242, 254, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Add icon spacing support */
.sidebar a i,
.sidebar a .menu-icon {
    width: 22px;
    font-size: 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

/* hover glossy effect */
.sidebar a:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    color: #ffffff;
    transform: translateX(6px);
}

.sidebar a:hover i {
    transform: scale(1.1);
}

/* active state - beautiful glow */
.sidebar a.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    color: #0f4c75;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.sidebar a.active i {
    color: #0f4c75;
}

/* Menu parent (Settings toggle) */
.menu-parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.menu-parent span:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-group.open .menu-arrow {
    transform: rotate(180deg);
}

/* Submenu styling - smooth dropdown */
.submenu {
    display: none;
    padding-left: 38px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.submenu a {
    padding: 10px 14px;
    font-size: 13px;
    color: rgba(224, 242, 254, 0.75);
    margin-bottom: 4px;
    border-radius: 12px;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}

.submenu a i {
    font-size: 13px;
    width: 20px;
}

/* Sidebar footer / user info */
.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 12px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #1e78b5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-info .name {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user-info .role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

/* ========================
   🔝 TOPBAR (GLASS PREMIUM)
======================== */
.topbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 15px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* left title */
.topbar .page-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

/* right section */
.topbar .top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* user badge - glossy */
.user-badge {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

/* logout button - glass */
.logout-btn {
    background: rgba(226, 232, 240, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
    color: #1e293b;
    text-decoration: none;
}

.logout-btn:hover {
    background: #e2e8f0;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile toggle button */
.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 8px 14px;
    border-radius: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ========================
   📊 CARDS (GLOSSY 3D)
======================== */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

/* stats */
.stat-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f4c75, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========================
   📦 BOX (GLASS)
======================== */
.card-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.card-box:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* ========================
   🔘 BUTTONS (GLOSSY)
======================== */
.btn {
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(105deg, #1e78b5, #2563eb);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-success {
    background: linear-gradient(105deg, #2bb673, #219653);
    border: none;
    box-shadow: 0 4px 12px rgba(43, 182, 115, 0.25);
}

.btn-danger {
    background: linear-gradient(105deg, #e74c3c, #c0392b);
    border: none;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
}

/* ========================
   📋 TABLE (GLASS)
======================== */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    overflow: hidden;
}

.table th {
    background: rgba(241, 245, 249, 0.8);
    padding: 14px;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table td {
    padding: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    color: #1e293b;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ========================
   🧾 FORMS (GLOSSY)
======================== */
.form-control {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.6);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    padding: 10px 16px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.25s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.2);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

textarea.form-control {
    height: auto;
    min-height: 100px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.3px;
}

/* ========================
   🔐 LOGIN (GLASS PREMIUM)
======================== */
.glass {
    background: rgba(255, 255, 255, 0.2);
    padding: 45px;
    border-radius: 32px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================
   ✨ ANIMATION
======================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================
   📢 ALERT (GLASS)
======================== */
.alert {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 14px 20px;
}

/* ========================
   📱 RESPONSIVE
======================== */
@media (max-width: 768px) {
    .sidebar {
        left: -300px;
        width: 280px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.3);
    }

    .content {
        margin-left: 0;
        padding: 20px;
    }

    .glass {
        padding: 30px 20px;
        margin: 20px;
    }

    .mobile-toggle {
        display: block;
    }

    .topbar .top-right {
        gap: 10px;
    }

    .user-badge {
        display: none;
    }
}

/* ========================
   🛠️ FIXES
======================== */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ===== SOFT STATS CARDS (GLOSSY) ===== */
.soft-card {
    background: rgba(233, 239, 245, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.25s ease;
}

.soft-card:hover {
    background: rgba(233, 239, 245, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
}

.soft-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.soft-value {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========================
   🎨 ADDITIONAL GLOSSY ENHANCEMENTS
======================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0f4c75, #2563eb);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #1e78b5);
}

::selection {
    background: rgba(37, 99, 235, 0.3);
    color: #0f172a;
}

html {
    scroll-behavior: smooth;
}

input[type="range"] {
    -webkit-appearance: none;
    background: rgba(203, 213, 225, 0.5);
    border-radius: 10px;
    height: 6px;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1e78b5);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Menu group open state for animation */
.menu-group.open .submenu {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}