/* ============================================================
   Elder Friendly Large Font Override
   ใช้สำหรับผู้ใช้งานครู/เจ้าหน้าที่สูงอายุ: เพิ่มขนาดตัวอักษรทั้งระบบ
   ============================================================ */
:root{
  --elder-font-base: 20px;
  --elder-font-small: 18px;
  --elder-font-table: 18px;
  --elder-font-menu: 20px;
  --elder-font-button: 19px;
  --elder-line: 1.72;
}
html{font-size: var(--elder-font-base) !important;}
body{
  font-size: var(--elder-font-base) !important;
  line-height: var(--elder-line) !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body, body *:not(.material-icons):not([class^="ti-"]):not([class*=" ti-"]){
  font-family: 'Sarabun','TH Sarabun New','TH SarabunPSK',sans-serif !important;
}
/* ข้อความทั่วไป */
p, span, div, li, label, a, td, th, small{
  line-height: var(--elder-line) !important;
}
small, .small, .text-muted, .breadcrumb, .dash-header p, .sidebar-brand p{
  font-size: 17px !important;
}
/* หัวข้อ */
h1, .dash-header h1{font-size: 30px !important; line-height:1.35 !important; font-weight:800 !important;}
h2, .card-header h2{font-size: 25px !important; line-height:1.4 !important; font-weight:800 !important;}
h3{font-size: 23px !important; line-height:1.45 !important; font-weight:800 !important;}
h4{font-size: 21px !important; line-height:1.5 !important; font-weight:700 !important;}
/* Sidebar / เมนู */
.sidebar{width: 292px !important;}
.dash-main{margin-left:0;}
.sidebar-brand h2{font-size: 21px !important; line-height:1.55 !important; font-weight:800 !important;}
.sidebar-menu li a,
.sidebar-menu a,
.sidebar .menu a,
.nav-link{
  font-size: var(--elder-font-menu) !important;
  line-height:1.55 !important;
  font-weight:700 !important;
  min-height: 58px !important;
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}
.sidebar-menu .section-title,
.menu-section,
.sidebar .section-title{
  font-size: 18px !important;
  font-weight:800 !important;
  letter-spacing:0 !important;
}
/* การ์ด / Dashboard */
.card, .stat-card, .dash-header, .alert{
  font-size: var(--elder-font-base) !important;
}
.stat-card .label{font-size: 19px !important; font-weight:800 !important;}
.stat-card .value{font-size: 36px !important; line-height:1.2 !important; font-weight:900 !important;}
/* ตาราง */
table, .data-table{
  font-size: var(--elder-font-table) !important;
}
th, td,
.data-table th, .data-table td,
table th, table td{
  font-size: var(--elder-font-table) !important;
  line-height:1.65 !important;
  padding: 19px 18px !important;
  vertical-align: middle !important;
}
th, .data-table th, table th{font-weight:800 !important;}
/* ปุ่ม / badge */
.btn, button, input[type="submit"], input[type="button"], a.btn,
.badge, .status-badge{
  font-size: var(--elder-font-button) !important;
  line-height:1.35 !important;
  font-weight:800 !important;
}
.btn, button.btn, a.btn, input[type="submit"], input[type="button"]{
  min-height: 52px !important;
  padding: 13px 24px !important;
  border-radius: 16px !important;
}
.btn-sm, .btn.btn-sm, a.btn-sm{
  min-height: 46px !important;
  padding: 10px 18px !important;
  font-size: 18px !important;
}
.badge, .status-badge{
  padding: 8px 15px !important;
  border-radius: 999px !important;
}
/* ฟอร์ม */
input, select, textarea, .form-control{
  font-size: 20px !important;
  line-height:1.55 !important;
  min-height: 54px !important;
  padding: 12px 15px !important;
}
textarea{min-height:120px !important;}
.form-group label, label{font-size:20px !important;font-weight:800 !important;}
/* หน้าให้คะแนน */
.score-topbar, .score-card, .score-section, .practical-form{
  font-size: 20px !important;
}
.score-display{font-size: 52px !important;}
.score-pad button, .score-option, .score-choice{
  font-size: 22px !important;
  min-height: 58px !important;
}
/* มือถือ/แท็บเล็ต */
@media (max-width: 900px){
  html{font-size:18px !important;}
  body{font-size:18px !important;}
  .sidebar{width:min(90vw,330px) !important;}
  .sidebar-menu li a,.sidebar-menu a{font-size:19px !important;}
  th,td,.data-table th,.data-table td{font-size:17px !important;padding:14px 12px !important;}
}
