/* ═══════════════════════════════════════════════════════════════════════════
   MAYTRUST MICROLENDING — Comprehensive Custom Design System & Dark Mode Engine
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. GLOBAL LAYOUT & SIDEBAR ────────────────────────────────────────── */
.nk-sidebar,
.nk-sidebar.is-dark,
.nk-sidebar.nk-sidebar-fixed,
.nk-sidebar-element,
.nk-sidebar-content,
.nk-sidebar-menu,
.nk-sidebar-head,
.nk-sidebar-body,
.nk-sidebar .simplebar-content,
.nk-sidebar .simplebar-scroll-content,
.nk-sidebar .simplebar-mask,
.nk-sidebar .simplebar-offset {
    background: #071F1A !important;
    background-color: #071F1A !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.nk-sidebar-head,
.nk-sidebar-element.nk-sidebar-head,
.nk-sidebar .nk-sidebar-head {
    background: #071F1A !important;
    background-color: #071F1A !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.15rem 1.5rem !important;
}
.nk-sidebar-element.nk-sidebar-head::after {
    display: none !important;
}
.nk-sidebar-logo img {
    max-height: 42px !important;
    width: auto !important;
    object-fit: contain !important;
}

.nk-sidebar .nk-menu-heading,
.nk-sidebar .nk-menu-heading h6,
.nk-sidebar .overline-title {
    color: #4D7267 !important;
    letter-spacing: 0.14em !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding-left: 1.25rem !important;
    margin-top: 0.75rem !important;
}

.nk-sidebar .nk-menu-link {
    color: #8CAEA3 !important;
    font-weight: 500 !important;
    font-size: 0.92rem !important;
    border-radius: 0px !important;
    margin: 0 !important;
    padding: 0.75rem 1.25rem !important;
    position: relative !important;
    background: transparent !important;
    background-color: transparent !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}
.nk-sidebar .nk-menu-icon .icon {
    color: #8CAEA3 !important;
    font-size: 1.2rem !important;
    transition: color 0.15s ease !important;
}

.nk-sidebar .nk-menu-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
}
.nk-sidebar .nk-menu-link:hover .nk-menu-icon .icon {
    color: #FFFFFF !important;
}

.nk-sidebar .nk-menu-item.active > .nk-menu-link,
.nk-sidebar .nk-menu-item.current-menu > .nk-menu-link {
    background: #123831 !important;
    background-color: #123831 !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-left: 4px solid #74C92D !important;
    padding-left: calc(1.25rem - 4px) !important;
}
.nk-sidebar .nk-menu-item.active > .nk-menu-link .nk-menu-icon .icon,
.nk-sidebar .nk-menu-item.current-menu > .nk-menu-link .nk-menu-icon .icon {
    color: #FFFFFF !important;
}

.nk-sidebar .nk-menu-sub {
    background: #051915 !important;
    background-color: #051915 !important;
    border-left: none !important;
    margin-left: 0 !important;
    padding: 0.25rem 0 !important;
}
.nk-sidebar .nk-menu-sub .nk-menu-link {
    color: #78998E !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1.25rem 0.5rem 2.8rem !important;
}
.nk-sidebar .nk-menu-sub .nk-menu-link:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.nk-sidebar .nk-menu-sub .nk-menu-item.active > .nk-menu-link {
    color: #74C92D !important;
    background: rgba(116, 201, 45, 0.08) !important;
    border-left: 3px solid #74C92D !important;
}

.nk-sidebar .nk-menu-toggle::after {
    border-color: #8CAEA3 !important;
}
.nk-sidebar .nk-menu-link:hover .nk-menu-toggle::after,
.nk-sidebar .nk-menu-item.active > .nk-menu-link .nk-menu-toggle::after {
    border-color: #FFFFFF !important;
}

.nk-sidebar-menu::-webkit-scrollbar { width: 5px; }
.nk-sidebar-menu::-webkit-scrollbar-track { background: #071F1A; }
.nk-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
.nk-sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(116, 201, 45, 0.4);
}

/* ── Top Header Bar (Navbar) ────────────────────────────────────────────── */
.nk-header.nk-header-fixed {
    background: #ffffff !important;
    border-bottom: 2px solid #74C92D !important;
    box-shadow: 0 4px 20px rgba(7, 31, 26, 0.06) !important;
}
.nk-header .user-name {
    color: #071F1A !important;
    font-weight: 700 !important;
}
.nk-header .user-avatar {
    box-shadow: 0 0 0 2px #74C92D !important;
}
.dropdown-menu-s1 {
    border-top: 3px solid #74C92D !important;
    box-shadow: 0 10px 30px rgba(7, 31, 26, 0.12) !important;
}
.dropdown-menu-s1 .dropdown-inner.user-card-wrap {
    background: #F4F8F6 !important;
}
.dropdown-menu-s1 .link-list a:hover {
    color: #74C92D !important;
}
.dropdown-menu-s1 .link-list a:hover .icon {
    color: #0D9488 !important;
}
.nk-footer {
    border-top: 1px solid #E5E7EB !important;
    background: #fff !important;
}
.nk-footer-copyright {
    color: #64748B !important;
    font-size: 0.8rem !important;
}


/* ── 2. DASHBOARD HERO BANNER & ALERTS ─────────────────────────────────── */
.dash-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    font-family: inherit;
}
.dash-hero-banner {
    background: linear-gradient(135deg, #071F1A 0%, #0B382F 50%, #0D9488 100%);
    border-radius: 14px;
    padding: 1.6rem 2rem;
    color: #ffffff !important;
    margin-bottom: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    box-shadow: 0 8px 24px rgba(7, 31, 26, 0.12);
}
.dash-hero-title {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    margin: 0 0 0.35rem 0 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dash-hero-subtitle {
    font-size: 0.88rem !important;
    color: #D1EAE5 !important;
    margin: 0 !important;
    font-weight: 500;
}
.dash-hero-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.dash-hero-stat-pill {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.65rem 1.15rem;
    text-align: center;
    min-width: 95px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.dash-hero-stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
}
.dash-hero-stat-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #A3D1C8;
    margin-top: 0.25rem;
}

.dash-alert-strip {
    background: #ffffff;
    border: 1px solid #FEE2E2;
    border-left: 4px solid #EF4444;
    border-radius: 14px;
    padding: 0.9rem 1.4rem;
    margin-bottom: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.05);
}
.dash-alert-strip-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
}
.dash-alert-circle-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FEE2E2;
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.dash-alert-action-btn {
    background: #EF4444;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 1.35rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}
.dash-alert-action-btn:hover {
    background: #DC2626;
    transform: translateY(-1px);
}


/* ── 3. KPI METRIC CARDS & CARDS GRID ──────────────────────────────────── */
.kpi-card {
    background: #ffffff;
    border: 1px solid #EEF2F6;
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.kpi-card.border-rose   { border-bottom: 3px solid #F43F5E; }
.kpi-card.border-blue   { border-bottom: 3px solid #3B82F6; }
.kpi-card.border-amber  { border-bottom: 3px solid #F59E0B; }
.kpi-card.border-green  { border-bottom: 3px solid #10B981; }
.kpi-card.border-teal   { border-bottom: 3px solid #0D9488; }
.kpi-card.border-purple { border-bottom: 3px solid #8B5CF6; }
.kpi-card.border-red    { border-bottom: 3px solid #EF4444; }
.kpi-card.border-slate  { border-bottom: 3px solid #64748B; }

.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.kpi-icon-rose   { background: #FFF1F2; color: #F43F5E; }
.kpi-icon-blue   { background: #EFF6FF; color: #3B82F6; }
.kpi-icon-amber  { background: #FFFBEB; color: #F59E0B; }
.kpi-icon-green  { background: #ECFDF5; color: #10B981; }
.kpi-icon-teal   { background: #F0FDFA; color: #0D9488; }
.kpi-icon-purple { background: #F5F3FF; color: #8B5CF6; }
.kpi-icon-red    { background: #FEF2F2; color: #EF4444; }
.kpi-icon-slate  { background: #F8FAFC; color: #64748B; }

.kpi-content {
    flex: 1;
    min-width: 0;
}
.kpi-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748B;
    margin-bottom: 0.25rem;
}
.kpi-value {
    font-size: 1.28rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
    letter-spacing: -0.01em;
    word-break: break-word;
}
.kpi-subtext {
    font-size: 0.76rem;
    color: #94A3B8;
    margin-top: 0.35rem;
    font-weight: 500;
}


/* ── 4. EXECUTIVE & BOTTOM CONTAINER CARDS ─────────────────────────────── */
.exec-card,
.exec-main-card,
.bottom-card,
.report-gen-card {
    background: #ffffff;
    border: 1px solid #EEF2F6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    height: auto;
    display: flex;
    flex-direction: column;
}
.exec-card-head,
.bottom-card-header,
.report-gen-header {
    padding: 1.25rem 1.5rem 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.exec-card-title,
.bottom-card-title,
.report-gen-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.exec-card-link,
.bottom-card-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #D92D20;
    text-decoration: none;
    transition: opacity 0.2s;
}
.exec-card-link:hover,
.bottom-card-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ── Upcoming Repayments & Bottom Cards ── */
.bottom-card {
    background: #ffffff;
    border: 1px solid #EEF2F6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}
.bottom-card-header {
    padding: 1.15rem 1.4rem 0.85rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.bottom-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.bottom-card-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: #D92D20;
    text-decoration: none;
    transition: opacity 0.2s;
}
.bottom-card-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Repayment Tab Switchers */
.bottom-repay-tabs,
.repay-tabs-bar {
    display: flex;
    padding: 0.55rem 1.25rem;
    gap: 1.25rem;
    align-items: center;
    background: #FAFAFA;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
}
.bottom-tab-btn {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748B;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}
.bottom-tab-btn.active {
    background: #D92D20;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(217, 45, 32, 0.25);
}
.tab-count-bubble {
    font-size: 0.72rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.bottom-tab-btn.active .tab-count-bubble {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Activity Rows & User Listings */
.bottom-activity-row,
.staff-activity-row {
    padding: 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #F8FAFC;
    transition: background 0.15s ease;
}
.bottom-activity-row:last-child {
    border-bottom: none;
}
.bottom-activity-row:hover,
.staff-activity-row:hover {
    background: #FAFAFA;
}
.bottom-avatar,
.staff-avatar,
.tbl-avatar {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1.5px solid #E2E8F0 !important;
    flex-shrink: 0 !important;
}
.bottom-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0F172A;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.bottom-sub {
    font-size: 0.72rem;
    color: #94A3B8;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.bottom-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    display: inline-block;
}
.badge-green { background: #DCFCE7; color: #16A34A; }
.badge-blue  { background: #EFF6FF; color: #2563EB; }
.badge-amber { background: #FEF08A; color: #854D0E; }

.bottom-action-eye-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #FEF2F2;
    color: #D92D20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.bottom-action-eye-box:hover {
    background: #D92D20;
    color: #ffffff;
}

/* Bottom 3-Column Footer Dividers */
.bottom-metric-footer {
    border-top: 1px solid #F1F5F9;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff;
    margin-top: auto;
    width: 100%;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    overflow: hidden;
}
.bottom-metric-col {
    flex: 1 !important;
    text-align: center !important;
    padding: 1.1rem 0.5rem !important;
    border-right: 1px solid #F1F5F9;
}
.bottom-metric-col:last-child {
    border-right: none !important;
}
.staff-user-name,
.tbl-name {
    font-weight: 700;
    color: #0F172A;
    line-height: 1.25;
    font-size: 0.9rem;
}

/* ── Mobile Touch Cards (Loan & Table Mobile View) ───────── */
.mob-card,
.loan-mobile-card {
    background: #ffffff;
    border: 1px solid #EEF2F6;
    border-radius: 16px;
    padding: 1.2rem 1.35rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.mob-card:hover,
.loan-mobile-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.mob-card .mc-hdr,
.loan-mobile-card .lm-header,
.repay-mob-header,
.rc-mob-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 0.5rem !important;
    padding-bottom: 1.1rem !important;
    margin-top: 0.4rem !important;
    margin-bottom: 1.25rem !important;
    border-bottom: 1px solid #EEF2F6 !important;
    width: 100% !important;
}

.tbl-name {
    font-weight: 700;
    color: #0F172A;
    line-height: 1.35;
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.mob-card .mc-row,
.loan-mobile-card .lm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid #F8FAFC;
    font-size: 0.85rem;
}
.mob-card .mc-row:last-child,
.loan-mobile-card .lm-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mob-card .mc-lbl,
.loan-mobile-card .lm-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
}

.mob-card .mc-val,
.loan-mobile-card .lm-val {
    font-weight: 700;
    color: #1E293B;
    text-align: right;
}
.staff-user-sub,
.tbl-sub,
.bottom-sub {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}


/* ── 5. QUICK ACTIONS & FILTER CONTROLS ────────────────────────────────── */
.exec-filter-bar {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: #FAFAFA;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.filter-controls-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .filter-controls-wrap {
        width: auto;
    }
}

.filter-search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.filter-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.filter-search-box input {
    width: 100%;
    padding: 0.48rem 0.85rem 0.48rem 2.35rem;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 0.84rem;
    background: #ffffff;
    color: #1E293B;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.filter-search-box input:focus {
    outline: none;
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.48rem 0.9rem;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}
.filter-btn:hover,
.filter-btn:focus {
    border-color: #0D9488;
    color: #0D9488;
    background: #F0FDFA;
}

@media (max-width: 575.98px) {
    .exec-filter-bar {
        padding: 0.9rem 1rem !important;
    }
    .filter-controls-wrap {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
    }
    .filter-search-box {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .filter-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

.quick-actions-card {
    background: #ffffff;
    border: 1px solid #EEF2F6;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.quick-btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}
.quick-action-btn {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.85rem 0.75rem;
    text-align: center;
    text-decoration: none;
    color: #334155;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}
.quick-action-btn:hover {
    background: #ffffff;
    border-color: #0D9488;
    color: #0D9488;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(13, 148, 136, 0.1);
}
.quick-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.qicon-teal   { background: #F0FDFA; color: #0D9488; }
.qicon-green  { background: #ECFDF5; color: #10B981; }
.qicon-indigo { background: #EEF2FF; color: #6366F1; }
.qicon-amber  { background: #FFFBEB; color: #F59E0B; }

.exec-filter-bar {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: #FAFAFA;
}
.exec-search-input,
.exec-select-filter,
.exec-report-input,
.exec-report-select {
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    background: #ffffff;
    color: #1E293B;
    transition: border 0.2s;
}


/* ── 6. TABLES & MOBILE TOUCH CARDS ────────────────────────────────────── */
.exec-table {
    width: 100%;
    border-collapse: collapse;
}
.exec-table th {
    background: #F8FAFC;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748B;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #E2E8F0;
    text-align: left;
}
.exec-table td {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.85rem;
    color: #1E293B;
    vertical-align: middle;
}
.exec-table tr:hover td {
    background: #FAFAFA;
}

.mob-card,
.loan-mobile-card {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 0.85rem;
    box-sizing: border-box !important;
    width: 100% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.mob-card .mc-row,
.loan-mobile-card .lm-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.45rem 0;
    border-bottom: 1px solid #F8FAFC;
    font-size: 0.83rem;
}
.mob-card .mc-row:last-child,
.loan-mobile-card .lm-row:last-child {
    border-bottom: none;
}
.mob-card .mc-label,
.loan-mobile-card .lm-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
}
.mob-card .mc-val,
.loan-mobile-card .lm-val {
    font-weight: 600;
    color: #1E293B;
    text-align: right;
}

.action-eye-btn,
.bottom-action-eye-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #F0FDFA;
    color: #0D9488;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.action-eye-btn:hover,
.bottom-action-eye-box:hover {
    background: #0D9488;
    color: #ffffff;
}


/* ── 7. PAGINATION SYSTEM ──────────────────────────────────────────────── */
.exec-pagination-box,
.card-footer {
    padding: 1.15rem 1.4rem !important;
    background: #FAFAFA !important;
    border-top: 1px solid #F1F5F9;
}
.exec-pagination-box nav {
    width: 100%;
}
.exec-pagination-box .pagination {
    margin-bottom: 0 !important;
    gap: 4px;
}
.exec-pagination-box .page-link,
.pagination .page-item .page-link {
    border-radius: 8px !important;
    color: #0D9488 !important;
    font-weight: 700;
    border: 1px solid #E2E8F0;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    box-shadow: none !important;
}
.exec-pagination-box .page-item.active .page-link,
.pagination .page-item.active .page-link {
    background-color: #0D9488 !important;
    border-color: #0D9488 !important;
    color: #ffffff !important;
}


/* ── 8. COMPLETE DARK MODE ENGINE ──────────────────────────────────────── */
body.dark-mode {
    background-color: #0F172A !important;
    color: #E2E8F0 !important;
}
body.dark-mode .nk-content {
    background-color: #0F172A !important;
}

/* Sidebar Dark Overrides */
body.dark-mode .nk-sidebar,
body.dark-mode .nk-sidebar.is-dark,
body.dark-mode .nk-sidebar.nk-sidebar-fixed,
body.dark-mode .nk-sidebar-element,
body.dark-mode .nk-sidebar-content,
body.dark-mode .nk-sidebar-menu,
body.dark-mode .nk-sidebar-head,
body.dark-mode .nk-sidebar-body,
body.dark-mode .nk-sidebar .simplebar-content,
body.dark-mode .nk-sidebar .simplebar-scroll-content,
body.dark-mode .nk-sidebar .simplebar-mask,
body.dark-mode .nk-sidebar .simplebar-offset {
    background: #0F172A !important;
    background-color: #0F172A !important;
    border-right-color: #334155 !important;
}
body.dark-mode .nk-sidebar-head,
body.dark-mode .nk-sidebar-element.nk-sidebar-head,
body.dark-mode .nk-sidebar .nk-sidebar-head {
    background: #0F172A !important;
    background-color: #0F172A !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .nk-sidebar .nk-menu-heading,
body.dark-mode .nk-sidebar .nk-menu-heading h6,
body.dark-mode .nk-sidebar .overline-title {
    color: #64748B !important;
}
body.dark-mode .nk-sidebar .nk-menu-link {
    color: #94A3B8 !important;
}
body.dark-mode .nk-sidebar .nk-menu-icon .icon {
    color: #94A3B8 !important;
}
body.dark-mode .nk-sidebar .nk-menu-link:hover {
    background: #1E293B !important;
    background-color: #1E293B !important;
    color: #F8FAFC !important;
}
body.dark-mode .nk-sidebar .nk-menu-link:hover .nk-menu-icon .icon {
    color: #F8FAFC !important;
}
body.dark-mode .nk-sidebar .nk-menu-item.active > .nk-menu-link,
body.dark-mode .nk-sidebar .nk-menu-item.current-menu > .nk-menu-link {
    background: #1E293B !important;
    background-color: #1E293B !important;
    color: #F8FAFC !important;
    border-left-color: #0D9488 !important;
}
body.dark-mode .nk-sidebar .nk-menu-item.active > .nk-menu-link .nk-menu-icon .icon,
body.dark-mode .nk-sidebar .nk-menu-item.current-menu > .nk-menu-link .nk-menu-icon .icon {
    color: #0D9488 !important;
}
body.dark-mode .nk-sidebar .nk-menu-sub {
    background: #0B132B !important;
    background-color: #0B132B !important;
}
body.dark-mode .nk-sidebar .nk-menu-sub .nk-menu-link {
    color: #94A3B8 !important;
}
body.dark-mode .nk-sidebar .nk-menu-sub .nk-menu-link:hover {
    color: #F8FAFC !important;
    background: #1E293B !important;
}

/* Header & Footer Dark Overrides */
body.dark-mode .nk-header {
    background: #1E293B !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .nk-header .user-name {
    color: #F8FAFC !important;
}
body.dark-mode .nk-footer {
    background: #1E293B !important;
    border-top-color: #334155 !important;
}

/* Cards & Containers Dark Overrides */
body.dark-mode .exec-card,
body.dark-mode .exec-main-card,
body.dark-mode .exec-stat-card,
body.dark-mode .staff-stat-card,
body.dark-mode .quick-actions-card,
body.dark-mode .mob-card,
body.dark-mode .loan-mobile-card,
body.dark-mode .repay-main-card,
body.dark-mode .repay-stat-card,
body.dark-mode .report-gen-card,
body.dark-mode .kpi-card,
body.dark-mode .bottom-card,
body.dark-mode .card {
    background: #1E293B !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

body.dark-mode .dash-hero-banner {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 50%, #1E1B4B 100%) !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}
body.dark-mode .dash-hero-subtitle {
    color: #94A3B8 !important;
}
body.dark-mode .dash-hero-stat-pill {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
body.dark-mode .dash-hero-stat-lbl {
    color: #94A3B8 !important;
}

body.dark-mode .report-gen-header,
body.dark-mode .exec-card-head,
body.dark-mode .exec-filter-bar,
body.dark-mode .bottom-repay-tabs,
body.dark-mode .repay-tabs-bar {
    background: #1E293B !important;
    border-color: #334155 !important;
}

body.dark-mode .quick-action-btn {
    background: #0F172A !important;
    border-color: #334155 !important;
    color: #E2E8F0 !important;
}
body.dark-mode .quick-action-btn:hover {
    background: #1E293B !important;
    border-color: #0D9488 !important;
    color: #0D9488 !important;
}

body.dark-mode .exec-card-title,
body.dark-mode .page-head-title,
body.dark-mode .exec-stat-val,
body.dark-mode .staff-stat-val,
body.dark-mode .staff-user-name,
body.dark-mode .bottom-name,
body.dark-mode .tbl-name,
body.dark-mode .field-label,
body.dark-mode .shortcuts-title,
body.dark-mode .repay-stat-val,
body.dark-mode .repay-page-title,
body.dark-mode .kpi-value,
body.dark-mode .bottom-card-title,
body.dark-mode .card-title .title,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #F8FAFC !important;
}

body.dark-mode .page-head-sub,
body.dark-mode .exec-stat-lbl,
body.dark-mode .staff-stat-lbl,
body.dark-mode .staff-user-sub,
body.dark-mode .bottom-sub,
body.dark-mode .tbl-sub,
body.dark-mode .shortcuts-sub,
body.dark-mode .exec-stat-sub,
body.dark-mode .staff-stat-sub,
body.dark-mode .kpi-label,
body.dark-mode .kpi-subtext,
body.dark-mode .sub-text {
    color: #94A3B8 !important;
}

body.dark-mode .exec-table th {
    background: #0F172A !important;
    color: #94A3B8 !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .exec-table td {
    color: #CBD5E1 !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .exec-table tr:hover td,
body.dark-mode .bottom-activity-row:hover,
body.dark-mode .staff-activity-row:hover {
    background: #0F172A !important;
}
body.dark-mode .bottom-activity-row,
body.dark-mode .staff-activity-row {
    border-bottom-color: #334155 !important;
}

body.dark-mode .exec-search-input,
body.dark-mode .exec-select-filter,
body.dark-mode .exec-report-input,
body.dark-mode .exec-report-select,
body.dark-mode .exec-input-sm,
body.dark-mode .filter-btn,
body.dark-mode .filter-search-box input,
body.dark-mode select,
body.dark-mode input {
    background: #0F172A !important;
    border-color: #334155 !important;
    color: #F8FAFC !important;
}

body.dark-mode .shortcuts-box {
    background: #0F172A !important;
    border-color: #334155 !important;
}
body.dark-mode .shortcut-btn {
    background: #1E293B !important;
    border-color: #334155 !important;
    color: #CBD5E1 !important;
}
body.dark-mode .shortcut-btn:hover {
    border-color: #0D9488 !important;
    color: #0D9488 !important;
    background: #0F172A !important;
}

body.dark-mode .exec-pagination-box,
body.dark-mode .card-footer,
body.dark-mode nav[role="navigation"],
body.dark-mode .pagination-container {
    background: #1E293B !important;
    background-color: #1E293B !important;
    border-top-color: #334155 !important;
    color: #94A3B8 !important;
}
body.dark-mode nav[role="navigation"] div,
body.dark-mode nav[role="navigation"] p,
body.dark-mode .exec-pagination-box p,
body.dark-mode .exec-pagination-box span {
    color: #94A3B8 !important;
}
body.dark-mode .page-link,
body.dark-mode .pagination .page-item .page-link,
body.dark-mode nav[role="navigation"] a,
body.dark-mode nav[role="navigation"] span[aria-current="page"] > span,
body.dark-mode nav[role="navigation"] span[aria-disabled="true"] > span {
    background-color: #0F172A !important;
    border-color: #334155 !important;
    color: #E2E8F0 !important;
}
body.dark-mode .page-item.active .page-link,
body.dark-mode nav[role="navigation"] span[aria-current="page"] > span {
    background-color: #0D9488 !important;
    border-color: #0D9488 !important;
    color: #ffffff !important;
}
body.dark-mode .page-item.disabled .page-link,
body.dark-mode nav[role="navigation"] span[aria-disabled="true"] > span {
    background-color: #1E293B !important;
    border-color: #334155 !important;
    color: #64748B !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCOUNT RECONCILIATION COMPONENT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.rc-root { font-family: 'Inter', sans-serif; }

/* KPI Cards */
.rc-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
@media(max-width: 768px) { 
    .rc-kpi-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
    .rc-kpi { padding: 16px 18px; }
    .rc-kpi-value { font-size: 1.25rem; }
}

.rc-kpi {
    background: #fff; border-radius: 14px; padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05); border: 1px solid #f0f0f0;
    position: relative; overflow: hidden; transition: transform 0.2s;
}
.rc-kpi:hover { transform: translateY(-2px); }
.rc-kpi::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.rc-kpi-blue::after  { background: linear-gradient(90deg, #1a56db, #60a5fa); }
.rc-kpi-green::after { background: linear-gradient(90deg, #057a55, #6ee7b7); }
.rc-kpi-gold::after  { background: linear-gradient(90deg, #d97706, #fcd34d); }

.rc-kpi-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 12px;
}
.rc-kpi-blue .rc-kpi-icon  { background: #eff6ff; color: #1a56db; }
.rc-kpi-green .rc-kpi-icon { background: #ecfdf5; color: #057a55; }
.rc-kpi-gold .rc-kpi-icon  { background: #fffbeb; color: #d97706; }

.rc-kpi-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #9ca3af; margin-bottom: 4px; }
.rc-kpi-value { font-size: 1.4rem; font-weight: 800; color: #111827; line-height: 1.2; }
.rc-kpi-sub   { font-size: 0.76rem; color: #6b7280; margin-top: 4px; }

/* Card Panel */
.rc-card {
    background: #fff; border-radius: 14px; border: 1px solid #f0f0f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05); overflow: visible; margin-bottom: 24px;
}
.rc-card-header {
    padding: 18px 22px; border-bottom: 1px solid #f4f4f5;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
    position: relative; z-index: 60; overflow: visible;
}
.rc-card-title { font-size: 1.05rem; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 8px; margin: 0; flex-wrap: wrap; }
.rc-card-title-dot { width: 9px; height: 9px; border-radius: 50%; background: #1a56db; flex-shrink: 0; }

/* ── Global Filter Dropdown Overlays (Prevents Dropdowns Hiding Under Tables) ── */
.exec-main-card,
.exec-card,
.card-panel {
    overflow: visible !important;
}

.exec-filter-bar,
.filter-bar-wrap,
.filter-controls-wrap {
    position: relative !important;
    z-index: 60 !important;
    overflow: visible !important;
}

.dropdown-menu,
.dropdown-menu-end,
.rc-filter-menu {
    z-index: 1070 !important;
}

.exec-table-wrapper,
.rc-table-responsive,
.table-responsive {
    position: relative;
    z-index: 1;
}

/* Controls */
.rc-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-search-wrap { position: relative; min-width: 260px; }
.rc-search-input {
    width: 100%; padding: 8px 14px 8px 36px; border-radius: 10px;
    border: 1px solid #e5e7eb; font-size: 0.82rem; outline: none; background: #f9fafb;
}
.rc-search-input:focus { border-color: #DA251C; background: #fff; }
.rc-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 0.95rem; }

.rc-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
    border-radius: 10px; border: 1px solid #e5e7eb; background: #fff;
    font-size: 0.82rem; font-weight: 600; color: #374151; cursor: pointer; text-decoration: none;
}
.rc-btn:hover { background: #f9fafb; color: #111827; }

/* Responsive Controls & Table Views */
@media (max-width: 767px) {
    .rc-card-header { padding: 14px 16px; flex-direction: column; align-items: stretch; gap: 12px; }
    .rc-controls { width: 100%; flex-wrap: nowrap; gap: 8px; }
    .rc-search-wrap { flex: 1; min-width: 0; }
    .rc-table-desktop { display: none !important; }
    .rc-table-mobile  { display: block; padding: 12px 14px; }
    .container-fluid  { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
}
@media (min-width: 768px) {
    .rc-table-mobile  { display: none !important; }
    .rc-table-desktop { display: block; }
}

@media (max-width: 575px) {
    .rc-filter-menu { width: calc(100vw - 32px) !important; max-width: 320px !important; }
    .rc-card-title { font-size: 0.95rem; }
}

/* Ensure Livewire loading hides table content strictly */
[wire\:loading\.remove][style*="display: none"],
[wire\:loading\.remove][style*="display:none"] {
    display: none !important;
}

/* Mobile Card Design */
.rc-mob-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s; width: 100%; box-sizing: border-box;
}
.rc-mob-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.rc-mob-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #f4f4f5; }
.rc-mob-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 4px 0; font-size: 0.82rem; }
.rc-mob-lbl { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #9ca3af; }
.rc-mob-val { font-weight: 600; color: #111827; text-align: right; max-width: 65%; word-break: break-word; }

/* Modern Custom Loader & Skeleton Shimmer */
.rc-loading-container {
    padding: 48px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
}
body.dark-mode .rc-loading-container {
    background: #151f2e;
    color: #e2e8f0;
}

.rc-loader-spinner-box {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px auto;
}
.rc-loader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(218, 37, 28, 0.12);
    border-top-color: #DA251C;
    border-radius: 50%;
    animation: rcSpin 0.75s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}
.rc-loader-pulse-dot {
    width: 12px;
    height: 12px;
    background: #DA251C;
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: rcPulse 1.2s ease-in-out infinite alternate;
}

@keyframes rcSpin {
    to { transform: rotate(360deg); }
}
@keyframes rcPulse {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.rc-loading-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
body.dark-mode .rc-loading-text { color: #e2e8f0; }

.rc-loading-subtext {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 24px;
}
body.dark-mode .rc-loading-subtext { color: #6b7f9e; }

/* Skeleton Shimmer Preview */
.rc-skeleton-box {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rc-skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f2f5 25%, #e6e8ec 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: rcShimmer 1.4s infinite;
}
body.dark-mode .rc-skeleton-line {
    background: linear-gradient(90deg, #1b2635 25%, #24344d 50%, #1b2635 75%);
    background-size: 200% 100%;
}
@keyframes rcShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Desktop Table */
.rc-table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rc-table { width: 100%; border-collapse: collapse; text-align: left; }
.rc-table th {
    padding: 12px 18px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: #6b7280; background: #f9fafb; border-bottom: 1px solid #edf2f7; white-space: nowrap;
}
.rc-table td { padding: 14px 18px; font-size: 0.84rem; color: #111827; border-bottom: 1px solid #f4f4f5; vertical-align: middle; }
.rc-table tr:hover td { background: #fafafa; }

.rc-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.rc-badge-credit { background: #dcfce7; color: #166534; }
.rc-badge-debit  { background: #fff0f0; color: #DA251C; }

/* DARK MODE */
body.dark-mode .rc-kpi      { background: #1b2635; border-color: #243044; }
body.dark-mode .rc-kpi-label { color: #6b7f9e; }
body.dark-mode .rc-kpi-value { color: #e2e8f0; }
body.dark-mode .rc-kpi-sub   { color: #6b7f9e; }
body.dark-mode .rc-card      { background: #1b2635; border-color: #243044; }
body.dark-mode .rc-card-header { border-bottom-color: #243044; }
body.dark-mode .rc-card-title { color: #e2e8f0; }
body.dark-mode .rc-search-input { background: #151f2e; border-color: #243044; color: #e2e8f0; }
body.dark-mode .rc-btn        { background: #151f2e; border-color: #243044; color: #e2e8f0; }
body.dark-mode .rc-table th   { background: #151f2e; border-bottom-color: #243044; color: #6b7f9e; }
body.dark-mode .rc-table td   { border-bottom-color: #1e2e42; color: #e2e8f0; }
body.dark-mode .rc-table tr:hover td { background: #1e2e42; }
body.dark-mode .rc-mob-card   { background: #151f2e; border-color: #243044; color: #e2e8f0; }
body.dark-mode .rc-mob-header { border-bottom-color: #243044; }
body.dark-mode .rc-mob-lbl    { color: #6b7f9e; }
body.dark-mode .rc-mob-val    { color: #e2e8f0; }

/* ── Due & Upcoming Repayments Component & Mobile Responsive ── */
.repay-page-header { margin-bottom: 1.5rem; }
.repay-page-title { font-size: 1.4rem; font-weight: 800; color: #0F172A; margin-bottom: 0.2rem; }
.repay-page-sub { font-size: 0.85rem; color: #64748B; margin: 0; }

.repay-stat-card {
    background: #ffffff; border: 1px solid #EEF2F6; border-radius: 14px;
    padding: 1.1rem 1.25rem; height: 100%; display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.repay-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.05); }
.repay-stat-card.border-red   { border-bottom: 3px solid #EF4444; }
.repay-stat-card.border-amber { border-bottom: 3px solid #F59E0B; }
.repay-stat-card.border-blue  { border-bottom: 3px solid #3B82F6; }
.repay-stat-card.border-green { border-bottom: 3px solid #10B981; }

.repay-stat-icon {
    width: 42px; height: 42px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.icon-red   { background: #FEF2F2; color: #EF4444; }
.icon-amber { background: #FFFBEB; color: #F59E0B; }
.icon-blue  { background: #EFF6FF; color: #3B82F6; }
.icon-green { background: #ECFDF5; color: #10B981; }

.repay-stat-val { font-size: 1.25rem; font-weight: 800; color: #0F172A; line-height: 1.1; }
.repay-stat-lbl { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #64748B; margin-bottom: 0.25rem; }
.repay-stat-sub { font-size: 0.75rem; color: #94A3B8; margin-top: 0.2rem; font-weight: 600; }

.repay-main-card {
    background: #ffffff; border: 1px solid #EEF2F6; border-radius: 16px;
    overflow: visible !important; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.repay-tabs-bar {
    padding: 1.1rem 1.4rem; border-bottom: 1px solid #F1F5F9;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; background: #FAFAFA;
}
.repay-tabs-list { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.repay-tab-pill {
    border: 1px solid #E2E8F0; background: #ffffff; font-size: 0.82rem; font-weight: 600; color: #64748B;
    padding: 0.45rem 0.95rem; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.2s ease;
}
.repay-tab-pill:hover { background: #F8FAFC; color: #0F172A; }
.repay-tab-pill.active {
    background: #EF4444; border-color: #EF4444; color: #ffffff !important; font-weight: 700; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.repay-tab-pill.active .tab-badge { background: rgba(0, 0, 0, 0.2); color: #ffffff; }
.tab-badge {
    background: #F1F5F9; color: #64748B; font-size: 0.7rem; font-weight: 700; min-width: 20px; height: 20px;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}

.repay-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.repay-search-input {
    border: 1px solid #E2E8F0; border-radius: 10px; padding: 0.45rem 0.85rem; font-size: 0.82rem; width: 240px; background: #ffffff; transition: border 0.2s;
}
.repay-search-input:focus { outline: none; border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
.repay-select-filter { border: 1px solid #E2E8F0; border-radius: 10px; padding: 0.45rem 0.75rem; font-size: 0.82rem; background: #ffffff; color: #334155; font-weight: 600; }

.repay-table { width: 100%; border-collapse: collapse; }
.repay-table th {
    background: #F8FAFC; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
    color: #64748B; padding: 0.85rem 1.25rem; border-bottom: 1px solid #E2E8F0; text-align: left;
}
.repay-table td { padding: 1.15rem 1.25rem; border-bottom: 1px solid #F1F5F9; font-size: 0.85rem; color: #1E293B; vertical-align: middle; }
.repay-table tr:last-child td { border-bottom: none; }
.repay-table tr:hover td { background: #FAFAFA; }

.tbl-user-card { display: flex; align-items: center; gap: 0.75rem; }
.tbl-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #E2E8F0; flex-shrink: 0; }
.tbl-name { font-weight: 700; color: #0F172A; line-height: 1.25; }
.tbl-sub { font-size: 0.75rem; color: #94A3B8; }

.repay-badge { font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 6px; display: inline-block; }
.badge-due-today { background: #DCFCE7; color: #15803D; }
.badge-due-tomorrow { background: #FEF08A; color: #854D0E; }
.badge-due-2days { background: #DBEAFE; color: #1D4ED8; }
.badge-daily { background: #E0F2FE; color: #0369A1; }
.badge-paid { background: #D1FAE5; color: #047857; }
.badge-unpaid { background: #FEE2E2; color: #B91C1C; }

.tbl-action-btn {
    width: 32px; height: 32px; border-radius: 8px; background: #FEF2F2; color: #EF4444;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; text-decoration: none; transition: all 0.2s ease;
}
.tbl-action-btn:hover { background: #EF4444; color: #ffffff; }

/* Mobile Card View (< 768px) */
.repay-cards-mobile { display: none; padding: 1rem; }
.repay-mob-card {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.1rem;
    margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: transform 0.2s ease;
}
.repay-mob-card:hover { transform: translateY(-2px); border-color: #cbd5e1; }
.repay-mob-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 0.9rem; padding-bottom: 0.75rem; border-bottom: 1px dashed #f1f5f9; }
.repay-mob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0.9rem; }
.repay-mob-item { display: flex; flex-direction: column; gap: 2px; }
.repay-mob-lbl { font-size: 0.68rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.repay-mob-val { font-size: 0.85rem; font-weight: 700; color: #0f172a; }
.repay-mob-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; pt-2; border-top: 1px solid #f8fafc; }

@media (max-width: 767.98px) {
    .repay-table-desktop { display: none !important; }
    .repay-cards-mobile { display: block !important; }
    .repay-tabs-bar { flex-direction: column; align-items: stretch; gap: 0.85rem; padding: 1rem; }
    .repay-tabs-list { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; width: 100%; -webkit-overflow-scrolling: touch; }
    .repay-tab-pill { flex-shrink: 0; }
    .repay-controls { flex-direction: column; align-items: stretch; width: 100%; }
    .repay-search-input, .repay-select-filter { width: 100% !important; }
    .repay-page-title { font-size: 1.2rem; }
}

/* Dark Mode Overrides for Custom Components */
body.dark-mode .bottom-card {
    background: #1B2635 !important;
    border-color: #243044 !important;
}

body.dark-mode .bottom-card-header {
    background: #151F2E !important;
    border-bottom-color: #243044 !important;
}

body.dark-mode .bottom-card-title,
body.dark-mode .bottom-name {
    color: #F8FAFC !important;
}

body.dark-mode .bottom-repay-tabs,
body.dark-mode .repay-tabs-bar {
    background: #151F2E !important;
    border-color: #243044 !important;
}

body.dark-mode .bottom-tab-btn {
    color: #94A3B8 !important;
}

body.dark-mode .bottom-tab-btn.active {
    background: #D92D20 !important;
    color: #FFFFFF !important;
}

body.dark-mode .bottom-activity-row,
body.dark-mode .staff-activity-row {
    border-bottom-color: #243044 !important;
}

body.dark-mode .bottom-activity-row:hover,
body.dark-mode .staff-activity-row:hover {
    background: #1E2E42 !important;
}

body.dark-mode .bottom-metric-footer {
    background: #151F2E !important;
    border-top: 1px solid #243044 !important;
}

body.dark-mode .bottom-metric-col {
    border-right: 1px solid #243044 !important;
}

body.dark-mode .bottom-metric-col .text-muted {
    color: #94A3B8 !important;
}

body.dark-mode .bottom-action-eye-box {
    background: #1E2E42 !important;
    color: #2DD4BF !important;
}

body.dark-mode .bottom-avatar,
body.dark-mode .staff-avatar,
body.dark-mode .tbl-avatar {
    border-color: #243044 !important;
}

