/* ============================================================================
   Estilos do Módulo de Reuniões Inteligentes - Orquestra Principal
   ============================================================================ */

/* ---- Layout da Página ---- */
.page-reunioes {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    padding: 20px;
    gap: 16px;
}

/* ---- Painel de Setup (Seleção de Obra) ---- */
.reuniao-setup-panel {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.reuniao-setup-panel h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.reuniao-setup-panel .setup-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 24px 0;
}

.reuniao-setup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reuniao-setup-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.reuniao-setup-form select,
.reuniao-setup-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reuniao-setup-form select:focus,
.reuniao-setup-form input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.btn-iniciar-reuniao {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    align-self: flex-start;
}

.btn-iniciar-reuniao:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ---- Histórico de Reuniões ---- */
.reuniao-history-section {
    margin-top: 32px;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.reuniao-history-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px 0;
}

.reuniao-history-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.reuniao-history-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.reuniao-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.reuniao-history-header strong {
    color: #1e293b;
    font-size: 0.95rem;
}

.reuniao-history-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}

.reuniao-status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.reuniao-status-badge.em_andamento {
    background: #fef3c7;
    color: #d97706;
}

.reuniao-status-badge.concluida {
    background: #d1fae5;
    color: #059669;
}

.reuniao-status-badge.cancelada {
    background: #fee2e2;
    color: #dc2626;
}

/* ---- Painel ao Vivo ---- */
.reuniao-live-panel {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

/* ---- Barra Superior ---- */
.reuniao-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.reuniao-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reuniao-topbar-left h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.reuniao-obra-badge {
    font-size: 0.8rem;
    padding: 3px 10px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 20px;
    font-weight: 600;
}

.reuniao-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
}

.reuniao-status.recording {
    background: #fee2e2;
    color: #dc2626;
}

.reuniao-status.paused {
    background: #fef3c7;
    color: #d97706;
}

.reuniao-topbar-right {
    display: flex;
    gap: 8px;
}

/* ---- Painel de Transcrição ---- */
.reuniao-transcricao-panel {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.transcricao-panel-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.transcricao-panel-header i {
    color: #6366f1;
}

.reuniao-transcricao-box {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 0;
}

.transcricao-placeholder,
.sugestoes-placeholder {
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
}

.transcricao-segment {
    padding: 4px 0;
    line-height: 1.6;
    border-bottom: 1px solid #f8fafc;
}

.transcricao-segment.interim {
    opacity: 0.7;
    font-style: italic;
}

.transcricao-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-right: 8px;
    font-family: monospace;
}

.transcricao-speaker {
    font-weight: 700;
    color: #4f46e5;
    margin-right: 6px;
    font-size: 0.85rem;
}

.transcricao-text {
    color: #334155;
    font-size: 0.9rem;
}

/* ---- Painel de Sugestões (Chat) ---- */
.reuniao-sugestoes-panel {
    width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sugestoes-panel-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sugestoes-panel-header i {
    color: #f59e0b;
}

.sugestoes-panel-header .sugestoes-count {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
}

.reuniao-sugestoes-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 200px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.reuniao-sugestoes-list::-webkit-scrollbar {
    width: 6px;
}

.reuniao-sugestoes-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ---- Cards de Sugestão ---- */
.sugestao-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.sugestao-card:hover {
    border-color: #cbd5e1;
}

.sugestao-card.aprovada {
    opacity: 0.75;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.sugestao-card.recusada {
    opacity: 0.6;
    background: #fef2f2;
    border-color: #fecaca;
}

.sugestao-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-left: 4px solid #6366f1;
    background: rgba(255, 255, 255, 0.6);
}

.sugestao-tipo-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sugestao-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.sugestao-status-badge.pendente {
    background: #dbeafe;
    color: #2563eb;
}

.sugestao-status-badge.aprovada {
    background: #d1fae5;
    color: #059669;
}

.sugestao-status-badge.recusada {
    background: #fee2e2;
    color: #dc2626;
}

.sugestao-body {
    padding: 10px 12px;
}

.sugestao-descricao {
    font-size: 0.9rem;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.sugestao-field {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 3px;
}

.sugestao-field strong {
    color: #334155;
}

.sugestao-trecho {
    margin-top: 8px;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
    border-left: 3px solid #e2e8f0;
}

.sugestao-actions {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #f1f5f9;
}

.btn-sugestao-accept,
.btn-sugestao-reject {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-sugestao-accept {
    background: #059669;
    color: #fff;
}

.btn-sugestao-accept:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.btn-sugestao-reject {
    background: #fff;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.btn-sugestao-reject:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* ---- Barra de Controles Inferior ---- */
.reuniao-controls-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.btn-reuniao-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    transition: all 0.15s;
}

.btn-reuniao-control:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-reuniao-control.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    font-size: 1rem;
    padding: 12px 28px;
}

.btn-reuniao-control.primary:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.btn-reuniao-control.primary.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: pulse-rec 2s infinite;
}

@keyframes pulse-rec {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.btn-reuniao-control.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.btn-reuniao-control.danger:hover {
    background: #fef2f2;
}

.btn-reuniao-upload {
    position: relative;
    overflow: hidden;
}

.btn-reuniao-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    cursor: pointer;
}

/* ---- Responsivo ---- */
@media (max-width: 900px) {
    .reuniao-live-panel {
        flex-direction: column;
    }

    .reuniao-sugestoes-panel {
        width: 100%;
        max-height: 40vh;
    }

    .reuniao-transcricao-panel {
        max-height: 30vh;
    }

    .reuniao-controls-bar {
        flex-wrap: wrap;
    }
}