/* ============================================================================
   ALI VISION — UNIFORM COMMAND CENTER DESIGN SYSTEM (core/ali-core.css v4)
   Marries Tunnel Hill's crisp light-glass Montserrat UI with the deep-navy
   Command Center login backdrop. 100% Site-Agnostic & Full-Screen.
   ============================================================================ */
:root {
  --ali-navy: #004b87;
  --ali-navy-deep: #003865;
  --ali-emerald: #00a859;
  --ali-emerald-dark: #008f4c;
  --ali-slate-950: #0b1120;
  --ali-slate-900: #0f172a;
  --ali-slate-800: #1e293b;
  --ali-slate-700: #334155;
  --ali-slate-500: #64748b;
  --ali-slate-300: #cbd5e1;
  --ali-slate-200: #e2e8f0;
  --ali-slate-100: #f1f5f9;
  --ali-bg: #f8fafc;
  --ali-card: #ffffff;
  --ali-danger: #dc2626;
  --ali-warn: #d97706;
  --ali-info: #0284c7;
  --ali-radius: 14px;
  --ali-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  --ali-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.22);
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  background: var(--ali-bg);
  color: var(--ali-slate-900);
  -webkit-font-smoothing: antialiased;
}

/* ---------- MARRIED LOGIN OVERLAY (DEEP-NAVY RADIAL + TUNNEL HILL GLASS CARD) ---------- */
.ali-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 22% 18%, #004b87 0%, #0b1120 74%);
  padding: 20px;
}
.ali-auth-overlay.hidden { display: none; }

.ali-auth-card {
  width: 100%;
  max-width: 370px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  padding: 34px 28px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ali-auth-logo {
  width: 86px;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 10px rgba(0, 75, 135, 0.14));
}
.ali-auth-badge {
  color: var(--ali-navy);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1.15px;
  text-transform: uppercase;
  background: #e8f0fe;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.ali-auth-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ali-slate-500);
  margin: -10px 0 16px;
}
.ali-auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ali-input, .ali-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ali-slate-300);
  border-radius: 12px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ali-slate-900);
  background: #f8fafc;
  outline: none;
  transition: all 0.18s ease;
}
.ali-input:focus, .ali-select:focus {
  background: #ffffff;
  border-color: var(--ali-navy);
  box-shadow: 0 0 0 3.5px rgba(0, 75, 135, 0.12);
}
.ali-auth-error {
  display: none;
  width: 100%;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--ali-danger);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  text-align: center;
}

/* ---------- BUTTONS (TUNNEL HILL CRISP PILL STYLE) ---------- */
.ali-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ali-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ali-btn-primary {
  background: linear-gradient(135deg, var(--ali-navy) 0%, var(--ali-navy-deep) 100%);
  color: #fff;
}
.ali-btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.ali-btn-emerald {
  background: linear-gradient(135deg, var(--ali-emerald) 0%, var(--ali-emerald-dark) 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 168, 89, 0.25);
}
.ali-btn-emerald:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.ali-btn-outline {
  background: #f8fafc;
  color: var(--ali-navy);
  border-color: var(--ali-slate-300);
}
.ali-btn-outline:hover:not(:disabled) {
  background: var(--ali-navy);
  color: #ffffff;
  border-color: var(--ali-navy);
}
.ali-btn-sm { padding: 6px 11px; font-size: 0.66rem; border-radius: 12px; text-transform: uppercase; }
.ali-btn-xs { padding: 4px 8px; font-size: 0.62rem; border-radius: 8px; text-transform: uppercase; }

/* ---------- FULL-SCREEN LIGHT-GLASS SHELL & FLOATING HEADER ---------- */
.ali-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  padding: 8px 12px;
  gap: 8px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #f8fafc 75%);
}
.ali-topbar {
  min-height: 50px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--ali-slate-200);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  color: var(--ali-slate-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  gap: 10px;
  flex-shrink: 0;
  z-index: 40;
}
.ali-topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ali-header-logo { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.ali-topbar-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ali-navy);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.ali-topbar-sub { font-size: 0.68rem; font-weight: 600; color: var(--ali-slate-500); white-space: nowrap; }
.ali-topbar-right { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }

.ali-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}
.ali-pill-user { background: #e8f0fe; color: var(--ali-navy); border: 1px solid #b6d4fe; }
.ali-pill-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ali-pill-slate { background: #f1f5f9; color: var(--ali-slate-700); border: 1px solid var(--ali-slate-200); }
.ali-pill-emerald { background: #ecfdf5; color: #047857; border: 1px solid #6ee7b7; }

.ali-site-switcher {
  font-family: var(--font-sans);
  background: #f8fafc;
  color: var(--ali-navy);
  border: 1px solid var(--ali-slate-300);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- WORKSPACE SPLIT (MAIN + COLLAPSIBLE ASK ALI) ---------- */
.ali-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 10px;
  overflow: hidden;
}
.ali-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 2px 4px 20px;
}

/* ---------- TUNNEL HILL TOP-ACCENT KPI RIBBON ---------- */
.ali-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ali-kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--ali-slate-200);
  border-top: 3px solid var(--ali-navy);
  border-radius: 12px;
  padding: 10px 13px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.ali-kpi-card.danger { border-top-color: var(--ali-danger); }
.ali-kpi-card.warn { border-top-color: var(--ali-warn); }
.ali-kpi-card.emerald { border-top-color: var(--ali-emerald); }
.ali-kpi-card.info { border-top-color: var(--ali-info); }
.ali-kpi-label {
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: var(--ali-slate-500);
}
.ali-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ali-slate-900);
  margin-top: 3px;
  line-height: 1.1;
}
.ali-kpi-sub { font-size: 0.66rem; font-weight: 600; color: var(--ali-slate-500); margin-top: 4px; }

/* ---------- TABS & CARDS ---------- */
.ali-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--ali-slate-200);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ali-tab-btn {
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ali-slate-500);
  cursor: pointer;
  transition: all 0.15s;
}
.ali-tab-btn:hover { color: var(--ali-navy); }
.ali-tab-btn.active { color: var(--ali-navy); border-bottom-color: var(--ali-emerald); }

.ali-card {
  background: var(--ali-card);
  border: 1px solid var(--ali-slate-200);
  border-radius: var(--ali-radius);
  box-shadow: var(--ali-shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ali-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ali-card-title { font-size: 0.8rem; font-weight: 800; color: var(--ali-navy); text-transform: uppercase; letter-spacing: 0.35px; margin: 0; }

/* ---------- BADGES ---------- */
.ali-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}
.ali-badge-critical { background: #fee2e2; color: #b91c1c; }
.ali-badge-high { background: #ffedd5; color: #c2410c; }
.ali-badge-medium { background: #fef9c3; color: #a16207; }
.ali-badge-info { background: #e8f0fe; color: var(--ali-navy); }
.ali-badge-ok { background: #dcfce7; color: #15803d; }
.ali-badge-edl { background: #e0e7ff; color: #3730a3; }
.ali-badge-ocwr { background: #f3e8ff; color: #6b21a8; }

/* ---------- TABLES ---------- */
.ali-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ali-slate-200);
  border-radius: 10px;
}
.ali-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}
.ali-table th {
  background: var(--ali-slate-900);
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.ali-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--ali-slate-200);
  color: var(--ali-slate-800);
  vertical-align: middle;
}
.ali-table tbody tr:nth-child(even) { background: #f8fafc; }
.ali-table tbody tr:hover { background: #eff6ff; }

/* ---------- TOGGLE SWITCH ---------- */
.ali-switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.ali-switch input { opacity: 0; width: 0; height: 0; }
.ali-slider { position: absolute; cursor: pointer; inset: 0; background: var(--ali-slate-300); border-radius: 999px; transition: 0.2s; }
.ali-slider::before { content: ""; position: absolute; height: 15px; width: 15px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.ali-switch input:checked + .ali-slider { background: var(--ali-emerald); }
.ali-switch input:checked + .ali-slider::before { transform: translateX(17px); }

/* ---------- VISION MAP CONTAINER ---------- */
.ali-map-box {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ali-slate-200);
  position: relative;
  background: #0f172a;
}
.ali-map-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.64rem;
  font-weight: 700;
  display: flex;
  gap: 10px;
  align-items: center;
  backdrop-filter: blur(6px);
}
.ali-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 4px; }

/* ---------- COLLAPSIBLE ASK ALI SIDEBAR (TUNNEL HILL GLASS RAIL) ---------- */
.ali-chat-panel {
  width: 420px;
  max-width: 100vw;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--ali-slate-200);
  border-radius: 16px;
  box-shadow: var(--ali-shadow);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
  overflow: hidden;
  z-index: 30;
}
.ali-chat-panel.collapsed { width: 0; border: none; opacity: 0; pointer-events: none; }
.ali-chat-header {
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--ali-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ali-chat-title { font-size: 0.76rem; font-weight: 800; color: var(--ali-navy); text-transform: uppercase; letter-spacing: 0.35px; display: flex; align-items: center; gap: 7px; }
.ali-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ali-msg {
  max-width: 95%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.78rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.ali-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--ali-navy) 0%, var(--ali-navy-deep) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ali-msg.agent {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--ali-slate-200);
  color: var(--ali-slate-900);
  border-bottom-left-radius: 4px;
}
.ali-msg h3, .ali-msg h4 { margin: 4px 0 6px; font-size: 0.82rem; color: var(--ali-navy); }
.ali-msg ul, .ali-msg ol { margin: 4px 0; padding-left: 18px; }
.ali-msg code { font-family: var(--font-mono); font-size: 0.72rem; background: #f1f5f9; color: var(--ali-navy); padding: 1px 5px; border-radius: 4px; }
.ali-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 12px 4px;
  border-top: 1px solid var(--ali-slate-100);
}
.ali-chip {
  font-family: var(--font-sans);
  background: #f8fafc;
  color: var(--ali-slate-700);
  border: 1px solid var(--ali-slate-200);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}
.ali-chip:hover { background: #e8f0fe; color: var(--ali-navy); border-color: #b6d4fe; }
.ali-chat-input-bar {
  padding: 8px 10px;
  border-top: 1px solid var(--ali-slate-200);
  display: flex;
  gap: 7px;
  background: #fff;
}
.ali-chat-input-bar input { flex: 1; padding: 9px 12px; border-radius: 20px; }

/* ---------- MODAL / DRAWER ---------- */
.ali-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.ali-modal-backdrop.hidden { display: none; }
.ali-modal {
  background: #fff;
  width: 100%;
  max-width: 820px;
  max-height: 84vh;
  border-radius: 16px;
  box-shadow: var(--ali-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ali-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ali-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ali-modal-body { padding: 16px 18px; overflow-y: auto; }

/* ---------- TOAST ---------- */
.ali-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ali-slate-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  z-index: 99999;
  box-shadow: var(--ali-shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ali-toast.show { opacity: 1; }

@media (max-width: 980px) {
  .ali-chat-panel { position: fixed; right: 8px; top: 66px; bottom: 8px; width: calc(100vw - 16px); }
  .ali-topbar-sub { display: none; }
}


/* ---------- UNIVERSAL LEFT SAVED CHATS SLIDE-OUT DRAWER (THR STANDARD) ---------- */
.ali-drawer-toggle-btn {
  background: #f8fafc;
  border: 1px solid var(--ali-slate-200);
  color: var(--ali-slate-700);
  border-radius: 9px;
  width: 32px;
  height: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.ali-drawer-toggle-btn:hover {
  background: #e8f0fe;
  color: var(--ali-navy);
  border-color: #b6d4fe;
}
.ali-header-logo {
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.25s ease;
}
.ali-header-logo.veronica-active {
  box-shadow: 0 0 0 2px #00a859, 0 0 12px rgba(0, 168, 89, 0.6);
}
.ali-topbar.veronica-header-active {
  border-color: rgba(0, 168, 89, 0.55);
  box-shadow: 0 4px 18px rgba(0, 168, 89, 0.12);
}

.ali-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 8000;
}
.ali-drawer-backdrop.open { display: block; }

.ali-saved-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100dvh;
  background: #ffffff;
  border-right: 1px solid var(--ali-slate-200);
  z-index: 8500;
  display: flex;
  flex-direction: column;
  transition: left 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  padding: 14px;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.12);
}
.ali-saved-drawer.open { left: 0; }

.ali-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ali-slate-200);
  margin-bottom: 10px;
}
.ali-drawer-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ali-slate-900);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ali-drawer-close {
  background: none;
  border: none;
  color: var(--ali-slate-500);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.ali-saved-list {
  flex: 1 1 0%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ali-saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--ali-slate-200);
  cursor: pointer;
  gap: 6px;
  transition: all 0.15s;
}
.ali-saved-item:hover { background: #f1f5f9; border-color: var(--ali-slate-300); }
.ali-saved-item.active-thread { background: #e8f0fe; border-left: 3.5px solid var(--ali-navy); }
.ali-saved-info { display: flex; flex-direction: column; overflow: hidden; flex: 1; }
.ali-saved-name { font-size: 0.74rem; font-weight: 700; color: var(--ali-slate-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ali-saved-date { font-size: 0.62rem; color: var(--ali-slate-500); margin-top: 2px; }
.ali-saved-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ali-saved-icon-btn {
  background: none;
  border: none;
  color: var(--ali-slate-500);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 5px;
}
.ali-saved-icon-btn:hover { background: #dbeafe; color: var(--ali-navy); }
.ali-saved-icon-btn.del:hover { background: #fee2e2; color: var(--ali-danger); }

.ali-drawer-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ali-slate-200);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}
.ali-drawer-user-box {
  background: #f8fafc;
  border: 1px solid var(--ali-slate-200);
  border-radius: 10px;
  padding: 7px 10px;
}
.ali-drawer-user-lbl { font-size: 0.56rem; font-weight: 800; color: var(--ali-slate-500); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.ali-drawer-user-val { font-size: 0.74rem; font-weight: 800; color: var(--ali-navy); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- UNIVERSAL FLOATING PILL CHAT DOCK & FAST/THINKING SELECTOR ---------- */
.ali-chat-input-bar {
  display: flex;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  margin: 6px 10px 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ali-slate-300);
  border-radius: 26px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  align-items: center;
  position: relative;
}
.ali-chat-input-bar:focus-within {
  border-color: var(--ali-navy);
  box-shadow: 0 4px 18px rgba(0, 75, 135, 0.12);
}
.ali-chat-input-bar input {
  flex: 1 1 0%;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 6px 6px !important;
  font-size: 0.8rem;
}
.ali-mode-wrap { position: relative; flex-shrink: 0; }
.ali-mode-pill {
  font-family: var(--font-sans);
  background: #f1f5f9;
  border: 1px solid transparent;
  color: var(--ali-slate-700);
  border-radius: 18px;
  height: 32px;
  padding: 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ali-mode-pill.thinking-active { background: #e8f0fe; border-color: #b6d4fe; color: var(--ali-navy); }
.ali-mode-menu {
  display: none;
  position: absolute;
  bottom: 40px;
  right: 0;
  width: 215px;
  background: #ffffff;
  border: 1px solid var(--ali-slate-300);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.15);
  padding: 6px;
  z-index: 7500;
}
.ali-mode-menu.open { display: block; }
.ali-mode-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.ali-mode-opt:hover { background: #f1f5f9; }
.ali-mode-opt.selected { background: #e8f0fe; }
.ali-mode-opt-title { font-size: 0.74rem; font-weight: 800; color: var(--ali-slate-900); }
.ali-mode-opt-sub { font-size: 0.63rem; font-weight: 600; color: var(--ali-slate-500); }
.ali-mode-check { color: var(--ali-navy); font-weight: 800; visibility: hidden; }
.ali-mode-opt.selected .ali-mode-check { visibility: visible; }

.ali-msg-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: #94a3b8;
}
.ali-msg.user .ali-msg-hdr { color: rgba(255, 255, 255, 0.8); }
.ali-msg-copy-btn {
  font-family: var(--font-sans);
  background: transparent;
  border: 1px solid var(--ali-slate-200);
  color: var(--ali-slate-500);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.56rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}
.ali-msg.user .ali-msg-copy-btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.ali-drawer-intro-btn {
  font-family: var(--font-sans);
  background: #e8f0fe;
  color: var(--ali-navy);
  border: 1px solid #b6d4fe;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.67rem;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 100%;
  text-align: center;
  transition: all 0.15s ease;
}
.ali-drawer-intro-btn:hover {
  background: var(--ali-navy);
  color: #ffffff;
  border-color: var(--ali-navy);
}
