/* Container que ocupa toda a altura da tela (menos o header do site) */
.ai-editor-container {
    display: flex;
    min-height: calc(100vh - 80px); /* Ajuste conforme seu header */
    background-color: #e9ecef; /* Cor de "Mesa" */
    overflow: hidden;
}

/* --- LADO ESQUERDO: PAINEL DE CONTROLE --- */
.editor-sidebar {
    width: 400px;
    background-color: #212529; /* Dark Mode para o painel */
    color: #fff;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.editor-sidebar h4 {
    color: #0dcaf0; /* Ciano para destaque */
    margin-bottom: 20px;
    font-weight: 700;
}

.editor-sidebar label {
    font-size: 0.85rem;
    color: #adb5bd;
    margin-bottom: 5px;
}

/* Estilo customizado para inputs no fundo escuro */
.dark-input {
    background-color: #343a40;
    border: 1px solid #495057;
    color: #fff;
    border-radius: 6px;
}
.dark-input:focus {
    background-color: #3b4248;
    color: #fff;
    border-color: #0dcaf0;
    box-shadow: none;
}

/* Área de Upload Destacada */
.ai-upload-box {
    border: 2px dashed #0dcaf0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: rgba(13, 202, 240, 0.1);
    transition: 0.3s;
    cursor: pointer;
}
.ai-upload-box:hover {
    background: rgba(13, 202, 240, 0.2);
}

/* --- LADO DIREITO: PREVIEW A4 --- */
.preview-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    overflow-y: auto;
}

.paper-a4 {
    width: 210mm;
    min-height: 297mm;
    background: white;
    padding: 25mm;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    color: #000;
    font-family: 'Georgia', serif; /* Fonte mais séria para o documento */
    font-size: 12pt;
    line-height: 1.6;
}

/* Responsividade: Em celular vira coluna única */
@media (max-width: 900px) {
    .ai-editor-container {
        flex-direction: column;
    }
    .editor-sidebar {
        width: 100%;
        height: auto;
    }
    .paper-a4 {
        width: 100%;
        padding: 15mm;
    }
}