/* ═══════════════════════════════════════════════════════════════
   Temple Rich UI — polish layer (cards, pages, gallery, history)
   Loads after temple-theme / pocket-theme; uses brand tokens.
   ═══════════════════════════════════════════════════════════════ */

/* ── Ambient page background (authenticated app) ── */
.theme-ayyappa.page,
.theme-ayyappa .temple-main {
    background:
        radial-gradient(ellipse 120% 80% at 100% -30%, rgba(20, 83, 45, 0.08), transparent 55%),
        radial-gradient(ellipse 90% 60% at 0% 100%, rgba(232, 163, 23, 0.06), transparent 50%),
        var(--temple-gradient-page);
}

/* ── Page headers without banner component ── */
.theme-ayyappa .admin-page > .page-title:first-child,
.theme-ayyappa .mobile-page > h3.page-title:first-child,
.theme-ayyappa .mobile-page > h3.mb-3:first-child,
.theme-ayyappa .mobile-page > h3.mb-4:first-child {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--temple-red-dark);
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    background: var(--temple-gradient-header);
    border: 1px solid var(--temple-border-gold);
    border-radius: var(--temple-radius-xl);
    box-shadow: var(--temple-shadow-sm);
    letter-spacing: 0.02em;
}

.theme-ayyappa .page-subtitle {
    color: var(--temple-muted);
    font-size: 0.9rem;
    margin: -0.5rem 0 1.25rem;
    padding: 0 0.25rem;
    line-height: 1.5;
}

/* ── Elevated cards ── */
.theme-ayyappa .card {
    border: 1px solid var(--temple-border-gold) !important;
    border-radius: var(--temple-radius-xl) !important;
    box-shadow: var(--temple-shadow) !important;
    background: linear-gradient(165deg, #ffffff 0%, var(--brand-50) 120%) !important;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-ayyappa .card:hover {
    box-shadow: var(--temple-shadow-lg) !important;
}

.theme-ayyappa .card-header {
    background: linear-gradient(180deg, var(--brand-50) 0%, #fff 100%) !important;
    border-bottom: 1px solid var(--temple-border-light) !important;
    font-weight: 600;
    color: var(--temple-red-dark);
}

/* ── Alerts ── */
.theme-ayyappa .alert {
    border-radius: var(--temple-radius-lg);
    border-width: 1px;
    box-shadow: var(--temple-shadow-sm);
}

.theme-ayyappa .alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border-color: #bae6fd;
    color: #0c4a6e;
}

.theme-ayyappa .alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-color: #a7f3d0;
}

.theme-ayyappa .alert-warning {
    background: linear-gradient(135deg, var(--brand-50) 0%, #fffbeb 100%);
    border-color: var(--brand-300);
}

.theme-ayyappa .alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    border-color: #fecaca;
}

/* ── Tables (admin + history) ── */
.theme-ayyappa .table {
    --bs-table-bg: transparent;
}

.theme-ayyappa .table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--temple-text-soft);
    border-bottom-width: 2px !important;
}

.theme-ayyappa .table tbody tr {
    transition: background-color 0.15s ease;
}

.theme-ayyappa .table tbody tr:hover {
    background-color: var(--color-primary-soft) !important;
}

.theme-ayyappa .admin-data-table {
    border-radius: var(--temple-radius-xl);
    border: 1px solid var(--temple-border-light);
    box-shadow: var(--temple-shadow);
    background: #fff;
    overflow: hidden;
}

/* ── Badges & pills ── */
.theme-ayyappa .badge {
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.35em 0.65em;
    border-radius: 999px;
}

/* ── Modals ── */
.theme-ayyappa .modal-content {
    border: 1px solid var(--temple-border-gold);
    border-radius: var(--temple-radius-xl) !important;
    box-shadow: 0 24px 48px rgba(28, 28, 25, 0.18) !important;
}

.theme-ayyappa .modal-header {
    background: linear-gradient(180deg, var(--brand-50), #fff);
    border-bottom: 1px solid var(--temple-border-light);
}

/* ── Gallery page ── */
.gallery-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem 2rem;
}

/* ── Blog pages ── */
.blog-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 0.75rem 0.75rem 2.5rem;
}

.blog-page-header {
    margin-bottom: 1.5rem;
}

.blog-eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--temple-maroon, #6b2c1a);
}

.blog-page-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.55rem, 4vw, 2rem);
    color: var(--temple-ink, #1c1c19);
}

.blog-page-lead {
    margin: 0;
    color: var(--temple-muted, #5c564c);
    line-height: 1.5;
}

.blog-card-list {
    display: grid;
    gap: 1rem;
}

.blog-card {
    display: block;
    padding: 1.1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--temple-border-gold, rgba(184, 134, 11, 0.28));
    border-radius: var(--temple-radius-xl, 1rem);
    box-shadow: var(--temple-shadow, 0 8px 24px rgba(28, 28, 25, 0.06));
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(28, 28, 25, 0.1);
    color: inherit;
}

.blog-card-title {
    margin: 0 0 0.45rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--temple-maroon, #6b2c1a);
    line-height: 1.35;
}

.blog-card-summary {
    margin: 0 0 0.75rem;
    color: var(--temple-muted, #5c564c);
    font-size: 0.95rem;
    line-height: 1.5;
}

.blog-card-cta {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--temple-maroon, #6b2c1a);
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--temple-muted, #5c564c);
}

.blog-breadcrumb a {
    color: var(--temple-maroon, #6b2c1a);
    text-decoration: none;
    font-weight: 600;
}

.blog-article-header h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.45rem, 4vw, 1.9rem);
    color: var(--temple-ink, #1c1c19);
    line-height: 1.25;
}

.blog-article-intro {
    margin: 0 0 1.15rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--temple-maroon, #6b2c1a);
}

.blog-article-body {
    background: #fff;
    border: 1px solid var(--temple-border-gold, rgba(184, 134, 11, 0.22));
    border-radius: var(--temple-radius-xl, 1rem);
    padding: 1.15rem 1.1rem 1.35rem;
    box-shadow: var(--temple-shadow, 0 8px 24px rgba(28, 28, 25, 0.05));
}

.blog-article-body .blog-lead {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--temple-ink, #1c1c19);
    margin: 0 0 1.1rem;
}

.blog-article-body h2 {
    margin: 1.35rem 0 0.55rem;
    font-size: 1.2rem;
    color: var(--temple-maroon, #6b2c1a);
}

.blog-article-body h3 {
    margin: 1rem 0 0.4rem;
    font-size: 1.02rem;
    color: var(--temple-ink, #1c1c19);
}

.blog-article-body p,
.blog-article-body li {
    line-height: 1.65;
    color: #3a352e;
}

.blog-article-body ul {
    margin: 0.35rem 0 0.9rem;
    padding-left: 1.2rem;
}

.blog-article-body li + li {
    margin-top: 0.2rem;
}

.blog-article-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.blog-mantra {
    font-weight: 600;
    color: var(--temple-maroon, #6b2c1a);
    font-style: italic;
}

.gallery-page .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.gallery-page .video-card {
    background: #fff;
    border-radius: var(--temple-radius-xl);
    overflow: hidden;
    border: 1px solid var(--temple-border-gold);
    box-shadow: var(--temple-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.gallery-page .video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--temple-shadow-lg);
}

.gallery-page .video-card .thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--brand-100);
}

.gallery-page .video-card .body {
    padding: 0.85rem 1rem 1rem;
}

.gallery-page .video-card .title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--temple-text);
    margin-bottom: 0.25rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-page .video-card .meta {
    font-size: 0.8rem;
    color: var(--temple-muted);
}

.gallery-page .notification-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, var(--brand-50) 100%);
    border: 1px solid var(--brand-200);
    border-radius: var(--temple-radius-xl);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--temple-shadow-sm);
}

.gallery-page .notification-banner .badge {
    background: var(--brand-700);
    color: #fff;
}

.gallery-page .notification-item {
    background: #fff;
    border-radius: var(--temple-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--brand-600);
}

.gallery-page .video-player-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(28, 28, 25, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-page .video-player-modal .modal-content {
    background: #0a0a0a;
    border-radius: var(--temple-radius-xl);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(191, 186, 95, 0.25);
}

.gallery-page .video-player-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: #1a1a1a;
    color: #fff;
}

.gallery-page .video-player-modal .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.gallery-page .video-player-modal .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 767.98px) {
    .gallery-page .video-grid {
        grid-template-columns: 1fr;
    }
}

/* ── History page ── */
.history-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem 2rem;
}

.history-page .section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--temple-red-dark);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--brand-100);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-800);
}

.history-unified-panel {
    background: #fff;
    border: 1px solid var(--temple-border-light);
    border-radius: var(--temple-radius-xl);
    box-shadow: var(--temple-shadow);
    padding: 0.75rem;
}

@media (min-width: 992px) {
    .history-unified-panel {
        padding: 0;
    }
}

.history-empty-state {
    text-align: center;
    padding: 2rem 1.25rem;
    color: var(--temple-muted);
}

.history-empty-state__icon {
    font-size: 2.25rem;
    opacity: 0.45;
    display: block;
    margin-bottom: 0.65rem;
}

.history-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Mobile-first unified history grid */
.history-row-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-row-card {
    background: #fff;
    border: 1px solid rgba(6, 26, 49, 0.1);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    box-shadow: 0 2px 10px rgba(6, 26, 49, 0.05);
    border-left: 4px solid #64748b;
}

.history-row-card.is-puja {
    border-left-color: #1d4ed8;
}

.history-row-card.is-offering {
    border-left-color: #0088a8;
}

.history-row-card.is-donation {
    border-left-color: #d97706;
}

.history-row-card--total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(165deg, var(--brand-50), #fff);
    border-left-color: var(--brand-600);
}

.history-row-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.history-row-card__amount {
    font-size: 1rem;
    font-weight: 800;
    color: var(--temple-text);
}

.history-row-card__amount.is-positive {
    color: var(--brand-800);
}

.history-row-card__amount.is-due {
    color: #b91c1c;
    font-size: 1.05rem;
}

.history-money-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0.15rem 0 0.75rem;
}

.history-money-strip__item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.5rem 0.35rem;
    text-align: center;
}

.history-money-strip__item--due {
    background: #fef2f2;
}

.history-money-strip__label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.history-money-strip__value {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #334155;
}

.history-money-strip__value.is-paid {
    color: #15803d;
}

.history-money-strip__value.is-due {
    color: #b91c1c;
}

.history-grid__row--balance td {
    background: #fff8f8;
}

.pujari-balance-section .section-title {
    color: #9a3412;
}

.pujari-balance-section__panel {
    border: 1px solid rgba(185, 28, 28, 0.18) !important;
    background: linear-gradient(180deg, #fff7f7 0%, #fff 40%);
}

.history-row-card--balance-due {
    border-left-color: #dc2626;
    cursor: pointer;
    background: linear-gradient(180deg, #fff7f7 0%, #fff 48%);
}

.history-row-card--balance-due:active {
    transform: scale(0.995);
}

.history-row-card__actions .btn {
    min-height: 48px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 12px;
}

.history-row-card__total-label {
    font-weight: 700;
    color: var(--temple-text);
}

.history-row-card__title {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--temple-text);
    word-break: break-word;
}

.history-row-card__detail,
.history-row-card__user {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    color: var(--temple-muted);
    word-break: break-word;
}

.history-row-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
    margin: 0;
}

.history-row-card__fact {
    min-width: 0;
}

.history-row-card__fact--wide {
    grid-column: 1 / -1;
}

.history-row-card__fact dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.history-row-card__fact dd {
    margin: 0.12rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    word-break: break-word;
}

.history-row-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.history-row-card__actions {
    margin-top: 0.75rem;
}

.history-row-card__actions .btn {
    min-height: 48px;
    font-weight: 700;
}

.history-row-card__foot {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(6, 26, 49, 0.08);
}

.history-row-card__ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    word-break: break-all;
}

.history-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.history-type-badge.is-puja {
    background: #dbeafe;
    color: #1d4ed8;
}

.history-type-badge.is-offering {
    background: #cffafe;
    color: #0e7490;
}

.history-type-badge.is-donation {
    background: #ffedd5;
    color: #b45309;
}

.history-type-badge.is-cart {
    background: #e0e7ff;
    color: #3730a3;
}

.history-type-badge.is-other {
    background: #e2e8f0;
    color: #334155;
}

.history-row-card.is-cart {
    border-left: 3px solid #6366f1;
}

.history-grid-wrap {
    border-radius: var(--temple-radius-xl);
    overflow: auto;
    border: 1px solid var(--temple-border-light);
}

.history-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.history-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, var(--brand-50), var(--brand-100));
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--temple-text-soft);
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--temple-border-light);
}

.history-grid tbody td {
    vertical-align: top;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--temple-border-light);
    color: #334155;
}

.history-grid tbody tr:hover td {
    background: var(--brand-50);
}

.history-grid__title {
    font-weight: 700;
    color: var(--temple-text);
    min-width: 7rem;
}

.history-grid__user,
.history-grid__detail {
    font-size: 0.82rem;
    max-width: 8.5rem;
    word-break: break-word;
    white-space: nowrap;
    vertical-align: middle;
}

.history-grid__detail {
    max-width: 7rem;
}

.history-details-btn {
    width: 100%;
    min-height: 42px;
    margin: 0.15rem 0 0.55rem;
    border-radius: 12px;
    font-weight: 700;
    justify-content: center;
}

.history-details-btn-link {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: #0e7490 !important;
}

.history-details-backdrop {
    z-index: 10060 !important;
}

.history-details-dialog {
    margin: 0.75rem;
}

.history-details-content {
    border-radius: 18px;
    overflow: hidden;
}

.history-details-modal__eyebrow {
    margin: 0 0 0.15rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

.history-details-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(6, 26, 49, 0.06);
    font-size: 0.9rem;
}

.history-details-meta__label {
    color: #94a3b8;
    font-weight: 700;
    flex: 0 0 auto;
}

.history-details-meta__value {
    color: #334155;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.history-details-meta__value--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

.history-details-list-title {
    margin: 0.9rem 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    font-family: Manrope, Inter, system-ui, sans-serif;
}

.history-details-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.history-details-list li {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(6, 26, 49, 0.06);
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 767.98px) {
    .history-details-dialog.modal-fullscreen-md-down {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .history-details-dialog .modal-content {
        border-radius: 0;
        min-height: 100dvh;
    }
}

.history-grid__date {
    white-space: nowrap;
}

.history-grid__amount {
    white-space: nowrap;
}

.history-grid__foot td {
    background: var(--brand-50);
    border-bottom: none;
}

@media (max-width: 575.98px) {
    .history-row-card__facts {
        grid-template-columns: 1fr;
    }

    .history-row-card__fact--wide {
        grid-column: auto;
    }

    .history-empty-state__actions .btn {
        width: 100%;
    }
}

.history-page .table {
    margin-bottom: 0;
    border-radius: var(--temple-radius-xl);
    overflow: hidden;
    box-shadow: var(--temple-shadow);
    border: 1px solid var(--temple-border-light);
}

.history-page .table thead th {
    background: linear-gradient(180deg, var(--brand-50), var(--brand-100)) !important;
    font-weight: 700;
    color: var(--temple-text-soft);
    padding: 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-page .table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

.history-page .booking-card,
.history-page .donation-card {
    background: #fff;
    border-radius: var(--temple-radius-xl);
    box-shadow: var(--temple-shadow);
    border: 1px solid var(--temple-border-gold);
    padding: 1rem;
    margin-bottom: 1rem;
}

.history-page .donation-card .donation-amount,
.history-page .booking-card .booking-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-800);
}

.history-page .booking-card .booking-puja {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--temple-text);
}

.history-page .donation-card .donation-meta,
.history-page .booking-card .booking-meta {
    font-size: 0.875rem;
    color: var(--temple-muted);
    margin-top: 0.25rem;
}

.history-page .booking-card .booking-badges,
.history-page .donation-card .donation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--temple-border-light);
}

.history-filter-toolbar {
    background: linear-gradient(165deg, #fff 0%, var(--brand-50) 100%);
    border: 1px solid var(--temple-border-gold);
    border-radius: var(--temple-radius-xl);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--temple-shadow-sm);
}

.history-filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--temple-red-dark);
    margin: 0 0 0.9rem;
}

.history-filter-grid {
    display: grid;
    gap: 0.85rem;
    align-items: end;
}

@media (min-width: 768px) {
    .history-filter-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: 1rem;
    }

    .history-filter-grid--payment {
        grid-template-columns: minmax(0, 1.15fr);
    }
}

.history-filter-field--wide .form-select {
    min-height: 44px;
    border-radius: 10px;
}

.history-filter-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.history-filter-actions .btn {
    flex: 1;
    min-height: 44px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .history-filter-actions {
        width: auto;
    }

    .history-filter-actions .btn {
        flex: 0 0 auto;
        min-width: 7.5rem;
    }
}

.history-filter-hint {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--temple-muted);
}

.history-filter-error {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #dc3545;
}

@media (max-width: 767.98px) {
    .history-page .table-responsive {
        display: none;
    }
}

@media (min-width: 768px) {
    .history-page .booking-cards-mobile,
    .history-page .donation-cards-mobile {
        display: none;
    }
}

/* ── Empty states ── */
.theme-ayyappa .admin-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--temple-muted);
    background: linear-gradient(180deg, #fff, var(--brand-50));
    border-radius: var(--temple-radius-xl);
    border: 1px dashed var(--brand-300);
}

.theme-ayyappa .admin-empty-state i {
    font-size: 2rem;
    color: var(--brand-400);
    margin-bottom: 0.75rem;
    display: block;
}

/* ── Admin page banners (shared spacing) ── */
.admin-page-banner {
    margin-bottom: 1.25rem;
}

/* ── Notifications admin ── */
.notif-admin {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.notif-admin .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 1.5rem;
}

.notif-admin .kpi {
    background: linear-gradient(165deg, #fff 0%, var(--brand-50) 120%);
    border: 1px solid var(--temple-border-gold);
    border-radius: var(--temple-radius-xl);
    padding: 1rem;
    box-shadow: var(--temple-shadow-sm);
    text-align: center;
}

.notif-admin .kpi .val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--temple-red-dark);
}

.notif-admin .kpi .lbl {
    font-size: 0.75rem;
    color: var(--temple-muted);
    margin-top: 4px;
}

.notif-admin .card {
    margin-bottom: 1.25rem;
}

/* ── Users admin ── */
.users-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem 2rem;
}

.users-page .btn-sm {
    min-height: 36px;
    padding: 0.35rem 0.65rem;
}

.users-page .users-filter-bar {
    background: linear-gradient(165deg, #fff 0%, var(--brand-50) 100%);
    border-radius: var(--temple-radius-xl);
    box-shadow: var(--temple-shadow-sm);
    border: 1px solid var(--temple-border-gold);
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem;
}

.users-page .users-filter-meta {
    font-size: 0.875rem;
    color: var(--temple-muted);
}

.users-page .users-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .users-page .users-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }
}

.users-page .users-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.users-page .users-filter-field .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--temple-text-soft);
    margin-bottom: 0;
}

.users-page .users-filter-field .form-control,
.users-page .users-filter-field .form-select {
    display: block;
    width: 100%;
    min-height: 2.5rem;
}

.users-page .users-modal-backdrop {
    background-color: rgba(15, 23, 42, 0.45);
}

@media (max-width: 767.98px) {
    .users-page .btn-sm {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .users-page .table-responsive {
        display: none;
    }

    .users-page .user-card {
        background: #fff;
        border-radius: var(--temple-radius-xl);
        box-shadow: var(--temple-shadow);
        border: 1px solid var(--temple-border-gold);
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .users-page .user-card .user-email {
        font-weight: 600;
        color: var(--brand-700);
        word-break: break-all;
    }

    .users-page .user-card .user-meta {
        font-size: 0.875rem;
        color: var(--temple-muted);
        margin-top: 0.25rem;
    }

    .users-page .user-card .user-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--temple-border-light);
    }

    .users-page .user-card .user-actions .btn {
        flex: 1 1 auto;
        min-width: 80px;
    }
}

@media (min-width: 768px) {
    .users-page .user-cards-mobile {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .users-page .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .users-page .modal-footer .btn {
        min-height: 44px;
    }
}
