:root {
    --brand-navy: #01203D;
    --brand-navy-dark: #001529;
    --brand-navy-light: #073866;
    --brand-lime: #D9E749;
    --brand-lime-hover: #C6D438;
    --brand-lime-subtle: #F6F9D8;
    
    --header-gradient: linear-gradient(135deg, #01203D 0%, #052F57 55%, #0A4073 100%);
    --bg-light: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --sidebar-width: 270px;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

input, button, select, textarea {
    font-family: var(--font-family);
}

/* Ensure FontAwesome icons always use their own font family */
.fa, .fas, .far, .fal, .fad, .fab, .fa-solid, .fa-regular, .fa-brands, [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
}
.fa-brands, .fab {
    font-family: "Font Awesome 6 Brands" !important;
}
.fa-regular, .far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}
.fa-solid, .fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* ==========================================================================
   APP SIDEBAR LAYOUT (Desktop & Mobile Responsive)
   ========================================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
    position: relative;
}

/* Off-Canvas Backdrop for Mobile */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(1, 32, 61, 0.65);
    backdrop-filter: blur(3px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* App Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: linear-gradient(180deg, #011426 0%, #01203D 50%, #000E1C 100%);
    background-image: radial-gradient(circle at 50% 0%, rgba(11, 164, 219, 0.14) 0%, transparent 60%),
                      linear-gradient(180deg, #011426 0%, #01203D 50%, #000E1C 100%);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 6px 0 35px rgba(0, 0, 0, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-sidebar::-webkit-scrollbar {
    width: 5px;
}

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

.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 231, 73, 0.35);
}

.sidebar-header {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.sidebar-brand-logo {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 9px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    max-width: 230px;
}

.sidebar-brand:hover .sidebar-brand-logo {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(217, 231, 73, 0.3);
}

.sidebar-brand-logo img {
    height: 38px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.brand-portal-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: var(--brand-lime);
    background: rgba(217, 231, 73, 0.12);
    border: 1px solid rgba(217, 231, 73, 0.28);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-top: 3px;
}

.brand-portal-tag.admin {
    color: #0BA4DB;
    background: rgba(11, 164, 219, 0.15);
    border-color: rgba(11, 164, 219, 0.32);
}

.btn-sidebar-close {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94A3B8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.2s;
}

.btn-sidebar-close:hover {
    color: #FFFFFF;
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

/* User Identity Widget in Sidebar */
.sidebar-user-card {
    margin: 16px 14px 10px;
    padding: 13px 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: all 0.25s ease;
}

.sidebar-user-card:hover {
    border-color: rgba(217, 231, 73, 0.45);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.04) 100%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(217, 231, 73, 0.12);
    transform: translateY(-1px);
}

.sidebar-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #D9E749 0%, #BCCB23 100%);
    color: #01203D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(217, 231, 73, 0.32);
    position: relative;
}

.sidebar-user-avatar.admin-avatar {
    background: linear-gradient(135deg, #0BA4DB 0%, #0284C7 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(11, 164, 219, 0.35);
}

.user-status-dot {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: #22C55E;
    border: 2.5px solid #01162B;
    border-radius: 50%;
    box-shadow: 0 0 8px #22C55E;
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.sidebar-user-info {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 800;
    font-size: 0.92rem;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}

.sidebar-user-role {
    font-size: 0.73rem;
    color: var(--brand-lime);
    font-weight: 700;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role.admin-role {
    color: #38BDF8;
}

.sidebar-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.70rem;
    color: var(--brand-lime);
    font-weight: 800;
}

.user-pill-badge.admin-badge {
    color: #38BDF8;
}

.user-office-text {
    font-size: 0.69rem;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar Navigation Items */
.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-nav-heading {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    padding: 14px 10px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

button.sidebar-nav-item,
a.sidebar-nav-item,
.sidebar-nav-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.90rem !important;
    color: #CBD5E1 !important;
    text-decoration: none !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    position: relative !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.sidebar-nav-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-nav-item-left i {
    font-size: 1.05rem;
    color: #94A3B8;
    width: 22px;
    text-align: center;
    transition: all 0.22s;
    flex-shrink: 0;
}

button.sidebar-nav-item:hover:not(.active),
a.sidebar-nav-item:hover:not(.active),
.sidebar-nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(4px) !important;
}

button.sidebar-nav-item:hover:not(.active) i,
a.sidebar-nav-item:hover:not(.active) i,
.sidebar-nav-item:hover:not(.active) i {
    color: var(--brand-lime) !important;
}

button.sidebar-nav-item.active,
a.sidebar-nav-item.active,
.sidebar-nav-item.active {
    background: linear-gradient(135deg, #D9E749 0%, #C6D525 100%) !important;
    color: #01203D !important;
    font-weight: 800 !important;
    border-color: transparent !important;
    box-shadow: 0 4px 18px rgba(217, 231, 73, 0.32) !important;
    transform: translateX(4px) !important;
}

.sidebar-nav-item.active i {
    color: #01203D !important;
}

.sidebar-nav-item.active .badge {
    background: #01203D !important;
    color: #D9E749 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sidebar-nav-item .badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.sidebar-nav-item .badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.sidebar-nav-item .badge-verified {
    background: rgba(11, 164, 219, 0.2);
    color: #38BDF8;
    border: 1px solid rgba(11, 164, 219, 0.35);
}

.sidebar-nav-item .paystack-pill-badge {
    background: linear-gradient(135deg, #0BA4DB 0%, #0284C7 100%);
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(11, 164, 219, 0.3);
}

/* Sidebar Footer & Logout */
.sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.18);
}

.sidebar-footer form {
    display: block;
    width: 100%;
    margin: 0;
}

button.btn-sidebar-logout,
.btn-sidebar-logout {
    width: 100% !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #FCA5A5 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    border-radius: 10px !important;
    padding: 11px 16px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

button.btn-sidebar-logout:hover,
.btn-sidebar-logout:hover {
    background: #EF4444 !important;
    color: #FFFFFF !important;
    border-color: #EF4444 !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-1px) !important;
}

.sidebar-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.68rem;
    color: #64748B;
    font-weight: 600;
}

.sidebar-security-badge i {
    color: var(--brand-lime);
    font-size: 0.72rem;
}

/* ==========================================================================
   MAIN WORKSPACE AREA & TOPBAR
   ========================================================================== */

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

/* Top Sticky Navigation Bar */
.app-topbar {
    background: #FFFFFF;
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(1, 32, 61, 0.03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    display: none;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--brand-navy);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sidebar-toggle:hover {
    background: var(--brand-lime-subtle);
    border-color: var(--brand-lime);
}

.topbar-title-group h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-navy);
    line-height: 1.2;
}

.topbar-title-group p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-badge-pill {
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-navy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-badge-pill i {
    color: #10B981;
}

/* ==========================================================================
   PAGE CONTENT CONTAINERS & FORMS
   ========================================================================== */

.portal-container {
    width: 100%;
    max-width: 1150px;
    margin: 28px auto;
    padding: 0 24px;
}

.form-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 20px rgba(1, 32, 61, 0.04);
    padding: 34px 36px;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1E293B;
    margin-bottom: 8px;
}

.form-label .required-star {
    color: #EF4444;
    margin-left: 2px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-prefix {
    position: absolute;
    left: 14px;
    color: #64748B;
    font-size: 1.1rem;
    pointer-events: none;
}

.input-icon-suffix {
    position: absolute;
    right: 14px;
    color: #64748B;
    font-size: 1.1rem;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    font-size: 0.94rem;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #0F172A;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control.has-prefix {
    padding-left: 42px;
}

.form-control.has-suffix {
    padding-right: 42px;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 3px rgba(217, 231, 73, 0.4);
}

.form-control::placeholder {
    color: #94A3B8;
    font-size: 0.92rem;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2301203D'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 38px center;
    background-size: 16px;
    cursor: pointer;
}

/* File Dropzone */
.file-dropzone {
    border: 2px dashed #94A3B8;
    border-radius: 10px;
    padding: 36px 20px;
    text-align: center;
    background-color: #F8FAFC;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--brand-navy);
    background-color: var(--brand-lime-subtle);
}

.dropzone-icon {
    font-size: 2.3rem;
    color: var(--brand-navy);
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.file-dropzone:hover .dropzone-icon {
    transform: translateY(-3px);
}

.dropzone-text {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--brand-navy);
}

.dropzone-subtext {
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 6px;
}

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

.file-selected-preview {
    display: none;
    margin-top: 14px;
    background: #FFFFFF;
    border: 1.5px solid var(--brand-lime);
    border-radius: 8px;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
}

.file-info-col {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.file-info-col i {
    font-size: 1.4rem;
    color: var(--brand-navy);
}

.file-name-text {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1E293B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.file-size-text {
    font-size: 0.76rem;
    color: #64748B;
}

.btn-remove-file {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
}

/* Buttons */
.btn-primary {
    background: var(--brand-navy);
    color: var(--brand-lime);
    border: 1px solid var(--brand-navy);
    border-radius: 8px;
    padding: 12px 26px;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(1, 32, 61, 0.2);
}

.btn-primary:hover {
    background: #032E57;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(1, 32, 61, 0.28);
}

.btn-secondary {
    background: #F1F5F9;
    color: #334155;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #E2E8F0;
    color: var(--brand-navy);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-verified {
    background-color: var(--brand-navy);
    color: var(--brand-lime);
}

.badge-approved {
    background-color: #ECF6B8;
    color: #01203D;
    border: 1px solid #D9E749;
}

.badge-rejected {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #FFFFFF;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
    min-width: 650px; /* Ensures nice table layout on mobile */
}

.portal-table th {
    background-color: #F8FAFC;
    color: #334155;
    font-weight: 700;
    padding: 13px 16px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.portal-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
    vertical-align: middle;
}

.portal-table tr:hover {
    background-color: #F8FAFC;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(1, 32, 61, 0.02);
}

.stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon-orange { background: var(--brand-lime-subtle); color: var(--brand-navy); border: 1px solid var(--brand-lime); }
.stat-icon-green { background: #ECFDF5; color: #059669; }
.stat-icon-blue { background: #EBF3FA; color: var(--brand-navy); }
.stat-icon-purple { background: #F5F3FF; color: #7C3AED; }
.stat-icon-red { background: #FEF2F2; color: #DC2626; }

.stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-navy);
    line-height: 1.2;
}

.stat-lbl {
    font-size: 0.8rem;
    color: #64748B;
    font-weight: 600;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 32, 61, 0.6);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 16px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #FFFFFF;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 16px 36px rgba(1, 32, 61, 0.28);
    overflow: hidden;
    animation: modalPop 0.2s ease-out;
}

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

.modal-header {
    padding: 16px 22px;
    background-color: var(--brand-navy);
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--brand-lime);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
}

.modal-header h3 i {
    color: var(--brand-lime);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #CBD5E1;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #FFFFFF;
}

.modal-body {
    padding: 22px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 22px;
    background-color: #F8FAFC;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast System Container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

.toast-item {
    pointer-events: auto;
    width: 360px;
    max-width: 100%;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(1, 32, 61, 0.18);
    border-left: 5px solid var(--brand-navy);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.toast-item.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-item.toast-success { border-left-color: #10B981; }
.toast-item.toast-error { border-left-color: #EF4444; }
.toast-item.toast-warning { border-left-color: #F59E0B; }
.toast-item.toast-info { border-left-color: var(--brand-navy); }

.toast-icon {
    font-size: 1.25rem;
    margin-top: 1px;
}

.toast-success .toast-icon { color: #10B981; }
.toast-error .toast-icon { color: #EF4444; }
.toast-warning .toast-icon { color: #F59E0B; }
.toast-info .toast-icon { color: var(--brand-navy); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--brand-navy);
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & RESPONSIVE GRID HELPERS
   ========================================================================== */

/* Responsive Grid Helpers */
.site-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.portal-identity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.email-settings-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: start;
}

.smtp-fields-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.smtp-fields-grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.submissions-filter-form {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-input-search {
    flex: 2;
    min-width: 240px;
}

.filter-select-item {
    flex: 1;
    min-width: 160px;
}

.filter-btn-group {
    display: flex;
    gap: 8px;
    width: auto;
    flex-wrap: wrap;
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    }

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

    .btn-sidebar-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        cursor: pointer;
    }

    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .btn-sidebar-toggle {
        display: inline-flex !important;
    }

    .app-topbar {
        padding: 0 16px;
        height: 64px;
    }

    .portal-container {
        padding: 0 16px;
        margin: 18px auto;
    }

    .site-settings-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .email-settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .paystack-config-grid {
        grid-template-columns: 1fr !important;
    }

    .paystack-banner-inner {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .paystack-banner-right {
        width: 100% !important;
        max-width: 100% !important;
    }

    .env-status-card {
        width: 100% !important;
    }

    .exec-banner {
        padding: 20px 18px;
    }

    .exec-banner-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .exec-banner-meta {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .stats-grid-v2:not(.dashboard-stats-grid) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }

    .dashboard-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }

    .table-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-chips {
        overflow-x: auto;
        padding-bottom: 4px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .search-mini-box {
        width: 100% !important;
        min-width: 100% !important;
    }

    .form-card {
        padding: 24px 20px;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-identity-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .smtp-fields-grid-2-1,
    .smtp-fields-grid-1-1 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .submissions-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input-search,
    .filter-select-item,
    .filter-btn-group {
        width: 100% !important;
        min-width: 100% !important;
    }

    .filter-btn-group button,
    .filter-btn-group a {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .pipeline-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .modal-info-grid {
        grid-template-columns: 1fr !important;
    }

    .dev-endpoint-card, .dev-channels-card {
        padding: 16px !important;
    }

    .key-input-container {
        flex-direction: column;
        align-items: stretch;
    }

    .key-input-container .btn-key-action {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .app-topbar {
        padding: 0 12px;
        height: 58px;
    }

    .topbar-title-group h1 {
        font-size: 0.95rem;
    }

    .topbar-title-group p {
        display: none;
    }

    .topbar-badge-pill {
        display: none !important;
    }

    .topbar-right button {
        padding: 7px 12px !important;
        font-size: 0.78rem !important;
    }

    .portal-container {
        padding: 0 10px;
        margin: 12px auto;
    }

    .form-card {
        padding: 18px 14px;
        border-radius: 10px;
    }

    .stats-grid-v2:not(.dashboard-stats-grid):not(.submissions-stats-grid) {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .dashboard-stats-grid,
    .submissions-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .dashboard-stats-grid .stat-card-v2,
    .submissions-stats-grid .stat-card-v2 {
        padding: 12px 8px !important;
        border-radius: 10px !important;
    }

    .dashboard-stats-grid .stat-card-v2-header,
    .submissions-stats-grid .stat-card-v2-header {
        margin-bottom: 6px !important;
    }

    .dashboard-stats-grid .stat-card-v2-label,
    .submissions-stats-grid .stat-card-v2-label {
        font-size: 0.65rem !important;
        letter-spacing: 0 !important;
        line-height: 1.15 !important;
    }

    .dashboard-stats-grid .stat-card-v2-icon,
    .submissions-stats-grid .stat-card-v2-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.82rem !important;
        border-radius: 6px !important;
    }

    .dashboard-stats-grid .stat-card-v2-value,
    .submissions-stats-grid .stat-card-v2-value {
        font-size: 1.25rem !important;
        margin-bottom: 4px !important;
    }

    .dashboard-stats-grid .stat-card-v2-footer,
    .submissions-stats-grid .stat-card-v2-footer {
        font-size: 0.62rem !important;
        padding-top: 6px !important;
        margin-top: 2px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
    }
    
    .dashboard-stats-grid .stat-card-v2-footer span,
    .submissions-stats-grid .stat-card-v2-footer span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card-v2 {
        padding: 16px;
    }

    .stat-card-v2-value {
        font-size: 1.65rem;
    }

    .pipeline-legend {
        grid-template-columns: 1fr;
    }

    .file-dropzone {
        padding: 22px 12px;
    }

    .dropzone-icon {
        font-size: 1.8rem;
    }

    .modal-box {
        margin: 8px !important;
        max-width: 95vw !important;
        border-radius: 12px !important;
        max-height: 94vh;
    }

    .modal-body {
        padding: 14px !important;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
        padding: 12px 14px;
    }

    .modal-footer button {
        width: 100% !important;
    }

    .settings-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
    }

    .settings-form-actions button,
    .settings-form-actions a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .btn-export-csv {
        width: 100% !important;
        justify-content: center;
    }

    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast-item {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .dashboard-stats-grid,
    .submissions-stats-grid {
        gap: 5px !important;
    }

    .dashboard-stats-grid .stat-card-v2,
    .submissions-stats-grid .stat-card-v2 {
        padding: 8px 5px !important;
    }

    .dashboard-stats-grid .stat-card-v2-label,
    .submissions-stats-grid .stat-card-v2-label {
        font-size: 0.58rem !important;
    }

    .dashboard-stats-grid .stat-card-v2-value,
    .submissions-stats-grid .stat-card-v2-value {
        font-size: 1.1rem !important;
    }

    .dashboard-stats-grid .stat-card-v2-icon,
    .submissions-stats-grid .stat-card-v2-icon {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.7rem !important;
    }

    .dashboard-stats-grid .stat-card-v2-footer,
    .submissions-stats-grid .stat-card-v2-footer {
        font-size: 0.56rem !important;
    }

    .sidebar-user-card {
        margin: 10px 8px;
        padding: 10px 8px;
        gap: 8px;
    }

    .sidebar-user-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .sidebar-user-name {
        font-size: 0.84rem;
    }

    .sidebar-nav-item {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .exec-banner-title h2 {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   EXECUTIVE DASHBOARD BEAUTIFICATION
   ========================================================================== */

.exec-banner {
    background: linear-gradient(135deg, #01203D 0%, #052F57 55%, #0B4A87 100%);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(1, 32, 61, 0.18);
    border: 1px solid rgba(217, 231, 73, 0.25);
}

.exec-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 231, 73, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.exec-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #D9E749 0%, #01203D 100%);
}

.exec-banner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.exec-banner-title h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exec-banner-title h2 span {
    color: var(--brand-lime);
}

.exec-banner-title p {
    font-size: 0.88rem;
    color: #94A3B8;
    margin-top: 4px;
}

.exec-banner-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.system-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #E2E8F0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Enhanced KPI Cards & Solid Colors */
.stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* KPI Cards Grid (Dashboard & Submissions): 5 per row on desktop, 3 per row on mobile */
@media (min-width: 992px) {
    .dashboard-stats-grid,
    .submissions-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 14px !important;
        margin-bottom: 24px;
    }
}

@media (max-width: 991px) {
    .dashboard-stats-grid,
    .submissions-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px;
    }
}

.stat-card-v2 {
    border-radius: 12px;
    padding: 18px 16px;
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.stat-card-v2::before {
    display: none !important;
}

/* 1. Total Requests: Solid Navy */
.stat-card-v2.theme-navy {
    background: #01203D !important;
    border-color: #001528 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(1, 32, 61, 0.25) !important;
}

.stat-card-v2.theme-navy .stat-card-v2-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

.stat-card-v2.theme-navy .stat-card-v2-icon {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #D9E749 !important;
}

.stat-card-v2.theme-navy .stat-card-v2-value {
    color: #FFFFFF !important;
}

.stat-card-v2.theme-navy .stat-card-v2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.stat-card-v2.theme-navy .stat-card-v2-sub {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* 2. Pending Review: Solid Amber/Orange */
.stat-card-v2.theme-pending {
    background: #D97706 !important;
    border-color: #B45309 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.28) !important;
}

.stat-card-v2.theme-pending .stat-card-v2-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-pending .stat-card-v2-icon {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #FFFFFF !important;
}

.stat-card-v2.theme-pending .stat-card-v2-value {
    color: #FFFFFF !important;
}

.stat-card-v2.theme-pending .stat-card-v2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-pending .stat-card-v2-sub {
    color: #FFFFFF !important;
}

/* 3. Verified Accounts: Solid Cyan/Sky Blue */
.stat-card-v2.theme-verified {
    background: #0284C7 !important;
    border-color: #0369A1 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.28) !important;
}

.stat-card-v2.theme-verified .stat-card-v2-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-verified .stat-card-v2-icon {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #FFFFFF !important;
}

.stat-card-v2.theme-verified .stat-card-v2-value {
    color: #FFFFFF !important;
}

.stat-card-v2.theme-verified .stat-card-v2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-verified .stat-card-v2-sub {
    color: #FFFFFF !important;
}

/* 4. Approved: Solid Emerald Green */
.stat-card-v2.theme-approved {
    background: #059669 !important;
    border-color: #047857 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.28) !important;
}

.stat-card-v2.theme-approved .stat-card-v2-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-approved .stat-card-v2-icon {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #FFFFFF !important;
}

.stat-card-v2.theme-approved .stat-card-v2-value {
    color: #FFFFFF !important;
}

.stat-card-v2.theme-approved .stat-card-v2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-approved .stat-card-v2-sub {
    color: #FFFFFF !important;
}

/* 5. Field Agents: Solid Indigo */
.stat-card-v2.theme-agents {
    background: #4F46E5 !important;
    border-color: #4338CA !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.28) !important;
}

.stat-card-v2.theme-agents .stat-card-v2-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-agents .stat-card-v2-icon {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #FFFFFF !important;
}

.stat-card-v2.theme-agents .stat-card-v2-value {
    color: #FFFFFF !important;
}

.stat-card-v2.theme-agents .stat-card-v2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-agents .stat-card-v2-sub {
    color: #FFFFFF !important;
}

/* 6. Rejected: Solid Rose/Red */
.stat-card-v2.theme-rejected {
    background: #E11D48 !important;
    border-color: #BE123C !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.28) !important;
}

.stat-card-v2.theme-rejected .stat-card-v2-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-rejected .stat-card-v2-icon {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #FFFFFF !important;
}

.stat-card-v2.theme-rejected .stat-card-v2-value {
    color: #FFFFFF !important;
}

.stat-card-v2.theme-rejected .stat-card-v2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.stat-card-v2.theme-rejected .stat-card-v2-sub {
    color: #FFFFFF !important;
}

.stat-card-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-v2-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
}

.stat-card-v2-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.stat-card-v2-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-card-v2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.82);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 8px;
    margin-top: 4px;
}

.stat-card-v2-sub {
    font-weight: 600;
}

/* Pipeline Progress Component */
.pipeline-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(1, 32, 61, 0.03);
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.pipeline-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-bar-wrapper {
    height: 12px;
    background: #F1F5F9;
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pipeline-segment {
    height: 100%;
    transition: width 0.6s ease;
}

.pipeline-segment.seg-pending { background: #F59E0B; }
.pipeline-segment.seg-verified { background: #0284C7; }
.pipeline-segment.seg-approved { background: #10B981; }
.pipeline-segment.seg-rejected { background: #EF4444; }

.pipeline-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.pipeline-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
}

.pipeline-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Leaderboard Ranking Badges */
.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 800;
    flex-shrink: 0;
}

.rank-badge-1 {
    background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
}

.rank-badge-2 {
    background: linear-gradient(135deg, #94A3B8 0%, #64748B 100%);
    color: #FFFFFF;
}

.rank-badge-3 {
    background: linear-gradient(135deg, #F97316 0%, #C2410C 100%);
    color: #FFFFFF;
}

.rank-badge-other {
    background: #E2E8F0;
    color: #475569;
}

/* Table Filter Chips & Search */
.table-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #E2E8F0;
    color: var(--brand-navy);
}

.filter-chip.active {
    background: var(--brand-navy);
    color: var(--brand-lime);
    border-color: var(--brand-navy);
}

.search-mini-box {
    position: relative;
    min-width: 220px;
}

.search-mini-box input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    font-size: 0.82rem;
    border: 1px solid #CBD5E1;
    border-radius: 20px;
    outline: none;
    transition: all 0.2s ease;
}

.search-mini-box input:focus {
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 3px rgba(1, 32, 61, 0.08);
}

.search-mini-box i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #94A3B8;
}

.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--brand-navy);
    color: var(--brand-lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.84rem;
    flex-shrink: 0;
}

/* Quick Toolkit Cards */
.quick-toolkit-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-tool-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.quick-tool-item:hover {
    background: #FFFFFF;
    border-color: var(--brand-navy);
    transform: translateX(3px);
    box-shadow: 0 4px 10px rgba(1, 32, 61, 0.06);
}

.quick-tool-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-tool-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #EBF3FA;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.quick-tool-item:hover .quick-tool-icon {
    background: var(--brand-navy);
    color: var(--brand-lime);
}

.quick-tool-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: #1E293B;
}

.quick-tool-desc {
    font-size: 0.74rem;
    color: #64748B;
}

/* ==========================================================================
   AGENT NETWORK PAGE & MOBILE RESPONSIVENESS
   ========================================================================== */

.agent-hero-banner {
    background: linear-gradient(135deg, #01203D 0%, #06345E 60%, #0B4A87 100%);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(1, 32, 61, 0.18);
    border: 1px solid rgba(217, 231, 73, 0.25);
}

.agent-hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #D9E749 0%, #01203D 100%);
}

.agent-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--brand-navy);
    color: var(--brand-lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    border: 1.5px solid rgba(217, 231, 73, 0.3);
}

.agent-metric-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Mobile vs Desktop View Toggle */
.mobile-agent-cards-view {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.desktop-agent-table-view {
    display: block;
}

@media (max-width: 768px) {
    .desktop-agent-table-view {
        display: none !important;
    }

    .mobile-agent-cards-view {
        display: flex !important;
    }
}

/* Mobile Agent Card Component */
.mobile-agent-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(1, 32, 61, 0.04);
    transition: all 0.2s ease;
}

.mobile-agent-card:active {
    background: #F8FAFC;
    transform: scale(0.99);
}

.mobile-agent-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mobile-agent-card-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-agent-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand-navy);
    line-height: 1.2;
}

.mobile-agent-role {
    font-size: 0.76rem;
    color: #64748B;
}

.mobile-agent-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin-bottom: 12px;
}

.mobile-agent-meta-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
    font-size: 0.82rem;
}

.mobile-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}

.mobile-meta-item i {
    color: var(--brand-navy);
    font-size: 0.82rem;
    width: 16px;
}

.mobile-meta-item a {
    color: var(--brand-navy);
    font-weight: 600;
    text-decoration: none;
}

.mobile-agent-task-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
    text-align: center;
}

.mobile-task-stat-box {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 8px;
}

.mobile-task-stat-val {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand-navy);
}

.mobile-task-stat-lbl {
    font-size: 0.7rem;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
}

.mobile-agent-actions {
    display: flex;
    gap: 8px;
}

.mobile-agent-actions button,
.mobile-agent-actions form {
    width: 100%;
}

/* ==========================================================================
   CUSTOMER SUBMISSIONS PAGE & MOBILE RESPONSIVENESS
   ========================================================================== */

.submissions-hero-banner {
    background: linear-gradient(135deg, #01203D 0%, #06345E 60%, #0B4A87 100%);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(1, 32, 61, 0.18);
    border: 1px solid rgba(217, 231, 73, 0.25);
}

.submissions-hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #D9E749 0%, #01203D 100%);
}

.desktop-submissions-table-view {
    display: block;
}

.mobile-submissions-cards-view {
    display: none;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 768px) {
    .desktop-submissions-table-view {
        display: none !important;
    }

    .mobile-submissions-cards-view {
        display: flex !important;
    }

    .submissions-hero-banner {
        padding: 18px 16px;
    }
}

/* Mobile Submission Card */
.mobile-submission-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(1, 32, 61, 0.04);
    transition: all 0.2s ease;
}

.mobile-submission-card:hover {
    box-shadow: 0 4px 14px rgba(1, 32, 61, 0.08);
}

.mobile-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F1F5F9;
}

.mobile-sub-ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brand-navy);
}

.mobile-sub-client {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-sub-client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #01203D;
    color: #D9E749;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 1px solid rgba(217, 231, 73, 0.3);
}

.mobile-sub-client-name {
    font-weight: 800;
    color: #1E293B;
    font-size: 0.95rem;
    line-height: 1.25;
}

.mobile-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.82rem;
}

@media (max-width: 480px) {
    .mobile-sub-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.mobile-sub-grid-item small {
    display: block;
    color: #64748B;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.mobile-sub-grid-item div {
    font-weight: 600;
    color: #1E293B;
    word-break: break-all;
}

.mobile-sub-doc-row {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #F6F9D8;
    border: 1.5px dashed #01203D;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mobile-sub-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.mobile-sub-actions .btn-primary,
.mobile-sub-actions .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* ==========================================================================
   PORTAL MODERN PAGINATION STYLING
   ========================================================================== */

.portal-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0 4px 0;
    margin-top: 10px;
    border-top: 1px solid #F1F5F9;
}

.portal-pagination-info {
    font-size: 0.86rem;
    color: #64748B;
}

.portal-pagination-info strong {
    color: #01203D;
    font-weight: 700;
}

.portal-pagination-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.portal-pagination-list .page-item {
    margin: 0;
}

.portal-pagination-list .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid #E2E8F0;
    background: #FFFFFF;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.portal-pagination-list a.page-link:hover {
    background: #01203D;
    border-color: #01203D;
    color: #D9E749;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(1, 32, 61, 0.15);
}

.portal-pagination-list .page-item.active .page-link {
    background: #01203D;
    border-color: #01203D;
    color: #D9E749;
    box-shadow: 0 3px 8px rgba(1, 32, 61, 0.2);
}

.portal-pagination-list .page-item.disabled .page-link {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #CBD5E1;
    cursor: not-allowed;
    opacity: 0.7;
}

.portal-pagination-list .page-link.dots {
    border: none;
    background: transparent;
    min-width: 24px;
    color: #94A3B8;
}

@media (max-width: 640px) {
    .portal-pagination-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .portal-pagination-list {
        justify-content: center;
    }

    .portal-pagination-list .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.8rem;
    }
}

/* ========================================================================= */
/* AGENT FEATURE PACK STYLES (Slip, Preview, Timeline, Calculator)           */
/* ========================================================================= */

/* Printable Official Slip Styling */
.printable-slip-card {
    background: #FFFFFF;
    border: 2px solid #01203D;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.slip-header-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2.5px solid #01203D;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.slip-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 5rem;
    font-weight: 900;
    color: rgba(1, 32, 61, 0.04);
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
}

.slip-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

.slip-table td {
    padding: 10px 14px;
    border: 1px solid #E2E8F0;
    font-size: 0.88rem;
}

.slip-table td.label-cell {
    background: #F8FAFC;
    font-weight: 700;
    color: #475569;
    width: 35%;
}

.slip-table td.value-cell {
    color: #01203D;
    font-weight: 600;
}

/* Print Only Isolation */
@media print {
    body * {
        visibility: hidden !important;
    }
    #printableSlipModal, #printableSlipModal * {
        visibility: visible !important;
    }
    #printableSlipModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #FFFFFF !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .modal-overlay {
        background: transparent !important;
    }
    .modal-box {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
    }
    .no-print, .modal-header, .modal-footer {
        display: none !important;
    }
    .printable-slip-card {
        border: 2px solid #01203D !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 24px !important;
    }
}

/* Timeline Stepper for Application Details */
.timeline-stepper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 28px;
    margin: 18px 0;
}

.timeline-stepper::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #E2E8F0;
}

.timeline-node {
    position: relative;
    display: flex;
    flex-direction: column;
}

.timeline-node-dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 2px #E2E8F0;
}

.timeline-node.completed .timeline-node-dot {
    background: #22C55E;
    color: #FFFFFF;
    box-shadow: 0 0 0 2px #86EFAC;
}

.timeline-node.active .timeline-node-dot {
    background: #01203D;
    color: #D9E749;
    box-shadow: 0 0 0 2px #CBD5E1;
}

.timeline-node.rejected .timeline-node-dot {
    background: #EF4444;
    color: #FFFFFF;
    box-shadow: 0 0 0 2px #FCA5A5;
}

.timeline-node-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #01203D;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-node-desc {
    font-size: 0.78rem;
    color: #64748B;
    margin-top: 2px;
}

/* Calculator Range Sliders & Presets */
.calc-preset-btn {
    border: 1.5px solid #CBD5E1;
    background: #F8FAFC;
    color: #01203D;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-preset-btn:hover {
    border-color: #01203D;
    background: #FFFFFF;
}

.calc-preset-btn.active {
    background: #01203D;
    color: #D9E749;
    border-color: #01203D;
    box-shadow: 0 2px 8px rgba(1, 32, 61, 0.15);
}

.calc-result-card {
    background: linear-gradient(135deg, #01203D 0%, #082F57 100%);
    border-radius: 16px;
    color: #FFFFFF;
    padding: 26px;
    box-shadow: 0 8px 24px rgba(1, 32, 61, 0.18);
    border-top: 4px solid #D9E749;
}


