/* ===================================================================
   scholarshipProject — หลังบ้านเจ้าหน้าที่ (prefix: sa- = โครงหน้า, st- = ส่วนประกอบ)
   แนวเดียวกับเว็บ Global Internship: เรียบ เส้นบาง สีกรมท่าเข้ม ไม่มีไล่สี ไม่มีเงา · ฟอนต์ Prompt
   =================================================================== */

:root {
  --navy: #0F2A56;
  --navy-2: #1A3A6E;
  --accent: #2F6AA8;
  --sky: #F0F4FA;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --line: #E3E7ED;
  --line-strong: #CDD4DE;
  --ink: #1B2430;
  --text: #3B4655;
  --muted: #6B7685;
  --ok: #17803D;       --ok-bg: #EAF6EE;
  --warn: #9A5B0B;     --warn-bg: #FDF5E6;
  --err: #B42318;      --err-bg: #FDEEEC;
  --old: #475569;      --old-bg: #EEF1F5;
  --radius: 8px;
  --radius-sm: 6px;
  --font: 'Prompt', system-ui, sans-serif;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); font-weight: 300; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font); font-weight: 500; color: var(--navy); letter-spacing: 0; }
b, strong { font-weight: 500; color: var(--ink); }
a { color: var(--accent); }

/* ---------------------------------------------------------------- Layout */
.sa-shell { display: flex; min-height: 100vh; }
.sa-sidebar { width: var(--sidebar-w); background: var(--navy); color: #C9D3E3; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease; }
.sa-brand { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.sa-brand img { height: 40px;  border-radius: 6px; padding: 3px 5px; }
.sa-brand .t1 { font-weight: 500; font-size: .95rem; line-height: 1.3; }
.sa-brand .t2 { font-size: .72rem; opacity: .7; }

.sa-nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.sa-nav .sa-section { font-size: .72rem; letter-spacing: .04em; color: #8FA0BC; padding: 16px 12px 6px; }
.sa-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 1px; border-radius: var(--radius-sm); color: #C9D3E3; text-decoration: none; font-size: .9rem; }
.sa-link i { font-size: .95rem; width: 18px; text-align: center; opacity: .8; }
.sa-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sa-link.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 400; }
.sa-link .ext { margin-left: auto; font-size: .75rem; opacity: .5; }

.sa-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.sa-user .n { color: #fff; font-size: .85rem; font-weight: 400; line-height: 1.3; }
.sa-user .r { font-size: .72rem; color: #8FA0BC; }
.sa-logout { margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.2); color: #C9D3E3; border-radius: var(--radius-sm); padding: 4px 10px; font: inherit; font-size: .78rem; cursor: pointer; white-space: nowrap; }
.sa-logout:hover { background: rgba(255,255,255,.08); color: #fff; }

.sa-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.sa-topbar { position: sticky; top: 0; z-index: 1020; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sa-topbar h1 { font-size: 1.2rem; margin: 0; }
.sa-topbar .sub { color: var(--muted); font-size: .82rem; }
.sa-toggler { display: none; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); padding: 5px 12px; font: inherit; font-size: .85rem; color: var(--navy); }
.sa-content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.sa-footer { margin-top: auto; padding: 14px 28px; color: var(--muted); font-size: .76rem; border-top: 1px solid var(--line); background: #fff; }
.sa-backdrop { display: none; }

@media (max-width: 991.98px) {
  .sa-sidebar { transform: translateX(-100%); }
  .sa-shell.open .sa-sidebar { transform: none; }
  .sa-shell.open .sa-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 1030; }
  .sa-main { margin-left: 0; }
  .sa-toggler { display: inline-flex; }
  .sa-content { padding: 16px 14px 40px; }
  .sa-topbar { padding: 12px 14px; }
}

/* ---------------------------------------------------------------- Card / Stat */
.st-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.st-card + .st-card { margin-top: 18px; }
.st-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.st-card-head h2, .st-card-head h3 { font-size: .98rem; margin: 0; }
.st-card-head .hint { color: var(--muted); font-size: .8rem; }
.st-card-body { padding: 18px 20px; }
.st-card-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }

.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.st-stat { display: block; padding: 18px 20px; text-decoration: none; color: inherit; }
.st-stat + .st-stat { border-left: 1px solid var(--line); }
a.st-stat:hover { background: var(--sky); color: inherit; }
.st-stat .ico { display: none; }
.st-stat .lbl { color: var(--muted); font-size: .82rem; }
.st-stat .num { font-size: 1.75rem; font-weight: 500; line-height: 1.3; color: var(--navy); }
.st-stat .num small { font-size: .85rem; font-weight: 300; color: var(--muted); }
.st-stat .meta { font-size: .78rem; margin-top: 4px; color: var(--muted); }
@media (max-width: 1199.98px) { .st-stats { grid-template-columns: repeat(2, 1fr); } .st-stat:nth-child(3) { border-left: 0; } .st-stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.st-grid > .st-card + .st-card { margin-top: 0; }
.st-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1199.98px) { .st-grid, .st-grid-3 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Badge (จุดสี + ข้อความ) */
.st-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: .76rem; font-weight: 400; white-space: nowrap; border: 1px solid transparent; }
.st-badge i { display: none; }
.st-badge.ok { background: var(--ok-bg); color: var(--ok); }
.st-badge.warn { background: var(--warn-bg); color: var(--warn); }
.st-badge.err { background: var(--err-bg); color: var(--err); }
.st-badge.info { background: var(--sky); color: var(--navy); }
.st-badge.old { background: var(--old-bg); color: var(--old); }
.st-chip { display: inline-block; background: var(--old-bg); color: var(--old); border-radius: 999px; padding: 2px 9px; font-size: .74rem; white-space: nowrap; }

.st-issues { list-style: none; margin: 2px 0 0; padding: 0; font-size: .8rem; }
.st-issues li { display: flex; gap: 6px; align-items: baseline; line-height: 1.5; }
.st-issues li i { display: none; }
.st-issues li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; transform: translateY(-1px); }
.st-issues li.e { color: var(--err); }
.st-issues li.w { color: var(--warn); }

/* ---------------------------------------------------------------- Toolbar */
.st-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.st-toolbar .grow { flex: 1; }
.st-tabs { display: inline-flex; gap: 2px; border: 1px solid var(--line-strong); padding: 3px; border-radius: var(--radius-sm); max-width: 100%; overflow-x: auto; }
.st-tab { border: 0; background: transparent; color: var(--text); text-decoration: none; padding: 5px 12px; border-radius: 4px; font: inherit; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.st-tab i { display: none; }
.st-tab:hover { color: var(--navy); }
.st-tab .n { font-size: .74rem; color: var(--muted); margin-left: 4px; }
.st-tab.active { background: var(--navy); color: #fff; }
.st-tab.active .n { color: #C9D3E3; }
.st-search { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.st-search i { display: none; }
.st-search input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 12px; font: inherit; font-size: .9rem; background: #fff; }
.st-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,106,168,.15); }
.st-select { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 6px 30px 6px 12px; font: inherit; font-size: .9rem; background-color: #fff; color: var(--ink); }

/* ---------------------------------------------------------------- Buttons */
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: #fff; color: var(--navy); border-radius: var(--radius-sm); padding: 7px 14px; font: inherit; font-size: .87rem; font-weight: 400; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.st-btn > i { display: none; }
.st-btn.icon > i { display: inline; }
.st-btn:hover { border-color: var(--navy); color: var(--navy); }
.st-btn.primary, .st-btn.navy, .st-btn.ok { background: var(--navy); border-color: var(--navy); color: #fff; }
.st-btn.primary:hover, .st-btn.navy:hover, .st-btn.ok:hover { background: var(--navy-2); color: #fff; }
.st-btn.danger { color: var(--err); border-color: #F0C4BE; }
.st-btn.danger:hover { background: var(--err-bg); border-color: var(--err); }
.st-btn.lg { padding: 10px 20px; font-size: .94rem; }
.st-btn.sm { padding: 4px 10px; font-size: .8rem; }
.st-btn.icon { padding: 4px 8px; }
.st-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- Table */
.st-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.st-table { width: 100%; border-collapse: collapse; }
.st-table thead th { background: var(--bg); color: var(--muted); text-align: left; font-size: .78rem; font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .87rem; }
.st-table tbody tr:hover { background: #FAFBFD; }
.st-table tbody tr.has-err td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.st-table tbody tr.has-warn td:first-child { box-shadow: inset 3px 0 0 #D9A441; }
.st-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-table .nowrap { white-space: nowrap; }
.st-name { font-weight: 400; color: var(--ink); text-decoration: none; }
a.st-name:hover { color: var(--accent); text-decoration: underline; }
.st-meta { color: var(--muted); font-size: .78rem; margin-top: 1px; }
.st-id { letter-spacing: .02em; color: var(--navy-2); }
.st-actions { display: flex; gap: 4px; justify-content: flex-end; }
.st-empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.st-empty i { display: none; }

/* DataTables ให้เข้ากับธีม */
.dataTables_wrapper .row:first-child { padding: 12px 20px 4px; margin: 0; }
.dataTables_wrapper .row:last-child { padding: 8px 20px 14px; margin: 0; align-items: center; }
.dataTables_wrapper .dataTables_length select { border-radius: var(--radius-sm); border: 1px solid var(--line-strong); padding: 4px 8px; }
.dataTables_wrapper .dataTables_info { color: var(--muted); font-size: .82rem; }
.dataTables_wrapper .page-link { border-radius: 4px !important; margin: 0 2px; border-color: var(--line-strong); color: var(--navy); font-size: .84rem; }
.dataTables_wrapper .page-item.active .page-link { background: var(--navy); border-color: var(--navy); }
table.dataTable { margin: 0 !important; }

/* ---------------------------------------------------------------- Form */
.st-form .form-label { font-weight: 400; font-size: .87rem; color: var(--ink); margin-bottom: 5px; }
.st-form .form-label .req { color: var(--err); }
.st-form .form-control, .st-form .form-select { border-radius: var(--radius-sm); border-color: var(--line-strong); font-size: .92rem; padding: 8px 12px; font-family: var(--font); font-weight: 300; color: var(--ink); }
.st-form .form-control:focus, .st-form .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,106,168,.15); }
.st-form .form-text { font-size: .78rem; }
.st-form .field-validation-error, .st-form .text-danger { font-size: .8rem; display: block; margin-top: 4px; }
.st-form .input-validation-error { border-color: var(--err) !important; }
.st-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 1199.98px) { .st-form-grid { grid-template-columns: 1fr; } }
.st-sticky { position: sticky; top: 76px; }
.st-sec-title { font-size: .95rem; margin: 0 0 14px; color: var(--navy); }
.st-sec-title i { display: none; }
.st-sec + .st-sec { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.st-subtitle { font-size: .82rem; color: var(--muted); margin: 6px 0 8px; }
.input-group-text { border-radius: var(--radius-sm); border-color: var(--line-strong); background: var(--bg); font-size: .82rem; color: var(--muted); }
.form-control, .form-select { font-family: var(--font); }

.st-summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: .87rem; }
.st-summary dt { font-weight: 300; color: var(--muted); }
.st-summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.st-summary .total { border-top: 2px solid var(--navy); margin-top: 12px; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.st-summary .total b { font-size: 1.4rem; color: var(--navy); }

/* ---------------------------------------------------------------- Alerts */
.st-alert { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; background: #fff; color: var(--ink); }
.st-alert > i { display: none; }
.st-alert.info { border-left-color: var(--accent); background: var(--sky); border-color: #D9E4F2; }
.st-alert.warn { border-left-color: #C98A1A; background: var(--warn-bg); border-color: #F1D9A8; color: #5C3B0A; }
.st-alert.err { border-left-color: var(--err); background: var(--err-bg); border-color: #F5C2BC; color: #7A1A12; }
.st-alert.ok { border-left-color: var(--ok); background: var(--ok-bg); border-color: #B7DFC3; color: #14532D; }
.st-flash { margin-bottom: 16px; }

/* ---------------------------------------------------------------- Bars (สถิติ) */
.st-hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 20px; font-size: .86rem; }
.st-hbar + .st-hbar { border-top: 1px solid var(--line); }
.st-hbar .l { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.st-hbar .v { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-hbar .v b { color: var(--navy); font-weight: 500; }
.st-hbar .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--old-bg); overflow: hidden; }
.st-hbar .track span { display: block; height: 100%; background: var(--navy); border-radius: 3px; }
.st-hbar.alt .track span { background: var(--accent); }
.st-more { padding: 8px 20px 12px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- Import */
.st-steps { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.st-steps .s { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: .88rem; color: var(--muted); }
.st-steps .s + .s { border-left: 1px solid var(--line); }
.st-steps .s b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: .78rem; font-weight: 400; color: var(--muted); }
.st-steps .s.active { color: var(--navy); box-shadow: inset 0 -3px 0 var(--navy); }
.st-steps .s.active b { background: var(--navy); border-color: var(--navy); color: #fff; }
.st-steps .s.done b { background: var(--ok); border-color: var(--ok); color: #fff; }

.st-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 32px 20px; background: var(--bg); transition: border-color .15s, background .15s; }
.st-drop:hover, .st-drop.drag { border-color: var(--accent); background: var(--sky); }
.st-drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.st-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-drop .ic { display: none; }
.st-drop .tt { font-weight: 400; color: var(--navy); }
.st-drop .ds { color: var(--muted); font-size: .84rem; word-break: break-all; }

.st-cols { columns: 2; column-gap: 24px; font-size: .84rem; margin: 0; padding-left: 0; list-style: none; }
.st-cols li { padding: 3px 0; break-inside: avoid; color: var(--text); }
.st-cols li b { color: var(--navy); display: inline-block; width: 20px; }
@media (max-width: 575.98px) { .st-cols { columns: 1; } }

.st-changes { margin: 4px 0 0; padding: 0; list-style: none; font-size: .8rem; }
.st-changes li { line-height: 1.5; }
.st-changes .f { color: var(--muted); }
.st-changes del { color: var(--err); opacity: .8; }
.st-changes ins { color: var(--ok); text-decoration: none; }

.st-confirm-bar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------------------------------------------------------------- Lookup / Timeline */
.st-preview-frame { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg); }
.st-preview-label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: .82rem; color: var(--muted); }

.st-tl { list-style: none; margin: 0; padding: 4px 0; }
.st-tl li { position: relative; padding: 0 0 16px 22px; }
.st-tl li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--navy); }
.st-tl li::after { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 1px; background: var(--line-strong); }
.st-tl li:last-child { padding-bottom: 0; }
.st-tl li:last-child::after { display: none; }
.st-tl li.k-delete::before { border-color: var(--err); }
.st-tl li.k-create::before, .st-tl li.k-import-create::before { background: var(--navy); }
.st-tl .t { font-size: .87rem; color: var(--ink); }
.st-tl .t b { font-weight: 500; }
.st-tl .w { font-size: .76rem; color: var(--muted); }
.st-tl .d { font-size: .8rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; margin-top: 4px; white-space: pre-line; word-break: break-word; }

/* ---------------------------------------------------------------- Survey report */
.sr-row { display: grid; grid-template-columns: 26px 90px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: .86rem; }
.sr-track { height: 8px; background: var(--old-bg); border-radius: 4px; overflow: hidden; }
.sr-bar { display: block; height: 100%; background: var(--navy); }
.st-bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.st-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.st-bar .v { font-size: .74rem; color: var(--navy); }
.st-bar .b { width: 100%; max-width: 30px; border-radius: 3px 3px 0 0; background: var(--navy); min-height: 2px; }
.st-bar.zero .b { background: var(--line); }
.st-bar .l { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.sr-item { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.sr-item:last-child { border-bottom: 0; }
.sr-item .c { font-size: .88rem; color: var(--ink); white-space: pre-line; margin-top: 2px; }

/* ---------------------------------------------------------------- Loading overlay */
.st-loading { position: fixed; inset: 0; z-index: 3000; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(255,255,255,.85); }
.st-loading.show { display: flex; }
.st-spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: st-spin .8s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-loading .txt { color: var(--navy); }

/* ---------------------------------------------------------------- Login */
.lg-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 40px 16px; background: var(--bg); }
.lg-logo { height: 96px; max-width: 100%; object-fit: contain; }
.lg-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px 32px; }
.lg-card h1 { font-size: 1.35rem; margin: 0 0 2px; }
.lg-card .sub { color: var(--muted); font-size: .86rem; margin-bottom: 22px; }
.lg-card label { font-weight: 400; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.lg-field { position: relative; }
.lg-field > i { display: none; }
.lg-field .form-control { border-radius: var(--radius-sm); padding: 11px 14px; border-color: var(--line-strong); font-family: var(--font); }
.lg-field .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,106,168,.15); }
.lg-field .form-control.has-suffix { padding-right: 118px; }
.lg-field .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9AA3B0; font-size: .85rem; pointer-events: none; }
.lg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 4px 8px; border-radius: 4px; color: var(--muted); font: inherit; font-size: .8rem; }
.lg-eye:hover { color: var(--navy); background: var(--bg); }
.lg-field .form-control.has-eye { padding-right: 64px; }
.lg-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.lg-btn { width: 100%; border: 0; border-radius: var(--radius-sm); padding: 12px; margin-top: 8px; background: var(--navy); color: #fff; font: inherit; font-size: .98rem; }
.lg-btn:hover { background: var(--navy-2); }
.lg-btn:disabled { opacity: .7; }
.lg-foot { color: var(--muted); font-size: .84rem; text-align: center; }
.lg-foot a { color: var(--accent); }
@media (max-width: 575.98px) { .lg-logo { height: 76px; } .lg-card { padding: 24px 20px 26px; } }

/* SweetAlert ใช้ฟอนต์เดียวกับระบบ */
.swal2-popup { font-family: var(--font) !important; border-radius: var(--radius) !important; }
.swal2-title { font-weight: 500 !important; color: var(--navy) !important; font-size: 1.25rem !important; }
.swal2-html-container { font-weight: 300 !important; }

/* ---------------------------------------------------------------- Dashboard: 3 ตัวเลข + กราฟแท่งแนวตั้ง */
.st-stats.st-stats-3 { grid-template-columns: repeat(3, 1fr); }
.st-stats.st-stats-3 .st-stat:nth-child(3) { border-left: 1px solid var(--line); }
.st-stats.st-stats-3 .st-stat:nth-child(n+3) { border-top: 0; }
@media (max-width: 767.98px) { .st-stats.st-stats-3 { grid-template-columns: 1fr; } .st-stats.st-stats-3 .st-stat + .st-stat { border-left: 0; border-top: 1px solid var(--line); } }

.st-colchart { display: flex; align-items: flex-end; gap: 14px; height: 260px; padding: 8px 4px 0; border-bottom: 1px solid var(--line-strong); overflow-x: auto; }
.st-colchart .c { flex: 1 0 44px; max-width: 90px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding-bottom: 34px; }
.st-colchart .v { font-size: .85rem; color: var(--ink); font-weight: 400; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.st-colchart .b { width: 100%; max-width: 46px; background: var(--navy); border-radius: 4px 4px 0 0; min-height: 2px; }
.st-colchart .c:hover .b { background: var(--accent); }
.st-colchart .l { position: absolute; bottom: 0; left: 0; right: 0; height: 30px; font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.2; overflow: hidden; display: flex; align-items: center; justify-content: center; }

/* สรุปข้อมูลก่อนบันทึก (ในกล่องยืนยัน) */
.pv-note { font-size: .86rem; color: var(--muted); margin-bottom: 8px; text-align: left; }
.pv-wrap { max-height: 56vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pv-table { width: 100%; border-collapse: collapse; font-size: .88rem; text-align: left; }
.pv-table th, .pv-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pv-table th { width: 42%; font-weight: 300; color: var(--muted); background: var(--bg); }
.pv-table td { color: var(--ink); word-break: break-word; }
.pv-table tr:last-child th, .pv-table tr:last-child td { border-bottom: 0; }
.pv-table .pv-total th, .pv-table .pv-total td { font-weight: 500; color: var(--navy); background: var(--sky); }
