:root {
  --bs-font-sans-serif: 'Sarabun', sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-color: #273d34;
  --bs-body-bg: #f6f8f7;
  --bs-primary: #245d4b;
  --bs-primary-rgb: 36, 93, 75;
  --bs-link-color: #245d4b;
  --bs-link-color-rgb: 36, 93, 75;
  --bs-link-hover-color: #174434;
  --bs-link-hover-color-rgb: 23, 68, 52;
  --ink: #273d34;
  --muted: #65746c;
  --line: #e4eae6;
  --green: #245d4b;
  --sidebar-width: 244px;
}

body { font-size: 17px; line-height: 1.65; }
a { text-decoration: none; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.app-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 1em; height: 1em; font-size: 20px; line-height: 1; vertical-align: -.1em; }
.app-icon::before { display: block; }
:focus-visible { outline: 3px solid #9c6d20; outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 1100; padding: 12px 20px; background: #fff; border: 2px solid var(--green); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border-radius: 8px; padding: 9px 16px; font-size: 16px; font-weight: 500; }
.btn-primary { --bs-btn-bg: #245d4b; --bs-btn-border-color: #245d4b; --bs-btn-hover-bg: #194735; --bs-btn-hover-border-color: #194735; --bs-btn-active-bg: #173e30; --bs-btn-active-border-color: #173e30; --bs-btn-disabled-bg: #245d4b; }
.btn-outline-primary { --bs-btn-color: #245d4b; --bs-btn-border-color: #b7ccc2; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #245d4b; --bs-btn-hover-border-color: #245d4b; --bs-btn-active-bg: #194735; --bs-btn-active-border-color: #194735; background: #fff; }
.icon-button { width: 44px; padding: 10px; color: var(--ink); border: 1px solid var(--line); }
.form-control, .form-select { min-height: 46px; border-color: #d6e0da; border-radius: 8px; font-size: 17px; }
.form-control:focus, .form-select:focus { border-color: #6c9b85; box-shadow: 0 0 0 3px rgb(36 93 75 / 12%); }

/* Shared shell: permanent navigation on desktop, offcanvas on smaller screens. */
.app-sidebar { --bs-offcanvas-width: 284px; background: #fff; border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 30px 23px 24px; }
.brand-link { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 46px; border-radius: 12px; color: #fff; background: var(--green); }
.brand-mark .app-icon { width: 28px; height: 28px; font-size: 28px; }
.brand-link strong { display: block; font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -.7px; }
.brand-link small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.nav-caption { color: #758178; font-size: 13px; margin: 0 14px 10px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar-link { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 11px 14px; color: #5d6c63; border-radius: 8px; font-size: 16px; }
.sidebar-link .app-icon { font-size: 20px; }
.sidebar-link:hover { color: var(--green); background: #f4f7f5; }
.sidebar-link.active { color: var(--green); background: #eaf2ed; font-weight: 600; }
.sidebar-link.active::after { content: ''; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--green); }
.sidebar-note { display: flex; gap: 12px; align-items: center; margin: 56px 12px 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.sidebar-note-icon { color: #668e75; }
.sidebar-note p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.8; }
.sidebar-note strong { color: #4a6355; font-weight: 500; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; padding: 18px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.sidebar-footer .app-icon { width: 16px; height: 16px; font-size: 16px; }
.sidebar-footer small { font-size: 12px; margin-left: auto; }
.app-workspace { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 76px; padding: 15px 36px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-leading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-agency-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; color: var(--green); background: #eaf2ed; }
.topbar-agency-icon .app-icon { font-size: 18px; }
.topbar-title { font-size: 16px; font-weight: 500; color: #586b5f; }
.topbar-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.login-link { white-space: nowrap; }
.login-link .app-icon { width: 17px; height: 17px; font-size: 17px; }
.preview-badge { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 5px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--muted); }
.status-dot { display: inline-block; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.preview-badge .status-dot { color: #6b8977; }
.main-content { flex: 1; width: 100%; max-width: 1480px; padding: 34px 36px 32px; margin: 0 auto; }
.main-content:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading .btn { flex-shrink: 0; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 14px; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.5px; line-height: 1.5; margin: 0 0 4px; }
.page-description { margin: 0; font-size: 16px; color: var(--muted); }
.section-label { display: flex; justify-content: space-between; gap: 12px; color: #56695c; font-size: 15px; margin-bottom: 12px; }
.snapshot-date { font-size: 13px; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-top h2 { font-size: 15px; font-weight: 400; color: #56685c; line-height: 1.6; margin: 0; }
.stat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; }
.stat-icon .app-icon { width: 21px; height: 21px; font-size: 21px; }
.tone-green { background: #edf4ef; color: #3c7457; }
.tone-blue { background: #edf2f8; color: #526f95; }
.tone-amber { background: #fbf3e5; color: #927035; }
.tone-red { background: #faeeee; color: #ab5753; }
.stat-value { font-size: 34px; font-weight: 600; line-height: 1.45; font-variant-numeric: tabular-nums; margin: 13px 0 7px; letter-spacing: -.6px; }
.stat-value span { margin-left: 7px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.stat-note { margin: 0; font-size: 13px; color: var(--muted); }
.role-dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 24px 28px; border: 1px solid #dce8e1; border-radius: 14px; background: linear-gradient(120deg, #f4f8f5, #fff); }
.role-dashboard-heading h2 { margin: 0; font-size: 25px; font-weight: 700; }
.role-dashboard-heading p { margin: 4px 0 0; color: var(--muted); }
.role-dashboard-heading .eyebrow { margin: 0 0 3px; color: #3f765e; font-size: 13px; font-weight: 600; }
.role-dashboard-mark { display: grid; place-items: center; width: 54px; height: 54px; flex-shrink: 0; border-radius: 15px; color: #fff; background: var(--green); box-shadow: 0 10px 24px rgb(36 93 75 / 18%); }
.role-dashboard-mark .app-icon { font-size: 27px; }
.role-task-panel { margin-bottom: 24px; }
.role-task-panel > .surface-heading > .app-icon { color: #799083; }
.role-recent-section { margin-top: 0; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .85fr); gap: 22px; margin-bottom: 24px; }
.chart-card { min-width: 0; overflow: hidden; }
.chart-heading-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; }
.chart-heading-icon .app-icon { font-size: 21px; }
.chart-container { position: relative; min-width: 0; height: 310px; margin: 0 22px 22px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; margin-bottom: 24px; }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.surface-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 21px 24px 16px; }
.surface-heading h2, .report-card h2 { font-size: 19px; font-weight: 600; line-height: 1.6; margin: 0; }
.surface-heading p { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.subtle-icon { color: #90a095; }
.task-list { padding: 0 24px 10px; }
.task-item { display: flex; align-items: center; gap: 13px; padding: 17px 0; color: var(--ink); border-bottom: 1px solid #edf0ed; }
.task-item:last-child { border-bottom: 0; }
.task-item:hover strong { color: #1b704e; }
.task-icon { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; }
.task-icon .app-icon { width: 21px; height: 21px; font-size: 21px; }
.task-copy { flex: 1; min-width: 0; }
.task-copy strong, .quick-link strong { display: block; font-size: 16px; font-weight: 500; }
.task-copy small, .quick-link small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.task-count { display: flex; align-items: baseline; gap: 6px; font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; }
.task-count small { font-size: 13px; font-weight: 400; color: var(--muted); }
.task-item > .app-icon { width: 15px; height: 15px; font-size: 15px; color: #9aa69e; }
.quick-panel { background: #fcfdfc; padding-bottom: 8px; }
.quick-link { display: flex; gap: 12px; align-items: center; color: var(--ink); margin: 0 24px; padding: 15px 0; border-bottom: 1px solid #edf0ed; }
.quick-link:last-child { border-bottom: 0; }
.quick-link > span:nth-child(2) { flex: 1; }
.quick-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; color: #2f7657; background: #edf5f0; }
.quick-icon .app-icon { font-size: 22px; }
.quick-link > .app-icon { width: 17px; height: 17px; font-size: 17px; color: #8a9c90; }
.quick-link:hover strong { color: #1b704e; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.text-link .app-icon { width: 16px; height: 16px; font-size: 16px; }
.recent-section { overflow: hidden; }
.records-wrap { overflow-x: auto; }
.records-table { --bs-table-bg: #fff; font-size: 15px; vertical-align: middle; color: var(--ink); }
.records-table > thead > tr > th { padding: 12px 24px; background: #f8faf8; color: #66756b; font-size: 13px; font-weight: 500; border-color: var(--line); white-space: nowrap; }
.records-table > tbody > tr > td { padding: 17px 24px; border-color: #edf0ed; color: var(--ink); }
.records-table tbody tr:last-child td { border-bottom: 0; }
.records-table > tbody > tr:hover > td { background: #fcfdfc; }
.record-primary { min-width: 230px; }
.record-primary strong { display: block; font-weight: 500; line-height: 1.65; }
.record-primary small { display: block; font-size: 12px; color: #6c7b70; margin-top: 3px; letter-spacing: .2px; }
.records-table .amount-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mobile-unit { display: none; }
.record-action { text-align: right; white-space: nowrap; }
.record-button { color: #34654e; padding: 6px 0 6px 6px; font-size: 13px; white-space: nowrap; }
.record-button .app-icon { width: 13px; height: 13px; font-size: 13px; }
.record-button:hover { color: #143d2c; text-decoration: underline; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; padding: 4px 9px; border-radius: 5px; white-space: nowrap; }
.status-success { color: #36664a; background: #edf5ef; }
.status-warning { color: #82601d; background: #fcf4e5; }
.status-danger { color: #a24e48; background: #faeeed; }
.status-neutral { color: #586b7f; background: #eef2f7; }
.records-toolbar { display: flex; align-items: center; gap: 12px; padding: 24px 24px 12px; }
.search-field { position: relative; flex: 1; max-width: 480px; }
.search-field > .app-icon { position: absolute; top: 15px; left: 14px; width: 17px; height: 17px; font-size: 17px; color: #74897a; pointer-events: none; }
.search-field input { padding-left: 42px; }
.search-field input::placeholder { color: #77877c; font-size: 15px; }
.status-filter { min-width: 190px; margin-left: auto; }
.results-summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 24px 10px; font-size: 14px; color: var(--muted); }
.reset-filter { min-height: 34px; padding: 3px 6px; font-size: 14px; color: var(--green); text-decoration: underline; }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state > .app-icon { width: 32px; height: 32px; font-size: 32px; color: #8fa295; margin-bottom: 16px; }
.empty-state h2 { font-size: 19px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 15px; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.report-card { display: flex; flex-direction: column; padding: 26px; }
.report-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; margin-bottom: 22px; }
.report-icon .app-icon { font-size: 25px; }
.report-card h2 { margin-bottom: 7px; }
.report-card p { color: var(--muted); font-size: 15px; flex: 1; margin-bottom: 20px; }
.report-card small { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.report-card .btn { font-size: 14px; }
.data-footnote { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.8; color: var(--muted); margin: 18px 0 0; }
.data-footnote .app-icon { width: 16px; height: 16px; font-size: 16px; margin-top: 3px; }
.role-list { padding: 0 24px 8px; }
.role-item { display: flex; align-items: center; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.role-icon { display: grid; place-items: center; color: #698675; background: #f0f5f1; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; }
.role-item > div { flex: 1; }
.role-item h3 { font-size: 17px; margin: 0 0 4px; font-weight: 600; }
.role-item p { margin: 0; font-size: 15px; color: var(--muted); }
.role-scope { border: 1px solid var(--line); border-radius: 5px; padding: 4px 9px; font-size: 13px; color: #5c6f62; white-space: nowrap; }
.modal-content { border: 0; border-radius: 14px; }
.modal-title { font-size: 22px; }
.modal-header, .modal-footer { border-color: var(--line); padding: 18px 24px; }
.modal-body { padding: 24px; }
.login-modal-dialog { max-width: 510px; }
.login-modal-content { overflow: hidden; border: 1px solid rgb(255 255 255 / 40%); border-radius: 18px; box-shadow: 0 28px 80px rgb(16 49 37 / 24%); }
.login-modal-header { align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.login-modal-brand { display: flex; align-items: center; gap: 12px; }
.login-modal-brand .brand-mark { width: 40px; height: 42px; border-radius: 11px; }
.login-modal-brand .brand-mark .app-icon { font-size: 24px; }
.login-modal-brand strong { display: block; font-size: 20px; line-height: 1.25; }
.login-modal-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.login-modal-body { padding: 27px 30px 25px; }
.login-modal-heading { margin-bottom: 22px; }
.login-modal-heading p { margin: 0 0 3px; color: #3f765e; font-size: 13px; font-weight: 600; }
.login-modal-heading h2 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.4; }
.login-modal-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.login-modal-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.login-modal-footer a { font-weight: 600; }
.detail-list dt { font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 16px; }
.detail-list dd { font-size: 17px; margin-top: 4px; overflow-wrap: anywhere; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0 36px; padding: 20px 0 24px; border-top: 1px solid var(--line); color: #728176; font-size: 12px; }

/* Standalone sign-in page shares the main application's type and colors. */
.auth-body { background: #f6f8f7; }
.auth-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 36px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 15px; color: #526c5c; }
.back-link > .app-icon { width: 17px; height: 17px; font-size: 17px; transform: rotate(180deg); }
.back-link:hover { color: #173e30; }
.auth-main { display: flex; align-items: center; justify-content: center; flex: 1; padding: 20px 24px 36px; }
.auth-main:focus { outline: none; }
.auth-card { width: 100%; max-width: 446px; padding: 34px 38px 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 6px 32px rgb(36 63 46 / 3%); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 13px; color: var(--ink); }
.auth-brand .brand-mark { width: 50px; height: 52px; border-radius: 14px; }
.auth-brand .brand-mark .app-icon { width: 31px; height: 31px; font-size: 31px; }
.auth-brand strong { font-size: 27px; letter-spacing: -.8px; line-height: 1.3; }
.auth-system-name { color: var(--muted); text-align: center; font-size: 14px; margin: 5px 0 0; }
.auth-heading { text-align: center; margin: 28px 0 20px; }
.auth-heading h1 { font-size: 27px; margin-bottom: 4px; }
.auth-heading p { color: var(--muted); font-size: 15px; margin: 0; }
.auth-preview-note { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; margin-bottom: 23px; border: 1px solid #e4ece6; border-radius: 8px; background: #f7faf8; font-size: 13px; line-height: 1.8; color: #58705f; }
.auth-preview-note > .app-icon { width: 16px; height: 16px; font-size: 16px; margin-top: 2px; }
.auth-field { margin-bottom: 20px; }
.auth-field .form-label { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > .app-icon { position: absolute; left: 15px; top: 16px; width: 18px; height: 18px; font-size: 18px; color: #7f9386; pointer-events: none; }
.auth-input-wrap .form-control { height: 50px; padding-left: 44px; font-size: 18px; background-color: #fff; }
.auth-input-wrap .form-control::placeholder { font-size: 15px; color: #849389; }
.password-input-wrap .form-control { padding-right: 54px; }
.password-input-wrap .form-control.is-invalid { background-image: none; }
.password-toggle { position: absolute; right: 4px; top: 3px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #6d8576; }
.password-toggle:hover { background: #f0f5f1; color: var(--green); }
.password-toggle .app-icon { width: 19px; height: 19px; font-size: 19px; }
.auth-field-error { font-size: 14px; line-height: 1.6; color: #a8433e; margin: 7px 0 0; }
.auth-submit { width: 100%; min-height: 48px; margin-top: 3px; font-size: 17px; justify-content: center; gap: 12px; }
.auth-feedback { padding: 12px 14px; margin-bottom: 22px; font-size: 15px; overflow-wrap: anywhere; }
.auth-info { background: #edf3f8; border: 1px solid #dbe6ef; color: #405e76; }
.auth-help { margin-top: 21px; padding-top: 10px; border-top: 1px solid var(--line); text-align: center; }
.auth-help-toggle { padding: 8px 4px; color: #5a7361; font-size: 14px; font-weight: 400; }
.auth-help-toggle:hover { color: var(--green); text-decoration: underline; }
.auth-help-content { padding: 8px 0 5px; font-size: 14px; text-align: left; line-height: 1.9; color: var(--muted); }
.auth-footer { padding: 16px 20px 22px; text-align: center; color: #748479; font-size: 13px; }
.registration-page { background: #f7faf8; }
.registration-screen { display: grid; grid-template-columns: minmax(340px, .8fr) minmax(620px, 1.2fr); min-height: 100vh; min-height: 100dvh; }
.registration-intro { position: sticky; top: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: clamp(34px, 5vw, 68px); overflow: hidden; color: #fff; background: linear-gradient(145deg, #123d30 0%, #205f49 55%, #34785d 100%); }
.registration-intro::before, .registration-intro::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.registration-intro::before { top: -160px; right: -170px; width: 380px; height: 380px; border: 1px solid rgb(255 255 255 / 12%); }
.registration-intro::after { right: -95px; bottom: -160px; width: 330px; height: 330px; background: rgb(255 255 255 / 5%); }
.registration-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 14px; align-self: flex-start; color: #fff; }
.registration-brand:hover { color: #fff; }
.registration-brand .brand-mark { color: #245d4b; background: #fff; }
.registration-brand strong { display: block; font-size: 25px; line-height: 1.25; }
.registration-brand small { display: block; margin-top: 3px; color: rgb(255 255 255 / 72%); font-size: 13px; }
.registration-intro-copy { position: relative; z-index: 1; max-width: 500px; margin: auto 0; padding: 48px 0; }
.registration-eyebrow { margin: 0 0 12px; color: #b9ddcb; font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.registration-intro h2 { margin: 0; color: #fff; font-size: clamp(34px, 4vw, 49px); font-weight: 700; line-height: 1.35; letter-spacing: -1.2px; }
.registration-intro-copy > p:not(.registration-eyebrow) { max-width: 440px; margin: 18px 0 0; color: rgb(255 255 255 / 78%); font-size: 17px; line-height: 1.9; }
.registration-steps { display: grid; gap: 20px; margin-top: 42px; }
.registration-step { display: flex; align-items: flex-start; gap: 14px; }
.registration-step > span { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; color: #fff; background: rgb(255 255 255 / 13%); }
.registration-step > span .app-icon { font-size: 19px; }
.registration-step strong { display: block; color: #fff; font-size: 16px; font-weight: 600; }
.registration-step small { display: block; margin-top: 2px; color: rgb(255 255 255 / 68%); font-size: 13px; line-height: 1.7; }
.registration-agency { position: relative; z-index: 1; margin: 0; color: rgb(255 255 255 / 64%); font-size: 13px; }
.registration-form-side { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.registration-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px clamp(28px, 5vw, 72px); }
.registration-login-link { min-width: 128px; }
.registration-form-wrap { display: flex; align-items: center; justify-content: center; flex: 1; padding: 0 clamp(28px, 5vw, 72px) 42px; }
.registration-card { width: 100%; max-width: 760px; padding: 38px 44px 28px; box-shadow: 0 18px 55px rgb(36 63 46 / 7%); }
.registration-card .auth-heading { margin-top: 0; text-align: left; }
.registration-form-kicker { margin: 0 0 4px; color: #3f765e !important; font-size: 14px !important; font-weight: 600; }
.registration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.registration-card .form-control, .registration-card .form-select { background-color: #fff; }
.plain-password .form-control { padding-left: 12px; }
.field-help { color: var(--muted); font-size: 13px; line-height: 1.8; }
.auth-signup-link { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.auth-signup-link a { font-weight: 600; margin-left: 5px; }
.signed-in-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.topbar-actions form { margin: 0; }
.review-body { padding: 0 24px 24px; }
.review-body > p { color: var(--muted); font-size: 14px; line-height: 2; overflow-wrap: anywhere; }
.review-body .form-control, .review-body .form-select { background-color: #fff; }
.review-body .form-label { font-size: 15px; }
.approval-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.account-meta { display: block; font-size: 12px; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.review-note { max-width: 220px; }
.user-pagination { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.record-actions-group { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.record-button-danger { color: #a34b46; }
.record-button-danger:hover { color: #7e302c; }
.account-status-management { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(320px, 1.25fr); gap: 28px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.account-status-management h3 { margin: 0 0 4px; font-size: 18px; }
.account-status-management > div > p { margin: 0; color: var(--muted); font-size: 14px; }
.organization-form { padding: 4px 28px 28px; }
.organization-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.organization-detail-grid > div { padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfa; }
.organization-detail-grid dt { color: var(--muted); font-size: 13px; font-weight: 400; }
.organization-detail-grid dd { margin: 5px 0 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.assignment-form { padding-top: 20px; border-top: 1px solid var(--line); }
.assignment-controls { display: flex; align-items: stretch; gap: 12px; }
.assignment-controls .form-select { flex: 1; }
.loan-form { padding: 4px 28px 30px; }
.loan-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.form-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section-heading h3, .loan-subsection h3 { margin: 0; font-size: 18px; }
.form-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.guarantor-list { display: grid; gap: 12px; }
.guarantor-row { display: grid; grid-template-columns: 1.25fr 1fr .85fr .9fr auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfa; }
.guarantor-row .form-label { font-size: 13px; }
.guarantor-remove { min-height: 46px; padding-right: 10px; padding-left: 10px; color: #9e4742; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.form-actions form { margin: 0; }
.loan-detail-body { padding: 2px 28px 28px; }
.loan-status-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.loan-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.loan-detail-grid > div { padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfa; }
.loan-detail-grid dt { color: var(--muted); font-size: 13px; font-weight: 400; }
.loan-detail-grid dd { margin: 5px 0 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.loan-detail-grid > div:first-child { grid-column: span 2; }
.loan-subsection { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.guarantor-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.guarantor-summary > div { padding: 13px 15px; border-radius: 9px; background: #f4f8f5; }
.guarantor-summary strong, .guarantor-summary span { display: block; }
.guarantor-summary span { margin-top: 2px; color: var(--muted); font-size: 13px; }
.review-decision-form { margin-top: 24px; padding: 22px; border: 1px solid #dce8e1; border-radius: 12px; background: #f8fbf9; }
.review-timeline { display: grid; gap: 0; margin-top: 14px; }
.review-timeline article { position: relative; display: flex; gap: 14px; padding: 0 0 20px 4px; }
.review-timeline article:not(:last-child)::before { content: ''; position: absolute; top: 16px; bottom: 0; left: 9px; width: 1px; background: #ccddd3; }
.timeline-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 5px; flex-shrink: 0; border: 3px solid #d7e8df; border-radius: 50%; background: var(--green); }
.review-timeline strong, .review-timeline small { display: block; }
.review-timeline small { color: var(--muted); font-size: 12px; }
.review-timeline p { margin: 5px 0 0; }
.loan-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.loan-list-heading strong, .loan-list-heading span { display: block; }
.loan-list-heading strong { font-size: 18px; }
.loan-list-heading span { color: var(--muted); font-size: 13px; }

/* Workflow tracking and notification center. */
.notification-dropdown { position: relative; }
.notification-button { position: relative; color: #496358; background: #fff; }
.notification-button:hover, .notification-button.show { color: var(--green); background: #f2f7f4; border-color: #c8d9d0; }
.notification-count { position: absolute; top: -6px; right: -7px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #b34f49; font-size: 11px; font-weight: 700; line-height: 1; }
.notification-menu { width: min(400px, calc(100vw - 28px)); margin-top: 10px !important; padding: 0; overflow: hidden; border: 1px solid #dce5e0; border-radius: 12px; box-shadow: 0 18px 50px rgb(25 62 48 / 16%); }
.notification-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.notification-menu-heading strong { font-size: 17px; }
.notification-menu-heading a { font-size: 13px; font-weight: 600; }
.notification-menu-items form { border-bottom: 1px solid #edf0ee; }
.notification-menu-items form:last-child { border-bottom: 0; }
.notification-menu-item { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 14px 16px; border: 0; color: var(--ink); background: #fff; text-align: left; }
.notification-menu-item:hover { background: #f7faf8; }
.notification-menu-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; }
.notification-menu-icon .app-icon { font-size: 17px; }
.notification-menu-item > span:last-child { min-width: 0; }
.notification-menu-item strong, .notification-menu-item small, .notification-menu-item time { display: block; }
.notification-menu-item strong { font-size: 14px; font-weight: 600; }
.notification-menu-item small { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.notification-menu-item time { margin-top: 4px; color: #849188; font-size: 11px; }
.notification-menu-empty { margin: 0; padding: 28px 18px; color: var(--muted); font-size: 14px; text-align: center; }
.notification-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.notification-summary-card { display: flex; align-items: center; gap: 15px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.notification-summary-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; }
.notification-summary-icon .app-icon { font-size: 22px; }
.notification-summary-card strong, .notification-summary-card span { display: block; }
.notification-summary-card strong { font-size: 27px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.notification-summary-card div > span { margin-top: 2px; color: var(--muted); font-size: 14px; }
.notification-section { margin-bottom: 20px; overflow: hidden; }
.notification-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 24px 16px; }
.notification-section-heading h2 { margin: 0; font-size: 19px; font-weight: 600; }
.notification-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.notification-filter { display: flex; gap: 6px; padding: 0 24px 14px; border-bottom: 1px solid var(--line); }
.notification-filter a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 7px; color: #5d7064; font-size: 14px; }
.notification-filter a:hover { color: var(--green); background: #f1f6f3; }
.notification-filter a.active { color: #fff; background: var(--green); font-weight: 600; }
.notification-filter a span { min-width: 20px; padding: 0 5px; border-radius: 999px; background: rgb(255 255 255 / 20%); text-align: center; }
.workflow-task-list { padding: 0 24px 10px; }
.compact-workflow-task-list { padding-bottom: 8px; }
.workflow-task-item { display: flex; align-items: center; gap: 13px; min-height: 72px; padding: 14px 0; border-top: 1px solid #edf0ee; color: var(--ink); }
.workflow-task-item:first-child { border-top: 0; }
.workflow-task-item:hover .workflow-task-copy strong { color: var(--green); }
.workflow-task-marker { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; }
.workflow-task-marker .app-icon { font-size: 19px; }
.workflow-task-copy { flex: 1; min-width: 0; }
.workflow-task-copy strong, .workflow-task-copy small { display: block; }
.workflow-task-copy strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.workflow-task-copy small { margin-top: 2px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.workflow-task-due { flex: 0 0 155px; text-align: right; }
.workflow-task-due small, .workflow-task-due strong { display: block; }
.workflow-task-due small { color: var(--muted); font-size: 11px; }
.workflow-task-due strong { margin-top: 2px; font-size: 13px; font-weight: 500; }
.task-state-overdue .workflow-task-due { color: #a34b46; }
.workflow-task-item > .app-icon { color: #95a39a; font-size: 13px; }
.notification-list { padding: 0 24px 10px; }
.notification-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid #edf0ee; }
.notification-row:last-child { border-bottom: 0; }
.notification-row.is-unread { margin: 0 -24px; padding-right: 24px; padding-left: 24px; background: #f7faf8; }
.notification-row-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; }
.notification-row-icon .app-icon { font-size: 20px; }
.notification-row-copy { min-width: 0; }
.notification-row-title { display: flex; align-items: center; gap: 8px; }
.notification-row-title strong { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.unread-dot { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; color: #216448; background: #dff0e6; font-size: 10px; font-weight: 700; }
.notification-row-copy p { margin: 3px 0; color: #50645a; font-size: 14px; overflow-wrap: anywhere; }
.notification-row-copy small { color: #7c8b82; font-size: 12px; }
.notification-open-button { min-height: 38px; padding: 6px 5px 6px 10px; color: var(--green); background: transparent; border: 0; font-size: 13px; white-space: nowrap; }
.notification-open-button:hover { color: #163e2f; text-decoration: underline; }
.notification-open-button .app-icon { font-size: 13px; }
.compact-empty-state { padding-top: 34px; padding-bottom: 38px; }
.personal-task-panel { border-color: #d8e6de; }

@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); height: 100vh; height: 100dvh; background: #fff !important; z-index: 1030; }
  .app-workspace { margin-left: var(--sidebar-width); }
}
@media (max-width: 1199.98px) {
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-top { flex-wrap: wrap-reverse; }
  .main-content { padding: 28px 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .dashboard-grid { gap: 16px; }
  .chart-grid { gap: 16px; }
  .surface-heading { padding-right: 18px; padding-left: 18px; }
  .task-list { padding-right: 18px; padding-left: 18px; }
  .quick-link { margin-right: 18px; margin-left: 18px; }
  .task-copy small { font-size: 12px; }
  .task-item { gap: 9px; }
  .records-table > thead > tr > th, .records-table > tbody > tr > td { padding-right: 16px; padding-left: 16px; }
}
@media (max-width: 991.98px) {
  .guarantor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guarantor-remove { justify-self: start; min-height: 38px; }
  .registration-screen { grid-template-columns: 1fr; }
  .registration-intro { position: relative; min-height: auto; padding: 30px 32px; }
  .registration-intro-copy { max-width: none; margin: 0; padding: 42px 0 14px; }
  .registration-intro h2 { font-size: 36px; }
  .registration-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
  .registration-step { gap: 10px; }
  .registration-form-side { min-height: auto; }
  .registration-actions { padding: 22px 32px; }
  .registration-form-wrap { padding: 0 32px 38px; }
  .sidebar-brand { padding-top: 25px; }
  .sidebar-brand .btn-close { padding: 12px; }
  .sidebar-body { padding-top: 4px; }
  .topbar { min-height: 72px; }
  .stat-top { flex-wrap: nowrap; }
  .stats-grid { gap: 14px; }
}
@media (max-width: 767.98px) {
  .account-status-management { grid-template-columns: 1fr; gap: 16px; }
  .record-actions-group { flex-wrap: wrap; }
  .notification-menu { width: min(370px, calc(100vw - 32px)); }
  .notification-summary-grid { gap: 10px; }
  .notification-summary-card { padding: 15px; }
  .notification-section-heading { padding: 18px 20px 14px; }
  .notification-filter, .workflow-task-list, .notification-list { padding-right: 20px; padding-left: 20px; }
  .notification-row.is-unread { margin-right: -20px; margin-left: -20px; padding-right: 20px; padding-left: 20px; }
  .loan-field-grid, .loan-detail-grid { grid-template-columns: 1fr; }
  .loan-detail-grid > div:first-child { grid-column: auto; }
  .guarantor-summary { grid-template-columns: 1fr; }
  .organization-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .registration-intro { padding: 26px 24px; }
  .registration-intro-copy { padding: 30px 0 2px; }
  .registration-intro h2 { font-size: 32px; }
  .registration-intro h2 br { display: none; }
  .registration-intro-copy > p:not(.registration-eyebrow) { margin-top: 10px; font-size: 15px; }
  .registration-steps, .registration-agency { display: none; }
  .registration-actions { padding: 18px 24px; }
  .registration-form-wrap { padding: 0 24px 32px; }
  .registration-card { padding: 32px 30px 24px; }
  .signed-in-name { display: none; }
  .main-content { padding: 26px 20px; }
  .topbar { padding: 12px 20px; gap: 8px; }
  .topbar-title { font-size: 14px; }
  .topbar-actions .preview-badge { display: none; }
  .login-link { font-size: 14px; padding: 8px 12px; gap: 7px; }
  .page-heading { align-items: flex-start; gap: 18px; }
  .page-heading > .btn { font-size: 14px; padding: 8px 12px; margin-top: 28px; }
  h1 { font-size: 27px; }
  .page-description { font-size: 15px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 32px; }
  .chart-grid { grid-template-columns: 1fr; gap: 18px; }
  .chart-container-status { height: 290px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 18px; }
  .surface-heading { padding: 20px 20px 14px; }
  .task-list { padding: 0 20px 8px; }
  .task-item { padding: 17px 0; gap: 12px; }
  .task-copy small { font-size: 13px; }
  .quick-link { margin: 0 20px; padding: 16px 0; }
  .quick-panel { padding-bottom: 8px; }
  .app-footer { margin: 0 20px; font-size: 12px; flex-direction: column; gap: 3px; }
  .records-toolbar { padding: 20px 20px 12px; }
  .status-filter { min-width: 155px; }
  .report-grid { grid-template-columns: 1fr; gap: 16px; }
  .report-card { padding: 24px; }
  .report-icon { margin-bottom: 15px; }
  .report-card .btn { align-self: flex-start; }
  .role-item { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .role-scope { margin-left: 52px; }

  /* Keep all fields, but turn each record into an easy-to-read mobile card. */
  .records-wrap { overflow: visible; }
  .records-table, .records-table tbody { display: block; width: 100%; }
  .records-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .records-table tbody { padding: 0 20px 8px; }
  .records-table tr { display: block; padding: 16px 0; border-top: 1px solid var(--line); }
  .records-table > tbody > tr > td { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 6px 0; border: 0; text-align: right; white-space: normal; }
  .records-table td[data-label]::before { content: attr(data-label); flex-shrink: 0; color: var(--muted); font-size: 14px; font-weight: 400; }
  .records-table > tbody > tr > .record-primary { display: block; text-align: left; min-width: 0; padding: 0 0 12px; }
  .record-primary strong { font-size: 17px; }
  .record-primary small { font-size: 13px; }
  .records-table > tbody > tr > .amount-cell { flex-wrap: wrap; gap: 0 4px; }
  .records-table td.amount-cell::before { margin-right: auto; }
  .mobile-unit { display: inline; }
  .records-table > tbody > tr > .record-action { justify-content: flex-end; padding-bottom: 0; }
  .records-table .status-badge { font-size: 13px; }
  .record-button { min-height: 44px; font-size: 14px; padding: 9px 0 9px 9px; }
}
@media (max-width: 575.98px) {
  .notification-dropdown .notification-menu.show { position: fixed !important; inset: 70px 16px auto 16px !important; width: auto; max-height: calc(100dvh - 86px); overflow-y: auto; transform: none !important; }
  .notification-summary-grid { grid-template-columns: 1fr; }
  .notification-summary-card { min-height: 76px; }
  .notification-section-heading { align-items: flex-start; flex-direction: column; }
  .notification-section-heading form, .notification-section-heading .btn { width: 100%; }
  .workflow-task-item { align-items: flex-start; flex-wrap: wrap; }
  .workflow-task-copy { padding-top: 5px; }
  .workflow-task-due { flex: 1 0 calc(100% - 51px); margin-left: 51px; text-align: left; }
  .workflow-task-item > .app-icon { align-self: center; margin-left: auto; }
  .notification-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .notification-row form { grid-column: 2; }
  .notification-open-button { padding-left: 0; }
  .notification-menu-item { padding: 13px 14px; }
  .loan-form, .loan-detail-body { padding: 2px 20px 22px; }
  .guarantor-row { grid-template-columns: 1fr; }
  .form-section-heading, .loan-list-heading { align-items: flex-start; flex-direction: column; }
  .form-section-heading .btn, .loan-list-heading .btn { width: 100%; }
  .review-decision-form { padding: 17px; }
  .organization-form { padding: 2px 20px 22px; }
  .organization-detail-grid { grid-template-columns: 1fr; }
  .assignment-controls { align-items: stretch; flex-direction: column; }
  .login-modal-dialog { margin: 12px; }
  .login-modal-header { padding: 18px 20px; }
  .login-modal-brand small { display: none; }
  .login-modal-body { padding: 24px 22px 20px; }
  .login-modal-heading h2 { font-size: 26px; }
  .registration-intro { padding: 22px 20px; }
  .registration-brand small { display: none; }
  .registration-brand strong { font-size: 23px; }
  .registration-intro-copy { padding-top: 24px; }
  .registration-intro h2 { font-size: 29px; }
  .registration-actions { padding: 14px 16px; }
  .registration-login-link { min-width: 0; padding-right: 12px; padding-left: 12px; }
  .registration-form-wrap { padding: 0 16px 24px; }
  .registration-card { padding: 28px 22px 20px; }
  .registration-grid { grid-template-columns: 1fr; }
  .review-body { padding-right: 16px; padding-left: 16px; }
  .main-content { padding: 24px 16px; }
  .topbar { padding: 12px 16px; }
  .topbar-leading { gap: 9px; }
  .topbar-title { max-width: 180px; font-size: 13px; }
  .topbar-agency-icon { width: 30px; height: 30px; border-radius: 8px; }
  .topbar-agency-icon .app-icon { font-size: 16px; }
  .preview-badge { font-size: 12px; padding: 4px 7px; gap: 5px; }
  .page-heading { flex-direction: column; gap: 16px; margin-bottom: 18px; }
  .page-heading > .btn { margin: 0; min-height: 44px; font-size: 15px; }
  .eyebrow { font-size: 13px; }
  h1 { font-size: 28px; }
  .section-label { font-size: 14px; align-items: baseline; }
  .snapshot-date { font-size: 11px; }
  .stats-grid { gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 14px; border-radius: 10px; }
  .stat-top { align-items: flex-start; gap: 5px; }
  .stat-top h2 { font-size: 13px; }
  .stat-icon { width: 25px; height: 25px; border-radius: 6px; }
  .stat-icon .app-icon { width: 14px; height: 14px; font-size: 14px; }
  .stat-value { font-size: 29px; margin: 12px 0 6px; }
  .stat-value span { font-size: 12px; margin-left: 4px; }
  .stat-note { font-size: 11px; }
  .role-dashboard-heading { align-items: flex-start; padding: 20px; }
  .role-dashboard-heading h2 { font-size: 21px; }
  .role-dashboard-heading p { font-size: 14px; }
  .role-dashboard-mark { width: 44px; height: 44px; border-radius: 12px; }
  .role-dashboard-mark .app-icon { font-size: 22px; }
  .chart-grid { gap: 16px; margin-bottom: 20px; }
  .chart-container { height: 270px; margin: 0 10px 16px; }
  .chart-heading-icon { width: 36px; height: 36px; border-radius: 10px; }
  .chart-heading-icon .app-icon { font-size: 19px; }
  .surface-heading { padding: 19px 16px 14px; }
  .surface-heading h2 { font-size: 18px; }
  .surface-heading p { font-size: 13px; }
  .task-list { padding-right: 16px; padding-left: 16px; }
  .task-item { gap: 10px; }
  .task-copy strong, .quick-link strong { font-size: 15px; }
  .task-copy small { font-size: 12px; }
  .task-icon { width: 32px; height: 34px; border-radius: 8px; }
  .task-count { font-size: 22px; gap: 4px; }
  .task-count small { font-size: 12px; }
  .task-item > .app-icon { width: 12px; font-size: 12px; }
  .quick-link { margin-right: 16px; margin-left: 16px; }
  .records-table tbody { padding-right: 16px; padding-left: 16px; }
  .records-toolbar { flex-direction: column; align-items: stretch; padding: 18px 16px 10px; gap: 10px; }
  .search-field { width: 100%; max-width: none; }
  .status-filter { margin: 0; }
  .results-summary { padding-right: 16px; padding-left: 16px; }
  .app-footer { margin-right: 16px; margin-left: 16px; }
  .role-list { padding-right: 16px; padding-left: 16px; }
  .auth-topbar { padding: 12px 16px; gap: 10px; }
  .back-link { font-size: 14px; gap: 7px; }
  .auth-main { padding: 16px 16px 24px; }
  .auth-card { padding: 28px 24px 17px; border-radius: 14px; }
  .auth-heading { margin-top: 24px; }
  .auth-system-name { font-size: 13px; }
  .auth-footer { font-size: 12px; padding-bottom: 20px; }
}
@media (max-width: 359.98px) {
  .topbar-title { max-width: 130px; }
  .preview-badge .status-dot { display: none; }
  .snapshot-date { font-size: 10px; }
  .stat-top { flex-wrap: wrap-reverse; }
  .task-count { flex-direction: column; gap: 0; align-items: center; line-height: 1.4; }
  .auth-card { padding-right: 20px; padding-left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
