﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1SiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJyYW5zbGF0ZSgtMjM1IC01MSkiPjxwYXRoIGQ9Ik0yNjMuNTA6IDUxQzI26NC4yMTcgNTAgMjY1LjgxMyA1MS40ODM3IDI2Ni42MDYgNTIuMjY1OExyZW5kLmNovzU2LjAwOCA1Mi43OTg3IDI2Ny41Mfk1Mzg0IDU0Ljg2NjIgOTNbQzIzNy45NjMgOTkgMjM2IDk3LjA6NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTNbMTEuMDcwMyAyMzMuMjQgMjYyLjI5NiA1MSAyNjMuNTA6IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2IDY2LjAxODSaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI26My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny43ODcgdD41LjU3NiAwIE0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2IDY2LjAxODSaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI26My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny43ODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}
.pmjay-header {
    width: 100%;
    background: linear-gradient(90deg, #f8fbff, #eef6ff);
    border-left: 4px solid #0d6efd;
    border-right: 4px solid #0d6efd;
    border-radius: 10px;
    padding: 10px 16px; /* reduced padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    height: 72px; /* fixed header height for consistent layout */
    box-shadow: 0 2px 6px rgba(0,0,0,0.06)!important;
    flex-wrap: nowrap; /* keep all items in one row */
}

/* Logos */
.gov-logo {
    width: 56px; /* smaller consistent logo */
    height: 56px;
    object-fit: contain;
}

/* Center Title */
.pmjay-header .pmjay-title {
    font-size: 1.80rem; /* reduced title size */
    font-weight: 700;
    color: #0d6efd;
    text-align: center;
    margin: 0 8px;
    line-height: 1.1;
}

.pmjay-header .fs-6 {
    font-size: 0.95rem!important; /* slightly smaller */
    font-weight: 600;
    color: #6c757d;
    text-align: center;
}

/* ============================ */
/* Tablet / Small Screens       */
/* ============================ */
@media (max-width: 768px) {
    .pmjay-header {
        padding: 8px 10px;
        height: 70px;
    }

    .gov-logo {
        width: 48px;
        height: 48px;
    }

    .pmjay-header .pmjay-title {
        margin-top: 1.5rem;
        font-size: clamp(0.8rem, 4vw, 0.2rem) !important;
    }

    .pmjay-header .fs-6 {
        font-size: clamp(0.65rem, 3vw, 0.8rem)!important;
    }

    .pmjay-header-spacer {
        height: 48px!important; /* header height remains consistent */
    }
}

/* ============================ */
/* Mobile / Very Small Screens  */
/* ============================ */
@media (max-width: 480px) {
    .pmjay-header {
        padding: 6px 8px;
        flex-wrap: nowrap; /* keep items in one row */
        height: 64px;
    }

    .gov-logo {
        width: 40px;
        height: 40px;
    }

    .pmjay-header .pmjay-title {
        margin-top: 50px;
        font-size: clamp(0.5rem, 4vw, 0.50rem) !important;
    }

    .pmjay-header .fs-6 {
        font-size: clamp(0.4rem, 3vw, 0.30rem) !important;
        margin-bottom: 40px;
    }

    .pmjay-header-spacer {
        height: 32px!important; /* matches mobile header height */
    }
}

/* Spacer to offset fixed header so page content isn't hidden under the fixed header */
.pmjay-header-spacer {
    height: 35px; /* default header height */
  
}

.pmjay-table-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08)!important;
    background: #fff;
}

/* Table Base */
.pmjay-table {
    font-family: 'Inter', 'Noto Sans Devanagari', sans-serif;
    font-size: 13.5px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    /* Sticky Table Header */
    .pmjay-table thead {
        background: #f4f7fb;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    /* Table Header Cells */
    .pmjay-table th {
        padding: 12px 14px;
        color: #1f2937;
        border-bottom: 2px solid #e5e7eb;
        white-space: nowrap;
        text-align: center;
        font-weight: 600;
    }

    /* Table Body Cells */
    .pmjay-table td {
        padding: 10px 14px;
        color: #374151;
        max-width: 220px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    /* Table Rows Hover */
    .pmjay-table tbody tr {
        transition: background-color 0.2s ease, transform 0.2s ease;
    }

        .pmjay-table tbody tr:hover {
            background-color: #f9fafb;
            transform: translateY(-1px);
        }

    /* Status Highlight (approved, pending, etc.) */
    .pmjay-table td:has(.status-approved) {
        color: #198754; /* green */
        font-weight: 600;
    }

    .pmjay-table td:has(.status-pending) {
        color: #ffc107; /* yellow */
        font-weight: 600;
    }

    .pmjay-table td:has(.status-rejected) {
        color: #dc3545; /* red */
        font-weight: 600;
    }

    /* KYC Badge */
.kyc-badge {
    background: #ffc107;
    color: #212529;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

    .kyc-badge:hover {
        background: #e0a800;
        transform: translateY(-2px);
    }

    /* ------------------------------- */
    /* Pagination Buttons              */
    /* ------------------------------- */
    .d-flex.justify-content-center .btn {
        border-radius: 50px;
        padding: 6px 14px;
        font-weight: 600;
        font-size: 0.85rem;
        transition: all 0.3s;
        background: #f1f5ff;
        color: #0d6efd;
        border: 1px solid #0d6efd;
    }

        .d-flex.justify-content-center .btn:hover {
            background: #0d6efd;
            color: #fff;
            box-shadow: 0 6px 15px rgba(0,0,0,0.15);
            transform: translateY(-2px);
        }

    .d-flex.justify-content-center span {
        font-weight: 600;
        margin: 0 12px;
        font-size: 0.9rem;
        color: #495057;
    }

    /* ------------------------------- */
    /* Responsive Adjustments          */
    /* ------------------------------- */
    @media (max-width: 768px) {
        .pmjay-table th,
        .pmjay-table td {
            font-size: 12px;
            padding: 8px 6px;
        }

        .d-flex.justify-content-center .btn {
            padding: 5px 10px;
            font-size: 0.75rem;
        }
    }

    @media (max-width: 480px) {
        .pmjay-table th,
        .pmjay-table td {
            font-size: 11px;
            padding: 6px 4px;
        }

        .d-flex.justify-content-center .btn {
            padding: 4px 8px;
            font-size: 0.7rem;
        }
    }
    .loading-overlay {
        position: fixed;
        inset: 0;
        background: rgba(255,255,255,0.6);
        backdrop-filter: blur(3px);
        z-index: 999;
    }

    .pmjay-filter-card {
        border-radius: 12px;
        background: #fdfefe;
    }

    .pmjay-input {
        font-family: 'Inter', 'Noto Sans Devanagari', sans-serif;
        font-size: 13.5px;
        border-radius: 8px;
    }

        .pmjay-input:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 0.15rem rgba(13,110,253,.15);
        }

    .pmjay-filter-card .form-label {
        font-size: 13px;
        color: #374151;
    }

    .pmjay-btn {
        font-size: 13.5px;
        border-radius: 8px;
        padding: 8px 12px;
    }

    .pmjay-filter-card small {
        font-size: 11.5px;
    }

    .gov-disclaimer {
        position: relative;
    }

        .gov-disclaimer .card {
            background: #fff4f4;
            border-left: 5px solid #dc3545;
        }

        .gov-disclaimer p {
            font-family: 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
            line-height: 1.5;
        }

    body {
        font-family: 'Segoe UI', 'Noto Sans Devanagari', 'Mangal', sans-serif;
    }
    body {
        font-family: 'Segoe UI', 'Noto Sans Devanagari', 'Mangal', sans-serif;
    }
    #custom-loader {
        position: fixed;
        inset: 0;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .loading-overlay {
        position: fixed;
        inset: 0;
        background: rgba(255, 255, 255, 0.95);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .loader-card {
        background: #ffffff;
        border-radius: 14px;
        padding: 28px 32px;
        width: 340px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        animation: fadeIn 0.4s ease-in-out;
    }

    /* Chakra style loader */
    .chakra-spin {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        border: 4px solid #e9ecef;
        border-top-color: #0d6efd;
        animation: spin 1s linear infinite;
        margin: auto;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .kyc-badge {
        background-color: #ffc107; /* Bootstrap warning color */
        color: #212529; /* Text color inside badge */
        padding: 0.35em 0.65em; /* Badge padding */
        border-radius: 0.5rem; /* Rounded corners */
        font-size: 0.875rem; /* Slightly smaller text */
        text-decoration: none; /* Remove underline */
        display: inline-block; /* Make it behave like badge */
        cursor: pointer; /* Pointer on hover */
        transition: background-color 0.2s;
    }

        .kyc-badge:hover {
            background-color: #e0a800; /* Slightly darker on hover */
            color: #212529;
            text-decoration: none;
        }

    /* Table header styling */
    .pmjay-table th {
        background-color: #f8f9fa; /* Light gray background */
        color: #495057; /* Dark text */
        font-weight: 600; /* Bold text */
        text-align: left; /* Left-aligned */
        padding: 0.75rem 0.5rem; /* Adjust padding */
        border-bottom: 2px solid #dee2e6; /* Bottom border */
    }

    /* Enhanced table theme */
    .table.table-sm {
        background: linear-gradient(180deg,#ffffff,#fbfdff);
        border: 1px solid rgba(33,37,41,0.06);
        border-radius: 10px;
        overflow: hidden;
    }

    .table.table-sm thead th {
        background: linear-gradient(90deg,#f1f6ff,#ffffff);
        color: #0b3560;
        border-bottom: 1px solid rgba(13,110,253,0.08);
        text-align: left;
        padding: 12px 14px;
    }

    .table.table-sm tbody td { padding: 10px 14px; vertical-align: middle; }

    /* Zebra rows */
    .table.table-sm tbody tr:nth-child(even) { background: #fbfdff; }
    .table.table-sm tbody tr:nth-child(odd) { background: #ffffff; }

    /* Subtle hover */
    .table.table-sm tbody tr:hover td { background: linear-gradient(90deg,#f7fbff,#ffffff); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,110,253,0.04); }

    /* Percent badge styling for highlighted cells */
    .pct-badge, .pmjay-pct {
        display: inline-block;
        min-width: 56px;
        padding: 4px 8px;
        border-radius: 999px;
        font-weight: 700;
        text-align: center;
    }
    .pct-badge.success { background: rgba(25,135,84,0.12); color: #198754; }
    .pct-badge.warn { background: rgba(255,193,7,0.12); color: #856404; }
    .pct-badge.danger { background: rgba(220,53,69,0.08); color: #c82333; }

    /* Verified count badge */
    .verified-count {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 8px;
        background: linear-gradient(90deg,#eef7ff,#f3fbff);
        color: #0d6efd;
        font-weight: 700;
        border: 1px solid rgba(13,110,253,0.08);
    }

    /* Emphasize top/bottom rows more visually */
    .table-success td { background: linear-gradient(90deg,#ecfdf3,#ffffff) !important; color: #0b6b3a !important; }
    .table-danger td { background: linear-gradient(90deg,#fff5f5,#ffffff) !important; color: #8b1f2d !important; }

    /* Responsive: allow horizontal scroll on small screens with nicer scrollbar */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive::-webkit-scrollbar { height: 8px; }
    .table-responsive::-webkit-scrollbar-thumb { background: rgba(13,110,253,0.12); border-radius: 8px; }

    @media print {
      /* When we create a print clone wrapper, make sure it's visible but preserve element display types so tables render correctly */
      #print-clone-wrapper, #print-clone-wrapper * {
        visibility: visible !important;
      }

      /* Hide everything else to ensure only the clone prints */
      body *:not(#print-clone-wrapper):not(#print-clone-wrapper *) {
        visibility: hidden !important;
        display: none !important;
      }

      /* Ensure tables expand and do not get clipped */
      .table-responsive,
      .table-responsive *,
      table {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
      }

      /* Make the cloned wrapper occupy full page for print */
      #print-clone-wrapper {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
      }
    }

    /* Stat Cards Base */
    .stat-card {
        border-radius: 12px;
        padding: 18px 10px;
        background: linear-gradient(135deg, #eef7ff 0%, #ffffff 100%);
        box-shadow: 0 8px 20px rgba(2,6,23,0.06);
    }

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 25px rgba(0,0,0,0.12);
    }

    /* Titles and Numbers */
    .stat-title {
        font-size: 0.825rem;
        color: #6c757d;
    }

    .stat-number {
        font-size: 1.5rem;
        font-weight: 700;
        color: #0d6efd;
        margin-top: .4rem;
    }

    /* Icon */
    .stat-icon {
        position: absolute;
        right: 12px;
        top: 10px;
        opacity: 0.12;
        font-size: 2.4rem;
    }

    /* Table header and data styling */
    .table thead th {
        background: #f8fafd;
        border-bottom: 2px solid #e9f0fb;
        color: #213547;
        font-weight: 700;
        font-size: 0.9rem;
    }

    .table tbody td {
        padding: 10px 12px;
        vertical-align: middle;
        color: #35414a;
        font-size: 0.9rem;
    }

    .table tbody tr:hover td {
        background: #fbfdff;
    }

    /* Filter panel tweaks when hidden */
    .filter-panel[hidden] { display: none !important; }
    .card-header .actions button {
        margin-left: 4px;
    }

    @media (max-width: 480px) {
        .card-header .actions {
            position: static;
            display: flex;
            justify-content: flex-start;
            margin-top: 8px;
            transform: none !important;
        }

            .card-header .actions button {
                width: 100%;
                margin-left: 0;
                margin-bottom: 4px;
            }
    }
    .bh-header {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 10px 14px;
        white-space: nowrap;
    }

        .bh-header h5 {
            margin: 0;
            font-weight: 600;
        }

    .actions {
        position: absolute;
        right: 14px;
        display: flex;
        gap: 6px;
    }

    /* MOBILE */
    @media (max-width: 576px) {
        .bh-header {
            flex-direction: column;
            white-space: normal;
            gap: 8px;
        }

        .actions {
            position: static;
            width: 100%;
        }

            .actions button {
                flex: 1;
                font-size: 0.8rem;
                justify-content: center;
            }
    }

    .pmjay-social-section {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Social icons */
    .social-icons {
        display: flex;
        gap: 14px;
    }

        .social-icons a {
            color: #0d6efd;
            font-size: 18px;
            transition: transform 0.2s;
        }

            .social-icons a:hover {
                transform: scale(1.15);
            }

    /* App links */
    .app-links {
        display: flex;
        gap: 14px;
    }

        .app-links img {
            height: 38px;
            border-radius: 6px;
            border: 1px solid #ddd;
        }

    /* Mobile */
    @media (max-width: 576px) {
        .social-icons,
        .app-links {
            justify-content: center;
            flex-wrap: wrap;
        }
    }
    .gov-social-section {
        max-width: 100%;
    }

    .pmjay-inline-bar {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
    }

    .inline-block {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .inline-title {
        font-weight: 600;
        font-size: 0.9rem;
        color: #495057;
    }

    .social-link {
        font-size: 18px;
        color: #0d6efd;
    }

    .divider {
        width: 1px;
        height: 24px;
        background: #dee2e6;
    }

    .inline-block img {
        height: 34px;
        border-radius: 6px;
        border: 1px solid #ddd;
    }

    /* Mobile */
    @media (max-width: 576px) {
        .pmjay-inline-bar {
            gap: 12px;
        }

        .divider {
            display: none;
        }
    }
    .login-wrapper {
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Card */
    .login-card {
        display: flex;
        width: 900px;
        max-width: 95%;
        background: white;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    /* Branding */
    .login-brand {
        flex: 1;
        background: linear-gradient(135deg, #0c5adb, #003d99);
        color: white;
        padding: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

        .login-brand h2 {
            margin-top: 15px;
            font-size: 26px;
        }

        .login-brand p {
            opacity: 0.9;
        }

    .gov-logo {
        width: 110px;
        margin-bottom: 10px;
    }

    /* Form */
    .login-form {
        flex: 1;
        padding: 40px;
    }

        .login-form h3 {
            margin-bottom: 5px;
        }

    .subtitle {
        color: #666;
        font-size: 14px;
        margin-bottom: 25px;
    }

    /* Inputs */
    .form-group {
        margin-bottom: 20px;
    }

    label {
        font-size: 14px;
        font-weight: 600;
        display: block;
        margin-bottom: 6px;
    }

    input {
        width: 100%;
        height: 42px;
        padding: 0 12px;
        border-radius: 6px;
        border: 1px solid #ccc;
        font-size: 14px;
    }

    /* Password */
    .password-wrapper {
        position: relative;
    }

        .password-wrapper input {
            padding-right: 42px;
        }

    .toggle-password {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        font-size: 18px;
    }

    /* Button */
    .login-btn {
        width: 100%;
        height: 44px;
        background: #0c5adb;
        border: none;
        border-radius: 6px;
        color: white;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
    }

        .login-btn:hover {
            background: #084ab5;
        }

    /* Error */
    .error-message {
        background: #ffe6e6;
        color: #c0392b;
        padding: 8px;
        border-radius: 5px;
        margin-bottom: 15px;
        font-size: 13px;
    }

    /* Footer */
    .footer-text {
        margin-top: 20px;
        font-size: 12px;
        color: #777;
        text-align: center;
    }

    /* Footer fixed variables and layout adjustments */
    /* :root {
      --app-footer-height: 72px;
    }

    .app-footer {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      z-index: 2000;
      box-shadow: 0 -4px 12px rgba(2,6,23,0.08);
      height: var(--app-footer-height);
      display: flex;
      align-items: center;
    }

    /* Footer fixes for fixed app-footer */
    /* .app-footer { background: #f8f9fa; border-top: 1px solid rgba(0,0,0,0.06); }
    .app-footer .text-secondary { color: #6c757d; font-size: 0.85rem; }

    /* Ensure body has min-height to allow fixed footer without overlap */
    /* html, body { min-height: 100%; height: 100%; }
    body { display: flex; flex-direction: column; }
    .home-wrapper { flex: 1 0 auto; }

    /* Reduce bottom margin on main content to avoid hidden content */
    /* .container-fluid { margin-bottom: 0; }

    /* Add bottom padding to main wrapper so content is not hidden behind fixed footer */
    /* .home-wrapper {
      padding-bottom: calc(var(--app-footer-height) + 16px); /* ensure content above footer */
    } */

    /* Footer variables and layout - non-fixed footer */
    :root {
      --app-footer-height: 72px;
    }

    /* Make footer non-fixed (standard flow) */
    .app-footer {
      position: relative; /* non-fixed */
      left: auto;
      right: auto;
      bottom: auto;
      width: 100%;
      z-index: 1;
      box-shadow: none;
      height: auto;
      display: block;
      padding: 12px 0;
      background: #f8f9fa;
      border-top: 1px solid rgba(0,0,0,0.06);
    }

    /* Ensure footer text styling remains */
    .app-footer .text-secondary { color: #6c757d; font-size: 0.85rem; }

    /* Restore normal document flow so footer is not fixed */
    html, body { min-height: 100%; height: auto; }
    body { display: block; }
    .home-wrapper { flex: none; padding-bottom: 16px; }

    /* Reduce bottom margin on main content to avoid hidden content (standard) */
    .container-fluid { margin-bottom: 0;padding-right:0px;padding-left:0px; }

    /* Enlarge donuts and KPI pills, improve responsiveness and contrast */
    /* Donut */
    .donut-card { width: 140px; }
    .donut-card svg { width: 140px; height: 140px; }
    .donut-card svg text { font-size: 22px !important; font-weight: 800; fill: #0b2b3b !important; }
    .donut-label { font-size: 0.95rem; color: #5b6b73; font-weight: 600; }
    .donut-fill { transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1); stroke-width: 14px !important; }

    /* KPI pills */
    .kpi-pill { min-width: 220px; padding: 18px 16px; box-shadow: 0 10px 24px rgba(2,6,23,0.08); }
    .kpi-pill .h5, .kpi-pill .h6 { font-size: 1.6rem; line-height: 1; }
    .kpi-pill small { font-size: 0.9rem; opacity: 0.95; display: block; margin-top: 6px; }
    .kpi-row { gap: 16px; justify-content: center; align-items: center; }

    /* Improve color contrast and richer gradients */
    .bg-primary { background: linear-gradient(90deg,#145db3,#0d6efd) !important; color: #fff !important; }
    .bg-success { background: linear-gradient(90deg,#0a7b3a,#198754) !important; color: #fff !important; }
    .bg-info { background: linear-gradient(90deg,#0bcfe8,#0bb8f0) !important; color: #fff !important; }
    .bg-secondary { background: linear-gradient(90deg,#6c757d,#5a6268) !important; color: #fff !important; }
    .bg-warning { background: linear-gradient(90deg,#f6b81b,#f7b500) !important; color: #212529 !important; }

    /* Block badges and metric fonts */
    .blocks-grid .badge { font-weight: 800; padding: 8px 10px; font-size: 0.95rem; }
    .blocks-grid .metric-value { font-size: 1rem; color: #24343c; }
    .blocks-grid .block-header { font-size: 1.05rem; }

    /* Responsive adjustments */
    @media (max-width: 991.98px) {
      .donut-card { width: 140px; }
      .donut-card svg { width: 140px; height: 140px; }
      .donut-card svg text { font-size: 18px !important; }
      .kpi-pill { min-width: 160px; padding: 12px 10px; }
      .kpi-pill .h5 { font-size: 1.25rem; }
    }

    @media (max-width: 575.98px) {
      .donut-card { width: 110px; }
      .donut-card svg { width: 110px; height: 110px; }
      .donut-card svg text { font-size: 14px !important; }
      .kpi-pill { min-width: 120px; padding: 8px 8px; }
      .kpi-pill .h5 { font-size: 1rem; }
      .kpi-row { overflow-x: auto; padding-bottom: 6px; }
    }

    /* Accessibility: increase focus ring for KPI pills */
    .kpi-pill:focus, .kpi-pill:focus-within { outline: 3px solid rgba(13,110,253,0.18); }
    /* Login-specific layout improvements */
    .login-wrapper {
      position: fixed; /* overlay layout */
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(248, 249, 250, 0.95);
      z-index: 3000;
      overflow: auto;
    }

    .login-card {
      width: 100%;
      max-width: 980px;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(10, 20, 30, 0.08);
      background: #ffffff;
      max-height: calc(100vh - 40px);
      overflow: auto;
      display: flex;
      gap: 0;
    }

    .login-card .login-brand,
    .login-card .login-form {
      padding: 24px;
    }

    .password-wrapper { display: flex; gap: 8px; align-items: center; }
    .password-wrapper .toggle-password { background: transparent; border: none; cursor: pointer; padding: 6px; }

    @media (max-width: 767.98px) {
      .login-card { max-width: 420px; border-radius: 10px; }
      .login-card .login-brand { display: none; }
    }

    /* Prevent body scroll when login overlay is shown */
    body.login-overlay-active { overflow: hidden; }
    /* Top navigation styles (ensure nav links and avatar display correctly) */
    .top-nav-bar {
      
      padding: 8px 12px;
      
      position: fixed; /* fixed below header */
      /* top is computed from header height variable set by layout-offset.js */
      top: var(--pmjay-header-height, 72px);
      left: 0;
      right: 0;
      height: 48px;
      display: flex;
      align-items: center;
      z-index: 2000;
      box-shadow: 0 2px 6px rgba(0,0,0,0.04);
      border-bottom-left-radius: 10px; /* rounded corners to match header */
      border-bottom-right-radius: 10px;
      box-sizing: border-box;
      background-color:#ffff ;
    }
    .top-nav-bar nav {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
    }
    .top-nav-spacer { height: 48px; }
    .top-link {
      color: #0b3b66;
      font-weight: 600;
      text-decoration: none;
      padding: 6px 8px;
      border-radius: 6px;
      transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
    }
    .top-link:hover,
    .top-link:focus,
    .top-link.active {
      background-color: #f1f5f9;
      color: #04283b;
      transform: translateY(-1px);
    }
    .top-link.primary {
      background: #0d6efd;
      color: white;
    }

    /* Right area (avatar/login) */
    .top-nav-bar .right-actions { margin-left: auto; display:flex; align-items:center; gap:8px; }

    .user-toggle {
      padding: 6px 8px;
      border-radius: 8px;
      border: 1px solid transparent;
      background: transparent;
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
    }

    .user-toggle:focus { outline: none; box-shadow: 0 0 0 4px rgba(13,110,253,0.08); }

    .avatar {
      width: 34px; height: 34px; display:inline-flex; align-items:center; justify-content:center;
      border-radius: 50%; font-weight:700; font-size:0.9rem; background:#0d6efd; color:#fff;
      box-shadow: 0 2px 8px rgba(2,6,23,0.06);
    }

    .user-dropdown { position: relative; }
    .user-dropdown .user-menu {
      position: absolute; top: calc(100% + 0px); right: 0; min-width: 200px; background:#fff; border-radius:8px; padding:6px 0;
      border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 10px 30px rgba(2,6,23,0.08); z-index:1300;
    }

    .user-menu .dropdown-item { padding: 10px 14px; color:#212529; text-decoration:none; display:block; }
    .user-menu .dropdown-item:hover { background:#f1f5f9; }

    /* Center nav links inside top-nav-bar */
    .top-nav-bar nav { display:flex; align-items:center; }
    .center-links { position:absolute; left:50%; transform:translateX(-50%); }
    @media (max-width: 768px) { .center-links{ position:static; transform:none; justify-content:center; width:100%; } }

    /* Responsive adjustments */
    @media (max-width: 991.98px) {
      .top-nav-bar { padding: 8px 10px; }
      .top-link { padding: 6px 8px; }
      .avatar { width: 30px; height: 30px; }
    }

    @media (max-width: 575.98px) {
      .top-nav-bar { flex-wrap: wrap; gap:8px; }
      .top-nav-bar nav { width: 100%; }
      .top-link { font-size: 0.95rem; }
      .top-nav-bar .right-actions { width: 100%; justify-content: flex-end; }
    }

    /* Ensure top nav uses white background (not transparent) */
    .top-nav-bar { background: #ffffff !important; border: none !important; box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important; }

    /* Ensure caret (down arrow) next to user name is black */
    .user-caret { color: #000 !important; }
    /* Also ensure svg inherits color when using currentColor */
    .user-toggle .user-caret { color: #000 !important; }

/* Ensure Bootstrap's .sticky-top elements account for our fixed header + top-nav
   Use CSS variable --top-panel-offset computed by layout-offset.js. Fallback to 72px. */
.sticky-top {
    top: var(--top-panel-offset, 72px) !important;
}

/* Filter panel specific adjustments: keep it below header and above main content */
.filter-panel.sticky-top {
    z-index: 998; /* header uses 999, keep filter just below header */
}

/* Mobile filter panel should appear as dialog overlay; ensure it doesn't float above header
   when scrolled and respects the offset for consistent behaviour */
.filter-panel-mobile {
    position: relative; /* not sticky on small screens */
    z-index: 997;
}

/* For safety, ensure print-clone wrapper and other absolute elements don't sneak above header */
#print-clone-wrapper { z-index: 995; }
/* Mobile link styling: remove underline, improve touch target */
.mobile-menu .mobile-link,
.top-nav-bar .mobile-link,
.mobile-link {
    text-decoration: none !important;
    color: #0b3b66;
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
}

.mobile-menu .mobile-link:hover,
.mobile-menu .mobile-link:focus,
.mobile-link:hover,
.mobile-link:focus {
    background: #f1f5f9;
    color: #04283b;
    text-decoration: none !important;
    outline: none;
}

/* Ensure NavLink active state isn't rendered as underline on mobile */
.mobile-menu .mobile-link.active,
.mobile-link.active,
.top-link.active {
    background: #e9f2ff;
    color: #0b3560;
    text-decoration: none !important;
}

/* Make the close button visible and ensure menu closes when links clicked (visual cue) */
.mobile-menu .mobile-menu-inner { padding-bottom: 12px; }

/* Larger tap targets on very small screens */
@media (max-width: 420px) {
    .mobile-menu .mobile-link { padding: 12px 14px; font-size: 0.95rem; }
}

/* Mobile compact branding inside login form */
.login-brand-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0c5adb, #003d99);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

/* Ensure the mobile brand title/sub are always visible (override any previous display:none) */
.login-brand-mobile .mobile-brand-title,
.login-brand-mobile .mobile-brand-sub {
  display: block !important;
  color: #fff !important;
}

/* Make subtitle visible and properly colored on mobile */
@media (max-width: 767.98px) {
  .login-form .subtitle {
    display: block !important;
    color: #ffffff; /* make subtitle white to show over the mobile brand background only when inside the brand area */
  }

  /* move subtitle color back to muted after the brand block to keep contrast for form text */
  .login-form .subtitle + form, .login-form form + .subtitle { color: #666 !important; }
}

/* If subtitle should remain dark below the mobile-brand, explicitly set it after the branding block */
.login-form .subtitle {
  color: #666;
}

/* If any previous rules hid .login-brand-mobile inner paragraphs, ensure they are visible */
.login-brand-mobile p { display: block !important; margin: 0; }

/* slightly reduce mobile logo size to fit compact header */
.mobile-gov-logo { width: 56px; height: 56px; }

/* Center login titles and subtitles */
.login-form { text-align: center; }
.login-title { text-align: center; margin-bottom: 6px; }
.login-form .subtitle { text-align: center; margin-bottom: 14px; color: #666; }

/* Mobile brand tagline style */
.mobile-brand-tagline { font-size: 0.60rem; color: rgba(255,255,255,0.9); margin-top: 4px; }

/* Ensure mobile-brand text is centered vertically and text-align center for small screens */
.login-brand-mobile { justify-content: left; }
.login-brand-mobile .mobile-brand-text { text-align: left; }

/* Make desktop brand text centered too */
.login-brand { text-align: left; }
.login-brand h2, .login-brand p { margin: 0; }

/* Keep desktop logo centered and constrained */
.login-brand .gov-logo { margin: 0 auto 8px; }

/* Ensure footer inside login form centered */
.footer-text { text-align: center; }

/* Mobile details card for verified rows */
.mobile-details-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  color: #24343c;
  font-size: 0.92rem;
}

/* mobile-details row spacing */
.mobile-details td { padding: 8px !important; }

/* Ensure avatar and details align nicely on small screens */
@media (max-width: 767.98px) {
  .table-responsive.stackable-table table td { padding: 6px 8px !important; }
  .mobile-details-card div { margin-bottom: 6px; }
}

/* Responsive header controls for Verified page */
.verified-header-controls .search-box { min-width: 140px; }

/* Keep action buttons grouped and allow wrapping under search on small screens */
.verified-header-controls .action-buttons { display: flex; align-items: center; }

@media (max-width: 767.98px) {
  .verified-header { gap: 8px; }
  .verified-header-title { flex: 1 1 100%; }
  .verified-header-controls { flex: 1 1 100%; justify-content: flex-start; }
  .verified-header-controls .search-box { flex: 1 1 auto; min-width: 0; }
  .verified-header-controls .action-buttons { flex: 0 0 auto; margin-left: 6px; }
  .verified-header-controls .action-buttons .btn { white-space: nowrap; }
}

@media (max-width: 480px) {
  .verified-header { align-items: flex-start; }
  .verified-header-controls { gap: 6px; }
  .verified-header-controls .action-buttons { width: 100%; justify-content: space-between; }
  .verified-header-controls .action-buttons .btn { flex: 1 1 auto; text-align: center; }
}
