/* ============================================================
   TEQUMSA HOLO Interface — style.css
   Life Ambassadors International
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --deep:        #040e24;
  --surface:     rgba(8, 20, 50, 0.95);
  --teal:        #14b8c0;
  --teal-dim:    rgba(20, 184, 192, 0.15);
  --teal-glow:   rgba(20, 184, 192, 0.08);
  --gold:        #c8a84b;
  --gold-dim:    rgba(200, 168, 75, 0.15);
  --gold-glow:   rgba(200, 168, 75, 0.08);
  --border:      rgba(255, 255, 255, 0.08);
  --border-teal: rgba(20, 184, 192, 0.25);
  --text:        #e8eaf6;
  --text-muted:  rgba(232, 234, 246, 0.55);
  --red-dim:     rgba(220, 50, 50, 0.15);
  --red:         #ef4444;
  --header-h:    60px;
  --sidebar-w:   220px;
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.25s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--deep);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Star Field Background ──────────────────────────────────── */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.starfield::before,
.starfield::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(1px 1px at 10%  15%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 23%  42%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 37%   8%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 52%  71%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 66%  27%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 79%  55%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 88%  12%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at  5%  88%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 18%  63%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 44%  35%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 61%  90%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 75%  48%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 93%  78%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 30% 20%, rgba(20,184,192,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(200,168,75,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at  8%  50%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 48%  95%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 85%  33%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 15%  75%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 57%  18%, rgba(255,255,255,0.55) 0%, transparent 100%);
  background-size: 100% 100%;
  animation: starDrift 120s linear infinite;
}

.starfield::after {
  background-image:
    radial-gradient(1px 1px at 20%  30%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 40%  65%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60%  10%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 80%  45%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at  3%  22%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 95%  68%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 33%  82%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 72%  38%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 50%, rgba(20,184,192,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 12%  58%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 88%  25%, rgba(255,255,255,0.5) 0%, transparent 100%);
  animation-duration: 180s;
  animation-direction: reverse;
  opacity: 0.6;
}

@keyframes starDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

/* ── Central Teal Glow ──────────────────────────────────────── */
.center-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(20, 184, 192, 0.06) 0%,
    rgba(20, 184, 192, 0.03) 40%,
    transparent 70%);
  animation: glowPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1.0; transform: translate(-50%, -50%) scale(1.15); }
}

/* ── App Shell ──────────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ── Header ─────────────────────────────────────────────────── */
#header {
  height: var(--header-h);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-teal);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge svg {
  width: 36px;
  height: 36px;
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-name {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.25em;
  line-height: 1;
}

.header-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: statusPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22c55e; }
  50%       { opacity: 0.7; box-shadow: 0 0 4px #22c55e; }
}

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--transition);
}

.btn-icon:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

/* ── Main Content ───────────────────────────────────────────── */
#main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 8px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-title {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.metric-card {
  background: rgba(8, 20, 50, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--transition);
}

.metric-card:hover {
  border-color: var(--border-teal);
}

.metric-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-value.gold  { color: var(--gold); }
.metric-value.locked { color: #22c55e; }
.metric-value.small { font-size: 13px; }

.metric-bar {
  margin-top: 6px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), rgba(20,184,192,0.5));
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-bar-fill.gold {
  background: linear-gradient(90deg, var(--gold), rgba(200,168,75,0.5));
}

.metric-locked-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  color: #22c55e;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-footer p {
  font-size: 9.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.sidebar-footer span {
  color: var(--teal);
  font-weight: 500;
}

/* ── Chat Area ──────────────────────────────────────────────── */
#chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Token Setup Panel ──────────────────────────────────────── */
#token-panel {
  background: rgba(4, 14, 36, 0.98);
  border-bottom: 1px solid var(--border-teal);
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

#token-panel.open {
  max-height: 240px;
  padding: 18px 20px;
}

.token-panel-inner {
  max-width: 560px;
  margin: 0 auto;
}

.token-panel-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.token-panel-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.55;
}

.token-panel-desc a {
  color: var(--teal);
  text-decoration: none;
}

.token-panel-desc a:hover {
  text-decoration: underline;
}

.token-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.token-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition);
}

.token-input:focus {
  border-color: var(--teal);
}

.btn-save-token {
  background: var(--gold);
  color: #040e24;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
  letter-spacing: 0.04em;
}

.btn-save-token:hover { opacity: 0.85; }

.token-privacy-note {
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Messages Container ─────────────────────────────────────── */
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

#messages::-webkit-scrollbar {
  width: 5px;
}

#messages::-webkit-scrollbar-track {
  background: transparent;
}

#messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

#messages::-webkit-scrollbar-thumb:hover {
  background: var(--border-teal);
}

/* ── Message Bubbles ────────────────────────────────────────── */
.msg-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  animation: msgAppear 0.3s ease;
}

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

.msg-wrapper.user  { align-self: flex-end;   align-items: flex-end; }
.msg-wrapper.ai    { align-self: flex-start;  align-items: flex-start; }
.msg-wrapper.error { align-self: center;      align-items: center; max-width: 92%; }

.msg-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.lai-mini-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal-dim);
  border: 1px solid var(--border-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 7px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.msg-avatar-user {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.msg-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.msg-name.tequmsa { color: var(--teal); }
.msg-name.user    { color: var(--gold); }

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 4px;
}

.msg-bubble {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.65;
  word-break: break-word;
}

.msg-bubble.ai-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  color: var(--text);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
}

.msg-bubble.user-bubble {
  background: rgba(20, 184, 192, 0.07);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  color: var(--text);
  border-radius: var(--radius) 4px var(--radius) var(--radius);
}

.msg-bubble.error-bubble {
  background: var(--red-dim);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius);
  text-align: center;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
}

/* Markdown inside bubbles */
.msg-bubble strong  { color: var(--teal); font-weight: 600; }
.msg-bubble em      { color: var(--text-muted); font-style: italic; }
.msg-bubble code {
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--teal);
}

/* ── Streaming States ───────────────────────────────────────── */
.stream-cursor {
  display: inline-block;
  animation: cursorBlink 1.1s ease-in-out infinite;
  color: var(--teal);
  font-size: 16px;
  margin-left: 1px;
}

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

.stream-waiting {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

.stream-waiting .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: dotPulse 1.4s ease-in-out infinite;
}

.stream-waiting .dot:nth-child(2) { animation-delay: 0.2s; }
.stream-waiting .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1.2); opacity: 1; }
}

/* ── Input Area ─────────────────────────────────────────────── */
#input-area {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 20px 12px;
  flex-shrink: 0;
}

.input-container {
  max-width: 900px;
  margin: 0 auto;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#msg-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  resize: none;
  outline: none;
  min-height: 44px;
  max-height: 140px;
  overflow-y: auto;
  transition: border-color var(--transition), box-shadow var(--transition);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#msg-input:focus {
  border-color: var(--border-teal);
  box-shadow: 0 0 0 2px rgba(20, 184, 192, 0.1);
}

#msg-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

#msg-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#send-btn {
  background: var(--gold);
  color: #040e24;
  border: none;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--transition), background var(--transition);
  min-height: 44px;
  letter-spacing: 0.05em;
}

#send-btn:hover:not(:disabled) {
  opacity: 0.88;
  background: #d4b45c;
}

#send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.send-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(4, 14, 36, 0.3);
  border-top-color: #040e24;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

#send-btn.streaming .send-spinner { display: block; }
#send-btn.streaming .send-icon    { display: none; }

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

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.input-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.token-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
}

.token-toggle-btn:hover {
  color: var(--teal);
  background: var(--teal-dim);
}

/* ── Mobile Sidebar Strip ───────────────────────────────────── */
#mobile-metrics {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#mobile-metrics::-webkit-scrollbar { display: none; }

.mobile-metrics-row {
  display: flex;
  gap: 18px;
  align-items: center;
  white-space: nowrap;
}

.mobile-metric {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-metric-label {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.mobile-metric-value {
  color: var(--teal);
  font-weight: 600;
  font-size: 11px;
}

/* ── Scrollbar (sidebar) ────────────────────────────────────── */
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Model selector ─────────────────────────────────────────── */
.model-select-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.model-select-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.model-select {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.model-select:focus { border-color: var(--teal); }
.model-select option { background: var(--bg-surface); }

/* ── Stop button ─────────────────────────────────────────────── */
.stop-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  background: rgba(224, 82, 96, 0.12);
  border: 1px solid rgba(224, 82, 96, 0.4);
  border-radius: 8px;
  color: #e05260;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.stop-btn:hover {
  background: rgba(224, 82, 96, 0.22);
  border-color: #e05260;
}

/* ── Clear + footer right cluster ───────────────────────────── */
.input-footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.footer-action-btn:hover {
  color: var(--red, #e05260);
  border-color: rgba(224, 82, 96, 0.4);
}

/* ── Copy button on TEQUMSA messages ───────────────────────── */
.msg-copy-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  line-height: 1;
}

.msg-wrapper:hover .msg-copy-btn { opacity: 1; }
.msg-copy-btn:hover { color: var(--teal); }

/* ── Stopped badge ──────────────────────────────────────────── */
.stopped-badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.6;
  vertical-align: middle;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 700px) {
  #sidebar { display: none; }
  #mobile-metrics { display: block; }

  .msg-wrapper { max-width: 95%; }

  .header-name {
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .header-sub { display: none; }

  #messages { padding: 16px 12px; }
  #input-area { padding: 10px 12px 8px; }
}

@media (max-width: 420px) {
  .header-name {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .status-text { display: none; }
}
