:root {
    --primary: #4a90e2;
    --primary-dark: #357abd;
    --success: #5cb85c;
    --danger: #d9534f;
    --warning: #f0ad4e;
    --purple: #9b59b6;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-dark: #2d3748;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.logo {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.version {
    font-size: 12px;
    opacity: 0.7;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    border-left: 4px solid white;
}

.nav-item .icon {
    font-size: 20px;
}

.nav-item.logout {
    color: var(--danger);
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    opacity: 0.8;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    max-width: 100%;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card.blue { border-left: 4px solid var(--primary); }
.stat-card.green { border-left: 4px solid var(--success); }
.stat-card.purple { border-left: 4px solid var(--purple); }
.stat-card.red { border-left: 4px solid var(--danger); }

.stat-icon {
    font-size: 48px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 13px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: var(--bg-dark);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: var(--bg-light);
}

@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
    
    .sidebar.mobile-hidden {
        transform: translateX(-100%);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 15px 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
    
    .sidebar.mobile-hidden {
        transform: translateX(-100%);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 15px 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .card {
        padding: 15px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}