/* =====================================================================
   Smart IT — Theme Pro "Navy Command"
   ทางการ · อ่านง่าย · ดูทันสมัย  |  ฟอนต์ Sarabun  |  ปรับขนาดตัวอักษร  |  หุ่นยนต์ผู้ช่วย
   โหลดต่อจาก app.css (override ตัวแปรสีและองค์ประกอบหลัก)
   ===================================================================== */

/* ---------- Palette : Light (ค่าเริ่มต้น) ---------- */
:root, [data-theme="light"] {
  --bg: #f2f5fa;
  --bg-2: #e8edf6;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f4f7fc;
  --border: #dde3ee;
  --border-strong: #c3cddf;
  --text: #0d1b34;
  --text-2: #3f4f6b;
  --text-3: #6b7a94;
  --accent: #1d4ed8;
  --accent-2: #0ea5e9;
  --gold: #c9a227;
  --navy: #0b2350;
  --navy-2: #0f2f6b;
  --accent-grad: linear-gradient(135deg, #0b2350 0%, #1d4ed8 60%, #0ea5e9 100%);
  --ok: #15803d;
  --warn: #b45309;
  --crit: #be123c;
  --down: #dc2626;
  --shadow: 0 1px 2px rgba(13,27,52,.06), 0 6px 20px -10px rgba(13,27,52,.18);
  --glow: 0 0 0 3px rgba(29,78,216,.16);
  --radius: 12px;
  --fs: 1;
  color-scheme: light;
}
/* ---------- Palette : Dark ---------- */
[data-theme="dark"] {
  --bg: #081124;
  --bg-2: #0b1730;
  --surface: #0f1d3a;
  --surface-solid: #0f1d3a;
  --surface-2: rgba(255,255,255,.04);
  --border: rgba(148,170,214,.16);
  --border-strong: rgba(148,170,214,.30);
  --text: #e8eefb;
  --text-2: #aebbd6;
  --text-3: #7d8bab;
  --accent: #4f8cff;
  --accent-2: #38bdf8;
  --accent-grad: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%);
  --ok: #22c55e;
  --warn: #f59e0b;
  --crit: #fb7185;
  --down: #ef4444;
  --shadow: 0 10px 28px -14px rgba(0,0,0,.7);
  --glow: 0 0 0 3px rgba(79,140,255,.22);
  color-scheme: dark;
}

/* ---------- Typography : Sarabun ---------- */
html, body, button, input, select, textarea, .tooltip, .popover, .swal2-popup, .select2-container, .dropdown-menu {
  font-family: 'Sarabun', 'IBM Plex Sans Thai', 'Tahoma', system-ui, sans-serif !important;
}
body { font-size: 15px; line-height: 1.62; letter-spacing: .1px; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; letter-spacing: 0; line-height: 1.35; }
b, strong, th { font-weight: 600; }
.mono, code, kbd, pre { font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace) !important; }

/* ---------- Background : เรียบ สุภาพ ---------- */
.app-bg {
  background:
    radial-gradient(900px 420px at 100% -5%, rgba(29,78,216,.07), transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0, var(--bg) 280px) !important;
}
.app-bg::after { opacity: .5; background-size: 36px 36px; mask-image: radial-gradient(ellipse at 70% 0%, #000 10%, transparent 60%); }
[data-theme="dark"] .app-bg { background: radial-gradient(1000px 500px at 90% -10%, rgba(37,99,235,.20), transparent 60%), var(--bg) !important; }

/* ---------- Sidebar : Navy ทางการ (ทั้งสองธีม) ---------- */
.sidebar {
  --text: #f1f5ff; --text-2: #b9c6e2; --text-3: #8092bb; --surface-2: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.09); --border-strong: rgba(255,255,255,.2); --accent: #7fb2ff;
  background: linear-gradient(180deg, #0b2350 0%, #091b3e 55%, #07152f 100%) !important;
  border-right: 0 !important; box-shadow: 4px 0 24px -12px rgba(7,21,47,.55);
}
.sidebar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold, #c9a227), #f3d77a, var(--gold, #c9a227)); }
.brand-logo { background: linear-gradient(135deg, #1d4ed8, #38bdf8) !important; box-shadow: 0 6px 18px -6px rgba(56,189,248,.6) !important; border-radius: 11px; }
.brand-text b { color: #fff !important; }
.brand-text small { color: #f3d77a !important; letter-spacing: 1.4px; }
.nav-head { color: #8ea2cc !important; font-weight: 600; font-size: 11.5px; letter-spacing: 1px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 6px; }
.nav-link-item { border-radius: 9px; font-weight: 500; }
.nav-link-item.active { background: rgba(255,255,255,.10) !important; color: #fff !important; }
.nav-link-item.active::before { background: #f3d77a !important; box-shadow: 0 0 10px rgba(243,215,122,.7) !important; }
.nav-link-item.active i { color: #f3d77a !important; }

/* ---------- Topbar ---------- */
.topbar {
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent) !important;
  border-bottom: 1px solid var(--border) !important; box-shadow: 0 1px 0 rgba(13,27,52,.03), 0 8px 24px -20px rgba(13,27,52,.4);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 70%); opacity: .55; }
.topbar-title h1 { font-size: 21px !important; font-weight: 700 !important; color: var(--text); }
.topbar-title p { font-size: 13px !important; }
.btn-icon, .user-chip, .live-clock { border-radius: 10px !important; background: var(--surface-solid) !important; }
.avatar { background: linear-gradient(135deg, #0b2350, #1d4ed8) !important; border-radius: 9px !important; }

/* ---------- Cards / Panels ---------- */
.glass, .card {
  background: var(--surface-solid) !important; border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important; box-shadow: var(--shadow) !important; backdrop-filter: none !important;
}
.glass > h5:first-child, .glass > h6:first-child, .card-header { font-weight: 600; }
.card-header { background: var(--surface-2) !important; border-bottom: 1px solid var(--border) !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 9px; font-weight: 500; }
.btn-accent, .btn-primary {
  background: linear-gradient(135deg, var(--navy-2, #0f2f6b), var(--accent)) !important; border: 0 !important; color: #fff !important;
  box-shadow: 0 4px 14px -6px rgba(29,78,216,.55) !important;
}
.btn-accent:hover, .btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:focus-visible, .form-control:focus, .form-select:focus, a:focus-visible, .btn-icon:focus-visible { box-shadow: var(--glow) !important; border-color: var(--accent) !important; outline: none; }

/* ---------- Forms & Tables : อ่านง่าย ---------- */
.form-control, .form-select, .input-group-text { border-radius: 9px; border-color: var(--border-strong); font-size: 15px; }
.form-label { font-weight: 600; color: var(--text-2); font-size: 14px; }
.table { --bs-table-bg: transparent; }
.table thead th {
  background: var(--surface-2) !important; color: var(--text-2) !important; font-weight: 600; font-size: 13.5px;
  border-bottom: 2px solid var(--border-strong) !important; white-space: nowrap;
}
.table td { vertical-align: middle; border-color: var(--border) !important; }
.table-hover tbody tr:hover > * { background: color-mix(in srgb, var(--accent) 6%, transparent) !important; }
.badge { font-weight: 600; letter-spacing: .2px; border-radius: 6px; }
.app-footer { text-align: center; font-size: 12.5px; }

/* =====================================================================
   ปุ่มปรับขนาดตัวอักษร
   ===================================================================== */
.content, .login-card, .sit-zoomable { zoom: var(--fs, 1); }
.fs-ctrl {
  display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-solid); overflow: hidden; font-family: 'Sarabun', sans-serif;
}
.fs-ctrl button {
  border: 0; background: transparent; color: var(--text-2); height: 100%; min-width: 36px; padding: 0 8px;
  font-weight: 700; line-height: 1; cursor: pointer; transition: background .15s, color .15s;
}
.fs-ctrl button:hover { background: var(--surface-2); color: var(--accent); }
.fs-ctrl button:disabled { opacity: .35; cursor: not-allowed; }
.fs-ctrl button[data-fs="down"] { font-size: 13px; }
.fs-ctrl button[data-fs="reset"] { font-size: 15px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.fs-ctrl button[data-fs="up"] { font-size: 18px; }
.fs-ctrl .fs-val { font-size: 11px; color: var(--text-3); padding: 0 8px 0 2px; min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.fs-ctrl.is-floating { position: fixed; top: 14px; right: 14px; z-index: 1060; box-shadow: var(--shadow); }
@media (max-width: 575.98px) { .fs-ctrl .fs-val { display: none; } .fs-ctrl button { min-width: 30px; } }
/* =====================================================================
   หุ่นยนต์ผู้ช่วย (SIT-Bot) — หุ่นขาวมีข้อต่อ: ยืน เดิน วิ่ง นั่ง ลุก ถูกหิ้ว
   ===================================================================== */
.sitbot {
  position: fixed; right: 26px; bottom: 14px; z-index: 1055; width: 92px; height: 156px;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  filter: drop-shadow(0 8px 14px rgba(11,35,80,.22));
}
.sitbot.st-drag, .sitbot.st-fall { cursor: grabbing; }
.sitbot-body { width: 100%; height: 100%; transform-origin: 50% 100%; }
.sitbot svg { width: 100%; height: 100%; overflow: visible; display: block; }
.sitbot svg g { transform-box: view-box; }
.sitbot .sb-side { display: none; }
.sitbot.v-side .sb-front { display: none; }
.sitbot.v-side .sb-side { display: inline; }
.sitbot.face-left .sb-side { transform: scaleX(-1); transform-origin: 100px 0; }
.sitbot .sb-far { filter: brightness(.8); }
.sitbot .sb-ground { transition: opacity .2s; }
.sitbot.st-drag .sb-ground, .sitbot.st-fall .sb-ground { opacity: 0; }
.sitbot.turning .sitbot-body { animation: sb-turn .24s ease-out; }

/* ข้อต่อทุกชิ้นเคลื่อนนุ่มเวลาเปลี่ยนท่า */
.sitbot .sb-body, .sitbot .sb-torso, .sitbot .sb-head, .sitbot .sb-uarm, .sitbot .sb-farm,
.sitbot .sb-thigh, .sitbot .sb-shin, .sitbot .sb-foot { transition: transform .45s cubic-bezier(.4,.1,.3,1); }
.sitbot .sb-hand-thumb { opacity: 0; }
.sitbot .sb-eye { transform-box: fill-box; transform-origin: center; animation: sb-blink 5.4s infinite; }
.sitbot .sb-pupils { transition: transform .15s ease-out; }
.sitbot .sb-tip { animation: sb-glow 1.8s ease-in-out infinite; }
.sitbot .sb-core { animation: sb-glow 2.6s ease-in-out infinite; }

/* ---------- ยืน (มุมหน้า) : หายใจ ส่ายหัว แกว่งแขนเบา ๆ ---------- */
.sitbot.st-idle .sb-front .sb-torso { animation: sb-breathe 3.4s ease-in-out infinite; }
.sitbot.st-idle .sb-front .sb-head { animation: sb-headidle 7s ease-in-out infinite; }
.sitbot.st-idle .sb-front .sb-arm-a { animation: sb-swayA 3.4s ease-in-out infinite; }
.sitbot.st-idle .sb-front .sb-arm-b { animation: sb-swayB 3.4s ease-in-out infinite; }
.sitbot.talk .sb-mouth { transform-box: fill-box; transform-origin: center; animation: sb-talk .32s ease-in-out infinite alternate; }

/* ชูนิ้วโป้ง (ท่าเดียวกับรูปต้นแบบ) */
.sitbot.g-thumbs .sb-front .sb-arm-a { animation: none; transform: rotate(26deg); }
.sitbot.g-thumbs .sb-front .sb-arm-a .sb-farm { transform: rotate(164deg); }
.sitbot.g-thumbs .sb-front .sb-arm-a .sb-hand { opacity: 0; }
.sitbot.g-thumbs .sb-front .sb-arm-a .sb-hand-thumb { opacity: 1; }
.sitbot.g-thumbs .sb-front .sb-head { animation: none; transform: rotate(-5deg); }
/* โบกมือ */
.sitbot.g-wave .sb-front .sb-arm-b { animation: none; transform: rotate(-118deg); }
.sitbot.g-wave .sb-front .sb-arm-b .sb-farm { animation: sb-wave .5s ease-in-out .35s infinite alternate; }
.sitbot.g-wave .sb-front .sb-head { animation: none; transform: rotate(4deg); }
/* มองซ้าย-ขวา */
.sitbot.g-look .sb-front .sb-head { animation: sb-look 2.6s ease-in-out; }

/* ---------- เดิน (มุมข้าง) ---------- */
.sitbot.st-walk .sb-side .sb-body { animation: sb-walkbob .5s ease-in-out infinite; }
.sitbot.st-walk .sb-side .sb-torso { transform: rotate(3deg); }
.sitbot.st-walk .sb-side .sb-head { animation: sb-walkhead 1s ease-in-out infinite; }
.sitbot.st-walk .sb-side .sb-leg-a { animation: sb-walk-thigh 1s linear infinite; }
.sitbot.st-walk .sb-side .sb-leg-a .sb-shin { animation: sb-walk-shin 1s linear infinite; }
.sitbot.st-walk .sb-side .sb-leg-a .sb-foot { animation: sb-walk-foot 1s linear infinite; }
.sitbot.st-walk .sb-side .sb-leg-b { animation: sb-walk-thigh 1s linear -.5s infinite; }
.sitbot.st-walk .sb-side .sb-leg-b .sb-shin { animation: sb-walk-shin 1s linear -.5s infinite; }
.sitbot.st-walk .sb-side .sb-leg-b .sb-foot { animation: sb-walk-foot 1s linear -.5s infinite; }
.sitbot.st-walk .sb-side .sb-arm-a { animation: sb-walk-arm 1s ease-in-out -.5s infinite; }
.sitbot.st-walk .sb-side .sb-arm-b { animation: sb-walk-arm 1s ease-in-out infinite; }
.sitbot.st-walk .sb-side .sb-farm { transform: rotate(-28deg); }

/* ---------- วิ่ง ---------- */
.sitbot.st-run .sb-side .sb-body { animation: sb-runbob .31s ease-in-out infinite; }
.sitbot.st-run .sb-side .sb-torso { transform: rotate(10deg); }
.sitbot.st-run .sb-side .sb-head { transform: rotate(-6deg); }
.sitbot.st-run .sb-side .sb-leg-a { animation: sb-run-thigh .62s linear infinite; }
.sitbot.st-run .sb-side .sb-leg-a .sb-shin { animation: sb-run-shin .62s linear infinite; }
.sitbot.st-run .sb-side .sb-leg-a .sb-foot { animation: sb-run-foot .62s linear infinite; }
.sitbot.st-run .sb-side .sb-leg-b { animation: sb-run-thigh .62s linear -.31s infinite; }
.sitbot.st-run .sb-side .sb-leg-b .sb-shin { animation: sb-run-shin .62s linear -.31s infinite; }
.sitbot.st-run .sb-side .sb-leg-b .sb-foot { animation: sb-run-foot .62s linear -.31s infinite; }
.sitbot.st-run .sb-side .sb-arm-a { animation: sb-run-arm .62s ease-in-out -.31s infinite; }
.sitbot.st-run .sb-side .sb-arm-b { animation: sb-run-arm .62s ease-in-out infinite; }
.sitbot.st-run .sb-side .sb-farm { transform: rotate(-88deg); }

/* ---------- นั่ง (เหยียดขาบนพื้น มือยันพื้นด้านหลัง) / ลุก ---------- */
.sitbot.st-sit .sb-side *, .sitbot.st-standup .sb-side * { transition-duration: .8s; }
.sitbot.st-sit .sb-side .sb-body, .sitbot.st-sitting .sb-side .sb-body { transform: translateY(92px); }
.sitbot.st-sit .sb-side .sb-thigh, .sitbot.st-sitting .sb-side .sb-thigh { transform: rotate(-88deg); }
.sitbot.st-sit .sb-side .sb-leg-b, .sitbot.st-sitting .sb-side .sb-leg-b { transform: rotate(-84deg); }
.sitbot.st-sit .sb-side .sb-shin, .sitbot.st-sitting .sb-side .sb-shin { transform: rotate(2deg); }
.sitbot.st-sit .sb-side .sb-foot, .sitbot.st-sitting .sb-side .sb-foot { transform: rotate(4deg); }
.sitbot.st-sit .sb-side .sb-torso, .sitbot.st-sitting .sb-side .sb-torso { transform: rotate(-9deg); }
.sitbot.st-sit .sb-side .sb-uarm, .sitbot.st-sitting .sb-side .sb-uarm { transform: rotate(34deg); }
.sitbot.st-sit .sb-side .sb-farm, .sitbot.st-sitting .sb-side .sb-farm { transform: rotate(8deg); }
.sitbot.st-sit .sb-side .sb-head, .sitbot.st-sitting .sb-side .sb-head { transform: rotate(4deg); }
.sitbot.st-sitting .sb-side .sb-torso { animation: sb-sitbreathe 3.6s ease-in-out infinite; }
.sitbot.st-sitting .sb-side .sb-head { animation: sb-sithead 8s ease-in-out infinite; }
.sitbot.st-sitting .sb-side .sb-leg-a .sb-foot { animation: sb-tap 2.2s ease-in-out infinite; }
.sitbot.st-sit .sb-ground, .sitbot.st-sitting .sb-ground { transform: translateX(28px) scaleX(1.5); transform-box: fill-box; transform-origin: center; }
/* ลุก: ย่อเข่าก่อนแล้วดันตัวขึ้น */
.sitbot.st-standup .sb-side .sb-body { animation: sb-up-body .75s ease-out; }
.sitbot.st-standup .sb-side .sb-thigh { animation: sb-up-thigh .75s ease-out; }
.sitbot.st-standup .sb-side .sb-shin { animation: sb-up-shin .75s ease-out; }
.sitbot.st-standup .sb-side .sb-torso { animation: sb-up-torso .75s ease-out; }

/* ---------- ถูกหิ้ว / ตก / ถึงพื้น ---------- */
.sitbot.st-drag .sitbot-body, .sitbot.st-fall .sitbot-body { transform: rotate(calc(var(--sway, 0) * 14deg)); transform-origin: 50% 6%; transition: transform .18s; }
.sitbot.st-drag .sb-front .sb-arm-a, .sitbot.st-fall .sb-front .sb-arm-a { transform: rotate(38deg); }
.sitbot.st-drag .sb-front .sb-arm-b, .sitbot.st-fall .sb-front .sb-arm-b { transform: rotate(-38deg); }
.sitbot.st-drag .sb-front .sb-arm-a .sb-farm { transform: rotate(-30deg); }
.sitbot.st-drag .sb-front .sb-arm-b .sb-farm { transform: rotate(30deg); }
.sitbot.st-drag .sb-front .sb-leg-a { animation: sb-kickA .7s ease-in-out infinite alternate; }
.sitbot.st-drag .sb-front .sb-leg-b { animation: sb-kickB .7s ease-in-out infinite alternate; }
.sitbot.st-fall .sb-front .sb-arm-a { transform: rotate(150deg); }
.sitbot.st-fall .sb-front .sb-arm-b { transform: rotate(-150deg); }
.sitbot.st-land .sitbot-body { animation: sb-land .42s ease-out; }

.sitbot-bubble {
  position: absolute; right: 74px; bottom: 120px; width: max-content; max-width: 250px; padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  background: var(--surface-solid, #fff); color: var(--text, #0d1b34); border: 1px solid var(--border, #dde3ee);
  box-shadow: 0 10px 30px -10px rgba(11,35,80,.35); font: 500 13.5px/1.5 'Sarabun', sans-serif; cursor: default;
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: .22s ease;
}
.sitbot-bubble b { color: var(--accent, #1d4ed8); }
.sitbot.talk .sitbot-bubble { opacity: 1; transform: none; pointer-events: auto; }
.sitbot.side-left .sitbot-bubble { right: auto; left: 74px; border-radius: 14px 14px 14px 4px; transform-origin: bottom left; }
.sitbot.st-sitting .sitbot-bubble, .sitbot.st-sit .sitbot-bubble { bottom: 74px; }

.sitbot-close {
  position: absolute; top: 0; right: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border, #dde3ee);
  background: var(--surface-solid, #fff); color: var(--text-3, #6b7a94); font-size: 13px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .2s; cursor: pointer; padding: 0;
}
.sitbot:hover .sitbot-close, .sitbot:focus-within .sitbot-close { opacity: 1; }
.sitbot.st-walk .sitbot-close, .sitbot.st-run .sitbot-close, .sitbot.st-drag .sitbot-close { opacity: 0; }
.sitbot-dock {
  position: fixed; right: 0; bottom: 120px; z-index: 1055; border: 0; cursor: pointer;
  width: 46px; height: 46px; border-radius: 14px 0 0 14px; display: none; place-items: center;
  background: linear-gradient(135deg, #0b2350, #1d4ed8); color: #fff; font-size: 22px; box-shadow: var(--shadow);
}
.sitbot-dock svg { width: 32px; height: 32px; }
body.sitbot-hidden .sitbot { display: none; }
body.sitbot-hidden .sitbot-dock { display: grid; }

@keyframes sb-turn { 0% { transform: scaleX(.55); } 100% { transform: scaleX(1); } }
@keyframes sb-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
@keyframes sb-glow { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes sb-talk { from { transform: scaleY(.6); } to { transform: scaleY(1.35); } }
@keyframes sb-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1.6px); } }
@keyframes sb-headidle { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg); } 70% { transform: rotate(2deg); } }
@keyframes sb-swayA { 0%,100% { transform: rotate(3deg); } 50% { transform: rotate(5.5deg); } }
@keyframes sb-swayB { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(-5.5deg); } }
@keyframes sb-wave { from { transform: rotate(-28deg); } to { transform: rotate(22deg); } }
@keyframes sb-look { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-7deg) translateX(-3px); } 65% { transform: rotate(7deg) translateX(3px); } }

@keyframes sb-walkbob { 0%,50%,100% { transform: translateY(1.5px); } 25%,75% { transform: translateY(-3px); } }
@keyframes sb-walkhead { 0%,50%,100% { transform: rotate(-1deg); } 25%,75% { transform: rotate(1.5deg); } }
@keyframes sb-walk-thigh { 0% { transform: rotate(-25deg); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(13deg); } 50% { transform: rotate(21deg); } 60% { transform: rotate(15deg); } 76% { transform: rotate(-6deg); } 90% { transform: rotate(-23deg); } 100% { transform: rotate(-25deg); } }
@keyframes sb-walk-shin { 0% { transform: rotate(3deg); } 20% { transform: rotate(8deg); } 40% { transform: rotate(4deg); } 50% { transform: rotate(10deg); } 62% { transform: rotate(40deg); } 76% { transform: rotate(56deg); } 90% { transform: rotate(16deg); } 100% { transform: rotate(3deg); } }
@keyframes sb-walk-foot { 0% { transform: rotate(-14deg); } 12% { transform: rotate(0); } 45% { transform: rotate(0); } 55% { transform: rotate(16deg); } 70% { transform: rotate(8deg); } 90% { transform: rotate(-10deg); } 100% { transform: rotate(-14deg); } }
@keyframes sb-walk-arm { 0%,100% { transform: rotate(22deg); } 50% { transform: rotate(-22deg); } }

@keyframes sb-runbob { 0%,100% { transform: translateY(2px); } 50% { transform: translateY(-9px); } }
@keyframes sb-run-thigh { 0% { transform: rotate(-50deg); } 25% { transform: rotate(-14deg); } 45% { transform: rotate(30deg); } 55% { transform: rotate(36deg); } 72% { transform: rotate(8deg); } 88% { transform: rotate(-42deg); } 100% { transform: rotate(-50deg); } }
@keyframes sb-run-shin { 0% { transform: rotate(22deg); } 25% { transform: rotate(14deg); } 50% { transform: rotate(40deg); } 66% { transform: rotate(108deg); } 82% { transform: rotate(78deg); } 100% { transform: rotate(22deg); } }
@keyframes sb-run-foot { 0% { transform: rotate(-8deg); } 45% { transform: rotate(10deg); } 55% { transform: rotate(26deg); } 75% { transform: rotate(12deg); } 100% { transform: rotate(-8deg); } }
@keyframes sb-run-arm { 0%,100% { transform: rotate(42deg); } 50% { transform: rotate(-48deg); } }

@keyframes sb-sitbreathe { 0%,100% { transform: rotate(-9deg) translateY(0); } 50% { transform: rotate(-8deg) translateY(-1.4px); } }
@keyframes sb-sithead { 0%,100% { transform: rotate(4deg); } 30% { transform: rotate(-6deg); } 55% { transform: rotate(-2deg); } 80% { transform: rotate(8deg); } }
@keyframes sb-tap { 0%,60%,100% { transform: rotate(4deg); } 70%,90% { transform: rotate(-14deg); } 80% { transform: rotate(6deg); } }
@keyframes sb-up-body { 0% { transform: translateY(92px); } 45% { transform: translateY(48px); } 100% { transform: translateY(0); } }
@keyframes sb-up-thigh { 0% { transform: rotate(-88deg); } 40% { transform: rotate(-70deg); } 100% { transform: rotate(0); } }
@keyframes sb-up-shin { 0% { transform: rotate(2deg); } 40% { transform: rotate(95deg); } 100% { transform: rotate(0); } }
@keyframes sb-up-torso { 0% { transform: rotate(-9deg); } 40% { transform: rotate(24deg); } 100% { transform: rotate(0); } }

@keyframes sb-kickA { from { transform: rotate(-12deg); } to { transform: rotate(9deg); } }
@keyframes sb-kickB { from { transform: rotate(10deg); } to { transform: rotate(-11deg); } }
@keyframes sb-land { 0% { transform: scale(1.08, .86); } 45% { transform: scale(.97, 1.04); } 100% { transform: scale(1); } }

@media (max-width: 575.98px) { .sitbot { width: 60px; height: 102px; right: 14px; } .sitbot-bubble { right: 50px; bottom: 80px; max-width: 200px; } .sitbot.side-left .sitbot-bubble { left: 50px; } }
@media print { .sitbot, .sitbot-dock, .fs-ctrl { display: none !important; } .content, .login-card { zoom: 1 !important; } }
@media (prefers-reduced-motion: reduce) { .sitbot * { animation: none !important; transition: none !important; } }

/* ---------- ปิดตาเมื่อพิมพ์รหัสผ่าน ---------- */
.sitbot .sb-cover-arms .sb-uarm { opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.4,.1,.3,1), opacity .12s .12s; }
.sitbot .sb-front .sb-torso > .sb-uarm { transition: transform .45s cubic-bezier(.4,.1,.3,1), opacity .12s .12s; }
.sitbot.g-cover .sb-front .sb-uarm { animation: none; }
.sitbot.g-cover .sb-front .sb-arm-a { transform: rotate(173deg); }
.sitbot.g-cover .sb-front .sb-arm-a .sb-farm { transform: rotate(64deg); }
.sitbot.g-cover .sb-front .sb-arm-b { transform: rotate(-173deg); }
.sitbot.g-cover .sb-front .sb-arm-b .sb-farm { transform: rotate(-64deg); }
.sitbot.g-cover .sb-front .sb-torso > .sb-uarm { opacity: 0; transition-delay: 0s, .2s; }
.sitbot.g-cover .sb-cover-arms .sb-uarm { opacity: 1; transition-delay: 0s, .2s; }
.sitbot.g-cover .sb-front .sb-head { animation: none; transform: rotate(0) translateY(3px); }
.sitbot.g-cover .sb-front .sb-eye { animation: none; transform: scaleY(.1); }
.sitbot.g-cover .sb-front .sb-pupils { transform: none !important; }
.sitbot.g-cover .sb-mouth { transform-box: fill-box; transform-origin: center; transform: scale(.7, .5); }
/* แอบมอง: เลื่อนมือขวาจอลงนิดหนึ่ง เปิดตาข้างเดียว */
.sitbot.g-peek .sb-front .sb-arm-b { transform: rotate(-160deg); }
.sitbot.g-peek .sb-front .sb-arm-b .sb-farm { transform: rotate(-26deg); }
.sitbot.g-peek .sb-front .sb-eye-r { transform: scaleY(1); }
.sitbot.g-peek .sb-front .sb-head { transform: rotate(-6deg) translateY(2px); }

/* =====================================================================
   โลโก้องค์กร GKBI (SIT-LOGO)
   ===================================================================== */
.brand.brand-gkbi { flex-direction: column; align-items: stretch; gap: 9px; padding: 4px 4px 16px; text-decoration: none; }
.brand-gkbi .brand-plate {
  display: flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.7);
  position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.brand-gkbi .brand-plate::after {   /* แถบสีประจำแบรนด์ เขียว · แดง · ฟ้า */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #7ab72e 0 33.3%, #e10a17 33.3% 66.6%, #009fe3 66.6% 100%);
}
.brand-gkbi .brand-plate img { display: block; width: 100%; max-width: 188px; height: auto; }
.brand-gkbi:hover .brand-plate { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(0,159,227,.55), inset 0 0 0 1px rgba(255,255,255,.7); }
.brand-gkbi .brand-sub { display: flex; align-items: baseline; justify-content: center; gap: 2px; font-size: 15px; color: #cfe3ff; letter-spacing: -.2px; line-height: 1; }
.brand-gkbi .brand-sub b { color: #fff; font-weight: 700; }
.brand-gkbi .brand-sub small { margin-left: 7px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.22); font-size: 9.5px; letter-spacing: 1.3px; text-transform: uppercase; color: #f3d77a; font-weight: 600; }

/* หน้าเข้าสู่ระบบ */
.brand.brand-login { gap: 16px; align-items: center; }
.brand-login .brand-login-logo { height: 66px; width: auto; display: block; filter: drop-shadow(0 6px 14px rgba(11,35,80,.12)); }
.brand-login .brand-login-sep { width: 1px; align-self: stretch; margin: 6px 0; background: linear-gradient(180deg, transparent, rgba(11,35,80,.25), transparent); }
.brand-login .brand-text b { color: #0b2350 !important; }
.brand-login .brand-text { color: #1d4ed8; }
.brand-login .brand-text small { color: #c9a227 !important; }
@media (max-width: 575.98px) { .brand-login .brand-login-logo { height: 40px; } }
