:root {
    --primary: #0F172A;
    --secondary: #3B82F6;
    --accent: #10B981;
    --bg: #F9FAFB;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --text: #1F2937;
    --text-light: #6B7280;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    font-size: 2rem;
    color: #0F172A;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.btn:hover {
    background: #2563EB;
}

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

.btn-success:hover {
    background: #059669;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(16,185,129,0.1);
    color: #059669;
    border-left: 4px solid #10B981;
}

.alert-danger {
    background: rgba(239,68,68,0.1);
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--primary);
    color: white;
    padding: 2rem 0;
    position: fixed;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-item {
    display: block;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    border-left-color: var(--secondary);
}

.nav-item.active {
    background: rgba(59,130,246,0.15);
    color: white;
    border-left-color: var(--secondary);
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.top-bar h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
}

.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
}

th {
    background: var(--bg);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

td {
    border-top: 1px solid var(--border);
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-info {
    background: rgba(59,130,246,0.1);
    color: var(--secondary);
}

.badge-success {
    background: rgba(16,185,129,0.1);
    color: var(--accent);
}

.action-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 6px;
}

.form-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .main-content {
        margin-left: 0;
    }
}
