*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: #f0f2f5; color: #333; }

/* LOGIN */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.1); width: 360px; }
.login-box h2 { text-align: center; margin-bottom: 24px; color: #2c3e50; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; transition: border .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #3498db;
}
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 6px;
    cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s; }
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-danger  { background: #e74c3c; color: #fff; }
.btn-danger:hover  { background: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; text-align: center; }

/* LAYOUT */
.sidebar { position: fixed; top: 0; left: 0; width: 240px; height: 100vh;
    background: #2c3e50; color: #ecf0f1; overflow-y: auto; }
.sidebar .logo { padding: 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid #34495e; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    color: #bdc3c7; text-decoration: none; font-size: 14px; transition: background .2s; }
.sidebar nav a:hover, .sidebar nav a.active { background: #34495e; color: #fff; }
.sidebar nav .nav-section { padding: 10px 20px 4px; font-size: 11px; text-transform: uppercase;
    color: #7f8c8d; letter-spacing: 1px; }

.main { margin-left: 240px; padding: 30px; min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar h1 { font-size: 22px; color: #2c3e50; }

/* CARDS */
.card { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.07); padding: 24px; margin-bottom: 24px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h2 { font-size: 16px; color: #2c3e50; }

/* TABLE */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { background: #f8f9fa; padding: 10px 12px; text-align: left; font-weight: 600;
    border-bottom: 2px solid #dee2e6; }
tbody td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
tbody tr:hover { background: #fafafa; }

/* BADGES */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info    { background: #d1ecf1; color: #0c5460; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.07);
    text-align: center; }
.stat-card .num { font-size: 32px; font-weight: 700; color: #3498db; }
.stat-card .lbl { font-size: 13px; color: #7f8c8d; margin-top: 4px; }

@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .main { margin-left: 0; padding: 16px; }
}
