/* styles.css - Diseño Oficial Formulario de Envío de Ventas Entel */
:root {
    --entel-header-blue: #1F4E78;
    --entel-section-blue: #2F5597;
    --entel-orange: #FF6B00;
    --entel-gray-bg: #EAECEF;
    --entel-border: #8EA9DB;
    --entel-light-blue-input: #DDEBF7;
    --entel-yellow-notice: #FFF2CC;
    --entel-yellow-border: #FFE699;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #D9D9D9;
    color: #000000;
    min-height: 100vh;
}

/* Navbar de la Aplicación Web */
.app-navbar {
    background: #0F2C4A;
    color: white;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-badge {
    background: var(--entel-orange);
    color: white;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 16px;
}

.brand-title {
    font-size: 16px;
    font-weight: 600;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-info {
    font-size: 13px;
    opacity: 0.9;
}

/* Main Container */
.main-container {
    max-width: 820px;
    margin: 20px auto;
    padding: 0 12px;
}

/* Toolbar */
.excel-toolbar {
    background: white;
    padding: 10px 16px;
    border-radius: 6px 6px 0 0;
    border: 1px solid #B0C4DE;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.excel-toolbar-title {
    font-weight: 700;
    color: var(--entel-header-blue);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.shortcut-badge {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Tarjeta del Formulario Oficial Entel */
.entel-form-card {
    background: white;
    border: 2px solid #5B9BD5;
    border-radius: 0 0 6px 6px;
    padding: 16px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Banner de Título Oficial */
.form-title-banner {
    background: var(--entel-header-blue);
    color: white;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 1px;
    border-radius: 2px;
}

.entel-logo-icon {
    background: var(--entel-orange);
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Filas y Encabezados de Sección */
.section-blue-header {
    background: var(--entel-section-blue);
    color: white;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    padding: 6px;
    margin-top: 14px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    border-radius: 2px;
}

.form-row-single {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.form-row-single .field-label, .form-row-single .field-label-bold {
    min-width: 190px;
    font-size: 13px;
    color: #000;
}

.field-label-bold {
    font-weight: 800;
}

.field-label {
    font-weight: 700;
}

.field-input-wrap {
    flex: 1;
}

/* Grillas de 2 y 3 Columnas */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.form-grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.grid-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-input-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.phone-prefix {
    background: #E5E7EB;
    border: 1px solid #7F7F7F;
    border-right: none;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    border-radius: 2px 0 0 2px;
}

.phone-input-group .excel-input {
    border-radius: 0 2px 2px 0;
}

.grid-cell .field-label {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* Entradas Estilo Excel */
.excel-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #7F7F7F;
    background: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
    border-radius: 2px;
    transition: all 0.15s ease-in-out;
}

.excel-input:focus {
    outline: none;
    border: 2px solid #0056B3;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

/* Resaltado Azul Claro para Selects de Opciones (Igual a los Screenshots) */
.select-highlight {
    background-color: var(--entel-light-blue-input) !important;
    border: 1px solid #8EA9DB !important;
    font-weight: 700;
}

.select-highlight:focus {
    background-color: #FFFFFF !important;
    border-color: #0056B3 !important;
}

.req-star {
    color: #FF0000;
    font-weight: bold;
    margin-left: 2px;
}

/* Sección del Servicio (Columna Izquierda + Observaciones Derecha) */
.service-section-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.service-left-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-label {
    font-size: 12px;
    font-weight: 700;
    width: 170px;
}

.service-field-row select.excel-input {
    flex: 1;
}

.service-right-obs {
    display: flex;
    flex-direction: column;
}

.obs-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.excel-textarea {
    flex: 1;
    width: 100%;
    min-height: 140px;
    padding: 8px;
    font-size: 13px;
    border: 1px solid #8EA9DB;
    background-color: var(--entel-light-blue-input);
    resize: none;
    border-radius: 2px;
    font-weight: 600;
}

.excel-textarea:focus {
    outline: none;
    background: #FFFFFF;
    border-color: #0056B3;
}

/* Banner de Notificación Amarillo */
.notice-yellow-banner {
    background: var(--entel-yellow-notice);
    border: 1px solid var(--entel-yellow-border);
    padding: 10px 14px;
    font-size: 12px;
    text-align: center;
    color: #333333;
    line-height: 1.4;
    margin-top: 14px;
    margin-bottom: 14px;
    border-radius: 2px;
}

/* Footer de Acciones */
.form-action-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #D9D9D9;
}

/* Estilos de Botones */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-orange {
    background: var(--entel-orange);
    color: white;
}

.btn-orange:hover {
    background: #E05D00;
}

.btn-blue {
    background: var(--entel-header-blue);
    color: white;
}

.btn-blue:hover {
    background: #0F2C4A;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-danger {
    background: #EF4444;
    color: white;
}

/* Modales y Notificaciones */
.toast-banner {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.toast-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--entel-header-blue);
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #9CA3AF;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 44, 74, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h2 {
    color: var(--entel-header-blue);
    margin-top: 6px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    font-size: 13px;
}

/* Responsividad para Móviles */
@media (max-width: 768px) {
    .form-grid-2col, .form-grid-3col, .service-section-container {
        grid-template-columns: 1fr;
    }
    .form-row-single {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-row-single .field-label, .form-row-single .field-label-bold {
        min-width: 100%;
    }
}
