/* ── Aiden Design Tokens ─────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:      #0a0a0a;
  --bg1:     #0f0f0f;
  --bg2:     #161616;
  --bg3:     #1e1e1e;
  --bg4:     #262626;

  /* Borders */
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.10);
  --border3: rgba(255,255,255,0.14);

  /* Text */
  --text:    #f2f2f2;
  --text2:   #d6d6d6;
  --muted:   #484848;
  --muted2:  #6e6e6e;
  --muted3:  #9a9a9a;

  /* Accent */
  --orange:  #f97316;
  --orange2: rgba(249,115,22,0.10);
  --orange3: rgba(249,115,22,0.05);
  --green:   #22c55e;
  --red:     #ef4444;
  --blue:    #3b82f6;
  --purple:  #8b5cf6;

  /* Fonts */
  --mono:    var(--font-mono, 'JetBrains Mono', 'Menlo', monospace);
  --sans:    var(--font-sans, 'Inter', system-ui, sans-serif);

  /* Legacy compat */
  --odim:    rgba(249,115,22,0.08);

  /* Effects */
  --glass:        rgba(255,255,255,0.025);
  --shadow:       0 0 0 1px rgba(255,255,255,0.05), 0 8px 32px rgba(0,0,0,0.7);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.5);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.6);
  --glow-orange:  0 0 24px rgba(249,115,22,0.18);
  --glow-sm:      0 0 12px rgba(249,115,22,0.12);
}

/* ── Base reset ─────────────────────────────────────────────── */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

textarea { font-family: inherit; }
textarea:focus { outline: none; }
button:focus { outline: none; }
input { font-family: inherit; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

@keyframes thinkingPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1; }
}

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

@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(249,115,22,0); }
}

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

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

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

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

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

/* ── Copy button hover ──────────────────────────────────────── */
.copy-btn { opacity: 0 !important; transition: opacity 0.15s !important; }
.message-bubble:hover .copy-btn { opacity: 1 !important; }

/* ── Pill input focus glow ──────────────────────────────────── */
.input-pill {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-pill:focus-within {
  border-color: rgba(249,115,22,0.4) !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.08) !important;
}

/* ── Nav button hover ───────────────────────────────────────── */
.nav-btn:hover {
  background: rgba(255,255,255,0.06) !important;
  color: var(--text2) !important;
}

/* ── Provider card hover ────────────────────────────────────── */
.provider-card:hover {
  border-color: rgba(255,255,255,0.12) !important;
  background: rgba(255,255,255,0.03) !important;
}

/* ── Settings tab hover ─────────────────────────────────────── */
.settings-tab:hover {
  background: rgba(255,255,255,0.04) !important;
  color: var(--text2) !important;
}

/* ── Conversation item hover ────────────────────────────────── */
.conv-item:hover {
  background: rgba(255,255,255,0.05) !important;
  color: var(--text2) !important;
}

/* ── Suggestion chip hover ──────────────────────────────────── */
.suggestion-chip:hover {
  border-color: rgba(249,115,22,0.3) !important;
  background: rgba(249,115,22,0.06) !important;
  color: var(--text) !important;
}

/* ── Code block ─────────────────────────────────────────────── */
.code-block {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── Debug Panel ────────────────────────────────────────────── */
.debug-health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.debug-health-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
}
.debug-health-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.debug-health-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.debug-log-container {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px;
  max-height: 340px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.debug-log-row {
  display: grid;
  grid-template-columns: 60px 46px 90px 1fr;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1.5;
}
.debug-log-time   { color: var(--muted);  white-space: nowrap; }
.debug-log-level  { font-weight: 600;     white-space: nowrap; }
.debug-log-source { color: var(--orange); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.debug-log-msg    { color: var(--text2);  word-break: break-word; }

/* ── Gateway channel status ──────────────────────────────────── */
.gateway-channel-list { display: flex; flex-direction: column; gap: 6px; }
.channel-status       { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.status-dot           { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.active    { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.status-dot.inactive  { background: var(--text3, #666); }
.channel-name         { font-size: 13px; font-weight: 600; text-transform: capitalize; min-width: 90px; }
.channel-state        { font-size: 12px; color: var(--text2); }

/* ── Cross-channel session badge ─────────────────────────────── */
.cross-channel-badge  { font-size: 9px; flex-shrink: 0; opacity: 0.7; }

/* ── AgentShield security scan ───────────────────────────────── */
.security-scan        { display: flex; flex-direction: column; }

.risk-score {
  display: flex; align-items: center; gap: 8;
  padding: 12px 14px; border-radius: 8px; margin-bottom: 4px;
  font-family: var(--mono); border: 1px solid transparent;
}
.risk-low    { background: rgba(34,197,94,0.08);  border-color: rgba(34,197,94,0.2);  color: #22c55e; }
.risk-medium { background: rgba(234,179,8,0.08);  border-color: rgba(234,179,8,0.2);  color: #eab308; }
.risk-high   { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.2);  color: #ef4444; }

.finding {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 7px; padding: 10px 12px;
}
.finding-critical { border-left: 3px solid #ef4444; }
.finding-high     { border-left: 3px solid #f97316; }
.finding-medium   { border-left: 3px solid #eab308; }
.finding-low      { border-left: 3px solid #3b82f6; }
.finding-info     { border-left: 3px solid #6b7280; }

.finding-severity {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px; color: #fff; letter-spacing: 0.05em;
}
.finding-file { font-family: var(--mono); font-size: 11px; color: var(--orange); }
.finding-desc { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.finding-rec  { font-size: 11px; color: var(--muted3); font-style: italic; }

