* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f0f2f5; color: #1a1a2e; line-height: 1.5; }
a { color: #4361ee; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #1a1a2e; color: #fff; display: flex; flex-direction: column; position: fixed; height: 100vh; }
.logo { padding: 1.5rem; font-size: 1.25rem; font-weight: 700; border-bottom: 1px solid #2d2d44; }
.sidebar nav { flex: 1; padding: 1rem 0; }
.sidebar nav a { display: block; padding: 0.75rem 1.5rem; color: #a0a0b8; transition: all 0.2s; }
.sidebar nav a:hover, .sidebar nav a.active { background: #2d2d44; color: #fff; text-decoration: none; }
.user-info { padding: 1rem 1.5rem; border-top: 1px solid #2d2d44; font-size: 0.875rem; }
.user-info a { color: #f72585; margin-left: 0.5rem; }

.content { margin-left: 240px; flex: 1; }
.topbar { background: #fff; padding: 1rem 2rem; border-bottom: 1px solid #e0e0e0; }
.topbar h1 { font-size: 1.5rem; font-weight: 600; }
.page-body { padding: 2rem; }

.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); padding: 1.5rem; margin-bottom: 1.5rem; }
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; color: #333; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-card .label { font-size: 0.8rem; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; margin-top: 0.25rem; }
.stat-card.blue .value { color: #4361ee; }
.stat-card.green .value { color: #2ec4b6; }
.stat-card.orange .value { color: #ff9f1c; }
.stat-card.red .value { color: #e63946; }

table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
table th { background: #f8f9fa; font-weight: 600; font-size: 0.85rem; color: #555; }
table tr:hover { background: #fafafa; }

.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; border: none; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.btn-primary { background: #4361ee; color: #fff; }
.btn-primary:hover { background: #3a56d4; text-decoration: none; color: #fff; }
.btn-success { background: #2ec4b6; color: #fff; }
.btn-danger { background: #e63946; color: #fff; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem;
}
.form-group textarea { min-height: 120px; font-family: inherit; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e2e3e5; color: #383d41; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.login-box { background: #fff; padding: 2.5rem; border-radius: 12px; width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.login-box h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.login-box .form-group { margin-bottom: 1.25rem; }
.login-box .btn { width: 100%; padding: 0.75rem; font-size: 1rem; }

@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .content { margin-left: 0; }
    .wrapper { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
}
