:root {
  --tblr-primary: #0d9488;
  --tblr-primary-rgb: 13, 148, 136;
  --tblr-body-bg: #f1f5f9;
}
body { color: #1e3a5f; }
h1, h2, h3, .page-title { color: #0f2a4a; }
.navbar-brand { color: #0f2a4a !important; font-weight: 700; }

/* เมนูกลุ่มพับได้ */
.nav-group-toggle .nav-caret { margin-left: auto; font-size: 14px; transition: transform .2s; }
.nav-group-toggle[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-sub { padding-left: 18px; flex-direction: column !important; }
.nav-sub .nav-item { width: 100%; }
.nav-sub .nav-link { font-size: .9rem; padding: 6px 12px; display: flex; }
.sidebar .nav-sub .nav-link.active { background: #ccfbf1; color: #0f766e !important; }

/* sidebar */
.sidebar { background: #ffffff; border-right: 1px solid #e2e8f0; }
.sidebar .nav-link { border-radius: 8px; margin: 1px 8px; color: #334155; font-weight: 500; }
.sidebar .nav-link:hover { background: #f0fdfa; color: #0f766e; }
.sidebar .nav-link.active { background: #0d9488; color: #fff !important; }
.sidebar .nav-link .ti { margin-right: 8px; font-size: 18px; vertical-align: -3px; }
.btn .ti { margin-right: 4px; vertical-align: -2px; }

/* cards */
.card { border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 3px rgba(15, 42, 74, .08); }
.card-header { background: #fff; border-bottom: 1px solid #eef2f7; }
.card-header .card-title { font-weight: 700; color: #0f2a4a; }
.card-title .ti { color: #0d9488; margin-right: 6px; }

/* tables */
.table thead th, .table tr:first-child th { background: #f8fafc; color: #0f2a4a; font-weight: 700; white-space: nowrap; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #f8fafc; }
.table-hover tbody tr:hover, .table tbody tr:hover { background: #f0fdfa; }

/* badges */
.badge-below { background: #dc2626; }
.badge-on { background: #0d9488; }
.badge-above { background: #16a34a; }
.badge-nodata { background: #64748b; }
.badge { font-size: .78em; padding: .35em .6em; border-radius: 999px; }

/* buttons */
.btn-primary { background: #0d9488; border-color: #0d9488; border-radius: 8px; font-weight: 600; }
.btn-primary:hover { background: #0f766e; border-color: #0f766e; }
.btn-outline-primary { color: #0d9488; border-color: #99f6e4; border-radius: 8px; }
.btn-outline-primary:hover { background: #0d9488; border-color: #0d9488; }
.btn-sm { border-radius: 7px; }

/* forms */
.form-control:focus, .form-select:focus { border-color: #0d9488; box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .15); }
.form-label { font-weight: 600; color: #0f2a4a; }

/* page header */
.page-header { border-bottom: 1px solid #e2e8f0; background: #fff; }
.empty-state { text-align: center; padding: 32px; color: #64748b; }
.empty-state .ti { font-size: 40px; color: #cbd5e1; display: block; margin-bottom: 8px; }
.stat-card .subheader { text-transform: none; font-size: .85rem; }
.stat-card .h1 { color: #0f2a4a; }
