@font-face { font-family:"Sarabun"; font-style:normal; font-weight:400; font-display:swap; src:url("../fonts/sarabun/Sarabun-Regular.ttf") format("truetype"); }
@font-face { font-family:"Sarabun"; font-style:normal; font-weight:500; font-display:swap; src:url("../fonts/sarabun/Sarabun-Medium.ttf") format("truetype"); }
@font-face { font-family:"Sarabun"; font-style:normal; font-weight:600; font-display:swap; src:url("../fonts/sarabun/Sarabun-SemiBold.ttf") format("truetype"); }
@font-face { font-family:"Sarabun"; font-style:normal; font-weight:700; font-display:swap; src:url("../fonts/sarabun/Sarabun-Bold.ttf") format("truetype"); }
/* Shared Sarabun typography. Original UI is archived as version.1. */
@media screen {
body {
  --system-font:"Sarabun",Tahoma,Arial,sans-serif;
  --font-size-base:14px;
  --font-size-ui:14px;
  --font-size-small:12px;
  --font-size-navbar:13px;
  --apple-sub:#526174;
  font-size:14px!important;
  line-height:1.55;
}
body,
body :is(button,input,select,textarea,.btn,.form-control,.form-select,.modal,.table) {
  font-family:var(--system-font)!important;
}
body .content-shell { font-size:14px!important; line-height:1.55; padding-inline:16px; }
body .page-title { font-size:clamp(22px,2vw,26px)!important; font-weight:700; line-height:1.35; letter-spacing:normal; }
body .section-title { font-size:18px!important; font-weight:600; line-height:1.5; letter-spacing:normal; }
body :is(.page-subtitle,.section-hint,.table-summary,.form-text,.dashboard-label,.dashboard-note,.mini-sub,.hero-term .label,.year-chart-track span) { font-size:14px!important; line-height:1.65; }
body :is(.dashboard-note,.section-hint,.page-subtitle) { white-space:normal; overflow-wrap:anywhere; }
body :is(.mini-title,.quick-link,.empty-state,.alert-soft) { font-size:14px!important; line-height:1.65; }
body .dashboard-value { font-size:clamp(24px,2.5vw,30px); font-weight:700; line-height:1.3; letter-spacing:normal; font-variant-numeric:tabular-nums; }
body .dashboard-value.finance-value { font-size:clamp(22px,2vw,26px); }
body .hero-term .value { font-size:20px; line-height:1.5; }
body :is(.badge-soft,.badge) { font-size:13px!important; line-height:1.5; white-space:normal; }
body .table :is(th,td) { font-size:13px!important; line-height:1.6; }
body .table th { font-weight:600; }
body :is(.btn,.form-control,.form-select) { font-size:14px!important; line-height:1.5; min-height:38px; }
/* Keep native year/term pickers, including their keyboard and mobile behavior. */
body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]):not([multiple]):not([size]) {
  appearance:none;
  -webkit-appearance:none;
  box-sizing:border-box;
  width:100%;
  min-width:0!important;
  max-width:100%;
  min-height:38px;
  padding:7px 34px 7px 36px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18M8 15h2M14 15h2'/%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position:left 10px center,right 10px center;
  background-size:18px 18px,14px 14px;
  background-repeat:no-repeat;
  color:#1e293b;
  font-size:14px!important;
  font-weight:500;
  line-height:1.5;
  font-variant-numeric:tabular-nums;
  text-overflow:ellipsis;
  cursor:pointer;
  transition:border-color .15s,box-shadow .15s;
}
body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]):not([multiple]):not([size]):not(:disabled):not(.is-invalid):not(.is-valid):hover { border-color:#93c5fd; }
body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]):not([multiple]):not([size]):focus-visible { outline:2px solid #2563eb; outline-offset:2px; box-shadow:0 0 0 4px #2563eb14; }
body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]):disabled { background-color:#f1f5f9; color:#64748b; cursor:not-allowed; }
body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]).is-invalid { border-color:#dc3545; }
body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]).is-valid { border-color:#198754; }
@media (forced-colors:active) {
  body select { appearance:auto!important; background-image:none!important; padding-inline:12px!important; }
}
body .mini-row>div,body .page-hero .d-flex>div { min-width:0; }
body .hero-term { min-width:min(240px,100%); }
body .app-navbar { --font-size-ui:15px; line-height:1.6; }
body .app-navbar .nav-link { font-size:13px!important; line-height:1.6; font-weight:500; padding:7px 8px!important; }
body .app-navbar .dropdown-item { font-size:13px!important; line-height:1.65; }
body .app-navbar :is(.nav-submenu-title,.personnel-title,.registry-title,.student-menu-title,.behavior-menu-title,.dropdown-header) { font-size:13px!important; line-height:1.6; font-weight:700; }
body .app-navbar :is(.personnel-subtitle,.nav-name,.nav-logout) { font-size:13px!important; line-height:1.6; }
body .app-navbar :is(.nav-role-label,.nav-language a,.nav-brand-copy small) { font-size:12px!important; line-height:1.5; letter-spacing:normal; }
body .app-navbar .navbar-brand { font-size:18px!important; letter-spacing:normal; }
body .app-navbar .nav-link:is(.active,.active-parent) { font-weight:700; }
@media (min-width:1400px) and (max-width:1599.98px) {
  body .app-navbar .nav-link { font-size:14px!important; padding:7px 6px!important; }
}
@media (max-width:575.98px) {
  body .apple-card-header { padding:12px; }
  body .mini-row { flex-wrap:wrap; }
  body .section-title { font-size:18px!important; }
}
/* Compact screen density; keep print layouts independent. */
body :is(.btn,.form-control,.form-select) { padding-block:6px; border-radius:8px; }
body .btn { padding-inline:12px; }
body .btn-sm { min-height:30px; font-size:12px!important; padding:4px 9px; }
body .table :is(th,td) { padding:8px 10px; }
body .apple-card-header { padding:12px 16px; }
body :is(.apple-card,.form-card,.list-card) { border-radius:14px; }
body .card-body { padding:16px; }
body :is(.page-subtitle,.section-hint,.table-summary,.form-text,.dashboard-label,.dashboard-note,.mini-sub) { font-size:13px!important; }
@media (pointer:coarse), (max-width:575.98px) {
  body :is(.btn,.form-control,.form-select) { min-height:44px; }
  body :is(input.form-control,select.form-select,textarea.form-control) { font-size:16px!important; }
  body select:is([name="academic_year"],[name="year"],[name="semester"],[name="semester_no"],[name="term_id"],[name$="_term_id"],[name="source_year"]):not([multiple]):not([size]) { min-height:44px; font-size:16px!important; }
}

}
