* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f6f9;
    margin: 0;
    color: #1f2937;
}
.topbar {
    background: #1e3a8a;
    color: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 18px; }
.topbar nav a {
    color: #dbeafe;
    text-decoration: none;
    margin-left: 14px;
    font-size: 14px;
    padding: 6px 8px;
    border-radius: 4px;
}
.topbar nav a:hover, .topbar nav a.active { background: rgba(255,255,255,0.15); color: white; }
.container { max-width: 1200px; margin: 24px auto; padding: 0 20px 60px; }
h1 { font-size: 22px; margin-bottom: 4px; }
h2 { font-size: 18px; margin-top: 28px; }
.subtitle { color: #6b7280; margin-bottom: 20px; }
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; }
th { background: #f1f5f9; }
.btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}
.btn:hover { background: #1d4ed8; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }
.btn.secondary { background: #6b7280; }
.btn.secondary:hover { background: #4b5563; }
.btn.small { padding: 4px 10px; font-size: 12px; }
form.inline { display: inline; }
input[type=text], input[type=number], input[type=password], select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}
label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 4px; margin-top: 10px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 160px; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert.warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; color: white; }
.tt-cell { min-width: 90px; font-size: 12px; text-align: center; vertical-align: middle; }
.tt-cell .subj { font-weight: 700; }
.tt-cell .teach { color: #6b7280; font-size: 11px; }
.tt-recess { background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 6px, #e5e7eb 6px, #e5e7eb 12px); text-align: center; font-size: 11px; color: #9ca3af; }
.login-box { max-width: 360px; margin: 80px auto; }
select[multiple] { min-height: 140px; }
.pill { display: inline-block; background: #eef2ff; color: #3730a3; padding: 3px 9px; border-radius: 14px; font-size: 12px; margin: 2px; }
@media print {
    .topbar, .no-print { display: none !important; }
    body { background: white; }
    .container { margin: 0; padding: 0; }
}
