/* === VARIAVEIS === */
:root {
  --bg: #020809;
  --bg2: #040d0f;
  --cyan: #00d4ff;
  --green: #00ff88;
  --purple: #a78bfa;
  --fire: #ff6400;
  --amber: #f0b040;
  --red: #ff4444;
  --border-dim: rgba(0, 212, 255, 0.1);
  --border-bright: rgba(0, 212, 255, 0.3);
  --text-dim: rgba(0, 212, 255, 0.45);
  --text-mid: rgba(0, 212, 255, 0.7);
}

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

body {
  background: var(--bg);
  color: #e0e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* === NAVBAR === */
.navbar {
  height: 44px;
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--cyan);
  white-space: nowrap;
}

.nav-orb {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.tab-item {
  padding: 5px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  user-select: none;
}

.tab-item:hover { color: var(--cyan); background: rgba(0,212,255,0.05); }

.tab-item.tab-active {
  color: var(--cyan);
  background: rgba(0,212,255,0.08);
  border-color: var(--border-dim);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === WEATHER WIDGET === */
.weather-widget {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(255, 176, 64, 0.08);
  border: 1px solid rgba(255, 176, 64, 0.2);
  border-radius: 5px;
  cursor: default;
  transition: border-color 0.2s;
}
.weather-widget:hover { border-color: rgba(255, 176, 64, 0.5); }
.weather-widget:hover .weather-forecast { display: block; }

.weather-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-icon {
  font-size: 13px;
  color: var(--amber);
}

.weather-temp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
}

.weather-hum {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(240, 176, 64, 0.55);
}

.weather-forecast {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(4, 10, 12, 0.97);
  border: 1px solid rgba(255, 176, 64, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 180px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.forecast-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(240, 176, 64, 0.4);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.forecast-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.forecast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.forecast-hour { color: rgba(255,255,255,0.4); }
.forecast-icon { color: var(--amber); font-size: 12px; }
.forecast-temp { color: var(--amber); font-weight: 600; }

/* === END WEATHER === */

.nav-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
}

.nav-status-dots {
  display: flex;
  gap: 3px;
}
.nav-status-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.6;
}

/* === BOTÃO E BADGE DE ALERTAS === */
.alert-btn {
  position: relative;
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-mid);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}
.alert-btn:hover, .alert-btn.has-alerts {
  border-color: var(--border-dim);
  background: rgba(167, 139, 250, 0.08);
}
.alert-btn.has-alerts { animation: alertPulse 2.5s ease-in-out infinite; }

@keyframes alertPulse {
  0%, 100% { border-color: rgba(167,139,250,0.2); }
  50%       { border-color: rgba(167,139,250,0.7); box-shadow: 0 0 8px rgba(167,139,250,0.3); }
}

.alert-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  background: var(--red);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(255,68,68,0.6);
  animation: badgePop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* === OVERLAY === */
.alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 299;
}

/* === PAINEL DE ALERTAS === */
.alert-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 95vw;
  height: 100vh;
  background: rgba(4, 10, 14, 0.98);
  border-left: 1px solid rgba(167,139,250,0.3);
  z-index: 300;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.6);
  animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.alert-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(167,139,250,0.2);
  flex-shrink: 0;
}

.alert-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--purple);
}

.alert-panel-orb {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  animation: pulse 2s ease-in-out infinite;
}

.alert-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.alert-clear-btn {
  background: none;
  border: 1px solid rgba(255,68,68,0.3);
  color: var(--red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.alert-clear-btn:hover { background: rgba(255,68,68,0.1); border-color: var(--red); }

.alert-close-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-size: 12px;
  width: 24px; height: 24px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.alert-close-btn:hover { color: var(--cyan); border-color: var(--border-bright); }

.alert-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.alert-list::-webkit-scrollbar { width: 3px; }
.alert-list::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.3); border-radius: 2px; }

.alert-empty {
  text-align: center;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 32px 16px;
}

.alert-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid;
  transition: all 0.2s;
  animation: fadeInAlert 0.3s ease;
}

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

.alert-high {
  background: rgba(255,68,68,0.05);
  border-color: rgba(255,68,68,0.25);
}
.alert-normal {
  background: rgba(167,139,250,0.04);
  border-color: rgba(167,139,250,0.15);
}
.alert-item:hover { border-color: rgba(167,139,250,0.4); }

.alert-item-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-item-body { flex: 1; min-width: 0; }

.alert-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.alert-item-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--purple);
  text-transform: uppercase;
}

.alert-auto-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--cyan);
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.1em;
}

.alert-item-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.25);
  margin-left: auto;
}

.alert-item-msg {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.alert-item-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.alert-send-btn {
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.alert-send-btn:hover { background: rgba(0,212,255,0.2); border-color: var(--cyan); }

.alert-read-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  width: 24px; height: 24px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.alert-read-btn:hover { color: var(--green); border-color: var(--green); }

/* === VIEWS === */
.view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.view.active { display: flex; }

/* === LAYOUT PRINCIPAL === */
.main-layout {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  flex-shrink: 0;
}

/* === STATUS CARD === */
.status-card {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Stat row */
.stat-row {
  display: flex;
  gap: 8px;
}

.stat-card {
  flex: 1;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
}

.stat-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.stat-cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.stat-purple { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.stat-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.stat-green { background: var(--green); box-shadow: 0 0 6px var(--green); }

.stat-icon { font-size: 10px; color: var(--text-dim); margin-bottom: 2px; }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 600; color: #e0f0ff; }
.stat-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

/* sys-bottom */
.sys-bottom {
  display: flex;
  gap: 10px;
}

.sys-col { flex: 1; }
.sys-col-agents { flex: 3; }
.sys-col-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}

/* Model tiers */
.model-tier-row { display: flex; gap: 4px; flex-direction: column; }
.model-tier {
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  transition: all 0.3s;
}
.tier-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.tier-name { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.4); }

.model-tier.active-haiku { border-color: rgba(0,204,102,0.5); background: rgba(0,204,102,0.05); }
.model-tier.active-haiku .tier-dot { background: #00cc66; box-shadow: 0 0 6px #00cc66; }
.model-tier.active-haiku .tier-name { color: #00cc66; }

.model-tier.active-sonnet { border-color: rgba(0,212,255,0.5); background: rgba(0,212,255,0.05); }
.model-tier.active-sonnet .tier-dot { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.model-tier.active-sonnet .tier-name { color: var(--cyan); }

.model-tier.active-opus { border-color: rgba(167,139,250,0.5); background: rgba(167,139,250,0.05); }
.model-tier.active-opus .tier-dot { background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.model-tier.active-opus .tier-name { color: var(--purple); }

/* Agents grid */
.agents-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.agent-card {
  padding: 3px 7px;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  transition: border-color 0.2s;
}
.agent-card:hover { border-color: var(--border-bright); }

.agent-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.agent-dev { color: var(--green); }
.agent-arch { color: var(--cyan); }
.agent-qa { color: var(--amber); }
.agent-ux { color: var(--purple); }
.agent-devops { color: #ff6b6b; }
.agent-pm { color: var(--fire); }
.agent-sm { color: #4fc3f7; }
.agent-analyst { color: #81d4fa; }
.agent-data { color: #b39ddb; }
.agent-sara { color: #f48fb1; }

/* Brain chip */
.brain-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(167,139,250,0.3);
  background: rgba(167,139,250,0.05);
}
.brain-icon { font-size: 16px; color: var(--purple); }
.brain-name { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--purple); }
.brain-desc { font-size: 9px; color: rgba(167,139,250,0.5); margin-top: 2px; }

/* === AVATAR === */
.avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  min-width: 200px;
}

.avatar-rings {
  position: relative;
  width: 260px; height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-1, .ring-2, .ring-3 {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.25);
}
.ring-1 { width: 168px; height: 168px; animation: ringRotate 8s linear infinite; }
.ring-2 { width: 218px; height: 218px; animation: ringRotate 12s linear infinite reverse; }
.ring-3 { width: 258px; height: 258px; animation: ringRotate 20s linear infinite; }

/* Decorative marks on rings */
.ring-1::before, .ring-2::before, .ring-3::before {
  content: '';
  position: absolute;
  width: 4px; height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--cyan);
}

.avatar-core {
  position: absolute;
  width: 100px; height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.avatar-arc {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(0,212,255,0.8) 30%, rgba(0,100,200,0.4) 70%, transparent 100%);
  animation: arcIdle 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.arc-inner {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(0,212,255,0.1) 50%, transparent 70%);
  animation: arcIdle 3s ease-in-out infinite reverse;
}

.arc-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.5);
  animation: arcPulseRing 2.5s ease-out infinite;
}

.avatar-hud {
  position: absolute;
  inset: 12px;
}
.hud-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(0, 212, 255, 0.2);
}
.hud-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(0, 212, 255, 0.2);
}

.avatar-label {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.orb-id-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-align: center;
}

.avatar-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-align: center;
}

/* Avatar states */
#jarvis-avatar.listening .ring-1 { border-color: rgba(0,255,136,0.5); animation-duration: 2s; }
#jarvis-avatar.listening .avatar-arc { background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(0,255,136,0.8) 30%, rgba(0,150,80,0.4) 70%, transparent 100%); }

#jarvis-avatar.thinking .ring-1 { border-color: rgba(167,139,250,0.5); animation-duration: 1s; }
#jarvis-avatar.thinking .avatar-arc { background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(167,139,250,0.8) 30%, rgba(100,60,200,0.4) 70%, transparent 100%); }

#jarvis-avatar.speaking .ring-1 { border-color: rgba(0,212,255,0.8); animation-duration: 0.8s; }
#jarvis-avatar.speaking .ring-2 { border-color: rgba(0,212,255,0.5); }
#jarvis-avatar.speaking .avatar-arc { animation-duration: 0.5s; }

/* === TERMINAL === */
.terminal-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-dim);
  background: #010504;
  overflow: hidden;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(0,212,255,0.08);
  flex-shrink: 0;
}

.terminal-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.t-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.terminal-right { display: flex; align-items: center; gap: 8px; }
.t-host {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #444;
}
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: opacity 0.2s;
  opacity: 0.7;
}
.btn-icon:hover { opacity: 1; }

.terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,0.3) transparent;
}
.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 2px; }

.term-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-user { color: var(--amber); }
.term-jarvis { color: var(--green); }
.term-system { color: var(--purple); }
.term-error { color: var(--red); }

/* Download card */
.download-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  padding: 8px 12px;
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.download-card-name { color: var(--cyan); }
.btn-download {
  background: rgba(0,212,255,0.1);
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.2s;
}
.btn-download:hover { background: rgba(0,212,255,0.2); }
.btn-view {
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.3);
  color: var(--purple);
  padding: 3px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.2s;
}
.btn-view:hover { background: rgba(167,139,250,0.2); }

/* Image thumbnail */
.card-thumb {
  max-height: 80px;
  border-radius: 3px;
  margin-top: 4px;
  display: block;
}

/* Attach preview */
.attach-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0,212,255,0.05);
  border-top: 1px solid var(--border-dim);
  font-size: 12px;
  color: var(--cyan);
}
.attach-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1;
}
.attach-remove:hover { color: var(--red); }

/* Input bar */
.input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-dim);
  background: rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.btn-mic {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-mic:hover { background: rgba(255,100,0,0.1); border-color: var(--fire); }
.btn-mic.recording {
  background: rgba(255,68,68,0.2);
  border-color: var(--red);
  animation: recPulse 1s ease-in-out infinite;
}

.btn-attach {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-attach:hover { background: rgba(0,212,255,0.1); border-color: var(--border-bright); }

.input-text {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 8px 12px;
  color: #e0e8f0;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.input-text:focus { border-color: var(--border-bright); }
.input-text::placeholder { color: rgba(255,255,255,0.25); }

.btn-send {
  background: rgba(0,212,255,0.1);
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-send:hover { background: rgba(0,212,255,0.2); box-shadow: 0 0 12px rgba(0,212,255,0.3); }

/* === VIEW ARQUIVO === */
.view-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.view-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 8px;
}

.files-list { display: flex; flex-direction: column; gap: 6px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  transition: border-color 0.2s;
}
.file-item:hover { border-color: var(--border-bright); }

.file-icon { font-size: 16px; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--cyan); truncate: ellipsis; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.file-actions { display: flex; gap: 6px; flex-shrink: 0; }

.loading-text { color: rgba(255,255,255,0.3); font-size: 13px; padding: 20px 0; text-align: center; }

.terminal-fixed { flex-shrink: 0; }

/* === VIEW CONFIG === */
.view-config-content {
  max-width: 660px;
  margin: 0 auto;
  padding: 20px;
}

.config-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.config-block-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dim);
}

.config-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.config-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  min-width: 130px;
  flex-shrink: 0;
}

.config-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 6px 10px;
  color: #e0e8f0;
  font-size: 12px;
  outline: none;
}
.config-input:focus { border-color: var(--border-bright); }

.config-select {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 6px 10px;
  color: #e0e8f0;
  font-size: 11px;
  outline: none;
  cursor: pointer;
}

.config-info {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: -6px;
  margin-bottom: 4px;
}

.btn-config-save {
  background: rgba(0,212,255,0.1);
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.btn-config-save:hover { background: rgba(0,212,255,0.2); }

.btn-test-tts {
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.3);
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.btn-test-tts:hover { background: rgba(167,139,250,0.2); }

.btn-config-danger {
  background: rgba(255,68,68,0.1);
  border: 1px solid rgba(255,68,68,0.3);
  color: var(--red);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.btn-config-danger:hover { background: rgba(255,68,68,0.2); }

.key-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
}
.key-ok { color: var(--green); background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3); }
.key-missing { color: var(--red); background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.3); }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  border: 1px solid var(--border-dim);
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 2px; top: 2px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: rgba(0,212,255,0.2); border-color: var(--cyan); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--cyan); }

.config-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 16px;
}

/* === ANIMACOES === */
@keyframes pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 12px var(--cyan); }
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes arcIdle {
  0%, 100% { opacity: 0.85; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes arcPulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes recPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* === AUDIO UNLOCK BANNER === */
.audio-unlock-banner {
  display: none;
}
@media (max-width: 768px) {
  .audio-unlock-banner {
    display: block;
    position: fixed;
    top: 44px;
    left: 0;
    right: 0;
    z-index: 150;
    background: rgba(0, 212, 255, 0.15);
    border-bottom: 1px solid var(--border-bright);
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    letter-spacing: 0.08em;
  }
}

/* === HAMBURGER === */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  transition: all 0.2s;
  flex-shrink: 0;
}
.nav-hamburger:hover { color: var(--cyan); border-color: var(--border-bright); }

.nav-active-tab {
  display: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* === TABLET: 769px – 1024px === */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar { padding: 0 14px; gap: 10px; }

  .main-layout { padding: 10px 12px; gap: 12px; }

  .avatar-rings { width: 210px; height: 210px; }
  .ring-3 { width: 208px; height: 208px; }
  .ring-2 { width: 168px; height: 168px; }
  .ring-1 { width: 128px; height: 128px; }
  .avatar-core { width: 84px; height: 84px; }
  .avatar-arc { width: 68px; height: 68px; }
  .avatar-wrap { min-width: 170px; padding: 12px; }

  .stat-value { font-size: 14px; }
  .agents-grid { gap: 3px; }
}

/* === MOBILE: max-width 768px === */
@media (max-width: 768px) {
  /* GERAL */
  body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .view {
    height: auto;
    overflow: visible;
  }

  /* NAVBAR */
  .navbar {
    padding: 0 10px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-active-tab { display: block; }
  .nav-hamburger { display: block; }

  .nav-tabs {
    display: none;
    position: fixed;
    top: 44px;
    left: 0;
    right: 0;
    background: rgba(2, 8, 9, 0.97);
    border-bottom: 1px solid var(--border-bright);
    flex-direction: column;
    padding: 6px;
    gap: 4px;
    z-index: 200;
    box-shadow: 0 6px 20px rgba(0,0,0,0.85);
  }
  .nav-tabs.open { display: flex; }

  .tab-item { font-size: 13px; padding: 11px 14px; }

  .nav-right { gap: 6px; }
  .weather-widget { display: none; }
  .nav-divider { display: none; }
  .nav-status-dots { display: none; }

  /* MAIN LAYOUT */
  .main-layout {
    flex-direction: column;
    padding: 8px;
    gap: 8px;
  }

  /* STATUS CARD */
  .status-card { padding: 8px; gap: 8px; }

  /* STAT CARDS: 2×2 */
  .stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .stat-value { font-size: 14px; }
  .stat-label { font-size: 8px; }

  /* SYS-BOTTOM: empilhar */
  .sys-bottom { flex-direction: column; gap: 8px; }
  .sys-col-agents { flex: none; }

  /* AVATAR */
  .avatar-wrap { min-width: unset; padding: 12px 8px; }

  .avatar-rings { width: 180px; height: 180px; }
  .ring-3 { width: 180px; height: 180px; }
  .ring-2 { width: 145px; height: 145px; }
  .ring-1 { width: 110px; height: 110px; }
  .avatar-core { width: 70px; height: 70px; }
  .avatar-arc { width: 60px; height: 60px; }
  .arc-inner { inset: -10px; }

  .orb-id-line { font-size: 7px; letter-spacing: 0.1em; }

  /* TERMINAL */
  .terminal-container { flex: none; }
  .terminal-output { max-height: 200px; min-height: 80px; }

  /* INPUT BAR: fixo na base */
  .input-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 10px 12px;
    background: rgba(2, 5, 6, 0.97);
    border-top: 1px solid var(--border-bright);
  }

  .btn-mic, .btn-attach {
    padding: 10px 12px;
    font-size: 16px;
    min-width: 44px;
    min-height: 44px;
  }

  .btn-send {
    padding: 10px 14px;
    font-size: 11px;
    min-height: 44px;
  }

  .input-text {
    padding: 10px 10px;
    font-size: 14px;
    min-height: 44px;
  }

  /* Espaço para não esconder conteúdo sob a input-bar fixa */
  .view.active { padding-bottom: 72px; }

  /* CONFIG VIEW */
  .view-config-content { padding: 12px; max-width: 100%; }
  .config-label { min-width: 90px; font-size: 11px; }
  .config-row { flex-wrap: wrap; gap: 8px; }

  /* ARQUIVO VIEW */
  .view-content { padding: 12px; }
  .file-actions { flex-wrap: wrap; }
  .file-name { font-size: 11px; }
}

