html[data-theme] body,
html[data-theme] .app-shell {
    background: var(--bg) !important;
    color: var(--text) !important;
}

html[data-theme] .app-main,
html[data-theme] main {
    background: transparent;
    color: var(--text);
}

html[data-theme] .app-topbar,
html[data-theme] .navbar,
html[data-theme] header {
    background: var(--topbar-bg) !important;
    color: var(--topbar-text) !important;
    border-color: var(--border) !important;
}

html[data-theme] .navbar .navbar-brand,
html[data-theme] .navbar .nav-link,
html[data-theme] .app-topbar .navbar-brand,
html[data-theme] .app-topbar .nav-link,
html[data-theme] header .nav-link,
html[data-theme] header .brand-text,
html[data-theme] .user-info {
    color: var(--topbar-text) !important;
}

html[data-theme] .app-sidebar,
html[data-theme] #sidebar,
html[data-theme] .sidebar {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--border) !important;
}

html[data-theme] .app-sidebar .nav-link,
html[data-theme] #sidebar .nav-link,
html[data-theme] .sidebar .nav-link {
    color: var(--sidebar-text) !important;
    border-radius: 8px;
    margin: 2px 8px;
}

html[data-theme] .app-sidebar .nav-link:hover,
html[data-theme] #sidebar .nav-link:hover,
html[data-theme] .sidebar .nav-link:hover,
html[data-theme] .app-sidebar .nav-link.active,
html[data-theme] #sidebar .nav-link.active,
html[data-theme] .sidebar .nav-link.active {
    background: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
}

html[data-theme] .card,
html[data-theme] .panel,
html[data-theme] .table-responsive,
html[data-theme] .stat-box,
html[data-theme] .invoice-summary-box,
html[data-theme] .router-panel,
html[data-theme] .noc-card {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme] .card-header,
html[data-theme] .router-head,
html[data-theme] .noc-head {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme] .table,
html[data-theme] table {
    --bs-table-color: var(--text);
    --bs-table-bg: var(--card-bg);
    --bs-table-border-color: var(--border);
    color: var(--text) !important;
}

html[data-theme] .table thead th,
html[data-theme] table thead th {
    background: var(--table-head-bg) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme] .table tbody tr:hover td,
html[data-theme] .table tbody tr:hover th {
    background: color-mix(in srgb, var(--surface-2) 86%, transparent) !important;
}

html[data-theme] .mpesa-reconcile-list {
    background: #ffffff !important;
    border-radius: 10px;
    border: 1px solid var(--border) !important;
}

html[data-theme] .mpesa-reconcile-list .table {
    --bs-table-bg: #ffffff;
    --bs-table-color: #111827;
    --bs-table-border-color: #e5e7eb;
    color: #111827 !important;
    margin-bottom: 0;
}

html[data-theme] .mpesa-reconcile-list .table thead th,
html[data-theme] .mpesa-reconcile-list .table tbody td,
html[data-theme] .mpesa-reconcile-list .table tbody th {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}

html[data-theme] .mpesa-reconcile-list .table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background: #f9fafb !important;
}

html[data-theme] .mpesa-reconcile-list .table.table-hover > tbody > tr:hover > * {
    background: #f3f4f6 !important;
}

html[data-theme] .mpesa-reconcile-list .btn {
    font-weight: 600;
}

html[data-theme] .mpesa-reconcile-list .btn-outline-info {
    background: #facc15 !important;
    border-color: #facc15 !important;
    color: #111827 !important;
}

html[data-theme] .mpesa-reconcile-list .btn-outline-info:hover,
html[data-theme] .mpesa-reconcile-list .btn-outline-info:focus {
    background: #eab308 !important;
    border-color: #eab308 !important;
    color: #111827 !important;
}

html[data-theme] .mpesa-reconcile-list .btn-primary {
    background: #f97316 !important;
    border-color: #f97316 !important;
    color: #ffffff !important;
}

html[data-theme] .mpesa-reconcile-list .btn-primary:hover,
html[data-theme] .mpesa-reconcile-list .btn-primary:focus {
    background: #ea580c !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
}

html[data-theme] .btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--primary-contrast) !important;
}

html[data-theme] .btn-secondary,
html[data-theme] .btn-outline-secondary,
html[data-theme] .btn-outline-light,
html[data-theme] .btn-outline-info,
html[data-theme] .btn-outline-warning,
html[data-theme] .btn-outline-primary,
html[data-theme] .btn-outline-success,
html[data-theme] .btn-outline-danger {
    background: transparent !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

html[data-theme] .btn:hover {
    filter: brightness(1.03);
}

html[data-theme] .form-control,
html[data-theme] .form-select,
html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea {
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--border) !important;
}

html[data-theme] .form-control:focus,
html[data-theme] .form-select:focus,
html[data-theme] input:focus,
html[data-theme] select:focus,
html[data-theme] textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--accent) 24%, transparent) !important;
}

html[data-theme] .badge.bg-success { background: var(--success) !important; }
html[data-theme] .badge.bg-warning { background: var(--warning) !important; }
html[data-theme] .badge.bg-danger { background: var(--danger) !important; }
html[data-theme] .badge.bg-secondary,
html[data-theme] .badge.bg-dark,
html[data-theme] .badge.bg-info { color: var(--text) !important; }

html[data-theme] a,
html[data-theme] .table-action-link,
html[data-theme] .nav-link {
    color: var(--link);
}

html[data-theme] .text-muted,
html[data-theme] .subtitle,
html[data-theme] small,
html[data-theme] .noc-sub {
    color: var(--muted) !important;
}

html[data-theme] .app-footer,
html[data-theme] footer {
    background: var(--surface) !important;
    color: var(--muted) !important;
    border-top: 1px solid var(--border) !important;
}

html[data-theme] .theme-preview-tile {
    border: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    color: var(--text) !important;
}

html[data-theme] .theme-preview-active {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.theme-swatch-row {
    display: flex;
    gap: 8px;
}

.theme-swatch {
    width: 28px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.theme-save-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 3000;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 4px solid var(--success);
    border-radius: 10px;
    padding: 10px 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: all .22s ease;
}

.theme-save-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* FieldOps legacy dark utility cleanup so pages inherit global theme */
html[data-theme] .bg-dark,
html[data-theme] .list-group-item.bg-dark,
html[data-theme] .card.bg-dark {
    background: var(--card-bg) !important;
    color: var(--text) !important;
}

html[data-theme] .text-light,
html[data-theme] .text-secondary {
    color: var(--muted) !important;
}

html[data-theme] .border-secondary,
html[data-theme] .border-secondary-subtle {
    border-color: var(--border) !important;
}

html[data-theme] .navbar-dark .navbar-brand,
html[data-theme] .navbar-dark .navbar-nav .nav-link {
    color: var(--topbar-text) !important;
}

.theme-gallery-card {
    overflow: hidden;
}

.theme-mini-preview {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}

.theme-mini-header {
    height: 18px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}

.theme-mini-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
}

.theme-mini-body {
    display: flex;
    min-height: 66px;
}

.theme-mini-sidebar {
    width: 28%;
    background: var(--sidebar-bg);
}

.theme-mini-content {
    width: 72%;
    background: var(--bg);
    padding: 6px;
}

.theme-mini-table-head {
    height: 10px;
    border-radius: 5px;
    background: var(--table-head-bg);
    margin-bottom: 5px;
}

.theme-mini-row {
    height: 7px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--surface-2) 70%, transparent);
    margin-bottom: 4px;
}

.theme-mini-btn {
    width: 48px;
    height: 12px;
    border-radius: 6px;
    background: var(--primary);
}

.theme-gallery-card[data-preview-theme] {
    --preview-bg: #0f172a;
    --preview-surface: #111827;
    --preview-surface-2: #1f2937;
    --preview-sidebar: #0b1220;
    --preview-primary: #3b82f6;
    --preview-table-head: #334155;
}

.theme-gallery-card[data-preview-theme] .theme-mini-preview { background: var(--preview-surface); border-color: color-mix(in srgb, var(--preview-surface-2) 65%, #000); }
.theme-gallery-card[data-preview-theme] .theme-mini-header { background: var(--preview-surface-2); }
.theme-gallery-card[data-preview-theme] .theme-mini-dot { background: color-mix(in srgb, var(--preview-primary) 42%, #fff); }
.theme-gallery-card[data-preview-theme] .theme-mini-sidebar { background: var(--preview-sidebar); }
.theme-gallery-card[data-preview-theme] .theme-mini-content { background: var(--preview-bg); }
.theme-gallery-card[data-preview-theme] .theme-mini-table-head { background: var(--preview-table-head); }
.theme-gallery-card[data-preview-theme] .theme-mini-row { background: color-mix(in srgb, var(--preview-surface-2) 82%, transparent); }
.theme-gallery-card[data-preview-theme] .theme-mini-btn { background: var(--preview-primary); }

.theme-gallery-card[data-preview-theme="modern_cloud"] { --preview-bg: #f4f9ff; --preview-surface: #ffffff; --preview-surface-2: #eef5ff; --preview-sidebar: #e9f2ff; --preview-primary: #2563eb; --preview-table-head: #eaf2ff; }
.theme-gallery-card[data-preview-theme="modern_slate"] { --preview-bg: #f5f7fa; --preview-surface: #ffffff; --preview-surface-2: #eef2f7; --preview-sidebar: #e7ebf2; --preview-primary: #4f46e5; --preview-table-head: #e3e8f2; }
.theme-gallery-card[data-preview-theme="modern_graphite"] { --preview-bg: #0e141b; --preview-surface: #141d28; --preview-surface-2: #1c2733; --preview-sidebar: #111926; --preview-primary: #06b6d4; --preview-table-head: #213042; }
.theme-gallery-card[data-preview-theme="modern_carbon"] { --preview-bg: #07090d; --preview-surface: #10161f; --preview-surface-2: #17212b; --preview-sidebar: #0a1118; --preview-primary: #10b981; --preview-table-head: #1e2936; }
.theme-gallery-card[data-preview-theme="catppuccin_latte"] { --preview-bg: #eff1f5; --preview-surface: #ffffff; --preview-surface-2: #e6e9ef; --preview-sidebar: #dce0e8; --preview-primary: #1e66f5; --preview-table-head: #dde2eb; }
.theme-gallery-card[data-preview-theme="catppuccin_frappe"] { --preview-bg: #303446; --preview-surface: #414559; --preview-surface-2: #51576d; --preview-sidebar: #292c3c; --preview-primary: #8caaee; --preview-table-head: #626880; }
.theme-gallery-card[data-preview-theme="catppuccin_macchiato"] { --preview-bg: #24273a; --preview-surface: #363a4f; --preview-surface-2: #494d64; --preview-sidebar: #1e2030; --preview-primary: #8aadf4; --preview-table-head: #5b6078; }
.theme-gallery-card[data-preview-theme="catppuccin_mocha"] { --preview-bg: #1e1e2e; --preview-surface: #313244; --preview-surface-2: #45475a; --preview-sidebar: #181825; --preview-primary: #89b4fa; --preview-table-head: #585b70; }
.theme-gallery-card[data-preview-theme="tokyo_night"] { --preview-bg: #1a1b26; --preview-surface: #24283b; --preview-surface-2: #2a3048; --preview-sidebar: #16161e; --preview-primary: #7aa2f7; --preview-table-head: #2f3b56; }
.theme-gallery-card[data-preview-theme="tokyo_storm"] { --preview-bg: #1f2335; --preview-surface: #24283b; --preview-surface-2: #30374f; --preview-sidebar: #1a1e2e; --preview-primary: #7dcfff; --preview-table-head: #394860; }
.theme-gallery-card[data-preview-theme="tokyo_moon"] { --preview-bg: #1e2030; --preview-surface: #2a2e45; --preview-surface-2: #363d59; --preview-sidebar: #181c2b; --preview-primary: #82aaff; --preview-table-head: #3d4a66; }
.theme-gallery-card[data-preview-theme="rose_pine"] { --preview-bg: #191724; --preview-surface: #1f1d2e; --preview-surface-2: #2a273f; --preview-sidebar: #151320; --preview-primary: #eb6f92; --preview-table-head: #312c48; }
.theme-gallery-card[data-preview-theme="rose_pine_moon"] { --preview-bg: #232136; --preview-surface: #2a273f; --preview-surface-2: #393552; --preview-sidebar: #1f1d30; --preview-primary: #9ccfd8; --preview-table-head: #463f64; }
.theme-gallery-card[data-preview-theme="rose_pine_dawn"] { --preview-bg: #faf4ed; --preview-surface: #fffaf3; --preview-surface-2: #f2e9e1; --preview-sidebar: #f1e7dd; --preview-primary: #b4637a; --preview-table-head: #e9ddd2; }
.theme-gallery-card[data-preview-theme="nord"] { --preview-bg: #2e3440; --preview-surface: #3b4252; --preview-surface-2: #434c5e; --preview-sidebar: #2a303b; --preview-primary: #88c0d0; --preview-table-head: #4c566a; }
.theme-gallery-card[data-preview-theme="dracula"] { --preview-bg: #282a36; --preview-surface: #303341; --preview-surface-2: #3c3f51; --preview-sidebar: #1f202b; --preview-primary: #bd93f9; --preview-table-head: #44475a; }
.theme-gallery-card[data-preview-theme="everforest"] { --preview-bg: #272e33; --preview-surface: #2d353b; --preview-surface-2: #374145; --preview-sidebar: #232a2f; --preview-primary: #a7c080; --preview-table-head: #424c50; }
.theme-gallery-card[data-preview-theme="forest_green"] { --preview-bg: #0f1c14; --preview-surface: #17261d; --preview-surface-2: #213429; --preview-sidebar: #0c1711; --preview-primary: #2fb36d; --preview-table-head: #2a4435; }
.theme-gallery-card[data-preview-theme="onedark"] { --preview-bg: #282c34; --preview-surface: #303641; --preview-surface-2: #3a4150; --preview-sidebar: #21252b; --preview-primary: #61afef; --preview-table-head: #464f63; }

html[data-theme] .portal-shell {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

html[data-theme] .portal-header.card {
    border-radius: 16px;
}

html[data-theme] .portal-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

html[data-theme] .portal-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e40af;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
}

html[data-theme] .portal-kpi.card,
html[data-theme] .portal-instruction-box {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb;
}

html[data-theme] .portal-instruction-box {
    box-shadow: 0 2px 10px rgba(2, 6, 23, 0.05);
}

html[data-theme] .portal-shell .btn-lg {
    padding: 0.8rem 1.1rem;
    font-weight: 600;
}

html[data-theme] .portal-shell .card {
    border-radius: 16px;
}

@media (max-width: 767.98px) {
    html[data-theme] .portal-shell {
        max-width: 100%;
    }

    html[data-theme] .portal-shell .card {
        border-radius: 14px;
    }

    html[data-theme] .portal-shell .table {
        font-size: 0.92rem;
    }
}


/* Consistent module page chrome */
.app-page-shell {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    gap: 1.25rem;
}

.app-page-shell > .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.app-page-shell-portal {
    max-width: 1240px;
}

.app-page-shell-auth {
    max-width: 100%;
}

.page-toolbar,
.module-toolbar,
.app-page-header,
.d-flex.justify-content-between.align-items-center.mb-3 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.page-toolbar > div:first-child,
.module-toolbar > div:first-child,
.app-page-header > div:first-child {
    min-width: min(100%, 320px);
}

.page-toolbar h1,
.page-toolbar h2,
.page-toolbar h3,
.module-toolbar h1,
.module-toolbar h2,
.module-toolbar h3,
.app-page-header h1,
.app-page-header h2,
.app-page-header h3 {
    margin: 0;
    font-size: clamp(1.35rem, 1rem + 0.8vw, 2rem);
    line-height: 1.15;
}

.page-toolbar .text-muted,
.module-toolbar .text-muted,
.app-page-header .text-muted,
.subtitle {
    max-width: 72ch;
    margin: 0;
}

.page-toolbar .btn,
.page-toolbar .btn-group,
.module-toolbar .btn,
.app-page-header .btn {
    white-space: nowrap;
}

.page-section-card,
.module-card {
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-section-card .card-header,
.module-card .card-header,
.app-section-heading {
    padding: 0.95rem 1.15rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.page-section-card .card-body,
.module-card .card-body {
    padding: 1.15rem;
}

.page-filter-card .card-body,
.app-filter-card .card-body {
    padding: 1rem 1.15rem;
}

.card,
.table-responsive,
.alert {
    box-shadow: var(--shadow);
    border-radius: 16px !important;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.page-section-card .table-responsive,
.module-card .table-responsive {
    border-radius: 0 !important;
}

.table {
    margin-bottom: 0;
}

.table td,
.table th {
    vertical-align: middle;
}

.table thead th {
    white-space: nowrap;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

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

.btn-group .btn,
.action-buttons .btn,
td .btn,
td form .btn {
    margin: 0;
}

.action-buttons,
td.text-end .btn-group,
td.text-end .d-inline-flex,
td.text-end .d-flex {
    justify-content: flex-end;
}

.action-buttons {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

td form.d-inline,
td form.d-inline-block {
    display: inline-flex !important;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 44px;
}

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

.form-text {
    font-size: 0.82rem;
}

.app-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-inline-details {
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    background: rgba(255, 255, 255, 0.02);
}

.app-inline-details summary {
    cursor: pointer;
    font-weight: 600;
}

.app-metric-card {
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-metric-card .metric-label {
    font-size: 0.82rem;
    color: var(--bs-secondary-color, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.app-metric-card .metric-value {
    display: block;
    margin-top: 0.35rem;
    font-size: clamp(1.45rem, 1rem + 0.85vw, 2.1rem);
    line-height: 1.05;
}

.app-kpi-grid .card,
.app-kpi-grid .page-section-card {
    height: 100%;
}

.invoice-client-results {
    position: absolute;
    inset: calc(100% + 0.35rem) 0 auto 0;
    z-index: 1060;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(9, 14, 26, 0.98);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
}

.invoice-client-results[hidden] {
    display: none !important;
}

.invoice-client-result {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0.8rem 0.95rem;
    display: grid;
    gap: 0.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.invoice-client-result:last-child {
    border-bottom: 0;
}

.invoice-client-result:hover,
.invoice-client-result.is-active {
    background: rgba(59, 130, 246, 0.18);
}

.invoice-client-result-title {
    font-weight: 600;
}

.invoice-client-result-meta {
    font-size: 0.82rem;
    color: #cbd5e1;
}

.invoice-client-empty {
    padding: 0.85rem 0.95rem;
    color: #cbd5e1;
    font-size: 0.88rem;
}

.invoice-client-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #dbeafe;
    font-size: 0.86rem;
    font-weight: 600;
}

.noc-toolbar.mb-0 {
    margin: 0;
}

#sidebar .nav-link,
.app-sidebar .nav-link {
    font-weight: 600;
}
html[data-theme="blue_tile"] .btn-outline-primary,
html[data-theme="blue_tile"] .btn-outline-secondary,
html[data-theme="blue_tile"] .btn-outline-info,
html[data-theme="blue_tile"] .btn-outline-success,
html[data-theme="blue_tile"] .btn-outline-warning,
html[data-theme="blue_tile"] .btn-outline-danger,
html[data-theme="blue_tile"] .btn-outline-light {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    border-color: #93c5fd !important;
}
html[data-theme="blue_tile"] .table thead th {
    color: #0f172a !important;
}
html[data-theme="blue_tile"] .badge.text-dark {
    color: #0f172a !important;
}


.sidebar-group {background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .35rem .5rem;}
.sidebar-group summary {cursor: pointer; color: #fff; font-weight: 700; list-style: none;}
.sidebar-group summary::-webkit-details-marker {display:none;}
.sidebar-submenu {padding-top: .5rem; display: grid; gap: .2rem;}
.sidebar-submenu .nav-link {padding: .45rem .65rem; border-radius: .6rem;}
.sidebar-submenu .nav-link:hover, .sidebar-submenu .nav-link.active {background: rgba(13,110,253,.25);}
.card, .table, .btn, .form-control, .form-select, .alert {border-radius: 12px;}

@media (max-width: 991.98px) {
    .app-page-shell {
        gap: 1rem;
    }

    .page-toolbar,
    .module-toolbar,
    .app-page-header {
        align-items: stretch;
    }

    .page-toolbar > div:last-child,
    .module-toolbar > div:last-child,
    .app-page-header > div:last-child {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .page-section-card .card-body,
    .module-card .card-body,
    .page-section-card .card-header,
    .module-card .card-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

    .app-form-actions {
        justify-content: stretch;
    }

    .app-form-actions .btn {
        width: 100%;
    }
}
