/* =====================================================
   AITALK — DESIGN SYSTEM (Inspired by Otter.ai)
   ===================================================== */

/* === TOKENS === */
:root {
    --color-primary:       #1A56DB;
    --color-primary-hover: #1446B8;
    --color-primary-light: #EBF2FF;
    --color-bg:            #F9FAFB;
    --color-surface:       #FFFFFF;
    --color-border:        #E5E7EB;
    --color-text:          #111827;
    --color-text-secondary:#6B7280;
    --color-text-muted:    #9CA3AF;
    --color-sidebar:       #FFFFFF;
    --color-sidebar-hover: #F3F4F6;
    --color-sidebar-active:#EBF2FF;
    --color-danger:        #EF4444;
    --color-success:       #10B981;
    --color-warning:       #F59E0B;
    --radius-sm:           6px;
    --radius-md:           10px;
    --radius-lg:           14px;
    --shadow-sm:           0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:           0 4px 12px rgba(0,0,0,0.10);
    --font:                -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* === APP HEADER === */
.app-header {
    height: 56px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    position: relative;
    z-index: 200;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.1rem;
}

.header-logo i {
    color: var(--color-primary);
    font-size: 1.2rem;
}

/* Legado — manter para não quebrar nada */
.header { display: none; }
.header-content, .header-controls, .app-title { display: none; }

/* === MAIN LAYOUT === */
.main-container {
    display: flex;
    height: calc(100vh - 56px);
    width: 100%;
    overflow: hidden;
}

/* Panels */
.panel {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}

.panel:last-child {
    border-right: none;
}

.left-panel {
    width: 7cm;
    min-width: 7cm;
    max-width: 7cm;
    flex-shrink: 0;
}

.center-panel {
    flex: 1;
    min-width: 300px;
}

.right-panel {
    width: 320px;
    min-width: 250px;
    max-width: 500px;
    flex-shrink: 0;
}

/* Header customizado do painel central */
.center-header-custom {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center;
    width: 100%;
}


/* Splitter */
.splitter {
    width: 4px;
    background: #e0e0e0;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.splitter:hover {
    background: #007acc;
}

.splitter::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 8px;
    height: 100%;
    background: transparent;
}

.splitter.dragging {
    background: #007acc;
    user-select: none;
}

.panel-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.panel-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }
    
    .panel {
        min-width: auto;
        flex: none;
        height: 300px;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
}

/* ===== ESTADOS DO BOTÃO RECORD ===== */

/* Estado Normal (já existe no components.css) */

/* Estado Initializing do botão */
.btn-record-header.initializing {
    background: #ffc107 !important; /* Amarelo */
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4) !important;
    animation: pulse-initializing 1s infinite;
}

.btn-record-header.initializing:hover {
    background: #e0a800 !important;
    cursor: not-allowed;
}

/* Estado Recording do botão */
.btn-record-header.recording {
    background: #dc3545 !important; /* Vermelho */
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4) !important;
    animation: pulse-recording 1.5s infinite;
}

.btn-record-header.recording:hover {
    background: #c82333 !important;
    cursor: not-allowed;
}

/* Estado Paused do botão */
.btn-record-header.paused {
    background: #fd7e14 !important; /* Laranja */
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.4) !important;
    animation: pulse-paused 2s infinite;
}

.btn-record-header.paused:hover {
    background: #e8590c !important;
    cursor: not-allowed;
}

/* Animações */
@keyframes pulse-initializing {
    0%, 100% { opacity: 1; transform: translateY(-1px) scale(1); }
    50% { opacity: 0.7; transform: translateY(-1px) scale(1.03); }
}

@keyframes pulse-recording {
    0%, 100% { opacity: 1; transform: translateY(-1px) scale(1); }
    50% { opacity: 0.8; transform: translateY(-1px) scale(1.02); }
}

@keyframes pulse-paused {
    0%, 100% { opacity: 1; transform: translateY(-1px) scale(1); }
    50% { opacity: 0.6; transform: translateY(-1px) scale(1.01); }
}