/* ============================================
   SOLUXLED SII - Hoja de Estilos Principal
   Servicios Integrales de Iluminación
   DIALUX SAC - RUC: 20554129448
   ============================================ */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A2D;
    --secondary: #004E89;
    --accent: #1A936F;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --info: #3498DB;
    --light: #F8F9FA;
    --dark: #2C3E50;
    --gray: #95A5A6;
    --border: #E0E0E0;
    --pastel-blue: #E3F2FD;
    --pastel-green: #E8F5E9;
    --pastel-orange: #FFF3E0;
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
    position: relative;
    overflow-x: hidden;
}

/* Marca de agua de fondo general */
.marca-de-agua-fondo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' opacity='0.03'%3E%3Cpath fill='%23000' d='M50 10 L60 40 L90 50 L60 60 L50 90 L40 60 L10 50 L40 40 Z'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER CON LOGO GRANDE CENTRADO
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--pastel-blue) 0%, #BBDEFB 100%);
    padding: 30px 20px;
    border-bottom: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.logo-section-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo-img-large {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.logo-img-large:hover {
    transform: scale(1.02);
}

.logo-fallback-large {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.logo-fallback-large i {
    font-size: 5rem;
    color: var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-fallback-large h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.logo-fallback-large p {
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 500;
}

.header-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.razon-social {
    text-align: center;
    padding: 12px 25px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.razon-social strong {
    display: block;
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.razon-social span {
    color: var(--gray);
    font-size: 0.95rem;
}

.costo-badge {
    background: linear-gradient(135deg, var(--warning) 0%, #F1C40F 100%);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.costo-badge i {
    font-size: 2.2rem;
}

.costo-badge .label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.costo-badge .monto {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 3px 0;
}

.costo-badge small {
    font-size: 0.8rem;
    opacity: 0.95;
}

/* ============================================
   FORMULARIO Y SECCIONES
   ============================================ */
.formulario {
    padding: 40px 30px;
}

.seccion {
    margin-bottom: 35px;
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary);
    transition: transform 0.3s ease;
}

.seccion:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.seccion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pastel-blue);
}

.seccion-header i {
    font-size: 1.8rem;
    color: var(--primary);
}

.seccion-header h2 {
    color: var(--secondary);
    font-size: 1.4rem;
    font-weight: 600;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.required label::after {
    content: " *";
    color: var(--danger);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.contador {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
}

/* ============================================
   CHECKBOX Y RADIO
   ============================================ */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    min-height: 60px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.checkbox-card:hover {
    border-color: var(--primary);
    background: var(--pastel-orange);
    transform: translateY(-2px);
}

.checkbox-card input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-card span {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.checkbox-card i {
    margin-right: 8px;
    color: var(--primary);
    flex-shrink: 0;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    padding: 8px 15px;
    background: var(--light);
    border-radius: 20px;
    transition: all 0.3s;
}

.radio-group label:hover {
    background: var(--pastel-blue);
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ============================================
   AUTORIZACIÓN
   ============================================ */
.autorizacion {
    background: linear-gradient(135deg, var(--pastel-orange) 0%, #FFE0B2 100%);
    border-left-color: var(--warning);
}

.terminos-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.terminos-box h4 {
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminos-box ol {
    padding-left: 25px;
}

.terminos-box li {
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--dark);
}

.checkbox-required {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 18px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s;
}

.checkbox-label:hover {
    border-color: var(--primary);
    background: var(--pastel-blue);
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   SECCIÓN DE PAGOS
   ============================================ */
.pagos-section {
    background: linear-gradient(135deg, var(--pastel-green) 0%, #C8E6C9 100%);
    border-left-color: var(--accent);
}

.pago-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.banco-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.banco-card.interbank {
    border-top: 5px solid #00A650;
}

.banco-header {
    background: linear-gradient(135deg, #00A650 0%, #00853F 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.banco-logo {
    height: 40px;
    width: auto;
    background: white;
    padding: 5px;
    border-radius: 8px;
}

.banco-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.banco-datos {
    padding: 25px;
}

.dato-pago {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.dato-pago label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
    font-weight: 500;
}

.dato-pago .valor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dato-pago .valor strong {
    font-size: 1rem;
    color: var(--secondary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.numero-cuenta {
    font-size: 0.95rem !important;
    letter-spacing: 0.5px;
}

.btn-copiar {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-copiar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.pago-nota {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: var(--shadow);
}

.pago-nota i {
    font-size: 2rem;
    color: var(--warning);
}

.pago-nota p {
    color: var(--dark);
    line-height: 1.6;
}

/* ============================================
   BOTONES
   ============================================ */
.acciones {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid var(--pastel-blue);
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--light);
    border-color: var(--primary);
}

/* ============================================
   PANEL DE OPCIONES POST-ENVÍO
   ============================================ */
.panel-opciones {
    padding: 50px 30px;
    background: linear-gradient(135deg, var(--pastel-blue) 0%, #E8F5E9 100%);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-header i {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.panel-header h2 {
    color: var(--secondary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.numero-orden {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    background: white;
    display: inline-block;
    padding: 10px 30px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.opciones-envio {
    background: white;
    padding: 35px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.opciones-envio h3 {
    color: var(--secondary);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.3rem;
}

.grid-opciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.btn-opcion {
    padding: 30px 20px;
    border: 3px solid var(--border);
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.btn-opcion i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.btn-opcion span {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-opcion small {
    font-size: 0.9rem;
    color: var(--gray);
}

.btn-opcion.whatsapp {
    border-color: #25D366;
    color: #25D366;
}

.btn-opcion.whatsapp:hover {
    background: #25D366;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-opcion.email {
    border-color: var(--info);
    color: var(--info);
}

.btn-opcion.email:hover {
    background: var(--info);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.btn-opcion.pdf {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-opcion.pdf:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
}

.resumen-orden {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.acciones-finales {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ============================================
   FOOTER SIMPLIFICADO
   ============================================ */
.footer {
    background: linear-gradient(135deg, #E8F4F8 0%, #D4E6F1 100%);
    color: var(--dark);
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--secondary);
}

.footer-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-info p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--dark);
}

.footer-info i {
    margin-right: 6px;
    color: var(--primary);
}

.copyright {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 78, 137, 0.2);
    font-size: 0.85rem;
    color: var(--gray);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 12px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .logo-img-large {
        max-height: 120px;
    }
    
    .logo-fallback-large h1 {
        font-size: 2rem;
    }
    
    .logo-fallback-large p {
        font-size: 1rem;
    }
    
    .header-badges {
        flex-direction: column;
        gap: 15px;
    }
    
    .razon-social,
    .costo-badge {
        width: 100%;
        justify-content: center;
    }
    
    .formulario {
        padding: 25px 20px;
    }
    
    .seccion {
        padding: 20px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .acciones {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-opciones {
        grid-template-columns: 1fr;
    }

    /* Corrección específica para datos de pago en móvil */
    .banco-datos {
        padding: 15px;
    }
    
    .dato-pago {
        padding: 12px;
    }
    
    .dato-pago .valor {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .dato-pago .valor strong {
        font-size: 0.9rem;
        word-break: break-all;
        text-align: left;
    }
    
    .numero-cuenta {
        font-size: 0.85rem !important;
    }
    
    .btn-copiar {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .pago-nota {
        flex-direction: column;
        text-align: center;
    }
    
    .pago-nota i {
        margin: 0 auto;
    }
    
    .panel-opciones {
        padding: 30px 20px;
    }
    
    .panel-header h2 {
        font-size: 1.5rem;
    }
    
    .numero-orden {
        font-size: 1.1rem;
        padding: 8px 20px;
    }
}

@media (max-width: 480px) {
    .logo-img-large {
        max-height: 100px;
    }
    
    .logo-fallback-large i {
        font-size: 3.5rem;
    }
    
    .logo-fallback-large h1 {
        font-size: 1.5rem;
    }
    
    .logo-fallback-large p {
        font-size: 0.9rem;
    }
    
    .seccion-header h2 {
        font-size: 1.2rem;
    }
    
    .costo-badge .monto {
        font-size: 1.4rem;
    }
    
    .footer-info p {
        font-size: 0.85rem;
    }
}

/* ============================================
   LOADING Y TOAST
   ============================================ */
.loading {
    display: inline-block;
    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;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideUp 0.3s ease;
    max-width: 90%;
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--info);
}

@keyframes slideUp {
    from { 
        transform: translateY(100px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.toast.show {
    display: flex;
}

/* ============================================
   IMPRESIÓN
   ============================================ */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .marca-de-agua-fondo {
        display: none;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .acciones,
    .panel-opciones,
    .btn-copiar {
        display: none !important;
    }
    
    .seccion {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border);
    }
    
    .header {
        background: var(--pastel-blue) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .footer {
        background: #E8F4F8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ============================================
   SCROLLBAR PERSONALIZADA
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   FIN DEL CSS
   ============================================ */