@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
    --primary-color: #212529;
    --primary-light: #495057;
    --primary-dark: #000000;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-dark: #212529;
    --background-light: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --text-white: #ffffff;
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    --border-dark: #495057;
    --transition: all 0.15s ease-in-out;
    --border-radius: 0;
    --border-radius-sm: 0;
    --border-radius-lg: 0;
}

body.flat-theme-v2 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 400;
}
body.flat-theme-v2 .topbar {
    background: var(--background-dark) !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
}
body.flat-theme-v2 .topbar h4 {
    font-weight: 700;
    color: var(--text-white) !important;
    font-size: 1.5rem;
}
body.flat-theme-v2 .topbar .change-lang {
    transition: var(--transition);
    padding: 6px 8px;
    margin: 0 4px;
    border-radius: 0;
    text-decoration: none;
}
body.flat-theme-v2 .topbar .change-lang:hover {
    background: rgba(255, 255, 255, 0.1);
}
body.flat-theme-v2 .topbar .change-lang img {
    transition: var(--transition);
    border-radius: 0;
    height: 20px;
}
body.flat-theme-v2 .card {
    box-shadow: none;
    transition: var(--transition);
}
body.flat-theme-v2 .card-header {
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 0;
}
body.flat-theme-v2 .card-body {
    padding: 1.5rem;
}
body.flat-theme-v2 .accordion-item {
    border-radius: 0;
    background: var(--background-primary);
}
body.flat-theme-v2 .accordion-button {
    background: var(--background-dark);
    color: var(--text-white);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border-radius: 0;
    box-shadow: none;
}
body.flat-theme-v2 .accordion-button:hover {
    background: var(--primary-light);
    color: var(--text-white);
}
body.flat-theme-v2 .accordion-button:not(.collapsed) {
    background: var(--primary-dark);
    color: var(--text-white);
    box-shadow: none;
}
body.flat-theme-v2 .accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25);
}
body.flat-theme-v2 .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    filter: inherit;
}
body.flat-theme-v2 .accordion-body {
    padding: 1.5rem;
}
body.flat-theme-v2 .form-control,
body.flat-theme-v2 .form-select {
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 400;
    transition: var(--transition);
    box-shadow: none;
}

body.flat-theme-v2 .form-control:focus,
body.flat-theme-v2 .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25);
    outline: 0;
}

body.flat-theme-v2 .form-control:hover,
body.flat-theme-v2 .form-select:hover {
    border-color: var(--border-dark);
}

body.flat-theme-v2 .form-control.is-invalid {
    border-color: var(--danger-color);
}

body.flat-theme-v2 .input {
    position: relative;
}

body.flat-theme-v2 .input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 2;
}

body.flat-theme-v2 .input .form-control:focus + i,
body.flat-theme-v2 .input:hover i {
    color: var(--primary-color);
}

body.flat-theme-v2 .card-text,
body.flat-theme-v2 label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: block;
}

body.flat-theme-v2 .text-danger {
    color: var(--danger-color) !important;
}

body.flat-theme-v2 .text-primary {
    color: var(--primary-color) !important;
}

body.flat-theme-v2 .text-success {
    color: var(--success-color) !important;
}

body.flat-theme-v2 .text-warning {
    color: var(--warning-color) !important;
}

body.flat-theme-v2 .text-white {
    color: var(--text-white) !important;
}

body.flat-theme-v2 .text-muted {
    color: var(--text-muted) !important;
}

body.flat-theme-v2 .btn {
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: none;
}

body.flat-theme-v2 .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

body.flat-theme-v2 .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-white);
}

body.flat-theme-v2 .btn-primary:active,
body.flat-theme-v2 .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25);
}

body.flat-theme-v2 .btn-light {
    background: var(--light-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.flat-theme-v2 .btn-light:hover {
    background: var(--background-light);
    border-color: var(--border-dark);
    color: var(--text-primary);
}

body.flat-theme-v2 .btn-info {
    background: var(--info-color);
    border-color: var(--info-color);
    color: var(--text-white);
}

body.flat-theme-v2 .btn-info:hover {
    background: #0bb5d6;
    border-color: #0bb5d6;
    color: var(--text-white);
}

body.flat-theme-v2 .select2-container--default .select2-selection--single {
    border: 1px solid var(--border-color);
    border-radius: 0;
    height: auto;
    padding: 0.75rem 1rem;
    background: var(--background-primary);
    transition: var(--transition);
}

body.flat-theme-v2 .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25);
}

body.flat-theme-v2 .select2-dropdown {
    border: 1px solid var(--primary-color);
    border-radius: 0;
    background: var(--background-primary);
}
body.flat-theme-v2 h1, body.flat-theme-v2 h2, body.flat-theme-v2 h3, 
body.flat-theme-v2 h4, body.flat-theme-v2 h5, body.flat-theme-v2 h6 {
    color: var(--text-primary);
    font-weight: 700;
}
body.flat-theme-v2 p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

body.flat-theme-v2 img {
    transition: var(--transition);
    border-radius: 0;
}

body.flat-theme-v2 #installment_table {
    margin-top: 1.5rem;
    border-radius: 0;
    overflow: hidden;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
}

body.flat-theme-v2 #installment_table .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

body.flat-theme-v2 #installment_table .table thead th {
    background: var(--background-dark);
    color: var(--text-white);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 1rem;
    border: none;
    text-align: center;
}

body.flat-theme-v2 #installment_table .table thead th:first-child {
    width: 60px;
    text-align: center;
}

body.flat-theme-v2 #installment_table .table tbody tr {
    transition: var(--transition);
    border: none;
}

body.flat-theme-v2 #installment_table .table tbody tr:nth-child(even) {
    background: var(--background-secondary);
}

body.flat-theme-v2 #installment_table .table tbody tr:hover {
    background: var(--background-light);
    cursor: pointer;
}

body.flat-theme-v2 #installment_table .table tbody td {
    padding: 1rem;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
    border-right: 1px solid var(--border-light);
}

body.flat-theme-v2 #installment_table .table tbody td:last-child {
    border-right: none;
}

body.flat-theme-v2 #installment_table .form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

body.flat-theme-v2 #installment_table .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background: var(--background-primary);
    transition: var(--transition);
    cursor: pointer;
}

body.flat-theme-v2 #installment_table .form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.flat-theme-v2 #installment_table .form-check-input:hover {
    border-color: var(--primary-light);
}

body.flat-theme-v2 #installment_table .text-end {
    text-align: right !important;
    font-weight: 600;
}

body.flat-theme-v2 #installment_table .text-success {
    color: var(--success-color) !important;
    font-weight: 700;
}

body.flat-theme-v2 #installment_table .fw-bold {
    font-weight: 700 !important;
}

body.flat-theme-v2 .campaign-warning {
    background: #fff3cd;
    border: 1px solid var(--warning-color);
    border-radius: 0;
    padding: 1rem;
    margin-top: 1rem;
    color: #856404;
    font-weight: 500;
}

@media (max-width: 768px) {
    body.flat-theme-v2 .card {
        margin-bottom: 1rem;
        border-radius: 0;
    }

    body.flat-theme-v2 .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    body.flat-theme-v2 .accordion-body {
        padding: 1rem;
    }

    body.flat-theme-v2 .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }

    body.flat-theme-v2 .form-control,
    body.flat-theme-v2 .form-select {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    body.flat-theme-v2 #installment_table .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    body.flat-theme-v2 #installment_table .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    body.flat-theme-v2 #installment_table .form-check-input {
        width: 1rem;
        height: 1rem;
    }
}

body.flat-theme-v2 *:focus {
    outline: none;
}

body.flat-theme-v2 .form-control:focus,
body.flat-theme-v2 .form-select:focus,
body.flat-theme-v2 .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25);
}

body.flat-theme-v2 .form-control[readonly] {
    background-color: var(--background-light);
    opacity: 1;
}

body.flat-theme-v2 .currency_rate_refresh_countdown {
    background: var(--background-light);
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

body.flat-theme-v2 .shake {
    animation: shake 0.5s ease-in-out;
}

body.flat-theme-v2 .pace {
    pointer-events: none;
    user-select: none;
}

body.flat-theme-v2 .pace .pace-progress {
    background: var(--primary-color);
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 100%;
    width: 100%;
    height: 2px;
}
body.flat-theme-v2 .accordion {
    --bs-accordion-color: var(--text-primary);
    --bs-accordion-bg: var(--background-primary);
    --bs-accordion-transition: none;
    --bs-accordion-border-color: transparent;
    --bs-accordion-border-width: 0;
    --bs-accordion-border-radius: 0;
    --bs-accordion-inner-border-radius: 0;
    --bs-accordion-btn-padding-x: 1.5rem;
    --bs-accordion-btn-padding-y: 1rem;
    --bs-accordion-btn-color: var(--text-white);
    --bs-accordion-btn-bg: var(--background-dark);
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    --bs-accordion-btn-icon-width: 1.25rem;
    --bs-accordion-btn-icon-transform: rotate(-180deg);
    --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    --bs-accordion-btn-focus-box-shadow: none;
    --bs-accordion-body-padding-x: 1.5rem;
    --bs-accordion-body-padding-y: 1.5rem;
    --bs-accordion-active-color: var(--text-white);
    --bs-accordion-active-bg: var(--primary-dark);
    border: none !important;
    border-radius: 0 !important;
    background: var(--background-primary);
    box-shadow: none;
}

body.flat-theme-v2 .accordion-item {
    border-radius: 0 !important;
    background: var(--background-primary);
    border: none !important;
    border-bottom: 1px solid var(--border-color);
}

body.flat-theme-v2 .accordion-item:last-child {
    border-bottom: none;
}

body.flat-theme-v2 .accordion-button {
    background: var(--background-dark) !important;
    color: var(--text-white) !important;
    border: none !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.flat-theme-v2 .accordion-button:hover {
    background: var(--primary-light) !important;
    color: var(--text-white) !important;
}

body.flat-theme-v2 .accordion-button:not(.collapsed) {
    background: var(--primary-dark) !important;
    color: var(--text-white) !important;
    box-shadow: none !important;
}

body.flat-theme-v2 .accordion-button:focus {
    border: none !important;
    box-shadow: none !important;
}

body.flat-theme-v2 .accordion-body {
    background: var(--background-primary) !important;
    padding: 1.5rem !important;
    border-radius: 0 !important;
}

body.flat-theme-v2 .accordion-body {
    background: var(--background-primary) !important;
    padding: 1.5rem !important;
    border-radius: 0 !important;
}

body.flat-theme-v2 .card,
body.flat-theme-v2 .card *,
body.flat-theme-v2 .card-header,
body.flat-theme-v2 .card-body,
body.flat-theme-v2 .card-footer,
body.flat-theme-v2 .card-title,
body.flat-theme-v2 .card-text,
body.flat-theme-v2 .card-img,
body.flat-theme-v2 .card-img-top,
body.flat-theme-v2 .card-img-bottom {
    border-radius: 0 !important;
}

body.flat-theme-v2 {
    --bs-card-border-radius: 0 !important;
    --bs-card-inner-border-radius: 0 !important;
}

body.flat-theme-v2 * {
    border-radius: 0 !important;
}

body.flat-theme-v2 .rounded-circle,
body.flat-theme-v2 .circle,
body.flat-theme-v2 .btn-circle {
    border-radius: 50% !important;
}
body.flat-theme-v2 .custom-hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

body.flat-theme-v2 .line,
body.flat-theme-v2 hr.line {
    border: none;
    height: 2px;
    background: linear-gradient(to right, 
        transparent 0%, 
        var(--border-color) 15%, 
        var(--text-secondary) 50%, 
        var(--border-color) 85%, 
        transparent 100%);
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

body.flat-theme-v2 .custom-hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, 
        transparent 0%, 
        var(--border-light) 10%, 
        var(--primary-color) 25%, 
        var(--text-primary) 50%, 
        var(--primary-color) 75%, 
        var(--border-light) 90%, 
        transparent 100%);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

body.flat-theme-v2 .custom-hr::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@media (max-width: 768px) {
    body.flat-theme-v2 .line,
    body.flat-theme-v2 hr.line,
    body.flat-theme-v2 .custom-hr {
        height: 1px;
        margin: 1rem 0;
    }
}