/* สีองค์กร AGE Terminal: น้ำเงินจากรูปเรือ, เขียวจากตัวอักษร AGE */
:root {
  --brand: #1f3f99; --brand-2: #2346a6; --brand-green: #16994a; --brand-green-soft: #e7f5ec;
  --bs-primary: #2346a6; --bs-primary-rgb: 35,70,166; --bs-link-color: #2346a6; --bs-link-color-rgb: 35,70,166;
  --bs-link-hover-color: #1f3f99; --bs-success: #16994a; --bs-success-rgb: 22,153,74;
}
body { font-family: 'Sarabun', system-ui, sans-serif; background: #f3f5f8; font-size: 15px; }
.bg-brand { background: var(--brand); }
.navbar-aget { background: #fff; border-bottom: 3px solid var(--brand-green); box-shadow: 0 1px 3px rgba(16,24,40,.06); min-height: 60px; }
.navbar-aget .brand-logo { height: 40px; width: auto; }
.navbar-aget .brand-text { line-height: 1.1; }
.navbar-aget .brand-text b { color: var(--brand-2); font-size: 1.05rem; letter-spacing: .02em; }
.navbar-aget .brand-text small { color: var(--brand-green); font-size: .72rem; font-weight: 600; }
.navbar-aget .nav-icon { color: var(--brand-2); }
.btn-primary { --bs-btn-bg: #2346a6; --bs-btn-border-color: #2346a6; --bs-btn-hover-bg: #1f3f99; --bs-btn-hover-border-color: #1f3f99;
  --bs-btn-active-bg: #1a3583; --bs-btn-active-border-color: #1a3583; --bs-btn-disabled-bg: #2346a6; --bs-btn-disabled-border-color: #2346a6; }
.btn-outline-primary { --bs-btn-color: #2346a6; --bs-btn-border-color: #2346a6; --bs-btn-hover-bg: #2346a6; --bs-btn-hover-border-color: #2346a6;
  --bs-btn-active-bg: #1f3f99; --bs-btn-active-border-color: #1f3f99; }
.btn-success { --bs-btn-bg: #16994a; --bs-btn-border-color: #16994a; --bs-btn-hover-bg: #12823f; --bs-btn-hover-border-color: #12823f; }
.text-primary { color: #2346a6 !important; } .bg-primary { background-color: #2346a6 !important; }
.text-success { color: #16994a !important; } .bg-success { background-color: #16994a !important; }
.form-control:focus, .form-select:focus { border-color: #8fa3dc; box-shadow: 0 0 0 .2rem rgba(35,70,166,.18); }
.login-logo { width: 150px; height: auto; }
/* แถบบอกสภาพแวดล้อม (ไม่แสดงใน production) */
.env-banner { font-size: .75rem; font-weight: 600; text-align: center; padding: 2px 8px; letter-spacing: .03em; }
.env-development { background: #fff3cd; color: #7a5b00; }
.env-staging { background: #f8d7da; color: #842029; }
.env-test { background: #e2e3e5; color: #41464b; }
.login-card { border-top: 4px solid var(--brand-green); }
.sidebar { width: 250px; min-height: calc(100vh - 63px); background: #fff; border-right: 1px solid #e3e7ee; }
@media (min-width: 992px) { .sidebar { flex: 0 0 250px; position: sticky; top: 63px; height: calc(100vh - 63px); overflow-y: auto; } }
.sidebar .nav-link { color: #344054; padding: .45rem 1.1rem; display: flex; align-items: center; gap: .55rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { background: var(--brand-green-soft); }
.sidebar .nav-link.active { background: #e8edf9; color: var(--brand-2); border-left-color: var(--brand-green); font-weight: 600; }
.sidebar .nav-section { color: var(--brand-green) !important; font-weight: 600; }
.sidebar .nav-section { font-size: .75rem; color: #8a94a6; text-transform: uppercase; padding: .9rem 1.1rem .25rem; letter-spacing: .03em; }
.main-content { min-width: 0; }
.card { border: 1px solid #e3e7ee; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; font-weight: 600; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-icon { font-size: 2rem; opacity: .25; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th { background: #f7f9fc; font-weight: 600; font-size: .85rem; color: #475467; white-space: nowrap; }
.page-title { font-weight: 700; font-size: 1.45rem; margin-bottom: 0; }
.lvl-overdue { background: #fdecec !important; }
.lvl-due { background: #fff7e6 !important; }
.table td:first-child { white-space: nowrap; }
.text-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.login-wrap { min-height: 90vh; display: flex; align-items: center; justify-content: center; }
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .2rem; }
.kv dt { color: #667085; font-weight: 500; font-size: .875rem; }
.kv dd { margin-bottom: .5rem; }
pre.audit { white-space: pre-wrap; word-break: break-word; font-size: .78rem; margin: 0; max-width: 520px; }
@media print {
  body { background: #fff; font-size: 13px; }
  .card { border: none; box-shadow: none; }
}
