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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --bg-main: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-hover: #1e293b;
    --card-shadow: 0 10px 35px rgba(0, 0, 0, 0.03);
    --card-border: 1px solid rgba(241, 245, 249, 0.8);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: #1e293b;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
}

.sidebar .brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .nav-list {
    padding: 1rem 0.75rem;
    list-style: none;
    margin: 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar .nav-list::-webkit-scrollbar {
    width: 4px;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

.sidebar .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Header Navbar */
.top-navbar {
    margin-left: 260px;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

/* Content Area */
.main-wrapper {
    margin-left: 260px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
    transition: all 0.3s ease;
}

/* Premium Dashboard Card Layouts */
.premium-card {
    background: #fff;
    border-radius: 16px;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: all 0.2s ease;
}

.premium-card.primary-indicator::before {
    background: var(--primary-color);
}

.premium-card.success-indicator::before {
    background: #10b981;
}

.premium-card.warning-indicator::before {
    background: #f59e0b;
}

.premium-card.danger-indicator::before {
    background: #ef4444;
}

/* Custom Gradient Button */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
    transition: all 0.2s ease;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4f46e5 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    color: #fff;
}

/* Glassmorphic Login Layout */
.login-bg {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, rgba(248, 250, 252, 1) 90.2%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    transition: transform 0.3s ease;
}

/* Status Indicator Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot.inactive {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* Table Enhancements */
.table-premium th {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table-premium td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Toast Container positioning */
.toast-container {
    z-index: 1100;
}

/* Responsive collapse adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .top-navbar {
        margin-left: 0;
    }
    .main-wrapper {
        margin-left: 0;
    }
}
