:root {
    --bg-dark: #0B1020;
    --panel-bg: #141B34;
    --accent-blue: #4F8CFF;
    --accent-green: #2ECC71;
    --accent-purple: #9B59B6;
    --accent-yellow: #F1C40F;
    --accent-red: #E74C3C;
    --text-main: #DDE3F5;
    --text-muted: #8E9A8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Panel Izquierdo */
.voice-panel {
    width: 360px;
    background-color: rgba(20, 27, 52, 0.6);
    border-right: 1px solid #1E294B;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.brand h2 { color: var(--accent-blue); font-size: 1.3rem; text-align: center; }
.brand p { color: #8E9AAB; font-size: 0.85rem; text-align: center; margin-bottom: 20px; }

/* Orbe Animado Siri */
.orb-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.orb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 30px var(--accent-blue);
    transition: all 0.3s ease;
}

.orb.listening {
    background: var(--accent-green);
    box-shadow: 0 0 50px var(--accent-green);
    transform: scale(1.15);
}

.orb.speaking {
    background: var(--accent-yellow);
    box-shadow: 0 0 50px var(--accent-yellow);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.status-box { margin: 15px 0; font-weight: bold; font-size: 0.95rem; color: #FFF; }

.chat-log {
    flex: 1;
    width: 100%;
    background: #0D1326;
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sys-msg { color: #5C6B89; font-style: italic; }
.user-msg { color: var(--accent-blue); }
.nata-msg { color: var(--accent-green); }

.voice-controls { width: 100%; margin-top: 15px; }

/* Panel Derecho */
.data-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: var(--bg-dark);
}

.tabs-header { display: flex; gap: 10px; border-bottom: 1px solid #1E294B; padding-bottom: 10px; }
.tab-btn {
    background: transparent;
    border: none;
    color: #8E9AAB;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover { background: var(--panel-bg); color: #FFF; }

.tab-content { display: none; flex: 1; margin-top: 15px; flex-direction: column; }
.tab-content.active { display: flex; }

.toolbar { display: flex; justify-content: space-between; margin-bottom: 15px; }
.toolbar input {
    width: 320px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #1E294B;
    background: var(--panel-bg);
    color: #FFF;
}

/* Tablas */
.table-responsive { flex: 1; overflow-y: auto; border: 1px solid #1E294B; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid #1E294B; }
th { background: var(--panel-bg); color: var(--accent-blue); position: sticky; top: 0; }
tr:hover { background: rgba(79, 140, 255, 0.05); }

/* Botones y Cards */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}
.btn-primary { background: var(--accent-blue); color: #FFF; width: 100%; }
.btn-excel { background: #217346; color: #FFF; }

.summary-cards { display: flex; gap: 20px; margin-top: 20px; }
.card {
    flex: 1;
    background: var(--panel-bg);
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid var(--accent-blue);
}
.card-cxc { border-left-color: var(--accent-green); }
.card-cxp { border-left-color: var(--accent-red); }
.card h3 { font-size: 1rem; color: #8E9AAB; }
.card p { font-size: 1.8rem; font-weight: bold; margin-top: 10px; }

.notes-container textarea {
    width: 100%;
    height: 350px;
    background: var(--panel-bg);
    border: 1px solid #1E294B;
    border-radius: 8px;
    color: #FFF;
    padding: 15px;
    font-size: 1rem;
    margin: 15px 0;
}