/* --- RESET & VARIAVEIS --- */
:root {
    --primary-blue: #0b0b45;
    --accent-purple: #6b46f2;
    --accent-lime: #dbe82c;
    --text-gray: #555555;
    --bg-light: #f4f4f7;
    --white: #ffffff;
    --border-radius: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- UTILITARIOS --- */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.center {
    align-items: center;
    justify-content: center;
}

.w-full {
    width: 100%;
}

.max-w-300 {
    max-width: 100%;
}

.mb-0 {
    margin-bottom: 0 !important;
}


.watermark-mask {
    mask-image: linear-gradient(to left, black, transparent);
    -webkit-mask-image: linear-gradient(to left, black, transparent);
}

/* --- TELA DE LOGIN --- */
#login-screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(90deg, #f4f4f7 50%, #e0e0e0 50%);
    position: relative;
    overflow: hidden;
}

.login-content-left {
    width: 50%;
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    background-color: rgba(244, 244, 247, 0.95);
    transition: all 0.3s ease;
}

.login-content-right {
    width: 50%;
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    background-color: rgba(224, 224, 224, 0.95);
    transition: all 0.3s ease;
}

.login-content-right #login-form {
    width: 100%;
    max-width: 450px;
}

.logo-area {
    margin-bottom: 2.5rem;
}

.logo-221 {
    height: 40px;
    margin-bottom: 1rem;
    display: block;
}

.logo-brand {
    height: 90px;
    display: block;
}

h1.login-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

p.login-desc {
    color: var(--text-gray);
    font-size: 1.35rem;
    margin-bottom: 3.5rem;
    max-width: 95%;
    line-height: 1.5;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

.input-group .login-input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    outline: none;
    transition: all 0.3s;
    color: #333;
    font-weight: 500;
}

.input-group .login-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 4px 20px rgba(107, 70, 242, 0.15);
}

.input-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.input-icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
}

.input-icon-lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
}

.btn-primary {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--accent-purple);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(107, 70, 242, 0.4);
}

.btn-primary:hover {
    background-color: #5636ca;
    transform: translateY(-2px);
}


.login-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 1024px) {
    .login-content-left,
    .login-content-right {
        width: 50%;
        padding: 3rem;
    }
    h1.login-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    #login-screen {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        background: var(--bg-light);
    }
    .login-content-left {
        width: 100%;
        padding: 2rem 1.5rem;
        order: 1;
        background: var(--bg-light);
        justify-content: flex-start;
        padding-top: 4rem;
    }
    .login-content-right {
        width: 100%;
        padding: 2rem 1.5rem;
        order: 2;
        background: var(--bg-light);
        justify-content: flex-start;
    }
    h1.login-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
}

/* --- ANIMAÇÕES --- */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    70% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- TELA 2: INPUTS/FORMULÁRIO --- */
#inputs-screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    position: relative;
}

.bg-watermark {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 90%;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

header {
    background: white;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
    z-index: 10;
}

.header-user-info {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.circle-badge {
    background-color: var(--accent-lime);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1rem;
}

.logout-link {
    color: #999;
    margin-left: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
    background: none;
    border: none;
    padding: 0;
}

.logout-link:hover {
    color: #666;
}

.form-container {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

h2.form-title {
    color: var(--primary-blue);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

p.form-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.5;
    font-size: 1.1rem;
}

.form-section {
    width: 100%;
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.custom-select-wrapper,
.custom-input-wrapper {
    position: relative;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    font-size: 1.1rem;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.inner-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.inner-icon-globe {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='2' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3E%3C/path%3E%3C/svg%3E");
}

.inner-icon-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

.inner-icon-calendar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

.arrow-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.inputs-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

/* Estilos para Dropdowns do Dash */
.custom-select-wrapper .Select-control,
.custom-select-wrapper .Select-input,
.custom-select-wrapper .Select-placeholder,
.custom-select-wrapper .Select-value {
    padding-left: 3rem !important;
}

.custom-select-wrapper .Select-control {
    border: 1px solid #ddd !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
    min-height: 56px !important;
    background: white !important;
}

.custom-select-wrapper .Select-control:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.custom-select-wrapper .Select.is-focused > .Select-control {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 4px 20px rgba(107, 70, 242, 0.15) !important;
}

.custom-select-wrapper .Select-arrow-zone {
    padding-right: 2.5rem !important;
}

.custom-select-wrapper .Select-arrow {
    border-color: #999 transparent transparent !important;
}

.custom-select-wrapper .Select-value-label {
    color: #333 !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
}

.custom-select-wrapper .Select-placeholder {
    color: #999 !important;
    font-size: 1.1rem !important;
}

.custom-select-wrapper .Select-input > input {
    color: #333 !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
}

/* Responsividade para formulário */
@media (max-width: 1024px) {
    .form-container {
        padding: 1.5rem;
    }
    h2.form-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    h2.form-title {
        font-size: 2rem;
    }
    .grid-2,
    .inputs-row {
        grid-template-columns: 1fr !important;
        flex-direction: column;
    }
    .form-container {
        padding: 1rem;
    }
}

/* --- ESTILOS PARA INSIGHTS FORMATADOS --- */
.insights-container [contenteditable="true"] h2 {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-purple);
    padding-bottom: 0.5rem;
}

.insights-container [contenteditable="true"] h2:first-child {
    margin-top: 0;
}

.insights-container [contenteditable="true"] h3 {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-purple);
    padding-left: 0.75rem;
}

.insights-container [contenteditable="true"] h3:first-child {
    margin-top: 0;
}

.insights-container [contenteditable="true"] h4 {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.insights-container [contenteditable="true"] p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.insights-container [contenteditable="true"] p:last-child {
    margin-bottom: 0;
}

.insights-container [contenteditable="true"] strong {
    color: var(--primary-blue);
    font-weight: 700;
}

.insights-container [contenteditable="true"] em {
    color: var(--accent-purple);
    font-style: italic;
}

.insights-container [contenteditable="true"] ul {
    margin: 0.75rem 0;
    padding-left: 0;
    list-style-type: none;
}

.insights-container [contenteditable="true"] ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.insights-container [contenteditable="true"] ul li::before {
    content: "▸";
    color: var(--accent-purple);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.insights-container [contenteditable="true"] ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

.insights-container [contenteditable="true"] ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.insights-container [contenteditable="true"] li strong {
    color: var(--primary-blue);
}

.insights-container [contenteditable="true"] li em {
    color: var(--accent-purple);
}

/* --- REPORT HEADER --- */
.report-header {
    max-width: 750px;
    margin: 0 auto;
    padding: 20px;
    margin-bottom: 40px;
}

.report-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 4px solid var(--primary-blue);
    padding-bottom: 24px;
    flex-wrap: wrap;
    gap: 20px;
}

.report-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.report-header-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.report-header-title-group {
    min-width: 0;
    flex: 1;
}

.report-header-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
}

.report-header-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 4px;
    margin: 0;
}

.report-header-right {
    text-align: right;
    flex-shrink: 0;
}

.report-header-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.report-header-meta {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: 4px;
    margin: 0;
}

/* --- LOADING OVERLAY --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: var(--primary-blue);
    max-width: 600px;
    padding: 2rem;
}

.loading-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-blue);
}

.loading-step {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2rem;
    min-height: 2rem;
    color: var(--accent-lime);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.loading-steps-list {
    text-align: left;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.loading-steps-list h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-align: center;
}

.loading-steps-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.loading-steps-list li {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.loading-steps-list li:last-child {
    border-bottom: none;
}

.loading-steps-list li.active {
    color: var(--accent-lime);
    font-weight: 600;
    padding-left: 1.5rem;
    position: relative;
}

.loading-steps-list li.active::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--accent-lime);
}

.loading-steps-list li.completed {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
}

/* Spinner animado com cores da app */
.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(11, 11, 69, 0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   MELHORIAS VISUAIS - RELATÓRIOS PROFISSIONAIS
   ============================================ */

/* 1. Sistema de Numeração de Seções com Destaque */
.section-title {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.section-number {
    color: var(--accent-purple);
    font-size: 1.2rem;
    margin-right: 0.5rem;
    font-weight: 800;
}

/* 2. Strategic Box (Caixas de Insights Estratégicos) */
.strategic-box {
    background-color: #f8fafc;
    border-left: 5px solid var(--accent-purple);
    padding: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
    page-break-inside: avoid;
}

.strategic-box-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.strategic-box-title {
    color: var(--primary-blue);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.strategic-box-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.strategic-box-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.3;
}

.strategic-box-list li::before {
    content: "•";
    color: var(--accent-purple);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Seções Estratégicas dentro dos insights */
.strategic-section {
    background-color: #f8fafc;
    border-left: 5px solid var(--accent-purple);
    padding: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
    page-break-inside: avoid;
}

.strategic-section .sb-title {
    color: var(--primary-blue);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.strategic-section .sb-list {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0 0;
}

.strategic-section .sb-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.3;
}

.strategic-section .sb-list li::before {
    content: "•";
    color: var(--accent-purple);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.strategic-section p {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.strategic-section p:last-child {
    margin-bottom: 0;
}

/* Caixas de Tópicos Separadas */
.topic-box {
    padding: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 2px solid;
    page-break-inside: avoid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.topic-box .topic-title {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-box .topic-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.topic-box .topic-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.topic-box .topic-list li::before {
    content: "▸";
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Key Strategic Insights - Azul Escuro */
.topic-insights {
    background-color: #f0f4ff;
    border-color: var(--primary-blue);
}

.topic-insights .topic-title {
    color: var(--primary-blue);
}

.topic-insights .topic-list li {
    color: #1e293b;
}

.topic-insights .topic-list li::before {
    color: var(--primary-blue);
}

/* Implicações para a Marca - Roxo */
.topic-implications {
    background-color: #f5f3ff;
    border-color: var(--accent-purple);
}

.topic-implications .topic-title {
    color: var(--accent-purple);
}

.topic-implications .topic-list li {
    color: #1e293b;
}

.topic-implications .topic-list li::before {
    color: var(--accent-purple);
}

/* Análise de Lideranças - Azul/Teal */
.topic-leadership {
    background-color: #f0f9ff;
    border-color: #0ea5e9;
}

.topic-leadership .topic-title {
    color: #0369a1;
}

.topic-leadership .topic-list li {
    color: #1e293b;
}

.topic-leadership .topic-list li::before {
    color: #0ea5e9;
}

/* Ações Recomendadas - Amarelo/Verde Limão */
.topic-actions {
    background-color: #fefce8;
    border-color: var(--accent-lime);
}

.topic-actions .topic-title {
    color: #6b5e00;
}

.topic-actions .topic-list li {
    color: #1e293b;
}

.topic-actions .topic-list li::before {
    color: #6b5e00;
}

/* 3. Priority Tags (Tags de Prioridade) */
.priority-tag {
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 5px;
    display: inline-block;
}

.priority-tag.p-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-tag.p-med {
    background: #fef3c7;
    color: #d97706;
}

.priority-tag.p-low {
    background: #d1fae5;
    color: #059669;
}

/* 4. Cards com Sombras Sutis e Bordas Refinadas */
.report-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.analysis-section,
.section-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* 5. Tabelas com Destaque de Células Importantes */
.table-highlight {
    background-color: rgba(107, 70, 242, 0.05) !important;
    font-weight: 600;
    color: var(--primary-blue) !important;
}

.table-header-highlight {
    background-color: #f3f9ff !important;
}

/* 6. Header Profissional com Logo e Metadados */
.report-header-professional {
    margin-bottom: 2.5rem;
    border-bottom: 4px solid var(--primary-blue);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    page-break-inside: avoid;
}

.report-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.report-header-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.report-header-title-group {
    min-width: 0;
    flex: 1;
}

.report-header-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
}

.report-header-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 0.25rem;
    margin: 0;
}

.report-header-right {
    text-align: right;
    flex-shrink: 0;
}

.report-header-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.report-header-meta {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: 0.25rem;
    margin: 0;
}

/* 7. Seções com Controle de Quebra de Página */
.avoid-break {
    page-break-inside: avoid;
    break-inside: avoid;
}

.page-break {
    page-break-after: always;
    display: block;
    height: 1px;
}

/* 8. Footer Profissional */
.report-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

/* 9. Insight Boxes com Fundo Destacado */
.insight-box-enhanced {
    background-color: #f8fafc;
    border-left: 5px solid var(--accent-purple);
    padding: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
    page-break-inside: avoid;
}

.insights-container [contenteditable="true"],
.insight-box-enhanced[contenteditable="true"] {
    background-color: #f8fafc !important;
    border-left: 5px solid var(--accent-purple) !important;
    border-radius: 0 8px 8px 0 !important;
}

/* 10. Tipografia Refinada */
.report-container {
    font-family: var(--font-family);
    line-height: 1.7;
}

.report-container h1,
.report-container h2,
.report-container h3,
.report-container h4 {
    letter-spacing: -0.02em;
}

.report-container .uppercase {
    letter-spacing: 0.05em;
}

/* 11. Sistema de Cores Consistente - Aplicação Global */
#instagram-report-container,
#seo-ppc-report-container,
#branding-report-container {
    font-family: var(--font-family);
    color: #333;
}

/* Centralização de Gráficos */
.chart-wrapper,
.charts-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

.chart-wrapper {
    flex-direction: column;
}

.charts-container {
    flex-wrap: wrap;
    gap: 20px;
}

/* Layout específico para gráficos de Hashtags - lado a lado */
.hashtags-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.hashtags-charts .chart-wrapper {
    width: 100%;
    margin: 0;
}

/* Layout específico para gráficos de Estratégia de Conteúdo - um abaixo do outro */
.content-strategy-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.content-strategy-charts .chart-wrapper {
    width: 100%;
    margin: 0;
    min-width: 0; /* Permite que os gráficos encolham se necessário */
}

.content-strategy-charts .chart-wrapper > div {
    width: 100%;
    max-width: 100%;
}

/* Ajustar altura dos gráficos para melhor visualização lado a lado */
.content-strategy-charts .js-plotly-plot {
    height: 400px !important;
}

/* Responsividade: empilhar gráficos em telas menores */
@media (max-width: 1024px) {
    .content-strategy-charts {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Centralizar gráficos Plotly/Dash */
.chart-wrapper .js-plotly-plot,
.chart-wrapper .plotly,
.chart-wrapper > div,
.charts-container .js-plotly-plot,
.charts-container .plotly,
.charts-container > div {
    margin: 0 auto;
    display: block;
}

/* Centralizar gráficos dentro de containers de seção */
.section-container .js-plotly-plot,
.section-container .plotly,
.section-container > div > .js-plotly-plot,
.analysis-section .js-plotly-plot,
.analysis-section .plotly,
.analysis-section > div > .js-plotly-plot {
    margin: 0 auto;
    display: block;
}

/* Responsividade para Strategic Box */
@media (max-width: 1024px) {
    .strategic-box-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .report-header-professional {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-header-right {
        text-align: left;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* ============================================
   ESTILOS PARA EXPORTAÇÃO PDF (html2pdf.js)
   ============================================ */

/* Estilos específicos para exportação PDF - aplicados via classe .pdf-export */
.pdf-export {
    max-width: 100% !important;
    width: 100% !important;
    padding: 10px 15px !important;
    margin: 0 !important;
    background: white !important;
}

.pdf-export .report-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Reduzir espaçamentos entre seções */
.pdf-export .analysis-section,
.pdf-export .section-container {
    margin-bottom: 15px !important;
    padding: 12px !important;
    page-break-inside: avoid;
}

/* Reduzir espaçamento de títulos */
.pdf-export .section-title {
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    font-size: 1.2rem !important;
}

/* Otimizar espaçamento de gráficos */
.pdf-export .chart-wrapper,
.pdf-export .charts-container {
    margin: 8px 0 !important;
    gap: 10px !important;
}

/* Layout otimizado para gráficos de Hashtags - lado a lado */
.pdf-export .charts-container,
.pdf-export .hashtags-charts,
.pdf-export .content-strategy-charts {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 8px 0 !important;
}

.pdf-export .charts-container .chart-wrapper,
.pdf-export .hashtags-charts .chart-wrapper,
.pdf-export .content-strategy-charts .chart-wrapper {
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
    min-width: 0 !important;
}

.pdf-export .charts-container .chart-wrapper > div,
.pdf-export .hashtags-charts .chart-wrapper > div,
.pdf-export .content-strategy-charts .chart-wrapper > div {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ajustar altura dos gráficos de Estratégia de Conteúdo no PDF */
.pdf-export .content-strategy-charts .js-plotly-plot {
    height: 350px !important;
    max-height: 350px !important;
}

/* Reduzir espaçamento de parágrafos e texto */
.pdf-export p {
    margin-bottom: 8px !important;
    margin-top: 4px !important;
}

/* Otimizar boxes de insights */
.pdf-export .strategic-box,
.pdf-export .insight-box-enhanced,
.pdf-export .strategic-section,
.pdf-export .report-meta-box {
    margin-top: 8px !important;
    margin-bottom: 10px !important;
    padding: 10px !important;
}

/* Reduzir espaçamento do header */
.pdf-export .report-header-professional,
.pdf-export .report-header {
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
}

/* Otimizar tabelas */
.pdf-export table {
    margin: 8px 0 !important;
    font-size: 0.85rem !important;
}

.pdf-export th,
.pdf-export td {
    padding: 6px !important;
}

/* Garantir que gráficos Plotly usem espaço completo */
.pdf-export .js-plotly-plot,
.pdf-export .plotly {
    width: 100% !important;
    max-width: 100% !important;
}

/* Reduzir espaçamento entre elementos de lista */
.pdf-export ul,
.pdf-export ol {
    margin: 6px 0 !important;
    padding-left: 1.2rem !important;
}

.pdf-export li {
    margin-bottom: 4px !important;
}

@media print {
    @page {
        size: A3;
        margin: 10mm;
    }
    
    /* Manter cores de fundo */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Ocultar elementos que não devem aparecer na impressão */
    .no-print,
    button,
    .floating-buttons,
    #export-complete-pdf-btn,
    #export-branding-pdf-btn,
    #export-instagram-pdf-btn {
        display: none !important;
    }
    
    /* Ajustar layout para impressão */
    body {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .report-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Controlar quebras de página no cabeçalho */
    .report-header {
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 15px !important;
    }
    
    .report-header-content {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    /* Garantir que gráficos e imagens sejam impressos */
    img,
    svg,
    canvas {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Quebras de página */
    .page-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Ajustar fontes para impressão */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Garantir que tabelas não quebrem */
    table {
        page-break-inside: avoid;
    }
}

/* ============================================
   PÁGINA DE ERRO
   ============================================ */
#error-screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(90deg, #f4f4f7 55%, #e0e0e0 100%);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.error-content {
    width: 100%;
    max-width: 600px;
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
    background-color: rgba(244, 244, 247, 0.95);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.error-content .logo-area {
    margin-bottom: 2.5rem;
}

.error-icon-container {
    margin-bottom: 2rem;
}

.error-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #dc2626;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
    animation: pulse-error 2s ease-in-out infinite;
}

@keyframes pulse-error {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.error-title {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-weight: 800;
}

.error-message {
    color: #dc2626;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
}

.error-description {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 90%;
}

.error-retry-btn {
    max-width: 300px;
    margin: 0 auto;
}

/* Responsividade para página de erro */
@media (max-width: 768px) {
    .error-content {
        padding: 3rem 2rem;
        margin: 2rem;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-message {
        font-size: 1.1rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .error-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}
