/**
 * estilos.css — Página de grabación de reuniones
 * Colores corporativos Pitaya: #51B8AC (principal), #0E544C (header)
 */

:root {
    --color-principal:  #51B8AC;
    --color-dark:       #0E544C;
    --color-light:      #e8f7f6;
    --color-danger:     #e74c3c;
    --color-warning:    #f39c12;
    --color-success:    #27ae60;
    --color-info:       #2980b9;
    --color-pause:      #8e44ad;
    --bg-page:          #f0f7f6;
    --bg-card:          rgba(255, 255, 255, 0.92);
    --shadow-card:      0 20px 60px rgba(14, 84, 76, 0.12);
    --radius-card:      20px;
    --font:             'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: linear-gradient(135deg, #e8f7f6 0%, #d4f0ec 50%, #c0e9e4 100%);
    min-height: 100vh;
    color: #1a2e2c;
}

/* ── Header ──────────────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a6b61 100%);
    padding: 1.25rem 2rem;
    box-shadow: 0 4px 20px rgba(14, 84, 76, 0.3);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    margin-top: 1px;
}

/* ── Wrapper y cards ──────────────────────────────────── */
.main-wrapper {
    max-width: 680px;
    margin: 2.5rem auto;
    padding: 0 1rem 3rem;
}

.grabacion-card,
.estado-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Estados especiales */
.estado-card {
    text-align: center;
    padding: 3rem 2rem;
}

.estado-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-principal);
}

.estado-error .estado-icon { color: var(--color-danger); }
.estado-info  .estado-icon { color: var(--color-info);   }
.estado-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}
.estado-card p {
    color: #5a7570;
    line-height: 1.6;
}

/* Spinner de carga */
.spinner-pitaya {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    position: relative;
}
.spinner-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--color-light);
    border-top-color: var(--color-principal);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Info de la reunión ──────────────────────────────── */
.reunion-info {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e8f0ee;
}

.reunion-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-principal);
    background: var(--color-light);
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 0.75rem;
}

.reunion-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.reunion-descripcion {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ── Barra de estado ─────────────────────────────────── */
.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4faf9;
    border: 1px solid #d8eeec;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-dark);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9db8b5;
    flex-shrink: 0;
    transition: background 0.3s;
}

.status-dot.grabando {
    background: var(--color-danger);
    animation: pulseDot 1.2s ease-in-out infinite;
}

.status-dot.pausada  { background: var(--color-warning); }
.status-dot.listo    { background: var(--color-principal); }
.status-dot.completado { background: var(--color-success); }

@keyframes pulseDot {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.7; }
}

.status-timer {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a7570;
    font-variant-numeric: tabular-nums;
}

/* ── Chunks info ─────────────────────────────────────── */
.chunks-info {
    font-size: 0.8rem;
    color: #7a9e9a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Botones de control ──────────────────────────────── */
.controles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.btn-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 14px;
    padding: 1.1rem 0.5rem;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-control i {
    font-size: 1.75rem;
}

.btn-control:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

.btn-control:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.btn-empezar {
    background: linear-gradient(135deg, var(--color-principal), var(--color-dark));
    color: #fff;
    grid-column: span 2;
    padding: 1.25rem;
    font-size: 0.9rem;
}

.btn-pausa {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

.btn-reanudar {
    background: linear-gradient(135deg, var(--color-principal), #3da99d);
    color: #fff;
}

.btn-finalizar {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

/* ── Log de actividad ────────────────────────────────── */
.activity-log {
    background: #f8fbfb;
    border-radius: 12px;
    border: 1px solid #e0eceb;
    overflow: hidden;
}

.activity-log-header {
    background: #edf6f5;
    padding: 0.6rem 0.875rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #5a7570;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #e0eceb;
}

.activity-entries {
    max-height: 180px;
    overflow-y: auto;
    padding: 0.5rem;
    font-size: 0.775rem;
    font-family: 'Courier New', monospace;
    color: #3d6b65;
    line-height: 1.6;
}

.log-entry {
    display: flex;
    gap: 8px;
    padding: 2px 4px;
}

.log-entry:nth-child(even) { background: rgba(81,184,172,0.04); }

.log-time { color: #9db8b5; flex-shrink: 0; }
.log-msg  { color: #2c5450; }
.log-ok   .log-msg { color: var(--color-success); }
.log-err  .log-msg { color: var(--color-danger);  }
.log-warn .log-msg { color: var(--color-warning); }
