/* e-Mission – Government admin theme (no build step) */
@font-face { font-family: 'Sarabun'; font-weight: 400; font-display: swap; src: url('../vendor/sarabun/sarabun-thai-400-normal.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 400; font-display: swap; src: url('../vendor/sarabun/sarabun-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026; }
@font-face { font-family: 'Sarabun'; font-weight: 500; font-display: swap; src: url('../vendor/sarabun/sarabun-thai-500-normal.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 500; font-display: swap; src: url('../vendor/sarabun/sarabun-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026; }
@font-face { font-family: 'Sarabun'; font-weight: 600; font-display: swap; src: url('../vendor/sarabun/sarabun-thai-600-normal.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 600; font-display: swap; src: url('../vendor/sarabun/sarabun-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026; }
@font-face { font-family: 'Sarabun'; font-weight: 700; font-display: swap; src: url('../vendor/sarabun/sarabun-thai-700-normal.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 700; font-display: swap; src: url('../vendor/sarabun/sarabun-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026; }

:root {
  --brand: #1d3a8a;          /* royal blue (Admin can change) */
  --navy: #0f1d40;
  --navy-2: #172a5c;
  --bg: #f2f4f8;
  --line: #e3e7ef;
  --muted: #64708a;
  --ok: #15803d;
  --err: #b91c1c;
  --warn: #b45309;
  --sidebar-w: 272px;
  --bs-font-sans-serif: 'Sarabun', 'Segoe UI', Tahoma, sans-serif;
  --bs-primary: var(--brand);
  --bs-link-color: var(--brand);
  --bs-border-radius: .625rem;
}
html, body { height: 100%; }
body { font-family: var(--bs-font-sans-serif); background: var(--bg); color: #1e2433; font-size: 15.5px; }
a { color: var(--brand); }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: #172f72; --bs-btn-hover-border-color: #172f72; --bs-btn-active-bg: #142863; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; }
.form-label { font-weight: 500; margin-bottom: .3rem; }
.form-control, .form-select { border-color: #cfd6e4; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(29, 58, 138, .15); }
.required::after { content: ' *'; color: var(--err); }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.app-body { background-color: #eaf1fd; }
.app-body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #eaf1fd url('../images/app-bg.webp') center top / cover no-repeat; }
.sidebar { width: var(--sidebar-w); background: #00225d url('../images/sidebar-bg.webp?v=2') left bottom / 272px auto no-repeat; color: #e4ebf9; position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column; transition: width .2s ease, transform .2s ease; }
.sidebar.sidebar-long .nav-section { padding: .55rem .6rem .2rem; }
.sidebar.sidebar-long .nav-link { padding: .32rem .85rem; margin-bottom: .05rem; font-size: .9375rem; }
.sidebar.sidebar-long .nav-link i { font-size: 1.1rem; }
@media (max-height: 900px) { .sidebar-long { background-image: linear-gradient(rgba(0,34,93,.72), rgba(0,34,93,.72)), url('../images/sidebar-bg.webp?v=2'); } }
.sidebar .brand { display: flex; align-items: center; gap: .7rem; margin: 0 .75rem; padding: 1rem .25rem; border-bottom: 1px solid rgba(255,255,255,.14); min-height: 84px; }
.sidebar .brand img { width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; }
.sidebar .brand .logo-mark { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, #2f6fe0 0%, #1b4cae 100%); color: #fff; display: grid; place-items: center; font-size: 1.4rem; flex: 0 0 48px; box-shadow: 0 6px 14px rgba(0,0,0,.28); }
.sidebar .brand .t1 { color: #fff; font-size: 1.3rem; font-weight: 700; line-height: 1.15; }
.sidebar .brand .t2, .sidebar .brand .t3 { font-size: .6875rem; color: #d3def4; line-height: 1.4; }
.sidebar nav { overflow-y: auto; padding: .5rem .75rem 1rem; flex: 1 1 auto; min-height: 0; flex-wrap: nowrap !important; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; }
.sidebar .nav-section { font-size: .8125rem; color: #b4c4e4; padding: 1rem .6rem .5rem; }
.sidebar .nav-link { color: #e4ebf9; border-radius: 12px; padding: .7rem .85rem; margin-bottom: .2rem; display: flex; align-items: center; gap: .85rem; font-size: 1rem; white-space: nowrap; transition: background-color .15s ease; }
.sidebar .nav-link i { font-size: 1.25rem; width: 1.5rem; text-align: center; flex: 0 0 1.5rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar .nav-link:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sidebar .nav-link.active { background: linear-gradient(90deg, #1f66d8 0%, #1a4fb5 100%); color: #fff; font-weight: 600; box-shadow: inset 4px 0 0 #3ddc84, 0 6px 14px rgba(0,0,0,.25); }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; transition: margin-left .2s ease; }
.topbar { height: 74px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.75); box-shadow: 0 2px 10px rgba(30,64,135,.06); display: flex; align-items: center; gap: .85rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030; }
.topbar .btn-toggle { border: 0; background: transparent; font-size: 1.6rem; color: var(--navy); padding: .25rem .4rem; border-radius: 8px; }
.topbar .user-chip { display: flex; align-items: center; gap: .65rem; }
.topbar-org { display: flex; align-items: center; gap: .65rem; line-height: 1.3; }
.topbar-org img { width: 52px; height: 52px; flex: 0 0 52px; }
.topbar-org-th { color: var(--navy); font-size: 1.1rem; font-weight: 600; }
.topbar-org-en { color: #46536f; font-size: .875rem; }
.topbar-org-th, .topbar-org-en { white-space: nowrap; }
.topbar .dropdown { min-width: 0; }
.topbar .user-chip { min-width: 0; }
.topbar .user-chip .lh-sm { min-width: 0; max-width: 300px; }
.topbar .user-chip .lh-sm > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1199.98px) {
  .topbar-org-en { display: none; }
  .topbar-org img { width: 44px; height: 44px; flex-basis: 44px; }
  .topbar-org-th { font-size: 1rem; }
  .topbar .user-chip .lh-sm { max-width: 210px; }
}
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(145deg, #eef4fe, #dbe6fa); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: 0 0 42px; }
.content { padding: 1.25rem 1.5rem 2rem; flex: 1; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.1rem; }
.page-title { padding-left: .85rem; border-left: 6px solid #2fb26b; }
.page-head h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 0; color: var(--navy); }
.page-subtitle { margin-top: .15rem; color: #46536f; font-size: .95rem; }
.breadcrumb { --bs-breadcrumb-divider: '›'; font-size: .875rem; margin-bottom: .45rem; }
.btn-cta { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent; --bs-btn-active-border-color: transparent; --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: .65rem; --bs-btn-font-weight: 600; --bs-btn-border-radius: 12px; background: linear-gradient(180deg, #0a844b 0%, #066b3d 100%); box-shadow: 0 8px 18px rgba(8,120,76,.28); }
.btn-cta:hover { background: linear-gradient(180deg, #087541 0%, #055d35 100%); }
.footer { padding: .9rem 1.5rem; color: #56627d; font-size: .82rem; border-top: 1px solid rgba(20,60,130,.08); }

.sidebar-credit { flex: none; margin: 0 .75rem; padding: .75rem .25rem; border-top: 1px solid rgba(255,255,255,.16); color: #e4ebf9; font-size: .75rem; line-height: 1.45; text-shadow: 0 1px 3px rgba(3,15,60,.7); }
.sidebar-credit-org { color: #fff; font-weight: 500; }
body.sb-collapsed .sidebar { width: 72px; }
body.sb-collapsed .sidebar .brand .text, body.sb-collapsed .sidebar .nav-link span, body.sb-collapsed .sidebar .nav-section, body.sb-collapsed .sidebar .sidebar-credit { display: none; }
body.sb-collapsed .sidebar .nav-link { justify-content: center; }
body.sb-collapsed .sidebar .brand { justify-content: center; margin: 0; padding-left: 0; padding-right: 0; }
body.sb-collapsed .sidebar nav { padding-left: .5rem; padding-right: .5rem; }
body.sb-collapsed .main { margin-left: 72px; }
.sb-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; }
  .main { margin-left: 0 !important; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,18,40,.45); z-index: 1035; }
  body.sb-collapsed .sidebar .brand .text, body.sb-collapsed .sidebar .nav-link span, body.sb-collapsed .sidebar .nav-section { display: initial; }
  body.sb-collapsed .sidebar .sidebar-credit { display: block; }
  body.sb-collapsed .sidebar .nav-link { justify-content: flex-start; }
  .content { padding: 1rem; }
}

/* ---------- Cards ---------- */
.card { --bs-card-border-radius: 16px; --bs-card-inner-border-radius: 15px; border: 1px solid rgba(20,60,130,.06); border-radius: 16px; box-shadow: 0 8px 24px rgba(30,64,135,.07); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; margin: 0 1.1rem; padding: .95rem 0 .75rem; border-radius: 0 !important; }
.card-header-icon { margin-right: .5rem; color: #0a844b; font-size: 1.2rem; vertical-align: -.1em; }
.stat-card { position: relative; overflow: hidden; padding: 1.1rem 1.25rem; flex-direction: row; display: flex; gap: 1rem; align-items: center; height: 100%; }
.stat-card > div { position: relative; z-index: 1; min-width: 0; }
.stat-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 48%; height: 54%; border-top-left-radius: 100%; background: var(--stat-tint, transparent); pointer-events: none; }
.stat-card .icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 1.75rem; flex: 0 0 64px; }
.stat-card .label { color: #3a4560; font-size: .95rem; }
.stat-card .value { font-size: 2rem; font-weight: 700; line-height: 1.15; color: var(--navy); }
.stat-card .hint { font-size: .82rem; color: #56627d; }
.i-blue { background: #e4edfc; color: #1f5fc4; }
.i-green { background: #e0f4e8; color: var(--ok); }
.i-amber { background: #fdf0dc; color: var(--warn); }
.i-navy { background: #e4eaf6; color: var(--navy); }
.i-blue-card { --stat-tint: linear-gradient(315deg, rgba(90,145,235,.3), rgba(90,145,235,.03)); }
.i-green-card { --stat-tint: linear-gradient(315deg, rgba(70,190,120,.32), rgba(70,190,120,.03)); }
.i-amber-card { --stat-tint: linear-gradient(315deg, rgba(240,175,80,.32), rgba(240,175,80,.03)); }
.i-navy-card { --stat-tint: linear-gradient(315deg, rgba(90,145,235,.3), rgba(90,145,235,.03)); }
@media (max-width: 1499.98px) {
  .stat-card { padding: 1rem; gap: .75rem; }
  .stat-card .icon { width: 52px; height: 52px; border-radius: 14px; font-size: 1.45rem; flex-basis: 52px; }
  .stat-card .value { font-size: 1.75rem; }
}
@media (max-width: 575.98px) {
  .stat-card { padding: .85rem; gap: .6rem; }
  .stat-card .icon { width: 44px; height: 44px; border-radius: 12px; font-size: 1.25rem; flex-basis: 44px; }
  .stat-card .label { font-size: .85rem; }
  .stat-card .value { font-size: 1.5rem; }
  .stat-card .hint { font-size: .75rem; }
  .page-head h1 { font-size: 1.5rem; }
  .topbar { padding: 0 .85rem; }
}
.chart-box { position: relative; height: 280px; }
.table > :not(caption) > * > * { padding: .55rem .7rem; }
.table thead th { background: #f6f8fc; color: #3c4763; font-weight: 600; font-size: .88rem; border-bottom-width: 1px; white-space: nowrap; }
.badge-status-draft { background: #fdf1de; color: var(--warn); }
.badge-status-completed { background: #e3f4ea; color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem; }
.empty i { font-size: 2.2rem; display: block; margin-bottom: .4rem; color: #a5b0c9; }
.empty-art { padding: 1.5rem 1rem; color: #46536f; font-size: 1.05rem; }
.empty-art img { display: block; width: 170px; max-width: 70%; height: auto; margin: 0 auto .5rem; }

/* ---------- Reports ---------- */
.report-filter .form-label { margin-bottom: .2rem; }
.report-more { margin-top: .75rem; }
.report-more > summary { color: var(--brand); font-size: .875rem; cursor: pointer; }
.report-more-card { margin: 0 1.1rem; padding: .85rem 0 1rem; border-top: 1px solid var(--line); }
.report-tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; border-radius: 12px; background: rgba(255,255,255,.8); box-shadow: 0 4px 12px rgba(30,64,135,.06); }
.report-tabs .nav-link { padding: .45rem .9rem; border-radius: 9px; color: #3a4560; font-size: .9375rem; }
.report-tabs .nav-link:hover { background: #eef3fc; color: var(--navy); }
.report-tabs .nav-link.active { background: var(--brand); color: #fff; font-weight: 600; }
.report-bar-col { width: 22%; min-width: 120px; }
.report-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #e8eef9; }
.report-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f6fe0, #0f9d8a); }
.report-row-empty td { color: #7a869f; }
.report-row-total td { background: #f6f8fc; }
.report-compare-name a { color: var(--navy); font-weight: 600; text-decoration: none; }
.report-compare-name a:hover { color: var(--brand); text-decoration: underline; }
.report-mini-table { --bs-table-bg: transparent; }
.report-mini-table th, .report-mini-table td { padding-left: 1.1rem; padding-right: 1.1rem; }
.chart-box-sm { height: 210px; }
.report-shortcut { flex-direction: row; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.25rem; color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.report-shortcut:hover { border-color: #9dbbea; box-shadow: 0 10px 26px rgba(30,64,135,.13); color: inherit; }
.report-shortcut:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.report-shortcut-icon { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px; background: #e4edfc; color: #1f5fc4; font-size: 1.45rem; }
.report-shortcut-text { flex: 1; min-width: 0; }
.report-shortcut-title { display: block; color: var(--navy); font-size: 1.05rem; font-weight: 700; }
.report-shortcut-desc { display: block; color: #56627d; font-size: .875rem; line-height: 1.4; }
.report-shortcut-chevron { color: #7a869f; }
.report-chip-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.report-chip { padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #3a4560; font-size: .8125rem; text-decoration: none; }
.report-chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Standard texts ---------- */
.text-toolbar { display: grid; gap: .75rem; }
.text-search { position: relative; }
.text-search > i { position: absolute; top: 50%; left: .9rem; z-index: 2; transform: translateY(-50%); color: #5a6a8c; pointer-events: none; }
.text-search .form-control { min-height: 44px; padding-left: 2.5rem; }
.text-jump { display: flex; flex-wrap: wrap; gap: .4rem; }
.text-note { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: #46536f; font-size: .8125rem; }
.var-chip { display: inline; padding: .1em .45em; border-radius: 6px; background: #e4edfc; color: #1a4a9e; font-size: .92em; font-weight: 500; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.txt-optional { border-bottom: 1px dashed #8092b4; }
.text-preview { color: #2a3347; font-size: .9375rem; line-height: 1.75; overflow-wrap: anywhere; }
.text-list > [data-text-item] + [data-text-item] { border-top: 1px solid var(--line); }
.wizard-card > .text-list { position: relative; }
.text-list [hidden] { display: none !important; }
[data-text-group][hidden] { display: none !important; }
[data-text-group] { scroll-margin-top: 90px; }
.text-item { display: grid; grid-template-columns: minmax(200px, 3fr) minmax(0, 6fr) auto; gap: .35rem 1.25rem; align-items: start; margin: 0 1.5rem; padding: .95rem 0; }
.text-item-head { min-width: 0; }
.text-item-title { color: var(--navy); font-weight: 600; text-decoration: none; }
.text-item-title:hover { color: var(--brand); text-decoration: underline; }
.text-item-desc { margin-top: .15rem; color: #56627d; font-size: .8125rem; line-height: 1.45; }
.text-item-meta { display: inline-flex; align-items: center; gap: .35rem; margin-left: .35rem; vertical-align: .05em; }
.text-item-version { color: #56627d; font-size: .75rem; }
.text-item-edit { white-space: nowrap; }
.purpose-grid { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 3fr) minmax(0, 3fr); gap: .35rem 1.25rem; align-items: center; margin: 0 1.5rem; padding: .7rem 0; }
.purpose-grid-head { padding: .6rem 0 .35rem; color: #46536f; font-size: .8125rem; font-weight: 600; }
.purpose-name { color: var(--navy); font-weight: 600; }
.purpose-cell { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.purpose-cell .text-preview { flex: 1; min-width: 0; }
.purpose-where { display: none; flex: 0 0 100%; color: #56627d; font-size: .75rem; }
.purpose-edit { flex: none; min-width: 36px; min-height: 36px; }
td.text-preview { min-width: 240px; }
.wave-fade::before { -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.text-editor { min-height: 130px; font-size: 1rem; line-height: 1.7; }
.text-compare { padding: .65rem .85rem; border-radius: 10px; background: #f4f7fc; }
.text-compare-title { margin-bottom: .15rem; color: #46536f; font-size: .8125rem; font-weight: 600; }
.var-panel { position: sticky; top: 90px; }
.var-panel-note { padding: .6rem 1.1rem; color: #46536f; font-size: .8125rem; }
.var-list { max-height: 58vh; overflow-y: auto; padding: 0 .5rem; }
.var-item { display: block; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 8px; background: none; text-align: left; }
.var-item:hover { background: #eaf1fd; }
.var-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.var-item-label { display: block; color: var(--navy); font-size: .9rem; font-weight: 600; }
.var-item-desc { display: block; color: #56627d; font-size: .78rem; line-height: 1.4; }
.var-item code { font-size: .72rem; }
@media (max-width: 991.98px) {
  .text-item { grid-template-columns: 1fr auto; }
  .text-item-head { grid-column: 1; }
  .text-item-edit { grid-column: 2; grid-row: 1; }
  .text-item .text-preview { grid-column: 1 / -1; }
  .var-panel { position: static; }
  .var-list { max-height: 320px; }
}
@media (max-width: 767.98px) {
  .purpose-grid-head { display: none; }
  .purpose-grid { grid-template-columns: 1fr; }
  .purpose-cell { flex-wrap: wrap; }
  .purpose-where { display: block; }
}
@media (max-width: 575.98px) {
  .text-item, .purpose-grid { margin: 0 1rem; }
}

/* ---------- Master template ---------- */
.tpl-file { display: flex; align-items: flex-start; gap: 1rem; }
.tpl-file-icon { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: #e4edfc; color: #1f5fc4; font-size: 1.65rem; }
.tpl-file-info, .tpl-row-info { flex: 1; min-width: 0; }
.tpl-file-name { color: var(--navy); font-size: 1.125rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.tpl-file-sub { color: #56627d; font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.tpl-file-action { flex: none; white-space: nowrap; }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem 1rem; margin: 1.1rem 0 0; padding: .85rem 1rem; border-radius: 12px; background: #f4f7fc; }
.fact-grid dt { color: #56627d; font-size: .78rem; font-weight: 500; }
.fact-grid dd { margin: 0; color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.tpl-note { margin-top: .35rem; color: #46536f; font-size: .8125rem; overflow-wrap: anywhere; }
.tpl-warning { margin-top: .35rem; color: #7a5200; font-size: .8125rem; }
.tpl-none { padding: .85rem 1rem; border-radius: 12px; background: #fdf4e3; color: #7a5200; font-weight: 500; }
.tpl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; margin: 0 1.1rem; padding: .9rem 0; }
.tpl-row + .tpl-row { border-top: 1px solid var(--line); }
.tpl-version { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 34px; padding: 0 .5rem; border-radius: 10px; background: #eef2f9; color: var(--navy); font-weight: 600; }
.tpl-row-name { color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.tpl-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; }
.tpl-help { margin-bottom: .75rem; color: #46536f; font-size: .8125rem; line-height: 1.55; }
.tpl-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 1.5rem; }
.tpl-var { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.tpl-var code, .tpl-help code { white-space: nowrap; font-size: .78rem; }
.tpl-var code { -webkit-user-select: all; user-select: all; }
.tpl-drop { position: relative; padding: 1.15rem 1rem; border: 2px dashed #b4c2de; border-radius: 14px; background: #f7f9fe; text-align: center; transition: border-color .15s, background-color .15s; }
.tpl-drop:hover, .tpl-drop:focus-within, .tpl-drop.is-drag { border-color: var(--brand); background: #eef4ff; }
.tpl-drop.has-file { border-style: solid; border-color: #0a844b; background: #effaf3; }
.tpl-drop.has-error { border-color: #c43a3a; background: #fdf1f1; }
.tpl-drop-input { position: absolute; top: 0; left: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tpl-drop > i { display: block; color: #1f5fc4; font-size: 1.85rem; line-height: 1.2; }
.tpl-drop.has-file > i { color: #0a844b; }
.tpl-drop.has-error > i { color: #c43a3a; }
.tpl-drop-title { display: block; color: var(--navy); font-size: .9375rem; font-weight: 600; overflow-wrap: anywhere; }
.tpl-drop-hint { display: block; color: #56627d; font-size: .8125rem; }
.tpl-drop.has-error .tpl-drop-hint { color: #a32626; font-weight: 500; }
.tpl-steps { margin: 0; padding: 0; list-style: none; counter-reset: tpl-step; font-size: .9rem; }
.tpl-steps li { position: relative; padding: .25rem 0 .25rem 2.1rem; counter-increment: tpl-step; line-height: 1.5; }
.tpl-steps li + li { margin-top: .35rem; }
.tpl-steps li::before { content: counter(tpl-step); position: absolute; top: .2rem; left: 0; display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: #e0f4e8; color: #0a6b3d; font-size: .8125rem; font-weight: 600; }
@media (max-width: 575.98px) {
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-file { flex-wrap: wrap; }
  .tpl-file-info { flex-basis: calc(100% - 70px); }
  .tpl-file-action { width: 100%; }
  .tpl-row { grid-template-columns: auto minmax(0, 1fr); }
  .tpl-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.25rem; }
.pager-info { color: #46536f; font-size: .875rem; }
.pager-info strong { color: var(--navy); font-weight: 600; }
.pager .pagination { flex-wrap: wrap; gap: .25rem; margin: 0; }
.pager .page-link { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 .55rem; border: 1px solid var(--line); border-radius: 9px !important; background: #fff; color: #2a3347; font-size: .875rem; line-height: 1; }
.pager a.page-link:hover { border-color: var(--brand); background: #eef4ff; color: var(--brand); }
.pager .page-item.active .page-link { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.pager .page-item.disabled .page-link { background: transparent; color: #8a95ad; }
.pager-position { display: none; list-style: none; }
.pager .pager-position .page-link { color: var(--navy); font-weight: 600; white-space: nowrap; }
.pager-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-left: auto; }
.pager-form { display: flex; align-items: center; gap: .4rem; margin: 0; color: #46536f; font-size: .875rem; }
.pager-form label { margin: 0; white-space: nowrap; }
.pager-form .form-select { width: 76px; min-height: 36px; }
.pager-form .form-control { width: 66px; min-height: 36px; }
.pager-form .btn { min-height: 36px; }

/* ---------- Audit logs ---------- */
.audit-filter { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(180px, 1.1fr) minmax(180px, 1.1fr) auto; gap: .6rem .75rem; align-items: end; }
.audit-filter .form-control, .audit-filter .form-select, .audit-filter .input-group > .btn { min-height: 42px; }
.audit-filter .input-group > .form-control, .audit-filter-search .form-control { font-size: .875rem; }
.audit-filter-submit { display: flex; gap: .4rem; }
.audit-filter-submit .btn { min-height: 42px; white-space: nowrap; }
.audit-chips { margin-top: .85rem; }
.report-chip span { color: #56627d; }
.report-chip.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.report-chip.active:hover { color: #fff; }
.report-chip.active span { color: #dbe5fb; }
.report-chip-alert { border-color: #f0c7c7; color: #a32626; }
.report-chip-alert:hover { border-color: #c43a3a; color: #a32626; }
.report-chip-alert.active { border-color: #b83232; background: #b83232; }
.report-chip-alert.active span { color: #fbe3e3; }
.audit-day { position: sticky; top: 74px; z-index: 5; margin: 0; padding: .55rem 1.1rem; border-bottom: 1px solid var(--line); background: #f4f7fc; color: #3c4763; font-size: .875rem; font-weight: 600; }
.audit-list > .audit-day:first-child { border-radius: 15px 15px 0 0; }
.audit-day-name { margin-right: .35rem; color: var(--navy); }
.audit-row { display: grid; grid-template-columns: 58px 38px minmax(0, 1fr) 210px 16px; gap: .15rem .85rem; align-items: center; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.audit-row:hover { background: #f4f7fd; color: inherit; }
.audit-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.audit-time { color: var(--navy); font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.audit-time small { color: #6b7691; font-size: .72rem; font-weight: 400; }
.audit-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--tone-soft); color: var(--tone-ink); font-size: 1.05rem; }
.audit-main { min-width: 0; }
.audit-action, .audit-entity, .audit-summary, .audit-actor-name, .audit-actor-ip { display: block; }
.audit-action { color: var(--navy); font-weight: 600; line-height: 1.4; }
.audit-entity { color: #2a3347; font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.audit-summary { display: -webkit-box; overflow: hidden; color: #56627d; font-size: .8125rem; line-height: 1.45; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.audit-actor { min-width: 0; font-size: .875rem; line-height: 1.4; }
.audit-actor-name { color: #2a3347; overflow-wrap: anywhere; }
.audit-actor-ip { color: #6b7691; font-size: .78rem; overflow-wrap: anywhere; }
.audit-go { color: #8a95ad; font-size: .85rem; }
.audit-row.is-alert .audit-action { color: #a32626; }
.audit-list .card-footer { padding: .85rem 1.1rem; border-top: 0; }
.audit-change { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1.6fr) minmax(0, 1.6fr); gap: .35rem 1rem; margin: 0 1.1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.one-side .audit-change { grid-template-columns: minmax(150px, 1fr) minmax(0, 3.2fr); }
.audit-changes .audit-change:last-child { border-bottom: 0; }
.audit-change-head { padding: .55rem 0; color: #46536f; font-size: .8125rem; font-weight: 600; }
.audit-change-label { color: var(--navy); font-weight: 600; font-size: .9rem; }
.audit-value { color: #2a3347; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-value.is-old, .audit-value.is-new { padding: .3rem .6rem; border-radius: 8px; }
.audit-value.is-old { background: #fdf1f1; color: #8f2424; }
.audit-value.is-new { background: #ebf8f0; color: #0a6b3d; }
.audit-value.is-empty { padding: .3rem .6rem; color: #6b7691; }
.audit-value-tag { display: none; font-size: .75rem; font-weight: 600; }
@media (max-width: 1199.98px) {
  .audit-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-submit { grid-column: 1 / -1; }
  .audit-filter-submit .btn-primary { flex: 1; }
}
@media (max-width: 767.98px) {
  .audit-day { top: 74px; }
  .audit-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .audit-time { grid-column: 3; grid-row: 1; align-self: start; font-size: .875rem; }
  .audit-time small { display: none; }
  .audit-icon { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .audit-main { grid-column: 2; grid-row: 1; }
  .audit-actor { grid-column: 2 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0 .5rem; color: #56627d; }
  .audit-go { display: none; }
  .audit-change, .one-side .audit-change { grid-template-columns: minmax(0, 1fr); }
  .audit-change-head { display: none; }
  .audit-value-tag { display: block; }
}
@media (max-width: 575.98px) {
  .audit-filter { grid-template-columns: minmax(0, 1fr); }
  .audit-filter-search, .audit-filter-action { grid-column: auto; }
  .pager { justify-content: center; }
  .pager-info { width: 100%; text-align: center; }
  .pagination:not(.pager-many) .pager-edge, .pager-many .pager-num { display: none; }
  .pager-many .pager-position { display: list-item; }
  .pager-tools { justify-content: center; margin-left: 0; }
}

/* ---------- Audit log colours and detail page ---------- */
.tone-auth { --tone: #2f6fd6; --tone-dark: #1d3a8a; --tone-soft: #e4edfc; --tone-ink: #1f5fc4; }
.tone-document { --tone: #14844c; --tone-dark: #0a5c34; --tone-soft: #e0f4e8; --tone-ink: #0a7a44; }
.tone-export { --tone: #12808f; --tone-dark: #0a5763; --tone-soft: #dff3f6; --tone-ink: #0b6f7d; }
.tone-template { --tone: #6a5fd8; --tone-dark: #38329a; --tone-soft: #ebe9fb; --tone-ink: #4c42bd; }
.tone-permission { --tone: #8a4cc2; --tone-dark: #5a2a8c; --tone-soft: #f2e8fa; --tone-ink: #73379f; }
.tone-order { --tone: #b25d0e; --tone-dark: #7f4006; --tone-soft: #fcefdf; --tone-ink: #99500b; }
.tone-config { --tone: #5f7299; --tone-dark: #34435f; --tone-soft: #e9edf5; --tone-ink: #46587d; }
.tone-other { --tone: #5f7299; --tone-dark: #34435f; --tone-soft: #e9edf5; --tone-ink: #46587d; }
.tone-alert { --tone: #d0443c; --tone-dark: #8f1f1f; --tone-soft: #fdeaea; --tone-ink: #b32a2a; }
.audit-chips .report-chip[class*="tone-"]::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .4em; border-radius: 50%; background: var(--tone); vertical-align: .08em; }
.audit-chips .report-chip.active[class*="tone-"]::before { background: #fff; }
.audit-user-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-bottom: .85rem; padding: .5rem .85rem; border-radius: 10px; background: #e4edfc; color: #1a3f8f; font-size: .875rem; }
.audit-user-filter a { margin-left: auto; font-weight: 600; }
.audit-hero { overflow: hidden; }
.audit-hero-band { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: linear-gradient(115deg, var(--tone-dark), var(--tone)); color: #fff; }
.audit-hero-band::before, .audit-hero-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); pointer-events: none; }
.audit-hero-band::before { top: -70px; right: -30px; width: 220px; height: 220px; }
.audit-hero-band::after { right: 150px; bottom: -80px; width: 140px; height: 140px; }
.audit-hero-icon { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px; background: #fff; color: var(--tone-ink); font-size: 1.55rem; box-shadow: 0 6px 16px rgba(15,29,64,.2); }
.audit-hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.audit-hero-title { margin: 0; color: #fff; font-size: 1.3rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.audit-hero-sub { margin-top: .1rem; color: #fff; font-size: .9rem; overflow-wrap: anywhere; }
.audit-hero-tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.audit-tag { padding: .2rem .7rem; border-radius: 999px; background: #fff; color: var(--tone-ink); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.audit-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: 1.1rem 1.5rem 0; }
.audit-tile { display: flex; gap: .7rem; min-width: 0; padding: .75rem .85rem; border-radius: 13px; background: var(--tile-soft); }
.audit-tile-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--tile-ink); font-size: 1.05rem; }
.audit-tile-body { min-width: 0; }
.audit-tile dt { color: #46536f; font-size: .76rem; font-weight: 500; }
.audit-tile dd { margin: 0; color: var(--navy); font-size: .95rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.audit-tile dd small { display: block; color: #46536f; font-size: .78rem; font-weight: 400; }
.audit-tile-who { --tile-soft: #e4edfc; --tile-ink: #1f5fc4; }
.audit-tile-when { --tile-soft: #fcefdf; --tile-ink: #99500b; }
.audit-tile-ip { --tile-soft: #dff3f6; --tile-ink: #0b6f7d; }
.audit-tile-device { --tile-soft: #f2e8fa; --tile-ink: #73379f; }
.audit-agent { padding: .7rem 1.5rem 1.1rem; color: #56627d; font-size: .78rem; overflow-wrap: anywhere; }
.audit-detail-head { display: flex; align-items: center; gap: .6rem; margin: 0 1.1rem; padding: .95rem 0 .75rem; border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 600; }
.audit-detail-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--tone-soft); color: var(--tone-ink); }
.audit-detail-count { padding: .05rem .55rem; border-radius: 999px; background: var(--tone-soft); color: var(--tone-ink); font-size: .78rem; font-weight: 600; }
.audit-col-old::before, .audit-col-new::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .4em; border-radius: 50%; vertical-align: .08em; }
.audit-col-old::before { background: #d0443c; }
.audit-col-new::before { background: #15894f; }
.one-side .audit-value { justify-self: start; padding: .3rem .7rem; border-radius: 8px; background: var(--tone-soft); color: var(--tone-ink); font-weight: 500; }
.audit-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 1199.98px) {
  .audit-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .audit-hero-band { flex-wrap: wrap; padding: 1.1rem 1rem; }
  .audit-hero-text { flex-basis: calc(100% - 72px); }
  .audit-hero-tags { justify-content: flex-start; width: 100%; }
  .audit-tiles { grid-template-columns: minmax(0, 1fr); padding: 1rem 1rem 0; }
  .audit-agent { padding: .7rem 1rem 1rem; }
  .audit-actions .btn { width: 100%; }
}

/* ---------- Departments ---------- */
.tile-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.filter-tile { width: 100%; border: 2px solid transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.filter-tile:hover { border-color: #b9c9e8; }
.filter-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.filter-tile[aria-pressed="true"], .filter-tile[aria-current="true"] { border-color: var(--brand); box-shadow: 0 6px 18px rgba(29,58,138,.16); }
.filter-tile-text { position: relative; z-index: 1; display: block; min-width: 0; }
.filter-tile-text .label, .filter-tile-text .value { display: block; }
.dept-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: 1rem 1.1rem; }
.dept-search { flex: 1 1 280px; max-width: 460px; }
.dept-search .form-control { font-size: .9375rem; }
.dept-result { color: var(--navy); font-weight: 600; }
.dept-prefix-note { margin-left: auto; color: #46536f; font-size: .875rem; }
.dept-prefix-note strong { color: var(--navy); }
.dept-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) minmax(130px, 200px) 62px 62px auto; gap: .35rem 1rem; align-items: center; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.dept-row[hidden] { display: none; }
.dept-row-head { padding: .6rem 1.1rem; background: #f4f7fc; color: #3c4763; font-size: .875rem; font-weight: 600; }
.dept-row-head > :last-child { width: 158px; }
.dept-row:not(.dept-row-head):hover { background: #f7f9fe; }
.dept-code { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 42px; padding: 0 .4rem; border-radius: 11px; background: var(--tone-soft); color: var(--tone-ink); font-size: .875rem; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.dept-info { min-width: 0; }
.dept-name { color: var(--navy); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.dept-meta { display: flex; flex-wrap: wrap; gap: .1rem 1rem; color: #46536f; font-size: .9rem; }
.dept-meta i { margin-right: .35rem; color: #6b7691; font-size: .8em; }
.dept-missing { color: #6b7691; }
.dept-head-cell { min-width: 0; font-size: .9375rem; overflow-wrap: anywhere; }
.dept-head-name { color: var(--navy); font-weight: 500; }
.dept-pending { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: #fdf0dc; color: #7a5200; font-size: .8125rem; font-weight: 600; }
.dept-none { color: #56627d; font-size: .875rem; line-height: 1.35; }
.dept-count { display: block; color: var(--navy); text-align: center; text-decoration: none; }
.dept-count strong { font-size: 1.125rem; font-weight: 700; }
a.dept-count:hover strong { color: var(--brand); text-decoration: underline; }
.dept-off-tag { display: inline-block; margin-left: .5rem; padding: .05rem .55rem; border-radius: 999px; background: #e6e9f0; color: #46536f; font-size: .78rem; font-weight: 600; vertical-align: .1em; white-space: nowrap; }
.dept-actions { display: flex; justify-content: flex-end; gap: .4rem; min-width: 158px; }
.dept-actions .btn { min-height: 36px; white-space: nowrap; }
.dept-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; }
.dept-toggle-text { display: none; margin-left: .35rem; }
.dept-row.is-off { background: #f6f7fa; }
.dept-row.is-off .dept-code { background: #e6e9f0; color: #56627d; }
.dept-row.is-off .dept-name { color: #46536f; }
.dept-mobile-label { display: none; }
.dept-no-result { margin: 0; padding: 2rem 1rem; border-top: 1px solid var(--line); color: #46536f; text-align: center; }
.dept-form-section { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.dept-form-title { margin: 0 0 .75rem; color: var(--navy); font-size: 1rem; font-weight: 600; }
.dept-form-title i { margin-right: .45rem; color: #0a844b; }
@media (min-width: 1500px) {
  .dept-row { grid-template-columns: 66px minmax(0, 1fr) minmax(160px, 280px) 70px 70px auto; }
  .dept-row-head > :last-child { width: 200px; }
  .dept-actions { min-width: 200px; }
  .dept-toggle-text { display: inline; }
}
@media (max-width: 1199.98px) {
  .dept-row-head { display: none; }
  .dept-row { grid-template-columns: 66px auto minmax(0, 1fr); }
  .dept-code { grid-row: 1 / span 2; align-self: start; }
  .dept-info { grid-column: 2 / -1; }
  .dept-head-cell { grid-column: 2 / -1; }
  .dept-count { display: inline-flex; align-items: baseline; gap: .3rem; }
  .dept-count { grid-row: 3; }
  a.dept-count { grid-column: 2; justify-self: start; }
  div.dept-count { grid-column: 3; }
  .dept-actions { grid-column: 2 / -1; justify-content: flex-start; min-width: 0; }
  .dept-mobile-label { display: inline; color: #46536f; font-size: .875rem; }
  .dept-head-cell .dept-mobile-label { display: block; font-size: .8125rem; }
  .dept-toggle-text { display: inline; }
}
@media (max-width: 767.98px) {
  .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-prefix-note { margin-left: 0; width: 100%; }
  .dept-search { max-width: none; flex-basis: 100%; }
}

/* ---------- Users ---------- */
.user-filter { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(170px, 1fr) minmax(150px, .8fr) auto; gap: .6rem .75rem; align-items: end; }
.user-filter .form-control, .user-filter .form-select { min-height: 42px; }
.user-filter-submit { display: flex; gap: .4rem; }
.user-filter-submit .btn { min-height: 42px; white-space: nowrap; }
.user-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr) 132px 124px 176px; gap: .4rem 1rem; align-items: center; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.user-row-head { padding: .6rem 1.1rem; border-top: 0; border-radius: 15px 15px 0 0; background: #f4f7fc; color: #3c4763; font-size: .875rem; font-weight: 600; }
.user-row:not(.user-row-head):hover { background: #f7f9fe; }
.user-person { display: flex; align-items: flex-start; gap: .8rem; min-width: 0; }
.user-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tone-soft); color: var(--tone-ink); font-size: 1.15rem; font-weight: 700; }
.user-info { min-width: 0; }
.user-name { color: var(--navy); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.user-position { color: #46536f; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.user-signin { display: flex; flex-wrap: wrap; gap: .1rem .85rem; margin-top: .1rem; color: #56627d; font-size: .8125rem; overflow-wrap: anywhere; }
.user-signin i { margin-right: .3rem; }
.user-tag { display: inline-block; margin-left: .35rem; padding: .05rem .55rem; border-radius: 999px; background: #e6e9f0; color: #46536f; font-size: .78rem; font-weight: 600; vertical-align: .1em; white-space: nowrap; }
.user-tag-self { background: #e4edfc; color: #1a3f8f; }
.user-dept { color: #2a3347; font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.user-role { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--tone-soft); color: var(--tone-ink); font-size: .8125rem; font-weight: 600; line-height: 1.35; }
.user-login { color: #46536f; font-size: .875rem; line-height: 1.4; }
.user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.user-actions .btn { min-height: 36px; white-space: nowrap; }
.user-icon-btn { min-width: 38px; }
.user-row.is-off { background: #f6f7fa; }
.user-row.is-off .user-avatar, .user-row.is-off .user-role { background: #e6e9f0; color: #56627d; }
.user-row.is-off .user-name { color: #46536f; }
.user-list .card-footer { padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
.user-provider-note { display: flex; gap: .75rem; margin-bottom: 1.1rem; padding: .7rem .9rem; border-radius: 12px; background: #e4edfc; color: #1a3f8f; font-size: .875rem; line-height: 1.5; }
.user-provider-note i { font-size: 1.25rem; }
.user-form legend.form-label { float: none; margin-bottom: .5rem; font-size: 1rem; line-height: inherit; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.role-card { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .85rem; border: 2px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s; }
.role-card:hover { border-color: var(--tone); }
.role-card:has(input:checked) { border-color: var(--tone); background: var(--tone-soft); }
.role-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.role-card .form-check-input { flex: none; margin: .55rem 0 0; }
.role-card-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tone-soft); color: var(--tone-ink); }
.role-card:has(input:checked) .role-card-icon { background: #fff; }
.role-card-text { min-width: 0; color: var(--navy); line-height: 1.35; }
.role-card-text strong { display: block; font-weight: 600; }
.role-card-text small { display: block; margin-top: .1rem; color: #46536f; font-size: .8125rem; }
@media (max-width: 1199.98px) {
  .user-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-filter-submit .btn-primary { flex: 1; }
  .user-row-head { display: none; }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; }
  .user-person { grid-column: 1; }
  .user-row > div:has(> .user-role) { grid-column: 2; grid-row: 1; align-self: start; }
  .user-dept, .user-login { grid-column: 1 / -1; padding-left: 3.55rem; }
  .user-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 3.55rem; }
  .user-dept .dept-mobile-label, .user-login .dept-mobile-label { display: inline; margin-right: .4rem; color: #56627d; font-size: .8125rem; }
}
@media (max-width: 767.98px) {
  .role-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .user-filter { grid-template-columns: minmax(0, 1fr); }
  .user-row { grid-template-columns: minmax(0, 1fr); }
  .user-row > div:has(> .user-role) { grid-column: 1; grid-row: auto; padding-left: 3.55rem; }
}

/* ---------- Wizard ---------- */
.wizard-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; padding-bottom: .25rem; margin-bottom: 1.1rem; }
.wizard-steps .ws { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding: .7rem .75rem; border: 2px solid transparent; border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 6px 16px rgba(30,64,135,.07); color: #3a4560; font-size: .9rem; line-height: 1.3; text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.wizard-steps .ws:hover { border-color: #bcd0ee; }
.wizard-steps .ws:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.wizard-steps .ws-top { display: flex; align-items: center; gap: .55rem; }
.wizard-steps .ws-icon { color: #3f5a8f; font-size: 1.35rem; line-height: 1; }
.wizard-steps .ws .n { width: 28px; height: 28px; border-radius: 50%; background: #e6ecf7; color: #33426a; display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: 0 0 28px; }
.wizard-steps .ws.active { border-color: #0a844b; background: #effaf4; color: #0b3f2a; font-weight: 700; box-shadow: 0 8px 18px rgba(8,120,76,.16); }
.wizard-steps .ws.active .n { background: var(--brand); color: #fff; }
.wizard-steps .ws.active .ws-icon { color: #0a844b; }
.wizard-steps .ws.has-error { border-color: var(--err); background: #fff5f5; }
.wizard-steps .ws.has-error .n { background: var(--err); color: #fff; }
.wizard-steps .ws.has-error .ws-icon { color: var(--err); }
.wizard-steps .ws.done .n { background: var(--ok); color: #fff; }
.step-pane { display: none; }
.step-pane.active { display: block; }
.wizard-card { position: relative; background: rgba(255,255,255,.94); }
.wizard-card::before { content: ""; position: absolute; top: 0; right: 0; width: min(46%, 460px); height: 104px; border-top-right-radius: 15px; background: url('../images/card-wave.svg') right top / 100% 100% no-repeat; pointer-events: none; }
.wizard-card > .card-header, .wizard-card > .card-body { position: relative; }
.wizard-card > .card-header { z-index: 2; margin: 0 1.5rem; padding: 1.15rem 0 .9rem; }
.wizard-card > .card-header:focus-within { z-index: 20; }
.wizard-card > .card-body { padding: 1.15rem 1.5rem 1.5rem; }
.step-title { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.step-title-icon { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 14px; background: #e0f4e8; color: #0a844b; font-size: 1.65rem; }
.step-title-text { color: var(--navy); font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.step-title-desc { margin-top: .1rem; color: #56627d; font-size: .9rem; font-weight: 400; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; top: 21px; left: .9rem; z-index: 6; transform: translateY(-50%); color: #5a6a8c; font-size: 1.1rem; line-height: 1; pointer-events: none; }
.input-icon .form-control, .input-icon .form-select { min-height: 42px; padding-left: 2.6rem; }
.wizard-card .input-group > .form-control, .wizard-card .input-group > .input-group-text, .wizard-card .input-group > .btn { min-height: 42px; }
.wizard-nav { position: sticky; bottom: 0; background: rgba(234,241,253,.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: .9rem 0; margin-top: 1rem; z-index: 10; }
.wizard-nav .btn { --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .6rem; --bs-btn-font-weight: 600; }
.wizard-nav .btn-outline-secondary, .wizard-nav .btn-outline-primary { background-color: rgba(255,255,255,.85); }
.wizard-nav .btn-outline-secondary:hover:not(:disabled) { background-color: var(--bs-btn-hover-bg); }
.wizard-nav .btn-outline-primary:hover:not(:disabled) { background-color: var(--bs-btn-hover-bg); }
.btn-finish { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent; --bs-btn-active-border-color: transparent; background: linear-gradient(90deg, #123a8f 0%, #0a7a4c 100%); box-shadow: 0 8px 18px rgba(10,80,110,.28); }
.btn-finish:hover { background: linear-gradient(90deg, #0f327c 0%, #086a41 100%); }
@media (max-width: 1199.98px) {
  .wizard-steps { display: flex; overflow-x: auto; scrollbar-width: thin; }
  .wizard-steps .ws { flex: 0 0 132px; }
}
@media (max-width: 575.98px) {
  .wizard-card::before { width: 60%; height: 80px; }
  .wizard-card > .card-header { margin: 0 1rem; padding-top: .9rem; }
  .wizard-card > .card-body { padding: 1rem; }
  .step-title-icon { flex-basis: 44px; width: 44px; height: 44px; font-size: 1.3rem; }
  .step-title-text { font-size: 1.1rem; }
  .step-title-desc { font-size: .8125rem; }
  .wizard-nav { padding: .5rem 0; }
  .wizard-nav .btn { --bs-btn-padding-x: .8rem; --bs-btn-padding-y: .4rem; }
  .wizard-nav > .ms-auto { flex-wrap: wrap; width: 100%; margin-left: 0 !important; }
  .wizard-nav > .ms-auto .btn { flex: 1 1 auto; }
}
.row-item { border: 1px solid var(--line); border-radius: 10px; padding: .85rem; background: #fff; margin-bottom: .7rem; position: relative; }
.row-item .row-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.row-item .row-no { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.segment-fields { background: #f8f9fc; border-radius: 8px; padding: .75rem; margin-top: .5rem; }
.paragraph-preview { background: #fff; border: 1px dashed #c6cfe2; border-radius: 8px; padding: .75rem 1rem; font-size: 1rem; line-height: 1.7; }
.picker-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.12); max-height: 260px; overflow: auto; }
.picker-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .5rem .75rem; }
.picker-results button:hover { background: #f1f4fb; }

/* ---------- Type-ahead suggestions ---------- */
.suggest-box { position: absolute; z-index: 1070; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(16,24,40,.16); max-height: 280px; overflow-y: auto; padding: .25rem 0; }
.suggest-box button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .4rem .75rem; font-size: .95rem; }
.suggest-box button:hover, .suggest-box button.active { background: #eaf0fc; color: var(--navy); }

/* ---------- Thai date picker ---------- */
.tdp { position: relative; }
.tdp-pop { position: absolute; z-index: 1060; top: calc(100% + 4px); left: 0; width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.18); padding: .6rem; }
.tdp-head { display: flex; align-items: center; justify-content: space-between; gap: .3rem; margin-bottom: .4rem; }
.tdp-head select { font-size: .85rem; padding: .15rem .4rem; }
.tdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: .86rem; }
.tdp-grid .dow { color: var(--muted); font-size: .75rem; padding: .2rem 0; }
.tdp-grid button { border: 0; background: none; border-radius: 6px; padding: .3rem 0; }
.tdp-grid button:hover { background: #eef2fb; }
.tdp-grid button.sel { background: var(--brand); color: #fff; }
.tdp-grid button.today { outline: 1px solid var(--brand); }
.tdp-grid button.other { color: #b5bdd0; }

/* ---------- Preview ---------- */
.preview-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 10px; background: #525659; }
.preview-loading { height: 60vh; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }

/* ---------- Login ---------- */
.login-wrap { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 1.5rem 1rem; }
.login-wrap::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #0b2a83 url('../images/login-bg.webp') 70% bottom / cover no-repeat; }
.auth-org { position: relative; display: flex; align-items: center; justify-content: center; gap: .875rem; padding-bottom: .75rem; color: #fff; }
.auth-org::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(125,200,255,.95), transparent); }
.auth-org-logo { flex: none; width: 72px; height: 72px; }
.auth-org-name { padding-left: .875rem; border-left: 1px solid rgba(255,255,255,.4); line-height: 1.35; }
.auth-org-th { font-size: 1.3rem; font-weight: 600; }
.auth-org-en { font-size: .9rem; color: rgba(255,255,255,.85); }
.login-card { position: relative; width: 100%; max-width: 500px; overflow: hidden; border: 0; border-radius: 24px; background: linear-gradient(180deg, #fff 0%, #f6f8fd 100%); box-shadow: 0 24px 60px rgba(3,15,60,.45); }
.login-card-body { position: relative; z-index: 1; padding: 2rem 2rem 2.75rem; }
.login-card-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 64px; }
.auth-credit { color: rgba(255,255,255,.92); font-size: .8125rem; line-height: 1.45; text-align: center; text-shadow: 0 1px 3px rgba(3,15,60,.75); }
@media (min-width: 481px) and (max-height: 820px) { .login-wrap { gap: .875rem; padding-top: 1rem; padding-bottom: 1rem; } }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.login-card .logo-mark, .login-brand-logo { flex: none; width: 84px; height: 84px; border-radius: 20px; object-fit: contain; }
.login-card .logo-mark { display: grid; place-items: center; background: linear-gradient(145deg, #2a4fb5 0%, var(--brand) 55%, #142a68 100%); color: #fff; font-size: 2.4rem; box-shadow: 0 8px 18px rgba(29,58,138,.3); }
.login-brand-text { min-width: 0; padding-left: 1rem; border-left: 1px solid var(--line); line-height: 1.4; }
.login-brand-name { margin: 0; color: var(--navy); font-size: 2rem; font-weight: 700; line-height: 1.15; }
.login-brand-en { color: #46536f; font-size: .875rem; }
.login-brand-th { color: var(--navy); font-size: .9375rem; font-weight: 600; }
.login-brand-org { color: #46536f; font-size: .875rem; }
.provider-login { display: block; padding: 5px; background: #fff; border: 2px solid #0a844b; border-radius: 18px; text-decoration: none; box-shadow: 0 10px 24px rgba(8,120,76,.2); transition: transform .15s ease, box-shadow .15s ease; }
.provider-login:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(8,120,76,.32); }
.provider-login:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.provider-login-logo { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; padding: .75rem .75rem .625rem; }
.provider-login-label { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-radius: 12px; background: linear-gradient(180deg, #0a844b 0%, #066b3d 100%); color: #fff; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.provider-login-icon { padding-right: .75rem; border-right: 1px solid rgba(255,255,255,.4); font-size: 1.15rem; line-height: 1; }
.provider-login-text { flex: 1; text-align: center; }
.login-help { margin: .875rem 0 1rem; color: #46536f; font-size: .875rem; line-height: 1.45; text-align: center; }
@media (prefers-reduced-motion: reduce) { .provider-login, .emergency-login-chevron { transition: none; } .provider-login:hover { transform: none; } }
.emergency-login { padding-top: 1rem; border-top: 1px solid var(--line); }
.emergency-login > summary { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-radius: 12px; background: #eef2fa; color: var(--navy); font-size: .9375rem; font-weight: 600; line-height: 1.4; list-style: none; cursor: pointer; }
.emergency-login > summary::-webkit-details-marker { display: none; }
.emergency-login > summary:hover { background: #e3e9f6; }
.emergency-login > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.emergency-login-icon { font-size: 1.25rem; line-height: 1; }
.emergency-login-title { flex: 1; text-align: center; }
.emergency-login-chevron { transition: transform .15s ease; }
.emergency-login[open] .emergency-login-chevron { transform: rotate(90deg); }
.emergency-login-body { padding-top: 1rem; }
.login-privacy { display: flex; align-items: center; gap: .875rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.login-privacy-icon { flex: none; color: #0a844b; font-size: 1.75rem; line-height: 1; }
.login-privacy-text { margin: 0; padding-left: .875rem; border-left: 1px solid var(--line); color: #46536f; font-size: .8125rem; line-height: 1.5; }
@media (max-width: 480px) {
  .login-wrap { justify-content: flex-start; gap: 1rem; padding: 1rem .75rem; }
  .auth-org-logo { width: 56px; height: 56px; }
  .auth-org-name { padding-left: .625rem; }
  .auth-org-th { font-size: 1.0625rem; }
  .auth-org-en { font-size: .75rem; }
  .login-card { border-radius: 20px; }
  .login-card-body { padding: 1.25rem 1.125rem 2.5rem; }
  .login-brand { gap: .75rem; margin-bottom: 1.125rem; }
  .login-card .logo-mark, .login-brand-logo { width: 64px; height: 64px; border-radius: 16px; font-size: 1.85rem; }
  .login-brand-text { padding-left: .75rem; }
  .login-brand-name { font-size: 1.5rem; }
  .login-brand-en, .login-brand-org { font-size: .8125rem; }
  .login-brand-th { font-size: .875rem; }
  .emergency-login > summary { gap: .5rem; padding: .7rem .75rem; font-size: .875rem; }
  .provider-login-text { white-space: nowrap; }
}
@media (max-width: 380px) {
  .auth-org-logo { width: 48px; height: 48px; }
  .auth-org-th { font-size: .9375rem; }
  .auth-org-en { font-size: .6875rem; }
  .login-brand { gap: .5rem; }
  .login-card .logo-mark, .login-brand-logo { width: 52px; height: 52px; border-radius: 14px; font-size: 1.5rem; }
  .login-brand-text { padding-left: .5rem; }
  .login-brand-en { font-size: .6875rem; }
  .login-brand-th, .login-brand-org { font-size: .75rem; }
  .provider-login-label { gap: .5rem; padding: .7rem .625rem; font-size: .9375rem; }
  .provider-login-icon { padding-right: .5rem; }
  .login-help { font-size: .8125rem; }
  .emergency-login > summary { font-size: .8125rem; }
}
.two-factor-qr { display: flex; justify-content: center; margin-bottom: 1rem; }
.two-factor-qr img { width: 220px; max-width: 100%; height: auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.two-factor-secret { display: block; margin-top: .5rem; padding: .5rem .75rem; background: var(--bg); border-radius: 8px; color: var(--navy); font-size: .95rem; word-spacing: .15rem; overflow-wrap: anywhere; }
.two-factor-code { letter-spacing: .3em; font-weight: 600; }

/* ---------- Scroll navigation (go to top / bottom) ---------- */
.scroll-nav { position: fixed; right: 1.25rem; bottom: calc(1.25rem + var(--scroll-nav-offset, 0px)); z-index: 1020; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .4rem; border-radius: 999px; background: linear-gradient(160deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.22) 55%, rgba(220,232,252,.3) 100%); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%); border: 1px solid rgba(255,255,255,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(255,255,255,.25), 0 12px 32px rgba(30,64,135,.2), 0 2px 6px rgba(30,64,135,.08); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .22s ease, transform .22s ease, bottom .18s ease, visibility 0s linear .22s; }
.scroll-nav.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.scroll-nav-btn { position: relative; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.15rem; line-height: 1; background: linear-gradient(145deg, #2f6fe0 0%, #1b4cae 100%); box-shadow: 0 6px 14px rgba(27,76,174,.32); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease, filter .2s ease; }
.scroll-nav-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(27,76,174,.4); }
.scroll-nav-btn[data-scroll="bottom"]:hover { transform: translateY(2px); }
.scroll-nav-btn:active { transform: scale(.94); }
.scroll-nav-btn:focus-visible { outline: 3px solid rgba(47,178,107,.6); outline-offset: 2px; }
.scroll-nav-btn:disabled { opacity: .38; filter: grayscale(.4); box-shadow: none; cursor: default; transform: none; }
.scroll-nav-btn::after { content: attr(data-label); position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%); padding: .32rem .65rem; border-radius: 8px; background: var(--navy); color: #fff; font-size: .8125rem; font-weight: 500; white-space: nowrap; box-shadow: 0 6px 16px rgba(15,29,64,.25); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.scroll-nav-btn:hover::after, .scroll-nav-btn:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.scroll-nav-track { position: relative; width: 4px; height: 36px; border-radius: 4px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(30,64,135,.08); overflow: hidden; }
.scroll-nav-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, #3ddc84 0%, #14844c 100%); transform: scaleY(var(--scroll-progress, 0)); transform-origin: top; }
body.sb-open .scroll-nav { opacity: 0; visibility: hidden; }
@media (max-width: 575.98px) {
  .scroll-nav { right: .75rem; bottom: calc(.9rem + var(--scroll-nav-offset, 0px)); gap: .35rem; padding: .3rem; }
  .scroll-nav-btn { width: 38px; height: 38px; font-size: 1rem; }
  .scroll-nav-track { height: 26px; }
  .scroll-nav-btn::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .scroll-nav, .scroll-nav-btn, .scroll-nav-btn::after { transition: none; } .scroll-nav-btn:hover, .scroll-nav-btn[data-scroll="bottom"]:hover { transform: none; } }

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .footer, .no-print, .wizard-nav, .scroll-nav, .app-body::before { display: none !important; }
  .main { margin: 0 !important; }
  body { background: #fff; }
}
