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

:root {
    --primary: #1a5f7a;
    --primary-light: #2a7d9e;
    --secondary: #f8f9fa;
    --dark: #333;
    --light: #fff;
    --success: #28a745;
    --danger: #dc3545;
    --info: #17a2b8;
    --warning: #ffc107;
    --sidebar-width: 250px;
    --sidebar-collapse-width: 80px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

/* ===== Sidebar Styles ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, #144e65 100%);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapse-width);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.sidebar-logo i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.sidebar.collapsed .sidebar-logo span {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.sidebar-toggle:hover {
    transform: rotate(90deg);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu-item {
    position: relative;
    margin-bottom: 5px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    border-left: 3px solid transparent;
}

.sidebar-menu-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
}

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

.sidebar.collapsed .sidebar-menu-link span {
    display: none;
}

.sidebar-menu-submenu {
    background: rgba(0, 0, 0, 0.1);
    padding-left: 20px;
    display: none;
}

.sidebar-menu-item.active .sidebar-menu-submenu {
    display: block;
}

.sidebar-menu-submenu-item {
    margin-bottom: 5px;
}

.sidebar-menu-submenu-link {
    display: block;
    padding: 8px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

.sidebar-menu-submenu-link:hover {
    color: white;
}

.sidebar-menu-submenu-link.active {
    color: white;
    font-weight: 500;
}

.sidebar-menu-heading {
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
}

.sidebar.collapsed .sidebar-menu-heading {
    display: none;
}

/* ===== Main Content Styles ===== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: all var(--transition-speed) ease;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapse-width);
}

/* ===== Top Navbar Styles ===== */
.top-navbar {
    height: 70px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.navbar-menu-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark);
    cursor: pointer;
    display: none;
    margin-right: 15px;
}

.navbar-search {
    position: relative;
    width: 300px;
}

.navbar-search input {
    width: 100%;
    padding: 8px 15px 8px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    background: #f8f9fa;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

.navbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.navbar-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.navbar-nav {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-item {
    margin-left: 20px;
    position: relative;
}

.navbar-nav .nav-link {
    color: var(--dark);
    font-size: 1.1rem;
    position: relative;
}

.navbar-nav .nav-link i {
    font-size: 1.2rem;
}

.navbar-nav .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== Content Section Styles ===== */
.content-section {
    padding: 30px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.page-subtitle {
    color: #6c757d;
    margin-bottom: 30px;
}

/* ===== Card Styles ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    transition: all var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0 !important;
}

.card-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.card-body {
    padding: 25px;
}

.card-footer {
    background: white;
    border-top: 1px solid #f0f0f0;
    padding: 15px 25px;
    border-radius: 0 0 12px 12px !important;
}

/* ===== Stats Card Styles ===== */
.stats-card {
    border-radius: 12px;
    padding: 25px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stats-card-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    opacity: 0.7;
}

.stats-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stats-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stats-card-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.stats-card-change i {
    margin-right: 5px;
}

.stats-card.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.stats-card.success {
    background: linear-gradient(135deg, var(--success), #34ce57);
}

.stats-card.info {
    background: linear-gradient(135deg, var(--info), #5bc0de);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning), #ffda79);
    color: #333;
}

/* ===== Button Styles ===== */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 95, 122, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

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

.btn-success:hover {
    background: #218838;
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #138496;
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
    color: #333;
}

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

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.btn-group .btn {
    margin-right: 5px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* ===== Table Styles ===== */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #333;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark);
    padding: 15px;
    background: #f8f9fa;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* ===== Badge Styles ===== */
.badge {
    padding: 5px 10px;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 20px;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: #333;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

/* ===== Progress Bar Styles ===== */
.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
    margin-bottom: 0;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

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

.form-select {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

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

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
    color: #6c757d;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

/* ===== Alert Styles ===== */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert i {
    font-size: 1.2rem;
    margin-right: 12px;
}

.alert-primary {
    background: rgba(26, 95, 122, 0.1);
    color: var(--primary);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* ===== Dropdown Styles ===== */
.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: var(--dark);
    transition: all var(--transition-speed) ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* ===== Modal Styles ===== */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0 !important;
}

.modal-title {
    font-weight: 600;
    color: var(--dark);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 15px 25px;
    border-radius: 0 0 12px 12px !important;
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
    .sidebar {
        left: -var(--sidebar-width);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .navbar-menu-toggle {
        display: block;
    }
    
    .navbar-search {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .navbar-search {
        width: 150px;
        display: none;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .stats-card {
        padding: 20px;
    }
    
    .stats-card-icon {
        font-size: 2rem;
    }
    
    .stats-card-value {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .stats-card {
        padding: 15px;
    }
    
    .stats-card-icon {
        font-size: 1.8rem;
        right: 15px;
    }
    
    .stats-card-value {
        font-size: 1.3rem;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .btn i {
        margin-right: 5px;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th, .table td {
        padding: 8px;
    }
}