:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 260px;
    --header-height: 60px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: var(--dark);
    overflow-x: hidden;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: var(--primary);
    padding: 40px 30px 30px;
    text-align: center;
    color: #fff;
}

.login-logo {
    font-size: 60px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

.login-form {
    padding: 35px 30px;
}

.login-footer {
    text-align: center;
    padding: 15px;
    background: var(--light);
    font-size: 13px;
    color: var(--secondary);
}

.btn-login {
    padding: 12px;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    margin-left: calc(var(--sidebar-width) * -1);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand i {
    font-size: 28px;
    color: var(--warning);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.sidebar-content {
    padding: 15px 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: var(--primary);
}

.nav-item .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-section {
    padding: 15px 20px 8px;
    margin-top: 5px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 600;
}

.submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.15);
}

.has-submenu.open .submenu {
    max-height: 500px;
}

.has-submenu .nav-link .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.has-submenu.open .nav-link .fa-chevron-down {
    transform: rotate(180deg);
}

.submenu .nav-link {
    padding-left: 52px;
    font-size: 13px;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: 0;
}

.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark);
    cursor: pointer;
    padding: 5px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 14px;
}

.search-input {
    padding: 8px 15px 8px 35px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 14px;
    width: 280px;
    transition: var(--transition);
}

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

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
}

.search-result-item:hover {
    background: var(--light);
}

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

.header-item {
    position: relative;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.header-link:hover {
    background: var(--light);
}

.badge-notification {
    position: absolute;
    top: 2px;
    right: 8px;
    font-size: 10px;
    padding: 2px 6px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    margin-top: 5px;
}

.notification-dropdown {
    width: 350px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #f1f5f9;
}

.notification-item:hover {
    background: var(--light);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.notification-content p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.notification-content small {
    color: var(--secondary);
    font-size: 11px;
}

.user-dropdown {
    width: 200px;
}

.dropdown-header {
    font-size: 13px;
    font-weight: 600;
}

.dropdown-item-text {
    padding: 5px 15px;
    font-size: 12px;
}

.content-wrapper {
    padding: 25px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.page-header p {
    margin: 5px 0 0;
    color: var(--secondary);
    font-size: 14px;
}

.card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    font-size: 15px;
}

.card-body {
    padding: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.stat-info p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--secondary);
}

.table {
    font-size: 14px;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    padding: 12px 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

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

.badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

.badge-sm {
    font-size: 11px;
    padding: 3px 8px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 16px;
}

.btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

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

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

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

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

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.form-control {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-label {
    font-weight: 500;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 18px;
}

.form-select {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 12px 18px;
    font-size: 14px;
}

.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid #f1f5f9;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--secondary);
}

.empty-state i {
    font-size: 60px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 8px;
}

.dataTables_wrapper {
    padding: 0;
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.page-link {
    color: var(--primary);
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    .sidebar.active {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .sidebar-toggle {
        display: block;
    }
    .search-input {
        width: 150px;
    }
    .user-name {
        display: none !important;
    }
}
