/* ═══════════════════════════════
       DESIGN TOKENS (design audit DS1)
   The one place for the site's colours. Use these variables, not hex values, in custom.css,
   app.css and component <style> blocks. Values are the colours the site already used, so
   nothing changes on screen.
     Brand       --primary-color (navy) and its hover, --secondary-color (sky), --tertiary-color
     Semantic    --color-success / -danger / -warning / -info are Bootstrap's own theme colours
                 (var(--bs-*)); the -strong shades are the darker ones used where white text or
                 small text needs at least 4.5:1 contrast
     Neutrals    text, surfaces (backgrounds) and borders, from Bootstrap's grey scale
     Tints       the soft background + icon colour pairs of the report and list stat cards
   Not tokens on purpose: email HTML (C# strings; mail clients ignore CSS variables) and the
   receipt markup and donation-receipt.css (the receipt window does not load this file).
   ═══════════════════════════════ */
:root {
    /* Brand */
    --primary-color: #06245B;
    --primary-rgb: 6, 36, 91; /* the navy as r, g, b for rgba(var(--primary-rgb), alpha) */
    --primary-color-hover: #294984;
    --secondary-color: #71C5F3;
    --tertiary-color: #E6F6FF;
    --light-color: #F8F8F8; /* the page background */
    --light-dark-color: #94A3B8;
    --white-color: #FFFFFF;
    --accent: var(--secondary-color);
    --accent-soft: rgba(113, 197, 243, .15);
    --accent-glow: rgba(113, 197, 243, .35);

    /* Semantic (Bootstrap's theme colours, so .btn-success, .text-danger etc. stay in step) */
    --color-success: var(--bs-success); /* #198754 */
    --color-success-strong: #157347;
    --color-danger: var(--bs-danger); /* #dc3545 */
    --color-danger-bright: #e60000;
    --color-danger-muted: #842029; /* Cancelled: dark, muted red (white text 9.5:1) */
    --color-danger-soft: var(--bs-danger-bg-subtle); /* Failed: light red, #f8d7da */
    --color-danger-soft-text: var(--bs-danger-text-emphasis); /* #58151c, 10:1 on the light red */
    --color-danger-soft-border: var(--bs-danger-border-subtle); /* #f1aeb5 */
    --color-warning: var(--bs-warning); /* #ffc107 */
    --color-info: var(--bs-info); /* #0dcaf0 */
    --color-info-strong: #0a58ca;
    --color-secondary: #6c757d; /* Bootstrap's grey (--bs-secondary) */
    --color-secondary-strong: #565e64; /* grey text at 4.5:1 or more on the page background */
    --color-secondary-stronger: #4d5154;
    --color-link-blue: #0d6efd; /* Bootstrap's blue: upload and selectable-card highlights */
    --color-selected: #3b5bdb; /* the selected donation package */

    /* Text */
    --text-color: #212529;
    --text-strong: #343a40;
    --text-subtle: #495057;
    --text-muted-color: var(--color-secondary);
    --text-placeholder: #5c636a;
    --text-slate: #64748b;
    --text-heading-dark: #0f172a;
    --text-navy-soft: #1d3b6b;
    --text-info-navy: #0b3c74; /* section headers and bank details */
    --text-on-dark: var(--white-color);

    /* Surfaces (backgrounds) */
    --surface: var(--white-color);
    --surface-light: #f8f9fa;
    --surface-muted: #f8fafc;
    --surface-subtle: #e9ecef;
    --surface-hover: #f0f4fb;
    --surface-selected: #eef2ff;
    --surface-info-soft: #f8fbff;
    --surface-placeholder: #eef1f5;
    --surface-app: #f5f6fa; /* behind the page (html) */

    /* Borders */
    --border-color: #dee2e6;
    --border-color-strong: #ced4da;
    --border-color-subtle: #e9ecef;
    --border-color-slate: #e2e8f0;
    --border-color-slate-soft: #f1f5f9;
    --border-color-soft: #4544441a;
    --border-color-topbar: #e8edf7;
    --border-color-info: #d6e6ff;

    /* Muted and disabled */
    --muted-color: var(--light-dark-color);
    --disabled-opacity: 0.75;

    /* Sizes */
    --row-action-size: 2rem; /* an icon button in a list's Actions column */

    /* Tints: stat card icon circles (background, icon) */
    --tint-info-bg: #dbeafe;
    --tint-info-fg: #2563eb;
    --tint-success-bg: #dcfce7;
    --tint-success-fg: #16a34a;
    --tint-warning-bg: #fef3c7;
    --tint-warning-fg: #d97706;
    --tint-danger-bg: #fee2e2;
    --tint-danger-fg: #dc2626;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-h: 64px;
    --text-muted-sb: rgba(255, 255, 255, .45);
    --text-sb: rgba(255, 255, 255, .82);
    --transition: 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════
       BREAKPOINTS (design audit DS2)
   Bootstrap's: sm 576px · md 768px · lg 992px · xl 1200px · xxl 1400px.
   Mobile first: base rules are for phones; "@media (min-width: …)" adds tablet and desktop.
   "@media (max-width: …98px)" (e.g. 767.98px) only for rules that apply below a breakpoint.
   ═══════════════════════════════ */

/* Fonts - Inter (variable: weights 100-900, optical size 14-32). WOFF2 files converted losslessly
   from the original TTFs (same glyphs and axes, about 60% smaller; design audit DS5). */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-VariableFont_opszwght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Italic-VariableFont_opszwght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* ======================================== Universal Classes Start======================================== */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
}

.bg-primary-custom {
    background-color: var(--primary-color);
}

.text-primary-custom {
    color: var(--primary-color);
}

.text-secondary-custom {
    color: var(--secondary-color);
}

.bg-soft-primary-custom {
    background-color: var(--tertiary-color);
}

.bg-secondary-custom {
    background-color: var(--secondary-color);
}

/* ========= Layout css ============ */
/* Public pages (MainLayout): the page is a column at least as tall as the window, and <main>
   takes any spare height, so the "What Makes Prabh Aasra Unique" band and the footer always end
   at the bottom of the window instead of leaving a blank area under the footer on short pages
   or tall/zoomed-out windows. Longer pages grow past it and scroll as usual. Same pattern as
   #main-wrapper / #content in the admin and donor layouts. dvh follows mobile address bars;
   browsers without it use the vh line. */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

    .page > main {
        flex: 1 0 auto;
    }

/* Main Content area: 10% side padding on phones, 6% from md (768px) up. */
.main-content {
    padding-left: 10%;
    padding-right: 10%;
}

@media (min-width: 768px) {
    .main-content {
        padding-left: 6%;
        padding-right: 6%;
    }
}

/****Right panel cards*****/
.right-cards {
    max-height: 300px;
    overflow-y: auto;
}

/***** Card Border Common******/
.card-border-soft {
    border: 1px solid var(--border-color-soft);
}

/******Text Classes*****/
.text-xs {
    font-size: .75rem;
}

.text-sm {
    font-size: .875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

/*******Custom Button********/
.btn-primary-custom {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 1px solid var(--primary-color);
    transition: all .2s ease-in-out;
    /* font weight: the button size (BUTTON SYSTEM below) */
}

    /* Hover */
    .btn-primary-custom:hover {
        background-color: var(--primary-color-hover);
        border-color: var(--primary-color-hover);
        color: var(--white-color);
    }

.bg-secondary-custom:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

/* Focus */
.btn-primary-custom:focus {
    border: .5px solid var(--primary-color);
}

/*******Custom Input Focus System***********/
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color-hover);
    box-shadow: 0 0 0 0;
    /* customize */
}

/* Optional: remove ugly blue outline */
.form-control:focus-visible,
.form-select:focus-visible {
    outline: none;
}

/* Country picker: the Global dropdown while a Global country is selected, styled like the
   selected country button (.btn-primary-custom), with a white arrow. The open list keeps
   its normal colours. */
.form-select.country-select-active {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    transition: all .2s ease-in-out;
}

.form-select.country-select-active:hover,
.form-select.country-select-active:focus {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}

.form-select.country-select-active:focus-visible {
    outline: 2px solid var(--primary-color-hover);
    outline-offset: 2px;
}

.form-select.country-select-active option {
    background-color: var(--white-color);
    color: var(--text-color);
}

/****Custom Scrollbar*******/
.scrollbar-custom {
    overflow: auto;
    scroll-behavior: smooth;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #94a3b899 transparent;
}

    /* Chrome, Edge, Safari */
    .scrollbar-custom::-webkit-scrollbar {
        width: 5px;
        height: 5px;
    }

    .scrollbar-custom::-webkit-scrollbar-track {
        background: transparent;
        margin: 4px;
        /* prevents edge sticking */
    }

    .scrollbar-custom::-webkit-scrollbar-thumb {
        background: #94a3b899;
        border-radius: 999px;
        border: 1px solid transparent;
        background-clip: padding-box;
        transition: background .2s ease;
    }

        .scrollbar-custom::-webkit-scrollbar-thumb:hover {
            background: #64748bcc;
        }

/* Apply hover ONLY when radio is NOT selected */
/*.btn-check:not(:checked)+.btn-primary-custom:hover {
  background-color: var(--primary-color-hover);
  border-color: var(--primary-color-hover);
  color: var(--white-color);
}*/

/* When selected → keep selected style even on hover */
/*.btn-check:checked+.btn-primary-custom:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
}*/

/* Pagination Custom Utils */
.custom-pagination-btn {
    color: var(--primary-color) !important;
    background-color: var(--white-color) !important;
    border-color: var(--border-color) !important;
    transition: all 0.2s ease-in-out;
}

    .custom-pagination-btn:hover {
        color: var(--white-color) !important;
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
    }

.page-item.active .custom-pagination-btn {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--white-color) !important;
}

.page-item.disabled .custom-pagination-btn {
    color: var(--light-dark-color) !important;
    pointer-events: none;
    background-color: var(--white-color) !important;
    border-color: var(--border-color) !important;
}

/* ======================================== Universal Classes End======================================== */

.top-15 {
    position: relative;
    top: -15px;
}

.campaign-card img {
    max-width: 100%;
    max-height: 100%;
}

/* Active tab card */
.nav-pills .nav-link.active.card {
    background-color: var(--tertiary-color);
    /* soft active bg */
    border: 2px solid var(--secondary-color) !important;
    /* primary border */
}

/* Active text */
.nav-pills .nav-link.active .fw-medium {
    color: var(--primary-color) !important;
}

/* Active icon */
.nav-pills .nav-link.active i {
    color: var(--primary-color) !important;
}

/* ============Button Tabs Start============= */
/* pill base */
.custom-pills .nav-link {
    position: relative;
    border: 1px solid var(--text-color);
    border-radius: 8px;
    padding: 8px 18px 8px 38px;
    font-size: 14px;
    color: var(--text-color);
    background-color: var(--light-color);
    transition: all 0.2s ease;
}

    /* radio outer circle */
    .custom-pills .nav-link::before {
        content: "";
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        border: 1px solid var(--text-color);
        border-radius: 50%;
        background: var(--white-color);
        color: var(--light-dark-color);
    }

    /* radio inner dot (hidden by default) */
    .custom-pills .nav-link::after {
        content: "";
        position: absolute;
        left: 18px;
        top: 50%;
        transform: translateY(-50%) scale(0);
        width: 6px;
        height: 6px;
        background: var(--primary-color);
        border-radius: 50%;
        transition: 0.2s ease;
    }

    /* active state */
    .custom-pills .nav-link.active {
        background-color: var(--primary-color);
        color: var(--white-color);
        border-color: var(--primary-color);
    }

        /* show inner dot when active */
        .custom-pills .nav-link.active::after {
            transform: translateY(-50%) scale(1);
        }

        /* active border color */
        .custom-pills .nav-link.active::before {
            border-color: var(--white-color);
        }

/* ============Button Ends============= */

.border-secondary-custom {
    border-color: var(--secondary-color) !important;
}

.img-card {
    height: 220px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface-light);
    padding: 4px; /* the picture's corners stay clear of the rounded edge */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    /* The whole picture, scaled down to fit (never up, never cropped). */
    .img-card img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

/* 🔥 overlay */
.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: all .3s ease;
}

/* hover effects (no zoom: it pushed the picture's edges out of the card) */
.img-card:hover .img-overlay {
    opacity: 1;
}

/* ========================== Campaign Gallery Lightbox ========================== */
.campaign-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

/* The full picture: square corners (rounding cut off the picture's own corners). */
.lightbox-img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    display: block;
    animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--white-color);
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--white-color);
    font-size: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    font-weight: 500;
    background: rgba(0,0,0,0.4);
    padding: 4px 16px;
    border-radius: 20px;
    z-index: 2;
}

.gallery-thumb {
    transition: box-shadow 0.2s ease;
}

.gallery-thumb:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* black overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
}

/* play button */
.play-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
}

.auth-container {
    max-width: 500px;
    width: 100%;
}

/* Table CSS */
.custom-table {
    min-width: 1300px;
}

    /* Large table */
    .custom-table.large {
        min-width: 1900px !important;
    }

    .custom-table th {
        background: var(--primary-color);
        color: var(--white-color);
    }

    .custom-table td {
        vertical-align: middle;
    }

/* Modal Table */
.modal-table {
    font-size: 14px;
    min-width: 700px;
}

    .modal-table th {
        background: var(--accent-soft);
        color: var(--primary-color);
        font-weight: 700;
    }

    .modal-table td {
        vertical-align: middle;
    }

        .modal-table th:first-child,
        .modal-table td:first-child {
            padding-left: 20px;
        }

.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

    .upload-box:hover {
        border-color: var(--color-link-blue);
        background-color: var(--surface-info-soft);
    }

.upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.preview-img {
    position: relative;
}

    .preview-img img {
        width: 100%;
        height: 100px;
        object-fit: contain;
        background: var(--surface-light);
        border-radius: 8px;
    }

.remove-btn1 {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
}

/* =======Benficiary css========= */
.selectable-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: 0.3s;
    cursor: pointer;
}

    .selectable-card:hover {
        border-color: var(--color-link-blue);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    /* Selected state */
    .selectable-card.active {
        border-color: var(--color-link-blue);
        background-color: #f0f7ff;
        box-shadow: 0 4px 16px rgba(13, 110, 253, 0.2);
    }

.beneficiary-cards-body {
    max-height: 470px;
    overflow-y: scroll;
}

/* Inhabitant photo beside the details: the whole photo in a 120px column, at most 160px
   tall; a small photo stays at its own size (scale-down) instead of being enlarged. */
.beneficiary-cards {
    width: 120px;
    height: auto;
    max-height: 160px;
    flex-shrink: 0;
    object-fit: scale-down;
    background: var(--surface-light);
}

/* ==========================================Admin========================================= */
/* ===========Sidebar=========== */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-color);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
    overflow: hidden;
}

/* Collapsed state (icon-only) */
body.sidebar-collapsed #sidebar {
    width: var(--sidebar-collapsed);
}

    body.sidebar-collapsed #sidebar .nav-label,
    body.sidebar-collapsed #sidebar .logo-text,
    body.sidebar-collapsed #sidebar .sidebar-section-title,
    body.sidebar-collapsed #sidebar .nav-badge {
        opacity: 0;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
    }

    body.sidebar-collapsed #sidebar .nav-link {
        justify-content: center;
        padding: 12px 0;
    }

        body.sidebar-collapsed #sidebar .nav-link .nav-icon {
            margin: 0;
        }

    body.sidebar-collapsed #sidebar .sidebar-section-title {
        height: 0;
        margin: 0;
        padding: 0;
    }

    body.sidebar-collapsed #sidebar .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
        display: none;
    }

/* Logo area — sticky */
.sidebar-logo {
    padding: 10px 10px 5px 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--primary-color);
    flex-shrink: 0;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    height: var(--topbar-h);
    text-decoration: none;
}

/* Scrollable nav area */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .12) transparent;
}

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

    .sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
    }

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

.sidebar-section-title {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--secondary-color);
    padding: 10px 22px 10px;
    transition: opacity var(--transition), height var(--transition), margin var(--transition), padding var(--transition);
}

.nav-item-wrap {
    padding: 1px 10px;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--text-sb);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), padding var(--transition);
    white-space: nowrap;
    position: relative;
}

    .admin-sidebar .nav-link:hover {
        background: rgba(255, 255, 255, .08);
        color: var(--white-color);
    }

    .admin-sidebar .nav-link.active {
        background: var(--accent-soft);
        color: var(--white-color);
        box-shadow: inset 3px 0 0 var(--accent);
    }

.nav-icon {
    font-size: 17px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    transition: margin var(--transition);
}

.nav-label {
    transition: opacity var(--transition), width var(--transition);
    flex: 1;
}

.nav-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--accent);
    color: var(--primary);
    border-radius: 20px;
    padding: 1px 7px;
    transition: opacity var(--transition);
}

.admin-sidebar .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
    font-size: 11px;
    transition: transform var(--transition);
    color: var(--text-muted-sb);
}

.admin-sidebar .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
    color: var(--accent);
}

.sub-menu {
    padding-left: 22px;
}

.admin-sidebar .sub-menu .nav-link {
    font-size: 12.5px;
    font-weight: 400;
    padding: 8px 12px;
    color: var(--text-muted-sb);
}

    .admin-sidebar .sub-menu .nav-link:hover {
        color: var(--white-color);
    }

    .admin-sidebar .sub-menu .nav-link.active {
        color: var(--accent);
        background: transparent;
        box-shadow: none;
    }

    .admin-sidebar .sub-menu .nav-link::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: currentColor;
        opacity: .5;
        flex-shrink: 0;
    }

    .admin-sidebar .sub-menu .nav-link.active::before {
        background: var(--accent);
        opacity: 1;
    }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: background var(--transition);
}

    .sidebar-user:hover {
        background: rgba(255, 255, 255, .08);
    }

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-info .name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--white-color);
}

.sidebar-user-info .role {
    font-size: 10.5px;
    color: var(--text-muted-sb);
}

body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .sidebar-user .bi-three-dots-vertical {
    display: none;
}

body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 8px;
}

body.sidebar-collapsed #sidebar:not(:hover) .nav-link .nav-label {
    display: none;
}
img.img-fluid.logo.nav-icon {
    width: 65px;
}
/*body.sidebar-collapsed #sidebar .sidebar-logo .logo-wrap .logo {
    display: none;
}*/

/* ========================== Collapse Sidebar StartTestingggggggg======================= ===== */

/* ========================== Collapse Sidebar Start======================= ===== */

body.sidebar-collapsed #sidebar:not(:hover) .collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
}

body.sidebar-collapsed #sidebar:not(:hover) .nav-item-wrap {
    position: relative;
}

    body.sidebar-collapsed #sidebar:not(:hover) .nav-item-wrap > .collapse {
        position: absolute;
        left: 100%;
        top: 0;
        min-width: 200px;
        background: var(--surface);
        border-radius: 10px;
        padding: 8px 0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(10px);
        transition: 0.2s ease;
        z-index: 9999;
    }

        /* Show submenu on hover (collapsed mode) */
body.sidebar-collapsed #sidebar:not(:hover) .nav-item-wrap:hover > .collapse,
body.sidebar-collapsed #sidebar:not(:hover) .nav-item-wrap > .collapse:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

/* 👉 When sidebar is hovered (expanded) */
body.sidebar-collapsed #sidebar:hover .collapse {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: transparent;
}

/* ========================Latest Sidebar collapsing hover============== */
/* ===== Hover Expand when collapsed ===== */
body.sidebar-collapsed #sidebar:hover {
  width: var(--sidebar-width);
}

/* Show hidden elements on hover */
body.sidebar-collapsed #sidebar:hover .nav-label,
body.sidebar-collapsed #sidebar:hover .logo-text,
body.sidebar-collapsed #sidebar:hover .sidebar-section-title,
body.sidebar-collapsed #sidebar:hover .nav-badge {
  opacity: 1;
  width: auto;
}

/* Fix alignment on hover */
body.sidebar-collapsed #sidebar:hover .nav-link {
  justify-content: flex-start;
  padding: 10px 12px;
}

body.sidebar-collapsed #sidebar:hover .nav-link .nav-icon {
  margin-right: 10px;
}

/* Restore logo alignment */
body.sidebar-collapsed #sidebar:hover .logo-wrap {
  justify-content: flex-start;
  padding: 0 20px;
}

/* Default (expanded) */
.logo-full {
  display: block;
  max-width: 200px;
}

.logo-icon {
  display: none;
  max-width: 60px;
}

/* When collapsed */
body.sidebar-collapsed #sidebar .logo-full {
  display: none;
}

body.sidebar-collapsed #sidebar .logo-icon {
  display: block;
}

/* Center icon logo */
body.sidebar-collapsed #sidebar .logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

/*========================================== Collapsed sidebar css end========================================== */

/* ========= OVERLAY (mobile)========== */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(var(--primary-rgb), .45);
    backdrop-filter: blur(2px);
    z-index: 1039;
}

body.sidebar-open #sidebar-overlay {
    display: block;
}

/* ===========MAIN WRAPPER========== */
#main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

body.sidebar-collapsed #main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

/* ═══════════════════════════════
       TOPBAR
    ═══════════════════════════════ */
#topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border-color-topbar);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    box-shadow: 0 1px 10px rgba(var(--primary-rgb), .06);
}

.topbar-toggle {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    border-radius: 9px;
    color: var(--primary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}

    .topbar-toggle:hover {
        background: var(--surface-hover);
    }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    border-radius: 9px;
    color: #4a5878;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

    .icon-btn:hover {
        background: var(--surface-hover);
        color: var(--primary);
    }

    .icon-btn .badge-dot {
        position: absolute;
        top: 7px;
        right: 7px;
        width: 8px;
        height: 8px;
        background: #e74c3c;
        border-radius: 50%;
        border: 2px solid var(--white-color);
    }

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 10px 4px 4px;
    border-radius: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition);
}

    .topbar-profile:hover {
        background: var(--surface-hover);
    }

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info {
    text-align: left;
}

    .profile-info .pname {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--primary);
        line-height: 1.2;
    }

    .profile-info .prole {
        font-size: 10.5px;
        color: #8a97b5;
    }

/* ═══════════════════════════════
       CONTENT AREA
    ═══════════════════════════════ */
#content {
    flex: 1;
    padding: 28px 28px 20px;
}

/* Tooltip on collapsed sidebar */
body.sidebar-collapsed #sidebar .admin-sidebar .nav-link {
    position: relative;
}

/* Selected state */
.btn-check:checked + .btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}

/* Focus state */
.btn-check:focus + .btn-primary-custom {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.donation-card {
    background: #f4f6f9;
    border-radius: 16px;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    position: relative;
}

    .donation-card:hover {
        transform: translateY(-3px);
    }

/* Donation package card image: the whole picture, scaled down to fit (never up, never
   cropped), with 4px padding so its corners stay clear of the rounded edge. */
.card-img {
    width: 100%;
    height: 160px;
    padding: 4px;
    background: var(--surface-light);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .card-img img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

.donation-card h6 {
    margin-top: 12px;
    font-weight: 600;
}

.donation-card p {
    margin: 0;
    font-weight: 600;
    color: var(--text-navy-soft);
}

    .donation-card p span {
        font-size: 12px;
        color: var(--color-secondary);
        font-weight: 500;
    }

/* Active Selected Card */
.donation-card.active {
    border: 2px solid var(--color-selected);
    background: var(--surface-selected);
}

/* Check Icon */
.check-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-selected);
    color: white;
    font-size: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999; /* force top layer */
}

.custom-hidden-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
/* =========Consent Form ============ */
.signature-box {
    height: 150px;
    border: 2px dashed #cfd8dc;
    border-radius: 10px;
    background: var(--surface-light);
}

    .signature-box canvas {
        width: 100%;
        height: 100%;
    }

.clear-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.img-desc-currentreq {
    height: 230px;
    object-fit: contain;
}

/*QuickGrid Custom CSS*/

/* Header background - all columns same dark blue */
.custom-table thead th {
    /*background-color: #1a2a4a !important;*/
    color: white !important;
}

    /* Inner div QuickGrid renders for column title */
    .custom-table thead th .col-title-text {
        color: white !important;
    }

    /* Sortable column button override */
    .custom-table thead th button {
        color: white !important;
        background: transparent !important;
        border: none !important;
    }

/* Person names have no length limit: in tables a long name wraps within its column instead
   of widening it (also in tables whose cells otherwise stay on one line). */
table th.name-cell,
table td.name-cell {
    white-space: normal !important;
    overflow-wrap: anywhere;
    min-width: 18rem;
    max-width: 22rem;
}

/* Hide empty rows: only the blank filler rows QuickGrid adds to fill a page (every cell
   empty). A data row with one empty cell (e.g. no receipt number yet) must stay visible. */
.custom-table tbody tr:not(:has(td:not(:empty))) {
    display: none !important;
}

button.btn.btn-primary-custom:active {
    background: var(--primary-color);
    color: white;
}

input:focus, button.btn.btn-primary-custom:focus, button, .btn, textarea {
    box-shadow: none !important;
}
/* Top Donate Through Buttons Starts */
.donate-btn {
    padding: 0px 14px;
    border: 1px solid #ddd;
    background-color: var(--surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .donate-btn:hover {
        background-color: #ebebeb;
        border-color: #ccc;
    }

    .donate-btn img {
        height: 36px;
        width: auto;
        object-fit: contain;
    }

.popover-container {
    position: relative;
    display: inline-block;
}

.popover-btn {
    border-radius: 5px;
}

.popover-content {
    visibility: hidden;
    width: 250px;
    background-color: var(--border-color);
    color: var(--white-color);
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    position: absolute;
    bottom: 125%; /* above button */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

    /* Arrow */
    .popover-content::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: var(--border-color) transparent transparent transparent;
    }

/* Show on hover */
.popover-container:hover .popover-content {
    visibility: visible;
    opacity: 1;
}

/*.package-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}*/

.legend-dot {
    height: 8px;
    width: 8px;
}

.gradient-blue {
    background: linear-gradient(90deg, #2f3e5c, #6c8fdc);
}

.gradient-purple {
    background: linear-gradient(90deg, #6a2c70, #c86dd7);
}

.gradient-green {
    background: linear-gradient(90deg, #2d5f57, #4fa585);
}

.gradient-indigo {
    background: linear-gradient(90deg, #2e2a7b, #4f7bd9);
}

.container-payment {
    text-align: center;
}
/*payment recipt error */

.error-circle {
    width: 160px;
    height: 160px;
    background: var(--color-danger-bright);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 90px;
    font-weight: bold;
    line-height: 1;
}

.message {
    font-size: 32px;
    color: #666;
    font-weight: 600;
}
/*payment recipt error  */

/*=======Sticky Action Column in list=========*/
.sticky-action {
    position: sticky;
    right: 0;
    background: var(--primary-color);
    z-index: 2;
    white-space: nowrap;
    box-shadow: -3px 0 6px rgba(0, 0, 0, 0.1);
}

thead .sticky-action {
    background: var(--primary-color);
    color: white;
    z-index: 5;
}

/* Row actions (every list's Actions column): one fixed slot per action, in the same order on
   every row. An action a row does not have leaves an empty slot (.row-action-empty: not
   focusable, hidden from screen readers), so the buttons after it do not shift. */
.row-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--row-action-size);
    gap: 0.375rem;
    align-items: center;
    justify-content: center;
}

    .row-actions > .btn,
    .row-actions > .row-action-empty {
        width: var(--row-action-size);
        height: var(--row-action-size);
        margin: 0;
        padding: 0;
    }

    .row-actions > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .row-actions > .row-action-empty {
        display: block;
        pointer-events: none;
    }

    /* A list whose rows show only the actions they have (donation list): the buttons sit
       together from the left, so the first one lines up on every row and no gap is left. */
    .row-actions.row-actions--packed {
        justify-content: start;
    }

/* =======================Media Queries======================= */

@media (max-width: 991.98px) {
    #main-wrapper,
    body.sidebar-collapsed #main-wrapper {
        margin-left: 0;
    }
    /* Hidden (mobile): off screen until opened; always full width (also if collapsed on desktop) */
    #sidebar,
    body.sidebar-collapsed #sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    body.sidebar-open #sidebar {
        transform: translateX(0);
    }

    #mainNavbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1050;
        background-color: var(--primary-color);
        padding: 12px 10%;
        box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.22);
    }

        #mainNavbar .navbar-nav {
            gap: 8px !important; /* over the nav's .gap-3 utility (!important) */
        }
}

@media (max-width: 767.98px) {
    .profile-info {
        display: none;
    }
}
/* Mobile */
@media (max-width: 575.98px) {
    .topbar-search {
        display: none;
    }
    #content {
        padding: 18px 14px;
    }
}

/* CSS Upadated by Gaurav on 01-05-2026 */
/* Campaign */
.campaign-card-donor {
    background: linear-gradient(135deg, #eef4ff, var(--surface));
}

/* Requirement */
.requirement-card-donor {
    background: linear-gradient(135deg, #e8fff3, var(--surface));
}

/* Sponsorship */
.sponsorship-card-donor {
    background: linear-gradient(135deg, #fff4e6, var(--surface));
}

/* Hover effect */
.card-donor {
    transition: 0.3s;
}

    .card-donor:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }
/* Added by Pratham for the toast (18/05/2026) */
/* The one global toast (GlobalToastComponent): below the top bar (the 64px admin/donor topbar,
   and the public navbar) so it never covers the navigation links. Stacked like Bootstrap's own
   toasts (1090): above modals (1055) so a message from a modal stays readable. */
.app-toast-container {
    top: calc(var(--topbar-h) + 12px);
    right: 0;
    z-index: 1090;
    max-width: 100%;
}
/*Dated 25052026*/

.custom-breadcrumb-link {
    color: var(--text-color);
    transition: 0.3 ease-in-out;
}

    .custom-breadcrumb-link:hover {
        color: var(--primary-color);
        font-weight: 600;
    }
    /*Added on 6th july for spinner for admin donation page*/
.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 25px;
}
/* Spinners: Bootstrap's own spinner (restored Bootstrap 5.3.8), at the slightly slower 0.85s the
   site has always used (Bootstrap's default is 0.75s). Bootstrap's 1.5s for reduced motion stays. */
.spinner-border {
    --bs-spinner-animation-speed: .85s;
}

@media (prefers-reduced-motion: reduce) {
    .spinner-border {
        --bs-spinner-animation-speed: 1.5s;
    }
}

/*Added July 7, 2026 By Arshpreet*/
.adv-search-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease, margin-bottom 0.3s ease;
    margin-bottom: 0;
}

.adv-search-panel--open {
    grid-template-rows: 1fr;
    margin-bottom: 1rem;
}

.adv-search-inner {
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 1px solid #dee2f5;
    border-radius: 0.5rem;
    padding: 0;
    transition: padding 0.3s ease;
}

.adv-search-panel--open .adv-search-inner {
    padding: 1.1rem 1.25rem;
}

.adv-toggle-btn {
    transition: all 0.2s ease;
}

.adv-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
/*Added on 22nd july (17:48)*/
/* ==========Inhabitant Admission Accordion============== */
.admission-accordion .accordion-item {
    border: 1px solid var(--border-color-soft);
    border-radius: 10px;
    overflow: hidden;
}

    .admission-accordion .accordion-item + .accordion-item {
        margin-top: 14px;
    }

.admission-accordion .accordion-button,
.admission-accordion .accordion-button:not(.collapsed) {
    background-color: var(--tertiary-color);
    color: var(--primary-color);
    font-weight: 700;
    padding: 14px 20px;
    box-shadow: none;
}

    .admission-accordion .accordion-button:focus {
        box-shadow: none;
        border-color: transparent;
    }

.admission-accordion .accordion-section-sub {
    color: var(--light-dark-color);
    font-weight: 400;
}

.admission-accordion .accordion-body {
    background-color: var(--white-color);
    padding: 20px;
}

/* ==========Monthly Expenditure Summary============== */
.expenditure-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .expenditure-row .expenditure-label {
        min-width: 150px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .expenditure-row .input-group {
        flex: 1;
    }

    .expenditure-row .remove-expenditure-item {
        flex-shrink: 0;
        line-height: 1;
    }
    /* Hide number input arrows */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }
  /* ------------------------------------------------------------------------------------------------- */

/* Card and detail images below: the whole picture, scaled down to fit its box (never up,
   never cropped or stretched), centred on a neutral background, with 4px padding so the
   picture's corners stay clear of the rounded edge. */

/* Requirement card image */
.requirement-card-image {
    width: 100%;
    height: 220px;
    padding: 4px;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--surface-light);
}

    .requirement-card-image img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

/* Requirement detail image */
.requirement-detail-image {
    width: 100%;
    padding: 4px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .requirement-detail-image img {
        display: block;
        max-width: 100%;
        max-height: 400px;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

/* Campaign detail media */
.media-frame {
    width: 100%;
    padding: 4px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .media-frame img {
        display: block;
        max-width: 100%;
        max-height: 450px;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

    .media-frame video {
        width: 100%;
        height: auto;
        max-height: 450px;
        display: block;
        object-fit: contain;
        object-position: center;
    }
/* Campaign card image */
.campaign-card-image {
    width: 100%;
    height: 160px;
    padding: 4px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .campaign-card-image img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

/* ================= UPLOADED IMAGES (shared) =================
   For uploaded pictures in admin forms, lists and modals. A frame gets its size from the
   page (inline width/height, or none to follow the picture); the picture inside is shown
   whole: scaled down to fit (never up), never cropped or stretched, centred on a neutral
   background where the shapes differ. */
.dms-img-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
    padding: 3px; /* the picture's corners stay clear of the rounded border */
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

    .dms-img-frame > img,
    img.dms-img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

    .dms-img-frame.dms-img-zoom {
        cursor: zoom-in;
    }

    /* Profile photos: a rounded square rather than a circle, which would cut off the
       photo's corners. */
    .dms-img-frame.dms-avatar {
        padding: 3px;
        border-radius: 10px;
    }

/* Pictures inside campaign content and requirement descriptions (from the editor, often
   with a fixed width and height): at most the column's width, and always in proportion. */
.dms-rich-text img {
    max-width: 100%;
    height: auto !important;
}
/* ================= OTP RESEND BUTTON ================= */

.resend-otp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 125px;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease-in-out;
}

    /* Disabled state */
    .resend-otp-btn:disabled,
    .resend-otp-btn.disabled {
        opacity: 0.75;
        cursor: not-allowed;
        pointer-events: none;
    }

/* Normal resend content */
.resend-otp-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loading content */
.resend-otp-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* ================= MAIN OTP SUBMIT BUTTON ================= */

#submitBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    position: relative;
    transition: opacity 0.2s ease-in-out;
}

/* Normal content: icon + button text */
.submit-normal-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loading content */
.submit-loading-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* ================= CUSTOM SPINNER ANIMATION ================= */

@keyframes otp-spinner-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Apply animation to both OTP spinners */
#submitBtn .spinner-border,
.resend-otp-btn .spinner-border {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    vertical-align: -0.125em;
    border: 0.12em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: otp-spinner-rotate 0.7s linear infinite;
}

/* Resend spinner size */
.resend-otp-loading .spinner-border {
    width: 0.85rem;
    height: 0.85rem;
}

/* Prevent interaction while submitting */
#submitBtn.disabled,
#submitBtn:disabled,
.resend-otp-btn.disabled,
.resend-otp-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================= FOOTER CREDIT =================
   "Drish Infotech Ltd." in the footer: a link in the surrounding text's colour, size and
   weight, underlined; on hover it darkens and stays underlined. */
.footer-credit-link {
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

    .footer-credit-link:hover,
    .footer-credit-link:focus-visible {
        color: var(--primary-color);
        text-decoration: underline;
    }

/* Monetary donation form, "Other amount" (DonationDetailComponent): the full width of the card
   on phones (with w-auto its natural width overflowed the card at 430 px and below); from md a
   fixed width and the larger text (fs-5) as before. */
.other-amount-field {
    flex: 1 1 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .other-amount-field {
        flex: 0 1 18rem;
    }

    .other-amount-field .other-amount-input {
        font-size: 1.25rem;
    }
}

/* Design audit D3: the public top bar (NavMenu) marks the page's own link (DonationViewNavLink),
   in the weight Home used to have on every page. */
#mainNavbar .nav-link.active {
    font-weight: 600;
}

/* Design audit D4: the payment result card's buttons show keyboard focus (the rule above that
   removes .btn box-shadows also removes Bootstrap's focus ring). */
.payment-result-card .btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Design audit D6: login form (LoginFormUI). Sign-in options: equal width and height, the icon
   beside the label on one line. */
.login-method-tabs > .btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    white-space: nowrap;
}

/* Country and mobile number: stacked, full width, below sm (the country name and dialing code and
   the placeholder were cut off side by side at 390px); one joined row from sm. */
@media (max-width: 575.98px) {
    .login-phone-group {
        flex-direction: column;
        gap: 0.5rem;
    }

        .login-phone-group > .form-select,
        .login-phone-group > .form-control {
            width: 100% !important;
            margin-left: 0 !important;
            border-radius: var(--bs-border-radius) !important;
        }
}

@media (min-width: 576px) {
    .login-phone-group > .form-select {
        max-width: 50%;
    }
}

/* ═══════════════════════════════
       BUTTON SYSTEM (design audit D12)
   Four kinds, on the classes the app already uses:
     Primary     .btn-primary-custom   navy: standard actions (save, edit, sign in)
     Success CTA .btn-success          green: donation and payment calls to action
     Secondary   .btn-outline-secondary  cancel, back, less important actions
     Danger      .btn-danger           delete, remove, destructive actions
   Three sizes, set through Bootstrap's own button variables (so utilities such as px-4 or
   rounded-pill on a button still win):
     .btn-sm  31px · 0.875rem · 500 · 0.375rem radius
     .btn     38px · 1rem     · 500 · 0.5rem radius
     .btn-lg  44px · 1rem     · 600 · 0.5rem radius (the main action of a form or page)
   ═══════════════════════════════ */
.btn {
    --bs-btn-font-weight: 500;
    --bs-btn-border-radius: 0.5rem;
}

.btn-sm {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-border-radius: 0.375rem;
}

.btn-lg {
    --bs-btn-padding-y: 0.5625rem;
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-font-size: 1rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: 0.5rem;
}

/* Secondary (and D11): Bootstrap's grey text (#6c757d) is 4.42:1 on this site's #f8f8f8 page
   background; #565e64 is 6.2:1 there and 6.9:1 on white. Hover/active fill the same darker grey
   under white text (6.9:1). */
.btn-outline-secondary {
    --bs-btn-color: var(--color-secondary-strong);
    --bs-btn-border-color: var(--color-secondary);
    --bs-btn-hover-bg: var(--color-secondary-strong);
    --bs-btn-hover-border-color: var(--color-secondary-strong);
    --bs-btn-active-bg: var(--color-secondary-stronger);
    --bs-btn-active-border-color: var(--color-secondary-stronger);
    --bs-btn-disabled-color: var(--color-secondary-strong);
    --bs-btn-disabled-border-color: var(--color-secondary);
}

/* Design audit D9: frequency and amount choices. 16px like the form's inputs, one height
   (38px), one radius. Below xl they sit in an even grid (--choice-cols columns on phones,
   --choice-cols-sm from 576px), so no option ends up alone on a row because of its width;
   below 360px the frequencies take two columns with One-Time across the top. */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .choice-group > .btn {
        --bs-btn-padding-x: 1.5rem;
        --bs-btn-font-size: 1rem;
        --bs-btn-font-weight: 500;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

@media (max-width: 1199.98px) {
    .choice-group {
        display: grid;
        grid-template-columns: repeat(var(--choice-cols-sm, 5), minmax(0, 1fr));
        width: 100%;
    }

    .choice-group-amounts {
        --choice-cols-sm: 4;
    }

        .choice-group > .btn {
            --bs-btn-padding-x: 0.25rem;
            min-width: 0;
        }
}

@media (max-width: 575.98px) {
    .choice-group {
        grid-template-columns: repeat(var(--choice-cols, 3), minmax(0, 1fr));
    }
}

@media (max-width: 359.98px) {
    .choice-group-frequency {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .choice-group-frequency > label.btn:first-of-type {
            grid-column: 1 / -1;
        }
}

/* Beside the Other amount box (taller from md, D2) the amounts keep their own height. */
.choice-group-amounts {
    align-items: center;
}

/* Design audit D10: the placeholder in a campaign or requirement card's picture frame when the
   picture is missing or does not load (CardImage). It fills the frame, so the card keeps its
   size. #5c636a on #eef1f5 is 5.4:1. */
.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 6px;
    background: var(--surface-placeholder);
    color: var(--text-placeholder);
    font-size: 0.875rem;
}

    .card-image-placeholder .bi {
        font-size: 2rem;
        line-height: 1;
    }

.card-image-placeholder[hidden],
.campaign-card-image img[hidden],
.requirement-card-image img[hidden] {
    display: none !important;
}

/* Design audit D13: below md the Current Requirements filters start closed behind a Filters
   button (REQRFilterComponent); hidden filters keep their values. Desktop is unchanged. */
@media (max-width: 767.98px) {
    .reqr-filter-body:not(.is-open) {
        display: none;
    }
}

/* Design audit D14: the donation forms' consent boxes, 16px labels and the same spacing. */
.consent-check,
.sms-consent-field > .form-check {
    margin-bottom: 0.5rem;
}

    .consent-check .form-check-label,
    .sms-consent-field .form-check-label {
        font-size: 1rem;
    }

/* ═══════════════════════════════
       DESIGN AUDIT S1-S5
   ═══════════════════════════════ */

/* S1: StatusBadge (Components/Shared/StatusBadge.razor), the same colours on every page.
   Darker shades of Bootstrap's green/red/blue so white badge text is at least 4.5:1
   (#157347 5.9:1, #0a58ca 6.2:1); Pending is dark text on yellow (11.6:1).
   Cancelled and Failed are two reds told apart at a glance: Cancelled a dark, muted red with
   white text (9.5:1), Failed a light red with dark red text (10:1) and a red outline.
   A cancelled receipt stays grey with a dashed outline (the receipt, not the payment). */
.status-badge {
    border: 1px solid transparent;
    font-weight: 600;
}

.status-badge--success {
    background-color: var(--color-success-strong);
    color: var(--white-color);
}

.status-badge--pending {
    background-color: var(--color-warning);
    color: var(--text-color);
}

.status-badge--failed {
    background-color: var(--color-danger-soft);
    color: var(--color-danger-soft-text);
    border-color: var(--color-danger-soft-border);
}

.status-badge--cancelled {
    background-color: var(--color-danger-muted);
    color: var(--white-color);
}

.status-badge--cancelled-receipt {
    background-color: var(--surface-subtle);
    color: var(--text-strong);
    border-color: var(--color-secondary);
    border-style: dashed;
}

/* Manage Subscriptions, Action column: a subscription that can no longer be cancelled shows its
   state as a disabled button in the badge's red (the tooltip is on the wrapper: a disabled button
   gets no pointer events). --disabled-opacity keeps the text at 5:1 or more. */
.subscription-state {
    display: inline-block;
    cursor: not-allowed;
}

    .subscription-state .btn:disabled {
        opacity: var(--disabled-opacity);
    }

.subscription-state--cancelled .btn {
    background-color: var(--color-danger-muted);
    border-color: var(--color-danger-muted);
    color: var(--white-color);
}

.subscription-state--failed .btn {
    background-color: var(--color-danger-soft);
    border-color: var(--color-danger-soft-border);
    color: var(--color-danger-soft-text);
}

.status-badge--corrected {
    background-color: var(--color-info-strong);
    color: var(--white-color);
}

.status-badge--other {
    background-color: var(--surface-light);
    color: var(--text-strong);
    border-color: var(--border-color-strong);
}

/* User roles (RoleBadge.razor): one light tint per role, dark text of the same hue (7:1 or
   more on its tint; shades chosen so no two roles look alike), a faint border in the text
   colour. Same size as every other badge. */
.role-badge {
    background-color: var(--role-bg);
    color: var(--role-fg);
    border: 1px solid color-mix(in srgb, var(--role-fg) 25%, transparent);
    font-weight: 600;
}

.role-badge--admin { --role-bg: #ffe4e6; --role-fg: #881337; }
.role-badge--project-manager { --role-bg: #dbeafe; --role-fg: #0c4a6e; }
.role-badge--accountant { --role-bg: #dcfce7; --role-fg: #14532d; }
.role-badge--operator { --role-bg: #f3e8ff; --role-fg: #6b21a8; }
.role-badge--usa-project-manager { --role-bg: #a5f3fc; --role-fg: #134e4a; }
.role-badge--canada-project-manager { --role-bg: #ffedd5; --role-fg: #7c2d12; }
.role-badge--usa-operator { --role-bg: #c7d2fe; --role-fg: #312e81; }
.role-badge--canada-operator { --role-bg: #fef08a; --role-fg: #78350f; }
.role-badge--usa-canada-admin { --role-bg: #f5d0fe; --role-fg: #701a75; }
.role-badge--other { --role-bg: #f1f5f9; --role-fg: #334155; }

/* S2: every ValidationMessage. Doubled class so it also wins over app.css's
   .validation-message colour (loaded later). #dc3545 on white is 4.5:1. */
.invalid-feedback-style.invalid-feedback-style {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-danger);
    text-align: start;
    overflow-wrap: anywhere;
}

/* S3: modals. Navy header (bg-primary-custom) as standard, red (bg-danger) only for a
   destructive confirmation; one header padding, one title style, a white close button on both. */
.modal {
    --bs-modal-header-padding: 1rem 1.25rem;
}

.modal-header .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.modal-header.bg-primary-custom .btn-close,
.modal-header.bg-danger .btn-close {
    --bs-btn-close-filter: invert(1) grayscale(100%) brightness(200%);
    --bs-btn-close-opacity: 0.85;
}

/* S4: wide admin lists. Secondary columns (col-from-*) are hidden below that width unless the
   list shows all columns (ResponsiveColumnsToggle adds .show-all-cols). At 1400px and wider
   every column shows, as before. */
@media (max-width: 767.98px) {
    .responsive-cols:not(.show-all-cols) .col-from-md {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .responsive-cols:not(.show-all-cols) .col-from-lg {
        display: none;
    }
}

@media (max-width: 1399.98px) {
    .responsive-cols:not(.show-all-cols) .col-from-xxl {
        display: none;
    }
}

/* While columns are hidden, the lists' fixed minimum widths (.custom-table 1300px, .large 1900px,
   the pages' own .donation-list-table / .subscription-list-table 1800px) no longer apply, so the
   remaining columns fit the screen instead of scrolling sideways. Doubled classes outrank the
   pages' !important rules. */
@media (max-width: 1399.98px) {
    .responsive-cols.responsive-cols:not(.show-all-cols) table,
    .responsive-cols.responsive-cols:not(.show-all-cols) .custom-table {
        min-width: 0 !important;
    }
}

/* Phones: narrower cell padding (the pages set 1.5rem) so the kept columns need less room. */
@media (max-width: 767.98px) {
    .responsive-cols.responsive-cols:not(.show-all-cols) table th,
    .responsive-cols.responsive-cols:not(.show-all-cols) table td {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* S4: the donor's donation history below md: each grid row is a card (same rows, sorting,
   pages and buttons). Labels come from the cells' lbl-* classes. */
@media (max-width: 767.98px) {
    table.stacked-table.stacked-table {
        min-width: 0 !important;
    }

    .stacked-table thead {
        display: none;
    }

    .stacked-table,
    .stacked-table tbody,
    .stacked-table tr {
        display: block;
        width: 100%;
    }

        .stacked-table tbody tr {
            margin-bottom: 0.75rem;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            background: var(--surface);
        }

        .stacked-table td {
            display: block;
            padding: 0.25rem 0;
            border: 0;
        }

        table.stacked-table.stacked-table td,
        .stacked-table td .badge {
            white-space: normal !important;
        }

        .stacked-table td.stack-hide {
            display: none;
        }

        .stacked-table td.stack-title {
            padding-bottom: 0.5rem;
            margin-bottom: 0.25rem;
            border-bottom: 1px solid var(--border-color-subtle);
            font-weight: 600;
            color: var(--primary-color);
        }

        .stacked-table td.stack-cell {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            text-align: end;
        }

            .stacked-table td.stack-cell::before {
                color: var(--text-subtle);
                font-weight: 500;
                text-align: start;
            }

        .stacked-table td.stack-actions > div {
            justify-content: flex-start !important;
            padding-top: 0.5rem;
        }

    .stacked-table .lbl-donated-on::before { content: "Donated On"; }
    .stacked-table .lbl-amount::before { content: "Amount"; }
    .stacked-table .lbl-source::before { content: "Source"; }
    .stacked-table .lbl-donation-type::before { content: "Donation Type"; }
    .stacked-table .lbl-payment-type::before { content: "Payment Type"; }
    .stacked-table .lbl-frequency::before { content: "Frequency"; }
    .stacked-table .lbl-status::before { content: "Status"; }
}

/* ═══════════════════════════════
       LIST PAGES (design audit DS2/DS4)
   Moved from identical <style> blocks in All Donations, Donation History, Manage Subscriptions
   (admin and donor) and Leads; the Leads page keeps only its own rules.
   The !important on the list tables is kept: these widths and paddings are meant to win over
   Bootstrap's and QuickGrid's table rules (the S4 rules above still win through specificity).
   ═══════════════════════════════ */
.donation-list-table {
    min-width: 1800px !important;
}

    .donation-list-table th,
    .donation-list-table td {
        white-space: nowrap !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

.address-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subscription-list-table {
    min-width: 2000px !important;
}

    .subscription-list-table th,
    .subscription-list-table td {
        white-space: nowrap !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

.table-date {
    min-width: 120px;
    white-space: normal;
    line-height: 1.3;
}

.table-id {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-status {
    font-size: 11px;
    padding: 6px 8px;
}

/* Summary bar under the list filters */
.summary-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-color-slate);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-top: 1rem;
}

.summary-bar__cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    flex: 1 1 auto;
    white-space: nowrap;
    background: var(--surface-muted);
    border-radius: 0.5rem;
    margin: 0.25rem;
    border: 1px solid var(--border-color-slate-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .summary-bar__cell:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        background: var(--surface);
        border-color: var(--border-color-slate);
    }

.summary-bar__divider {
    display: none;
}

.summary-bar__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.summary-bar__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-slate);
    margin-right: 0.25rem;
}

.summary-bar__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading-dark);
}

.summary-bar__sub {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.7;
}

/* List toolbar: search box with its icon inside on the right, and the page-size select */
.search-box {
    width: 240px;
}

.search-box-input {
    padding-right: 35px;
}

.search-box-icon {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: .85rem;
}

/* An icon inside the right end of a text field (position-absolute on the icon) */
.input-icon-end {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.page-size-select {
    width: 90px;
}

/* ListPager (Components/Shared/ListPager.razor): "Showing 11–20 of 57 · Page 2 of 6" on one
   line from 768px; on phones the page is on its own line, without the dot. */
.list-pager-page {
    display: block;
    color: var(--color-secondary-strong);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .list-pager-page {
        display: inline;
    }

        .list-pager-page::before {
            content: "·";
            margin: 0 0.5rem;
        }
}

/* Stat cards (reports and list summaries): card surface, label, and the tinted icon circle */
.bg-surface {
    background: var(--surface);
}

.bg-surface-muted {
    background: var(--surface-muted);
}

.stat-label {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}

.stat-icon--info {
    background: var(--tint-info-bg);
    color: var(--tint-info-fg);
}

.stat-icon--success {
    background: var(--tint-success-bg);
    color: var(--tint-success-fg);
}

.stat-icon--warning {
    background: var(--tint-warning-bg);
    color: var(--tint-warning-fg);
}

.stat-icon--danger {
    background: var(--tint-danger-bg);
    color: var(--tint-danger-fg);
}

/* Small utilities */
.cursor-pointer {
    cursor: pointer;
}

.dropdown-menu-scroll {
    max-height: 300px;
    overflow: auto;
}

/* Dashboard icons drawn in the brand navy (SVG paths) */
.fill-primary {
    fill: var(--primary-color);
}

.stroke-primary {
    stroke: var(--primary-color);
}
