* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #111827;
    overflow-x: hidden;
}

.top-banner {
    width: 100%;
    box-sizing: border-box;
    min-height: 86px;
    background: var(--topbar-color, #1E40AF);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 10px 24px;
    gap: 20px;
}

.banner-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
    padding: 5px;
}

.banner-title {
    flex: 1;
    min-width: 0;
}

.banner-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.banner-title h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banner-church-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}

.banner-church-links-sep {
    opacity: 0.65;
}

.banner-church-link {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.banner-church-link:hover,
.banner-church-link:focus {
    color: #dbeafe;
}

.banner-title span {
    font-size: 13px;
    opacity: 0.9;
}

.banner-user {
    flex: 0 0 auto;
    font-size: 13px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
    position: relative;
    z-index: 2;
    max-width: 240px;
}

.banner-user-greeting {
    line-height: 1.3;
    word-break: break-word;
}

.banner-user-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.banner-user-actions-sep {
    opacity: 0.75;
}

.banner-user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: #ffffff;
}

.banner-user a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    padding: 2px 0;
}

.banner-user a:hover,
.banner-user a:focus {
    color: #dbeafe;
}

.app-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - 86px);
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--sidebar-color, #111827);
    color: #ffffff;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 86px);
    overflow-y: auto;
}

.sidebar-title {
    padding: 0 6px 16px 6px;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.02em;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-list li {
    margin: 0;
}

.menu-list li.menu-group-label {
    padding: 14px 6px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
}

.menu-accordion {
    gap: 8px;
}

.menu-section {
    margin: 0;
}

.menu-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    background: linear-gradient(180deg, #3d4a5c 0%, #2a3444 48%, #1c2430 100%);
    border: 1px solid #1a2230;
    border-top-color: #5a6778;
    border-left-color: #4f5d6e;
    border-bottom-color: #0d1219;
    border-right-color: #121a24;
    box-shadow:
        0 5px 0 #0a0f16,
        0 7px 14px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -2px 0 rgba(0, 0, 0, 0.18);
    transform: translateY(-3px);
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.menu-section-header:hover {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: linear-gradient(180deg, #4a586b 0%, #334155 48%, #243041 100%);
    border-top-color: #6b7a8f;
    border-left-color: #5f6f84;
    box-shadow:
        0 6px 0 #0a0f16,
        0 10px 18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.menu-section.is-expanded .menu-section-header {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 72%, #ffffff) 0%,
        var(--primary-color, #1E3A8A) 52%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 78%, #000000) 100%
    );
    border-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 70%, #000000);
    border-top-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 55%, #ffffff);
    border-left-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 62%, #ffffff);
    border-bottom-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 82%, #000000);
    border-right-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 78%, #000000);
    box-shadow:
        0 5px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 88%, #000000),
        0 8px 16px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.menu-section-header:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 #0a0f16,
        0 2px 5px rgba(0, 0, 0, 0.35),
        inset 0 3px 5px rgba(0, 0, 0, 0.35);
}

.menu-section-label {
    flex: 1;
    text-align: left;
}

.menu-section-chevron {
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    margin-left: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    opacity: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.menu-section.is-expanded .menu-section-chevron {
    transform: rotate(45deg);
}

.menu-section-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.menu-section.is-expanded .menu-section-items {
    display: flex;
    padding: 8px 0 4px 10px;
}

.menu-section-items li {
    margin: 0;
}

.menu-section-items .menu-link-browse-only {
    display: block;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    color: #6b7280;
    letter-spacing: 0.01em;
    background: color-mix(in srgb, #9ca3af 18%, #ffffff);
    border: 1px dashed color-mix(in srgb, #9ca3af 55%, #ffffff);
    border-radius: 4px;
    cursor: not-allowed;
    opacity: 0.78;
    user-select: none;
}

.dashboard-quick-links .btn-browse-only,
.btn.btn-browse-only {
    opacity: 0.65;
    cursor: not-allowed;
}

.menu-section-items .ajax-link {
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    transform: translateY(-2px);
    color: color-mix(in srgb, var(--primary-color, #1E3A8A) 78%, #000000);
    letter-spacing: 0.015em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 34%, #ffffff) 0%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 44%, #ffffff) 50%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 50%, #ffffff) 100%
    );
    border: 1px solid color-mix(in srgb, var(--primary-color, #1E3A8A) 42%, #ffffff);
    border-top-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 28%, #ffffff);
    border-left-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 32%, #ffffff);
    border-bottom-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 55%, #ffffff);
    border-right-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 48%, #ffffff);
    box-shadow:
        0 3px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 58%, #ffffff),
        0 5px 10px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.menu-section-items .ajax-link:hover {
    color: color-mix(in srgb, var(--primary-color, #1E3A8A) 88%, #000000);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 48%, #ffffff) 0%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 56%, #ffffff) 50%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 62%, #ffffff) 100%
    );
    border-top-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 40%, #ffffff);
    border-left-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 44%, #ffffff);
    box-shadow:
        0 4px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 62%, #ffffff),
        0 7px 12px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.menu-section-items .ajax-link.active {
    color: color-mix(in srgb, var(--primary-color, #1E3A8A) 92%, #000000);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 52%, #ffffff) 0%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 62%, #ffffff) 50%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 68%, #ffffff) 100%
    );
    border-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 65%, #000000);
    border-top-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 45%, #ffffff);
    border-left-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 50%, #ffffff);
    border-bottom-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 72%, #000000);
    border-right-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 68%, #000000);
    box-shadow:
        0 3px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 72%, #ffffff),
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.menu-section-items .ajax-link:active,
.menu-section-items .ajax-link.active:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 65%, #ffffff),
        0 2px 4px rgba(0, 0, 0, 0.25),
        inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.menu-list a {
    display: block;
    padding: 12px 14px;
    color: #f3f4f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 10px;
    background: linear-gradient(180deg, #3d4a5c 0%, #2a3444 48%, #1c2430 100%);
    border: 1px solid #1a2230;
    border-top-color: #5a6778;
    border-left-color: #4f5d6e;
    border-bottom-color: #0d1219;
    border-right-color: #121a24;
    box-shadow:
        0 5px 0 #0a0f16,
        0 7px 14px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -2px 0 rgba(0, 0, 0, 0.18);
    transform: translateY(-3px);
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.menu-list a:hover {
    color: #ffffff;
    background: linear-gradient(180deg, #4a586b 0%, #334155 48%, #243041 100%);
    border-top-color: #6b7a8f;
    border-left-color: #5f6f84;
    box-shadow:
        0 6px 0 #0a0f16,
        0 10px 18px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.menu-list a.active {
    color: #ffffff;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 72%, #ffffff) 0%,
        var(--primary-color, #1E3A8A) 52%,
        color-mix(in srgb, var(--primary-color, #1E3A8A) 78%, #000000) 100%
    );
    border-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 70%, #000000);
    border-top-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 55%, #ffffff);
    border-left-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 62%, #ffffff);
    border-bottom-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 82%, #000000);
    border-right-color: color-mix(in srgb, var(--primary-color, #1E3A8A) 78%, #000000);
    box-shadow:
        0 5px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 88%, #000000),
        0 8px 16px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.22);
    transform: translateY(-3px);
}

.menu-list a:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 #0a0f16,
        0 2px 5px rgba(0, 0, 0, 0.35),
        inset 0 3px 5px rgba(0, 0, 0, 0.35);
}

.menu-list a.active:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--primary-color, #1E3A8A) 88%, #000000),
        0 2px 5px rgba(0, 0, 0, 0.35),
        inset 0 3px 5px rgba(0, 0, 0, 0.35);
}

.menu-list a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 3px;
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    padding: 24px;
    overflow-x: hidden;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    margin-bottom: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Keep wide data tables inside the content pane (scroll horizontally here, not the page). */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table {
    width: 100%;
    max-width: none;
}

.card h2 {
    margin-top: 0;
}

.form-row {
    margin-bottom: 15px;
}

.theme-color-field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-color-swatch {
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    flex-shrink: 0;
}

.theme-settings-form .theme-color-picker {
    width: 72px;
    height: 42px;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
}

.theme-color-rgb {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: #374151;
}

.theme-palettes-card .theme-palette-save-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 20px;
}

.theme-palettes-card .theme-palette-save-row label {
    display: block;
    width: 100%;
    margin-bottom: -4px;
}

.theme-palettes-card .theme-palette-save-row input[type="text"] {
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 420px;
}

.theme-palette-table {
    width: 100%;
    border-collapse: collapse;
}

.theme-palette-table th,
.theme-palette-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.theme-palette-table tr.is-selected td {
    background: #f8fafc;
}

.theme-palette-select-col {
    width: 72px;
}

.theme-palette-swatches {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.theme-palette-swatch {
    width: 22px;
    height: 22px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    display: inline-block;
}

.theme-palette-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    margin-top: 18px;
}

.module-form .form-row label {
    display: block;
    margin-bottom: 6px;
}

.card form.inline-form,
table td .inline-form {
    display: inline;
    margin: 0;
}

.table-actions {
    white-space: nowrap;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    background: #ffffff;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
}

label.checkbox-inline,
.form-row label:has(input[type="checkbox"]),
.form-row label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Ministry Assignments (and similar): checkboxes in rows of three */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    align-items: start;
}

.checkbox-grid > label {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0;
    font-weight: 600;
}

@media (max-width: 900px) {
    .checkbox-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

button,
.btn {
    background: var(--button-color, #2563EB);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font: inherit;
    font-weight: 600;
    line-height: 1.25;
}

button:hover,
.btn:hover {
    opacity: 0.92;
}

button:disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--button-color, #2563EB);
    color: #ffffff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
    border: 1px solid #d1d5db;
}

.btn-danger {
    background: #b42318;
    color: #ffffff;
}

.btn-sm,
table button,
table .btn {
    padding: 6px 10px;
    font-size: 12px;
    width: auto;
}

.card button + button,
.card .btn + .btn,
.card button + .btn,
.card .btn + button,
.form-actions button,
.form-actions .btn {
    margin-right: 8px;
    margin-top: 4px;
}

table td form.ajax-form {
    display: inline;
    margin: 0;
}

table td a.ajax-link,
table td a[data-ajax-url],
table td button[data-ajax-url],
.form-actions button[data-ajax-url] {
    margin-right: 6px;
}

table td a.ajax-link,
table td a[data-ajax-url] {
    font-weight: 600;
    text-decoration: none;
}

table td a.ajax-link:hover,
table td a[data-ajax-url]:hover {
    text-decoration: underline;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.loading-box {
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
}

.login-page {
    background: linear-gradient(135deg, #1E3A8A, #9333EA);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 390px;
    background: #ffffff;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.login-register-prompt {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.register-box {
    width: 640px;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    text-align: left;
}

.register-church-header {
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.register-church-logo {
    max-height: 72px;
    width: auto;
    margin-bottom: 0.5rem;
}

.register-church-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--primary-color, #1E3A8A);
}

.register-app-name {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

.register-church-header .app-vendor-credit {
    margin-bottom: 0;
}

.login-church-header .register-church-name {
    font-size: 1.15rem;
}

.login-church-header .register-church-logo {
    max-height: 56px;
}

.register-box fieldset {
    margin-bottom: 1rem;
}

.register-box .register-photo {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.register-photo-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.register-camera-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.register-box #register-camera-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

#register-camera-error {
    color: #dc2626;
}

.register-ministries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.4rem 1rem;
}

.register-ministry-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-weight: 500;
}

.register-ministries-hint {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
}

.register-box .member-vehicle-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
    margin-bottom: 0;
}

.register-box .member-vehicle-row label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.register-box .member-vehicle-row input {
    width: 100%;
    margin-bottom: 0;
}

.password-field {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.password-field input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.password-peek-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    background: #e5e7eb;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.password-peek-btn[aria-pressed="true"] {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.register-summary {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.register-summary li {
    padding: 0.15rem 0;
}

.required-mark {
    color: #dc2626;
    font-weight: 700;
}

/* Ensure the [hidden] attribute wins over component display rules (e.g. .btn). */
[hidden] {
    display: none !important;
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
    line-height: 1.35;
}

.app-vendor-credit {
    display: block;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 500;
    color: #5c6370;
}

.app-vendor-credit--banner {
    margin-top: 0.2rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
}

.profile-photo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dde1e6;
}

.profile-photo-placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f5f7;
    border-radius: 8px;
    color: #666;
    font-size: 0.85rem;
}

.profile-details {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 16px;
    margin: 16px 0 0;
}

.profile-details dt {
    font-weight: 600;
    color: #5c6370;
}

.profile-details dd {
    margin: 0;
}

table {
    border-collapse: collapse;
    background: #ffffff;
    font-size: 13px;
}

table th {
    background: var(--primary-color, #1E3A8A);
    color: #ffffff;
    text-align: left;
}

table td,
table th {
    border: 1px solid #d1d5db;
    padding: 8px;
}

table tr:nth-child(even) {
    background: #f9fafb;
}

.text-right {
    text-align: right;
}

/* Monetary / budget values: right-align display and entry cells */
.num,
th.num,
td.num {
    text-align: right;
}

.approve-amount-input,
.budget-month-input,
.line-amount,
.line-unit-price,
.line-quantity,
#voucher-lines-table input[name="amount[]"],
.requisition-lines-table input[type="number"],
.budget-entry-grid input[type="number"] {
    text-align: right;
}

.voucher-approval-table th.text-right,
.voucher-approval-table td.text-right,
.voucher-finance-table th.text-right,
.voucher-finance-table td.text-right,
.budget-analysis-table th.text-right,
.budget-analysis-table td.text-right,
.budget-versus-actual-table th.text-right,
.budget-versus-actual-table td.text-right,
.budget-setup-list th.text-right,
.budget-setup-list td.text-right,
.budget-entry-grid th,
.budget-entry-grid td,
.requisition-status-table th.text-right,
.requisition-status-table td.text-right {
    text-align: right;
}

.budget-entry-grid #budget-annual-total {
    display: block;
    text-align: right;
}

.budget-bulk-distribute {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.budget-bulk-distribute label {
    margin-bottom: 0;
    font-weight: 600;
}

.budget-bulk-distribute #budget-bulk-amount {
    width: 260px;
    text-align: right;
}

.budget-bulk-hint {
    font-size: 12px;
    color: #6b7280;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.budget-summary-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.budget-summary-section h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.budget-summary-section + .budget-summary-section {
    padding-top: 4px;
    border-top: 1px solid #e5e7eb;
}

.metric-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-value {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color, #1E3A8A);
    text-align: right;
}

.metric-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.executive-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

.chart-panel {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    min-height: 320px;
}

.chart-panel h4 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #1f2937;
}

.chart-panel canvas {
    width: 100% !important;
    max-height: 280px;
}

.chart-empty-note {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

.text-muted {
    color: #6b7280;
}

@media (max-width: 960px) {
    .executive-chart-grid {
        grid-template-columns: 1fr;
    }
}

.variance-favorable {
    color: #047857;
    font-weight: 600;
}

.variance-unfavorable {
    color: #b91c1c;
    font-weight: 600;
}

.inline-form {
    display: inline;
}

.budget-entry-grid input[type="number"] {
    width: 90px;
}

.budget-analysis-table td,
.budget-analysis-table th {
    font-size: 13px;
}

.budget-versus-actual-table tr.order-break-total td {
    background: #14532d;
    color: #dcfce7;
    border-top: 2px solid #052e16;
    font-weight: 700;
}

.dashboard-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-quick-links.dashboard-quick-links--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    align-items: stretch;
}

.dashboard-quick-links--grid > .btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.access-security-table tr.access-security-changed-by-other td,
.access-security-table tr.access-security-changed-by-other {
    color: #dc2626 !important;
    font-weight: 600;
}

#access-security-awareness .geninfo-filter-form > .btn {
    align-self: flex-end;
}

.self-service-hub .self-service-actions,
.self-service-actions.dashboard-quick-links--grid {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.self-service-actions.dashboard-quick-links--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.self-service-actions.dashboard-quick-links--grid > .btn {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    padding: 10px 14px;
}

.requisition-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.requisition-church-name {
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.requisition-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
    margin-bottom: 16px;
}

.estimated-budget-balance-panel {
    margin-top: 0.55rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    font-size: 0.95em;
    line-height: 1.4;
}

.estimated-budget-balance-panel #estimated-budget-balance-value {
    font-weight: 700;
    color: #1e3a8a;
}

.voucher-beneficiary-fieldset {
    margin: 16px 0;
    padding: 12px 16px 4px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

.voucher-beneficiary-fieldset legend {
    padding: 0 6px;
    font-weight: 600;
}

.requisition-signatures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.requisition-signature-block {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #f9fafb;
}

.requisition-signature-value {
    min-height: 40px;
    padding: 8px 0;
    font-weight: 600;
}

.requisition-lines-table input {
    width: 100%;
    box-sizing: border-box;
}

.requisition-signed-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.requisition-retired-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.retire-requisition-panel {
    margin: 1.25rem 0 1.75rem;
    padding: 1rem 1.15rem 1.15rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
}

.retire-requisition-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px 16px;
    margin: 0 0 1rem;
}

.retire-requisition-summary div {
    min-width: 0;
}

.retire-requisition-summary dt {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.retire-requisition-summary dd {
    margin: 4px 0 0;
    font-weight: 600;
    color: #111827;
}

.retire-requisition-form {
    margin-top: 1rem;
}

.retire-confirm-row {
    margin-top: 0.75rem;
}

.retire-confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    line-height: 1.4;
}

.retire-confirm-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.retire-form-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.retire-row-selected {
    background: #eff6ff;
}

.retire-evidence-section {
    margin: 1.25rem 0 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.retire-evidence-heading {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.retire-evidence-empty {
    margin: 0.5rem 0 0.75rem;
}

.retire-evidence-upload-form {
    margin-top: 0.85rem;
}

.retire-evidence-table .inline-form {
    display: inline-block;
    margin-left: 6px;
    margin-top: 0;
    vertical-align: middle;
}

.retire-evidence-links {
    margin: 0;
    padding-left: 1.1rem;
}

.retire-evidence-links li {
    margin-bottom: 4px;
}

.voucher-attachments-fieldset {
    margin-top: 1rem;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.voucher-attachments-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 600;
}

.voucher-attachments-section {
    margin: 1rem 0 1.25rem;
}

.voucher-attachments-details {
    max-width: 220px;
}

.voucher-attachments-details summary {
    cursor: pointer;
    color: #1d4ed8;
    font-weight: 600;
}

.voucher-attachments-link-list {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
}

.voucher-attachments-link-list li {
    margin-bottom: 4px;
}

.requisition-status-table .voucher-attachments-link-list {
    margin: 0;
    padding-left: 1rem;
    list-style: disc;
}

.voucher-attachments-actions-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}

.voucher-attachments-table .inline-form {
    display: inline-block;
    margin-left: 6px;
    margin-top: 0;
    vertical-align: middle;
}

.voucher-attachments-manager {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

.voucher-attachments-upload-form {
    margin-top: 0.85rem;
}

.voucher-attachments-upload-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.retire-evidence-count {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85em;
}

.requisition-status-table .inline-form {
    display: inline-block;
    margin-top: 4px;
}

.requisition-actions-cell .inline-form {
    display: block;
    margin-top: 4px;
}

.requisition-actions-cell .btn {
    margin-bottom: 4px;
}

.voucher-approval-table td,
.voucher-approval-table th,
.voucher-finance-table td,
.voucher-finance-table th {
    vertical-align: top;
}

.voucher-approval-table,
.voucher-finance-table {
    table-layout: auto;
}

.voucher-approval-table .text-muted,
.voucher-finance-table .text-muted {
    font-size: 0.85em;
}

.voucher-partial-row {
    background: #fff8eb;
}

.voucher-partial-badge,
.voucher-partial-slice-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.voucher-partial-badge {
    background: #fef3c7;
    color: #92400e;
}

.voucher-partial-slice-badge {
    background: #e0f2fe;
    color: #075985;
}

.voucher-reversed-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}

.voucher-number-has-note,
.voucher-finance-table .voucher-number-has-note,
.voucher-approval-table .voucher-number-has-note,
.requisition-status-table .voucher-number-has-note {
    font-weight: 700;
    color: inherit;
}

.voucher-number-has-note.voucher-number-note-recent,
.voucher-number-note-recent,
.voucher-finance-table .voucher-number-has-note.voucher-number-note-recent,
.voucher-approval-table .voucher-number-has-note.voucher-number-note-recent,
.requisition-status-table .voucher-number-has-note.voucher-number-note-recent {
    font-weight: 700;
    color: #022c22;
}

.voucher-number-has-note code,
.voucher-number-note-recent code,
.voucher-finance-table .voucher-number-has-note code,
.voucher-approval-table .voucher-number-has-note code,
.requisition-status-table .voucher-number-has-note code {
    font-weight: 700;
}

.voucher-number-note-recent code,
.voucher-finance-table .voucher-number-note-recent code,
.voucher-approval-table .voucher-number-note-recent code,
.requisition-status-table .voucher-number-note-recent code {
    color: #022c22;
}

/* Vouchers For DFC: bright green for Approved / Pastor Approved */
.voucher-approval-table .voucher-number-approved-status,
.voucher-approval-table .voucher-number-approved-status.voucher-number-has-note,
.voucher-approval-table .voucher-number-approved-status.voucher-number-note-recent {
    font-weight: 700;
    color: #16a34a;
}

.voucher-approval-table .voucher-number-approved-status code,
.voucher-approval-table .voucher-number-approved-status.voucher-number-note-recent code {
    font-weight: 700;
    color: #16a34a;
}

.voucher-reversal-note,
.voucher-finance-table .voucher-reversal-note,
.voucher-approval-table .voucher-reversal-note {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    font-weight: 600;
    color: #dc2626 !important;
    line-height: 1.35;
}

.voucher-partial-slice-list {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 0.85em;
    color: #4b5563;
}

.voucher-partial-slice-list li {
    margin-bottom: 2px;
}

.approve-amount-input {
    width: 180px;
    min-width: 160px;
    max-width: 100%;
    box-sizing: border-box;
    text-align: right;
}

.requisition-status-section {
    margin-top: 2rem;
}

.requisition-status-section:first-of-type {
    margin-top: 1.25rem;
}

.requisition-section-heading {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.requisition-archive-toggle-form {
    margin: 0 0 0.65rem;
}

.requisition-archive-toggle,
.filter-checkbox-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

.requisition-archive-toggle input[type="checkbox"],
.filter-checkbox-toggle input[type="checkbox"] {
    margin: 0;
}

.requisition-archive-count,
.filter-checkbox-count {
    color: #64748b;
    font-weight: 600;
}

.requisition-action-status-badge {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.85em;
    color: #334155;
}

.requisition-action-status-cell {
    min-width: 9rem;
    vertical-align: top;
    white-space: nowrap;
}

.requisition-action-status-cell .requisition-action-status-badge {
    margin-top: 0;
    font-weight: 600;
    color: #0f172a;
}

.vouchers-for-dfc-action-status-cell {
    min-width: 9rem;
    white-space: nowrap;
    vertical-align: top;
}

.vouchers-for-dfc-action-status-cell .requisition-action-status-badge {
    margin-top: 0;
    font-weight: 600;
    color: #0f172a;
}

.accounts-bulk-select-col {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
}

.accounts-bulk-actions-bar {
    margin: 0.85rem 0 0.35rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
}

.accounts-bulk-actions-bar textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.accounts-bulk-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.accounts-bulk-hint {
    margin: 0.65rem 0 0;
    font-size: 0.9em;
}

.btn.btn-link.requisition-budget-balance-link {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    color: #1d4ed8;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.btn.btn-link.requisition-budget-balance-link:hover,
.btn.btn-link.requisition-budget-balance-link:focus {
    color: #1e40af;
}

.requisition-action-comments {
    margin: 0.35rem 0;
}

.requisition-action-comments-list {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}

.requisition-action-comments-list li {
    margin-bottom: 0.55rem;
}

.requisition-comments-row td {
    background: #f8fafc;
}

.voucher-notes-block {
    margin: 0.45rem 0 0.65rem;
}

.voucher-notes-block strong {
    display: block;
    margin-bottom: 0.2rem;
}

.requisition-attention-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.55rem;
    min-width: 12rem;
    max-width: 18rem;
}

.requisition-attention-comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 3.2rem;
}

.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;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.user-picture-row .user-picture-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-picture-preview {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #ffffff;
}

.user-picture-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
}

.user-picture-remove {
    margin: 0;
}

.member-form-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.member-form-top-fields {
    flex: 1;
    min-width: 0;
}

.member-form-top-fields .form-row {
    margin-bottom: 0;
}

.member-form-photo-panel {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    background: #f9fafb;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.member-certificate-current {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

.member-vehicles-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.member-vehicle-row {
    align-items: end;
}

.member-vehicle-row-actions {
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}

.baptism-detail-fields {
    margin-top: 8px;
}

.membership-confirmation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: center;
}

.membership-confirmation-options > label {
    margin-bottom: 0;
}

.member-photo-panel-title {
    width: 100%;
    margin: 0;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

.member-photo-slot {
    position: relative;
    width: 110px;
    height: 138px;
    flex-shrink: 0;
    overflow: hidden;
}

.member-photo-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 110px;
    height: 138px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #d1d5db;
    background: #ffffff;
}

.member-photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 110px;
    height: 138px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
    background: #ffffff;
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}

.member-photo-slot > .member-photo-preview[hidden],
.member-photo-slot > .member-photo-placeholder[hidden] {
    display: none !important;
}

.member-photo-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.member-photo-controls input[type="file"] {
    width: 100%;
    font-size: 12px;
    padding: 6px 8px;
}

.member-photo-hint {
    display: block;
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.member-photo-remove {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
}

.member-list-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-photo-thumb-slot {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #d1d5db;
    background: #ffffff;
}

.member-photo-thumb-slot--empty {
    background: #f3f4f6;
}

.member-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-form-media-panels {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

.member-form-signature-panel {
    width: 240px;
}

.member-signature-slot {
    position: relative;
    width: 200px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
}

.member-signature-preview,
.member-signature-canvas,
.member-signature-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #d1d5db;
    background: #ffffff;
    box-sizing: border-box;
}

.member-signature-preview {
    object-fit: contain;
    padding: 4px;
}

.member-signature-canvas {
    cursor: crosshair;
    touch-action: none;
}

.member-signature-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
}

.member-signature-slot > .member-signature-preview[hidden],
.member-signature-slot > .member-signature-canvas[hidden],
.member-signature-slot > .member-signature-placeholder[hidden] {
    display: none !important;
}

.member-signature-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.member-signature-thumb {
    width: 72px;
    height: 28px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    flex-shrink: 0;
    vertical-align: middle;
}

.user-media-field {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.user-signature-preview {
    height: 48px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    padding: 4px;
}

.user-signature-preview--empty {
    display: none;
}

.profile-photo {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-signature {
    width: 120px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #dde1e6;
    background: #ffffff;
    padding: 4px;
}

.profile-signature-placeholder {
    width: 120px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f5f7;
    border-radius: 8px;
    color: #666;
    font-size: 0.8rem;
}

.person-signature-name {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.person-signature-image {
    height: 36px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 4px;
}

.person-signature-caption {
    font-weight: 600;
}

.requisition-signature-preview-wrap {
    margin-top: 8px;
}

@media (max-width: 700px) {
    .member-form-media-panels {
        width: 100%;
        flex-direction: column;
    }

    .member-form-signature-panel {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .member-form-top-row {
        flex-direction: column;
    }

    .member-form-photo-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.dashboard-welcome-card h2 {
    margin-top: 0;
}

.dashboard-welcome {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.dashboard-user-photo-slot {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.dashboard-user-photo-slot > img.dashboard-user-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.dashboard-user-photo-slot > img.dashboard-user-photo[hidden] {
    display: none !important;
}

.dashboard-user-photo-slot > .dashboard-user-initials-badge--overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.dashboard-user-photo-slot > .dashboard-user-initials-badge--overlay[hidden] {
    display: none !important;
}

.dashboard-welcome-text {
    flex: 1;
    min-width: 0;
}

.dashboard-user-photo {
    position: relative;
    z-index: 1;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #e5e7eb;
    background: #ffffff;
}

.dashboard-user-initials-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid #e5e7eb;
    background: #dbeafe;
    box-sizing: border-box;
}

.dashboard-user-initials {
    display: block;
    margin: 0;
    padding: 0;
    font-weight: 700;
    font-size: 28px;
    color: #1e40af;
    line-height: 1;
    text-align: center;
    pointer-events: none;
}

/* Legacy alias — keep if referenced elsewhere */
.dashboard-user-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1e40af;
}

.geninfo-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    max-width: 100%;
}

.geninfo-filter-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 160px;
    max-width: 220px;
}

.geninfo-filter-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.geninfo-filter-row input,
.geninfo-filter-row select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pagination-summary {
    margin: 0 0 12px;
    font-size: 14px;
    color: #4b5563;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-jump-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.pagination-page-label,
.pagination-page-of {
    font-size: 14px;
    color: #374151;
}

.pagination-page-input {
    width: 4.5rem;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
}

.pagination-meta {
    font-size: 14px;
    color: #374151;
}

.pagination-meta .text-muted {
    margin-left: 4px;
}

.pagination-controls .btn.disabled,
.pagination-controls .btn.disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-page-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination-page-link {
    min-width: 2.25rem;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
}

.pagination-page-link.active {
    background: var(--button-color, #2563EB);
    color: #ffffff;
    border-color: var(--button-color, #2563EB);
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: #6b7280;
    font-size: 14px;
    user-select: none;
}

.help-center-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.help-center-group-title {
    margin: 24px 0 8px;
    padding-bottom: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.help-center-group-title:first-of-type {
    margin-top: 8px;
}

.help-center-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-center-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.help-center-list li:last-child {
    border-bottom: none;
}

.help-center-link {
    font-weight: 600;
    text-decoration: none;
}

.help-center-body {
    line-height: 1.6;
    white-space: pre-wrap;
}

.banner-help-link {
    font-weight: 600;
}

.report-export-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.report-export-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-right: 4px;
}

.report-export-link {
    text-decoration: none;
}

.report-export-hint {
    flex-basis: 100%;
    font-size: 13px;
    margin-top: 2px;
}

.expense-summary-row td {
    font-weight: 600;
    background: #f8fafc;
}

.expense-summary-detail-row > td {
    padding: 0.75rem 1rem 1rem;
    background: #f1f5f9;
}

.expense-summary-detail-table {
    margin: 0;
    background: #fff;
}

.expense-summary-detail-table th {
    font-weight: 600;
    background: #e2e8f0;
}

.expense-amount-reversal {
    color: #b91c1c;
    font-weight: 600;
}
