/* Admin Panel Premium Design System - Light Edition */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors - Midnight Sapphire Theme */
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #7209b7;
    --bg-main: #f8faff;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border-color: #f1f5f9;

    /* Dimensions */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 16px;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- Layout --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    background-color: var(--bg-main);
}

/* --- Sidebar --- */
.portal-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-sidebar);
    color: var(--text-muted);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    border-right: 1px solid var(--border-color);
}

.admin-logo, .portal-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.admin-logo span {
    color: var(--primary);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
}

.side-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: #a0aec0;
    margin: 20px 0 10px 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-link i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 12px;
    text-align: center;
    opacity: 0.7;
}

.nav-link:hover {
    background: rgba(67, 97, 238, 0.05);
    color: var(--primary) !important;
}

.nav-link.active {
    background: var(--primary);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.nav-link.active i {
    opacity: 1;
}

/* --- Glassmorphism --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* --- Header --- */
.admin-header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    transition: left 0.3s ease;
}

.header-search input {
    background: #f1f5f9;
    border: 1px solid transparent;
    padding: 8px 15px;
    border-radius: 20px;
    width: 250px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.header-search input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    outline: none;
}

/* --- Cards --- */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 700;
    color: var(--text-main);
}

/* --- Stats --- */
.icon-box-lg {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    background: var(--primary);
}

.bg-soft-primary { background: rgba(220, 53, 69, 0.1); color: var(--primary); }
.bg-soft-success { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.bg-soft-warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.bg-soft-info { background: rgba(23, 162, 184, 0.1); color: #17a2b8; }

/* --- Tables --- */
.table thead th {
    background: #f8f9fa;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* --- Forms --- */
.form-control, .form-select {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-label {
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.875rem;
}

/* --- Buttons --- */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-outline-secondary {
    border-color: #d1d5db;
    color: #4b5563;
}

/* Responsive */
@media (max-width: 991px) {
    .portal-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .portal-sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .admin-header {
        left: 0 !important;
    }
}

.nav-link.text-danger {
    color: #dc3545 !important;
}
.nav-link.text-danger:hover {
    color: #bd2130 !important;
    background: rgba(220, 53, 69, 0.05) !important;
}