:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --sidebar-width: 260px;
    --card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--gray-100); color: var(--dark); line-height: 1.5; }
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu { list-style: none; padding: 1.5rem 0; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    gap: 0.75rem;
    font-weight: 500;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    color: white;
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--primary);
}

.main { flex: 1; margin-left: var(--sidebar-width); padding: 2.5rem; }

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    background: white;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
}

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

.stat-card {
    background: white;
    padding: 1.75rem;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--gray-200);
}

.stat-card .label { color: var(--secondary); font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.025em; }
.stat-card .value { font-size: 1.875rem; font-weight: 800; margin: 0.5rem 0; color: var(--dark); }

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-size: 0.875rem;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 1rem; background: var(--gray-100); color: var(--secondary); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; }
td { padding: 1.25rem 1rem; border-bottom: 1px solid var(--gray-200); font-size: 0.9375rem; }

.badge { padding: 0.375rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(4px); }
.modal-content { background: white; margin: 5% auto; padding: 2.5rem; border-radius: 1.5rem; width: 90%; max-width: 550px; box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.875rem; color: var(--dark); }
.form-control { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--gray-200); border-radius: 0.5rem; outline: none; transition: var(--transition); font-size: 0.9375rem; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--dark); }
.login-card { background: white; padding: 3rem; border-radius: 2rem; width: 100%; max-width: 450px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }

@media print {
    .sidebar, .top-nav, .no-print { display: none !important; }
    .main { margin-left: 0 !important; padding: 0 !important; }
}
