/* assets/css/consulta-factura.css */

.consulta-hero {
    background: linear-gradient(135deg, var(--clr-primary, #0D2B5F) 0%, var(--clr-accent, #00B4D8) 100%);
    color: white;
    padding: var(--sp-12) 0;
    text-align: center;
}

.consulta-hero__title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--sp-4);
}

.consulta-hero__subtitle {
    font-size: var(--text-lg);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.consulta-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: var(--sp-8);
    max-width: 500px;
    margin: -40px auto var(--sp-12);
    position: relative;
    z-index: 10;
}

.consulta-form-group {
    margin-bottom: var(--sp-6);
}

.consulta-form-group label {
    display: block;
    margin-bottom: var(--sp-2);
    font-weight: 600;
    color: var(--clr-text, #333);
}

.consulta-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.consulta-input:focus {
    border-color: var(--clr-accent, #00B4D8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.consulta-btn {
    width: 100%;
    padding: 14px;
    background: var(--clr-primary, #0D2B5F);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.consulta-btn:hover {
    background: var(--clr-accent, #00B4D8);
    transform: translateY(-2px);
}

.consulta-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Resultados */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(7, 26, 62, 0.7); /* Azul corporativo oscuro con opacidad */
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
}

.modal-container {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    padding: var(--sp-8) var(--sp-8) var(--sp-4);
    border-bottom: 1px solid #f1f5f9;
}

.modal-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--clr-primary, #0D2B5F);
    margin-bottom: var(--sp-1);
}

.modal-subtitle {
    font-size: var(--text-sm);
    color: var(--clr-text-muted, #64748b);
}

.modal-body {
    padding: var(--sp-6) var(--sp-8) var(--sp-8);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #f1f5f9;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    z-index: 10;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.customer-info {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    border-radius: 12px;
    padding: var(--sp-5) var(--sp-6);
    margin-bottom: var(--sp-6);
    border-left: 4px solid var(--clr-accent, #00B4D8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.customer-info h3 {
    margin-bottom: var(--sp-3);
    font-size: var(--text-lg);
    font-weight: 800;
}

.customer-details {
    display: flex;
    gap: var(--sp-6);
    font-size: var(--text-sm);
    color: #475569;
}

.customer-details span {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.customer-details strong {
    color: var(--clr-primary, #0D2B5F);
}

.payment-status {
    padding: var(--sp-4);
    border-radius: 8px;
    margin-bottom: var(--sp-6);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-status.success {
    background: #dcfce7;
    color: #166534;
}

.payment-status.danger {
    background: #fee2e2;
    color: #991b1b;
}

.invoice-section-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--sp-3);
}

.invoices-grid {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: 1fr;
}

.invoice-card {
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    padding: var(--sp-6);
    transition: all 0.2s;
}

.invoice-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-3);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid #f1f5f9;
}

.invoice-number {
    font-weight: 700;
    color: var(--clr-primary, #0D2B5F);
}

.invoice-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
}

.status-paid { background: #dcfce7; color: #166534; }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.invoice-date {
    font-size: 14px;
    color: #64748b;
    margin-bottom: var(--sp-2);
}

.invoice-total {
    font-size: var(--text-lg);
    font-weight: 800;
}

/* Alert Error */
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: var(--sp-4);
    border-radius: 8px;
    margin-bottom: var(--sp-6);
    display: none;
    border-left: 4px solid #dc2626;
}
