/**
 * MitraHelp - Ultra-Modern FinTech & E-Commerce Design System
 * Engineered for Enterprise Desktop & Seamless Mobile Web Experience
 */

/* ==========================================================================
   1. DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
    /* Brand Primary & Secondary Colors */
    --primary-navy: #0b1f3a;
    --primary-blue: #134074;
    --primary-deep: #081528;
    --accent-blue: #2563eb;
    --accent-indigo: #4f46e5;
    --accent-cyan: #0284c7;
    --accent-teal: #0d9488;
    --offer-orange: #ea580c;
    --offer-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;

    /* Backgrounds & Surfaces */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Borders & Dividers */
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0b1f3a 0%, #134074 60%, #1e3a8a 100%);
    --gradient-card-top: linear-gradient(90deg, #2563eb, #0d9488);
    --gradient-accent: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    --gradient-cyan: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
    --gradient-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-floating: 0 12px 35px rgba(11, 31, 58, 0.12);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    /* Mobile Bottom Navigation Height */
    --bottom-nav-height: 64px;
}

/* ==========================================================================
   2. CORE TYPOGRAPHY & RESPONSIVE RESET
   ========================================================================== */
html {
    font-size: 13.5px !important; /* Calibrated compact base for enterprise dashboards */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

@media (max-width: 991.98px) {
    html {
        font-size: 13px !important;
    }
}

@media (max-width: 575.98px) {
    html {
        font-size: 12.8px !important;
    }
}

body {
    font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.88rem !important;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    letter-spacing: -0.01em;
}

/* On mobile/tablet, provide buffer space for the bottom app dock */
@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(var(--bottom-nav-height) + 16px);
    }
}

/* Headings with Outfit font */
h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

h1, .h1 { font-size: 1.65rem !important; line-height: 1.25; }
h2, .h2 { font-size: 1.35rem !important; line-height: 1.3; }
h3, .h3 { font-size: 1.15rem !important; line-height: 1.35; }
h4, .h4 { font-size: 1.0rem !important; line-height: 1.4; }
h5, .h5 { font-size: 0.88rem !important; }
h6, .h6 { font-size: 0.78rem !important; }

@media (max-width: 576px) {
    h1, .h1 { font-size: 1.4rem !important; }
    h2, .h2 { font-size: 1.2rem !important; }
    h3, .h3 { font-size: 1.05rem !important; }
    h4, .h4 { font-size: 0.95rem !important; }
    h5, .h5 { font-size: 0.85rem !important; }
    h6, .h6 { font-size: 0.75rem !important; }
}

/* Inputs & Form Controls - 16px font-size on mobile inputs prevents iOS Safari auto-zooming */
.form-control, .form-select, .input-group-text {
    font-size: 0.82rem !important;
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {
    input.form-control, select.form-select, textarea.form-control {
        font-size: 16px !important; /* Critical to prevent iOS Safari auto-zoom on mobile inputs */
        padding: 0.5rem 0.75rem;
    }
}

.form-control:focus, .form-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
    background-color: #ffffff;
}

.form-label {
    font-size: 0.78rem !important;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

/* Buttons Upgrade */
.btn {
    font-size: 0.82rem !important;
    font-weight: 600;
    padding: 0.42rem 0.85rem;
    border-radius: var(--radius-md);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn:active {
    transform: scale(0.98);
}

.btn-lg {
    font-size: 0.9rem !important;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    font-size: 0.75rem !important;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-sm);
}

/* Primary Mitra Brand Button */
.btn-mitra-primary {
    background: linear-gradient(135deg, #0b1f3a 0%, #134074 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(11, 31, 58, 0.25) !important;
}

.btn-mitra-primary:hover {
    background: linear-gradient(135deg, #134074 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(19, 64, 116, 0.35) !important;
    transform: translateY(-1.5px);
}

/* Accent Action Button */
.btn-mitra-accent {
    background: linear-gradient(135deg, var(--offer-orange) 0%, #f59e0b 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28) !important;
}

.btn-mitra-accent:hover {
    background: linear-gradient(135deg, #c2410c 0%, #d97706 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4) !important;
    transform: translateY(-1.5px);
}

/* Soft Outline Button */
.btn-mitra-outline {
    background: #ffffff !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    box-shadow: var(--shadow-xs);
}

.btn-mitra-outline:hover {
    border-color: var(--accent-blue) !important;
    color: var(--accent-blue) !important;
    background: #eff6ff !important;
    transform: translateY(-1px);
}

/* Soft Tinted Pill Button */
.btn-mitra-soft {
    background: #eff6ff !important;
    color: var(--accent-blue) !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 600;
}

.btn-mitra-soft:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

/* Cards & Surfaces */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hoverable:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: #cbd5e1;
}

/* ==========================================================================
   3. MOBILE BOTTOM NAVIGATION DOCK (App-Like Ergonomics)
   ========================================================================== */
.mitra-mobile-bottom-dock {
    display: none;
}

@media (max-width: 991.98px) {
    .mitra-mobile-bottom-dock {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--bottom-nav-height);
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(226, 232, 240, 0.85);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
        z-index: 1045;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        align-items: center;
        justify-content: space-around;
    }

    .mitra-dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: #64748b;
        text-decoration: none !important;
        font-size: 0.68rem;
        font-weight: 600;
        gap: 3px;
        transition: color 0.18s ease;
        position: relative;
        padding: 4px 0;
    }

    .mitra-dock-item i {
        font-size: 1.15rem;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .mitra-dock-item:hover,
    .mitra-dock-item.active {
        color: var(--accent-blue);
    }

    .mitra-dock-item.active i {
        transform: translateY(-2px);
        color: var(--accent-blue);
    }

    .mitra-dock-highlight {
        color: var(--offer-orange) !important;
    }

    .mitra-dock-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 18px);
        background: var(--offer-orange);
        color: #fff;
        font-size: 0.58rem;
        font-weight: 800;
        min-width: 17px;
        height: 17px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #ffffff;
    }
}

/* ==========================================================================
   4. MOBILE OFFCANVAS SIDEBAR DRAWER
   ========================================================================== */
.mitra-mobile-drawer {
    width: 320px !important;
    max-width: 85vw !important;
    border-right: none;
    box-shadow: var(--shadow-xl);
}

.mitra-mobile-drawer .offcanvas-header {
    background: linear-gradient(135deg, #0b1f3a 0%, #134074 100%);
    color: #ffffff;
    padding: 1.25rem 1.2rem;
}

.mitra-drawer-userbox {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
}

.mitra-drawer-navlink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.18s ease;
}

.mitra-drawer-navlink:hover,
.mitra-drawer-navlink.active {
    background: #eff6ff;
    color: var(--accent-blue);
}

.mitra-drawer-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.mitra-drawer-navlink:hover .mitra-drawer-icon,
.mitra-drawer-navlink.active .mitra-drawer-icon {
    background: #dbeafe;
    color: var(--accent-blue);
}

/* ==========================================================================
   5. RESPONSIVE HORIZONTAL SCROLLABLE TABS
   ========================================================================== */
.nav-scrollable-mobile {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    gap: 8px;
    padding-bottom: 4px;
}

.nav-scrollable-mobile::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ==========================================================================
   6. RESPONSIVE TABLES WITH SLEEK CONTAINER
   ========================================================================== */
.table-responsive {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: #ffffff;
    box-shadow: var(--shadow-xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table {
    margin-bottom: 0;
    font-size: 0.8rem !important;
    vertical-align: middle;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 0.72rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.75rem !important;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 0.5rem 0.75rem !important;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    font-size: 0.8rem !important;
}

.table tbody tr:hover td {
    background-color: #f8fafc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   7. KPI METRIC STAT CARDS
   ========================================================================== */
.kpi-card-modern {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.kpi-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-card-top);
}

.kpi-card-blue::before { background: var(--gradient-card-top); }
.kpi-card-emerald::before { background: var(--gradient-emerald); }
.kpi-card-amber::before { background: var(--gradient-accent); }
.kpi-card-purple::before { background: var(--gradient-purple); }

.kpi-icon-pill {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.kpi-icon-blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-emerald { background: #ecfdf5; color: #059669; }
.kpi-icon-amber { background: #fffbeb; color: #d97706; }
.kpi-icon-purple { background: #faf5ff; color: #7e22ce; }
.kpi-icon-rose { background: #fff1f2; color: #e11d48; }

.kpi-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem !important;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 3px 0 2px 0;
}

@media (max-width: 576px) {
    .kpi-number {
        font-size: 1.2rem !important;
    }
    .kpi-card-modern {
        padding: 0.85rem 0.8rem;
    }
}

.kpi-label {
    font-size: 0.7rem !important;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   8. PRODUCT CARDS (Fully Mobile Fitted 2-Col Grid)
   ========================================================================== */
.product-grid-mobile {
    margin-right: -6px;
    margin-left: -6px;
}

.product-grid-mobile > [class*="col-"] {
    padding-right: 6px;
    padding-left: 6px;
    margin-bottom: 12px;
}

.product-card-modern {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xs);
    position: relative;
}

.product-card-modern:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.product-card-modern .product-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 85%; /* Responsive 1:0.85 Aspect Ratio */
    background: #f8fafc;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.product-card-modern .product-thumb-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.35s ease;
}

.product-card-modern:hover .product-thumb-container img {
    transform: scale(1.05);
}

.product-card-modern .product-badge-float {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.product-card-modern .product-content {
    padding: 10px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media (max-width: 576px) {
    .product-card-modern .product-content {
        padding: 8px 9px 10px 9px;
    }
}

.product-card-modern .product-brand-tag {
    font-size: 0.65rem !important;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.product-card-modern .product-title-clamp {
    font-size: 0.8rem !important;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.15rem !important;
}

@media (max-width: 576px) {
    .product-card-modern .product-title-clamp {
        font-size: 0.76rem !important;
        height: 2.05rem !important;
    }
}

.product-card-modern .price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.product-card-modern .price-current {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem !important;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.product-card-modern .price-mrp {
    font-size: 0.72rem !important;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-card-modern .btn-add-cart {
    width: 100%;
    font-size: 0.76rem !important;
    font-weight: 700;
    padding: 0.38rem 0.55rem !important;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   9. BBPS SERVICE GRID (Mobile Optimized)
   ========================================================================== */
.bbps-service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .bbps-service-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .bbps-service-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

.bbps-service-tile {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bbps-service-tile:hover,
.bbps-service-tile.active {
    border-color: var(--accent-blue);
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.bbps-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 6px;
    transition: all 0.22s ease;
}

.bbps-service-tile:hover .bbps-tile-icon,
.bbps-service-tile.active .bbps-tile-icon {
    background: var(--accent-blue);
    color: #ffffff;
    transform: scale(1.08);
}

.bbps-tile-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .bbps-tile-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    .bbps-tile-title {
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   10. STATUS BADGES & CHIPS
   ========================================================================== */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-chip-active, .status-chip-success, .status-chip-completed {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-chip-pending, .status-chip-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-chip-danger, .status-chip-failed, .status-chip-inactive, .status-chip-disabled {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-chip-info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ==========================================================================
   11. WALLET PILL IN NAVBAR
   ========================================================================== */
.wallet-pill-navbar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.2s ease;
}

.wallet-pill-navbar:hover {
    background: #d1fae5;
    color: #065f46;
    transform: translateY(-1px);
}

/* ==========================================================================
   12. COUPON / VOUCHER TICKET
   ========================================================================== */
.coupon-ticket {
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 14px;
    position: relative;
    transition: all 0.22s ease;
}

.coupon-ticket:hover {
    border-color: var(--offer-orange);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.12);
}

/* ==========================================================================
   13. MODALS & DIALOGS
   ========================================================================== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.15rem 1.4rem;
}

.modal-body {
    padding: 1.4rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 0.9rem 1.4rem;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.75rem;
    }
    .modal-content {
        border-radius: var(--radius-lg);
    }
    .modal-body {
        padding: 1.15rem;
    }
}

/* ==========================================================================
   14. PORTAL TABS & CONTROL PANELS MOBILE ERGONOMICS
   ========================================================================== */
@media (max-width: 991.98px) {
    /* Superadmin Settings Left Sidebar Tabs transform into swipeable strip */
    #settingsTab {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px !important;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }
    #settingsTab::-webkit-scrollbar {
        display: none;
    }
    #settingsTab .settings-cat-btn {
        min-width: 180px !important;
        flex: 0 0 auto !important;
    }

    /* Downline Category Filters */
    .downline-cat-wrapper .row {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
    }
    .downline-cat-wrapper .row::-webkit-scrollbar {
        display: none;
    }
    .downline-cat-wrapper .row > .col {
        min-width: 175px !important;
        flex: 0 0 auto !important;
    }

    /* Activation Code Tabs */
    #activationCodeTabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
    }
    #activationCodeTabs::-webkit-scrollbar {
        display: none;
    }
    #activationCodeTabs > .nav-item {
        min-width: 180px !important;
        flex: 0 0 auto !important;
    }
}

/* Smooth Focus Glow & Touch Targets */
input:focus, select:focus, textarea:focus, button:focus {
    outline: none !important;
}

/* Micro-interaction for active cards */
.interactive-card {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.interactive-card:active {
    transform: scale(0.98);
}

/* ==========================================================================
   15. VIBRANT FINTECH COLOR UPGRADE & GLOW EFFECTS
   ========================================================================== */

/* Animated Pulse Dot for Live Status */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 1.8s infinite;
    vertical-align: middle;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Category-Specific BBPS Card Visual Identity */
.bbps-card-electricity .bbps-service-icon { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #d97706; border: 1px solid #fde68a; }
.bbps-card-mobile .bbps-service-icon { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; border: 1px solid #bfdbfe; }
.bbps-card-fastag .bbps-service-icon { background: linear-gradient(135deg, #faf5ff, #f3e8ff); color: #7c3aed; border: 1px solid #e9d5ff; }
.bbps-card-dth .bbps-service-icon { background: linear-gradient(135deg, #fff1f2, #ffe4e6); color: #e11d48; border: 1px solid #fecdd3; }
.bbps-card-gas .bbps-service-icon { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #ea580c; border: 1px solid #fed7aa; }
.bbps-card-water .bbps-service-icon { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); color: #0d9488; border: 1px solid #99f6e4; }
.bbps-card-broadband .bbps-service-icon { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #4f46e5; border: 1px solid #c7d2fe; }
.bbps-card-loan .bbps-service-icon { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #059669; border: 1px solid #a7f3d0; }

.bbps-card-electricity:hover .bbps-service-icon, .bbps-card-electricity.active .bbps-service-icon { background: #d97706 !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35); }
.bbps-card-mobile:hover .bbps-service-icon, .bbps-card-mobile.active .bbps-service-icon { background: #2563eb !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35); }
.bbps-card-fastag:hover .bbps-service-icon, .bbps-card-fastag.active .bbps-service-icon { background: #7c3aed !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35); }
.bbps-card-dth:hover .bbps-service-icon, .bbps-card-dth.active .bbps-service-icon { background: #e11d48 !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35); }
.bbps-card-gas:hover .bbps-service-icon, .bbps-card-gas.active .bbps-service-icon { background: #ea580c !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35); }
.bbps-card-water:hover .bbps-service-icon, .bbps-card-water.active .bbps-service-icon { background: #0d9488 !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35); }
.bbps-card-broadband:hover .bbps-service-icon, .bbps-card-broadband.active .bbps-service-icon { background: #4f46e5 !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35); }
.bbps-card-loan:hover .bbps-service-icon, .bbps-card-loan.active .bbps-service-icon { background: #059669 !important; color: #ffffff !important; box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35); }

/* Modern Mesh Gradient Hero */
.hero-gradient-mesh {
    background: radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.08) 0%, transparent 45%),
                radial-gradient(circle at 10% 90%, rgba(13, 148, 136, 0.07) 0%, transparent 45%),
                linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
}

/* User-Friendly Service Hover Card */
.service-hover-card {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease !important;
}
.service-hover-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09) !important;
    border-color: #93c5fd !important;
}

/* Auth Cards & Forms */
.auth-hero-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.auth-header-gradient {
    background: linear-gradient(135deg, #0b1f3a 0%, #134074 60%, #1d4ed8 100%);
    color: #ffffff;
    padding: 2rem 1.75rem;
    position: relative;
}

.auth-header-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #ea580c, #10b981);
}

/* Floating Trust Badge */
.trust-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   16. AUTHENTICATION & REGISTRATION RADIO CARDS
   ========================================================================== */
.auth-role-card {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    background: #ffffff;
    padding: 1rem 0.9rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-role-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.auth-role-card .role-check-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: transparent;
    transition: all 0.2s ease;
}

.btn-check:checked + .auth-role-card {
    border-color: var(--accent-blue);
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.btn-check:checked + .auth-role-card .role-check-indicator {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.btn-check:checked + .auth-role-card.role-retailer-theme {
    border-color: #059669;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.15);
}

.btn-check:checked + .auth-role-card.role-retailer-theme .role-check-indicator {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.auth-role-card .auth-role-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 8px;
    transition: all 0.22s ease;
}

.btn-check:checked + .auth-role-card .auth-role-icon {
    background: var(--accent-blue);
    color: #ffffff;
    transform: scale(1.08);
}

.btn-check:checked + .auth-role-card.role-retailer-theme .auth-role-icon {
    background: #059669;
    color: #ffffff;
    transform: scale(1.08);
}

/* Welcome Bonus Callout Banner */
.bonus-callout-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #92400e;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.bonus-coin-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   17. UNIVERSAL FITTED ENTERPRISE SCALE OVERRIDES
   Ensures cards, badges, dropdowns, modals, and lists stay crisp and fitted
   ========================================================================== */
.card-title, .h5.card-title {
    font-size: 0.95rem !important;
    font-weight: 700;
}

.card-subtitle {
    font-size: 0.75rem !important;
}

.badge {
    font-size: 0.7rem !important;
    font-weight: 600;
}

.dropdown-menu {
    font-size: 0.82rem !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.dropdown-item {
    font-size: 0.82rem !important;
    padding: 0.38rem 0.85rem;
}

.modal-title {
    font-size: 1.05rem !important;
    font-weight: 700;
}

.modal-body {
    font-size: 0.84rem !important;
}

.offcanvas-body {
    font-size: 0.84rem !important;
}

.nav-tabs .nav-link, .nav-pills .nav-link {
    font-size: 0.82rem !important;
    font-weight: 600;
}

.breadcrumb {
    font-size: 0.78rem !important;
}

.alert {
    font-size: 0.82rem !important;
    padding: 0.55rem 0.85rem;
}

.pagination {
    font-size: 0.8rem !important;
}

.page-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem !important;
}

small, .small {
    font-size: 0.75rem !important;
}

/* ==========================================================================
   18. BHARAT FINTECH VISUAL REFRESH
   Clear information hierarchy, confident colour and comfortable mobile use.
   ========================================================================== */
:root {
    --bharat-blue: #0a57a4;
    --bharat-navy: #082b5c;
    --bharat-saffron: #e85d18;
    --bharat-green: #09826b;
    --bharat-ink: #14213d;
    --bharat-mist: #f6f8fc;
}

body {
    background:
        radial-gradient(circle at 100% 0, rgba(10, 87, 164, 0.035), transparent 27rem),
        var(--bharat-mist);
    font-weight: 500;
}

::selection {
    color: #fff;
    background: var(--bharat-blue);
}

.top-ribbon {
    background: linear-gradient(90deg, #082b5c 0%, #0a57a4 52%, #087f8c 100%);
}

.main-navbar {
    border-bottom: 1px solid rgba(10, 87, 164, 0.08);
    box-shadow: 0 6px 22px rgba(8, 43, 92, 0.07);
}

.brand-icon-box {
    background: linear-gradient(135deg, var(--bharat-blue), #087f8c 70%, var(--bharat-green));
    box-shadow: 0 5px 15px rgba(10, 87, 164, 0.25);
}

.brand-title { color: var(--bharat-navy); }
.brand-subtitle { color: var(--bharat-green); }

.nav-link:hover, .nav-link.active {
    color: var(--bharat-blue) !important;
    background: #edf5ff;
}

.mitra-home-hero {
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 93% 15%, rgba(232, 93, 24, 0.12), transparent 20rem),
        radial-gradient(circle at 9% 90%, rgba(9, 130, 107, 0.1), transparent 24rem),
        linear-gradient(135deg, #ffffff 0%, #f4f8ff 58%, #f7fbfa 100%) !important;
}

.mitra-home-hero::before,
.mitra-home-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.mitra-home-hero::before {
    width: 19rem;
    height: 19rem;
    top: -13rem;
    right: 19%;
    border: 28px solid rgba(232, 93, 24, 0.06);
}

.mitra-home-hero::after {
    width: 15rem;
    height: 15rem;
    bottom: -11rem;
    left: 32%;
    border: 24px solid rgba(9, 130, 107, 0.055);
}

.mitra-hero-kicker {
    background: #e9f7f4 !important;
    border: 1px solid #bde7dc;
    color: #08715f !important;
    letter-spacing: 0.01em;
}

.mitra-hero-title {
    max-width: 52rem;
    color: var(--bharat-ink) !important;
    font-size: clamp(2rem, 3.8vw, 3.45rem) !important;
}

.mitra-text-gradient {
    background: linear-gradient(135deg, var(--bharat-blue), #087f8c) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.mitra-text-saffron { color: var(--bharat-saffron) !important; }

.mitra-action-citizen {
    background: linear-gradient(135deg, var(--bharat-green), #087f8c) !important;
    border: 0 !important;
    box-shadow: 0 7px 18px rgba(9, 130, 107, 0.22) !important;
}

.mitra-action-citizen:hover { background: linear-gradient(135deg, #076b59, #086976) !important; }

.mitra-trust-grid {
    border-top: 1px solid rgba(10, 87, 164, 0.13) !important;
}

.mitra-trust-grid > div > div {
    line-height: 1.18;
}

.mitra-trust-grid .fs-4 {
    font-family: 'Outfit', 'Noto Sans', sans-serif;
    font-weight: 800;
}

.mitra-pay-panel {
    border: 1px solid rgba(10, 87, 164, 0.14) !important;
    box-shadow: 0 18px 48px rgba(8, 43, 92, 0.16) !important;
}

.mitra-pay-panel-head {
    background: linear-gradient(120deg, var(--bharat-navy), var(--bharat-blue) 58%, #087f8c) !important;
    border-bottom: 3px solid var(--bharat-saffron);
}

.mitra-section-soft {
    background:
        radial-gradient(circle at 92% 0, rgba(232, 93, 24, 0.065), transparent 17rem),
        linear-gradient(180deg, #f8fbff 0%, #f1faf8 52%, #ffffff 100%) !important;
}

.mitra-info-card {
    border-color: #dbe6f1 !important;
    box-shadow: 0 7px 20px rgba(8, 43, 92, 0.055) !important;
}

.mitra-info-card::before {
    content: '';
    display: block;
    height: 3px;
    margin: -0.75rem -0.75rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bharat-blue), #087f8c, var(--bharat-saffron));
}

.mitra-info-card:hover {
    border-color: #9ac4e8 !important;
    box-shadow: 0 14px 30px rgba(8, 43, 92, 0.11) !important;
}

.mitra-bbps-section { background: #fff; }

.mitra-offers-section {
    background: linear-gradient(180deg, #fff8f4 0%, #fff 100%);
}

.mitra-cta-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(118deg, #082b5c 0%, #0a57a4 55%, #087f8c 100%) !important;
}

.mitra-cta-section::after {
    content: '';
    position: absolute;
    inset: auto -8rem -12rem auto;
    width: 25rem;
    height: 25rem;
    border: 34px solid rgba(245, 166, 35, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .mitra-home-hero { padding-top: 2.2rem !important; }
    .mitra-home-hero .container { padding-right: 1rem; padding-left: 1rem; }
    .mitra-hero-title { font-size: 2rem !important; line-height: 1.2 !important; }
    .mitra-home-hero .lead { font-size: 0.98rem; line-height: 1.65 !important; }
    .mitra-home-hero .btn-lg { flex: 1 1 100%; min-height: 46px; }
    .mitra-trust-grid > div { padding: 0.55rem 0.65rem; }
    .mitra-trust-grid > div > div:first-child { font-size: 1.22rem !important; }
    .mitra-pay-panel { border-radius: 1rem !important; }
    .mitra-info-card::before { margin: -0.75rem -0.75rem 0.75rem; }
}

@media (max-width: 420px) {
    .mitra-hero-kicker { font-size: 0.67rem !important; }
    .mitra-trust-grid small { font-size: 0.66rem !important; }
}

/* Contrast guardrails: keep foreground text readable on coloured surfaces. */
.mitra-pay-panel-head,
.flash-deal-banner,
.mitra-cta-section {
    color: #ffffff !important;
}

.mitra-pay-panel-head h1,
.mitra-pay-panel-head h2,
.mitra-pay-panel-head h3,
.mitra-pay-panel-head h4,
.mitra-pay-panel-head h5,
.mitra-pay-panel-head h6,
.flash-deal-banner h1,
.flash-deal-banner h2,
.flash-deal-banner h3,
.flash-deal-banner h4,
.flash-deal-banner h5,
.flash-deal-banner h6,
.mitra-cta-section h1,
.mitra-cta-section h2,
.mitra-cta-section h3,
.mitra-cta-section h4,
.mitra-cta-section h5,
.mitra-cta-section h6 {
    color: #ffffff !important;
}

.flash-deal-banner .text-light,
.flash-deal-banner .text-white-50,
.mitra-cta-section p {
    color: #e8f1fb !important;
}

footer {
    color: #b7c7da !important;
}

footer .text-secondary,
footer .text-muted {
    color: #b7c7da !important;
}

footer a.text-secondary {
    color: #cbd9e8 !important;
    transition: color 0.18s ease;
}

footer a.text-secondary:hover,
footer .hover-white:hover {
    color: #ffffff !important;
}



