/* ==========================================================================
   AGROTECH CRM - SIMULADOR-SERVICIOS.CSS (App de Campo y PDF)
   ========================================================================== */

/* ---------------------------------------------------
   1. LAYOUT PRINCIPAL DEL MÓDULO
--------------------------------------------------- */
.services-module-section {
    padding: 100px 20px;
    background-color: #f8f9fa;
    overflow: hidden;
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* ---------------------------------------------------
   2. TEXTOS DE MARKETING (Izquierda)
--------------------------------------------------- */
.badge-accent {
    display: inline-block;
    background-color: #e8f5e9;
    color: #28a745;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.services-marketing-text h2 {
    font-size: 2.5rem;
    color: #000D58;
    margin-bottom: 20px;
    line-height: 1.2;
}

.services-marketing-text h2 span {
    color: #dc3545; /* Rojo para destacar el 'sin señal' */
}

.services-marketing-text p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.feature-bullets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bullet-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.bullet-icon {
    background: #fff;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.bullet-content h3 {
    font-size: 1.1rem;
    color: #000D58;
    margin-bottom: 5px;
}

.bullet-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* ---------------------------------------------------
   3. SMARTPHONE MOCKUP & SELECTOR (Derecha)
--------------------------------------------------- */
.phone-mockup-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

/* Selector Toggle Arriba del Teléfono */
.phone-view-selector {
    background: #e9ecef;
    display: flex;
    padding: 5px;
    border-radius: 50px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.selector-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selector-btn.active {
    background: #000D58;
    color: #F7FF4D;
    box-shadow: 0 4px 10px rgba(0, 13, 88, 0.2);
}

/* Carcasa del Teléfono */
.smartphone-frame {
    width: 320px;
    height: 650px;
    background: #111;
    border-radius: 45px;
    padding: 12px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 13, 88, 0.4),
        inset 0 0 0 2px #444,
        inset 0 0 0 6px #000;
    position: relative;
    overflow: hidden;
}

/* El notch / parlante del celular */
.phone-speaker {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #222;
    border-radius: 10px;
    z-index: 20;
}

/* Contenedor de la pantalla */
.phone-screen-content {
    background: #fff;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

/* Paneles Intercambiables */
.phone-screen-pane {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto; /* Permite scrollear dentro del celular */
    background: #f0f4f8;
}

/* Ocultar barra de scroll del celular para que se vea nativo */
.phone-screen-pane::-webkit-scrollbar {
    display: none; 
}
.phone-screen-pane {
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

.phone-screen-pane.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ---------------------------------------------------
   4. VISTA A: APP PWA DEL TÉCNICO
--------------------------------------------------- */
.pwa-status-bar {
    background: #000D58;
    color: white;
    padding: 18px 15px 12px; /* Espacio extra arriba por el notch */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pwa-brand {
    font-weight: 800;
    font-size: 0.8rem;
    color: #F7FF4D;
}

.signal-badge {
    font-size: 0.65rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.signal-badge.offline { background: #dc3545; color: white; animation: blink 2s infinite;}
.signal-badge.online { background: #28a745; color: white; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.pwa-form-body {
    padding: 15px;
    padding-bottom: 40px;
}

.pwa-header-title {
    margin-bottom: 15px;
    border-bottom: 2px solid #28a745;
    padding-bottom: 10px;
}

.pwa-header-title h4 {
    margin: 0; color: #28a745; font-size: 0.95rem;
}

.pwa-header-title p {
    margin: 0; color: #666; font-size: 0.75rem;
}

.pwa-input-group {
    margin-bottom: 12px;
}

.pwa-row-inputs {
    display: flex;
    gap: 10px;
}

.pwa-input-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
}

.pwa-input-disabled, .pwa-textarea-disabled {
    width: 100%;
    padding: 10px;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #333;
    font-weight: 600;
}

.highlight-input {
    background: #e8f5e9;
    border-color: #28a745;
    color: #155724;
}

.pwa-textarea-disabled {
    resize: none;
    min-height: 70px;
}

/* Caja de Firma Digital */
.pwa-signature-box {
    margin-top: 15px;
    margin-bottom: 20px;
}

.signature-pad-container {
    width: 100%;
    height: 90px;
    border: 2px dashed #000D58;
    background: #fff;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.signature-caption {
    display: block;
    font-size: 0.65rem;
    color: #777;
    margin-top: 5px;
    text-align: right;
}

.pwa-btn-primary {
    width: 100%;
    background: #000D58;
    color: #F7FF4D;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background 0.3s;
}

/* Cursor Virtual GSAP */
.v-cursor {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    opacity: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 5;
}

/* ---------------------------------------------------
   5. VISTA B: PDF DE LA OFICINA (Valorizado)
--------------------------------------------------- */
.pdf-viewer-container {
    background: #525659;
    min-height: 100%;
    padding: 15px; /* Espacio para que parezca un visor */
}

.pdf-document-sheet {
    background: #fff;
    width: 100%;
    min-height: 400px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    padding: 15px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    position: relative;
}

.pdf-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.company-info h5 {
    margin: 0; font-size: 0.7rem; color: #333; font-weight: 900;
}
.company-info p {
    margin: 0; font-size: 0.5rem; color: #666;
}

.doc-badge-status {
    text-align: right;
}
.pdf-doc-title {
    display: block; font-size: 0.8rem; font-weight: bold; color: #28a745; margin-bottom: 2px;
}
.pdf-doc-number {
    display: block; font-size: 0.6rem; color: #555; font-weight: bold;
}

.pdf-divider {
    border: none;
    border-top: 2px solid #28a745;
    margin: 10px 0;
}

.pdf-table-details {
    width: 100%;
    font-size: 0.6rem;
    margin-bottom: 12px;
    background: #f8f9fa;
}
.pdf-table-details td { padding: 4px; border: 1px solid #eee; }
.pdf-table-details strong { color: #000D58; }

.pdf-section-title {
    background: #f0f4f8;
    border-left: 3px solid #28a745;
    padding: 4px 6px;
    font-size: 0.6rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
}

.pdf-task-desc {
    font-size: 0.6rem;
    color: #444;
    border: 1px solid #eee;
    padding: 6px;
    margin-bottom: 12px;
}

.pdf-table-invoice {
    width: 100%;
    font-size: 0.55rem;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid #000D58;
}

.pdf-table-invoice th {
    background: #000D58; color: #F7FF4D; padding: 5px; text-align: left;
}
.pdf-table-invoice td {
    padding: 5px; border-bottom: 1px solid #eee;
}
.text-right { text-align: right !important; }

.pdf-total-row td {
    background: #eee; font-weight: bold; color: #000D58; font-size: 0.65rem; border-top: 2px solid #000D58;
}

.pdf-footer-signatures {
    margin-top: 20px;
    position: relative;
    height: 80px;
}

.pdf-sig-block {
    width: 120px;
    text-align: center;
}

.pdf-signature-preview {
    height: 40px;
    border-bottom: 1px solid #333;
    position: relative;
}

/* Acá se clonará la firma de canvas */
.pdf-rendered-sig {
    width: 100%; height: 100%; background: transparent;
}

.pdf-sig-block p {
    margin: 4px 0 0; font-size: 0.5rem; font-weight: bold;
}

/* SELLO GSAP "VALORIZADO" */
#pdf-stamp-approved {
    position: absolute;
    top: -20px; right: 10px;
    color: #dc3545;
    border: 3px solid #dc3545;
    padding: 5px 10px;
    font-size: 1rem;
    font-weight: 900;
    transform: rotate(-15deg) scale(3); /* Inicia grande para que GSAP lo aplaste */
    opacity: 0;
    border-radius: 6px;
    text-shadow: 1px 1px 0 rgba(220, 53, 69, 0.3);
}

/* ---------------------------------------------------
   6. RESPONSIVE DESIGN (Móviles)
--------------------------------------------------- */
@media (max-width: 992px) {
    .services-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-marketing-text {
        text-align: center;
    }
    
    .bullet-item {
        text-align: left;
    }
}