:root {
    --primary: #2196F3;
    --success: #4CAF50;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #00bcd4;
    --dark: #1e1e1e;
    --light: #f5f5f5;
    --gray: #9e9e9e;
}

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

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
}

/* LOGIN */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #1976D2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
}

.login-form {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

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

.login-footer {
    background: var(--light);
    padding: 15px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--gray);
}

.login-footer p {
    margin: 5px 0;
}

/* ALERTS */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-left: 4px solid var(--success);
}

/* BUTTONS */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #1976D2; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #388E3C; }

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

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #F57C00; }

.btn-secondary { background: var(--gray); color: white; }
.btn-secondary:hover { background: #757575; }

.btn-sm { padding: 4px 8px; font-size: 11px; }
.btn-block { width: 100%; }

/* APP LAYOUT */
.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, var(--dark) 0%, #2c2c2c 100%);
    color: white;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 22px;
    text-align: center;
}

.sidebar-nav {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(33, 150, 243, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-left: 4px solid rgba(255,255,255,0.5);
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    padding: 0 20px;
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(244, 67, 54, 0.1);
    color: #ff6b6b;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.2);
}

.main-content {
    margin-left: 250px;
    flex: 1;
    overflow-y: auto;
}

.topbar {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topbar h2 {
    font-size: 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.page-content {
    padding: 20px;
    max-width: 1400px;
}

/* DASHBOARD */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid;
}

.stat-card-primary { border-left-color: var(--primary); }
.stat-card-success { border-left-color: var(--success); }
.stat-card-danger { border-left-color: var(--danger); }
.stat-card-warning { border-left-color: var(--warning); }
.stat-card-info { border-left-color: var(--info); }

.stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 50%;
    color: var(--primary);
}

.stat-card-success .stat-icon { color: var(--success); background: rgba(76, 175, 80, 0.1); }
.stat-card-danger .stat-icon { color: var(--danger); background: rgba(244, 67, 54, 0.1); }
.stat-card-warning .stat-icon { color: var(--warning); background: rgba(255, 152, 0, 0.1); }
.stat-card-info .stat-icon { color: var(--info); background: rgba(0, 188, 212, 0.1); }

.stat-content h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-content p {
    color: var(--gray);
    font-size: 13px;
}

.dashboard-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.dashboard-actions h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.action-btn {
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
}

.action-btn-primary { background: linear-gradient(135deg, var(--primary) 0%, #1976D2 100%); }
.action-btn-success { background: linear-gradient(135deg, var(--success) 0%, #388E3C 100%); }
.action-btn-info { background: linear-gradient(135deg, var(--info) 0%, #0097A7 100%); }

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.action-btn i {
    font-size: 24px;
}

/* PAGES */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 24px;
}

.form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    flex: 1;
}

/* TABLES */
.table-responsive {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 13px;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

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

/* BADGES */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: rgba(76, 175, 80, 0.2); color: #2e7d32; }
.badge-danger { background: rgba(244, 67, 54, 0.2); color: #c62828; }

/* SIDEBAR MENUS */
.nav-section {
    padding-top: 10px;
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
}

.nav-toggle:hover {
    background: rgba(33, 150, 243, 0.1);
    color: white;
}

.nav-toggle i:first-child {
    margin-right: 12px;
}

.nav-toggle .fa-chevron-down {
    font-size: 12px;
    margin-left: auto;
}

.nav-submenu {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-submenu.active {
    display: block;
    max-height: 500px;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 50px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.submenu-item:hover {
    color: white;
    background: rgba(33, 150, 243, 0.05);
}

.submenu-item i {
    width: 16px;
    margin-right: 10px;
}
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 10px 0;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .nav-item span {
        display: none;
    }

    .nav-item i {
        margin-right: 0;
    }

    .main-content {
        margin-left: 60px;
    }

    .topbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
