:root {
    --app-bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #eef4f3;
    --sidebar-bg: #073b3a;
    --sidebar-panel: #0a4644;
    --sidebar-text: #d7e7e5;
    --sidebar-muted: #94b8b4;
    --sidebar-active: #ffffff;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --accent: #0f9f6e;
    --accent-soft: #e8f7f1;
    --warning: #d97706;
    --danger: #dc2626;
    --text: #172033;
    --muted: #667085;
    --border: #dce4ee;
    --border-soft: #edf2f7;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.1);
    --radius: 8px;
    --sidebar-width: 286px;
    --topbar-height: 72px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(180deg, #ffffff 0, var(--app-bg) 230px),
        var(--app-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.94rem;
}

a {
    color: var(--brand);
}

a:hover {
    color: var(--brand-dark);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    color: var(--sidebar-text);
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 32px rgba(7, 59, 58, 0.18);
}

.sidebar-brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand {
    flex: 0 0 auto;
    padding: 20px 18px 18px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.brand-title,
.login-brand h1 {
    margin: 0;
    line-height: 1.1;
    font-weight: 800;
}

.brand-title {
    font-size: 1rem;
}

.brand-subtitle,
.login-brand p {
    margin: 3px 0 0;
    color: var(--sidebar-muted);
    font-size: 0.78rem;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 12px 18px;
    display: grid;
    align-content: start;
    gap: 8px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.sidebar-group {
    display: grid;
    gap: 3px;
}

.sidebar-group.open {
    padding-bottom: 4px;
}

.sidebar-group-title,
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius);
    text-decoration: none;
}

.sidebar-group-title {
    width: 100%;
    min-height: 36px;
    padding: 9px 10px;
    border: 0;
    color: var(--sidebar-muted);
    background: transparent;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}

.sidebar-group-title:hover {
    color: var(--sidebar-active);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-group-title span {
    flex: 1;
    min-width: 0;
}

.sidebar-group-title small {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--sidebar-muted);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 800;
}

.sidebar-caret {
    transition: transform 0.18s ease;
}

.sidebar-group.open .sidebar-caret {
    transform: rotate(180deg);
}

.sidebar-group-links {
    display: none;
    gap: 3px;
    padding-bottom: 2px;
}

.sidebar-group.open .sidebar-group-links {
    display: grid;
}

.sidebar-group-title .bi,
.sidebar-link .bi {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-link {
    min-height: 40px;
    padding: 9px 10px 9px 14px;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.15;
}

.sidebar-link:hover {
    color: var(--sidebar-active);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-link.active {
    color: var(--sidebar-active);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(15, 159, 110, 0.9));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sidebar-link.disabled {
    opacity: 0.5;
    cursor: default;
}

.sidebar-backdrop {
    display: none;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    min-height: var(--topbar-height);
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-menu-btn,
.topbar-icon-link,
.user-menu {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.topbar-menu-btn,
.topbar-icon-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: inline-grid;
    place-items: center;
    text-decoration: none;
}

.topbar-menu-btn:hover,
.topbar-icon-link:hover,
.user-menu:hover {
    border-color: #bdd2f7;
    color: var(--brand);
    background: #f8fbff;
}

.topbar-title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.2;
}

.topbar-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.topbar-subtitle span + span::before {
    content: "/";
    margin-right: 6px;
    color: #94a3b8;
}

.topbar-chip {
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: #0f766e;
    background: var(--accent-soft);
    border: 1px solid #ccebdd;
    font-size: 0.84rem;
    font-weight: 700;
}

.user-menu {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 8px 5px 5px;
    border-radius: var(--radius);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-size: 0.78rem;
    font-weight: 800;
}

.user-copy {
    text-align: left;
    line-height: 1.1;
}

.user-copy span,
.user-copy small {
    display: block;
}

.user-copy span {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 800;
}

.user-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.74rem;
}

.app-content {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 26px;
    flex: 1;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 26px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.82);
}

.page-header,
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.page-header {
    margin-bottom: 18px;
    padding: 18px 0 6px;
}

.panel-header {
    margin-bottom: 16px;
}

.page-header h1,
.panel-header h2 {
    margin: 0;
    color: var(--text);
    font-weight: 850;
    line-height: 1.15;
}

.page-header h1 {
    font-size: 1.75rem;
}

.panel-header h2 {
    font-size: 1.12rem;
}

.page-header p,
.panel-header p {
    max-width: 850px;
    margin: 6px 0 0;
    color: var(--muted);
}

.content-panel,
.metric-card,
.profile-field,
.permission-group,
.health-group {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.content-panel {
    padding: 18px;
}

.metric-card {
    position: relative;
    min-height: 112px;
    padding: 16px;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.metric-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.metric-card,
.btn,
.form-control,
.form-select {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.metric-value {
    margin-top: 6px;
    color: var(--text);
    font-size: 1.85rem;
    font-weight: 850;
    line-height: 1.05;
}

.metric-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-transform: uppercase;
}

.metric-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: var(--brand);
    background: #eef5ff;
    font-size: 1.15rem;
}

.metric-card .metric-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.8rem;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 180px 150px auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.audit-filter-row {
    grid-template-columns: 180px minmax(140px, 1fr) 150px 150px auto;
}

.member-filter-row {
    grid-template-columns: minmax(220px, 1fr) 180px 180px 150px auto;
}

.finance-filter-row {
    grid-template-columns: minmax(220px, 1fr) 170px 170px 150px 150px auto;
}

.report-filter-row {
    grid-template-columns: minmax(180px, 1fr) 160px 220px 190px 180px 150px 150px auto;
}

.form-label {
    margin-bottom: 0.38rem;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 750;
}

.form-control,
.form-select {
    min-height: 42px;
    border-color: var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background-color: #fff;
    line-height: 1.35;
}

.form-control:focus,
.form-select:focus {
    border-color: #8ab4f8;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
    color: #94a3b8;
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
}

.form-control[type="file"] {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.btn {
    border-radius: var(--radius);
    font-weight: 750;
}

.btn-primary {
    border-color: var(--brand);
    background: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: #aac5f7;
}

.btn-outline-primary:hover {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.btn-outline-secondary {
    color: #5f6b7a;
    border-color: var(--border);
    background: #fff;
}

.btn-outline-secondary:hover {
    color: var(--text);
    border-color: #c6d3e2;
    background: #f8fafc;
}

.btn-group {
    gap: 4px;
}

.btn-group > .btn {
    border-radius: var(--radius) !important;
}

.table-responsive {
    --table-accent: #2563eb;
    border: 1px solid var(--border-soft);
    border-top: 4px solid var(--table-accent);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 0.82rem 0.9rem;
    border-bottom-color: var(--border-soft);
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #5f6b7a;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98)),
        #f8fafc;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #fbfdff;
}

.table td {
    color: #263449;
}

.badge {
    border-radius: 999px;
    padding: 0.42em 0.66em;
    font-weight: 750;
}

.text-bg-light {
    color: #344054 !important;
    background-color: #f8fafc !important;
}

.nav-tabs {
    gap: 6px;
    border-bottom: 1px solid var(--border-soft);
}

.nav-tabs .nav-link {
    border: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--muted);
    font-weight: 750;
}

.nav-tabs .nav-link:hover {
    color: var(--brand);
    background: #f8fbff;
}

.nav-tabs .nav-link.active {
    color: var(--brand);
    background: #eef5ff;
}

.modal-content {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    border-color: var(--border-soft);
}

.modal-title {
    font-weight: 850;
}

.modal {
    --bs-modal-margin: 0.9rem;
}

.modal-dialog {
    --modal-width: 560px;
    width: calc(100% - 1.8rem);
    max-width: var(--modal-width) !important;
    margin: 0.9rem auto;
}

.modal-dialog.modal-sm {
    --modal-width: 420px;
}

.modal-dialog.modal-lg {
    --modal-width: 960px;
}

.modal-dialog.modal-xl {
    --modal-width: 1180px;
}

.modal-dialog-scrollable .modal-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 1.8rem);
    height: calc(100dvh - 1.8rem);
    max-height: calc(100vh - 1.8rem);
    max-height: calc(100dvh - 1.8rem);
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.modal-header {
    flex: 0 0 auto;
    padding: 18px 22px;
    background: #fff;
}

.modal-body {
    padding: 20px 22px 24px;
}

.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: scroll !important;
    scrollbar-gutter: stable;
}

.modal-footer {
    flex: 0 0 auto;
    padding: 14px 22px;
    background: #fbfdff;
}

.modal-dialog-scrollable {
    height: auto;
    max-height: none;
}

.dropdown-menu {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}

.dropdown-item {
    font-weight: 650;
}

.alert {
    border-radius: var(--radius);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

.section-title {
    color: #5f6b7a;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.profile-field {
    min-height: 76px;
    padding: 13px;
    background: #fff;
}

.profile-field span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.profile-field strong {
    display: block;
    font-size: 0.96rem;
    word-break: break-word;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.permission-group {
    padding: 14px;
}

.report-table-wrap {
    max-height: 62vh;
}

.health-group {
    overflow: hidden;
}

.health-group-title {
    padding: 13px 15px;
    color: #344054;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border-soft);
    font-weight: 850;
}

.health-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text);
}

.health-list li {
    margin-bottom: 8px;
}

.dashboard-hero {
    margin-bottom: 18px;
    padding: 20px;
    color: #fff;
    background: linear-gradient(135deg, #073b3a, #0f766e 52%, #2563eb);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.dashboard-hero h1 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 850;
}

.dashboard-hero p {
    max-width: 760px;
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.quick-action {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.quick-action:hover {
    color: var(--brand);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quick-action i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: var(--brand);
    background: #eef5ff;
    font-size: 1.05rem;
}

.quick-action strong,
.quick-action span {
    display: block;
}

.quick-action strong {
    font-size: 0.94rem;
}

.quick-action span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
}

.layman-hero {
    margin-bottom: 18px;
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(7, 59, 58, 0.96), rgba(15, 118, 110, 0.94)),
        var(--sidebar-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.layman-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #d7faf0;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 800;
}

.layman-hero h1 {
    max-width: 820px;
    margin: 12px 0 0;
    font-size: 1.9rem;
    font-weight: 850;
    line-height: 1.14;
}

.layman-hero p {
    max-width: 760px;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
}

.layman-hero-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.11);
    color: #eefdf8;
    font-size: 0.9rem;
    font-weight: 650;
}

.layman-hero-note .bi {
    flex: 0 0 auto;
    margin-top: 2px;
}

.layman-panel {
    background:
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.layman-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.layman-action-tile {
    position: relative;
    min-height: 118px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #dfe8f4;
    border-radius: var(--radius);
    color: var(--text);
    background: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.layman-action-tile::before,
.daily-work-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--tile-color, var(--brand));
}

.layman-action-tile:hover {
    color: var(--text);
    border-color: var(--tile-color, var(--brand));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.layman-action-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: var(--tile-color, var(--brand));
    background: var(--tile-soft, #eef5ff);
    font-size: 1.18rem;
}

.layman-action-member {
    --tile-color: #2563eb;
    --tile-soft: #eef5ff;
}

.layman-action-rd {
    --tile-color: #0f766e;
    --tile-soft: #ecfdf5;
}

.layman-action-loan {
    --tile-color: #7c3aed;
    --tile-soft: #f3e8ff;
}

.layman-action-savings {
    --tile-color: #0284c7;
    --tile-soft: #e0f2fe;
}

.layman-action-receipt {
    --tile-color: #db2777;
    --tile-soft: #fce7f3;
}

.layman-action-approval {
    --tile-color: #d97706;
    --tile-soft: #fff7ed;
}

.layman-action-cash {
    --tile-color: #059669;
    --tile-soft: #ecfdf5;
}

.layman-action-report {
    --tile-color: #4f46e5;
    --tile-soft: #eef2ff;
}

.layman-action-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.layman-action-copy strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.layman-action-copy small {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.layman-action-count {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    background: var(--danger);
    font-size: 0.78rem;
    font-weight: 850;
}

.daily-work-card {
    position: relative;
    height: 100%;
    min-height: 128px;
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.daily-work-card span,
.daily-work-card small {
    display: block;
}

.daily-work-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.daily-work-card strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1.05;
}

.daily-work-card small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.daily-work-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    font-size: 1.12rem;
}

.daily-work-card-success .daily-work-icon {
    color: #047857;
    background: #ecfdf5;
}

.daily-work-card-success {
    --tile-color: #10b981;
}

.daily-work-card-warning .daily-work-icon {
    color: #b45309;
    background: #fff7ed;
}

.daily-work-card-warning {
    --tile-color: #f59e0b;
}

.daily-work-card-danger .daily-work-icon {
    color: #b91c1c;
    background: #fef2f2;
}

.daily-work-card-danger {
    --tile-color: #ef4444;
}

.simple-work-list {
    height: 100%;
    display: grid;
    align-content: start;
    gap: 9px;
}

.simple-work-list-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding-bottom: 4px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 850;
}

.simple-work-list-title a {
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.simple-work-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 11px 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: #fbfdff;
}

.simple-work-item strong,
.simple-work-item span {
    display: block;
}

.simple-work-item strong {
    color: var(--text);
    font-size: 0.9rem;
}

.simple-work-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.simple-work-item b {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 0.9rem;
}

.simple-empty {
    padding: 18px;
    border: 1px dashed #d6e1ee;
    border-radius: var(--radius);
    color: var(--muted);
    background: #fbfdff;
    text-align: center;
    font-weight: 650;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.attention-card {
    min-height: 106px;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 13px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    text-decoration: none;
}

.attention-card:hover {
    color: var(--brand);
    border-color: #c5d7f7;
    background: #fbfdff;
}

.attention-card b {
    font-size: 1.4rem;
    line-height: 1;
}

.attention-card span {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 850;
}

.attention-card small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.collection-breakdown {
    display: grid;
    gap: 9px;
}

.collection-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: #fbfdff;
}

.collection-line span,
.collection-line small {
    display: block;
}

.collection-line span {
    color: var(--text);
    font-weight: 800;
}

.collection-line small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 650;
}

.collection-line strong {
    white-space: nowrap;
}

.module-page-header {
    align-items: center;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.module-panel {
    position: relative;
}

.module-filter-bar {
    position: relative;
    margin: -2px -2px 16px;
    border-color: #e1e9f4;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.96)),
        var(--surface-soft);
}

.module-filter-bar .form-control,
.module-filter-bar .form-select {
    background-color: #fff;
}

.module-filter-bar .btn {
    min-height: 40px;
}

.table-card {
    --table-accent-soft: rgba(37, 99, 235, 0.08);
    position: relative;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #b9c6d6 #f3f6fa;
}

.module-accent-default .table-card {
    --table-accent: #2563eb;
    --table-accent-soft: rgba(37, 99, 235, 0.08);
}

.module-accent-members .table-card {
    --table-accent: #2563eb;
    --table-accent-soft: rgba(37, 99, 235, 0.08);
}

.module-accent-deposits .table-card {
    --table-accent: #059669;
    --table-accent-soft: rgba(5, 150, 105, 0.09);
}

.module-accent-loans .table-card {
    --table-accent: #d97706;
    --table-accent-soft: rgba(217, 119, 6, 0.1);
}

.module-accent-accounts .table-card {
    --table-accent: #0f766e;
    --table-accent-soft: rgba(15, 118, 110, 0.1);
}

.module-accent-reports .table-card {
    --table-accent: #7c3aed;
    --table-accent-soft: rgba(124, 58, 237, 0.09);
}

.module-accent-settings .table-card {
    --table-accent: #475569;
    --table-accent-soft: rgba(71, 85, 105, 0.09);
}

.module-accent-system .table-card {
    --table-accent: #0891b2;
    --table-accent-soft: rgba(8, 145, 178, 0.09);
}

.app-content,
.app-body {
    --form-accent: #2563eb;
    --form-accent-soft: rgba(37, 99, 235, 0.08);
    --form-accent-border: rgba(37, 99, 235, 0.18);
}

.module-accent-default {
    --form-accent: #2563eb;
    --form-accent-soft: rgba(37, 99, 235, 0.08);
    --form-accent-border: rgba(37, 99, 235, 0.18);
}

.module-accent-members {
    --form-accent: #2563eb;
    --form-accent-soft: rgba(37, 99, 235, 0.08);
    --form-accent-border: rgba(37, 99, 235, 0.18);
}

.module-accent-deposits {
    --form-accent: #059669;
    --form-accent-soft: rgba(5, 150, 105, 0.09);
    --form-accent-border: rgba(5, 150, 105, 0.18);
}

.module-accent-loans {
    --form-accent: #d97706;
    --form-accent-soft: rgba(217, 119, 6, 0.1);
    --form-accent-border: rgba(217, 119, 6, 0.2);
}

.module-accent-accounts {
    --form-accent: #0f766e;
    --form-accent-soft: rgba(15, 118, 110, 0.1);
    --form-accent-border: rgba(15, 118, 110, 0.2);
}

.module-accent-reports {
    --form-accent: #7c3aed;
    --form-accent-soft: rgba(124, 58, 237, 0.09);
    --form-accent-border: rgba(124, 58, 237, 0.18);
}

.module-accent-settings {
    --form-accent: #475569;
    --form-accent-soft: rgba(71, 85, 105, 0.09);
    --form-accent-border: rgba(71, 85, 105, 0.18);
}

.module-accent-system {
    --form-accent: #0891b2;
    --form-accent-soft: rgba(8, 145, 178, 0.09);
    --form-accent-border: rgba(8, 145, 178, 0.18);
}

.table-card .module-table thead th {
    box-shadow: inset 0 -1px 0 var(--border-soft), inset 0 3px 0 var(--table-accent-soft);
}

.table-card::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.table-card::-webkit-scrollbar-track {
    background: #f3f6fa;
}

.table-card::-webkit-scrollbar-thumb {
    background: #b9c6d6;
    border-radius: 999px;
    border: 2px solid #f3f6fa;
}

.module-table thead th:first-child,
.module-table tbody td:first-child {
    padding-left: 1rem;
}

.module-table thead th:last-child,
.module-table tbody td:last-child {
    padding-right: 1rem;
}

.module-table tbody td .btn,
.module-table tbody td .btn-sm {
    min-height: 30px;
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
}

.module-table tbody td .btn-group {
    justify-content: flex-end;
}

.module-table tbody td code {
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #d2f4e5;
    border-radius: 6px;
    padding: 0.15rem 0.35rem;
}

.empty-state-cell {
    color: #7b8794 !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(248, 250, 252, 0.9));
    font-weight: 650;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 14px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--form-accent-border);
    border-left: 4px solid var(--form-accent);
    border-radius: 10px;
    background:
        linear-gradient(90deg, var(--form-accent-soft), rgba(255, 255, 255, 0.94));
    color: #344054;
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-section-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--form-accent);
    box-shadow: 0 0 0 4px var(--form-accent-soft);
}

.modal-body .form-section-title:not(:first-child) {
    margin-top: 20px;
}

.modal-body > input[type="hidden"]:first-child + .form-section-title {
    margin-top: 0;
}

.professional-form {
    min-width: 0;
}

.professional-form .modal-body {
    position: relative;
    background:
        linear-gradient(180deg, var(--form-accent-soft) 0, rgba(255, 255, 255, 0) 86px),
        #ffffff;
}

.professional-form .modal-body::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--form-accent);
}

.professional-form .modal-form-grid {
    row-gap: 16px;
    align-items: start;
    margin-right: 0;
    margin-left: 0;
    padding: 1rem;
    border: 1px solid var(--form-accent-border);
    border-top: 4px solid var(--form-accent);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
        #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.professional-form .form-section-title + .modal-form-grid,
.professional-form .modal-form-grid + .modal-form-grid {
    margin-top: 0.75rem;
}

.professional-form .form-wizard-step .modal-form-grid {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.professional-form .form-field {
    min-width: 0;
}

.modal-dialog:not(.modal-lg):not(.modal-xl) .modal-form-grid > [class*="col-md-"] {
    flex: 0 0 auto;
    width: 100%;
}

.professional-form .form-label,
.modal-body > .form-label-standalone {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
}

.professional-form .form-control:hover,
.professional-form .form-select:hover {
    border-color: #c8d5e4;
}

.professional-form .form-control:disabled,
.professional-form .form-select:disabled,
.professional-form .form-control[readonly] {
    color: #64748b;
    background-color: #f8fafc;
}

.professional-form .input-group .form-control,
.professional-form .input-group .form-select {
    min-width: 0;
}

.professional-form .form-check {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.professional-form .form-check-input {
    flex: 0 0 auto;
    margin-top: 0;
}

.professional-form .invalid-feedback {
    margin-top: 5px;
    font-size: 0.78rem;
    font-weight: 650;
}

.professional-form .is-invalid {
    background-color: #fffafa;
}

.modal-tabs-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.modal-tabs-scroll .nav-link {
    white-space: nowrap;
}

.modal-dialog-scrollable .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #b9c6d6 #f8fafc;
}

.modal-footer {
    background: #fbfdff;
}

.modal-footer .btn {
    min-width: 96px;
}

.content-panel > .row.g-3:first-child:last-child .metric-card {
    min-height: 100%;
}

.profile-field {
    background:
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.status-strip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.field-hint {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.modal-xl .table-card,
.modal-lg .table-card {
    max-height: 56vh;
}

@media (max-width: 767.98px) {
    .module-page-header {
        align-items: stretch;
    }

    .page-actions,
    .page-actions .btn,
    .page-actions .btn-group {
        width: 100%;
    }

    .page-actions .btn-group .btn {
        flex: 1 1 auto;
    }

    .module-filter-bar {
        margin-left: 0;
        margin-right: 0;
    }

    .modal-dialog {
        width: min(calc(100% - 1rem), var(--modal-width));
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-right: 18px;
        padding-left: 18px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 159, 110, 0.1)),
        var(--app-bg);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 430px);
    padding: 28px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.login-brand {
    margin-bottom: 24px;
}

.login-brand h1 {
    font-size: 1.24rem;
}

.login-brand p {
    color: var(--muted);
}

.login-hint {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}

@media (max-width: 1199.98px) {
    .finance-filter-row,
    .report-filter-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .layman-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .layman-hero {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        left: calc(var(--sidebar-width) * -1);
        transition: left 0.2s ease;
    }

    .app-sidebar.show,
    .sidebar-open .app-sidebar {
        left: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        display: block;
        pointer-events: none;
        background: rgba(15, 23, 42, 0);
        transition: background 0.2s ease;
    }

    .sidebar-open .sidebar-backdrop {
        pointer-events: auto;
        background: rgba(15, 23, 42, 0.42);
    }

    .sidebar-open {
        overflow: hidden;
    }

    .app-content {
        padding: 18px;
    }

    .filter-row,
    .audit-filter-row,
    .member-filter-row,
    .finance-filter-row,
    .report-filter-row {
        grid-template-columns: 1fr;
    }

    .page-header,
    .panel-header,
    .app-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .report-table-wrap {
        max-height: none;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 0.9rem;
    }

    .app-content {
        padding: 14px;
    }

    .content-panel,
    .metric-card,
    .dashboard-hero {
        padding: 14px;
    }

    .module-filter-bar {
        padding: 12px;
    }

    .module-filter-bar .btn {
        width: 100%;
    }

    .topbar-actions {
        gap: 7px;
    }

    .page-header {
        padding-top: 10px;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }

    .layman-hero h1 {
        font-size: 1.45rem;
    }

    .layman-action-grid,
    .attention-grid {
        grid-template-columns: 1fr;
    }

    .layman-action-tile {
        min-height: 96px;
    }

    .daily-work-card {
        min-height: 112px;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.72rem;
    }

    .modal {
        --bs-modal-margin: 0;
    }

    .modal-dialog {
        width: 100%;
        max-width: 100% !important;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
    }

    .modal-dialog-scrollable {
        height: 100vh;
        height: 100dvh;
    }

    .modal-content {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .modal-dialog-scrollable .modal-content {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .modal-header,
    .modal-footer {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .professional-form .modal-form-grid {
        row-gap: 14px;
    }

    .btn-group {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

.json-preview {
    max-height: 360px;
    overflow: auto;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.notice-tile {
    height: 100%;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.notice-tile strong,
.notice-tile span {
    display: block;
}

.notice-tile strong {
    color: #111827;
    margin-bottom: 4px;
}

.notice-tile span {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.form-wizard {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 0.7rem;
    padding: 0.35rem;
    margin-bottom: 0.2rem;
    border: 1px solid #e4ebf5;
    border-radius: 16px;
    background: #f7faff;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.65rem 0.8rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #5b6b82;
    font-weight: 800;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wizard-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #2563eb;
    font-size: 0.82rem;
}

.wizard-step.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.wizard-step.active span {
    background: #2563eb;
    color: #ffffff;
}

.wizard-step.completed {
    color: #047857;
}

.wizard-step.completed span {
    background: #dcfce7;
    color: #047857;
}

.plain-help {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.guided-collection-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr);
    gap: 0.9rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--form-accent-border);
    border-left: 4px solid var(--form-accent);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, var(--form-accent-soft) 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.guided-collection-card strong,
.guided-collection-card small,
.guided-collection-card span {
    display: block;
}

.guided-label,
.guided-amount span,
.guided-breakup span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.guided-collection-card strong {
    color: #0f172a;
    font-size: 1.02rem;
    line-height: 1.35;
}

.guided-collection-card small {
    margin-top: 0.2rem;
    color: #475569;
}

.guided-amount {
    padding: 0.75rem;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--form-accent-border);
}

.guided-amount strong {
    margin-top: 0.2rem;
    color: var(--form-accent);
    font-size: 1.25rem;
}

.guided-breakup {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.guided-breakup span {
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    text-transform: none;
    letter-spacing: 0;
}

.review-before-save-alert {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--form-accent-border);
    border-left: 4px solid var(--form-accent);
    border-radius: 12px;
    background: var(--form-accent-soft);
    color: #1e3a8a;
}

.review-before-save-alert .bi {
    font-size: 1.35rem;
}

#review-before-submit-modal .modal-content {
    border-top: 4px solid var(--form-accent);
}

.review-before-save-alert strong,
.review-before-save-alert span {
    display: block;
}

.review-before-save-alert span {
    margin-top: 0.2rem;
    color: #475569;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.review-summary-item {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid var(--form-accent-border);
    border-top: 3px solid var(--form-accent);
    border-radius: 10px;
    background: #ffffff;
}

.review-summary-item span {
    display: block;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.review-summary-item strong {
    display: block;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.operator-mode-chip,
.operator-bottom-nav {
    display: none;
}

.operator-mode-chip {
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 800;
}

.operator-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 1026;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    gap: 0.25rem;
    padding: 0.45rem;
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(14px);
}

.operator-nav-item {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.2rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.operator-nav-item .bi {
    font-size: 1.15rem;
}

.operator-nav-item.active,
.operator-nav-item:focus,
.operator-nav-item:hover {
    background: #eff6ff;
    color: #2563eb;
}

.operator-nav-menu {
    color: #0f766e;
}

.form-wizard-step {
    padding: 1rem;
    border: 1px solid var(--form-accent-border);
    border-top: 4px solid var(--form-accent);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
        #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
    animation: wizardFadeIn 0.16s ease;
}

.form-wizard-step[hidden] {
    display: none !important;
}

.wizard-footer {
    gap: 0.7rem;
}

.wizard-footer [data-wizard-prev] {
    margin-left: auto;
}

@keyframes wizardFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .app-body {
        padding-bottom: 86px;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 1025;
        min-height: 62px;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .topbar-title {
        max-width: 58vw;
        overflow: hidden;
        font-size: 1rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .topbar-subtitle {
        font-size: 0.72rem;
    }

    .operator-mode-chip {
        display: inline-flex;
    }

    .operator-bottom-nav {
        display: grid;
    }

    .app-footer {
        padding-bottom: 1rem;
    }

    .module-page-header,
    .content-panel,
    .metric-card {
        border-radius: 12px;
    }

    .module-page-header p,
    .panel-header p {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .table-card {
        margin-right: -0.25rem;
        margin-left: -0.25rem;
    }

    .module-table .btn,
    .table-card .btn {
        min-height: 38px;
        padding: 0.45rem 0.65rem;
    }

    .btn-group {
        gap: 0.35rem;
    }

    .btn-group > .btn {
        border-radius: 10px !important;
    }

    .modal-footer {
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    .guided-collection-card {
        grid-template-columns: 1fr;
    }

    .guided-breakup {
        display: grid;
        grid-template-columns: 1fr;
    }

    .review-summary-grid {
        grid-template-columns: 1fr;
    }

    .wizard-steps {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .wizard-step {
        min-width: 170px;
        scroll-snap-align: start;
    }

    .wizard-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .wizard-footer .btn {
        width: 100%;
    }

    .wizard-footer [data-bs-dismiss="modal"] {
        grid-column: 1 / -1;
        order: 3;
    }

    .wizard-footer [data-wizard-prev] {
        margin-left: 0;
    }

    .wizard-footer [data-wizard-submit] {
        grid-column: 1 / -1;
    }
}
