* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    color: #1f2933;
    background: #f4f7f9;
    line-height: 1.5;
}
a { color: #1769aa; text-decoration: none; }
.topbar {
    background: #184e77;
    color: #fff;
    min-height: 64px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: hidden;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.topbar .brand img.school-logo {
    display: block;
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: contain;
    flex: 0 0 auto;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 700; line-height: 1.25; }
.topbar nav a { color: #fff; margin-left: 14px; font-size: 14px; }
.container { max-width: 1180px; margin: 24px auto; padding: 0 16px; }
.site-footer {
    margin: 28px 0 0;
    padding: 12px 16px;
    color: #486581;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #d9e2ec;
    background: #fff;
}
.login-wrap { max-width: 460px; margin: 54px auto; padding: 0 16px; }
.panel, .card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}
.panel h2, .card h3 { margin-top: 0; color: #102a43; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: block; margin: 10px 0 5px; font-weight: 700; }
input[type=text], input[type=password], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bcccdc;
    border-radius: 6px;
    font-size: 15px;
}
.btn {
    display: inline-block;
    border: 0;
    border-radius: 6px;
    background: #1b7f79;
    color: #fff;
    padding: 10px 16px;
    font-size: 15px;
    cursor: pointer;
}
.btn.secondary { background: #486581; }
.btn.print { background: #334e68; }
.alert { background: #fff4e5; color: #7c4700; border: 1px solid #ffd08a; border-radius: 6px; padding: 12px; margin-bottom: 16px; }
.success { background: #e3f9e5; color: #155724; border-color: #9be7a8; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #e6eef5; padding: 10px; text-align: left; vertical-align: top; }
th { background: #edf4f7; color: #243b53; }
.report-table { font-size: 13px; }
.report-table th, .report-table td { text-align: center; }
.report-table td:nth-child(2), .report-table th:nth-child(2) { text-align: left; min-width: 160px; }
.report-table .btn { padding: 7px 10px; font-size: 13px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.normal { background: #d8f3dc; color: #1b5e20; }
.watch { background: #fff3bf; color: #7a4f01; }
.risk { background: #ffd6d6; color: #8a1c1c; }
.question { padding: 12px 0; border-bottom: 1px solid #eef2f5; }
.question-title { font-weight: 700; margin-bottom: 8px; }
.choices label { display: inline-block; font-weight: 400; margin-right: 20px; }
.actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.summary-number { font-size: 34px; font-weight: 700; color: #102a43; }
.bar-chart { margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 54px; gap: 10px; align-items: center; margin: 10px 0; }
.bar-track { background: #d9e2ec; height: 24px; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 24px; background: #1b7f79; }
.bar-fill.watch { background: #f0b429; }
.bar-fill.risk { background: #d64545; }
.muted { color: #627d98; font-size: 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters div { min-width: 150px; }
@media (max-width: 820px) {
    .grid, .grid-2 { grid-template-columns: 1fr; }
    .topbar { display: block; }
    .brand { align-items: flex-start; }
    .topbar .brand img.school-logo { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; }
    .topbar nav { margin-top: 8px; }
    .bar-row { grid-template-columns: 95px 1fr 42px; }
}
@media print {
    body { background: #fff; }
    .topbar nav, .actions, .filters, .no-print { display: none !important; }
    .container { margin: 0; max-width: none; }
    .panel, .card { box-shadow: none; border-color: #999; page-break-inside: avoid; }
    .topbar { color: #000; background: #fff; border-bottom: 1px solid #999; }
    .topbar .brand img.school-logo { width: 38px !important; height: 38px !important; max-width: 38px !important; max-height: 38px !important; }
    .site-footer { color: #000; border-top: 1px solid #999; }
    .report-table { font-size: 11px; }
    th, td { padding: 5px; }
}
