/* JARVIS Dashboard - Tema Escuro Estilo Iron Man */

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

:root {
    --bg-primary: #08080f;
    --bg-secondary: #0e0e1a;
    --bg-tertiary: #1a1a2e;
    --color-primary: #4a9eff;
    --color-success: #00ff88;
    --color-warning: #ffa500;
    --color-danger: #ff1744;
    --color-pink: #ff69b4;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #2a2a4a;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.1);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, var(--color-primary), var(--color-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-center {
    flex: 1;
    margin: 0 2rem;
}

.search-input {
    width: 300px;
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.navbar-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--color-primary), var(--color-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* MAIN CONTAINER */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin-top: 70px;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 13px;
}

.menu-item:hover:not(.disabled) {
    background-color: var(--bg-tertiary);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.menu-item.active {
    background-color: var(--bg-tertiary);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-item .icon {
    font-size: 16px;
}

.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* CONTENT */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* METRICS SECTION */
.metrics-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.2);
    transform: translateY(-4px);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.metric-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 24px;
    opacity: 0.5;
}

/* MIDDLE SECTION */
.middle-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

/* CHAT BOX */
.chat-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-box h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 13px;
    max-width: 90%;
}

.bot-message {
    background-color: var(--bg-tertiary);
    border-left: 3px solid var(--color-primary);
    align-self: flex-start;
}

.user-message {
    background-color: rgba(74, 158, 255, 0.2);
    border-left: 3px solid var(--color-success);
    align-self: flex-end;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ══════════════════════════════════════════════════
   CHAT MUSIC BAR — mini-player estilo Spotify/JARVIS
   ══════════════════════════════════════════════════ */
.chat-music-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #0c0c1e 0%, #1a1040 50%, #0c0c1e 100%);
    border: 1px solid #4a3080;
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(120, 60, 240, 0.2), inset 0 1px 0 rgba(255,255,255,0.04);
    animation: cmb-slide-in 0.3s ease;
    flex-shrink: 0;
    min-height: 52px;
    position: relative;
    overflow: hidden;
}
.chat-music-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(140,80,255,0.06), transparent);
    animation: cmb-shimmer 3s infinite linear;
    pointer-events: none;
}
@keyframes cmb-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cmb-shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* EQ animado (3 barras pulsando) */
.cmb-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 22px;
    flex-shrink: 0;
}
.cmb-eq-bar {
    width: 3px;
    background: linear-gradient(to top, #6a30d0, #c078ff);
    border-radius: 2px;
    animation: cmb-eq-bounce infinite ease-in-out;
}
.cmb-eq-bar:nth-child(1) { height: 55%; animation-duration: 0.55s; animation-delay: 0.00s; }
.cmb-eq-bar:nth-child(2) { height: 100%; animation-duration: 0.48s; animation-delay: 0.12s; }
.cmb-eq-bar:nth-child(3) { height: 35%; animation-duration: 0.65s; animation-delay: 0.06s; }
.cmb-eq-bar:nth-child(4) { height: 75%; animation-duration: 0.52s; animation-delay: 0.18s; }
@keyframes cmb-eq-bounce {
    0%, 100% { transform: scaleY(0.35); }
    50%       { transform: scaleY(1);    }
}
.chat-music-bar.paused .cmb-eq-bar {
    animation-play-state: paused;
    opacity: 0.4;
}

/* Thumbnail */
.cmb-thumb {
    width: 42px;
    height: 32px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #4a3080;
}
.cmb-thumb[src=""] { display: none; }

/* Título + canal */
.cmb-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.cmb-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #d4a8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.cmb-channel {
    font-size: 0.70rem;
    color: #6a82a8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* Controles */
.cmb-controls {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.cmb-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid #3a2a60;
    border-radius: 7px;
    color: #b090e8;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cmb-btn:hover {
    background: rgba(120,60,240,0.25);
    border-color: #7840f0;
    transform: scale(1.1);
}
.cmb-btn:active { transform: scale(0.95); }
.cmb-btn.stop {
    color: #ff7070;
    border-color: #5a2020;
}
.cmb-btn.stop:hover {
    background: rgba(200,40,40,0.2);
    border-color: #ff5050;
}

.chat-send {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, var(--color-primary), var(--color-pink));
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

/* ══════════════════════════════════════════════
   JARVIS VISUAL — Iron Man Reactor + Partículas
══════════════════════════════════════════════ */
.jarvis-visual {
    background: radial-gradient(ellipse at center, #060618 0%, #020208 100%);
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    position: relative;
}

.sphere-container {
    width: 190px;
    height: 190px;
    position: relative;
    margin-bottom: 1.2rem;
}

.sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(8, 22, 65, 0.95) 0%,
        rgba(4, 10, 38, 0.98) 55%,
        rgba(2, 5, 20, 1) 100%
    );
    border: 1px solid rgba(74, 158, 255, 0.22);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    box-shadow:
        0 0 40px rgba(74, 158, 255, 0.22),
        0 0 80px rgba(74, 158, 255, 0.07),
        inset 0 0 40px rgba(74, 158, 255, 0.04);
}

/* ── Anéis de energia pulsantes ── */
.energy-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    pointer-events: none;
    animation: energy-expand 3.6s ease-out infinite;
}
.e-ring-1 {
    width: 72px; height: 72px;
    border: 1.5px solid rgba(74, 158, 255, 0.75);
    animation-delay: 0s;
}
.e-ring-2 {
    width: 118px; height: 118px;
    border: 1px solid rgba(140, 80, 255, 0.45);
    animation-delay: 1.2s;
}
.e-ring-3 {
    width: 165px; height: 165px;
    border: 1px solid rgba(74, 158, 255, 0.18);
    animation-delay: 2.4s;
}
@keyframes energy-expand {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.7); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

/* ── Trilhas orbitais decorativas ── */
.orbit-track {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(74, 158, 255, 0.1);
    top: 50%;
    left: 50%;
    pointer-events: none;
}
.o-track-1 {
    width: 126px; height: 126px;
    transform: translate(-50%, -50%) rotateX(70deg);
}
.o-track-2 {
    width: 92px; height: 92px;
    transform: translate(-50%, -50%) rotateX(70deg) rotateZ(58deg);
}

/* ── Partículas Quânticas ── */
.q-particle {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    z-index: 5;
}

/* Órbita externa (raio 58px) — azul */
.qp-1 {
    width: 8px; height: 8px; margin: -4px 0 0 -4px;
    background: #4a9eff;
    box-shadow: 0 0 9px #4a9eff, 0 0 18px rgba(74,158,255,0.5);
    animation: orbit-outer 4.4s linear infinite;
    animation-delay: 0s;
}
.qp-2 {
    width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
    background: #90caff;
    box-shadow: 0 0 6px #90caff;
    animation: orbit-outer 4.4s linear infinite;
    animation-delay: -2.2s;
}

/* Órbita média (raio 40px) — roxo */
.qp-3 {
    width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
    background: #c084fc;
    box-shadow: 0 0 9px #c084fc, 0 0 18px rgba(192,132,252,0.5);
    animation: orbit-mid 3.1s linear infinite;
    animation-delay: 0s;
}
.qp-4 {
    width: 4px; height: 4px; margin: -2px 0 0 -2px;
    background: #d8b0ff;
    box-shadow: 0 0 6px #d8b0ff;
    animation: orbit-mid 3.1s linear infinite;
    animation-delay: -1.55s;
}

/* Órbita interna (raio 22px) — branco quântico */
.qp-5 {
    width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    background: #ffffff;
    box-shadow: 0 0 12px #ffffff, 0 0 24px #4a9eff, 0 0 40px rgba(74,158,255,0.4);
    animation: orbit-inner 2s linear infinite;
    animation-delay: 0s;
}
.qp-6 {
    width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
    background: #ddf0ff;
    box-shadow: 0 0 8px #ddf0ff;
    animation: orbit-inner 2s linear infinite;
    animation-delay: -1s;
}

@keyframes orbit-outer {
    from { transform: rotate(0deg)   translateX(58px); }
    to   { transform: rotate(360deg) translateX(58px); }
}
@keyframes orbit-mid {
    from { transform: rotate(0deg)   translateX(40px); }
    to   { transform: rotate(360deg) translateX(40px); }
}
@keyframes orbit-inner {
    from { transform: rotate(0deg)   translateX(22px); }
    to   { transform: rotate(360deg) translateX(22px); }
}

/* ── Núcleo de Plasma ── */
.plasma-core {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle,
        #ffffff 0%,
        #b0d8ff 22%,
        #4a9eff 52%,
        #0028cc 78%,
        transparent 100%
    );
    box-shadow:
        0 0 14px #ffffff,
        0 0 28px #4a9eff,
        0 0 55px rgba(74, 158, 255, 0.65),
        0 0 90px rgba(74, 158, 255, 0.2);
    animation: plasma-pulse 2.2s ease-in-out infinite;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plasma-inner {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff, 0 0 18px #ffffff;
    animation: core-flicker 1.8s ease-in-out infinite;
}

@keyframes plasma-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 14px #ffffff, 0 0 28px #4a9eff,
                    0 0 55px rgba(74,158,255,0.65), 0 0 90px rgba(74,158,255,0.2);
    }
    50% {
        transform: scale(1.18);
        box-shadow: 0 0 22px #ffffff, 0 0 45px #4a9eff,
                    0 0 85px rgba(74,158,255,0.85), 0 0 120px rgba(74,158,255,0.3);
    }
}
@keyframes core-flicker {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.78; transform: scale(0.88); }
}

/* ── Estado PROCESSANDO: laranja ── */
.sphere.state-processing .q-particle { filter: hue-rotate(40deg); }
.sphere.state-processing .plasma-core {
    background: radial-gradient(circle, #fff 0%, #ffd88a 22%, #ffa500 52%, #cc5500 78%, transparent 100%);
    box-shadow: 0 0 14px #ffffff, 0 0 28px #ffa500, 0 0 55px rgba(255,165,0,0.65);
}
.sphere.state-processing .energy-ring { border-color: rgba(255,165,0,0.6) !important; }

/* ── Estado EXECUTANDO: ciano ── */
.sphere.state-running .q-particle { filter: hue-rotate(-30deg) saturate(1.5); }
.sphere.state-running .plasma-core {
    background: radial-gradient(circle, #ffffff 0%, #80ffee 22%, #00e5ff 52%, #0077aa 78%, transparent 100%);
    box-shadow: 0 0 14px #ffffff, 0 0 28px #00e5ff, 0 0 55px rgba(0,229,255,0.65);
}
.sphere.state-running .energy-ring { border-color: rgba(0,229,255,0.6) !important; }

/* ── Status text ── */
.status-text {
    font-size: 11px;
    color: var(--color-success);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px currentColor;
}

/* ACTIVITY BOX */
.activity-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.activity-box h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
}

.activity-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* BOTTOM SECTION */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.chart-container h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container canvas {
    max-height: 250px;
}

/* AGENTS STATUS */
.agents-status {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.agents-status h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
}

.agent-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.agent-status-dot.green {
    background-color: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
}

.agent-status-dot.yellow {
    background-color: var(--color-warning);
    box-shadow: 0 0 10px var(--color-warning);
}

.agent-status-dot.gray {
    background-color: var(--text-secondary);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.agent-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.agent-status {
    font-size: 11px;
    color: var(--color-success);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .middle-section,
    .bottom-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-center {
        margin: 0;
    }

    .search-input {
        width: 100%;
    }

    .sidebar {
        width: 80px;
    }

    .menu-item span:not(.icon) {
        display: none;
    }

    .metrics-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .content {
        padding: 1rem;
    }
}

/* ══════════════════════════════════════════════
   SISTEMA DE ABAS
══════════════════════════════════════════════ */
.tab-content {
    animation: fadeTabIn 0.2s ease;
}

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

.tab-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.4rem;
    color: #e0e0e0;
}

.tab-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #666680;
}

/* Placeholder */
.placeholder-card {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    color: #666680;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-card h3 {
    margin: 0 0 0.75rem 0;
    color: #a0a0c0;
}

.placeholder-card p {
    margin: 0;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════
   ABA ARQUIVOS
══════════════════════════════════════════════ */
.files-section {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.files-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.files-section-header h3 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    color: #c0c0e0;
}

.files-count {
    font-size: 0.75rem;
    color: #666680;
}

.btn-clear {
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-clear:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

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

.btn-clear-all {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: #fff;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 240px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #1a1a3a;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #c0c0e0;
}

.file-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #4a9eff;
}

.file-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e0e0ff;
}

.file-size {
    color: #4a9eff;
    flex-shrink: 0;
    min-width: 55px;
    text-align: right;
}

.file-date {
    color: #666680;
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}

.btn-open {
    background: #4a9eff;
    border: none;
    color: #000;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}

.btn-open:hover {
    background: #6db3ff;
    transform: translateY(-1px);
}

.btn-open:active {
    transform: translateY(0);
}

.files-empty {
    text-align: center;
    color: #444466;
    padding: 1.5rem;
    font-size: 0.85rem;
}

.files-clear-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.files-total {
    font-size: 0.82rem;
    color: #666680;
}

.clear-toast {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    animation: fadeTabIn 0.3s ease;
}

/* ══════════════════════════════════════════════
   ABA LOGS
══════════════════════════════════════════════ */
.btn-refresh {
    background: #1e1e4a;
    border: 1px solid #4a9eff;
    color: #4a9eff;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    align-self: center;
}

.btn-refresh:hover {
    background: #2a2a5a;
}

.logs-container {
    background: #0d0d1f;
    border: 1px solid #1e1e3a;
    border-radius: 8px;
    padding: 0.75rem;
    max-height: 520px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.log-line {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    color: #9090b0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-info    { color: #4a9eff; }
.log-warning { color: #ffa500; }
.log-error   { color: #ff4444; background: rgba(255,68,68,0.08); }

.logs-empty {
    text-align: center;
    color: #444466;
    padding: 2rem;
    font-size: 0.85rem;
}

/* ══════════════════════════════════════════════
   UTILITÁRIOS DE ABA
══════════════════════════════════════════════ */
.section-title {
    font-size: 0.9rem;
    color: #8080c0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    background: #1e1e4a;
    border: 1px solid #4a4a7a;
    color: #c0c0e0;
    border-radius: 5px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-sm:hover { background: #2a2a5a; }

.btn-sm.btn-danger {
    border-color: #c0392b;
    color: #e74c3c;
}

.btn-sm.btn-danger:hover {
    background: rgba(231,76,60,0.15);
}

/* ══════════════════════════════════════════════
   ABA: VOZ
══════════════════════════════════════════════ */
.voice-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
}

.voice-sphere {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(74,158,255,0.8), rgba(74,158,255,0.2));
    border: 2px solid #4a9eff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 0 30px rgba(74,158,255,0.4), inset 0 0 20px rgba(74,158,255,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulse 3s ease-in-out infinite;
}

.voice-sphere:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(74,158,255,0.6);
}

.voice-sphere.listening {
    border-color: #ff4444;
    box-shadow: 0 0 40px rgba(255,68,68,0.6), inset 0 0 20px rgba(255,68,68,0.15);
    animation: pulse-listen 0.8s ease-in-out infinite;
}

@keyframes pulse-listen {
    0%,100% { transform: scale(1);    box-shadow: 0 0 40px rgba(255,68,68,0.6); }
    50%      { transform: scale(1.08); box-shadow: 0 0 60px rgba(255,68,68,0.9); }
}

.voice-sphere-inner { font-size: 2.5rem; z-index: 2; }

.voice-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(74,158,255,0.3);
    animation: ring-expand 2.5s ease-out infinite;
    pointer-events: none;
}

.ring1 { width: 160px; height: 160px; animation-delay: 0s; }
.ring2 { width: 190px; height: 190px; animation-delay: 0.7s; }
.ring3 { width: 220px; height: 220px; animation-delay: 1.4s; }

@keyframes ring-expand {
    0%   { opacity: 0.6; transform: scale(0.85); }
    100% { opacity: 0;   transform: scale(1.2);  }
}

.voice-sphere.listening .voice-ring {
    border-color: rgba(255,68,68,0.4);
}

/* Estado "processando" — Whisper analisando áudio */
.voice-sphere.processing {
    border-color: #f5a623;
    box-shadow: 0 0 40px rgba(245,166,35,0.5), inset 0 0 20px rgba(245,166,35,0.1);
    animation: pulse-processing 1.5s ease-in-out infinite;
}
@keyframes pulse-processing {
    0%,100% { box-shadow: 0 0 30px rgba(245,166,35,0.4); }
    50%      { box-shadow: 0 0 60px rgba(245,166,35,0.8); }
}
.voice-sphere.processing .voice-ring {
    border-color: rgba(245,166,35,0.35);
}

.voice-hint {
    font-size: 0.85rem;
    color: #666680;
    margin: 0;
}

.voice-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,68,68,0.15);
    border: 1px solid #ff4444;
    color: #ff8888;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.voice-dot {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse-dot 0.7s ease-in-out infinite;
}

.voice-transcript-box {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.voice-transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #1a1a3a;
    border-bottom: 1px solid #2a2a4a;
    font-size: 0.85rem;
    color: #8080c0;
}

.voice-transcript {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.voice-empty {
    text-align: center;
    color: #444466;
    padding: 1.5rem;
    font-size: 0.85rem;
}

.voice-line {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.4rem 0.5rem;
    border-radius: 5px;
    background: #1a1a3a;
    font-size: 0.83rem;
}

.voice-line.voice-reply {
    background: rgba(74,158,255,0.08);
    border-left: 2px solid #4a9eff;
}

.voice-time {
    color: #444466;
    flex-shrink: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

.voice-text { color: #c0c0e0; }

.voice-response-box {
    background: #0d1a2a;
    border: 1px solid #1e3a5a;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.voice-response-header {
    background: #1a2a3a;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    color: #4a9eff;
    border-bottom: 1px solid #1e3a5a;
    font-weight: 600;
}

.voice-response-text {
    padding: 1rem;
    font-size: 0.9rem;
    color: #c0d8f0;
    line-height: 1.7;
    white-space: pre-wrap;
}

.voice-info {
    text-align: center;
    font-size: 0.8rem;
    color: #444466;
    padding: 0.5rem;
}

.voice-info em { color: #6a7ab0; font-style: normal; }

/* ── Barra de diagnóstico ── */
.voice-diag-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid #1e1e38;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
}
#voice-diag-text {
    flex: 1;
    color: #6a7ab0;
    font-size: 0.8rem;
}

/* ── Engine badge ── */
.voice-engine-badge {
    background: rgba(74,158,255,0.12);
    border: 1px solid rgba(74,158,255,0.3);
    color: #4a9eff;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
    align-self: center;
}

/* ── Speaking indicator ── */
.voice-speaking-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(74,158,255,0.08);
    border: 1px solid rgba(74,158,255,0.25);
    color: #4a9eff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    margin: 0 auto 0.6rem;
    width: fit-content;
    animation: pulse-blue 1.2s ease-in-out infinite;
}
@keyframes pulse-blue {
    0%,100% { box-shadow: 0 0 6px rgba(74,158,255,0.3); }
    50%      { box-shadow: 0 0 16px rgba(74,158,255,0.6); }
}
.voice-stop-btn {
    background: rgba(255,68,68,0.15);
    border: 1px solid #ff4444;
    color: #ff8888;
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.voice-stop-btn:hover { background: rgba(255,68,68,0.3); }

/* ── Botão Sempre Ouvindo ── */
.voice-always-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(74,158,255,0.15), rgba(100,200,255,0.08));
    border: 1.5px solid rgba(74,158,255,0.45);
    border-radius: 12px;
    color: #7ecfff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.voice-always-btn:hover {
    background: linear-gradient(135deg, rgba(74,158,255,0.28), rgba(100,200,255,0.15));
    border-color: rgba(74,158,255,0.7);
    color: #b0e0ff;
}

/* ── Controls bar ── */
.voice-controls-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}
.voice-ctrl-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid #2a2a4a;
    color: #c0c0e0;
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.voice-ctrl-btn:hover { background: rgba(74,158,255,0.1); border-color: #4a9eff; color: #fff; }
.voice-ctrl-btn.voice-ctrl-btn-on  { background: rgba(74,158,255,0.2); border-color: #4a9eff; color: #4a9eff; }
.voice-ctrl-btn.voice-ctrl-btn-off { background: rgba(255,255,255,0.02); border-color: #1a1a2e; color: #44445a; }
.voice-mode-switch {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
}
.voice-mode-btn {
    background: none;
    border: none;
    color: #44445a;
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.voice-mode-btn.active { background: rgba(74,158,255,0.2); color: #4a9eff; }
.voice-mode-btn:hover:not(.active) { color: #c0c0e0; }

/* ── Main grid ── */
.voice-main-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 900px) {
    .voice-main-grid { grid-template-columns: 1fr; }
}
.voice-right-col { display: flex; flex-direction: column; gap: 0.8rem; }

/* ── Voice transcript ── */
.voice-avatar {
    font-size: 1rem;
    margin-right: 0.4rem;
    color: #4a9eff;
}

/* ── Settings box ── */
.voice-settings-box,
.voice-commands-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid #1e1e38;
    border-radius: 10px;
    padding: 0.8rem 1rem;
}
.voice-settings-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6a7ab0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}
.voice-setting-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #8888aa;
}
.voice-setting-row label { min-width: 70px; color: #7777aa; }
.voice-setting-row input[type=range] {
    flex: 1;
    accent-color: #4a9eff;
    height: 4px;
}
.voice-setting-row span { min-width: 45px; color: #4a9eff; font-size: 0.75rem; }

/* ── Commands grid ── */
.voice-cmd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.voice-cmd-chip {
    background: rgba(74,158,255,0.06);
    border: 1px solid rgba(74,158,255,0.15);
    color: #8888bb;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.voice-cmd-chip:hover { background: rgba(74,158,255,0.15); color: #c0c0e0; }

/* ══════════════════════════════════════════════
   ABA: AGENTES IA
══════════════════════════════════════════════ */
.agent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.agent-card {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.agent-card:hover {
    border-color: #4a9eff;
    box-shadow: 0 0 18px rgba(74,158,255,0.15);
}

.agent-card-skeleton {
    color: #444466;
    font-size: 0.85rem;
    padding: 1rem;
    grid-column: 1/-1;
}

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.agent-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.agent-card-dot.green { background: #00ff88; box-shadow: 0 0 6px #00ff88; }
.agent-card-dot.yellow{ background: #ffa500; box-shadow: 0 0 6px #ffa500; }
.agent-card-dot.gray  { background: #555577; }

.agent-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c0c0e0;
}

.agent-card-desc {
    font-size: 0.78rem;
    color: #666680;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.agent-card-status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.agent-card-status.green  { background: rgba(0,255,136,0.12); color: #00ff88; }
.agent-card-status.yellow { background: rgba(255,165,0,0.12);  color: #ffa500; }
.agent-card-status.gray   { background: rgba(85,85,119,0.2);   color: #888899; }

.skills-section { margin-bottom: 1.5rem; }

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-chip {
    background: #1a1a3a;
    border: 1px solid #3a3a6a;
    color: #a0a0d0;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: default;
    transition: border-color 0.2s, color 0.2s;
}

.skill-chip:hover {
    border-color: #4a9eff;
    color: #4a9eff;
}
.skill-chip.active-chip {
    background: rgba(0, 255, 136, 0.07);
    border-color: rgba(0, 255, 136, 0.35);
    color: #00ff88;
}
.skill-chip.active-chip:hover {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
}

.task-runner {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.25rem;
}

.task-runner-form {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .task-runner-form { grid-template-columns: 1fr; }
}

.task-select,
.task-input {
    background: #0e0e1a;
    border: 1px solid #2a2a4a;
    color: #c0c0e0;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.task-select:focus,
.task-input:focus {
    outline: none;
    border-color: #4a9eff;
}

.task-input { flex: 1; }

.btn-run {
    background: linear-gradient(135deg, #4a9eff, #ff69b4);
    border: none;
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-run:hover { opacity: 0.9; transform: translateY(-1px); }

.task-result {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-loading { background: #1a1a3a; color: #8080c0; border: 1px dashed #4a4a7a; }
.task-done    { background: rgba(0,255,136,0.06); color: #c0e0d0; border: 1px solid rgba(0,255,136,0.2); }
.task-error   { background: rgba(255,68,68,0.07); color: #e09090; border: 1px solid rgba(255,68,68,0.2); }

/* ══════════════════════════════════════════════
   ABA: HISTÓRICO
══════════════════════════════════════════════ */
.hist-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hist-search-input {
    flex: 1;
    min-width: 200px;
    background: #12122a;
    border: 1px solid #2a2a4a;
    color: #c0c0e0;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.hist-search-input:focus {
    outline: none;
    border-color: #4a9eff;
}

.hist-count {
    font-size: 0.78rem;
    color: #666680;
    white-space: nowrap;
}

.hist-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #2a2a4a;
}

.hist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.hist-table thead tr {
    background: #1a1a3a;
}

.hist-table th {
    padding: 0.65rem 0.9rem;
    text-align: left;
    color: #8080c0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.72rem;
    white-space: nowrap;
    border-bottom: 1px solid #2a2a4a;
}

.hist-table td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid #1a1a2a;
    color: #b0b0d0;
    vertical-align: top;
}

.hist-table tbody tr:hover td {
    background: #1a1a3a;
}

.hist-num  { color: #444466; text-align: center; width: 48px; }
.hist-time { color: #666680; white-space: nowrap; font-family: 'Courier New', monospace; font-size: 0.78rem; }
.hist-type { white-space: nowrap; }
.hist-cmd  { color: #c0c0e0; max-width: 300px; }
.hist-res  { color: #8898b0; max-width: 300px; }

.hist-empty {
    text-align: center;
    color: #444466;
    padding: 2rem;
}

/* ══════════════════════════════════════════════
   ABA: RELATÓRIOS
══════════════════════════════════════════════ */
.rel-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rel-card {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.rel-card:hover { border-color: #4a4a8a; }

.rel-icon  { font-size: 1.8rem; margin-bottom: 0.5rem; }
.rel-value { font-size: 1.6rem; font-weight: 700; color: #4a9eff; margin-bottom: 0.25rem; }
.rel-label { font-size: 0.75rem; color: #666680; text-transform: uppercase; letter-spacing: 0.4px; }

.rel-roi-box {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.rel-roi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.rel-roi-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #c0c0e0;
}

.rel-roi-badge {
    background: rgba(0,255,136,0.12);
    color: #00ff88;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.rel-roi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.rel-roi-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #1a1a3a;
    border-radius: 7px;
}

.rel-roi-label { font-size: 0.78rem; color: #666680; }
.rel-roi-value { font-size: 1.1rem; font-weight: 700; color: #c0c0e0; }
.rel-roi-value.green { color: #00ff88; }

.rel-components { margin-top: 0.5rem; }

.rel-component-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    background: #12122a;
    border: 1px solid #1a1a3a;
}

.rel-comp-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rel-comp-dot.green { background: #00ff88; box-shadow: 0 0 5px #00ff88; }
.rel-comp-dot.gray  { background: #555577; }

.rel-comp-name { flex: 1; font-size: 0.85rem; color: #c0c0e0; }

.rel-comp-status { font-size: 0.75rem; font-weight: 600; }
.rel-comp-status.green { color: #00ff88; }
.rel-comp-status.gray  { color: #555577; }

/* ══════════════════════════════════════════════
   ABA: CONFIGURAÇÕES
══════════════════════════════════════════════ */
.config-section {
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.config-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8080c0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.config-input-wrap {
    display: flex;
    gap: 0;
}

.config-input-wrap .config-input {
    border-radius: 6px 0 0 6px;
    flex: 1;
}

.config-input {
    background: #0e0e1a;
    border: 1px solid #2a2a4a;
    color: #c0c0e0;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 100%;
    transition: border-color 0.2s;
}

.config-input:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74,158,255,0.12);
}

.config-select { cursor: pointer; }

.btn-eye {
    background: #1a1a3a;
    border: 1px solid #2a2a4a;
    border-left: none;
    color: #666680;
    padding: 0 0.75rem;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-eye:hover { background: #2a2a5a; color: #c0c0e0; }

.config-hint {
    font-size: 0.72rem;
    color: #444466;
    line-height: 1.4;
}

.config-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0 1rem 0;
    flex-wrap: wrap;
}

.btn-save-config {
    background: linear-gradient(135deg, #4a9eff, #7b5ea7);
    border: none;
    color: #fff;
    padding: 0.7rem 1.75rem;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-save-config:hover { opacity: 0.9; transform: translateY(-1px); }

.config-saved-msg {
    font-size: 0.85rem;
    color: #00ff88;
    background: rgba(0,255,136,0.08);
    border: 1px solid rgba(0,255,136,0.25);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    animation: fadeTabIn 0.3s ease;
}

/* ══════════════════════════════════════════════════════ */
/* ABA AUTOMAÇÕES                                         */
/* ══════════════════════════════════════════════════════ */
.auto-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.auto-summary-card {
    background: #0e0e1a;
    border: 1px solid #1e1e35;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.auto-summary-num {
    font-size: 2rem;
    font-weight: 700;
    color: #4a9eff;
    font-family: Consolas, monospace;
}
.auto-summary-label {
    font-size: 0.78rem;
    color: #606080;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.auto-section {
    margin-bottom: 28px;
}
.auto-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0f0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e1e35;
}
.auto-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auto-job-card {
    background: #0e0e1a;
    border: 1px solid #1e1e35;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.2s;
}
.auto-job-card:hover { border-color: #4a9eff44; }
.auto-job-icon {
    font-size: 1.4rem;
    width: 32px;
    text-align: center;
}
.auto-job-info { flex: 1; }
.auto-job-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #e0e0f0;
}
.auto-job-meta {
    font-size: 0.78rem;
    color: #606080;
    margin-top: 3px;
}
.auto-job-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-ativo {
    background: rgba(0,255,136,0.12);
    color: #00ff88;
    border: 1px solid rgba(0,255,136,0.3);
}
.badge-pausado {
    background: rgba(255,200,0,0.12);
    color: #ffc800;
    border: 1px solid rgba(255,200,0,0.3);
}
.badge-inativo {
    background: rgba(255,80,80,0.12);
    color: #ff5050;
    border: 1px solid rgba(255,80,80,0.3);
}
.auto-job-actions {
    display: flex;
    gap: 6px;
}
.auto-btn {
    padding: 4px 12px;
    border-radius: 5px;
    border: 1px solid #1e1e35;
    background: transparent;
    color: #606080;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.auto-btn:hover { border-color: #4a9eff; color: #4a9eff; }
.auto-btn-danger:hover,
.auto-btn-del:hover { border-color: #ff5050; color: #ff5050; }
.auto-loading {
    color: #606080;
    font-size: 0.88rem;
    padding: 16px;
    text-align: center;
}
.auto-empty {
    color: #606080;
    font-size: 0.88rem;
    padding: 24px;
    text-align: center;
    background: #0e0e1a;
    border: 1px dashed #1e1e35;
    border-radius: 8px;
}
.auto-form-card {
    background: #0e0e1a;
    border: 1px solid #4a9eff44;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}
.auto-form-card h3 {
    font-size: 0.95rem;
    color: #4a9eff;
    margin-bottom: 16px;
}
.auto-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.auto-form-group label {
    display: block;
    font-size: 0.78rem;
    color: #606080;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auto-form-group input,
.auto-form-group select {
    width: 100%;
    background: #14141f;
    border: 1px solid #1e1e35;
    border-radius: 6px;
    padding: 8px 12px;
    color: #e0e0f0;
    font-size: 0.88rem;
    box-sizing: border-box;
}
.auto-form-group input:focus,
.auto-form-group select:focus {
    outline: none;
    border-color: #4a9eff;
}
.auto-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.btn-secondary {
    padding: 8px 18px;
    border-radius: 6px;
    border: 1px solid #1e1e35;
    background: transparent;
    color: #606080;
    font-size: 0.85rem;
    cursor: pointer;
}
.btn-secondary:hover { border-color: #606080; color: #e0e0f0; }

/* ══════════════════════════════════════════════
   ABA IMAGENS IA
══════════════════════════════════════════════ */
.img-gen-card {
    background: #0e0e1a;
    border: 1px solid #4a9eff44;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
}
.img-result-card {
    background: #0a1a0a;
    border: 1px solid #00ff8844;
    border-radius: 12px;
    padding: 20px;
}
.img-info-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #b0b0d0;
}
.img-info-label {
    color: #606080;
    min-width: 70px;
    flex-shrink: 0;
}
.img-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.img-gallery-item {
    background: #0e0e1a;
    border: 1px solid #1e1e35;
    border-radius: 8px;
    overflow: hidden;
    cursor: default;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}
.img-gallery-item:hover {
    border-color: #4a9eff;
    transform: scale(1.02);
}
/* Botões de ação: aparecem ao fazer hover no card */
.img-gallery-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}
.img-gallery-item:hover .img-gallery-actions {
    opacity: 1;
}
.img-gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.img-gallery-item-name {
    padding: 6px 8px;
    font-size: 0.7rem;
    color: #606080;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.img-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #4a9eff44;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   ABA AVATAR TIKTOK
══════════════════════════════════════════════ */

/* Barra de passos do pipeline */
.avatar-steps {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    background: #0a0a18;
    border: 1px solid #1e1e35;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.avatar-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #606080;
    min-width: 52px;
    transition: color 0.3s;
}
.avatar-step .step-icon {
    font-size: 1.3rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #12122a;
    border: 1px solid #1e1e35;
    transition: all 0.3s;
}
.avatar-step.active .step-icon {
    background: rgba(74,158,255,0.15);
    border-color: #4a9eff;
    box-shadow: 0 0 10px rgba(74,158,255,0.3);
    animation: pulse-blue 1.5s ease-in-out infinite;
}
.avatar-step.done .step-icon {
    background: rgba(0,255,136,0.12);
    border-color: #00ff88;
    color: #00ff88;
}
.avatar-step.done   { color: #00ff88; }
.avatar-step.active { color: #4a9eff; }
.avatar-step.error  { color: #ff4444; }
.avatar-step-arrow {
    color: #1e1e35;
    font-size: 1rem;
    margin: 0 2px;
    flex-shrink: 0;
}
@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 10px rgba(74,158,255,0.3); }
    50%       { box-shadow: 0 0 20px rgba(74,158,255,0.6); }
}

/* Cartões do avatar */
.avatar-card {
    background: #0e0e1a;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 18px;
}
.avatar-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e0e0f0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.avatar-card-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #1e1e35;
}

/* Preview de script */
.avatar-script-preview {
    background: #080816;
    border: 1px solid #1e1e35;
    border-left: 3px solid #4a9eff;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #c0d8f0;
    line-height: 1.7;
    min-height: 60px;
    margin-top: 12px;
    display: none;
}
.avatar-script-preview.visible { display: block; }

/* Área de avatar image preview */
.avatar-img-preview {
    width: 100%;
    max-width: 200px;
    border-radius: 10px;
    border: 2px solid #4a9eff44;
    display: block;
    margin: 12px auto 0;
}

/* Player de vídeo resultado */
.avatar-video-result {
    background: #050510;
    border: 1px solid #00ff8844;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: none;
    margin-top: 18px;
}
.avatar-video-result.visible { display: block; }
.avatar-video-result video {
    max-width: 340px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #00ff8833;
    margin-bottom: 12px;
}
.avatar-download-btn {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0,255,136,0.15);
    border: 1px solid #00ff88;
    color: #00ff88;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}
.avatar-download-btn:hover { background: rgba(0,255,136,0.25); }

/* Status de progresso */
.avatar-progress {
    background: #0a0a1a;
    border: 1px solid #1e1e35;
    border-radius: 8px;
    padding: 14px;
    font-size: 0.85rem;
    color: #b0b0d0;
    display: none;
    margin-top: 14px;
}
.avatar-progress.visible { display: block; }
.avatar-progress-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.avatar-progress-line:last-child { margin-bottom: 0; }
.avatar-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-wait   { background: #2a2a4a; }
.dot-active { background: #4a9eff; animation: pulse-dot 1s ease-in-out infinite; }
.dot-done   { background: #00ff88; }
.dot-error  { background: #ff4444; }
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.7; }
}

/* Galeria de vídeos avatar */
.avatar-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.avatar-gallery-item {
    background: #0e0e1a;
    border: 1px solid #1e1e35;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}
.avatar-gallery-item:hover {
    border-color: #4a9eff;
    transform: translateY(-2px);
}
.avatar-gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.avatar-gallery-item-info {
    padding: 8px 10px;
    font-size: 0.72rem;
    color: #606080;
}
.avatar-gallery-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

/* Botão de gerar do avatar */
.btn-avatar-generate {
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #7b2ff7, #ff4da6);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 14px;
}
.btn-avatar-generate:hover { opacity: 0.9; }
.btn-avatar-generate:active { transform: scale(0.98); }
.btn-avatar-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   ESFERA IRON MAN — Estados de Voz (Listening / Processing /
   Speaking / Wake-listening) — usados pela aba VOZ
   ══════════════════════════════════════════════════════════ */

/* Alias modernos: .sphere.listening / .processing / .speaking */
.sphere.listening .plasma-core,
.sphere.state-listening .plasma-core {
    background: radial-gradient(circle, #fff 0%, #ffd0d0 22%, #ff4444 52%, #aa0000 78%, transparent 100%);
    box-shadow: 0 0 16px #fff, 0 0 30px #ff4444, 0 0 55px rgba(255,68,68,0.7);
    animation: jvz-pulse-listen 0.7s ease-in-out infinite;
}
.sphere.listening .energy-ring,
.sphere.state-listening .energy-ring { border-color: rgba(255,68,68,0.6) !important; }
.sphere.listening .q-particle,
.sphere.state-listening .q-particle { filter: hue-rotate(-160deg) saturate(1.8); }

.sphere.processing .plasma-core,
.sphere.state-processing .plasma-core { animation: jvz-pulse-proc 1.1s ease-in-out infinite; }

.sphere.speaking .plasma-core,
.sphere.state-speaking .plasma-core {
    background: radial-gradient(circle, #fff 0%, #c0e0ff 22%, #4a9eff 52%, #1144aa 78%, transparent 100%);
    box-shadow: 0 0 18px #fff, 0 0 32px #4a9eff, 0 0 65px rgba(74,158,255,0.85);
    animation: jvz-pulse-speak 0.45s ease-in-out infinite;
}
.sphere.speaking .energy-ring,
.sphere.state-speaking .energy-ring { border-color: rgba(74,158,255,0.75) !important; }

/* Estado wake-listening: aguardando palavra "Jarvis" — verde calmo */
.sphere.wake-listening .plasma-core,
.sphere.state-wake-listening .plasma-core {
    background: radial-gradient(circle, #fff 0%, #c8ffd0 24%, #00cc88 56%, #006644 82%, transparent 100%);
    box-shadow: 0 0 12px #fff, 0 0 24px #00cc88, 0 0 48px rgba(0,204,136,0.55);
}
.sphere.wake-listening .energy-ring,
.sphere.state-wake-listening .energy-ring { border-color: rgba(0,204,136,0.5) !important; }
.sphere.wake-listening .q-particle,
.sphere.state-wake-listening .q-particle { filter: hue-rotate(-110deg) saturate(1.4); }

@keyframes jvz-pulse-listen {
    0%,100% { transform: scale(1);    box-shadow: 0 0 16px #fff, 0 0 30px #ff4444, 0 0 55px rgba(255,68,68,0.7); }
    50%      { transform: scale(1.22); box-shadow: 0 0 22px #fff, 0 0 50px #ff4444, 0 0 90px rgba(255,68,68,1); }
}
@keyframes jvz-pulse-proc {
    0%,100% { transform: scale(1);    opacity: 1;   }
    50%      { transform: scale(0.85); opacity: 0.7; }
}
@keyframes jvz-pulse-speak {
    0%,100% { transform: scale(1);    box-shadow: 0 0 18px #fff, 0 0 32px #4a9eff, 0 0 65px rgba(74,158,255,0.85); }
    50%      { transform: scale(1.30); box-shadow: 0 0 26px #fff, 0 0 55px #4a9eff, 0 0 100px rgba(74,158,255,1); }
}

/* Reator reage ao volume do mic (var --vol = 0-1) */
.sphere.volume-reactive .plasma-core {
    transform: scale(calc(1 + var(--vol, 0) * 0.45)) !important;
    transition: transform 60ms linear;
}

/* ══════════════════════════════════════════════════════════
   BARRA DE VOLUME — visualização do mic em tempo real
   ══════════════════════════════════════════════════════════ */
.voice-vol-meter {
    width: 200px;
    height: 8px;
    background: #1a1a30;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem auto 0;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
}
.voice-vol-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00cc88 0%, #ffd700 60%, #ff4444 100%);
    transition: width 60ms linear;
    box-shadow: 0 0 6px currentColor;
}

/* ══════════════════════════════════════════════════════════
   BADGE WAKE-WORD — "👂 Aguardando 'Jarvis'..."
   ══════════════════════════════════════════════════════════ */
.wake-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(0,204,136,0.18), rgba(0,150,100,0.12));
    border: 1px solid rgba(0,204,136,0.5);
    color: #88ffcc;
    padding: 0.4rem 1rem;
    border-radius: 22px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-top: 0.6rem;
    box-shadow: 0 0 16px rgba(0,204,136,0.25);
}
.wake-badge.active .wake-dot { background: #44ffaa; animation: wake-pulse 0.9s ease-in-out infinite; }
.wake-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #557777;
    box-shadow: 0 0 6px currentColor;
}
@keyframes wake-pulse {
    0%,100% { transform: scale(1);   opacity: 1;   }
    50%      { transform: scale(1.4); opacity: 0.6; }
}

/* Botão "Modo JARVIS" — gradiente Iron Man */
.btn-jarvis-mode {
    background: linear-gradient(135deg, #ff6a00, #ffa500, #ff3300);
    color: #fff;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255,140,0,0.55);
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 0.6rem;
}
.btn-jarvis-mode:hover  { transform: scale(1.04); box-shadow: 0 0 30px rgba(255,140,0,0.85); }
.btn-jarvis-mode.active { background: linear-gradient(135deg, #00cc88, #00aa66); box-shadow: 0 0 26px rgba(0,204,136,0.7); }

/* TTS engine badge (mostra ElevenLabs / Maria / Browser) */
.tts-engine-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(74,158,255,0.12);
    border: 1px solid rgba(74,158,255,0.35);
    color: #88c0ff;
    padding: 0.18rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 0.4rem;
}
.tts-engine-pill.eleven   { background: rgba(170,90,255,0.15); border-color: rgba(170,90,255,0.45); color: #d0a8ff; }
.tts-engine-pill.maria    { background: rgba(0,204,136,0.12);  border-color: rgba(0,204,136,0.35); color: #88ffcc; }
.tts-engine-pill.browser  { background: rgba(150,150,150,0.12); border-color: rgba(150,150,150,0.35); color: #aaa; }

/* ══════════════════════════════════════════════════════════════════
   HOME SCREEN — Redesign v2 compacto (2026-06-02)
   Objetivo: tudo visível sem scroll em telas ≥ 900px
   ══════════════════════════════════════════════════════════════════ */

/* ── Cancela o padding externo do .content ──────────────────────── */
#tab-visao-geral {
    margin: -2rem;           /* cancela padding: 2rem do .content pai */
    padding: 0;
    gap: 0;
    display: flex;
    flex-direction: column;
}

/* ── GREETING BAR ───────────────────────────────────────────────── */
.home-greeting-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1.4rem 0.45rem;
    background: linear-gradient(90deg, rgba(74,158,255,0.07) 0%, transparent 60%);
    border-bottom: 1px solid rgba(74,158,255,0.12);
    flex-shrink: 0;
}
.home-greeting-left { display: flex; flex-direction: column; gap: 0.05rem; }
.home-greeting-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e8e8ff;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
}
.home-greeting-wave { animation: waveHand 2.5s ease-in-out; display: inline-block; }
@keyframes waveHand {
    0%,100% { transform: rotate(0deg); }
    25%      { transform: rotate(20deg); }
    50%      { transform: rotate(-10deg); }
    75%      { transform: rotate(15deg); }
}
.home-date-text { font-size: 0.72rem; color: #6070a0; text-transform: capitalize; }
.home-greeting-right { display: flex; align-items: center; gap: 0.45rem; }
.home-status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #00ff88; box-shadow: 0 0 5px #00ff88;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{ opacity:1; } 50%{ opacity:.4; } }
.home-status-label { font-size: 0.68rem; color: #00ff88; letter-spacing: 1px; font-weight: 600; }

/* ── KPI ROW ────────────────────────────────────────────────────── */
.home-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 1.4rem;
    flex-shrink: 0;
}
.home-kpi-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: transform 0.2s;
    cursor: default;
}
.home-kpi-card:hover { transform: translateY(-1px); }
.hkc-icon-wrap { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.hkc-content   { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.hkc-value     { font-size: 1.35rem; font-weight: 700; color: #e0e8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hkc-value-sm  { font-size: 1rem; }
.hkc-label     { font-size: 0.67rem; color: var(--text-secondary); white-space: nowrap; }

/* KPI accent colors */
.hkc-blue  { border-color: rgba(74,158,255,0.35);  background: rgba(74,158,255,0.06); }
.hkc-green { border-color: rgba(0,255,136,0.35);   background: rgba(0,255,136,0.06); }
.hkc-orange{ border-color: rgba(255,165,0,0.4);    background: rgba(255,165,0,0.06); }
.hkc-purple{ border-color: rgba(160,90,255,0.35);  background: rgba(160,90,255,0.06); }
.hkc-danger{ border-color: rgba(255,50,50,0.5);    background: rgba(255,50,50,0.08); }
.hkc-blue  .hkc-value { color: #7ab8ff; }
.hkc-green .hkc-value { color: #66ffb8; }
.hkc-orange .hkc-value{ color: #ffc966; }
.hkc-purple .hkc-value{ color: #c096ff; }
.hkc-danger .hkc-value{ color: #ff6666; }

/* ── MAIN GRID — 4 colunas efetivas ─────────────────────────────── */
/* left(chat+proximos) | center(esfera) | sugestões | atividade    */
.home-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1.4rem 0.5rem;
    align-items: start;
    flex-shrink: 0;
}

/* Painel esquerdo: flex column */
.home-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Painel direito: grid 2 colunas (sugestões | atividade) */
.home-right {
    display: contents;   /* "desempacota" os filhos direto no grid pai */
}

/* Bloco genérico de painel */
.home-panel-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.home-panel-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid rgba(74,158,255,0.12);
}

/* Chat compacto */
.home-chat-msgs {
    max-height: 90px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.home-chat-msgs .message { margin: 0; }
.home-chat-msgs .message-content { font-size: 0.78rem; padding: 0.35rem 0.55rem; }
.home-chat-msgs .message-time    { font-size: 0.62rem; }

/* Próximos compromissos */
.home-proximos-list  { display: flex; flex-direction: column; gap: 0.3rem; }
.home-proximos-empty { font-size: 0.74rem; color: var(--text-secondary); text-align: center; padding: 0.3rem; }
.home-prox-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.3rem 0.5rem; border-radius: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent; transition: background 0.2s;
}
.home-prox-item:hover { background: rgba(74,158,255,0.07); }
.home-prox-hoje { border-color: rgba(74,158,255,0.25); background: rgba(74,158,255,0.06); }
.home-prox-time { font-size: 0.78rem; font-weight: 700; color: #7ab8ff; min-width: 34px; text-align: center; }
.home-prox-info { flex: 1; min-width: 0; }
.home-prox-nome { font-size: 0.76rem; color: #d0d8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-prox-data { font-size: 0.64rem; color: var(--text-secondary); }
.home-prox-status {
    font-size: 0.6rem; padding: 1px 5px; border-radius: 8px;
    background: rgba(0,255,136,0.15); color: #66ffb8; text-transform: capitalize;
}
.home-prox-status-cancelado  { background: rgba(255,50,50,0.15);  color: #ff8888; }
.home-prox-status-remarcado  { background: rgba(255,165,0,0.15);  color: #ffc066; }
.home-prox-status-confirmado { background: rgba(0,200,255,0.15);  color: #66dfff; }

/* ── CENTRO: Esfera ─────────────────────────────────────────────── */
.home-center-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.3rem 0 0.5rem;
    position: relative;
    /* Ocupa as 2 colunas centrais do grid 4-col */
    grid-column: 2 / 3;
}
.home-sphere-glow {
    position: absolute;
    width: 180px; height: 180px; border-radius: 50%;
    background: radial-gradient(circle, rgba(74,158,255,0.2) 0%, transparent 70%);
    animation: sphereGlow 3s ease-in-out infinite;
    pointer-events: none; z-index: 1;
}
@keyframes sphereGlow {
    0%,100% { transform: scale(1);    opacity: 0.7; }
    50%      { transform: scale(1.14); opacity: 1; }
}
.home-sphere-pulse {
    width: 250px; height: 250px; border-radius: 50%;
    border: 1px solid rgba(74,158,255,0.18);
    position: absolute;
    animation: spherePulse 3s ease-in-out infinite;
    pointer-events: none; z-index: 1;
}
@keyframes spherePulse {
    0%,100% { transform: scale(1);    opacity: 0.5; }
    50%      { transform: scale(1.06); opacity: 0.15; }
}
.home-sphere-hint {
    font-size: 0.63rem; color: rgba(74,158,255,0.45);
    text-align: center; letter-spacing: 0.5px;
}

/* ── SUGESTÕES + ATIVIDADE (colunas 3 e 4) ──────────────────────── */
.home-sugestoes-list { display: flex; flex-direction: column; gap: 0.3rem; }
.home-sug-item {
    font-size: 0.74rem; color: #a0b0d0;
    padding: 0.28rem 0.45rem;
    border-left: 2px solid rgba(74,158,255,0.3);
    background: rgba(74,158,255,0.04);
    border-radius: 0 4px 4px 0;
    line-height: 1.3;
}
.home-atividade-list { display: flex; flex-direction: column; gap: 0.22rem; }
.home-atividade-list .activity-item {
    padding: 0.28rem 0.4rem; display: flex; align-items: center; gap: 0.4rem;
    border-radius: 5px; background: rgba(255,255,255,0.02);
}
.home-atividade-list .activity-icon  { font-size: 0.9rem; }
.home-atividade-list .activity-title { font-size: 0.73rem; color: #c0c8e0; }
.home-atividade-list .activity-time  { font-size: 0.62rem; color: var(--text-secondary); }
.activity-value   { font-size: 0.73rem; font-weight: 600; margin-left: auto; white-space: nowrap; }
.tx-receita { color: #66ffb8; }
.tx-despesa { color: #ff8888; }

/* ── CHARTS ROW ─────────────────────────────────────────────────── */
.home-charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1.4rem 0.8rem;
    flex-shrink: 0;
}
.home-chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.home-contas-list  { display: flex; flex-direction: column; gap: 0.28rem; overflow-y: auto; max-height: 110px; }
.home-contas-empty { font-size: 0.73rem; color: var(--text-secondary); text-align: center; padding: 0.4rem; }
.home-conta-item {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.73rem; padding: 0.22rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.home-conta-nome  { flex: 1; color: #c0c8e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-conta-valor { color: #ff8888; font-weight: 600; white-space: nowrap; }
.home-conta-prazo { font-size: 0.62rem; color: var(--text-secondary); white-space: nowrap; }
.home-conta-atrasado .home-conta-prazo { color: #ff6666; }

/* ── Wrapper de altura fixa para Chart.js ───────────────────────── */
/* Chart.js com maintainAspectRatio:false PRECISA de um container   */
/* com height definido em CSS; sem isso ele cresce infinitamente.   */
.home-chart-wrap {
    position: relative;
    height: 110px;          /* altura fixa do gráfico */
    width: 100%;
}
.home-chart-wrap-sm {
    height: 120px;          /* doughnut precisa de um pouco mais */
}
.home-chart-wrap canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Card de gráfico: altura total limitada */
.home-chart-card {
    max-height: 170px;
    overflow: hidden;
}

/* ── Responsive (layout antigo — mantido para outras abas) ──────── */
@media (max-width: 1280px) {
    .home-main-grid  { grid-template-columns: 1fr 1.4fr 1fr 1fr; gap: 0.4rem; }
    .home-charts-row { grid-template-columns: 1.3fr 1fr 1fr; }
}
@media (max-width: 1050px) {
    .home-kpi-row    { grid-template-columns: repeat(2,1fr); }
    .home-main-grid  { grid-template-columns: 1fr 1.2fr 1fr; }
    .home-right      { display: flex; flex-direction: column; gap: 0.5rem; }
    .home-charts-row { grid-template-columns: 1fr 1fr; }
    .home-charts-row > :last-child { grid-column: span 2; }
}
@media (max-width: 800px) {
    .home-main-grid   { grid-template-columns: 1fr; }
    .home-center-panel{ grid-column: auto; order: -1; }
    .home-charts-row  { grid-template-columns: 1fr; }
    .home-charts-row > :last-child { grid-column: auto; }
}

/* ==========================================================================
   HOME V3 — JARVIS COMMAND CENTER
   Central circle dominant, orbital cards, glassmorphism, neon glow
   ========================================================================== */

:root {
    --hv3-cyan:   #00D4FF;
    --hv3-purple: #7C3AED;
    --hv3-green:  #22C55E;
    --hv3-orange: #F59E0B;
    --hv3-pink:   #EC4899;
    --hv3-bg:     #020617;
}

#tab-visao-geral {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: -2rem;
    padding: 0;
    height: calc(100vh - 60px);
    background: #020617;
}

.hv3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px 10px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(0,212,255,0.04) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0,212,255,0.08);
    z-index: 20;
    position: relative;
}
.hv3-greeting-line {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hv3-greeting-main {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00D4FF, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hv3-wave { font-size: 1.4rem; }
.hv3-greeting-sub {
    font-size: 0.82rem;
    color: rgba(0,212,255,0.5);
    margin-top: 2px;
}
.hv3-hdr-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hv3-date {
    font-size: 0.75rem;
    color: rgba(226,232,240,0.4);
    margin-right: 4px;
}
.hv3-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 8px #22C55E;
    animation: hv3Pulse 2s ease-in-out infinite;
}
.hv3-status-lbl {
    font-size: 0.7rem;
    color: #22C55E;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.hv3-scene {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 55% 60% at 50% 46%,
            rgba(0,70,140,0.55) 0%,
            rgba(0,40,90,0.3)  30%,
            rgba(2,8,28,1)     65%),
        radial-gradient(ellipse 80% 50% at 50% 10%,
            rgba(0,30,70,0.35) 0%,
            transparent 70%),
        #020916;
    display: flex;
    flex-direction: column;
}

/* ── GRID 3 COLUNAS ─────────────────────────────────────────────── */
.hv3-grid {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}

/* Coluna genérica */
.hv3-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px;
    z-index: 5;
}

/* Colunas laterais — largura fixa, cards empilhados */
.hv3-col-left,
.hv3-col-right {
    width: 285px;
    flex-shrink: 0;
}

/* Coluna central — ocupa o restante, position:relative para anéis */
.hv3-col-center {
    flex: 1;
    position: relative;
    overflow: visible;
    padding: 0;
}

.hv3-lines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Rings — absolutos dentro de .hv3-col-center */
.hv3-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}

/* Ring 1 — innermost, tight around canvas (520px), bright */
.hv3-r1 {
    width: 520px; height: 520px;
    border: 2px solid rgba(0,212,255,0.75);
    box-shadow: 0 0 30px rgba(0,212,255,0.35) inset,
                0 0 30px rgba(0,212,255,0.35),
                0 0 80px rgba(0,212,255,0.15) inset,
                0 0 80px rgba(0,212,255,0.15);
    animation: hv3Spin 28s linear infinite;
    z-index: 4;
}
.hv3-r1::before {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    background: #00D4FF;
    border-radius: 50%;
    top: -5px; left: 50%; margin-left: -5px;
    box-shadow: 0 0 14px #00D4FF, 0 0 30px rgba(0,212,255,0.8);
}
.hv3-r1::after {
    content: '';
    position: absolute;
    width: 6px; height: 6px;
    background: #00D4FF;
    border-radius: 50%;
    bottom: -3px; left: 32%; margin-left: -3px;
    box-shadow: 0 0 10px #00D4FF;
}

/* Ring 2 — dashed purple, 760px */
.hv3-r2 {
    width: 600px; height: 600px;
    border: 1px dashed rgba(124,58,237,0.45);
    animation: hv3Spin 48s linear infinite reverse;
    z-index: 3;
}
.hv3-r2::before {
    content: '';
    position: absolute;
    width: 8px; height: 8px;
    background: #7C3AED;
    border-radius: 50%;
    bottom: -4px; left: 50%; margin-left: -4px;
    box-shadow: 0 0 12px #7C3AED, 0 0 24px rgba(124,58,237,0.6);
}
.hv3-r2::after {
    content: '';
    position: absolute;
    width: 5px; height: 5px;
    background: #7C3AED;
    border-radius: 50%;
    top: -2.5px; right: 25%;
    box-shadow: 0 0 8px #7C3AED;
}

/* Ring 3 — 860px, faint cyan */
.hv3-r3 {
    width: 690px; height: 690px;
    border: 1px solid rgba(0,212,255,0.2);
    animation: hv3Spin 72s linear infinite;
    z-index: 3;
}

/* Ring 4 — 960px, dashed faint */
.hv3-r4 {
    width: 780px; height: 780px;
    border: 1px dashed rgba(0,212,255,0.09);
    animation: hv3Spin 95s linear infinite reverse;
    z-index: 2;
}

/* Ring 5 — 1060px, very faint */
.hv3-r5 {
    width: 870px; height: 870px;
    border: 1px solid rgba(0,212,255,0.05);
    z-index: 1;
}

/* Ring 6 — outermost, barely visible */
.hv3-r6 {
    width: 960px; height: 960px;
    border: 1px dashed rgba(0,212,255,0.025);
    z-index: 1;
}

/* Center — absoluto dentro de .hv3-col-center */
.hv3-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 500px; height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glow interno pulsante — dentro de .hv3-center */
.hv3-center-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0,212,255,0.08) 0%,
        rgba(0,100,180,0.05) 40%,
        transparent 70%);
    animation: hv3GlowPulse 3s ease-in-out infinite;
    z-index: 9;
    pointer-events: none;
}

.hv3-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 500px !important;
    height: 500px !important;
    border-radius: 50%;
    cursor: pointer;
    z-index: 11;
    filter: drop-shadow(0 0 40px rgba(0,212,255,0.3))
            drop-shadow(0 0 80px rgba(0,150,255,0.15));
}

.hv3-overlay {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
}
.hv3-overlay button { pointer-events: all; }

.hv3-jarvis-name {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: 7px;
    background: linear-gradient(90deg, #00D4FF 0%, #ffffff 50%, #00D4FF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hv3Shimmer 3s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0,212,255,0.9));
}
.hv3-jarvis-sub {
    font-size: 0.62rem;
    color: rgba(0,212,255,0.55);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}
.hv3-jarvis-voice {
    font-size: 0.8rem;
    color: rgba(226,232,240,0.75);
    margin: 6px 0 8px;
}
.hv3-mic {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.4);
    border-radius: 22px;
    color: #00D4FF;
    font-size: 0.75rem;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.25s;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.hv3-mic:hover {
    background: rgba(0,212,255,0.22);
    box-shadow: 0 0 22px rgba(0,212,255,0.3);
}
.hv3-mic-lbl { font-size: 0.72rem; }

/* Cards — dentro das colunas do grid (position normal, sem absolute) */
.hv3-card {
    position: relative;
    width: auto;
    background: rgba(15,23,42,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0,212,255,0.18);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 0 28px rgba(0,212,255,0.07), 0 4px 20px rgba(0,0,0,0.6);
    z-index: 5;
    transition: border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
    flex-shrink: 0;
}
/* Card que cresce para preencher espaço restante da coluna */
.hv3-card-grow {
    flex: 1;
    overflow-y: auto;
}
.hv3-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.3), transparent);
}
.hv3-card:hover {
    border-color: rgba(0,212,255,0.35);
    box-shadow: 0 0 40px rgba(0,212,255,0.14),
                0 8px 32px rgba(0,0,0,0.6);
    transform: translateY(-4px);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
/* bottom row cards não sobem */
.hv3-bottom .hv3-card:hover { transform: translateY(-2px); }

/* Cards posicionados relativos ao centro — abraçam a curva dos anéis.
   Linhas externas (top/bottom) ficam mais afastadas; a linha do meio
   encosta no anel, formando o arco como na referência. */
/* hv3-pos-* removidos — layout agora usa grid 3 colunas */

.hv3-ch {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

/* ── Badge live (MONIT, ponto pulsante) ──────────────────────── */
.hv3-badge-live {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #F59E0B;
    opacity: 0.85;
    animation: hv3LiveBlink 1.8s ease-in-out infinite;
}
@keyframes hv3LiveBlink {
    0%,100% { opacity: 0.85; }
    50%      { opacity: 0.3; }
}

/* ── Gauges no card home ─────────────────────────────────────── */
.hv3-gauge-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}
.hv3-gauge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hv3-gauge-wrap canvas {
    display: block;
}

/* ── Info grid do sistema ────────────────────────────────────── */
.hv3-sys-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    margin-top: 4px;
}
.hv3-sys-cell {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.04);
}
.hv3-sys-lbl {
    font-size: 0.52rem;
    letter-spacing: 0.8px;
    color: rgba(148,163,184,0.5);
    text-transform: uppercase;
    font-weight: 600;
}
.hv3-sys-val {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Share Tech Mono', monospace;
    margin-top: 1px;
}
/* ── Ícones — badge colorido vibrante ─────────────────────────── */
.hv3-ci {
    font-size: 14px;
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hv3-ci-cyan {
    background: linear-gradient(135deg, rgba(0,212,255,0.25), rgba(0,150,220,0.15));
    border: 1px solid rgba(0,212,255,0.5);
    box-shadow: 0 0 14px rgba(0,212,255,0.3);
}
.hv3-ci-purple {
    background: linear-gradient(135deg, rgba(124,58,237,0.28), rgba(90,30,200,0.15));
    border: 1px solid rgba(124,58,237,0.5);
    box-shadow: 0 0 14px rgba(124,58,237,0.3);
}
.hv3-ci-green {
    background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(20,150,60,0.15));
    border: 1px solid rgba(34,197,94,0.5);
    box-shadow: 0 0 14px rgba(34,197,94,0.3);
}
.hv3-ci-orange {
    background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(200,100,0,0.15));
    border: 1px solid rgba(245,158,11,0.5);
    box-shadow: 0 0 14px rgba(245,158,11,0.3);
}
.hv3-ci-pink {
    background: linear-gradient(135deg, rgba(236,72,153,0.25), rgba(180,30,110,0.15));
    border: 1px solid rgba(236,72,153,0.5);
    box-shadow: 0 0 14px rgba(236,72,153,0.3);
}
.hv3-card:hover .hv3-ci { transform: scale(1.12); }

/* ── Header do card ───────────────────────────────────────────── */
.hv3-ct {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    color: rgba(186,210,235,0.75);
    text-transform: uppercase;
    flex: 1;
}
.hv3-cl {
    background: none;
    border: none;
    color: rgba(0,212,255,0.55);
    font-size: 0.65rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.hv3-cl:hover { color: #00D4FF; }

/* ── KPI number — neon glow ───────────────────────────────────── */
.hv3-bn {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
    letter-spacing: -0.5px;
}
.hv3-sub {
    font-size: 0.65rem;
    color: rgba(148,163,184,0.55);
    margin-bottom: 8px;
}

/* Cores + glow neon nos números */
.hv3-cyan   { color: #00D4FF; text-shadow: 0 0 18px rgba(0,212,255,0.7), 0 0 40px rgba(0,212,255,0.3); }
.hv3-purple { color: #9D6FFF; text-shadow: 0 0 18px rgba(157,111,255,0.7), 0 0 40px rgba(124,58,237,0.3); }
.hv3-green  { color: #22C55E; text-shadow: 0 0 18px rgba(34,197,94,0.7),  0 0 40px rgba(34,197,94,0.3); }
.hv3-orange { color: #F59E0B; text-shadow: 0 0 18px rgba(245,158,11,0.7), 0 0 40px rgba(245,158,11,0.3); }
.hv3-pink   { color: #FF6BB5; text-shadow: 0 0 18px rgba(255,107,181,0.7), 0 0 40px rgba(236,72,153,0.3); }

/* ── Temas por card — borda + fundo gradiente ─────────────────── */
.hv3-theme-cyan {
    border-left: 3px solid rgba(0,212,255,0.8) !important;
    background: linear-gradient(135deg,
        rgba(0,212,255,0.06) 0%,
        rgba(15,23,42,0.88) 55%) !important;
}
.hv3-theme-cyan::before {
    background: linear-gradient(90deg, #00D4FF 0%, rgba(0,212,255,0.1) 60%, transparent 100%) !important;
    opacity: 0.6;
}
.hv3-theme-cyan:hover {
    border-left-color: #00D4FF !important;
    box-shadow: -4px 0 20px rgba(0,212,255,0.25),
                0 0 40px rgba(0,212,255,0.12),
                0 8px 30px rgba(0,0,0,0.7) !important;
    transform: translateY(-3px) translateX(2px);
}

.hv3-theme-purple {
    border-left: 3px solid rgba(124,58,237,0.8) !important;
    background: linear-gradient(135deg,
        rgba(124,58,237,0.07) 0%,
        rgba(15,23,42,0.88) 55%) !important;
}
.hv3-theme-purple::before {
    background: linear-gradient(90deg, #7C3AED 0%, rgba(124,58,237,0.1) 60%, transparent 100%) !important;
    opacity: 0.6;
}
.hv3-theme-purple:hover {
    border-left-color: #9D6FFF !important;
    box-shadow: -4px 0 20px rgba(124,58,237,0.25),
                0 0 40px rgba(124,58,237,0.12),
                0 8px 30px rgba(0,0,0,0.7) !important;
    transform: translateY(-3px) translateX(2px);
}

.hv3-theme-blue {
    border-left: 3px solid rgba(59,130,246,0.8) !important;
    background: linear-gradient(135deg,
        rgba(59,130,246,0.07) 0%,
        rgba(15,23,42,0.88) 55%) !important;
}
.hv3-theme-blue::before {
    background: linear-gradient(90deg, #3B82F6 0%, rgba(59,130,246,0.1) 60%, transparent 100%) !important;
    opacity: 0.6;
}
.hv3-theme-blue:hover {
    border-left-color: #60A5FA !important;
    box-shadow: -4px 0 20px rgba(59,130,246,0.25),
                0 0 40px rgba(59,130,246,0.12),
                0 8px 30px rgba(0,0,0,0.7) !important;
    transform: translateY(-3px) translateX(2px);
}

.hv3-theme-green {
    border-left: 3px solid rgba(34,197,94,0.8) !important;
    background: linear-gradient(135deg,
        rgba(34,197,94,0.06) 0%,
        rgba(15,23,42,0.88) 55%) !important;
}
.hv3-theme-green::before {
    background: linear-gradient(90deg, #22C55E 0%, rgba(34,197,94,0.1) 60%, transparent 100%) !important;
    opacity: 0.6;
}
.hv3-theme-green:hover {
    border-left-color: #22C55E !important;
    box-shadow: -4px 0 20px rgba(34,197,94,0.25),
                0 0 40px rgba(34,197,94,0.12),
                0 8px 30px rgba(0,0,0,0.7) !important;
    transform: translateY(-3px) translateX(2px);
}

.hv3-theme-orange {
    border-left: 3px solid rgba(245,158,11,0.8) !important;
    background: linear-gradient(135deg,
        rgba(245,158,11,0.06) 0%,
        rgba(15,23,42,0.88) 55%) !important;
}
.hv3-theme-orange::before {
    background: linear-gradient(90deg, #F59E0B 0%, rgba(245,158,11,0.1) 60%, transparent 100%) !important;
    opacity: 0.6;
}
.hv3-theme-orange:hover {
    border-left-color: #F59E0B !important;
    box-shadow: -4px 0 20px rgba(245,158,11,0.25),
                0 0 40px rgba(245,158,11,0.12),
                0 8px 30px rgba(0,0,0,0.7) !important;
    transform: translateY(-3px) translateX(2px);
}

.hv3-theme-pink {
    border-left: 3px solid rgba(236,72,153,0.8) !important;
    background: linear-gradient(135deg,
        rgba(236,72,153,0.06) 0%,
        rgba(15,23,42,0.88) 55%) !important;
}
.hv3-theme-pink::before {
    background: linear-gradient(90deg, #EC4899 0%, rgba(236,72,153,0.1) 60%, transparent 100%) !important;
    opacity: 0.6;
}
.hv3-theme-pink:hover {
    border-left-color: #FF6BB5 !important;
    box-shadow: -4px 0 20px rgba(236,72,153,0.25),
                0 0 40px rgba(236,72,153,0.12),
                0 8px 30px rgba(0,0,0,0.7) !important;
    transform: translateY(-3px) translateX(2px);
}

/* Transição suave em todos os cards com tema */
.hv3-theme-cyan, .hv3-theme-purple, .hv3-theme-blue,
.hv3-theme-green, .hv3-theme-orange, .hv3-theme-pink {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.hv3-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 88px;
    overflow-y: auto;
}
.hv3-empty {
    color: rgba(148,163,184,0.35);
    font-size: 0.65rem;
}

.hv3-act-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 100px;
    overflow-y: auto;
}
.hv3-act-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.67rem;
}
.hv3-act-ico { font-size: 11px; flex-shrink: 0; margin-top: 1px; }
.hv3-act-t { color: rgba(226,232,240,0.75); }
.hv3-act-s { color: rgba(148,163,184,0.45); font-size: 0.6rem; }

.hv3-chart-wrap {
    position: relative;
    height: 62px;
}
.hv3-chart-wrap canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
}

.hv3-spark {
    width: 100%;
    height: 28px;
    display: block;
    margin-top: 5px;
}

.hv3-contas-list {
    font-size: 0.67rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 80px;
    overflow-y: auto;
}

.hv3-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.hv3-chip {
    font-size: 0.58rem;
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.hv3-chip-green  { border-color: rgba(34,197,94,0.4);  color: #22C55E; }
.hv3-chip-cyan   { border-color: rgba(0,212,255,0.4);  color: #00D4FF; }
.hv3-chip-purple { border-color: rgba(124,58,237,0.4); color: #7C3AED; }

/* Bottom row — em fluxo normal (fora do grid, abaixo) */
.hv3-bottom {
    position: relative;
    display: flex;
    gap: 10px;
    z-index: 5;
    align-items: stretch;
    padding: 0 10px 10px;
    flex-shrink: 0;
    justify-content: center;
}
.hv3-bottom .hv3-card {
    position: relative;
    flex: 1;
}
.hv3-bs { width: 210px; }
.hv3-bl { width: 310px; }

/* Chat mini */
.hv3-chat-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hv3-chat-msgs {
    max-height: 52px;
    overflow-y: auto;
    font-size: 0.67rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hv3-msg-bot {
    background: rgba(0,212,255,0.06);
    border-radius: 6px;
    padding: 4px 8px;
    color: rgba(226,232,240,0.75);
    align-self: flex-start;
}
.hv3-msg-user {
    background: rgba(124,58,237,0.1);
    border-radius: 6px;
    padding: 4px 8px;
    color: rgba(226,232,240,0.75);
    align-self: flex-end;
}
.hv3-chat-row {
    display: flex;
    gap: 5px;
}
.hv3-chat-in {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: 0.72rem;
    padding: 5px 9px;
    outline: none;
    transition: border-color 0.2s;
}
.hv3-chat-in:focus { border-color: rgba(0,212,255,0.4); }
.hv3-chat-in::placeholder { color: rgba(148,163,184,0.4); }
.hv3-chat-send {
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 7px;
    color: #00D4FF;
    font-size: 0.75rem;
    padding: 5px 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.hv3-chat-send:hover { background: rgba(0,212,255,0.22); }

/* Pie */
.hv3-pie-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.hv3-pie-wrap canvas { width: 80px !important; height: 80px !important; }
.hv3-pie-legend {
    font-size: 0.62rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.hv3-leg {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(148,163,184,0.75);
}
.hv3-leg-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Animations */
@keyframes hv3Pulse {
    0%,100% { opacity:1;   box-shadow: 0 0 8px #22C55E; }
    50%      { opacity:0.5; box-shadow: 0 0 3px #22C55E; }
}
@keyframes hv3Spin {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}
@keyframes hv3Shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Menu lateral aprimorado */
.menu-item {
    transition: all 0.22s ease !important;
}
.menu-item:hover:not(.disabled) {
    background: linear-gradient(90deg, rgba(0,212,255,0.1), transparent) !important;
    color: #00D4FF !important;
    border-left-color: #00D4FF !important;
}
.menu-item:hover .icon {
    filter: drop-shadow(0 0 5px rgba(0,212,255,0.8));
}
.menu-item.active {
    background: linear-gradient(90deg, rgba(0,212,255,0.14), transparent) !important;
    color: #00D4FF !important;
    border-left-color: #00D4FF !important;
    box-shadow: inset 0 0 20px rgba(0,212,255,0.05);
}
.menu-item.active .icon {
    filter: drop-shadow(0 0 5px rgba(0,212,255,0.8));
}

/* Compatibilidade hud.js */
.hv3-list .home-prox-item,
.hv3-act-list .home-act-item,
.hv3-contas-list .home-conta-item {
    font-size: 0.67rem;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(226,232,240,0.7);
}

/* ── HUD labels decorativos ────────────────────────────────────────── */
.hv3-hud-label {
    position: absolute;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0,212,255,0.45);
    pointer-events: none;
    z-index: 6;
    white-space: nowrap;
}
.hv3-hud-label::before {
    content: '◈ ';
    color: rgba(0,212,255,0.6);
}
/* HUD labels — percentuais dentro de .hv3-col-center */
.hv3-hl-tl { left: 6%;  top: 12%; }
.hv3-hl-tr { right: 6%; top: 12%; left: auto; }
.hv3-hl-bl { left: 6%;  bottom: 22%; top: auto; }
.hv3-hl-br { right: 6%; bottom: 22%; left: auto; top: auto; }

/* ── Partículas flutuantes ─────────────────────────────────────────── */
.hv3-particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 3;
}
.hv3-p {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: #00D4FF;
    box-shadow: 0 0 6px #00D4FF;
}
.hv3-p.p1 { top: 20%; left: 42%; animation: hv3Float 6s ease-in-out infinite; }
.hv3-p.p2 { top: 30%; left: 55%; animation: hv3Float 8s ease-in-out infinite 1s; background:#7C3AED; box-shadow:0 0 6px #7C3AED; }
.hv3-p.p3 { top: 60%; left: 40%; animation: hv3Float 7s ease-in-out infinite 2s; }
.hv3-p.p4 { top: 70%; left: 58%; animation: hv3Float 9s ease-in-out infinite 0.5s; background:#22C55E; box-shadow:0 0 6px #22C55E; }
.hv3-p.p5 { top: 15%; left: 50%; animation: hv3Float 5s ease-in-out infinite 3s; }
.hv3-p.p6 { top: 80%; left: 50%; animation: hv3Float 7s ease-in-out infinite 1.5s; background:#7C3AED; box-shadow:0 0 6px #7C3AED; }
.hv3-p.p7 { top: 45%; left: 36%; animation: hv3Float 6s ease-in-out infinite 2.5s; }
.hv3-p.p8  { top: 45%; left: 62%; animation: hv3Float 8s ease-in-out infinite 4s;   background:#EC4899; box-shadow:0 0 6px #EC4899; }
/* Partículas extras p9-p16 */
.hv3-p.p9  { top: 12%; left: 48%; animation: hv3Float 7s ease-in-out infinite 0.8s;  background:#00D4FF; box-shadow:0 0 5px #00D4FF; width:2px;height:2px; }
.hv3-p.p10 { top: 22%; left: 35%; animation: hv3Float 9s ease-in-out infinite 2.2s;  background:#7C3AED; box-shadow:0 0 6px #7C3AED; }
.hv3-p.p11 { top: 35%; left: 72%; animation: hv3Float 6s ease-in-out infinite 3.5s;  background:#22C55E; box-shadow:0 0 5px #22C55E; width:2px;height:2px; }
.hv3-p.p12 { top: 55%; left: 28%; animation: hv3Float 8s ease-in-out infinite 1.2s;  background:#00D4FF; box-shadow:0 0 7px #00D4FF; }
.hv3-p.p13 { top: 68%; left: 65%; animation: hv3Float 7s ease-in-out infinite 2.8s;  background:#F59E0B; box-shadow:0 0 6px #F59E0B; }
.hv3-p.p14 { top: 78%; left: 42%; animation: hv3Float 9s ease-in-out infinite 0.4s;  background:#00D4FF; box-shadow:0 0 5px #00D4FF; width:2px;height:2px; }
.hv3-p.p15 { top: 25%; left: 62%; animation: hv3Float 6s ease-in-out infinite 3.1s;  background:#EC4899; box-shadow:0 0 6px #EC4899; }
.hv3-p.p16 { top: 72%; left: 32%; animation: hv3Float 8s ease-in-out infinite 1.7s;  background:#7C3AED; box-shadow:0 0 5px #7C3AED; width:2px;height:2px; }

/* ── Rosto Iron Man ──────────────────────────────────────────────── */
.hv3-ironman-wrap {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 340px; height: 400px;
    pointer-events: none;
}
.hv3-ironman-face {
    width: 100%; height: 100%;
    display: block;
    filter:
        drop-shadow(0 0 18px rgba(0,180,255,0.55))
        drop-shadow(0 0 50px rgba(0,100,200,0.25));
    animation: hv3FaceGlow 3.5s ease-in-out infinite;
}
@keyframes hv3FaceGlow {
    0%,100% {
        filter:
            drop-shadow(0 0 15px rgba(0,180,255,0.45))
            drop-shadow(0 0 40px rgba(0,80,180,0.2));
    }
    50% {
        filter:
            drop-shadow(0 0 28px rgba(0,212,255,0.85))
            drop-shadow(0 0 70px rgba(0,140,255,0.4))
            drop-shadow(0 0 100px rgba(0,80,200,0.2));
    }
}

/* ── Ícones flutuantes nos eixos do anel r2 ───────────────────────── */
.hv3-ring-icon {
    position: absolute;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(10,20,38,0.85);
    border: 1.5px solid rgba(0,212,255,0.55);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 6;
    transition: all 0.25s;
    box-shadow:
        0 0 14px rgba(0,212,255,0.3),
        0 0 0 4px rgba(0,212,255,0.06),
        inset 0 0 10px rgba(0,212,255,0.08);
    animation: hv3IconPulse 3s ease-in-out infinite;
}
.hv3-ring-icon:hover {
    background: rgba(0,212,255,0.18);
    border-color: #00D4FF;
    box-shadow: 0 0 28px rgba(0,212,255,0.7), 0 0 0 6px rgba(0,212,255,0.12);
    transform: scale(1.18);
}
@keyframes hv3IconPulse {
    0%,100% { box-shadow: 0 0 14px rgba(0,212,255,0.3), 0 0 0 4px rgba(0,212,255,0.06), inset 0 0 10px rgba(0,212,255,0.08); }
    50%      { box-shadow: 0 0 24px rgba(0,212,255,0.6), 0 0 0 8px rgba(0,212,255,0.1),  inset 0 0 16px rgba(0,212,255,0.15); }
}
/* r2 = 600px → raio 300px do centro de col-center */
.hv3-ri-top    { top:  calc(50% - 300px - 22px); left: calc(50% - 22px); }
.hv3-ri-right  { top:  calc(50% - 22px);         left: calc(50% + 278px); }
.hv3-ri-bottom { top:  calc(50% + 258px);         left: calc(50% - 22px); }
.hv3-ri-left   { top:  calc(50% - 22px);         left: calc(50% - 322px); }

/* ── Anel de voz pulsante ──────────────────────────────────────────── */
.hv3-voice-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}
.hv3-vr-outer {
    position: absolute;
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 1px solid rgba(0,212,255,0.25);
    animation: hv3VoicePulse 2s ease-out infinite;
    pointer-events: none;
}
.hv3-vr-mid {
    position: absolute;
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(0,212,255,0.15);
    animation: hv3VoicePulse 2s ease-out infinite 0.4s;
    pointer-events: none;
}

/* ── Animações novas ───────────────────────────────────────────────── */
@keyframes hv3GlowPulse {
    0%,100% { opacity: 0.7; transform: translate(-50%,-50%) scale(1); }
    50%      { opacity: 1;   transform: translate(-50%,-50%) scale(1.08); }
}
@keyframes hv3Float {
    0%,100% { transform: translateY(0) scale(1);   opacity: 0.7; }
    50%      { transform: translateY(-18px) scale(1.3); opacity: 1; }
}
@keyframes hv3VoicePulse {
    0%   { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════════
   MINI PLAYER — TELA PRINCIPAL (chat-music-bar)
   Aparece na base do círculo central quando música está tocando
══════════════════════════════════════════════════════════════════ */
#chat-music-bar {
    display: none;
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: min(420px, 90%);
    background: rgba(0, 10, 28, 0.88);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 14px;
    backdrop-filter: blur(16px);
    box-shadow:
        0 0 24px rgba(0, 212, 255, 0.2),
        0 4px 24px rgba(0, 0, 0, 0.6);
    padding: 10px 14px;
    align-items: center;
    gap: 10px;
    animation: cmbSlideUp 0.35s ease;
}
@keyframes cmbSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

/* Equalizador animado */
.cmb-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    flex-shrink: 0;
}
.cmb-eq-bar {
    width: 3px;
    background: linear-gradient(to top, #00D4FF, #7C3AED);
    border-radius: 2px;
    animation: cmbEqAnim 0.8s ease-in-out infinite alternate;
}
.cmb-eq-bar:nth-child(1) { height: 60%;  animation-delay: 0s; }
.cmb-eq-bar:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.cmb-eq-bar:nth-child(3) { height: 75%;  animation-delay: 0.3s; }
.cmb-eq-bar:nth-child(4) { height: 45%;  animation-delay: 0.45s; }
@keyframes cmbEqAnim {
    from { transform: scaleY(0.4); }
    to   { transform: scaleY(1);   }
}

/* Thumbnail */
#cmb-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(0,212,255,0.3);
    flex-shrink: 0;
    display: none;
}

/* Info */
.cmb-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.cmb-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}
.cmb-channel {
    font-size: 0.68rem;
    color: rgba(0, 212, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Controles */
.cmb-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.cmb-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 0.85rem;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.cmb-btn:hover {
    background: rgba(0,212,255,0.18);
    border-color: #00D4FF;
    color: #fff;
    box-shadow: 0 0 10px rgba(0,212,255,0.4);
}
.cmb-btn.stop:hover {
    background: rgba(255,60,60,0.2);
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 0 0 10px rgba(255,60,60,0.4);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVO MOBILE — JARVIS DASHBOARD
   Breakpoints: 1024px (tablet), 768px (mobile land), 480px (mobile)
══════════════════════════════════════════════════════════════════ */

/* ── Tablet (1024px) ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    /* Colunas laterais menores */
    .hv3-col-left,
    .hv3-col-right {
        width: 210px;
    }

    /* Anéis: 80% do tamanho original */
    .hv3-r1 { width: 420px; height: 420px; }
    .hv3-r2 { width: 480px; height: 480px; }
    .hv3-r3 { width: 550px; height: 550px; }
    .hv3-r4 { width: 620px; height: 620px; }
    .hv3-r5 { width: 700px; height: 700px; }
    .hv3-r6 { width: 780px; height: 780px; }

    /* Face Iron Man menor */
    .hv3-ironman-wrap { width: 260px; height: 310px; }

    /* Ring icons reposicionados para anel menor (raio ~240px) */
    .hv3-ri-top    { top:  calc(50% - 240px - 22px); left: calc(50% - 22px); }
    .hv3-ri-right  { top:  calc(50% - 22px);         left: calc(50% + 218px); }
    .hv3-ri-bottom { top:  calc(50% + 198px);         left: calc(50% - 22px); }
    .hv3-ri-left   { top:  calc(50% - 22px);         left: calc(50% - 262px); }

    /* Cards menores */
    .hv3-card { padding: 10px 12px; }

    /* KPI row 2 colunas */
    .ag3-kpi-row { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Mobile landscape + tablet pequeno (768px) ───────────────── */
@media (max-width: 768px) {
    /* Navbar compacta */
    .navbar {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .navbar-center { display: none; }
    .navbar-right { gap: 0.8rem; }
    .logo { font-size: 18px; }

    /* Sidebar recolhida */
    .sidebar {
        width: 60px;
    }
    .menu-item span:not(.icon) { display: none; }
    .sidebar-header { padding: 0.5rem; }

    /* Content: menos padding */
    .content {
        padding: 0.5rem 0.4rem;
        margin-left: 0 !important;
    }

    /* HUD Home V3 — layout mobile */
    #tab-visao-geral {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .hv3-header {
        padding: 10px 14px 8px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .hv3-header-right { flex-wrap: wrap; gap: 6px; }
    .hv3-time-display { font-size: 1rem; }

    /* Grid: empilha vertical */
    .hv3-grid {
        flex-direction: column;
    }

    /* Oculta colunas laterais no mobile — aparecem abaixo */
    .hv3-col-left,
    .hv3-col-right {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 8px;
    }
    .hv3-col-left .hv3-card,
    .hv3-col-right .hv3-card {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
    }

    /* Centro: altura fixa para o HUD circular */
    .hv3-col-center {
        min-height: 340px;
        height: 340px;
        overflow: hidden;
    }

    /* Anéis: escala para caber em mobile */
    .hv3-r1 { width: 280px; height: 280px; }
    .hv3-r2 { width: 320px; height: 320px; }
    .hv3-r3 { width: 360px; height: 360px; }
    .hv3-r4 { width: 400px; height: 400px; }
    .hv3-r5 { width: 440px; height: 440px; }
    .hv3-r6 { width: 480px; height: 480px; }

    /* Face Iron Man menor */
    .hv3-ironman-wrap { width: 180px; height: 210px; }

    /* Ring icons reposicionados (raio ~160px) */
    .hv3-ri-top    { top:  calc(50% - 160px - 22px); left: calc(50% - 22px); }
    .hv3-ri-right  { top:  calc(50% - 22px);         left: calc(50% + 138px); }
    .hv3-ri-bottom { top:  calc(50% + 118px);         left: calc(50% - 22px); }
    .hv3-ri-left   { top:  calc(50% - 22px);         left: calc(50% - 182px); }
    .hv3-ring-icon { width: 36px; height: 36px; font-size: 0.9rem; }

    /* HUD labels menores */
    .hv3-hud-label { font-size: 0.55rem; }

    /* Glow center menor */
    .hv3-center-glow {
        width: 260px !important;
        height: 260px !important;
    }

    /* Partículas: ocultar as menores para performance */
    .hv3-p.p9, .hv3-p.p10, .hv3-p.p11, .hv3-p.p12,
    .hv3-p.p13, .hv3-p.p14, .hv3-p.p15, .hv3-p.p16 {
        display: none;
    }

    /* Cards do hv3 */
    .hv3-card {
        padding: 8px 10px;
    }
    .hv3-card-title { font-size: 0.65rem; }

    /* Agenda mobile */
    .ag3-toolbar {
        flex-wrap: wrap;
        gap: 6px;
    }
    .ag3-toolbar-left,
    .ag3-toolbar-right {
        flex-wrap: wrap;
        gap: 4px;
    }
    .ag3-kpi-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .ag3-main-grid {
        grid-template-columns: 1fr !important;
    }
    .ag3-sidebar {
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    /* Financeiro mobile */
    .fin-kpi-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .fin-charts-row {
        grid-template-columns: 1fr !important;
    }
    .fin-main-grid {
        grid-template-columns: 1fr !important;
    }

    /* Sistema Monitor gauges */
    .home-gauge-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Metrics section */
    .metrics-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Mobile portrait (480px) ─────────────────────────────────── */
@media (max-width: 480px) {
    /* Navbar ainda mais compacta */
    .navbar { padding: 0.5rem 0.8rem; }
    .logo { font-size: 16px; }

    /* Sidebar: ícones minúsculos ou oculta */
    .sidebar { width: 50px; }
    .menu-item { padding: 0.6rem; justify-content: center; }

    /* HUD Centro ainda menor */
    .hv3-col-center { min-height: 280px; height: 280px; }

    /* Anéis ainda menores */
    .hv3-r1 { width: 220px; height: 220px; }
    .hv3-r2 { width: 255px; height: 255px; }
    .hv3-r3 { width: 290px; height: 290px; }
    .hv3-r4 { width: 325px; height: 325px; }
    .hv3-r5 { width: 360px; height: 360px; }
    .hv3-r6 { width: 395px; height: 395px; }

    /* Face Iron Man */
    .hv3-ironman-wrap { width: 140px; height: 165px; }

    /* Ring icons: raio ~127px */
    .hv3-ri-top    { top:  calc(50% - 127px - 18px); left: calc(50% - 18px); }
    .hv3-ri-right  { top:  calc(50% - 18px);         left: calc(50% + 109px); }
    .hv3-ri-bottom { top:  calc(50% + 91px);          left: calc(50% - 18px); }
    .hv3-ri-left   { top:  calc(50% - 18px);         left: calc(50% - 145px); }
    .hv3-ring-icon { width: 30px; height: 30px; font-size: 0.75rem; }

    /* Cards laterais: 1 coluna em 480px */
    .hv3-col-left .hv3-card,
    .hv3-col-right .hv3-card {
        flex: 1 1 100%;
    }

    /* KPI: 1 coluna */
    .ag3-kpi-row,
    .fin-kpi-row {
        grid-template-columns: 1fr !important;
    }

    /* Ocultar labels HUD */
    .hv3-hud-label { display: none; }

    /* Metrics 1 coluna */
    .metrics-section { grid-template-columns: 1fr; }
}

/* ── Toque: remover hover effects em touch ───────────────────── */
@media (hover: none) and (pointer: coarse) {
    .hv3-card:hover { transform: none; }
    .hv3-ring-icon:hover { transform: none; }
    .menu-item:hover { background: transparent; }
    .icon-btn:hover { transform: none; }
    /* Aumentar área de toque */
    .hv3-ring-icon { min-width: 44px; min-height: 44px; }
    .menu-item { padding: 0.8rem; }
    .ag3-btn { min-height: 40px; padding: 6px 12px; }
}

/* ══════════════════════════════════════════════════════════════
   AGENDA v2 — RESPONSIVO COMPLETO
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Remove overflow hidden para scroll nativo */
    #tab-agenda {
        height: auto !important;
        min-height: 100vh;
        overflow-y: auto !important;
        overflow-x: hidden;
    }

    /* Outer layout vira coluna */
    .ag2-outer-layout {
        flex-direction: column !important;
        overflow: visible !important;
    }

    /* Sidebar esquerda (calendário) oculta em mobile */
    .ag2-sidebar-l { display: none !important; }

    /* Body principal vira coluna */
    .ag2-body {
        flex-direction: column !important;
        overflow: visible !important;
        min-height: 0;
    }
    .ag2-main-panel {
        overflow: visible !important;
        min-height: 0;
    }

    /* KPIs: 2 colunas */
    .ag2-kpis {
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 10px 12px !important;
    }
    .ag2-kpi {
        flex: 1 1 calc(50% - 8px) !important;
        min-width: 0 !important;
        padding: 12px 14px !important;
    }
    .ag2-kpi-num { font-size: 22px !important; }

    /* Topbar responsiva */
    .ag2-topbar {
        padding: 10px 12px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .ag2-topbar-title { font-size: 11px !important; }
    .ag2-topbar-btn   { padding: 7px 12px !important; font-size: 10px !important; }

    /* Grade semanal: scroll horizontal */
    .ag3-week-grid,
    .ag3-week-cols { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .ag3-week-cols { min-width: 480px; }

    /* Sidebar direita ocupa 100% */
    .ag2-sidebar-r {
        width: 100% !important;
        max-width: 100% !important;
        border-left: none !important;
        border-top: 1px solid rgba(120,130,255,0.15) !important;
    }

    /* Tabela de consultas: scroll */
    .ag2-list-wrap { overflow-x: auto !important; }
}

@media (max-width: 480px) {
    .ag2-kpi { flex: 1 1 100% !important; }
    .ag2-topbar-btn { flex: 1 !important; }
}

/* ══════════════════════════════════════════════════════════════
   FINANCEIRO — RESPONSIVO COMPLETO
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .fin-kpis { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 768px) {
    /* Reset margin negativo */
    #tab-financeiro {
        margin: 0 !important;
        width: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden;
    }

    /* Layout vira coluna */
    .fin-outer {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Sidebar vira barra horizontal no topo */
    .fin-sidebar-l {
        width: 100% !important;
        min-width: 0 !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
        padding: 6px 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
    .fin-brand     { display: none !important; }
    .fin-nav       { display: flex !important; flex-direction: row !important; padding: 0 !important; flex: 1; }
    .fin-nav-group { display: none !important; }
    .fin-nav-item  {
        flex-direction: column !important;
        gap: 2px !important;
        padding: 6px 10px !important;
        margin: 0 2px !important;
        font-size: 9px !important;
        white-space: nowrap !important;
        min-width: 60px !important;
        align-items: center !important;
    }
    .fin-nav-item .fin-nav-ico { font-size: 18px !important; width: auto !important; }
    .fin-nav-premium { display: none !important; }

    /* Topbar */
    .fin-topbar {
        padding: 10px 12px !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .fin-topbar-left h2 { font-size: 16px !important; }
    .fin-topbar-right   { flex-wrap: wrap !important; gap: 6px !important; }
    .fin-btn-nova       { padding: 8px 14px !important; font-size: 12px !important; }

    /* Scroll area */
    .fin-scroll { padding: 12px !important; overflow-y: auto !important; }

    /* KPIs */
    .fin-kpis   { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; margin-bottom: 12px !important; }
    .fin-kpi    { padding: 12px 14px !important; }
    .fin-kpi-val { font-size: 18px !important; }

    /* Tabelas: scroll horizontal */
    .fin-table-wrap,
    .fin-transacoes-lista { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .fin-table { min-width: 480px !important; font-size: 11px !important; }
    .fin-table th, .fin-table td { padding: 7px 8px !important; }

    /* Gráficos */
    .fin-chart-card canvas { height: 160px !important; }

    /* Grids de 2 colunas → 1 */
    .fin-row-2,
    .fin-graficos-row { grid-template-columns: 1fr !important; }

    /* Main área */
    .fin-main { min-width: 0 !important; overflow: visible !important; }
}

@media (max-width: 480px) {
    .fin-kpis { grid-template-columns: 1fr !important; }
    .fin-kpi-val { font-size: 20px !important; }
    .fin-topbar-left h2 { font-size: 14px !important; }
    .fin-mes-nav { width: 100% !important; justify-content: center !important; }
}
