@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --background-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
}

body.modern-blue {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Enhanced Topbar */
body.modern-blue .topbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

body.modern-blue .topbar h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.modern-blue .change-lang {
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: 0 2px;
}

body.modern-blue .change-lang:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

body.modern-blue .change-lang img {
    transition: var(--transition-fast);
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
}

body.modern-blue .change-lang:hover img {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

body.modern-blue .card {
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    overflow: hidden;
    position: relative;
    animation: slideInUp 0.6s ease-out;
}

body.modern-blue .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: var(--transition-normal);
}

body.modern-blue .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

body.modern-blue .card:hover::before {
    opacity: 1;
}

body.modern-blue .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

body.modern-blue .accordion-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

body.modern-blue .accordion-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

body.modern-blue .accordion-button:hover::before {
    left: 100%;
}

body.modern-blue .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.modern-blue .accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    outline: none;
}

body.modern-blue .accordion-body {
    background: var(--background-primary);
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

body.modern-blue .form-control,
body.modern-blue .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    box-shadow: var(--shadow-sm);
}

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

body.modern-blue .form-control:hover,
body.modern-blue .form-select:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

body.modern-blue .input {
    position: relative;
}

body.modern-blue .input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition-fast);
    z-index: 2;
}
body.modern-blue .input .form-control:focus + i,
body.modern-blue .input:hover i {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

body.modern-blue .card-text,
body.modern-blue label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    display: block;
}

body.modern-blue .text-danger {
    color: var(--danger-color) !important;
    font-weight: 700;
}

body.modern-blue .text-primary {
    color: var(--primary-color) !important;
    font-weight: 600;
}

body.modern-blue .btn {
    border-radius: var(--radius-lg);
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-md);
}

body.modern-blue .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

body.modern-blue .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

body.modern-blue .btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

body.modern-blue .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

body.modern-blue .btn:hover::before {
    left: 100%;
}

body.modern-blue .select2-container--default .select2-selection--single {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    height: auto;
    padding: 0.875rem 1rem;
    background: var(--background-primary);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

body.modern-blue .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow-md);
}

body.modern-blue .select2-dropdown {
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    background: var(--background-primary);
}

body.modern-blue .custom-hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
    position: relative;
}

body.modern-blue .custom-hr::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

body.modern-blue h5 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

body.modern-blue p {
    color: var(--text-secondary);
    line-height: 1.1;
    margin-bottom: 1rem;
}

body.modern-blue img {
    transition: var(--transition-normal);
    border-radius: var(--radius-md);
}

body.modern-blue img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

body.modern-blue .loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

body.modern-blue .progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-tertiary);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-normal);
    position: relative;
}

body.modern-blue .progress-step.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    animation: pulse 2s infinite;
}

body.modern-blue .progress-step.completed {
    background: var(--success-color);
    color: white;
}

body.modern-blue [data-toggle="tooltip"] {
    position: relative;
    cursor: help;
}

@media (max-width: 768px) {
    body.modern-blue .card {
        margin-bottom: 1rem;
        border-radius: var(--radius-lg);
    }

    body.modern-blue .accordion-button {
        padding: 1rem;
        font-size: 1rem;
    }

    body.modern-blue .accordion-body {
        padding: 1.5rem 1rem;
    }
    body.modern-blue .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    body.modern-blue .form-control,
    body.modern-blue .form-select {
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
    }
}
@media (prefers-color-scheme: dark) {
    body.modern-blue.dark-mode {
        --background-primary: #1e293b;
        --background-secondary: #0f172a;
        --background-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --border-light: #475569;
    }
}
body.modern-blue *:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
body.modern-blue .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
body.modern-blue .currency_rate_refresh_countdown {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
body.modern-blue .container {
    animation: slideInUp 0.8s ease-out;
}
body.modern-blue * {
    will-change: auto;
}
body.modern-blue .card,
body.modern-blue .btn,
body.modern-blue .form-control {
    will-change: transform, box-shadow;
}
body.modern-blue #installment_table {
    margin-top: 1.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    animation: slideInUp 0.6s ease-out;
}
body.modern-blue #installment_table .text-success {
    color:rgb(10, 107, 76);
}
body.modern-blue #installment_table .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}
body.modern-blue #installment_table .table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.025em;
    padding: 1.25rem 1rem;
    border: none;
    text-align: center;
    position: relative;
}
body.modern-blue #installment_table .table thead th:first-child {
    width: 60px;
    text-align: center;
}
body.modern-blue #installment_table .table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}
body.modern-blue #installment_table .table tbody tr {
    transition: var(--transition-fast);
    border: none;
    position: relative;
}
body.modern-blue #installment_table .table tbody tr:nth-child(even) {
    background: var(--background-secondary);
}
body.modern-blue #installment_table .table tbody tr:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: translateX(4px);
    box-shadow: inset 4px 0 0 var(--primary-color);
}
body.modern-blue #installment_table .table tbody tr.installment-table-row:hover {
    cursor: pointer;
}
body.modern-blue #installment_table .table tbody td {
    padding: 1rem;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
    position: relative;
}
body.modern-blue #installment_table .table tbody td:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: var(--border-color);
}
body.modern-blue #installment_table .form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
body.modern-blue #installment_table .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--background-primary);
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
}
body.modern-blue #installment_table .form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
body.modern-blue #installment_table .form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}
body.modern-blue #installment_table .form-check-input:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
body.modern-blue #installment_table .text-end {
    text-align: right !important;
    font-weight: 600;
}
body.modern-blue #installment_table .text-success {
    color: var(--success-color) !important;
    font-weight: 700;
    position: relative;
}
body.modern-blue #installment_table .text-success::before {
    content: '';
    margin-right: 0.25rem;
    font-size: 0.8rem;
}
body.modern-blue #installment_table .fw-bold {
    font-weight: 700 !important;
}
body.modern-blue #installment_table span[style*="color: darkgreen"] {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem !important;
    font-weight: 600;
    margin-left: 0.5rem;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    body.modern-blue #installment_table .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    body.modern-blue #installment_table .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    body.modern-blue #installment_table .form-check-input {
        width: 1rem;
        height: 1rem;
    }
    body.modern-blue #installment_table span[style*="color: darkgreen"] {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem;
    }
}

body.modern-blue #installment_table.loading {
    opacity: 0.7;
    pointer-events: none;
}
body.modern-blue #installment_table.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.5) 50%, transparent 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-lg);
}
body.modern-blue .campaign-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
    color: #92400e;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    position: relative;
}
body.modern-blue .campaign-warning::before {
    content: '⚠️';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}
body.modern-blue .campaign-warning small {
    font-size: 0.85rem;
    line-height: 1.4;
}