@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Orbitron:wght@400;700&display=swap');

:root { --neon-blue: #3b82f6; --neon-amber: #f59e0b; --bg-dark: #020617; --app-scale: 0.82; --font-scale: 1; }

html {
    font-size: calc(16px * var(--font-scale));
}

html, body { 
    overflow: hidden;
}

html.boot-active #app-shell {
    visibility: hidden;
}

/* Remove scrollbars em todos os elementos */
*::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body { 
    background: var(--bg-dark);
    background-image: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
    color: #e2e8f0;
}

#app-shell {
    position: relative;
    width: calc(100vw / var(--app-scale));
    height: calc(100vh / var(--app-scale));
    overflow: hidden;
    zoom: var(--app-scale);
}

.chat-window-outer {
    display: none; position: absolute; flex-direction: column; z-index: 10;
}

.chat-window {
    display: flex; flex-direction: column;
    position: relative;
    background: rgba(10, 15, 28, 0.98); backdrop-filter: blur(20px);
    border-radius: 8px; border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2); overflow: hidden; resize: both;
    width: 460px; height: 620px; border-top: 4px solid var(--neon-blue);
}

.chat-window.slot-attention-flash {
    border-color: rgba(239, 68, 68, 0.55) !important;
    border-top-color: #ef4444 !important;
    box-shadow: 0 0 26px rgba(239, 68, 68, 0.22), inset 0 0 0 1px rgba(239, 68, 68, 0.15) !important;
    animation: slotAttentionBreath 2.8s ease-in-out infinite;
}

@keyframes slotAttentionBreath {
    0%, 100% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.18), inset 0 0 0 1px rgba(239, 68, 68, 0.12);
        border-color: rgba(239, 68, 68, 0.45);
    }
    50% {
        box-shadow: 0 0 34px rgba(248, 113, 113, 0.34), inset 0 0 0 1px rgba(248, 113, 113, 0.25);
        border-color: rgba(248, 113, 113, 0.7);
    }
}

.notepad-window {
    display: none; position: absolute; flex-direction: column; z-index: 10;
    background: rgba(10, 15, 28, 0.98); backdrop-filter: blur(20px);
    border-radius: 8px; border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2); overflow: hidden; resize: both;
    width: 400px; height: 300px; border-top: 4px solid var(--neon-amber); border-color: rgba(245, 158, 11, 0.3);
}

.chat-header, .notepad-header {
    cursor: grab; padding: 10px 15px; background: rgba(59, 130, 246, 0.1);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; font-weight: bold; letter-spacing: 1px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2); user-select: none;
}
.chat-header:active { cursor: grabbing; }

.chat-header {
    gap: 8px;
}

.chat-header > .flex.items-center.gap-3 {
    min-width: 0;
    flex: 0 1 auto;
}

.chat-header > .flex.items-center.gap-3 > span {
    display: inline-block;
    min-width: 0;
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.56rem, 0.8vw, 0.72rem);
}


.slot-top-meta {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
    margin-bottom: -1px;
    pointer-events: none;
}

.slot-top-close {
    margin-left: auto;
    pointer-events: auto;
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 6px 3px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.06);
    border-radius: 3px 3px 0 0;
}

.slot-top-close:hover {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.18);
}

.settings-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    height: calc(100% - 42px);
    background: #050a15;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-label {
    color: #cbd5e1;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.settings-value {
    color: #60a5fa;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(30, 64, 175, 0.12);
    border-radius: 4px;
    padding: 3px 8px;
    min-width: 54px;
    text-align: center;
}

.settings-slider {
    width: 100%;
    accent-color: #60a5fa;
    cursor: pointer;
}

.settings-hint {
    color: #94a3b8;
    font-size: 0.67rem;
    line-height: 1.4;
}

.settings-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-switch-slider {
    position: absolute;
    inset: 0;
    background: rgba(51, 65, 85, 0.55);
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 999px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.settings-switch-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: #94a3b8;
    border-radius: 50%;
    transition: transform 0.18s ease, background 0.18s ease;
}

.settings-switch input:checked + .settings-switch-slider {
    background: rgba(30, 64, 175, 0.55);
    border-color: rgba(96, 165, 250, 0.55);
}

.settings-switch input:checked + .settings-switch-slider::before {
    transform: translateX(20px);
    background: #60a5fa;
}

.settings-switch input:focus-visible + .settings-switch-slider {
    outline: 2px solid rgba(96, 165, 250, 0.6);
    outline-offset: 2px;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.settings-btn {
    border-radius: 5px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    padding: 7px 13px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.settings-btn-secondary {
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.28);
}

.settings-btn-primary {
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.42);
    background: rgba(30, 64, 175, 0.24);
}

.settings-btn-danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(127, 29, 29, 0.28);
}

.settings-btn-warning {
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(124, 45, 18, 0.28);
}

.settings-btn:hover {
    filter: brightness(1.1);
}

.history-window-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 42px);
    background: #050a15;
}



.slot-client-type {
    display: inline-block;
    align-self: flex-start;
    color: #f59e0b;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px 3px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 3px 3px 0 0;
    white-space: nowrap;
}

.slot-client-type:empty {
    display: none;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.chat-actions .slot-action-btn {
    min-height: 24px;
    min-width: 0;
    flex: 1 1 0;
    padding: 4px 6px;
    border-radius: 7px;
    border: 1px solid rgba(71, 85, 105, 0.45);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12), 0 2px 8px rgba(2, 6, 23, 0.45);
    color: #cbd5e1;
    font-size: clamp(0.5rem, 0.75vw, 0.66rem);
    font-weight: 800;
    letter-spacing: 0.35px;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-actions .slot-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.chat-actions .slot-action-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 1px 4px rgba(2, 6, 23, 0.42);
}

.chat-actions .slot-action-btn:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.55);
    outline-offset: 1px;
}

/* Paleta por ação (ordem fixa no header: TAB, NPS, FILA, ABANDONO, N2) */
.chat-actions .slot-action-btn:nth-child(1) {
    border-color: rgba(16, 185, 129, 0.45);
    background: linear-gradient(180deg, rgba(6, 95, 70, 0.38), rgba(6, 78, 59, 0.32));
    color: #6ee7b7;
}

.chat-actions .slot-action-btn:nth-child(2) {
    border-color: rgba(6, 182, 212, 0.48);
    background: linear-gradient(180deg, rgba(8, 145, 178, 0.36), rgba(14, 116, 144, 0.3));
    color: #67e8f9;
}

.chat-actions .slot-action-btn:nth-child(3) {
    border-color: rgba(168, 85, 247, 0.5);
    background: linear-gradient(180deg, rgba(126, 34, 206, 0.34), rgba(109, 40, 217, 0.28));
    color: #d8b4fe;
}

.chat-actions .slot-action-btn:nth-child(4) {
    border-color: rgba(245, 158, 11, 0.52);
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.38), rgba(146, 64, 14, 0.32));
    color: #fde68a;
    flex: 1.45 1 0;
}

.chat-actions .slot-action-btn:nth-child(5) {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.34), rgba(29, 78, 216, 0.28));
    color: #bfdbfe;
}

.slot-quick-reply {
    display: none;
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92%, 430px);
    z-index: 35;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(239, 68, 68, 0.55);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(18, 24, 42, 0.96), rgba(7, 14, 28, 0.96));
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.25), inset 0 0 24px rgba(59, 130, 246, 0.08);
    flex-direction: column;
}

.slot-quick-reply.show {
    display: flex;
    animation: slotPromptPop 0.2s ease-out;
}

.slot-quick-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.slot-quick-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fee2e2;
    background: radial-gradient(circle at 30% 30%, rgba(248, 113, 113, 0.85), rgba(239, 68, 68, 0.35));
    border: 1px solid rgba(239, 68, 68, 0.7);
    font-size: 0.9rem;
    font-weight: 900;
    animation: slotAlertPulse 1.4s infinite;
}

.slot-quick-title {
    color: #ef4444;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.slot-quick-elapsed {
    text-align: center;
    color: #fecaca;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 4px;
    border: 1px dashed rgba(239, 68, 68, 0.35);
    border-radius: 4px;
    background: rgba(127, 29, 29, 0.18);
}

.slot-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slot-quick-footer {
    display: flex;
    justify-content: center;
}

.slot-quick-snooze {
    border: 1px solid rgba(245, 158, 11, 0.55);
    background: rgba(120, 53, 15, 0.32);
    color: #fcd34d;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 4px;
    padding: 7px 10px;
    text-transform: uppercase;
}

.slot-quick-snooze:disabled {
    opacity: 0.75;
    cursor: default;
}

.slot-quick-snooze:hover:not(:disabled) {
    filter: brightness(1.15);
}

@keyframes slotAlertPulse {
    0% { text-shadow: 0 0 0 rgba(239, 68, 68, 0.1); }
    70% { text-shadow: 0 0 12px rgba(239, 68, 68, 0.55); }
    100% { text-shadow: 0 0 0 rgba(239, 68, 68, 0.1); }
}

@keyframes slotPromptPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.slot-quick-btn,
.slot-quick-send {
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: rgba(30, 64, 175, 0.18);
    color: #bfdbfe;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 4px;
    padding: 7px 8px;
    line-height: 1.25;
    text-align: left;
}

.slot-quick-send {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    text-align: center;
}

.slot-quick-btn:hover,
.slot-quick-send:hover {
    filter: brightness(1.15);
}

.slot-quick-input {
    flex: 1;
    min-width: 80px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: #050a15;
    color: #e2e8f0;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.64rem;
    outline: none;
}

.slot-timer-terminal {
    color: #22c55e;
    font-size: 0.62rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    letter-spacing: 0.8px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 4px;
    padding: 2px 6px;
    box-shadow: inset 0 0 8px rgba(34, 197, 94, 0.12), 0 0 8px rgba(34, 197, 94, 0.15);
    white-space: nowrap;
}

.slot-timer-terminal-top {
    font-size: 0.58rem;
    padding: 2px 6px 3px;
    border-radius: 3px 3px 0 0;
    box-shadow: none;
}

.slot-history-badge {
    display: inline-block;
    font-size: 0.54rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px 3px;
    border-radius: 3px 3px 0 0;
    white-space: nowrap;
}

.slot-history-badge.is-green {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.38);
    background: rgba(34, 197, 94, 0.09);
    border: 1px solid rgba(34, 197, 94, 0.38);
}

.slot-history-badge.is-danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(127, 29, 29, 0.28);
    border: 1px solid rgba(239, 68, 68, 0.45);
    animation: slotRepeatPulse 1.2s ease-in-out infinite;
}

@keyframes slotRepeatPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(239, 68, 68, 0.0);
        text-shadow: 0 0 0 rgba(239, 68, 68, 0.0);
    }
    50% {
        box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
        text-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
    }
}

.slot-auto-prompt {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 25;
    max-width: 280px;
    padding: 8px 10px;
    font-size: 0.64rem;
    line-height: 1.35;
    letter-spacing: 0.2px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 6px;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.slot-auto-prompt.show {
    opacity: 1;
    transform: translateY(0);
}

.data-bar { background: rgba(0,0,0,0.6); padding: 15px; display: grid; grid-template-columns: 1fr 1fr 0.6fr; gap: 10px; }
.data-bar.minimized { display: none; }

.input-group label { font-size: 0.6rem; color: var(--neon-blue); text-transform: uppercase; margin-bottom: 3px; display: block; opacity: 0.8; }
.input-group input { 
    width: 100%; font-size: 0.8rem; color: #fff; background: #050a15; 
    border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 4px; padding: 5px 10px; outline: none;
    transition: all 0.3s;
}
.input-group input:focus { border-color: var(--neon-blue); box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }

/* ── Tag Box (dropdown compacto, igual estilo Rocket) ─── */
.tag-box {
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    background: rgba(5, 10, 21, 0.85);
}

.tag-box-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    cursor: pointer;
    user-select: none;
    height: 26px;
}
.tag-box-header:hover { background: rgba(59,130,246,0.07); }

.tag-box-label {
    font-size: 0.58rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-box-summary {
    flex: 1;
    min-width: 0;
    font-size: 0.6rem;
    color: #4b5568;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.tag-box-summary.has-value { color: #86efac; }

.tag-box-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.tag-refresh-btn {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(8, 145, 178, 0.14);
    color: #67e8f9;
    font-size: 0.62rem;
    line-height: 1;
    cursor: pointer;
    transition: filter 0.15s;
    flex-shrink: 0;
}
.tag-refresh-btn:hover { filter: brightness(1.3); }
.tag-refresh-btn.is-loading { animation: tagSpin 0.7s linear infinite; pointer-events: none; opacity: 0.7; }
@keyframes tagSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.tag-box-arrow {
    font-size: 0.6rem;
    color: #64748b;
    transition: transform 0.18s;
    line-height: 1;
}
.tag-box.is-open .tag-box-arrow { transform: rotate(180deg); }

/* dropdown flutuante — não empurra o layout, igual um select nativo */
.tag-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 3px);
    z-index: 60;
    background: #0a0f1c;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.08);
    flex-direction: column;
    overflow: hidden;
}
.tag-box.is-open .tag-dropdown { display: flex; }

.tag-dropdown-list {
    overflow-y: auto;
    max-height: 168px;
    padding: 3px;
}
.tag-dropdown-list::-webkit-scrollbar { width: 6px; }
.tag-dropdown-list::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.35); border-radius: 3px; }

.tag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    font-size: 0.63rem;
    color: #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.25;
}
.tag-row:hover { background: rgba(59,130,246,0.14); color: #e2e8f0; }
.tag-row.selected { background: rgba(22,101,52,0.30); color: #86efac; }
.tag-row-check {
    font-size: 0.68rem;
    opacity: 0;
    flex-shrink: 0;
}
.tag-row.selected .tag-row-check { opacity: 1; }

.tag-dropdown-empty {
    padding: 12px 10px;
    font-size: 0.6rem;
    color: #475569;
    text-align: center;
    line-height: 1.4;
}

.tag-apply-btn {
    width: 100%;
    padding: 6px;
    background: rgba(30,58,138,0.4);
    border: none;
    border-top: 1px solid rgba(59,130,246,0.22);
    color: #93c5fd;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.tag-apply-btn:hover { background: rgba(30,58,138,0.6); color: #bfdbfe; }

.stats-badge { background: rgba(59, 130, 246, 0.1); border: 1px solid var(--neon-blue); color: var(--neon-blue); padding: 5px 15px; border-radius: 4px; font-family: 'Orbitron'; font-size: 0.7rem; }

.terminal-info {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.8rem;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.terminal-line-1 {
    color: #00ff00;
    margin-bottom: 2px;
}

.terminal-line-2 {
    color: #00ff00;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}

.terminal-cursor {
    display: inline-block;
    background: #00ff00;
    color: #000;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.terminal-top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 8px;
    background: rgba(5, 16, 24, 0.82);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.14), inset 0 0 18px rgba(34, 197, 94, 0.05);
}

.terminal-top-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.terminal-top-btn:hover {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(34, 197, 94, 0.65);
    color: #d9ffe6;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.24);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(59, 130, 246, 0.8); }
}
.btn-action { font-size: 0.7rem; font-weight: bold; padding: 10px; border-radius: 4px; transition: 0.3s; text-transform: uppercase; border: 1px solid transparent; }
.btn-log { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.btn-log:hover { background: #10b981; color: #000; }

.ball { 
    width: 50px; height: 50px; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; cursor: pointer; 
    transition: 0.4s; border: 1px solid rgba(59, 130, 246, 0.3); font-weight: bold; margin-bottom: 15px;
    background: rgba(10, 15, 28, 0.8); color: var(--neon-blue);
    position: relative; flex-direction: column; font-size: 0.8rem;
}
.ball:hover { transform: translateX(10px); background: var(--neon-blue); color: #000; box-shadow: 0 0 20px var(--neon-blue); }

.ball-badge {
    position: absolute; top: -5px; right: -5px;
    background: #ef4444; color: #fff; font-size: 0.55rem;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.ball-name {
    position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
    font-size: 0.5rem; color: #94a3b8; white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.5px;
    max-width: 70px; overflow: hidden; text-overflow: ellipsis;
    text-align: center;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.agent-card {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    margin-bottom: 15px;
}
.agent-card:hover { transform: translateX(5px); }

.omni-toggle {
    width: 50px; height: 50px; border-radius: 4px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s; margin-bottom: 10px;
    border: 1px solid; align-self: center;
    font-family: 'Fira Code', monospace; font-weight: bold;
    background: rgba(10, 15, 28, 0.9);
}
.omni-toggle #omni-icon { font-size: 1.1rem; line-height: 1; }
.omni-toggle #omni-label { font-size: 0.45rem; letter-spacing: 2px; margin-top: 2px; }
.omni-toggle.closed {
    border-color: rgba(239, 68, 68, 0.5); color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
.omni-toggle.closed:hover {
    background: rgba(239, 68, 68, 0.15); transform: translateX(10px);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}
.omni-toggle.open {
    border-color: rgba(34, 197, 94, 0.5); color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.15);
}
.omni-toggle.open:hover {
    background: rgba(34, 197, 94, 0.15); transform: translateX(10px);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}
.agent-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.4);
    object-fit: cover; background: #0a0f1c;
}
.agent-status-dot {
    position: absolute; bottom: 14px; right: -2px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #020617;
    transition: background 0.3s;
}
.agent-status-dot.online { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }
.agent-status-dot.offline { background: #6b7280; }

iframe { background: #fff; flex-grow: 1; border: none; }

#log-content::-webkit-scrollbar { display: none; }

.notepad-body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #050a15;
}

#notepad-content { 
    width: 100%; height: 100%; background: #050a15; color: var(--neon-amber); 
    padding: 15px; font-size: 0.9rem; border: none; outline: none; resize: none;
    caret-color: #f59e0b;
}

.notepad-terminal {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #050a15;
    color: #22c55e;
    font-family: 'Fira Code', monospace;
}

.notepad-terminal-output {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.notepad-terminal-line {
    margin-bottom: 6px;
}

.notepad-terminal-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(34, 197, 94, 0.25);
    padding: 10px 12px;
    font-size: 0.72rem;
    color: #22c55e;
}

.notepad-terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.75rem;
}

.notepad-terminal-input::placeholder {
    color: #64748b;
}

.fluxo-item {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.fluxo-item:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateX(5px);
}

.fluxo-title {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.fluxo-path {
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.4;
    font-family: 'Fira Code', monospace;
}
