/* ==========================================================================
   WP-PLUGIN: RELATORIOS - STYLE V24.0 (FULL WIDTH + MOBILE)
   ========================================================================== */

:root {
    --primary: #EA95A8;       /* Rosa Milky */
    --primary-hover: #D17B90;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --bg-soft: #f8fafc;
    --white: #ffffff;
    --radius: 12px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* 1. GERAL (FULL WIDTH) */
.lovable-wrapper {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-main);
    /* OCUPA TODO O ESPAÇO DISPONÍVEL */
    width: 100%;
    max-width: 100%; 
    margin: 0;
    padding: 20px; /* Espaçamento interno para não colar na borda */
    box-sizing: border-box;
}

/* 2. HERO (TOPO) */
.lovable-hero {
    background: linear-gradient(135deg, #ffffff 0%, #FFF0F5 100%);
    border: 1px solid #fce7f3;
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.hero-text h2 { margin: 0; font-size: 1.5rem; font-weight: 800; color: #9d174d; }
.hero-text p { margin: 5px 0 0; color: #831843; opacity: 0.8; font-size: 0.95rem; }

.hero-search {
    flex: 1; min-width: 300px; display: flex; gap: 10px;
    background: var(--white); padding: 8px; border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn-hero-action {
    background: var(--primary); color: white; border: none;
    width: 42px; height: 42px; border-radius: 8px;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-hero-action:hover { background: var(--primary-hover); transform: translateX(2px); }

/* 3. ABAS */
.lovable-tabs {
    display: flex; gap: 10px; margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9; padding-bottom: 0;
    overflow-x: auto; 
    scrollbar-width: none; 
}
.lovable-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    background: transparent; border: none; padding: 12px 20px;
    font-size: 0.9rem; font-weight: 700; color: var(--text-muted);
    cursor: pointer; border-bottom: 3px solid transparent;
    transition: 0.2s; display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

/* 4. CARDS */
.lovable-card-section {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border-light);
    margin-bottom: 15px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.card-header {
    padding: 20px 25px; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center;
    background: var(--white); transition: 0.2s;
}
.card-header:hover { background: #f8fafc; }
.header-left { display: flex; align-items: center; gap: 15px; }
.header-left h3 { margin: 0; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.icon-circle {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    background: #eff6ff; color: #3b82f6; flex-shrink: 0;
}
.icon-circle.pink { background: #fdf2f8; color: #db2777; }
.icon-circle.purple { background: #f3e8ff; color: #9333ea; }
.icon-circle.yellow { background: #fffbeb; color: #d97706; }
.arrow-toggle { color: #cbd5e1; transition: 0.3s; }
.card-header.active .arrow-toggle { transform: rotate(90deg); color: var(--primary); }
.card-body { display: none; padding: 30px; background: var(--white); }

/* 5. FORMULÁRIO */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.input-modern {
    width: 100%; padding: 12px 15px;
    border: 1px solid #cbd5e1; border-radius: 8px;
    font-size: 0.95rem; color: var(--text-main);
    box-sizing: border-box; transition: 0.2s;
}
.input-modern:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(234, 149, 168, 0.15); }
.textarea-modern { height: 120px; resize: vertical; font-family: inherit; }
.input-outro-wrapper { margin-top: 10px; animation: slideDown 0.3s ease; }
.input-outro-wrapper.hidden { display: none; }
.input-outro { border-color: #fcd34d; background: #fffbeb; }
.marketing-extra {
    background: #fdf4ff; border: 1px dashed #d946ef;
    padding: 20px; border-radius: 12px; margin-bottom: 25px;
    animation: slideDown 0.3s ease;
}
.marketing-extra.hidden { display: none; }

/* 6. FOOTER FORM */
.form-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 25px; padding-top: 20px; border-top: 1px dashed #e2e8f0; flex-wrap: wrap; gap: 15px;
}
.btn-file {
    cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 6px; background: #f1f5f9; transition: 0.2s;
}
.btn-file:hover { background: #e2e8f0; color: var(--text-main); }
.btn-file input { display: none; }
.file-name { font-size: 0.8rem; color: #94a3b8; margin-left: 10px; font-style: italic; }
.satisfaction-wrapper { display: flex; align-items: center; gap: 15px; }
.sat-icon { font-size: 28px; color: #e2e8f0; cursor: pointer; transition: 0.2s; }
.sat-icon:hover { transform: scale(1.15); }
input:checked + .sat-icon.red { color: #EF4444; }
input:checked + .sat-icon.yellow { color: #F59E0B; }
input:checked + .sat-icon.green { color: #10B981; }
input:checked + .sat-icon.gray { color: #64748b; }
.satisfaction-wrapper input { display: none; }
.btn-save {
    background: #111827; color: white; border: none; padding: 12px 30px;
    border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s;
}
.btn-save:hover { background: #000; transform: translateY(-1px); }

/* 7. HISTÓRICO */
.history-timeline { margin-top: 40px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.history-timeline h4 { font-size: 0.8rem; text-transform: uppercase; color: #94a3b8; letter-spacing: 1px; margin-bottom: 20px; }
.timeline-item { display: flex; gap: 15px; margin-bottom: 20px; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #ddd; margin-top: 5px; flex-shrink: 0; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.timeline-text { font-size: 0.95rem; color: #334155; line-height: 1.5; background: #f8fafc; padding: 12px; border-radius: 8px; word-wrap: break-word; }
.timeline-link { font-size: 0.8rem; color: var(--primary); text-decoration: none; margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.marketing-badge { background: #fdf4ff; color: #a21caf; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; margin-bottom: 8px; border: 1px solid #f0abfc; display: inline-block; }

/* 8. GRID SULTS */
.sults-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; padding: 10px; }
.sults-item {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 15px; cursor: pointer; transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sults-item:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.sults-top { display: flex; justify-content: space-between; font-size: 0.75rem; color: #94a3b8; margin-bottom: 8px; }
.sults-id { font-weight: bold; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
.sults-title { font-weight: 700; color: #1e293b; font-size: 0.9rem; margin-bottom: 8px; line-height: 1.3; }
.sults-sub { font-size: 0.8rem; color: #64748b; margin-bottom: 8px; }
.sults-score { font-size: 0.8rem; font-weight: 800; text-align: right; }

/* 9. MODAL & ESTILO DOCUMENTO */
.chk-modal { display: none; position: fixed; z-index: 100005; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
.chk-modal-content {
    background-color: #fdfdfd; margin: 2% auto;
    width: 90%; max-width: 850px; height: 90%;
    display: flex; flex-direction: column;
    border-radius: 4px; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.chk-header { padding: 15px 25px; background: #333; color: #fff; display: flex; justify-content: space-between; align-items: center; border-radius: 4px 4px 0 0; }
.chk-body { padding: 40px; overflow-y: auto; flex: 1; font-family: 'Segoe UI', serif; color: #333; line-height: 1.6; }

.doc-section-title { font-size: 1.1em; color: #EA95A8; text-transform: uppercase; border-bottom: 2px solid #EA95A8; padding-bottom: 5px; margin-top: 30px; margin-bottom: 15px; font-weight: 800; }
.doc-item { margin-bottom: 20px; border-bottom: 1px dashed #eee; padding-bottom: 15px; }
.doc-q { font-weight: 700; color: #444; display: block; margin-bottom: 5px; }
.doc-r { font-size: 1em; color: #000; background: #f4f4f4; padding: 8px 12px; border-radius: 4px; display: inline-block; width: 100%; word-break: break-word; }
.doc-comment { margin-top: 8px; font-size: 0.9em; color: #666; background: #fff8dc; padding: 5px 10px; border-left: 3px solid #f1c40f; }
.doc-gallery { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.doc-img { height: 80px; width: auto; border: 1px solid #ccc; padding: 2px; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.doc-img:hover { transform: scale(1.5); box-shadow: 0 5px 15px rgba(0,0,0,0.2); position: relative; z-index: 10; }

/* 10. DOSSIÊ FOOTER */
.dossier-footer-area { margin-top: 40px; padding: 30px; background: #fdf4f6; border-top: 2px dashed var(--primary); text-align: center; border-radius: 0 0 16px 16px; }
.btn-dossier-full { background: #111827; color: #fff; border: none; padding: 15px 30px; border-radius: 50px; font-size: 1rem; font-weight: 800; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.btn-dossier-full:hover { background: #000; transform: scale(1.05); }

/* ==========================================================================
   MOBILE OPTIMIZATION
   ========================================================================== */
@media screen and (max-width: 768px) {
    .lovable-wrapper { padding: 0 15px; }
    
    /* Hero em coluna */
    .lovable-hero { flex-direction: column; text-align: center; padding: 20px; }
    .hero-search { width: 100%; min-width: 0; }
    
    /* Abas roláveis */
    .lovable-tabs { padding-bottom: 10px; }
    .tab-btn { padding: 10px 15px; font-size: 0.85rem; }
    
    /* Form 1 Coluna */
    .form-grid { grid-template-columns: 1fr; gap: 15px; }
    .card-body { padding: 15px; }
    .form-footer { flex-direction: column; gap: 20px; align-items: stretch; }
    .btn-save { width: 100%; }
    .file-wrapper { justify-content: center; }
    .satisfaction-wrapper { justify-content: center; }
    
    /* Grid SULTS 1 coluna */
    .sults-grid { grid-template-columns: 1fr; }
    
    /* Modal full screen */
    .chk-modal-content { width: 95%; height: 90%; margin: 5% auto; }
    .chk-header { padding: 10px 15px; }
    .chk-body { padding: 20px; }
    
    /* Tabela Sults */
    table { min-width: 600px; } 
    
    .btn-dossier-full { width: 100%; justify-content: center; }
}

/* UTILS */
.empty-placeholder { text-align: center; padding: 60px; color: #cbd5e1; }
.empty-placeholder i { font-size: 3rem; margin-bottom: 15px; display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.select2-container .select2-selection--single { height: 42px !important; border: none !important; background: transparent !important; display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__arrow { display: none; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #9ca3af; }