:root {
  --ink: #21445d;
  --green: #139f83;
  --paper: #f1faff;
  --line: #cfe8f4;
  --orange: #ff8b5c;
  --shadow: 0 10px 28px rgba(44, 119, 157, .11);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(116, 211, 255, .20), transparent 24rem),
    linear-gradient(180deg, #f4fbff 0, #fbfdff 38rem);
}

.topbar {
  background: rgba(255, 255, 255, .96);
  border-bottom: 3px solid #c7efff;
  box-shadow: 0 5px 18px rgba(36, 145, 194, .08);
}

.brand > span, .brand-mark {
  background: linear-gradient(145deg, #02b8ed, #168bd5);
  box-shadow: 0 7px 16px rgba(2, 164, 222, .24);
}

.topbar nav a {
  padding: 9px 11px;
  border-radius: 9px;
}

.topbar nav a:hover {
  color: #057bb8;
  background: #e3f7ff;
}

.hero {
  background: linear-gradient(115deg, #078dc7, #17b69e);
  box-shadow: 0 16px 36px rgba(11, 137, 179, .22);
}

.panel {
  border-color: #cce9f5;
  box-shadow: var(--shadow);
}

.eyebrow { color: #087db7; }
.hero .eyebrow { color: #d1f8ff; }

.stats article:nth-child(1) { background: #e5f6ff; border-color: #a9dff7; }
.stats article:nth-child(2) { background: #e9faef; border-color: #a9e4bc; }
.stats article:nth-child(3) { background: #fff5dc; border-color: #f4d98b; }
.stats article:nth-child(4) { background: #ffecef; border-color: #f4bdc8; }
.stats article strong { color: #087eb5; }
.stats article:nth-child(2) strong { color: #149761; }
.stats article:nth-child(3) strong { color: #d88711; }
.stats article:nth-child(4) strong { color: #dc5570; }

.record-form {
  padding: 18px;
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfeff, #f6fbff);
  border: 1px solid #d4edf7;
}

.record-form label {
  padding: 12px;
  border-radius: 11px;
  background: #e8f6ff;
  color: #266680;
}

.record-form label:nth-of-type(3),
.record-form label:nth-of-type(4) { background: #fff6dc; color: #8a631c; }
.record-form label:nth-of-type(5),
.record-form label:nth-of-type(6) { background: #ffefdc; color: #9a5d17; }
.record-form label:nth-of-type(7) { background: #ffe9ec; color: #a34c5c; }
.record-form label:nth-of-type(8) { background: #e8f8ec; color: #34734a; }
.record-form label:nth-of-type(9) { background: #f2ebff; color: #675090; }
.record-form .check { background: #ffe8ed; color: #ba3f5d; }

.record-form input,
.record-form select,
.record-form textarea {
  background: rgba(255,255,255,.94);
  border-color: rgba(74, 145, 174, .28);
}

.primary {
  background: linear-gradient(135deg, #02afe3, #078ed0);
  box-shadow: 0 7px 16px rgba(5, 148, 207, .20);
}
.primary:hover { filter: brightness(1.05); }
.record-form > .primary { background: linear-gradient(135deg, #00b6e8, #009bd8); font-size: 17px; }
.report-cards .panel:first-child { border-top: 6px solid #12addd; }
.report-cards .panel:last-child { border-top: 6px solid #53bd79; }
.report-cards .panel:last-child .primary { background: linear-gradient(135deg, #43b96d, #209b5c); }

.table-wrap { border-radius: 11px; border: 1px solid #d7eaf2; }
th { background: #e9f7fd; color: #33728d; }
tbody tr:hover { background: #f1fbff; }
.activity { background: #fff9ea; margin: 7px 0; padding: 12px; border-radius: 9px; border: 1px solid #f7df9f; }

@media (max-width: 900px) {
  .topbar nav { gap: 4px; }
  .record-form { padding: 10px; }
}

.topbar nav a.active {
  color: #047db5 !important;
  background: #dcf5ff;
  border: 1px solid #a8e1f7;
  box-shadow: 0 4px 10px rgba(5, 137, 189, .10);
}

.student-import-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 2px solid #7fd5f2;
  border-radius: 16px;
  background: linear-gradient(105deg, #e3f8ff, #eafbf2);
  box-shadow: 0 10px 24px rgba(6, 153, 203, .12);
}

.student-import-banner .upload-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #02b7e8, #078dcc);
  font-size: 28px;
  font-weight: 900;
}

.student-import-banner > div:nth-child(2) { flex: 1; }
.student-import-banner strong,
.student-import-banner span { display: block; }
.student-import-banner strong { color: #126b91; font-size: 18px; }
.student-import-banner span { color: #5d7c88; margin-top: 4px; font-size: 13px; }
.student-import-banner a {
  padding: 12px 20px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #08aedd, #087fbd);
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(6, 142, 196, .20);
}

.student-import-banner + .split > .panel:first-child .section-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #dceff7;
}

@media (max-width: 680px) {
  .student-import-banner { align-items: stretch; flex-direction: column; }
  .student-import-banner a { text-align: center; }
}

.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 11px;
  background: #fff5e8;
  border: 1px solid #f5d5a6;
}
.batch-toolbar > span { margin-right: auto; color: #8b6327; }
.batch-toolbar label { display: flex; align-items: center; gap: 7px; color: #765524; font-size: 13px; font-weight: 800; }
.batch-toolbar select { padding: 8px 10px; border: 1px solid #e4c18d; border-radius: 8px; background: #fff; }
.archive-button { padding: 9px 14px; border: 0; border-radius: 9px; background: #e86b55; color: #fff; font-weight: 900; cursor: pointer; }
.archive-button:disabled { opacity: .45; cursor: not-allowed; }
.select-cell { width: 42px; text-align: center; }
.select-cell input { width: 18px; height: 18px; accent-color: #079bcf; cursor: pointer; }
@media(max-width:680px){.batch-toolbar{align-items:stretch;flex-direction:column}.batch-toolbar>span{margin:0}.batch-toolbar label{justify-content:space-between}}
.student-picker{display:grid;grid-template-columns:.7fr 1fr 1.6fr;gap:12px;padding:16px;border:2px solid #9ddcf2;border-radius:14px;background:linear-gradient(105deg,#e6f8ff,#edfbf5)}.student-picker label{padding:0!important;background:transparent!important;color:#246a85!important}.student-picker select{height:46px;font-size:15px;font-weight:700}.student-picker select:disabled{background:#edf2f3;color:#8b9a9f}@media(max-width:700px){.student-picker{grid-template-columns:1fr}}
.quick-picks{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.quick-picks button{border:1px solid #7fc4d9;border-radius:999px;padding:5px 10px;background:#fff;color:#26718a;font-size:12px;font-weight:800;cursor:pointer;transition:.15s}.quick-picks button:hover{color:#fff;background:#17a6d0;transform:translateY(-1px)}.record-form label:nth-of-type(5) .quick-picks button{border-color:#e1b75d;color:#8a641b;background:#fffaf0}.record-form label:nth-of-type(7) .quick-picks button{border-color:#eba3b0;color:#a34458;background:#fff7f8}.recent-note-picks button{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-color:#b59ddd;color:#634a8b;background:#faf8ff}
.app.page-records{max-width:1920px;padding-left:clamp(18px,2.2vw,42px);padding-right:clamp(18px,2.2vw,42px)}.record-workspace{display:block}.record-workspace>.panel{min-width:0}.history-panel{position:static;max-height:none;margin-top:22px}.history-panel .table-wrap{max-height:580px;overflow:auto}.history-panel table{min-width:1050px}.history-panel thead{position:sticky;top:0;z-index:2}
.check-grid-section{grid-column:1/-1;margin:0;padding:14px 16px 16px;border:1px solid #c7dce5;border-radius:10px;background:#fff}.check-grid-section legend{padding:0 8px;color:#365d70;font-weight:900}.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:5px 10px}.check-grid label{display:flex!important;align-items:center;gap:7px;padding:7px 9px!important;border-radius:7px;background:rgba(255,255,255,.7)!important;color:#3b5663!important;font-size:14px!important;font-weight:600!important;cursor:pointer}.check-grid label:hover{filter:brightness(.97)}.check-grid input{width:17px!important;height:17px;margin:0!important;accent-color:#0aa5db}.manual-other{width:100%;margin-top:10px!important}.part-grid{background:#f4faff;border-color:#a9d9ed}.trauma-grid{background:#fff8e9;border-color:#edcf8c}.symptom-grid{background:#fff1f3;border-color:#e9b1bc}.treatment-grid{background:#effaf1;border-color:#a9d8b2}.treatment-grid .check-grid input{accent-color:#2fa861}.note-counter{display:block;margin-top:5px;text-align:right;color:#617b86;font-weight:600}.history-panel td{line-height:1.55}@media(max-width:760px){.check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.history-panel table{min-width:900px}}
.history-hero{margin-bottom:22px}.history-page-panel .section-head{margin-bottom:18px}.history-page-panel .table-wrap{max-height:calc(100vh - 330px);overflow:auto}.history-page-panel table{min-width:1250px}.history-page-panel thead{position:sticky;top:0;z-index:2}.history-page-panel td{line-height:1.55}.app.page-history{max-width:1920px;padding-left:clamp(18px,2.2vw,42px);padding-right:clamp(18px,2.2vw,42px)}
.history-filters{display:flex;align-items:flex-end;gap:14px;margin-bottom:24px;padding:16px 18px;border:1px solid #a8dced;border-radius:13px;background:linear-gradient(105deg,#e8f8ff,#effbf4)}.history-filters label{color:#246a85;font-size:13px;font-weight:900}.history-filters select{display:block;min-width:190px;margin-top:6px;padding:10px 12px;border:1px solid #9ccbdc;border-radius:9px;background:#fff}.history-filters button{padding:11px 20px;border:0;border-radius:9px;background:#078fca;color:#fff;font-weight:900;cursor:pointer}@media(max-width:680px){.history-filters{align-items:stretch;flex-direction:column}.history-filters select{width:100%}.history-filters button{width:100%}}
.history-filters input{display:block;min-width:150px;margin-top:6px;padding:10px 12px;border:1px solid #9ccbdc;border-radius:9px;background:#fff}.condition-entry-panel{border-top:6px solid #54bd79}.condition-entry-panel textarea{min-height:75px}
.page-conditions .history-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));align-items:end}.page-conditions .history-filters label,.page-conditions .history-filters select,.page-conditions .history-filters input{min-width:0;width:100%}.page-conditions .history-filters button{width:100%}.condition-entry-open{height:max-content}.condition-entry-dialog{width:min(960px,calc(100vw - 28px));max-height:calc(100vh - 28px);padding:0;border:0;border-radius:16px;background:transparent;overflow:visible}.condition-entry-dialog::backdrop{background:rgba(18,42,52,.72);backdrop-filter:blur(3px)}.condition-dialog-shell{position:relative;max-height:calc(100vh - 28px);overflow:auto;border-radius:16px;background:#fff}.condition-entry-dialog .condition-entry-panel{margin:0;border:0;border-top:7px solid #54bd79;border-radius:16px;box-shadow:none}.condition-dialog-close{position:absolute;right:14px;top:11px;z-index:3;width:40px;height:40px;border:0;border-radius:50%;background:#edf4f6;color:#315b6b;font-size:27px;cursor:pointer}.condition-dialog-close:hover{background:#dcecf2}@media(max-width:600px){.condition-entry-dialog .form-grid{grid-template-columns:1fr}.condition-entry-dialog .wide{grid-column:auto}}
.disease-quick-picks button{border-color:#e38b99;color:#9d3048;background:#fff3f5}.condition-avoid-field{padding:13px!important;border:2px solid #ef9d6f;border-radius:9px;background:#fff5ed}.condition-danger-alert{display:grid;gap:5px;margin-top:10px;padding:12px;border:2px solid #e74c3c;border-radius:8px;background:#fff0f0;color:#8d1f1f}.condition-danger-alert strong{font-size:17px}.condition-danger-alert b,.condition-danger-alert span{font-size:13px;line-height:1.5}
.output-actions,.output-actions form{display:flex;gap:8px;margin:0}.output-actions button,.report-tabs a{border:0;border-radius:9px;padding:10px 15px;background:#078fca;color:#fff;font-weight:900;cursor:pointer}.report-tabs{display:flex;gap:8px;margin:0 0 18px}.report-tabs a{background:#e5f6fc;color:#187394;border:1px solid #a8dced}.report-tabs a.active{background:#078fca;color:#fff}.condition-badge{background:#e7f6ff;color:#087ba8}.condition-bars{display:grid;gap:12px;margin-top:28px}.condition-bars>div{display:grid;grid-template-columns:130px minmax(80px,1fr) 40px;align-items:center;gap:12px}.condition-bars i{display:block;height:24px;width:var(--bar);min-width:4px;border-radius:5px;background:linear-gradient(90deg,#10afd9,#55c57d)}
@media print{.topbar,footer,.history-filters,.output-actions,.report-tabs,.hero .button{display:none!important}.app{max-width:none!important;padding:0!important}.panel,.hero{box-shadow:none;border:0}.hero{background:#fff;color:#111;padding:0 0 16px}.hero p,.hero .eyebrow{color:#333}.table-wrap{max-height:none!important;overflow:visible!important}table{font-size:10pt}}
.dental-hero{background:linear-gradient(135deg,#05a9df,#5acb86)}
.dental-stats{grid-template-columns:repeat(5,1fr)}
.dental-toolbar{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) minmax(180px,2fr) auto;gap:12px;align-items:end;margin-bottom:20px;padding:18px;border-radius:14px;background:#eafaff}
.dental-toolbar label{font-weight:800;font-size:13px}.dental-toolbar input,.dental-toolbar select{display:block;width:100%;margin-top:6px;padding:10px;border:1px solid #9bd8eb;border-radius:9px;background:#fff}
.dental-status{background:#dcf7e7;color:#16834b}.page-toothbrushing .table-wrap{max-height:62vh}.page-toothbrushing tbody tr:hover{background:#f0fbff}
.location-quick-field{grid-column:1/-1}.location-quick-picks{display:grid;grid-template-columns:repeat(6,minmax(88px,1fr));gap:8px}.location-quick-picks button{min-height:38px;border-radius:9px;border-color:#43b7da;background:#effaff;color:#126f91;font-size:13px}.location-quick-picks button:hover{background:#08a6d8;color:#fff}.record-edit-form .location-quick-picks{grid-template-columns:repeat(4,minmax(90px,1fr))}
@media(max-width:700px){.location-quick-picks,.record-edit-form .location-quick-picks{grid-template-columns:repeat(2,minmax(90px,1fr))}}
@media(max-width:900px){.dental-stats{grid-template-columns:repeat(2,1fr)}.dental-toolbar{grid-template-columns:1fr 1fr}}
.edit-record-link{display:inline-block;white-space:nowrap;padding:7px 11px;border-radius:8px;background:#e4f6fd;color:#087da9;font-weight:900}.edit-record-link:hover{background:#078fca;color:#fff}.edit-record-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(360px,.8fr);gap:22px}.record-edit-form input,.record-edit-form select,.record-edit-form textarea{display:block;width:100%;margin-top:7px;border:1px solid #9ccbdc;border-radius:9px;padding:11px;background:#fff}.edit-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px}.edit-actions a{color:#357084;font-weight:800}.revision-panel details{border:1px solid #cfe5ee;border-radius:10px;margin:10px 0;background:#f8fcfe}.revision-panel summary{padding:13px;cursor:pointer}.revision-panel summary small{display:block;color:#6a7f87;margin-top:4px}.revision-change{display:grid;grid-template-columns:90px 1fr 18px 1fr;gap:7px;padding:10px 13px;border-top:1px solid #e1edf2;font-size:12px}.revision-change del{color:#a24d4d}.revision-change ins{color:#08734f;text-decoration:none;font-weight:700}@media(max-width:960px){.edit-record-layout{grid-template-columns:1fr}}@media print{.edit-record-link{display:none!important}}
.nurse-workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}.nurse-student-panel{position:sticky;top:96px;padding:20px}.nurse-student-panel h2{font-size:25px;color:#176fa0}.student-info-card{padding:13px;border-radius:8px;background:#e3f2fd;border:1px solid #bbdefb}.student-info-card p{margin:7px 0;line-height:1.5}.student-info-card b{display:block;color:#607d8b;font-size:12px}.student-alert{color:#c62828;background:#ffebee;padding:8px;border-radius:6px}.workspace-history-head{display:flex;align-items:center;justify-content:space-between;margin-top:22px}.workspace-history-head h3{margin:0}.workspace-history-head label{font-size:13px;font-weight:800}.workspace-student-history{display:grid;gap:8px;margin-top:12px;max-height:48vh;overflow:auto}.workspace-history-item{display:grid;gap:4px;padding:11px;border:1px solid #e2d4bd;border-radius:7px;background:#fff8ed}.workspace-history-item:hover{background:#fff2c9;border-color:#f0b64e}.workspace-history-item span{font-size:13px}.workspace-history-item small{color:#6d777b}.nurse-workspace>.record-workspace{min-width:0}.nurse-workspace .record-workspace>.panel{border-radius:8px}.nurse-workspace .check-grid{grid-template-columns:repeat(5,minmax(90px,1fr))}@media(max-width:1100px){.nurse-workspace{grid-template-columns:250px minmax(0,1fr)}.nurse-workspace .check-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:800px){.nurse-workspace{grid-template-columns:1fr}.nurse-student-panel{position:static}.workspace-student-history{max-height:300px}}
.education-print-box{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 16px;border:2px solid #a5d6a7;border-radius:9px;background:#f1f8e9}.education-print-box legend{padding:0 8px;color:#256d2b;font-weight:900}.education-print-box label{display:flex!important;align-items:center;gap:7px;padding:0!important;background:transparent!important;color:#285e2c!important;font-size:15px!important}.education-print-box input{width:18px!important;height:18px;margin:0!important;accent-color:#2e7d32}.education-print-button{border:0;border-radius:7px;padding:10px 14px;background:#2e7d32;color:#fff;font-weight:900;cursor:pointer}.education-print-box small{flex-basis:100%;color:#5d7460}
.selected-student-history-panel{margin-top:20px;border-top:6px solid #f0a33a}.selected-student-history-panel .section-head{margin-bottom:16px}.selected-student-history-panel table{min-width:1050px}.selected-student-history-panel form button{border:0;border-radius:8px;padding:10px 14px;background:#2e7d32;color:#fff;font-weight:900;cursor:pointer}.temperature-alert{color:#c62828;font-weight:900;background:#fff0f0}
.history-reprint-actions{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:14px;border:2px solid #ffcc80;border-radius:9px;background:#fff8e1}.history-reprint-actions a{padding:9px 13px;border-radius:7px;background:#ef8b22;color:#fff;font-weight:900}
.history-row-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:150px}.history-row-actions .edit-record-link,.reprint-row-button{padding:6px 9px;border-radius:7px;font-size:12px;font-weight:900;white-space:nowrap}.reprint-row-button{background:#ef8b22;color:#fff}.reprint-row-button.head{background:#d85d62}.reprint-row-button:hover{filter:brightness(.92)}
