:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --info-color: #4895ef;
    --warning-color: #f72585;
    --danger-color: #e63946;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 250px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #333;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    margin-bottom: 15px;
    width: 80px;
    height: 80px;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.login-header p {
    color: #6c757d;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu-dropdown .submenu {
    list-style: none;
    padding-left: 30px;
    background: rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.menu-dropdown.active .submenu {
    max-height: 500px;
}

.menu-dropdown .submenu li {
    border-bottom: none;
}

.menu-dropdown .submenu a {
    padding: 12px 20px;
    font-size: 0.9rem;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
}

.header {
    background: white;
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.content {
    padding: 20px;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.page-header p {
    color: #6c757d;
    margin: 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: none;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(247, 37, 133, 0.1);
    color: var(--warning-color);
}

.stat-icon.danger {
    background: rgba(230, 57, 70, 0.1);
    color: var(--danger-color);
}

.stat-icon.info {
    background: rgba(72, 149, 239, 0.1);
    color: var(--info-color);
}

.stat-info h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-info p {
    margin: 0;
    color: #6c757d;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
    outline: none;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-primary.active {
    background: var(--primary-color);
    color: white;
}

/* Charts */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.chart-header {
    margin-bottom: 20px;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(247, 37, 133, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(230, 57, 70, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(72, 149, 239, 0.1);
    color: var(--info-color);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.action-btn.edit {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

.action-btn.delete {
    background: rgba(230, 57, 70, 0.1);
    color: var(--danger-color);
}

.action-btn:hover {
    opacity: 0.8;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .header-user span {
        display: none;
    }
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-danger {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}
