* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #061a40 0%, #08275c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-subtitle,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .notif-badge {
    display: none;
}

.sidebar-header {
    padding: 20px;
    background: #04132f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
}

.sidebar-header small {
    color: #adb5bd;
    font-size: 0.75rem;
}

.sidebar-menu {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: #b8c7ce;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid transparent;
    border-radius: 14px;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-menu a i {
    margin-right: 12px;
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar.collapsed .sidebar-menu a i {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
    padding: 12px 0;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
}

.sidebar-footer::before {
    content: '';
    display: block;
    height: 1px;
    margin: 8px 6px 14px;
    background: rgba(255, 255, 255, 0.10);
}

.sidebar-menu a.logout-link {
    background: rgba(220, 53, 69, 0.14);
    border-color: rgba(220, 53, 69, 0.18);
    color: #ffffff;
}

.sidebar-menu a.logout-link:hover {
    background: rgba(220, 53, 69, 0.22);
    border-color: rgba(220, 53, 69, 0.28);
}

.notif-badge {
    background: #dc3545;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: all 0.3s ease;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: 70px;
    width: calc(100% - 70px);
}

.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.icon-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.icon-btn:hover {
    background: #f8fafc;
}

.icon-btn:active {
    transform: translateY(1px);
}

.user-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.user-btn:hover {
    background: #f8fafc;
}

.user-name {
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}

.user-role {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: capitalize;
}

.user-caret {
    color: #64748b;
    font-size: 12px;
}

.header-left h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #061a40 0%, #0b3b8c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content {
    padding: 30px;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f2f5;
    padding: 18px 24px;
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    padding: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, #0b3b8c 0%, #082b66 100%);
    border-color: #0b3b8c;
    border-radius: 10px;
    padding: 10px 24px;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border-color: #198754;
    border-radius: 10px;
    padding: 10px 24px;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    border-color: #dc3545;
    border-radius: 10px;
    padding: 10px 24px;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    border-color: #ffc107;
    color: #000;
    border-radius: 10px;
    padding: 10px 24px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 11px 16px;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -260px;
    }
    .sidebar.active {
        margin-left: 0;
    }
    .sidebar.collapsed {
        margin-left: -70px;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -260px;
    }
    .sidebar.active {
        margin-left: 0;
    }
    .sidebar.collapsed {
        margin-left: -70px;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 15px;
    }
    .header {
        padding: 12px 20px;
    }
}
