/* ═══════════════════════════════════════════════
   Ata de Reunião Interna — Estilos
   ═══════════════════════════════════════════════ */

:root {
    --primary: #1a3c34;
    --primary-light: #2a5a4e;
    --primary-dark: #0f2620;
    --accent: #c5a55a;
    --bg: #f5f3ef;
    --surface: #ffffff;
    --sidebar-bg: #1a3c34;
    --sidebar-text: #d4dcd8;
    --text: #2d2d2d;
    --text-light: #6b6b6b;
    --border: #e0dcd6;
    --msg-user: #e8f0ec;
    --msg-assistant: #ffffff;
    --danger: #c0392b;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

/* ═══ Layout ═══ */
.app-container {
    display: flex;
    height: 100vh;
}

/* ═══ Sidebar ═══ */
.sidebar {
    width: 300px;
    min-width: 300px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--primary-dark);
    transition: transform 0.3s ease;
    z-index: 10;
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.logo-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* Progresso */
.progress-section {
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.progress-pct {
    color: var(--accent);
    font-weight: 700;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    height: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* Resumo */
.resumo-section {
    padding: 18px;
    flex: 1;
    overflow-y: auto;
}

.resumo-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.resumo-content {
    font-size: 13px;
    line-height: 1.7;
}

.resumo-content p {
    margin-bottom: 4px;
}

.resumo-placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    font-size: 12px;
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-gerar-pdf,
.btn-reiniciar {
    width: 100%;
    padding: 11px 16px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-gerar-pdf {
    background: var(--accent);
    color: #1a1a1a;
}

.btn-gerar-pdf:hover:not(:disabled) {
    background: #d4b46a;
    transform: translateY(-1px);
}

.btn-gerar-pdf:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-reiniciar {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text);
}

.btn-reiniciar:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-icon {
    font-size: 16px;
}

.sidebar-footer {
    padding: 12px 18px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer .dev {
    display: block;
    font-size: 9px;
}

/* ═══ Chat Principal ═══ */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
}

.chat-header-info h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.chat-header-info .status {
    font-size: 11px;
    color: var(--text-light);
}

.chat-header-avatar {
    margin-left: auto;
    font-size: 32px;
    line-height: 1;
}

/* ═══ Chat Messages ═══ */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.65;
    box-shadow: var(--shadow);
}

.message.assistant .message-bubble {
    background: var(--msg-assistant);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
    background: var(--msg-user);
    border: 1px solid #d5e0d9;
    border-bottom-right-radius: 4px;
}

.message-bubble p {
    margin-bottom: 6px;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble ul {
    margin: 4px 0 4px 18px;
}

.message-bubble li {
    margin-bottom: 2px;
}

.message-bubble strong {
    font-weight: 600;
    color: var(--primary);
}

/* ═══ Chat Input ═══ */
.chat-input-container {
    padding: 14px 22px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.image-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.image-preview img {
    max-height: 120px;
    display: block;
}

.image-preview.hidden {
    display: none;
}

.remove-preview {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-attach {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-attach:hover {
    background: var(--msg-user);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    line-height: 1.4;
    background: var(--bg-input, #f5f5f5);
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 60, 52, 0.08);
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-send:hover {
    background: var(--primary-light);
}

/* ═══ Modal ═══ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.modal-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.modal-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-download {
    display: block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-download:hover {
    background: var(--primary-light);
}

.btn-close-modal {
    background: none;
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-light);
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: var(--bg);
}

/* ═══ Action Cards ═══ */
.action-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.action-card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.action-card:hover:not(:disabled) {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 60, 52, 0.25);
}

.action-card:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.action-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.action-card:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ═══ Responsivo ═══ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .message {
        max-width: 92%;
    }
}
