/* Modern Design System - Cashfree Portal */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-light: rgba(37, 99, 235, 0.08);
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Layout Tokens */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --border-soft: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-data: 'Inter', monospace;

    /* Legacy Compatibility Aliases */
    --text-main: var(--slate-900);
    --text-muted: var(--slate-500);
    --border-color: var(--slate-200);
    --bg-soft: var(--slate-50);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}


* {
    box-sizing: border-box;
}

html {
    font-size: 14.5px;
    /* Slightly larger base for better readability */
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--slate-800);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}



/* Module Display */
.module {
    display: none;
}

.module.active {
    display: block !important;
}

/* Tab Display Logic */

.tab-pane-content {
    display: none;
}

.tab-pane-content.active {
    display: block;
}



/* Premium Action Buttons - Higher Contrast & Solid Look */
.btn-action {
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    cursor: pointer;
}

.btn-action i {
    font-size: 0.8rem;
}

.btn-action-primary {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.btn-action-primary:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-action-success {
    background: #ecfdf5;
    color: #059669;
    border-color: #d1fae5;
}

.btn-action-success:hover {
    background: #059669;
    color: white;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.btn-action-info {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #e0f2fe;
}

.btn-action-info:hover {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.btn-action-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fee2e2;
}

.btn-action-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-action-slate {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.btn-action-slate:hover {
    background: #475569;
    color: white;
    border-color: #475569;
}



/* Premium Navigation Redesign */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-soft);
    padding: 0;
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container-fluid {
    height: 64px;
    max-width: 100%;
    padding: 0 32px;
}

.navbar-brand {
    font-weight: 800;
    color: var(--slate-900) !important;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-link {
    color: var(--slate-600) !important;
    font-weight: 600;
    padding: 8px 16px !important;
    margin: 0 4px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: var(--slate-50);
}

.nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-light) !important;
}

.nav-link i {
    font-size: 1rem;
    margin-right: 6px;
}


.dropdown-menu {
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0 !important;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i {
    color: #94a3b8;
    width: 1.2rem;
    text-align: center;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-item.active {
    background-color: #f1f5f9;
    color: var(--primary);
}

/* Main Container */
/* Main Container Layout */
body {
    background: var(--bg-main);
}

.container-fluid {
    padding: 16px 24px;
    max-width: 100%;
    margin: 0;
}


/* Page Headers */
.page-header {
    margin-bottom: 16px;
}


.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.8px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--slate-500);
    font-size: 1rem;
}


/* Premium Card System */
.card {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 2rem;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--slate-100);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.25rem 1.5rem;
}

/* Modern Tables */
.table-responsive {
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background: white;
    margin-top: 1rem;
    position: relative;
    /* Custom Scrollbar for large tables */
    scrollbar-width: thin;
    scrollbar-color: var(--slate-300) transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 20px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

.modal-body .table-responsive {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}


.table {
    margin-bottom: 0;
    width: 100%;
}

.table thead th {
    background-color: var(--slate-50);
    color: var(--slate-600);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1.1rem 0.85rem;
    border-bottom: 2px solid var(--slate-100);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody td {
    padding: 1rem 0.85rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    vertical-align: middle;
    font-size: 0.88rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    /* Critical for financial data alignment */
}

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

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

/* Status & Badges */
.badge {
    padding: 0.45em 0.85em;
    font-weight: 600;
    border-radius: 5px;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}

.bg-success {
    background-color: #ecfdf5 !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.bg-warning {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.bg-danger {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.bg-primary {
    background-color: #eff6ff !important;
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Text Utility Classes */
.text-slate-400 {
    color: var(--slate-400) !important;
}

.text-slate-500 {
    color: var(--slate-500) !important;
}

.text-slate-600 {
    color: var(--slate-600) !important;
}

.text-slate-700 {
    color: var(--slate-700) !important;
}

.text-slate-800 {
    color: var(--slate-800) !important;
}

.text-slate-900 {
    color: var(--slate-900) !important;
}

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

.premium-stat-card {
    background: #ffffff;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.premium-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.premium-stat-card.active {
    border-left: 4px solid var(--primary);
    background: #f8fbff;
}

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

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    line-height: 1;
}

.stat-info .stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.1;
    font-family: var(--font-heading);
    font-variant-numeric: tabular-nums;
}

/* Forms & Inputs */
.form-label {
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.form-control,
.form-select {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--slate-800);
    transition: all 0.2s;
    background-color: white;
}

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

/* Premium Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--slate-100);
    margin-bottom: 1.25rem;
}

.form-section-title i {
    color: var(--primary);
    font-size: 0.85rem;
}

/* Modal Data Tables (Label-Value Style) */
.data-table-compact {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 0.85rem;
}

.data-table-compact tr th {
    background: var(--slate-50);
    color: var(--slate-600);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    width: 35%;
    padding: 10px 15px;
    border-right: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
    vertical-align: middle;
}

.data-table-compact tr td {
    background: white;
    color: var(--slate-900);
    padding: 10px 15px;
    border-bottom: 1px solid var(--slate-100);
    vertical-align: middle;
}

.data-table-compact tr:last-child th,
.data-table-compact tr:last-child td {
    border-bottom: none;
}


/* Buttons Standardized */
.btn {
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 6px;
    gap: 6px;
}



.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--slate-200);
    background: white;
}

.btn-outline-primary:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* Footer Section */
.main-footer {
    background-color: white;
    border-top: 1px solid var(--slate-200);
    padding: 1rem 2rem;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--slate-500);
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module.active {
    animation: fadeInUp 0.4s ease forwards;
}

/* Animations & Skeleton Loaders */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.skeleton-loading {
    background: #f6f7f8;
    background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    display: inline-block;
    position: relative;
    animation-duration: 1.2s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: shimmer;
    animation-timing-function: linear;
    border-radius: 4px;
    height: 12px;
    width: 100%;
}

.table-loading-row td {
    padding: 1.5rem 0.85rem !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .container-fluid {
        padding: 1rem;
    }

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

@media (max-width: 768px) {
    .navbar-brand span {
        display: none;
    }

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

    .filter-action-bar {
        flex-direction: column;
        width: 100%;
        gap: 10px !important;
    }
}

/* Dashboard-Slim Form Styles - Migrated from Payment Links */
.form-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 25px;
    border: none;
    box-shadow: none;
}

.form-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--slate-800);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--slate-100);
}

.form-section-title i {
    color: var(--primary);
    font-size: 0.8rem;
}

.form-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.02em;
}

.form-control,
.form-select {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid var(--slate-200) !important;
    background-color: #ffffff !important;
    transition: all 0.15s ease !important;
    height: 34px !important;
    color: var(--slate-800) !important;
    font-family: inherit !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-light) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: var(--slate-400);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Slim Row Styling for Bank Slots */
.bank-slot-row,
.bank-slots-header {
    display: grid !important;
    grid-template-columns: 80px 1.5fr 1fr;
    gap: 15px;
    align-items: center;
    padding: 6px 0;
}

.bank-slot-row {
    border-bottom: 1px dashed var(--slate-100);
    transition: all 0.2s ease;
    position: relative;
    min-height: 48px;
}

.bank-slot-row:last-child {
    border-bottom: none;
}

.bank-slot-row.clickable-row {
    cursor: pointer;
}

/* Checkbox Styling */
.bank-checkbox {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    margin: 0 !important;
    border: 1.5px solid var(--slate-300) !important;
}

.bank-checkbox:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.bank-checkbox:focus {
    box-shadow: none !important;
    outline: none !important;
}

.bank-slots-header {
    border-bottom: 2px solid var(--slate-100);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--slate-400);
    text-transform: uppercase;
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.bank-slot-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--slate-500);
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.bank-slot-label.mandatory {
    color: var(--primary);
}

/* Modal Wide/Slim Content Style */
.modal-body {
    padding: 15px 25px;
}

.modal-xl {
    max-width: 1140px;
}

.modal-content {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
}

.modal-header {
    padding: 12px 25px;
    background: #ffffff;
    border-bottom: 1px solid var(--slate-100);
}

.modal-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--slate-800);
    letter-spacing: -0.02em;
}

.modal-footer {
    border-top: 1px solid var(--slate-100) !important;
    padding: 16px 28px !important;
    background: #ffffff !important;
}

@media (max-width: 768px) {

    .bank-slot-row,
    .bank-slots-header {
        grid-template-columns: 50px 1.5fr 1fr;
    }
}