:root {
  color-scheme: light;
  --tawla-primary: #374f99;
  --tawla-primary-dark: #273b78;
  --tawla-primary-soft: #e8edfb;
  --tawla-accent: #369ff4;
  --tawla-gold: #e6b43c;
  --tawla-ink: #182238;
  --tawla-muted: #67748a;
  --tawla-canvas: #f3f5fa;
  --tawla-border: #dfe4ee;
  --tawla-sidebar-width: 280px;
  --bs-primary: #374f99;
  --bs-primary-rgb: 55, 79, 153;
  --bs-link-color: #2f4b9b;
  --bs-link-hover-color: #1f3577;
  --bs-body-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { color: var(--tawla-ink); background: var(--tawla-canvas); }
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #ffc857 !important; outline-offset: 3px; box-shadow: none !important; }
.skip-link { position: fixed; z-index: 2000; top: .75rem; left: .75rem; padding: .65rem 1rem; color: #fff; background: #111827; border-radius: .5rem; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--tawla-sidebar-width) minmax(0, 1fr); }
.app-sidebar { --bs-offcanvas-width: var(--tawla-sidebar-width); position: fixed; inset: 0 auto 0 0; width: var(--tawla-sidebar-width); height: 100vh; min-height: 0; overflow: hidden; color: #fff; background: linear-gradient(180deg, #374f99, #263d80); display: flex; flex-direction: column; border: 0; }
.sidebar-brand { min-height: 82px; display: flex; align-items: center; gap: .5rem; padding: .85rem 1rem; border-bottom: 1px solid #ffffff2e; }
.sidebar-brand > a { flex: 1; display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.sidebar-brand img { width: 48px; height: 48px; object-fit: contain; padding: .2rem; background: #fff; border-radius: 50%; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 1.2rem; letter-spacing: .05em; }
.sidebar-brand small { color: #dce4ff; font-size: .72rem; }
.sidebar-nav { padding: 1rem .75rem; overflow-y: auto; flex: 1; }
.sidebar-link { width: 100%; display: flex; align-items: center; gap: .8rem; padding: .72rem .85rem; margin: .15rem 0; color: #edf1ff; background: transparent; border: 0; border-radius: .55rem; text-align: left; text-decoration: none; font-weight: 600; }
.sidebar-link:hover, .sidebar-link.active { color: #fff; background: #ffffff18; }
.sidebar-link.active { box-shadow: inset 3px 0 0 var(--tawla-accent); }
.sidebar-link .bi:first-child { width: 1.25rem; font-size: 1.15rem; text-align: center; }
.nav-chevron { margin-left: auto; font-size: .75rem; transition: transform .2s ease; }
.sidebar-link[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.sidebar-subnav { margin: .2rem 0 .5rem 2.6rem; padding-left: .75rem; border-left: 1px solid #ffffff38; }
.sidebar-sublink { display: block; color: #dce4ff; padding: .52rem .6rem; margin: .12rem 0; border-radius: .4rem; text-decoration: none; font-size: .9rem; }
.sidebar-sublink:hover, .sidebar-sublink.active { color: #fff; background: #ffffff17; }
.sidebar-sublink.active { font-weight: 700; }
.nav-section { margin: 1.2rem .75rem .4rem; color: #bac8f7; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.sidebar-account { padding: .7rem .75rem 1rem; border-top: 1px solid #ffffff2e; }
.sidebar-account form { margin: 0; }
.app-workspace { grid-column: 2; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 1020; min-height: 82px; display: flex; align-items: center; gap: 1rem; padding: .75rem clamp(1rem, 2.2vw, 2rem); background: #fffffff2; border-bottom: 1px solid var(--tawla-border); backdrop-filter: blur(12px); }
.topbar-title { color: var(--tawla-primary); font-size: clamp(1.05rem, 2vw, 1.45rem); font-weight: 800; text-decoration: none; }
.user-summary { margin-left: auto; display: flex; align-items: center; gap: .7rem; min-width: 0; }
.user-summary strong, .user-summary small { display: block; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary small { color: var(--tawla-muted); font-size: .78rem; }
.user-avatar { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--tawla-primary); border-radius: 50%; font-weight: 800; }
.page-main { width: min(100%, 1700px); flex: 1; margin-inline: auto; padding: 1.25rem clamp(1rem, 2vw, 2rem) 2.5rem; }
.breadcrumb { margin-bottom: .85rem; font-size: .82rem; }
.page-main > h1:first-of-type { margin: 0; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; }
.page-main > h1:first-of-type + p { color: var(--tawla-muted); margin-top: .35rem; }
.app-footer { padding: 1rem 1.5rem; color: #dfe6ff; background: var(--tawla-primary-dark); text-align: center; font-size: .82rem; }
.panel { margin: 1.25rem 0; padding: clamp(1rem, 2vw, 1.4rem); background: #fff; border: 1px solid #e5e9f2; border-radius: .85rem; box-shadow: 0 6px 22px #22334a0d; }
.panel h2 { margin-bottom: 1rem; font-size: 1.12rem; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; align-items: end; }
.form-grid label { margin: 0; }
label { display: block; margin-bottom: .4rem; font-weight: 650; }
label small { display: block; color: var(--tawla-muted); margin-top: .3rem; font-weight: 400; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea { display: block; width: 100%; padding: .625rem .75rem; color: var(--tawla-ink); background: #fff; border: 1px solid #b9c2d2; border-radius: .45rem; }
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--tawla-accent); box-shadow: 0 0 0 .2rem #369ff426; outline: 0; }
button, .button { min-height: 42px; }
button:not(.sidebar-link):not(.btn-close), .button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .58rem .9rem; color: #fff; background: var(--tawla-primary); border: 1px solid var(--tawla-primary); border-radius: .45rem; font-weight: 650; text-decoration: none; cursor: pointer; }
button:not(.sidebar-link):not(.btn-close):hover, .button:hover { color: #fff; background: var(--tawla-primary-dark); border-color: var(--tawla-primary-dark); }
button[aria-busy="true"], form[aria-busy="true"] button[type="submit"] { cursor: wait; opacity: .72; }
.button.secondary, button.secondary { color: var(--tawla-primary); background: #fff; border-color: #aab5d0; }
.button.secondary:hover { color: var(--tawla-primary-dark); background: var(--tawla-primary-soft); }
.danger, .btn-danger { background: #b42318 !important; border-color: #b42318 !important; }
.danger-zone { border-color: #fecaca; }
.inline { display: inline-flex; margin: 0; }
.action-stack { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.assignment-form { display: grid; gap: 1rem; min-width: 0; }
.client-assignment-form { display: grid; gap: 1rem; min-width: 0; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--tawla-border); border-radius: .65rem; }
.table-wrap.menu-open { overflow: visible; }
table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
th, td { padding: .78rem .75rem; vertical-align: top; border-bottom: 1px solid var(--tawla-border); }
th { color: #344054; background: #f8f9fc; font-size: .78rem; text-transform: uppercase; letter-spacing: .035em; white-space: nowrap; }
tbody tr:nth-child(even) { background: #fafbfe; }
tbody tr:hover { background: #f2f5fc; }
tbody tr:last-child td { border-bottom: 0; }
.total-row, .total-row:hover { color: #fff; background: var(--tawla-primary); font-weight: 700; }
.status-badge { display: inline-flex; align-items: center; padding: .25rem .52rem; border-radius: 999px; font-size: .75rem; font-weight: 750; }
.status-badge.neutral { color: #344054; background: #e9edf3; }
.status-badge.unattended { color: #7a4b00; background: #fff1cc; }
.status-badge.attended, .status-badge.work-recorded { color: #12633a; background: #d9f8e7; }
.status-badge.needs-work { color: #8f1d18; background: #fee4e2; }
tr.assignment-needs-work > td:first-child { border-left: 4px solid #b42318; }
.alert { border: 0; border-left: 4px solid currentColor; }
.alert.error { color: #842029; background: #f8d7da; }
.alert.success { color: #0f5132; background: #d1e7dd; }
.dashboard-filter-summary { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; align-items: center; margin: 1rem 0 0; }
.dashboard-filter-summary span { white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; margin: 1.25rem 0; }
.dashboard-metric-scroll { width: 100%; overflow-x: auto; }
.dashboard-metric-grid { grid-template-columns: repeat(4, minmax(190px, 1fr)); min-width: 790px; }
.metric-card { position: relative; min-height: 125px; display: grid; align-content: center; gap: .35rem; padding: 1.2rem; overflow: hidden; background: #fff; border: 1px solid #e4e8f2; border-radius: .85rem; box-shadow: 0 5px 18px #22334a0c; }
.metric-card::after { content: ""; position: absolute; width: 78px; height: 78px; right: -20px; bottom: -24px; background: var(--tawla-primary-soft); border-radius: 50%; }
.metric-card span { color: var(--tawla-primary); font-weight: 700; }
.metric-card strong { font-size: 1.8rem; line-height: 1; }
.metric-card small { color: var(--tawla-muted); }
.metric-link { color: inherit; text-decoration: none; }
.metric-link .metric-card { height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.metric-link:hover .metric-card { transform: translateY(-2px); box-shadow: 0 10px 28px #22334a18; }
.metric-card.tone-1, .metric-card.tone-2, .metric-card.tone-3, .metric-card.tone-4 { color: #fff; border: 0; }
.metric-card.tone-1 { background: #9c6413; } .metric-card.tone-2 { background: #374f99; } .metric-card.tone-3 { background: #a52b36; } .metric-card.tone-4 { background: #18724c; }
.metric-card.tone-1 span,.metric-card.tone-2 span,.metric-card.tone-3 span,.metric-card.tone-4 span,.metric-card.tone-1 small,.metric-card.tone-2 small,.metric-card.tone-3 small,.metric-card.tone-4 small { color: #fff; }
.metric-card.tone-1::after,.metric-card.tone-2::after,.metric-card.tone-3::after,.metric-card.tone-4::after { background: #ffffff20; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.chart-container { position: relative; min-height: 320px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(130px, 2fr) auto; gap: .7rem; align-items: center; margin: .8rem 0; font-size: .88rem; }
.bar-track { height: .8rem; overflow: hidden; background: #e5e9f2; border-radius: 999px; }
.bar-track i { display: block; height: 100%; background: var(--tawla-primary); border-radius: inherit; }
.bar-columns { height: 270px; display: flex; gap: .7rem; align-items: end; overflow-x: auto; padding-top: 1rem; }
.bar-column { height: 245px; min-width: 90px; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: end; gap: .3rem; text-align: center; font-size: .75rem; }
.bar-column i { display: block; width: 54px; align-self: end; background: var(--tawla-primary); }
.bar-column span { min-height: 38px; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.tabs a { padding: .58rem .85rem; color: var(--tawla-primary); background: #fff; border: 1px solid #bac3d7; border-radius: .45rem; text-decoration: none; font-weight: 650; }
.tabs a:hover, .tabs a[aria-current="page"] { color: #fff; background: var(--tawla-primary); }
.tabs.report-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.report-module-grid a { min-height: 52px; display: flex; align-items: center; justify-content: center; padding: .7rem 1rem; text-align: center; }
.reports-page-heading { align-items: end; }
.compact-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.details { display: grid; grid-template-columns: minmax(150px, .35fr) 1fr; gap: .7rem 1rem; }
.details dt { font-weight: 750; color: #344054; }
.details dd { margin: 0; }
.reference-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.pagination { display: flex; flex-wrap: wrap; gap: .3rem; padding-top: 1rem; }
.pagination a { min-width: 38px; padding: .42rem .58rem; color: var(--tawla-primary); border: 1px solid #bac3d7; border-radius: .4rem; text-align: center; text-decoration: none; }
.pagination a[aria-current="page"] { color: #fff; background: var(--tawla-primary); }
pre { max-width: 480px; overflow: auto; padding: .75rem; background: #f5f7fa; border-radius: .4rem; font-size: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.action-menu .dropdown-toggle { width: 42px; padding-inline: .55rem; }
.action-menu .dropdown-toggle::after { display: none; }
.dropdown-menu { border: 1px solid var(--tawla-border); box-shadow: 0 12px 30px #18223822; }
.dropdown-item { min-height: 40px; display: flex; align-items: center; gap: .55rem; }
.dropdown-menu form { width: 100%; margin: 0; }
.dropdown-menu button.dropdown-item, .dropdown-menu .dropdown-item { justify-content: flex-start; width: 100%; min-height: 40px; padding: .5rem 1rem; color: var(--tawla-ink); background: transparent; border: 0; border-radius: 0; font-weight: 500; text-decoration: none; }
.dropdown-menu button.dropdown-item:hover, .dropdown-menu .dropdown-item:hover { color: var(--tawla-primary-dark); background: var(--tawla-primary-soft); }
.auth-page { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; padding: 2rem 1rem; background: linear-gradient(125deg, #182b69, #374f99 55%, #536db8); }
.auth-shell { width: min(1180px, 100%); min-height: min(720px, calc(100vh - 4rem)); min-height: min(720px, calc(100dvh - 4rem)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); margin: auto; overflow: hidden; background: #fff; border-radius: 1.1rem; box-shadow: 0 28px 80px #1019385c; }
.auth-story { position: relative; min-height: 640px; color: #fff; background: linear-gradient(145deg, #0c1638, #263d80); overflow: hidden; }
.auth-story::before, .auth-story::after { content: ""; position: absolute; border: 1px solid #ffffff18; transform: rotate(35deg); }
.auth-story::before { inset: -20% 30% 15% -35%; box-shadow: 0 0 0 45px #ffffff05, 0 0 0 90px #ffffff04; }
.auth-story::after { width: 320px; height: 320px; right: -130px; top: -100px; border-radius: 50%; background: #369ff41b; }
.auth-story-overlay { position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, #e6b43c30, transparent 38%); }
.auth-story-content { position: absolute; z-index: 1; inset: auto clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem); }
.auth-story-content h1 { max-width: 470px; margin: .3rem 0 1rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; font-weight: 800; }
.auth-story-content p { color: #dce4ff; }
.quote-mark { display: block; color: var(--tawla-gold); font: 700 5rem/1 Georgia, serif; }
.story-rule { display: block; width: 84px; height: 5px; margin-top: 3rem; background: var(--tawla-gold); border-radius: 3px; }
.auth-form-panel { display: flex; flex-direction: column; min-width: 0; padding: clamp(2rem, 5vw, 4.5rem); }
.auth-form-wrap { width: min(100%, 520px); min-width: 0; max-width: 100%; margin: auto; }
.auth-form-panel footer { color: var(--tawla-muted); text-align: center; font-size: .78rem; }
.auth-logo { display: block; object-fit: contain; margin: 0 auto 1rem; }
.eyebrow { color: var(--tawla-primary); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-form-wrap h2 { margin-bottom: .4rem; font-size: clamp(2rem, 4vw, 2.65rem); font-weight: 850; }
.login-form { display: grid; gap: 1.25rem; margin-top: 2rem; }
.auth-help { margin-top: 1.3rem; color: var(--tawla-muted); font-size: .82rem; text-align: center; }
.password-toggle { min-width: 52px; background: #fff !important; border-color: #dee2e6 !important; color: #495057 !important; }
.password-change-panel { max-width: 620px; }
.password-change-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.password-change-form label, .password-requirements { margin: 0; }
.password-change-form button { width: 100%; }
.input-group > input.form-control:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) { flex: 1 1 0; width: 1%; min-width: 0; }
.modal-header { background: #f8f9fc; }
.modal-title { color: var(--tawla-primary-dark); font-weight: 750; }
.client-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.client-page-heading h1 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; }
.client-page-heading p { margin: .3rem 0 0; color: var(--tawla-muted); }
.client-page-actions { display: flex; align-items: center; gap: .75rem; flex: 0 0 auto; }
.client-page-actions .modal-form-trigger { flex: 0 0 auto; min-width: 122px; }
.client-summary-panel { margin: 0 0 1.25rem; padding: 0; overflow: hidden; }
.client-summary-panel > h2 { margin: 0; padding: .85rem 1.1rem; color: #fff; background: var(--tawla-primary); font-size: 1.25rem; text-align: center; }
.client-summary-table-wrap { padding: 1rem 1.1rem 1.1rem; }
.client-summary-table { border: 1px solid var(--tawla-border); }
.client-summary-table th, .client-summary-table td { width: 50%; padding: .7rem .8rem; border-right: 1px solid var(--tawla-border); background: #fff; font-size: .92rem; text-align: left; text-transform: none; letter-spacing: 0; }
.client-summary-table td { border-right: 0; font-weight: 700; }
.client-summary-table tr:last-child th, .client-summary-table tr:last-child td { border-bottom: 0; }
.client-register { margin-top: 0; border-top: 4px solid var(--tawla-primary); }
.client-register-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.client-register-header > h2 { margin: 0; }
.client-register-header .modal-form-trigger { flex: 0 0 auto; }
.client-register-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.client-page-size-form label, .client-search-form label { display: flex; align-items: center; gap: .5rem; margin: 0; white-space: nowrap; font-weight: 600; }
.client-page-size-form select { width: 78px; }
.client-search-form { display: flex; align-items: end; gap: .5rem; }
.client-search-form input { width: min(260px, 34vw); }
.client-search-form button { min-height: 38px; }
.client-date-filter { margin: 0 0 1rem; padding: .6rem .75rem; background: #f8f9fc; border: 1px solid var(--tawla-border); border-radius: .5rem; }
.client-date-filter summary { color: var(--tawla-primary); cursor: pointer; font-weight: 700; }
.client-date-filter form { margin-top: .8rem; }
.client-table { width: 100% !important; min-width: 0; table-layout: fixed; font-size: .76rem; }
.client-table th, .client-table td { padding: .62rem .42rem; vertical-align: middle; overflow-wrap: anywhere; }
.client-table th { text-align: center; }
.client-table td { white-space: normal; }
.client-table th:nth-child(1) { width: 9%; }
.client-table th:nth-child(2) { width: 8%; }
.client-table th:nth-child(3) { width: 15%; }
.client-table th:nth-child(4) { width: 10%; }
.client-table th:nth-child(5) { width: 4%; }
.client-table th:nth-child(6) { width: 6%; }
.client-table th:nth-child(7) { width: 7%; }
.client-table th:nth-child(8) { width: 8%; }
.client-table th:nth-child(9) { width: 7%; }
.client-table th:nth-child(10) { width: 8%; }
.client-table th:nth-child(11) { width: 7%; }
.client-table th:nth-child(12) { width: 7%; }
.client-table th:nth-child(13) { width: 4%; }
.client-table th:nth-child(12), .client-table td:nth-child(12) { padding-right: 1rem; }
.client-table th:nth-child(13), .client-table td:nth-child(13) { padding-left: .8rem; }
.client-table .client-name-cell { text-align: center; font-weight: 650; text-transform: uppercase; }
.client-table .status-badge { white-space: nowrap; }
.client-table .action-menu { display: flex; justify-content: center; }
.client-table-wrap .dt-layout-row { align-items: center; gap: .75rem; margin: .75rem 0; }
.client-table-wrap .dt-search { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.client-table-wrap .dt-search input { width: min(220px, 30vw); min-height: 38px; margin: 0; }
.client-table-wrap .dt-length { display: flex; align-items: center; gap: .4rem; }
.client-table-wrap .dt-length select { width: 76px; min-height: 38px; margin: 0 .25rem; }
.client-table-wrap.menu-open .dt-scroll-body { overflow: visible !important; }
.client-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.client-table-footer p { margin: 0; }
.client-table-footer .pagination { padding-top: 0; }
.client-form-intro { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--tawla-border); }
.client-form-intro h3 { margin: 0; color: #147abb; font-size: 1.35rem; font-weight: 750; }
.client-form-intro p { margin: .3rem 0 0; color: var(--tawla-muted); }
.client-form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem 1.15rem; align-items: start; }
.client-form-grid > label { grid-column: span 2; margin: 0; }
.client-form-grid > label.field-half { grid-column: span 3; }
.client-form-actions { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: .3rem; }
.client-form-actions button { width: min(220px, 100%); }
.client-form-grid input[readonly], .client-form-grid input:disabled, .form-grid input:disabled { color: #536078; background: #eef1f6; cursor: not-allowed; }
.case-page-heading { margin-bottom: 1rem; }
.case-form-grid textarea { min-height: 5.25rem; }
.case-form-grid > label { min-width: 0; }
.case-list-panel { border-top: 4px solid var(--tawla-primary); }
.case-table td { vertical-align: middle; }
.case-table td:not(:nth-child(2)):not(:nth-child(3)) { white-space: nowrap; }
.case-journey-menu { min-width: 270px; max-height: min(520px, 72vh); overflow-y: auto; }
.case-journey-menu .dropdown-divider { margin: .35rem 0; }
.case-edit-panel { scroll-margin-top: 100px; border-top: 4px solid var(--tawla-primary); }
.toll-free-list-panel { border-top: 4px solid var(--tawla-primary); }
.toll-free-table { width: 100% !important; table-layout: fixed; }
.toll-free-table th, .toll-free-table td { vertical-align: middle; text-align: center; overflow-wrap: anywhere; }
.toll-free-table th:nth-child(1) { width: 14%; }
.toll-free-table th:nth-child(2) { width: 20%; }
.toll-free-table th:nth-child(3) { width: 9%; }
.toll-free-table th:nth-child(4) { width: 13%; }
.toll-free-table th:nth-child(5) { width: 22%; }
.toll-free-table th:nth-child(6) { width: 14%; }
.toll-free-table th:nth-child(7) { width: 8%; }
.toll-free-table .action-menu { display: flex; justify-content: center; }
.toll-free-form-grid textarea { min-height: 4.3rem; }
.legal-service-list-panel { border-top: 4px solid var(--tawla-primary); }
.legal-service-table { width: 100% !important; }
.legal-service-table th, .legal-service-table td { vertical-align: middle; }
.legal-service-table .action-menu { display: flex; justify-content: center; }
.legal-service-form-grid textarea { min-height: 4.3rem; }
.legal-service-edit-panel { scroll-margin-top: 100px; border-top: 4px solid var(--tawla-primary); }
.legal-aid-hub-heading { margin-bottom: 1.35rem; }
.legal-aid-hub-heading p { margin-bottom: 0; color: var(--tawla-muted); }
.legal-aid-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.legal-aid-module-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .45rem 1rem; min-height: 112px; padding: 1.15rem 1.25rem; color: var(--tawla-primary); text-decoration: none; background: #fff; border: 1px solid var(--tawla-border); border-radius: .85rem; box-shadow: 0 8px 22px rgb(30 50 100 / 6%); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.legal-aid-module-card:hover, .legal-aid-module-card:focus-visible { color: var(--tawla-primary-dark); border-color: var(--tawla-primary); box-shadow: 0 12px 28px rgb(30 50 100 / 12%); transform: translateY(-2px); }
.legal-aid-module-card span { font-weight: 700; }
.legal-aid-module-card strong { grid-row: span 2; font-size: 1.4rem; color: var(--tawla-ink); }
.legal-aid-module-card small { color: var(--tawla-muted); }
.legal-aid-report-table { min-width: 1500px; }
.legal-aid-report-table th, .legal-aid-report-table td { overflow-wrap: anywhere; }
.legal-aid-report-table th:last-child, .legal-aid-report-table td:last-child { width: 82px; text-align: center; }
.legal-aid-report-table .action-menu { display: flex; justify-content: center; }
.daily-office-report-table { min-width: 900px; }
.daily-office-report-table th, .daily-office-report-table td { text-align: center; }
.daily-office-report-table th:first-child, .daily-office-report-table td:first-child { text-align: left; }
.advisor-access-table { min-width: 1300px; }
.advisor-access-table th, .advisor-access-table td { vertical-align: middle; white-space: nowrap; }
.personal-audit-table { min-width: 1100px; }
.program-dashboard-heading { margin-bottom: .75rem; }
.program-activity-list-panel { border-top: 4px solid var(--tawla-primary); }
.program-activity-table { width: 100% !important; table-layout: fixed; }
.program-activity-table th, .program-activity-table td { vertical-align: middle; overflow-wrap: anywhere; }
.program-activity-table th:nth-child(1) { width: 12%; }
.program-activity-table th:nth-child(2) { width: 24%; }
.program-activity-table th:nth-child(3) { width: 24%; }
.program-activity-table th:nth-child(4) { width: 18%; }
.program-activity-table th:nth-child(5) { width: 13%; }
.program-activity-table th:nth-child(6) { width: 9%; }
.program-activity-table .action-menu { display: flex; justify-content: center; }
.program-activity-form-grid textarea { min-height: 4.3rem; }
.tawla-program-form { display: grid; gap: 1rem; max-width: 1180px; margin: 0 auto; }
.program-form-section { border: 1px solid var(--border); border-radius: 14px; background: #f8faff; padding: 1.15rem; }
.program-form-section-heading { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.program-form-section-heading > span { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; flex: 0 0 auto; }
.program-form-section-heading h3 { margin: 0; color: var(--primary-dark); font-size: 1.05rem; }
.program-form-section-heading p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.module-field-heading { border-bottom: 1px solid var(--border); padding-top: .35rem; }
.module-field-heading h4 { margin: 0 0 .4rem; color: var(--primary-dark); font-size: 1rem; }
.program-form-selection-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.program-form-selection-grid fieldset { min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 1rem; }
.program-check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.program-check-grid label { display: flex; gap: .55rem; align-items: flex-start; padding: .55rem; border-radius: 8px; background: #f5f7fc; }
.program-form-full-label { display: grid; gap: .4rem; font-weight: 700; }
.program-form-full-label textarea { min-height: 7rem; }
.program-form-submit { position: sticky; bottom: 0; z-index: 2; background: #fff; border-top: 1px solid var(--border); padding: 1rem; }
@media (max-width: 760px) { .program-form-selection-grid,.program-check-grid { grid-template-columns: 1fr; } }
.program-activity-edit-panel { scroll-margin-top: 100px; border-top: 4px solid var(--tawla-primary); }
.membership-list-panel, .membership-edit-panel { border-top: 4px solid var(--tawla-primary); }
.membership-table { width: 100% !important; min-width: 1900px; }
.membership-table th, .membership-table td { vertical-align: middle; white-space: nowrap; }
.membership-table .action-menu { display: flex; justify-content: center; }
.membership-finance-table { width: 100% !important; min-width: 1500px; }
.membership-finance-table th, .membership-finance-table td { vertical-align: middle; white-space: nowrap; }
.membership-edit-panel { scroll-margin-top: 100px; }
.table-help { margin: -.25rem 0 1rem; color: var(--tawla-muted); font-size: .88rem; }
.subscription-unrecorded { color: var(--tawla-muted); }
.modal-subtitle { color: var(--tawla-muted); font-size: .9rem; }
.membership-finance-body { display: grid; gap: 1.5rem; }
.finance-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.finance-modal-grid > section, .finance-history { padding: 1.2rem; border: 1px solid var(--tawla-border); border-radius: .75rem; background: #fff; }
.finance-modal-grid h3, .finance-history h3 { margin: 0 0 .45rem; color: var(--tawla-primary-dark); font-size: 1.05rem; }
.finance-modal-grid p { color: var(--tawla-muted); font-size: .84rem; }
.status-badge.status-active { color: #12633a; background: #d9f8e7; }
.status-badge.status-pending { color: #7a4b00; background: #fff1cc; }
.dt-layout-start:has(.dt-buttons) { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.dt-buttons button.dt-button { min-height: 38px; padding: .45rem .8rem; color: #344054 !important; background: #fff !important; border: 1px solid #98a2b3 !important; border-radius: .4rem; }
.dt-buttons button.dt-button:hover { color: var(--tawla-primary-dark) !important; background: var(--tawla-primary-soft) !important; border-color: var(--tawla-primary) !important; }
.client-modal .modal-body { padding: clamp(1.25rem, 3vw, 2.5rem); }
.client-modal .modal-content { border: 0; box-shadow: 0 20px 55px #17223d33; }
@media (max-width: 991.98px) {
  .app-shell { display: block; }
  .app-sidebar { position: fixed; }
  .app-workspace { grid-column: auto; }
  .app-topbar { min-height: 68px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-story { min-height: 250px; }
  .auth-story-content { inset: auto 2rem 2rem; }
  .auth-story-content h1 { font-size: 1.8rem; }
  .quote-mark { font-size: 3.2rem; }
  .story-rule { margin-top: 1.4rem; }
  .client-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-form-grid > label, .client-form-grid > label.field-half { grid-column: span 1; }
  .client-table { min-width: 1120px; table-layout: fixed; }
  .legal-aid-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs.report-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .finance-modal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .user-avatar { display: none; }
  .user-summary strong { max-width: 130px; }
  .user-summary small { max-width: 150px; }
  .topbar-title { font-size: .95rem; }
  .page-main { padding-inline: .75rem; }
  .panel { border-radius: .65rem; }
  .dashboard-filter-summary { align-items: flex-start; flex-direction: column; }
  .dashboard-filter-summary span { white-space: normal; }
  .details { grid-template-columns: 1fr; }
  .details dd { margin-bottom: .6rem; }
  .chart-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; }
  .auth-page { padding: 0; background: #fff; }
  .auth-shell { width: 100%; min-height: 100vh; min-height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
  .auth-story { min-height: 210px; }
  .auth-story-content { width: calc(100vw - 4rem); min-width: 0; overflow-wrap: anywhere; }
  .auth-form-panel { width: 100vw; max-width: 100vw; min-width: 0; padding: 1.6rem 1.2rem; overflow: hidden; overflow-wrap: anywhere; }
  .auth-form-wrap { width: calc(100vw - 2.4rem); max-width: calc(100vw - 2.4rem); margin-inline: 0; }
  .login-form, .login-form > div, .login-form .input-group { min-width: 0; max-width: 100%; }
  .client-page-heading, .client-register-toolbar, .client-table-footer, .client-register-header { align-items: stretch; flex-direction: column; }
  .client-page-actions { width: 100%; }
  .client-page-actions .modal-form-trigger { flex: 1 1 0; min-width: 0; }
  .client-search-form, .client-search-form label { width: 100%; }
  .client-search-form label { align-items: stretch; flex-direction: column; }
  .client-search-form input { width: 100%; }
  .client-form-grid { grid-template-columns: 1fr; }
  .client-form-grid > label, .client-form-grid > label.field-half { grid-column: 1; }
  .legal-aid-module-grid { grid-template-columns: 1fr; }
  .tabs.report-module-grid { grid-template-columns: 1fr; }
}
@media print {
  .app-sidebar, .app-topbar, .app-footer, .breadcrumb, form, .action-stack, .action-menu { display: none !important; }
  .app-shell { display: block; }
  .page-main { width: 100%; padding: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
