/* Estilos generales */
:root {
    --primary-color: #4a6bff;
    --primary-dark: #3a5bef;
    --primary-light: #eef1ff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --success-light: #d4edda;
    --danger-color: #dc3545;
    --danger-light: #f8d7da;
    --warning-color: #ffc107;
    --warning-light: #fff3cd;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-light: #e9ecef;
    --gray-medium: #ced4da;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Estructura principal */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #2c3e50, #4a6bff);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-nav {
    margin-top: 30px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.brand-logo {
    padding: 0 20px;
    margin-bottom: 30px;
}

.brand-logo img {
    max-width: 100%;
    height: auto;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    transition: var(--transition);
}

.main-header {
    background-color: white;
    padding: 15px 30px;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}

.content-wrapper {
    padding: 30px;
}

/* Componentes */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.card-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Formularios */
.form-elegant {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.form-row .form-group {
    padding-left: 10px;
    padding-right: 10px;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.floating-label label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #999;
    transition: var(--transition);
    pointer-events: none;
    background: white;
    padding: 0 5px;
    font-size: 14px;
}

.floating-label input:focus,
.floating-label select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label select:focus + label,
.floating-label select:not([value=""]) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: var(--primary-color);
    background: white;
    font-weight: 500;
}

.floating-label input,
.floating-label select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: white;
}

.floating-label select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.floating-label i {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #999;
    pointer-events: none;
}

.amount-group i {
    left: 15px;
    right: auto;
}

.amount-group input {
    padding-left: 40px;
}

.helper-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Botones */
.btn {
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-secondary {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--gray-medium);
}

.btn-secondary:hover {
    background-color: var(--gray-light);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn i {
    margin-right: 8px;
}

.btn-notification {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-notification:hover {
    background-color: var(--gray-light);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.user-profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.user-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.payment-plan-table,
.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.payment-plan-table th,
.payment-history-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.payment-plan-table td,
.payment-history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.payment-plan-table tr:last-child td,
.payment-history-table tr:last-child td {
    border-bottom: none;
}

.payment-plan-table tr:hover td {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-color);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger-color);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pagado {
    background-color: var(--success-light);
    color: var(--success-color);
}

.status-badge.parcial {
    background-color: var(--warning-light);
    color: var(--warning-color);
}

.status-badge.pendiente {
    background-color: var(--danger-light);
    color: var(--danger-color);
}

/* Tabs */
.tabs-container {
    margin-top: 20px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    margin-right: 5px;
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active:after,
.tab-btn:hover:after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* Client Info */
.client-info-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    border: 3px solid var(--primary-light);
}

.client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.client-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-muted {
    color: #6c757d !important;
}

/* Payment Methods */
.payment-methods {
    margin: 20px 0;
}

.payment-methods h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #495057;
    font-weight: 500;
}

.method-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.method-option {
    flex: 1;
    min-width: 250px;
}

.method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.method-card {
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.method-option input[type="radio"]:checked + .method-card {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.05);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.method-card img {
    height: 30px;
    object-fit: contain;
    margin-bottom: 10px;
    align-self: flex-start;
}

.method-card span {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.method-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.method-icons i {
    color: #6c757d;
    font-size: 1.2rem;
}

/* Terms Checkbox */
.terms-group {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.terms-group input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-group label {
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
}

.terms-group label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.terms-group label a:hover {
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    transition: var(--transition);
    line-height: 1;
    padding: 5px;
}

.modal-close:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.payment-processing {
    text-align: center;
    padding: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* Estilo específico para el botón Pagar Total */
.btn-pay-total {
    background-color: #f8f9fa;
    color: #4a6bff;
    border: 1px solid #d1d7e0;
    border-radius: 6px;
    padding: 0 15px;
    height: 48px; /* Misma altura que el input */
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    margin-left: 10px;
}

.btn-pay-total i {
    margin-right: 6px;
    font-size: 0.9rem;
}

.btn-pay-total:hover {
    background-color: #eef1ff;
    border-color: #4a6bff;
    transform: translateY(-1px);
}

.btn-pay-total:active {
    transform: translateY(0);
}

/* Ajuste para el contenedor */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.amount-group {
    flex: 1;
    position: relative;
}
/* Payment Instructions */
.payment-instructions {
    padding: 10px;
}

.instruction-step {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
    font-size: 1rem;
}

.step-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.voucher {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 10px;
    border: 1px dashed #ddd;
}

.voucher p {
    margin: 5px 0;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.voucher strong {
    font-weight: 600;
}

.note {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    border-left: 4px solid var(--warning-color);
}

.note p {
    margin: 0;
    color: #856404;
}

.note strong {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar-nav ul li a span {
        display: none;
    }
    
    .sidebar-nav ul li a i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .brand-logo {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 20px;
    }
    
    .method-options {
        flex-direction: column;
    }
    
    .method-option {
        min-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .client-info-section {
        flex-direction: column;
        text-align: center;
    }
    
    .client-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 50%;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
    
    .main-header {
        padding: 15px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

/* Animaciones adicionales */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estilos para la sección de crédito */
.credit-info .card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #eaeef5;
    padding: 15px 20px;
}

.credit-info .card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.credit-info .card-header h2 i {
    margin-right: 10px;
    color: #4a6bff;
}

/* Tarjeta del cliente */
.client-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9faff;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e6e9f4;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background-color: #eef1ff;
}

.client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Dashboard compacto */
.compact-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.data-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeef5;
}

.data-icon {
    width: 40px;
    height: 40px;
    background-color: #4a6bff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1rem;
}

.data-content {
    display: flex;
    flex-direction: column;
}

.data-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.data-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Formulario de pago mejorado */
.form-elegant .form-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.form-elegant .form-title i {
    margin-right: 10px;
    color: #4a6bff;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.amount-group {
    flex: 1;
    position: relative;
}

/* Botones mejorados */
.btn-primary, .btn-secondary {
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-primary {
    background-color: #4a6bff;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.2);
}

.btn-primary i {
    margin-right: 8px;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #4a6bff;
    border: 1px solid #4a6bff;
}

.btn-secondary:hover {
    background-color: #eef1ff;
}

/* Métodos de pago */
.method-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.method-card {
    border: 1px solid #eaeef5;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-option input[type="radio"]:checked + .method-card {
    border-color: #4a6bff;
    background-color: #f9faff;
}

.method-card img {
    height: 24px;
    margin-bottom: 10px;
}

.method-card span {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.method-icons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.method-icons i {
    color: #6c757d;
    font-size: 1rem;
}

/* Pie del formulario */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.terms-group {
    display: flex;
    align-items: center;
}

.terms-group label {
    font-size: 0.8rem;
    margin-left: 8px;
}

.terms-group a {
    color: #4a6bff;
    text-decoration: none;
}

.terms-group a:hover {
    text-decoration: underline;
}

/* Efectos hover para botones */
.btn-pay-cuota {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-pay-cuota:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-pay-cuota i {
    margin-right: 5px;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Clases utilitarias */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 15px;
}

.mb-3 {
    margin-bottom: 15px;
}

.p-3 {
    padding: 15px;
}

/* Ajustes para el formulario Wompi oculto */
#form-wompi {
    position: absolute;
    left: -9999px;
}


/* Estilos para la nueva sección */
.credit-info-section {
  padding: 20px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.client-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.client-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
}

.credit-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.credit-card {
  background: linear-gradient(135deg, #f9faff 0%, #f0f4ff 100%);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid #e6e9f4;
}

.credit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(74, 107, 255, 0.1);
}

.card-icon {
  width: 50px;
  height: 50px;
  background: #4a6bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 1.2rem;
}

.card-content {
  flex: 1;
}

.card-label {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 5px;
}

.card-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
  .credit-dashboard {
    grid-template-columns: 1fr;
  }
  
  .client-name {
    font-size: 1.2rem;
  }
  
  .card-value {
    font-size: 1.2rem;
  }
}


/*
=================================================================
  ESTILOS PREMIUM Y PROFESIONALES PARA EL FORMULARIO DE PAGO
  (Integrado con el sistema de diseño existente)
=================================================================
*/

/* --- Contenedor y Título del Formulario --- */
#payment-form {
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  padding: 2rem 2.5rem;
  background-color: #fff;
  box-shadow: var(--box-shadow-lg);
}

#payment-form .form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#payment-form .form-title i {
  color: var(--primary-color);
}


/* --- Sección de Monto a Pagar (Elemento principal) --- */
#payment-form .amount-group {
  margin-bottom: 1.5rem;
}

#payment-form .amount-group > label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  display: block;
}

#payment-form .amount-input-wrapper {
  display: flex;
  align-items: stretch; /* Asegura que los hijos tengan la misma altura */
  border: 1px solid var(--gray-medium);
  border-radius: var(--border-radius);
  background-color: #fff;
  transition: var(--transition);
  overflow: hidden; /* Clave para el border-radius en los hijos */
}

#payment-form .amount-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

#payment-form .currency-symbol {
  display: flex;
  align-items: center;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--secondary-color);
  padding-left: 1.25rem;
}

#payment-form #payment-amount {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  padding: 0.75rem 0.5rem;
  width: 100%;
  box-shadow: none; /* Resetear estilos por defecto */
}

#payment-form .btn-pay-total {
  background-color: var(--light-color);
  color: var(--primary-color);
  border: none;
  border-left: 1px solid var(--gray-medium);
  font-weight: 600;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  border-radius: 0;
}

#payment-form .btn-pay-total:hover {
  background-color: var(--primary-color);
  color: #fff;
}

#payment-form .amount-helpers {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0.25rem;
  font-size: 0.8rem;
  color: var(--secondary-color);
}

#payment-form #amount-error {
  color: var(--danger-color);
  background-color: var(--danger-light);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
  display: block; /* Asegura que esté visible cuando tenga contenido */
}


/* --- Sección de Método de Pago --- */
#payment-form .payment-methods {
  margin-top: 2rem;
}

#payment-form .payment-methods h4 {
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

#payment-form .method-option input[type="radio"] {
  display: none;
}

#payment-form .method-card {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background-color: var(--light-color);
}

#payment-form .method-card:hover {
  border-color: var(--primary-dark);
  background-color: #fff;
}

#payment-form .method-option input[type="radio"]:checked + .method-card {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
  box-shadow: 0 2px 4px rgba(74, 107, 255, 0.1);
}

#payment-form .method-card img {
  height: 28px;
  margin-right: 1.25rem;
}

#payment-form .method-info span {
  font-weight: 600;
  color: var(--dark-color);
}

#payment-form .method-info small {
  color: var(--secondary-color);
  font-size: 0.85rem;
}

#payment-form .selected-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1.25rem;
  font-size: 1.3rem;
  color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

#payment-form .method-option input[type="radio"]:checked + .method-card .selected-icon {
  opacity: 1;
}


/* --- Footer y Botón Principal --- */
#payment-form .form-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

#payment-form .terms-group {
  /* Utiliza los estilos existentes de tu CSS */
}

#payment-form .btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/*
=================================================================
  ESTILOS RESPONSIVE PARA EL FORMULARIO DE PAGO
=================================================================
*/

/* Media query para dispositivos móviles (ancho de pantalla hasta 576px) */
@media (max-width: 576px) {

  /* Ajustar el padding del formulario para ahorrar espacio */
  #payment-form {
    padding: 1.5rem 1rem;
  }

  /* Reducir ligeramente el tamaño del título */
  #payment-form .form-title {
    font-size: 1.2rem;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }

  /*
  --- Reorganización del campo de monto (el cambio más importante) ---
  */

  /* El contenedor ya no necesita su propio fondo ni borde */
  #payment-form .amount-input-wrapper {
    flex-direction: column; /* Apila el input y el botón */
    align-items: stretch;
    background: none;
    border: none;
    box-shadow: none;
  }

  /* Ocultar el símbolo '$' en pantallas pequeñas para un look más limpio */
  #payment-form .currency-symbol {
    display: none;
  }

  /* Estilos para el campo de monto en su estado apilado */
  #payment-form #payment-amount {
    font-size: 2rem; /* Un poco más pequeño pero aún prominente */
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--gray-medium); /* Añadir borde individual */
    border-radius: var(--border-radius); /* Aplicar a todas las esquinas */
    background-color: #fff; /* Fondo blanco */
  }
  
  /* Mantener el efecto de foco */
  #payment-form #payment-amount:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
  }

  /* Botón "Total" a ancho completo y con estilos de botón estándar */
  #payment-form .btn-pay-total {
    width: 100%;
    margin-top: 0.75rem; /* Espacio entre el input y el botón */
    border: 1px solid var(--gray-medium);
    border-radius: var(--border-radius);
    padding: 0.8rem;
    background-color: var(--light-color);
  }

  /* --- Ajustes menores para otros elementos --- */

  /* Reducir el padding de la tarjeta del método de pago */
  #payment-form .method-card {
    padding: 1rem;
  }

  /* Reducir tamaño del botón principal de pago */
  #payment-form .btn-primary {
    padding: 0.9rem;
    font-size: 1rem;
  }
}