:root {
  --bg-deep: #020810;
  --panel-bg: rgba(4, 18, 32, 0.62);
  --panel-border: rgba(0, 240, 255, 0.28);
  --cyan: #00f0ff;
  --cyan-dim: rgba(0, 240, 255, 0.14);
  --cyan-glow: 0 0 14px rgba(0, 240, 255, 0.55);
  --gold: #ffb800;
  --gold-dim: rgba(255, 184, 0, 0.16);
  --red: #ff3358;
  --green: #00ffa2;
  --text-main: #d8f8ff;
  --text-muted: rgba(155, 225, 245, 0.65);
  --font-display: 'Orbitron', 'Segoe UI', sans-serif;
  --font-ui: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 48%, #071f33 0%, #030c17 55%, #01050a 100%);
  color: var(--text-main);
  font-family: var(--font-ui);
  user-select: none;
}

/* 3D Hologram Canvas */
#hologram-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.holo-scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 240, 255, 0.025) 0px,
    rgba(0, 240, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
}

.holo-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 48%, rgba(1, 5, 12, 0.72) 100%);
}

/* HUD Shell */
.hud-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 62px 1fr 30px;
  width: 100vw;
  height: 100vh;
  padding: 10px 14px 8px;
  gap: 10px;
}

/* HEADER */
.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-top: 2px solid var(--cyan);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 24px rgba(0, 240, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.45);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.arc-badge {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.arc-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  border-top-color: transparent;
  box-shadow: var(--cyan-glow);
  animation: spin 4s linear infinite;
}

.arc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 24px var(--cyan);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}

.mark-tag {
  font-size: 0.65rem;
  color: var(--gold);
  border: 1px solid rgba(255, 184, 0, 0.5);
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 1.5px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 1.8px;
  color: var(--text-muted);
}

.header-center {
  text-align: center;
}

.clock-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock-time {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cyan);
  text-shadow: var(--cyan-glow);
}

.clock-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 240, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 1px;
}

.status-pill.online {
  border-color: rgba(0, 255, 162, 0.55);
  color: var(--green);
}

.status-pill.online .pill-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-pill.offline {
  border-color: rgba(255, 184, 0, 0.55);
  color: var(--gold);
}

.status-pill.offline .pill-dot {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.status-pill.alert {
  border-color: rgba(255, 51, 88, 0.7);
  background: rgba(255, 51, 88, 0.16);
  color: var(--red);
  cursor: pointer;
}

.status-pill.alert .pill-dot {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: pulse 1s infinite;
}

.hidden {
  display: none !important;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.hud-icon-btn {
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid rgba(0, 240, 255, 0.32);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.8px;
}

.hud-icon-btn:hover {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--cyan);
  box-shadow: var(--cyan-glow);
}

.hud-icon-btn.active {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.35);
}

.hud-icon-btn.wake-active {
  background: rgba(255, 184, 0, 0.2);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.45);
}

/* MAIN 3-COLUMN GRID */
.hud-main {
  display: grid;
  grid-template-columns: 295px 1fr 370px;
  gap: 12px;
  min-height: 0;
}

.hud-panel {
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 28px rgba(0, 240, 255, 0.06);
  padding: 12px;
  min-height: 0;
  position: relative;
}

.hud-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--cyan);
  box-shadow: var(--cyan-glow);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.panel-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 6px;
  border: 1px solid rgba(255, 184, 0, 0.35);
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 2px;
  color: var(--cyan);
  flex: 1;
}

.tiny-btn {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 7px;
  cursor: pointer;
}

.tiny-btn:hover {
  background: rgba(0, 240, 255, 0.2);
}

/* LEFT TELEMETRY */
.left-panel {
  overflow-y: auto;
  gap: 10px;
}

.telemetry-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.metric-card {
  background: rgba(0, 20, 38, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.18);
  padding: 9px 10px;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan);
}

.progress-track {
  width: 100%;
  height: 5px;
  background: rgba(0, 240, 255, 0.12);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #009dff, var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
  transition: width 0.5s ease;
}

#cpu-sparkline {
  width: 100%;
  height: 34px;
  display: block;
  margin-bottom: 4px;
}

.metric-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-card {
  background: rgba(0, 20, 38, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.18);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-value {
  font-family: var(--font-display);
  font-size: 0.84rem;
  color: #fff;
}

.host-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 4px 2px;
}

.host-meta strong {
  color: var(--cyan);
}

.panel-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 1.5px;
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 240, 255, 0.16);
  padding-bottom: 4px;
  margin-top: 2px;
}

.blink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.proc-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 6px;
  background: rgba(0, 240, 255, 0.05);
  border-left: 2px solid rgba(0, 240, 255, 0.4);
}

.proc-row span:last-child {
  color: var(--gold);
}

.quick-deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.deck-btn {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.28);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  padding: 7px 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.18s ease;
}

.deck-btn:hover {
  background: rgba(0, 240, 255, 0.24);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: var(--cyan-glow);
  transform: translateY(-1px);
}

.highlight-btn {
  border-color: rgba(255, 184, 0, 0.65);
  color: var(--gold);
  background: rgba(255, 184, 0, 0.12);
}

.highlight-btn:hover {
  border-color: var(--gold);
  background: rgba(255, 184, 0, 0.28);
  box-shadow: 0 0 14px rgba(255, 184, 0, 0.55);
}

.msg-screenshot {
  margin-top: 8px;
  width: 100%;
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 2px;
  display: block;
}

.settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.field input[type="range"] {
  accent-color: var(--cyan);
  cursor: pointer;
}

/* CENTER STAGE */
.center-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  pointer-events: none;
}

.reticle-frame {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
}

.reticle-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(0, 240, 255, 0.55);
  border-style: solid;
}

.reticle-corner.tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.reticle-corner.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.reticle-corner.bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.reticle-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.core-status-top {
  text-align: center;
}

.state-chip {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  padding: 5px 16px;
  background: rgba(2, 16, 28, 0.72);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  box-shadow: var(--cyan-glow);
  transition: all 0.3s ease;
}

.state-chip.listening {
  border-color: #66fbff;
  color: #fff;
  background: rgba(0, 240, 255, 0.22);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.85);
}

.state-chip.thinking {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 184, 0, 0.14);
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.65);
}

.state-chip.speaking {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 162, 0.12);
  box-shadow: 0 0 20px rgba(0, 255, 162, 0.6);
}

.state-chip.alert {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255, 51, 88, 0.15);
  box-shadow: 0 0 18px rgba(255, 51, 88, 0.65);
}

.core-hit-area {
  pointer-events: auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 240, 255, 0.16);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.core-hit-area:hover {
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.center-bottom-hud {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#audio-visualizer {
  width: 100%;
  max-width: 420px;
  height: 54px;
}

.live-transcript {
  width: 100%;
  text-align: center;
  font-size: 0.96rem;
  font-weight: 500;
  color: #e4fbff;
  background: rgba(2, 16, 28, 0.72);
  border: 1px solid rgba(0, 240, 255, 0.26);
  padding: 8px 14px;
  min-height: 38px;
  line-height: 1.35;
  backdrop-filter: blur(8px);
}

/* RIGHT PANEL: CHAT */
.right-panel {
  gap: 10px;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  user-select: text;
}

.msg-card {
  padding: 9px 11px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(0, 22, 40, 0.6);
  font-size: 0.94rem;
  line-height: 1.45;
  animation: fadeSlide 0.22s ease;
}

.msg-card.user {
  border-left: 3px solid var(--gold);
  background: rgba(40, 28, 6, 0.45);
  align-self: flex-end;
  max-width: 92%;
}

.msg-card.assistant {
  border-left: 3px solid var(--cyan);
  align-self: flex-start;
  max-width: 96%;
}

.msg-card.system {
  border-left: 3px solid var(--green);
  background: rgba(0, 38, 28, 0.45);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.msg-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.msg-card.user .msg-meta strong { color: var(--gold); }
.msg-card.assistant .msg-meta strong { color: var(--cyan); }

.msg-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.action-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 2px 7px;
  background: rgba(0, 255, 162, 0.12);
  border: 1px solid rgba(0, 255, 162, 0.42);
  color: var(--green);
}

.command-bar {
  display: flex;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0, 240, 255, 0.2);
}

.mic-btn, .send-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--cyan);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mic-btn:hover, .send-btn:hover {
  background: rgba(0, 240, 255, 0.26);
  box-shadow: var(--cyan-glow);
}

.mic-btn.recording {
  background: rgba(255, 51, 88, 0.25);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 51, 88, 0.75);
  animation: pulse 1s infinite;
}

#chat-input {
  flex: 1;
  background: rgba(0, 14, 28, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.32);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  padding: 0 11px;
  outline: none;
}

#chat-input:focus {
  border-color: var(--cyan);
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2);
}

/* FOOTER */
.hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(2, 12, 24, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.18);
}

.footer-left {
  display: flex;
  gap: 18px;
}

.footer-left strong, #last-action-log {
  color: var(--cyan);
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(1, 6, 14, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: min(500px, 92vw);
  background: #041322;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 36px rgba(0, 240, 255, 0.28);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 240, 255, 0.24);
  padding-bottom: 10px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--cyan);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
}

.field input[type="password"],
.field input[type="text"],
.field select,
.field textarea {
  background: rgba(0, 10, 22, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #fff;
  padding: 9px 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
  resize: vertical;
}

.field textarea:focus,
.field input[type="text"]:focus,
.field input[type="password"]:focus,
.field select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.22);
}

/* CONTACT MODAL (ZALO / TELEGRAM) */
.contact-btn {
  border-color: rgba(0, 255, 162, 0.55) !important;
  color: #00ffa2 !important;
}

.contact-btn:hover {
  background: rgba(0, 255, 162, 0.18) !important;
  box-shadow: 0 0 14px rgba(0, 255, 162, 0.35);
}

.contact-card {
  width: min(520px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
}

.contact-quick-bar {
  padding: 8px 11px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.28);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-main);
}

.contact-quick-bar strong {
  color: var(--gold);
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.zalo-btn {
  background: rgba(0, 104, 255, 0.26);
  border-color: #3b9cff;
  box-shadow: 0 0 14px rgba(0, 128, 255, 0.32);
  padding: 10px 12px;
  font-size: 0.72rem;
}

.zalo-btn:hover {
  background: rgba(0, 104, 255, 0.45);
}

.tele-btn {
  background: rgba(34, 158, 217, 0.26);
  border-color: #29b6f6;
  box-shadow: 0 0 14px rgba(41, 182, 246, 0.32);
  padding: 10px 12px;
  font-size: 0.72rem;
}

.tele-btn:hover {
  background: rgba(34, 158, 217, 0.45);
}

.contact-status {
  min-height: 18px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--green);
  line-height: 1.4;
}

.contact-status.error {
  color: var(--red);
}

.contact-admin-cfg {
  margin-top: 4px;
  border-top: 1px dashed rgba(0, 240, 255, 0.25);
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.contact-admin-cfg summary {
  cursor: pointer;
  user-select: none;
  color: var(--cyan);
}

.contact-admin-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.field small {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
}

.field small a {
  color: var(--gold);
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

.primary-btn {
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid var(--cyan);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 2px;
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: var(--cyan-glow);
}

.primary-btn:hover {
  background: rgba(0, 240, 255, 0.38);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 240, 255, 0.04);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.35);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

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

@media (max-width: 1120px) {
  .hud-main {
    grid-template-columns: 250px 1fr 310px;
  }
}

@media (max-width: 860px) {
  .hud-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .left-panel {
    display: none;
  }
}

/* ==========================================================================
   3D HUD APPEARANCE MODES: LIGHT (SÁNG) & LIQUID GLASS (KÍNH LỎNG)
   ========================================================================== */
body.ui-light {
  --bg-deep: #eef4fc;
  --panel-bg: rgba(246, 250, 255, 0.82);
  --panel-border: rgba(0, 122, 204, 0.28);
  --cyan: #0077cc;
  --cyan-glow: 0 0 12px rgba(0, 119, 204, 0.35);
  --text-main: #0f1d32;
  --text-muted: rgba(25, 52, 86, 0.72);
  background: radial-gradient(circle at 50% 48%, #ffffff 0%, #dfeaf8 60%, #c8dcf2 100%);
}

body.ui-light .holo-scanlines,
body.ui-light .holo-vignette {
  opacity: 0.12;
}

body.ui-light .brand-title,
body.ui-light .mini-value,
body.ui-light .live-transcript {
  color: #0e1c30;
  text-shadow: none;
}

body.ui-light .metric-card,
body.ui-light .mini-card,
body.ui-light .msg-card,
body.ui-light .live-transcript,
body.ui-light .hud-footer,
body.ui-light #chat-input,
body.ui-light .modal-card {
  background: rgba(255, 255, 255, 0.82);
  color: #0f1d32;
  border-color: rgba(0, 119, 204, 0.24);
}

body.ui-light .field input[type="password"],
body.ui-light .field input[type="text"],
body.ui-light .field select,
body.ui-light .field textarea {
  background: #ffffff;
  color: #0f1d32;
  border-color: rgba(0, 119, 204, 0.32);
}

body.ui-light .contact-btn {
  color: #007a52 !important;
  border-color: rgba(0, 140, 92, 0.45) !important;
}

body.ui-light .zalo-btn,
body.ui-light .tele-btn {
  color: #ffffff;
}

body.ui-light .hud-icon-btn,
body.ui-light .deck-btn,
body.ui-light .primary-btn {
  color: #0f1d32;
  background: rgba(0, 119, 204, 0.09);
}

/* LIQUID GLASS (KÍNH LỎNG TRONG SUỐT) */
body.ui-liquid {
  --panel-bg: rgba(16, 34, 58, 0.24);
  --panel-border: rgba(255, 255, 255, 0.38);
  background: radial-gradient(circle at 30% 25%, rgba(28, 72, 120, 0.55) 0%, rgba(8, 22, 42, 0.78) 55%, rgba(3, 10, 22, 0.88) 100%);
}

body.ui-liquid .hud-header,
body.ui-liquid .hud-panel,
body.ui-liquid .hud-footer,
body.ui-liquid .live-transcript,
body.ui-liquid .modal-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(95, 205, 255, 0.08) 40%,
    rgba(12, 26, 48, 0.34) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.32),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 14px rgba(0, 240, 255, 0.14);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border-radius: 14px;
}

body.ui-liquid .hud-header {
  clip-path: none;
}

body.ui-liquid .metric-card,
body.ui-liquid .mini-card,
body.ui-liquid .msg-card,
body.ui-liquid .deck-btn,
body.ui-liquid .hud-icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  border-radius: 10px;
}
