:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: #0f172a;
  --surface-soft: #172033;
  --border: #273449;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-dark: #15803d;
  --danger: #fb7185;
  --radius: 16px;
  font-family: "Fira Sans", "Microsoft YaHei UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body.modal-open { overflow: hidden; }
body {
  background:
    radial-gradient(circle at 80% -20%, rgb(34 197 94 / 14%), transparent 36rem),
    linear-gradient(145deg, #020617, #07101f 55%, #020617);
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  box-shadow: 0 0 0 3px rgb(34 197 94 / 35%);
}

.shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(100%, 440px);
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgb(15 23 42 / 92%);
  box-shadow: 0 24px 80px rgb(0 0 0 / 32%);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: #052e16; }
.brand h1 { margin: 0; font-size: 19px; letter-spacing: .02em; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h2 { margin: 6px 0 8px; font-size: clamp(25px, 4vw, 34px); }
.muted { color: var(--muted); line-height: 1.55; }
.stack { display: grid; gap: 18px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #dbe5f1; font-size: 14px; font-weight: 600; }
input, textarea, select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #07101f;
  color: var(--text);
  padding: 11px 13px;
}
select { cursor: pointer; }
.button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--accent);
  color: #052e16;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.button:hover { background: #4ade80; transform: translateY(-1px); }
.button.secondary { border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); }
.error { min-height: 20px; color: var(--danger); font-size: 14px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.login-tools, .topbar-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.language-control { display: inline-flex; }
.language-control select {
  min-height: 44px;
  width: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 34px 0 11px;
  background: #07101f;
  color: var(--text);
  cursor: pointer;
}
.sound-toggle, .translation-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 11px;
  background: #07101f;
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.sound-toggle:hover, .translation-toggle:hover { color: var(--text); border-color: #475569; }
.sound-toggle.active, .translation-toggle.active { color: #bbf7d0; border-color: rgb(34 197 94 / 50%); background: rgb(34 197 94 / 10%); }
.sound-toggle.ringing svg { animation: sound-ring 420ms ease-out; }
@keyframes sound-ring { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.18); } 68% { transform: scale(.94); } }
.topbar-button { min-height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: #07101f; color: var(--text); cursor: pointer; }
.topbar-button:hover { border-color: #475569; }

.dashboard { min-height: 100vh; height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-columns: 310px 1fr; }
.sidebar { min-width: 0; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; border-right: 1px solid var(--border); background: rgb(7 16 31 / 94%); padding: 20px; }
.sidebar .brand { margin-bottom: 24px; flex: 0 0 auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; flex: 0 0 auto; }
.sidebar-head h2 { font-size: 15px; margin: 0; }
.count { min-width: 28px; padding: 4px 8px; border-radius: 999px; background: rgb(34 197 94 / 14%); color: #86efac; text-align: center; font-size: 12px; }
.conversation-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: #07101f; flex: 0 0 auto; }
.conversation-filter button { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; touch-action: manipulation; }
.conversation-filter button:hover { color: var(--text); background: rgb(148 163 184 / 9%); }
.conversation-filter button.active { background: rgb(34 197 94 / 14%); color: #bbf7d0; box-shadow: inset 0 0 0 1px rgb(34 197 94 / 28%); }
.conversation-search { width: 100%; min-height: 38px; margin: 0 0 10px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: #07101f; color: var(--text); flex: 0 0 auto; }
/* The list itself scrolls, so the brand / filters / search stay pinned while conversations grow. */
.conversation-list {
  width: 100%; min-width: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; padding-right: 2px;
  scrollbar-width: thin; scrollbar-color: rgb(148 163 184 / 40%) transparent;
}
.conversation-list::-webkit-scrollbar { width: 8px; }
.conversation-list::-webkit-scrollbar-track { background: transparent; }
.conversation-list::-webkit-scrollbar-thumb { border-radius: 999px; background: rgb(148 163 184 / 34%); }
.conversation-list::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184 / 56%); }
.conversation {
  position: relative; width: 100%; min-width: 0; max-width: 100%; min-height: 70px; overflow: hidden; border: 1px solid transparent; border-radius: 12px; padding: 12px;
  background: transparent; color: inherit; text-align: left; cursor: pointer;
}
.conversation:hover, .conversation.active { border-color: var(--border); background: var(--surface-soft); }
.conversation.waiting { border-left-color: #f59e0b; }
.conversation.waiting:hover, .conversation.waiting.active { border-color: rgb(245 158 11 / 48%); background: rgb(245 158 11 / 8%); }
.conversation:focus-visible { outline: 3px solid rgb(96 165 250 / 72%); outline-offset: 2px; }
.conversation strong, .conversation span { width: 100%; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.conversation .conversation-note { margin: 0 0 5px; color: #fde68a; font-size: 12px; font-weight: 700; }
.conversation .conversation-metadata { margin-top: 4px; color: #67e8f9; font-size: 11px; }
.conversation-unread { position: absolute; inset-inline-end: 12px; inset-block-start: 12px; width: auto !important; min-width: 22px; margin: 0 !important; padding: 3px 7px; border-radius: 999px; background: #ef4444; color: #fff !important; font-size: 11px !important; font-weight: 800; line-height: 1.2; text-align: center; }
.workspace { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; height: 100vh; height: 100dvh; overflow: hidden; }
/* Topbar layout: conversation identity on the left (two lines), actions stacked on the right in two rows:
   row 1 = primary actions for this conversation, row 2 = status / AI / sound / theme / language.
   This keeps the visitor name on one line instead of squeezing it into a narrow column. */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas: "copy primary" "secondary secondary";
  align-items: center;
  column-gap: 20px;
  row-gap: 6px;
  min-height: 76px;
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  background: rgb(15 23 42 / 68%);
}
.topbar-copy { grid-area: copy; min-width: 0; }
.topbar-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-copy .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The actions row grew (notes, transfer, internal chat, install, settings, staff, logout,
   translation, sound, theme, language); let it wrap instead of overlapping the messages. */
.topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.topbar-primary { grid-area: primary; justify-content: flex-end; }
.topbar-secondary { grid-area: secondary; justify-content: flex-end; }
.mobile-back-button { display: none; }
.presence { display: flex; align-items: center; gap: 8px; color: #bbf7d0; font-size: 13px; }
.presence::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(34 197 94 / 12%); }
.messages { overflow: auto; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.queue-preview-notice { position: sticky; top: 0; z-index: 10; align-self: center; max-width: 680px; border: 1px solid rgb(245 158 11 / 42%); border-radius: 999px; padding: 8px 14px; background: rgb(69 45 10 / 94%); color: #fde68a; font-size: 13px; text-align: center; box-shadow: 0 8px 24px rgb(0 0 0 / 20%); }
.composer.readonly { opacity: .72; }
.customer-note-dialog { width: min(560px, calc(100% - 32px)); max-height: min(82dvh, 720px); border: 1px solid var(--border); border-radius: 20px; padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 28px 90px rgb(0 0 0 / 48%); }
.customer-note-dialog::backdrop { background: rgb(2 6 23 / 68%); backdrop-filter: blur(3px); }
.customer-note-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--border); }
.customer-note-head h2 { margin: 2px 0 0; font-size: 20px; }
.customer-note-form { display: grid; gap: 16px; padding: 22px; }
.customer-note-form p { margin: 0; color: var(--muted); line-height: 1.55; }
.customer-note-form label { display: grid; gap: 8px; font-weight: 700; }
.customer-note-form textarea { width: 100%; min-height: 180px; resize: vertical; font-weight: 400; line-height: 1.55; }
.customer-note-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 640px) {
  .customer-note-dialog { width: 100%; max-width: none; max-height: min(88dvh, 760px); margin: auto 0 0; border-width: 1px 0 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .customer-note-form { padding: 18px 16px; }
  .customer-note-form textarea { min-height: 150px; }
}
.empty { margin: auto; max-width: 420px; text-align: center; color: var(--muted); }
.message { max-width: min(72%, 680px); padding: 11px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-soft); line-height: 1.5; overflow-wrap: anywhere; }
.message.agent { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--accent-dark); }
.message small, .message-time { display: block; margin-top: 5px; color: rgb(255 255 255 / 62%); font: 11px "Fira Code", monospace; }
.message-translation { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgb(148 163 184 / 24%); color: #dbeafe; font-size: 13px; line-height: 1.5; }
.message-translation.loading { color: var(--muted); }
.message-translation.error { color: #fecdd3; }
.message-translation .translation-label { margin: 0 0 3px; color: #86efac; font: 700 10px/1.3 "Fira Sans", "Microsoft YaHei UI", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.translation-retry { min-height: 32px; margin-top: 6px; border: 1px solid rgb(251 113 133 / 38%); border-radius: 8px; padding: 0 10px; background: transparent; color: #fecdd3; cursor: pointer; }
.translation-retry:hover { background: rgb(251 113 133 / 10%); }
.composer { position: relative; display: flex; flex-wrap: wrap; gap: 10px 12px; border-top: 1px solid var(--border); padding: 16px 24px 22px; background: rgb(15 23 42 / 76%); }
.quick-reply-picker { align-self: end; }
.quick-reply-picker select { width: 148px; min-height: 46px; }
.composer-input { flex: 1 1 240px; min-width: 0; }
.composer textarea { min-height: 50px; max-height: 150px; resize: vertical; }
.composer .button { align-self: end; }
.composer-tools { display: flex; align-items: end; gap: 8px; margin-left: auto; }
.emoji-picker { position: absolute; z-index: 8; left: 16px; bottom: calc(100% + 8px); width: min(292px, calc(100vw - 24px)); grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: #0b1424; box-shadow: 0 18px 50px rgb(0 0 0 / 42%); }
.emoji-picker:not(.hidden) { display: grid; }
.emoji-option { width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; font-size: 22px; cursor: pointer; }
.emoji-option:hover, .emoji-option:focus-visible { background: var(--surface-soft); }
.message.image-message { padding: 7px; }
.message-image-button { display: block; border: 0; border-radius: 11px; padding: 0; background: transparent; cursor: zoom-in; }
.message-image { display: block; width: auto; max-width: min(320px, 100%); max-height: 360px; border-radius: 11px; object-fit: contain; background: #020617; }
.image-viewer { width: min(96vw, 1500px); max-width: none; height: min(94dvh, 1000px); max-height: none; border: 1px solid var(--border); border-radius: 18px; padding: 0; overflow: hidden; background: #020617; color: var(--text); }
.image-viewer::backdrop { background: rgb(2 6 23 / 88%); backdrop-filter: blur(6px); }
.image-viewer-head { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px 8px 18px; border-bottom: 1px solid var(--border); background: #07101f; }
.image-viewer-stage { height: calc(100% - 60px); overflow: auto; display: grid; place-items: center; padding: 16px; overscroll-behavior: contain; touch-action: pinch-zoom; }
.image-viewer-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.image-viewer-stage img.actual-size { max-width: none; max-height: none; cursor: zoom-out; }
.composer-tool {
  width: 46px; min-width: 46px; height: 46px; align-self: end; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 12px; background: #07101f; color: var(--muted); cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.composer-tool:hover:not(:disabled) { color: var(--text); border-color: #475569; }
.composer-tool:disabled { cursor: not-allowed; opacity: .45; }
/* The image control is a <label> wrapping the hidden file input; mirror the disabled look. */
.composer-tool:has(input:disabled) { cursor: not-allowed; opacity: .45; }
.speech-button.active { color: #fecaca; border-color: rgb(248 113 113 / 65%); background: rgb(248 113 113 / 12%); }
.composer-status { min-height: 18px; padding: 3px 4px 0; color: var(--muted); font-size: 12px; }

.staff-panel { position: fixed; inset: 0; z-index: 20; overflow: auto; padding: 24px; background: rgb(2 6 23 / 86%); backdrop-filter: blur(8px); }
.staff-panel-card { width: min(1100px, 100%); min-height: calc(100vh - 48px); margin: 0 auto; padding: 28px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 24px 90px rgb(0 0 0 / 42%); }
.staff-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.staff-panel-head h2 { margin-bottom: 0; }
.feature-setting { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: rgb(34 197 94 / 7%); }
.feature-setting p { margin: 4px 0 0; }
.switch-control { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 9px; }
.switch-control input { width: 20px; min-height: 20px; accent-color: var(--accent); }
.staff-create-form { display: grid; grid-template-columns: 1fr 1fr 1fr 150px auto; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #07101f; }
.staff-create-form select, .staff-edit-form select { min-height: 46px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; background: #07101f; color: var(--text); }
.staff-feedback { min-height: 24px; margin: 12px 2px; color: #bbf7d0; }
.staff-feedback.error { color: var(--danger); }
.staff-list { display: grid; gap: 10px; }
.staff-edit-form { display: grid; grid-template-columns: 1fr 1fr 140px 130px 1fr auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.staff-edit-form label span { display: flex; align-items: center; gap: 6px; }
.self-badge { padding: 2px 7px; border-radius: 999px; background: rgb(34 197 94 / 14%); color: #86efac; font-size: 11px; }
.staff-presence { display: inline-flex !important; width: max-content; align-items: center; gap: 6px; margin-inline-start: 4px; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px !important; font-weight: 700; line-height: 1.45; }
.staff-presence::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.staff-presence.online { color: #86efac !important; }
.staff-presence.offline { color: #cbd5e1 !important; }
.compact-panel { width: min(520px, 100%); min-height: auto; margin-top: min(12vh, 100px); }
.compact-panel select { min-height: 46px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; background: #07101f; color: var(--text); }
.message.system-message { align-self: center; max-width: 90%; border: 1px dashed var(--border); border-radius: 999px; padding: 7px 13px; background: transparent; color: var(--muted); font-size: 13px; text-align: center; }
.staff-message-sender { display: block; margin-bottom: 3px; font-size: 12px; }
.internal-chat-card { height: calc(100vh - 48px); min-height: 560px; display: grid; grid-template-rows: auto 1fr; }
.internal-chat-layout { min-height: 0; display: grid; grid-template-columns: 250px 1fr; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.staff-peer-list { overflow: auto; padding: 12px; border-right: 1px solid var(--border); background: #07101f; }
.staff-peer { width: 100%; min-height: 58px; margin-bottom: 7px; padding: 10px 12px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.staff-peer:hover, .staff-peer.active { border-color: var(--border); background: var(--surface-soft); }
.staff-peer span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.staff-peer .staff-presence { margin: 7px 0 0; }
.conversation.offline-owner { border-color: rgb(245 158 11 / 42%); background: rgb(245 158 11 / 8%); }
.conversation.offline-owner::after { content: ""; position: absolute; inset-inline-end: 13px; inset-block-start: 13px; width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 4px rgb(251 191 36 / 12%); }
.offline-owner-notice { position: sticky; top: 0; z-index: 2; align-self: stretch; margin-bottom: 12px; padding: 10px 14px; border: 1px solid rgb(245 158 11 / 38%); border-radius: 12px; background: rgb(120 53 15 / 92%); color: #fef3c7; font-size: 13px; text-align: center; }
.internal-conversation { min-width: 0; min-height: 0; display: grid; grid-template-rows: 58px 1fr auto; }
.internal-conversation-head { display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--border); }
.internal-conversation .messages { padding: 18px; }

.settings-card { max-width: 1180px; }
.settings-tabs { display: flex; gap: 8px; margin: -6px 0 18px; padding-bottom: 12px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.settings-tab { min-height: 44px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 10px; padding: 0 13px; background: #07101f; color: var(--muted); cursor: pointer; touch-action: manipulation; }
.settings-tab:hover, .settings-tab.active { border-color: rgb(34 197 94 / 55%); background: rgb(34 197 94 / 10%); color: #bbf7d0; }
.settings-section { min-height: 320px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stats-grid article { display: grid; gap: 8px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
.stats-grid strong { color: #86efac; font-size: clamp(30px, 5vw, 46px); }
.stats-grid span { color: var(--muted); }
.mini-chart { height: 190px; display: flex; align-items: end; gap: 5px; margin-top: 18px; padding: 22px 16px 8px; border: 1px solid var(--border); border-radius: 16px; background: #07101f; }
.mini-chart-bar { min-width: 3px; flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(#4ade80, #15803d); }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 16px; }
.settings-form .wide { grid-column: 1 / -1; }
.settings-form textarea { min-height: 92px; resize: vertical; }
.settings-form > .button { justify-self: start; }
.ai-knowledge-intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); align-items: end; gap: 24px; margin-bottom: 18px; }
.ai-knowledge-intro h3 { margin: 5px 0 0; font-size: 22px; }
.ai-knowledge-intro p { margin: 0; }
.ai-config-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgb(34 197 94 / 7%); }
.automation-mode-card { min-width: 0; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #07101f; }
.automation-mode-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.automation-mode-head strong { font-size: 16px; }
.automation-mode-card p { min-height: 42px; margin: 0; line-height: 1.55; }
.automation-mode-card select, .automation-options select { min-height: 46px; }
.feature-badge { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: rgb(34 197 94 / 13%); color: #86efac; font-size: 11px; font-weight: 700; }
.automation-options { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .6fr); gap: 12px; }
.ai-config-form > .button { grid-column: 1 / -1; justify-self: start; }
.ai-safety-note { margin: 12px 2px 22px; padding: 11px 13px; border-left: 3px solid #f59e0b; border-radius: 8px; background: rgb(245 158 11 / 8%); color: #fde68a; font-size: 13px; line-height: 1.55; }
.knowledge-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 10px; }
.knowledge-toolbar label { width: 150px; }
.knowledge-list { display: grid; gap: 10px; }
.knowledge-empty { padding: 36px 12px; }
.knowledge-card { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.knowledge-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.knowledge-card-head strong { min-width: 0; overflow-wrap: anywhere; }
.knowledge-card p { margin: 0; color: #dbeafe; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-card small { color: var(--muted); }
.knowledge-status { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: rgb(148 163 184 / 13%); color: var(--muted); font-size: 11px; font-weight: 700; }
.knowledge-status.approved { background: rgb(34 197 94 / 13%); color: #86efac; }
.knowledge-status.rejected { background: rgb(251 113 133 / 12%); color: #fecdd3; }
.knowledge-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.knowledge-actions .topbar-button { min-height: 44px; }
.ai-message-badge { width: max-content; margin-top: 7px !important; padding: 2px 7px; border-radius: 999px; background: rgb(34 197 94 / 14%); color: #bbf7d0 !important; font: 700 10px/1.4 "Fira Sans", sans-serif !important; letter-spacing: .04em; }
.narrow-form { max-width: 720px; }
.quick-reply-form { margin: 18px 0; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #07101f; }
.inline-form, .copy-row { display: flex; align-items: end; gap: 10px; }
.inline-form input { max-width: 360px; }
.settings-list { display: grid; gap: 10px; margin-top: 18px; }
.settings-list-card { display: grid; grid-template-columns: minmax(140px, .45fr) minmax(240px, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.settings-list-card p { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.settings-list-card .danger-button { border-color: rgb(251 113 133 / 40%); color: #fecdd3; }
.reply-group { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #07101f; }
.reply-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.reply-group-items { display: grid; gap: 8px; }
.access-block { display: grid; gap: 10px; margin-bottom: 22px; }
.copy-row input, .copy-row textarea { flex: 1; }
.copy-row textarea { min-height: 90px; resize: vertical; }
.integration-guide-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 22px; padding: 16px; border: 1px solid rgb(34 197 94 / 35%); border-radius: 14px; background: rgb(34 197 94 / 8%); }
.integration-guide-callout p { margin: 5px 0 0; }
.integration-guide-callout .button { flex: 0 0 auto; text-decoration: none; }

.visitor-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.chat-window { width: min(100%, 760px); height: min(88vh, 820px); display: grid; grid-template-rows: 76px 1fr auto; border: 1px solid var(--border); border-radius: 22px; overflow: hidden; background: rgb(15 23 42 / 96%); box-shadow: 0 24px 90px rgb(0 0 0 / 36%); }
.chat-window .messages { background: #091222; }
.chat-window:has(.visitor-announcement:not(.hidden)) { grid-template-rows: 76px auto 1fr auto; }
.visitor-brand { min-width: 0; display: flex; align-items: center; gap: 10px; }
.visitor-brand-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: white; }
.visitor-announcement { padding: 9px 18px; border-bottom: 1px solid rgb(245 158 11 / 24%); background: rgb(245 158 11 / 10%); color: #fde68a; font-size: 13px; text-align: center; }
.presence.offline { color: var(--muted); }
.presence.offline::before { background: #64748b; box-shadow: 0 0 0 5px rgb(100 116 139 / 12%); }

/* Keep the composer inside the viewport on mid-size windows: the tool row and send button
   move to their own line instead of being pushed past the right edge. */
@media (max-width: 980px) {
  .workspace > .composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "quick input input" ". tools send";
    gap: 8px;
    padding: 10px 16px 12px;
  }
  .workspace > .composer .quick-reply-picker { grid-area: quick; align-self: stretch; }
  .workspace > .composer .quick-reply-picker select { width: 148px; height: 100%; min-height: 46px; }
  .workspace > .composer .composer-input { grid-area: input; }
  .workspace > .composer .composer-tools { grid-area: tools; justify-self: end; }
  .workspace > .composer > .button { grid-area: send; }
}

@media (max-width: 760px) {
  .dashboard { grid-template-columns: 1fr; grid-template-rows: 100dvh; overflow: hidden; }
  .sidebar {
    height: 100dvh;
    min-height: 0;
    overflow: auto;
    border-right: 0;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }
  .sidebar .brand { margin-bottom: 14px; }
  .sidebar-head { margin: 0 0 10px; }
  .conversation-search { min-height: 44px; }
  .conversation-list { align-content: start; }
  .workspace { display: none; }
  .dashboard.mobile-chat-open .sidebar { display: none; }
  .dashboard.mobile-chat-open .workspace { display: grid; grid-template-rows: auto 1fr auto; }
  .mobile-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 10px;
    background: #07101f;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 180ms ease, border-color 180ms ease;
  }
  .mobile-back-button:active { background: rgb(148 163 184 / 12%); border-color: #475569; }
  .mobile-back-button span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "back copy" "primary primary" "secondary secondary"; align-items: center; gap: 8px; padding: 10px 12px; }
  .mobile-back-button { grid-area: back; }
  .topbar-copy strong, .topbar-copy .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-primary { grid-area: primary; }
  .topbar-secondary { grid-area: secondary; }
  .topbar-actions { min-width: 0; width: 100%; justify-content: flex-start; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions > * { flex-shrink: 0; }
  .composer { padding-inline: 16px; }
  .messages { padding: 18px 14px; }
  .message { max-width: 88%; }
  .chat-window { height: calc(100vh - 20px); border-radius: 16px; }
  .topbar-actions .presence { display: none; }
  .sound-toggle, .translation-toggle { width: 44px; min-width: 44px; flex: 0 0 44px; padding: 0; justify-content: center; }
  .sound-toggle [data-sound-label], .translation-toggle [data-translation-toggle-label] { display: none; }
  .topbar-actions #openStaffPanel { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .staff-panel { padding: 10px; }
  .staff-panel-card { min-height: calc(100vh - 20px); padding: 18px 14px; border-radius: 16px; }
  .staff-create-form, .staff-edit-form { grid-template-columns: 1fr; }
  .settings-form, .stats-grid { grid-template-columns: 1fr; }
  .settings-form .wide { grid-column: auto; }
  .inline-form, .copy-row { align-items: stretch; flex-direction: column; }
  .integration-guide-callout { align-items: stretch; flex-direction: column; }
  .inline-form input { max-width: none; }
  .settings-list-card { grid-template-columns: 1fr; }
  .quick-reply-picker { display: none; }
  .workspace { height: 100vh; height: 100dvh; }
  .workspace > .composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "input input" "tools send"; gap: 8px; padding: 9px 10px max(9px, env(safe-area-inset-bottom)); }
  .workspace > .composer .composer-input { grid-area: input; }
  .workspace > .composer .composer-tools { grid-area: tools; }
  .workspace > .composer > .button { grid-area: send; }
  .composer-status:empty { display: none; }
  .feature-setting { grid-template-columns: 1fr; }
  .ai-knowledge-intro, .ai-config-form, .automation-options { grid-template-columns: 1fr; }
  .automation-options, .ai-config-form > .button { grid-column: auto; }
  .knowledge-toolbar { align-items: stretch; flex-direction: column; }
  .knowledge-toolbar label { width: 100%; }
  .knowledge-card-head { align-items: stretch; flex-direction: column; }
  .knowledge-status { align-self: flex-start; }
  .image-viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .image-viewer-stage { padding: 8px; }
  .internal-chat-card { height: calc(100vh - 20px); }
  .internal-chat-layout { grid-template-columns: 110px 1fr; }
  .staff-peer-list { padding: 7px; }
  .staff-peer { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .sound-toggle.ringing svg { animation: none; }
}

/* Single-page support workspace entry. Dashboard styles remain unchanged. */
.agent-entry {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.18fr) minmax(410px, .82fr);
  place-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #030712;
}
.agent-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: clamp(42px, 5.5vw, 84px);
  background:
    radial-gradient(circle at 12% 4%, rgb(34 197 94 / 20%), transparent 30%),
    radial-gradient(circle at 92% 86%, rgb(20 184 166 / 12%), transparent 34%),
    linear-gradient(145deg, #030712, #071321 58%, #061a1c);
}
.agent-hero > :not(.entry-grid) { position: relative; z-index: 1; }
.entry-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(rgb(148 163 184 / 6%) 1px, transparent 1px), linear-gradient(90deg, rgb(148 163 184 / 6%) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, #000, transparent 96%);
}
.entry-brand { margin: 0 0 clamp(34px, 5vh, 58px); }
.entry-brand .brand-mark { width: 52px; height: 52px; border: 1px solid rgb(134 239 172 / 46%); border-radius: 16px; box-shadow: 0 18px 42px rgb(16 185 129 / 20%); }
.entry-brand > div, .login-brand-compact > div { display: grid; gap: 3px; }
.entry-brand strong { font-size: 20px; letter-spacing: -.02em; }
.entry-brand small, .login-brand-compact small { color: #86efac; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.entry-status { display: inline-flex; align-items: center; align-self: flex-start; gap: 9px; min-height: 32px; padding: 6px 12px; border: 1px solid rgb(74 222 128 / 24%); border-radius: 999px; background: rgb(20 83 45 / 20%); color: #bbf7d0; font-size: 12px; font-weight: 750; }
.entry-status i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 5px rgb(74 222 128 / 10%); }
.agent-hero h1 { max-width: 760px; margin: 23px 0 18px; color: #f8fafc; font-size: clamp(42px, 5vw, 72px); line-height: 1.03; letter-spacing: -.052em; text-wrap: balance; }
.entry-copy { max-width: 680px; margin: 0; color: #a8b6c9; font-size: 17px; line-height: 1.7; }
.entry-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; max-width: 840px; margin-top: clamp(32px, 4.5vh, 52px); }
.entry-features article { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; min-width: 0; min-height: 96px; padding: 17px; border: 1px solid rgb(148 163 184 / 14%); border-radius: 16px; background: linear-gradient(145deg, rgb(15 23 42 / 74%), rgb(9 28 33 / 48%)); box-shadow: inset 0 1px rgb(255 255 255 / 3%); }
.entry-features svg { width: 25px; height: 25px; color: #4ade80; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.entry-features article > div { min-width: 0; }
.entry-features strong, .entry-features small { display: block; }
.entry-features strong { color: #edf4fb; font-size: 14px; }
.entry-features small { margin-top: 6px; color: #8fa0b7; font-size: 11px; line-height: 1.5; }
.workspace-preview { display: grid; grid-template-columns: 26% 1fr; width: min(840px, 100%); height: 190px; margin-top: 12px; overflow: hidden; border: 1px solid rgb(148 163 184 / 14%); border-radius: 18px; background: rgb(4 10 20 / 84%); box-shadow: 0 26px 62px rgb(0 0 0 / 22%); }
.preview-sidebar { display: grid; align-content: start; gap: 6px; padding: 12px 10px; border-right: 1px solid rgb(148 163 184 / 12%); background: rgb(7 16 31 / 88%); }
.preview-nav-caption { padding: 0 5px 3px; color: #64748b; font: 700 7px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; }
.preview-session { min-width: 0; display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 36px; padding: 6px 7px; border: 1px solid transparent; border-radius: 5px; }
.preview-session.active { border-color: rgb(34 197 94 / 16%); background: linear-gradient(90deg, rgb(34 197 94 / 15%), rgb(20 184 166 / 4%)); }
.preview-session > i { width: 5px; height: 5px; border-radius: 50%; background: #475569; }
.preview-session.active > i { background: #4ade80; box-shadow: 0 0 8px #22c55e; }
.preview-session > span { min-width: 0; display: grid; gap: 2px; }
.preview-session strong, .preview-session small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-session strong { color: #dbeafe; font-size: 8px; }
.preview-session small { color: #71839a; font-size: 7px; }
.preview-session em { color: #86efac; font: 700 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace; font-style: normal; }
.preview-main { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 48px 16px 40px; }
.preview-top { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 14px; border-bottom: 1px solid rgb(148 163 184 / 11%); }
.preview-top > strong { min-width: 0; overflow: hidden; color: #cbd5e1; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.preview-top > span { display: inline-flex; align-items: center; gap: 5px; color: #86efac; }
.preview-top i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.preview-top em { font-size: 8px; font-style: normal; }
.preview-chat-line { width: min(72%, 330px); display: grid; gap: 3px; padding: 7px 10px; border-radius: 9px 9px 9px 2px; background: rgb(30 41 59 / 95%); }
.preview-chat-line.outgoing { align-self: flex-end; border-radius: 9px 9px 2px; background: rgb(22 163 74 / 72%); }
.preview-chat-line small { color: #93a4bb; font-size: 7px; }
.preview-chat-line span { overflow: hidden; color: #dbeafe; font-size: 8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.preview-chat-line.outgoing small { color: #bbf7d0; }
.preview-chat-line, .preview-session.active, .preview-top i { will-change: transform, opacity; }
.preview-composer { position: absolute; left: 16px; right: 16px; bottom: 11px; height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-left: 9px; border: 1px solid rgb(148 163 184 / 14%); border-radius: 5px; background: #07101f; }
.preview-composer span { min-width: 0; overflow: hidden; color: #61738a; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.preview-composer b { align-self: stretch; display: grid; place-items: center; min-width: 42px; padding-inline: 8px; border-radius: 4px; background: linear-gradient(135deg, #22c55e, #14b8a6); color: #032313; font-size: 8px; }
.agent-entry > .login-card { align-self: center; justify-self: center; width: min(470px, calc(100% - 48px)); margin: 32px 0; padding: 34px; border-color: rgb(148 163 184 / 18%); border-radius: 28px; background: linear-gradient(155deg, rgb(15 23 42 / 94%), rgb(8 17 30 / 90%)); box-shadow: 0 34px 90px rgb(0 0 0 / 35%), inset 0 1px rgb(255 255 255 / 5%); backdrop-filter: blur(20px); }
.login-brand-compact { margin-bottom: 28px; }
.login-brand-compact strong { font-size: 17px; }
.agent-entry .login-tools { align-items: flex-start; }
.agent-entry .login-card h2 { margin-top: 25px; }
.agent-entry .login-card input { min-height: 48px; }
.agent-entry .login-card .button { min-height: 50px; background: linear-gradient(135deg, #22c55e, #0d9488); box-shadow: 0 15px 34px rgb(16 185 129 / 18%); }
.agent-entry .login-card .button:hover { background: linear-gradient(135deg, #4ade80, #14b8a6); transform: none; }
@media (max-width: 1080px) {
  .agent-entry { grid-template-columns: minmax(0, 1fr) minmax(390px, .78fr); }
  .agent-hero { padding: 42px; }
  .workspace-preview { display: none; }
  .entry-features { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .agent-entry { display: block; overflow: visible; }
  .agent-hero { min-height: auto; padding: 34px 20px 42px; }
  .entry-brand { margin-bottom: 34px; }
  .agent-hero h1 { font-size: 40px; }
  .entry-copy { font-size: 16px; }
  .entry-features { margin-top: 32px; }
  .entry-features article { min-height: auto; }
  .entry-features small { font-size: 14px; }
  .agent-entry > .login-card { width: calc(100% - 32px); margin: 24px auto 40px; padding: 24px; }
}
.language-trigger {
  min-height: 44px;
  width: min(158px, 34vw);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 11px;
  background: #07101f;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.language-trigger [data-language-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-trigger svg { flex: 0 0 auto; color: var(--muted); }
.language-trigger:hover { border-color: #475569; }
.language-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 48px));
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgb(0 0 0 / 55%);
}
.language-dialog::backdrop { background: rgb(2 6 23 / 68%); backdrop-filter: blur(3px); }
.language-dialog-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 20px; border-bottom: 1px solid var(--border); }
.language-dialog-head strong { font-size: 17px; }
.language-dialog-close { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 30px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.language-dialog-close:hover, .language-dialog-close:focus-visible { background: var(--surface-soft); color: var(--text); }
.language-options { max-height: min(560px, calc(100dvh - 128px)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: auto; overscroll-behavior: contain; padding: 12px; }
.language-option { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 0 12px; background: transparent; color: var(--text); text-align: left; cursor: pointer; touch-action: manipulation; }
.language-option span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-option:hover, .language-option:focus-visible { border-color: var(--border); background: var(--surface-soft); }
.language-option.selected { border-color: rgb(34 197 94 / 45%); background: rgb(34 197 94 / 12%); color: #bbf7d0; }
.language-check { opacity: 0; color: var(--accent); font-weight: 800; }
.language-option.selected .language-check { opacity: 1; }

@media (max-width: 600px) {
  .language-trigger { width: 100px; padding-inline: 9px; font-size: 13px; }
  .language-dialog { width: 100%; max-width: none; max-height: min(72dvh, 680px); margin: auto 0 0; border-width: 1px 0 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .language-dialog-head { min-height: 58px; }
  .language-options { max-height: calc(72dvh - 59px - env(safe-area-inset-bottom)); gap: 6px; padding: 10px; }
  .language-option { min-height: 48px; padding-inline: 10px; font-size: 14px; }
}

/* Kormiea command-center entry. Scoped to the logged-out view only. */
.tech-v2 {
  --tech-green: #39ff88;
  --tech-cyan: #22d3ee;
  --tech-ink: #02040a;
  --tech-panel: rgb(6 15 28 / 91%);
  --tech-line: rgb(34 211 238 / 22%);
  perspective: 1200px;
  background:
    radial-gradient(circle at 18% 18%, rgb(34 211 238 / 10%), transparent 28%),
    radial-gradient(circle at 82% 74%, rgb(57 255 136 / 9%), transparent 30%),
    var(--tech-ink);
}
.tech-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 4px, rgb(125 249 255 / 1.7%) 5px);
  mix-blend-mode: screen;
}
.tech-v2::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 calc(59% - 1px);
  z-index: 2;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(transparent 4%, var(--tech-cyan) 28%, var(--tech-green) 72%, transparent 96%);
  box-shadow: 0 0 24px rgb(34 211 238 / 34%);
  opacity: .42;
}
.tech-v2 .agent-hero {
  padding: clamp(48px, 5.2vw, 88px);
  background:
    linear-gradient(90deg, rgb(2 6 15 / 20%), rgb(2 6 15 / 76%)),
    radial-gradient(ellipse at 18% 12%, rgb(34 211 238 / 15%), transparent 34%),
    radial-gradient(ellipse at 78% 88%, rgb(57 255 136 / 12%), transparent 35%),
    linear-gradient(145deg, #02040a 0%, #05111d 56%, #041316 100%);
}
.tech-v2 .agent-hero::before {
  content: "";
  position: absolute;
  top: -15vw;
  right: -16vw;
  z-index: 0;
  width: min(55vw, 820px);
  aspect-ratio: 1;
  border: 1px solid rgb(34 211 238 / 13%);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgb(34 211 238 / 2.5%), 0 0 0 128px rgb(57 255 136 / 2%);
}
.tech-v2 .entry-grid {
  background-image:
    linear-gradient(rgb(34 211 238 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(34 211 238 / 7%) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(110deg, #000 12%, rgb(0 0 0 / 82%) 62%, transparent 96%);
}
.entry-orbit {
  position: absolute;
  top: 13%;
  right: 8%;
  z-index: 0;
  width: min(30vw, 420px);
  aspect-ratio: 1;
  border: 1px solid rgb(34 211 238 / 14%);
  border-radius: 50%;
  opacity: .76;
}
.entry-orbit::before, .entry-orbit::after { content: ""; position: absolute; inset: 12%; border: 1px solid rgb(57 255 136 / 13%); border-radius: 50%; }
.entry-orbit::after { inset: 25%; border-color: rgb(34 211 238 / 12%); }
.entry-orbit span { position: absolute; inset: 50% 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgb(34 211 238 / 24%), transparent); }
.entry-orbit i { position: absolute; top: 7%; left: 58%; width: 7px; height: 7px; border: 1px solid #dcfff3; border-radius: 50%; background: var(--tech-green); box-shadow: 0 0 18px var(--tech-green); }
.scan-beam { position: absolute; left: 0; right: 0; top: 0; z-index: 1; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgb(34 211 238 / 0%), rgb(34 211 238 / 42%), rgb(57 255 136 / 25%), transparent); box-shadow: 0 0 16px rgb(34 211 238 / 35%); }
.hud-coordinates {
  position: absolute !important;
  inset: 20px 26px auto 26px;
  z-index: 2 !important;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgb(125 249 255 / 62%);
  font: 700 9px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .2em;
}
.hud-coordinates span:last-child { color: rgb(134 239 172 / 58%); }
.signal-route {
  position: absolute !important;
  top: 54px;
  right: 26px;
  z-index: 2 !important;
  width: min(36%, 310px);
  display: flex;
  align-items: center;
}
.signal-route span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--tech-cyan)); }
.signal-route span:last-child { background: linear-gradient(90deg, var(--tech-green), transparent); }
.signal-route i { width: 5px; height: 5px; flex: 0 0 5px; border: 1px solid #d8fff4; border-radius: 50%; background: var(--tech-green); box-shadow: 0 0 14px var(--tech-green); }
.signal-route i + span + i { background: var(--tech-cyan); box-shadow: 0 0 14px var(--tech-cyan); }
.tech-v2 .entry-brand { margin-bottom: clamp(38px, 5vh, 64px); }
.tech-v2 .entry-brand .brand-mark {
  width: 60px;
  height: 60px;
  border-color: rgb(34 211 238 / 45%);
  border-radius: 4px 18px 4px 18px;
  background: linear-gradient(145deg, rgb(57 255 136 / 22%), rgb(34 211 238 / 11%));
  color: #e8fff8;
  box-shadow: 0 0 0 1px rgb(57 255 136 / 12%), 0 18px 48px rgb(34 211 238 / 16%), inset 0 0 22px rgb(57 255 136 / 8%);
}
.tech-v2 .entry-brand strong { font-size: 23px; letter-spacing: .01em; }
.tech-v2 .entry-brand small { color: var(--tech-cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.tech-v2 .entry-status {
  border-radius: 4px;
  border-color: rgb(57 255 136 / 32%);
  background: linear-gradient(90deg, rgb(57 255 136 / 12%), transparent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
}
.tech-v2 .agent-hero h1 {
  max-width: 880px;
  margin: 25px 0 20px;
  background: linear-gradient(100deg, #ffffff 10%, #c7fff0 48%, #8cecff 100%);
  color: #fff;
  font-size: clamp(52px, 6vw, 96px);
  line-height: .96;
  letter-spacing: -.06em;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 12px 34px rgb(34 211 238 / 12%));
}
.tech-v2 .entry-copy { max-width: 720px; color: #b4c5d8; font-size: 18px; line-height: 1.72; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tech-tags span {
  padding: 6px 9px;
  border: 1px solid rgb(34 211 238 / 20%);
  border-radius: 3px;
  background: rgb(5 20 31 / 70%);
  color: #8eeeff;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
}
.tech-tags span:nth-child(even) { border-color: rgb(57 255 136 / 22%); color: #9affbd; }
.tech-v2 .entry-features { gap: 10px; max-width: 900px; margin-top: clamp(28px, 4vh, 44px); }
.tech-v2 .entry-features article {
  position: relative;
  min-height: 92px;
  border-color: rgb(34 211 238 / 16%);
  border-radius: 0;
  background: linear-gradient(135deg, rgb(8 22 36 / 88%), rgb(4 18 23 / 68%));
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.tech-v2 .entry-features article::after {
  content: "";
  position: absolute;
  inset: auto 12px 8px auto;
  width: 20px;
  height: 1px;
  background: var(--tech-cyan);
  box-shadow: -25px 0 var(--tech-green);
  opacity: .55;
}
.tech-v2 .entry-features article:nth-child(even) svg { color: var(--tech-cyan); }
.tech-v2 .entry-features strong { font-size: 15px; }
.tech-v2 .entry-features small { color: #9aabc0; }
.tech-v2 .workspace-preview {
  position: relative;
  grid-template-columns: 25% 1fr;
  width: min(900px, 100%);
  height: 182px;
  margin-top: 11px;
  padding-top: 22px;
  border-color: rgb(34 211 238 / 22%);
  border-radius: 2px 18px 2px 18px;
  background: rgb(2 8 16 / 88%);
  box-shadow: 0 26px 80px rgb(0 0 0 / 34%), inset 0 0 44px rgb(34 211 238 / 3%);
}
.preview-hud-labels {
  position: absolute;
  inset: 0 0 auto;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border-bottom: 1px solid rgb(34 211 238 / 12%);
  color: #73dcec;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
}
.preview-hud-labels span:last-child { color: #75eb9e; }
.tech-v2 .preview-sidebar { border-right-color: rgb(34 211 238 / 13%); }
.tech-v2 .preview-top { border-bottom-color: rgb(34 211 238 / 12%); }
.tech-v2 .preview-top i { box-shadow: 0 0 13px var(--tech-green); }
.tech-v2 > .login-card {
  position: relative;
  z-index: 4;
  width: min(500px, calc(100% - 48px));
  padding: 42px;
  border-color: rgb(34 211 238 / 24%);
  border-radius: 3px 26px 3px 26px;
  background:
    linear-gradient(180deg, rgb(34 211 238 / 5%), transparent 24%),
    linear-gradient(150deg, rgb(8 20 36 / 96%), rgb(3 12 22 / 94%));
  box-shadow: 0 44px 120px rgb(0 0 0 / 52%), 0 0 54px rgb(34 211 238 / 7%), inset 0 1px rgb(255 255 255 / 6%);
  transform-style: preserve-3d;
}
.tech-v2 > .login-card::before,
.tech-v2 > .login-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: 52px;
  height: 52px;
}
.tech-v2 > .login-card::before { top: -1px; left: -1px; border-top: 2px solid var(--tech-cyan); border-left: 2px solid var(--tech-cyan); }
.tech-v2 > .login-card::after { right: -1px; bottom: -1px; border-right: 2px solid var(--tech-green); border-bottom: 2px solid var(--tech-green); }
.auth-node-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: #76dfef;
  font: 750 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .18em;
}
.auth-node-label::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, rgb(34 211 238 / 32%), transparent); }
.auth-node-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--tech-green); box-shadow: 0 0 14px var(--tech-green); }
.tech-v2 .login-brand-compact .brand-mark { border-radius: 3px 12px 3px 12px; background: linear-gradient(145deg, #1fcf70, #0f9e9b); box-shadow: 0 12px 32px rgb(34 211 238 / 16%); }
.tech-v2 .login-brand-compact small { color: var(--tech-cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.tech-v2 .login-card h2 { margin-top: 30px; font-size: 34px; letter-spacing: -.04em; }
.tech-v2 .login-card .muted { color: #9fb1c7; line-height: 1.65; }
.tech-v2 .login-card label > span:not(.sr-only) { color: #cad6e4; font-size: 13px; font-weight: 650; }
.tech-v2 .login-card input,
.tech-v2 .login-card select {
  border-color: rgb(34 211 238 / 17%);
  border-radius: 3px;
  background: rgb(2 9 17 / 74%);
}
.tech-v2 .login-card input:focus,
.tech-v2 .login-card select:focus { border-color: var(--tech-cyan); box-shadow: 0 0 0 3px rgb(34 211 238 / 11%); }
.tech-v2 .login-card .button {
  border-radius: 3px 12px 3px 12px;
  background: linear-gradient(105deg, #22c55e, #18d79a 58%, #22d3ee);
  color: #01150b;
  font-weight: 850;
  letter-spacing: .06em;
  box-shadow: 0 16px 42px rgb(34 197 94 / 22%), inset 0 1px rgb(255 255 255 / 40%);
}
.tech-v2 .login-card .button:hover { background: linear-gradient(105deg, #4ade80, #2ee6ad 58%, #67e8f9); box-shadow: 0 18px 48px rgb(34 211 238 / 20%); }
.tech-v2 .login-card .button:active { filter: brightness(.92); }
.tech-v2 .entry-brand,
.tech-v2 .entry-status,
.tech-v2 .agent-hero h1,
.tech-v2 .entry-copy,
.tech-v2 .tech-tags,
.tech-v2 .entry-features,
.tech-v2 .workspace-preview,
.tech-v2 > .login-card { will-change: transform, opacity; }
.entry-orbit, .scan-beam, .tech-v2 .entry-status i { will-change: transform, opacity; }

@media (max-width: 1180px) {
  .tech-v2::after { left: calc(56% - 1px); }
  .tech-v2 { grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr); }
  .tech-v2 .agent-hero { padding: 42px; }
  .tech-v2 .agent-hero h1 { font-size: clamp(48px, 5.7vw, 72px); }
}
@media (min-width: 1081px) and (max-height: 820px) {
  .tech-v2 { overflow-x: hidden; overflow-y: auto; }
  .tech-v2 .agent-hero { min-height: 100dvh; padding-block: 28px; }
  .tech-v2 .entry-brand { margin-bottom: 20px; }
  .tech-v2 .entry-brand .brand-mark { width: 50px; height: 50px; }
  .tech-v2 .entry-status { min-height: 28px; padding-block: 4px; }
  .tech-v2 .agent-hero h1 { margin: 14px 0 10px; font-size: clamp(44px, 4.7vw, 66px); }
  .tech-v2 .entry-copy { font-size: 16px; line-height: 1.55; }
  .tech-v2 .tech-tags { margin-top: 12px; }
  .tech-v2 .entry-features { gap: 8px; margin-top: 16px; }
  .tech-v2 .entry-features article { min-height: 70px; padding: 12px 14px; }
  .tech-v2 .entry-features small { margin-top: 3px; line-height: 1.35; }
  .tech-v2 .workspace-preview { display: grid; height: 150px; }
  .tech-v2 .preview-sidebar { padding-block: 8px; }
  .tech-v2 .preview-session { min-height: 29px; padding-block: 4px; }
  .tech-v2 .preview-main { padding-top: 45px; }
  .tech-v2 > .login-card { margin-block: 20px; padding: 30px 34px; }
  .tech-v2 .auth-node-label { margin-bottom: 18px; }
  .tech-v2 .login-brand-compact { margin-bottom: 18px; }
  .tech-v2 .login-card h2 { margin-top: 18px; font-size: 30px; }
  .tech-v2 #loginForm { gap: 14px; }
}
@media (max-width: 760px) {
  .tech-v2 { display: block; min-height: 100dvh; }
  .tech-v2::after { display: none; }
  .tech-v2 .agent-hero { padding: max(54px, env(safe-area-inset-top)) 20px 40px; }
  .tech-v2 .agent-hero::before { top: -28vw; right: -55vw; width: 120vw; }
  .entry-orbit { top: 8%; right: -24%; width: 62vw; opacity: .5; }
  .hud-coordinates { inset: 15px 16px auto; }
  .hud-coordinates span:last-child, .signal-route { display: none; }
  .tech-v2 .entry-brand { margin-bottom: 32px; }
  .tech-v2 .entry-brand .brand-mark { width: 52px; height: 52px; }
  .tech-v2 .agent-hero h1 { font-size: clamp(42px, 13vw, 58px); line-height: 1; }
  .tech-v2 .entry-copy { font-size: 16px; }
  .tech-tags { margin-top: 18px; }
  .tech-tags span { font-size: 8px; }
  .tech-v2 .entry-features { margin-top: 28px; }
  .tech-v2 .entry-features article { min-height: auto; }
  .tech-v2 > .login-card { width: calc(100% - 32px); margin: 22px auto max(40px, env(safe-area-inset-bottom)); padding: 28px 24px 30px; }
  .auth-node-label { margin-bottom: 24px; }
  .tech-v2 .login-card h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .tech-v2 .entry-brand,
  .tech-v2 .entry-status,
  .tech-v2 .agent-hero h1,
  .tech-v2 .entry-copy,
  .tech-v2 .tech-tags,
  .tech-v2 .entry-features,
  .tech-v2 .workspace-preview,
  .tech-v2 > .login-card { will-change: auto; }
  .preview-chat-line, .preview-session.active, .preview-top i { will-change: auto; }
  .entry-orbit, .scan-beam, .tech-v2 .entry-status i { will-change: auto; }
}

/* ==========================================================================
   Light theme (day mode)
   The workbench was written dark-first with hardcoded surfaces, so the day
   theme re-declares the palette and re-paints those hardcoded surfaces.
   Scope: the logged-in workbench and its dialogs. The marketing / login
   hero (.agent-entry / .tech-v2) intentionally keeps its dark tech look.
   ========================================================================== */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --border: #d9e2ef;
  --text: #0f172a;
  --muted: #5a6b83;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --danger: #dc2626;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 82% -18%, rgb(22 163 74 / 10%), transparent 34rem),
    linear-gradient(160deg, #f9fbff, #eef2f8 58%, #e7edf6);
  color: var(--text);
}

html[data-theme="light"] .dashboard { background: transparent; }
html[data-theme="light"] .sidebar {
  border-right-color: var(--border);
  background: #ffffff;
}
html[data-theme="light"] .workspace { background: transparent; }
html[data-theme="light"] .topbar {
  border-bottom-color: var(--border);
  background: rgb(255 255 255 / 88%);
}
html[data-theme="light"] .composer {
  border-top-color: var(--border);
  background: rgb(255 255 255 / 92%);
}

/* Inputs, filters and small controls that carried a hardcoded #07101f surface. */
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .conversation-search,
html[data-theme="light"] .conversation-filter,
html[data-theme="light"] .topbar-button,
html[data-theme="light"] .composer-tool,
html[data-theme="light"] .sound-toggle,
html[data-theme="light"] .translation-toggle,
html[data-theme="light"] .language-trigger,
html[data-theme="light"] .mobile-back-button,
html[data-theme="light"] .settings-tab,
html[data-theme="light"] .mini-chart,
html[data-theme="light"] .staff-peer-list,
html[data-theme="light"] .staff-create-form,
html[data-theme="light"] .staff-create-form select,
html[data-theme="light"] .staff-edit-form select,
html[data-theme="light"] .compact-panel select,
html[data-theme="light"] .automation-mode-card,
html[data-theme="light"] .quick-reply-form,
html[data-theme="light"] .reply-group,
html[data-theme="light"] .emoji-picker,
html[data-theme="light"] .image-viewer-head,
html[data-theme="light"] .language-dialog-close:hover,
html[data-theme="light"] .language-dialog-close:focus-visible {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text);
}

html[data-theme="light"] .topbar-button:hover,
html[data-theme="light"] .composer-tool:hover:not(:disabled),
html[data-theme="light"] .language-trigger:hover,
html[data-theme="light"] .sound-toggle:hover,
html[data-theme="light"] .translation-toggle:hover,
html[data-theme="light"] .mobile-back-button:active {
  border-color: #a9b8cc;
}

html[data-theme="light"] label { color: #334155; }
html[data-theme="light"] .knowledge-card p { color: #1e293b; }

/* Green accents: pale mint text was unreadable on white. */
html[data-theme="light"] .count,
html[data-theme="light"] .presence:not(.offline),
html[data-theme="light"] .staff-feedback,
html[data-theme="light"] .self-badge,
html[data-theme="light"] .stats-grid strong,
html[data-theme="light"] .feature-badge,
html[data-theme="light"] .staff-presence.online,
html[data-theme="light"] .knowledge-status.approved,
html[data-theme="light"] .ai-message-badge,
html[data-theme="light"] .message-translation .translation-label,
html[data-theme="light"] .conversation-filter button.active,
html[data-theme="light"] .settings-tab:hover,
html[data-theme="light"] .settings-tab.active,
html[data-theme="light"] .language-option.selected {
  color: #15803d;
}

html[data-theme="light"] .count,
html[data-theme="light"] .self-badge,
html[data-theme="light"] .feature-badge,
html[data-theme="light"] .ai-message-badge,
html[data-theme="light"] .knowledge-status.approved,
html[data-theme="light"] .conversation-filter button.active,
html[data-theme="light"] .settings-tab:hover,
html[data-theme="light"] .settings-tab.active,
html[data-theme="light"] .language-option.selected,
html[data-theme="light"] .feature-setting,
html[data-theme="light"] .ai-config-form,
html[data-theme="light"] .integration-guide-callout {
  background: rgb(22 163 74 / 10%);
}

html[data-theme="light"] .staff-presence.offline { color: #64748b !important; }
html[data-theme="light"] .conversation .conversation-note { color: #b45309; }
html[data-theme="light"] .conversation .conversation-metadata { color: #0e7490; }
html[data-theme="light"] .ai-safety-note {
  border-left-color: #f59e0b;
  background: rgb(245 158 11 / 12%);
  color: #92400e;
}
html[data-theme="light"] .queue-preview-notice {
  border-color: rgb(245 158 11 / 45%);
  background: #fffbeb;
  color: #92400e;
}
html[data-theme="light"] .offline-owner-notice {
  border-color: rgb(245 158 11 / 45%);
  background: #fffbeb;
  color: #92400e;
}

/* Chat bubbles. */
html[data-theme="light"] .message {
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}
html[data-theme="light"] .message.agent {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}
html[data-theme="light"] .message small,
html[data-theme="light"] .message-time { color: rgb(15 23 42 / 55%); }
html[data-theme="light"] .message.agent small,
html[data-theme="light"] .message.agent .message-time { color: rgb(255 255 255 / 78%); }
html[data-theme="light"] .message-translation {
  border-top-color: rgb(15 23 42 / 12%);
  color: #334155;
}
html[data-theme="light"] .message-translation.error { color: #b91c1c; }
html[data-theme="light"] .translation-retry {
  border-color: rgb(220 38 38 / 35%);
  color: #b91c1c;
}
html[data-theme="light"] .translation-retry:hover { background: rgb(220 38 38 / 8%); }
html[data-theme="light"] .knowledge-status.rejected {
  background: rgb(220 38 38 / 10%);
  color: #b91c1c;
}
html[data-theme="light"] .settings-list-card .danger-button {
  border-color: rgb(220 38 38 / 35%);
  color: #b91c1c;
}

html[data-theme="light"] .stats-grid article { background: #ffffff; }
html[data-theme="light"] .knowledge-card,
html[data-theme="light"] .settings-list-card,
html[data-theme="light"] .staff-edit-form { background: #f8fafc; }
html[data-theme="light"] .conversation:hover,
html[data-theme="light"] .conversation.active { background: #f1f5f9; }

html[data-theme="light"] .button { color: #ffffff; }
html[data-theme="light"] .button:hover { background: #15803d; }
html[data-theme="light"] .button.secondary { background: #ffffff; color: var(--text); }
html[data-theme="light"] .message-image { background: #f1f5f9; }
html[data-theme="light"] .emoji-option:hover,
html[data-theme="light"] .emoji-option:focus-visible { background: #eef2f8; }

/* Dialogs and full-screen panels (they live outside .dashboard, so they need their own rules). */
html[data-theme="light"] .customer-note-dialog,
html[data-theme="light"] .language-dialog,
html[data-theme="light"] .staff-panel-card,
html[data-theme="light"] .image-viewer {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 28px 80px rgb(15 23 42 / 22%);
}
html[data-theme="light"] .language-option:hover,
html[data-theme="light"] .language-option:focus-visible { background: #f1f5f9; }
html[data-theme="light"] .language-dialog::backdrop,
html[data-theme="light"] .customer-note-dialog::backdrop { background: rgb(15 23 42 / 34%); }
html[data-theme="light"] .staff-panel { background: rgb(15 23 42 / 32%); }
html[data-theme="light"] .image-viewer::backdrop { background: rgb(15 23 42 / 55%); }
html[data-theme="light"] .image-viewer-stage { background: #f1f5f9; }
html[data-theme="light"] .message.system-message { color: var(--muted); }

/* Theme switch button: square icon-only control, same height as its neighbours. */
.theme-toggle { width: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
@media (max-width: 760px) {
  .theme-toggle { width: 44px; min-width: 44px; flex: 0 0 44px; }
}

/* The logged-out hero keeps its dark command-center look, so restore the dark
   palette inside .agent-entry instead of letting the day theme wash it out. */
html[data-theme="light"] .agent-entry {
  --surface: #0f172a;
  --surface-soft: #172033;
  --border: #273449;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-dark: #15803d;
  background: #030712;
  color: #f8fafc;
}
html[data-theme="light"] .agent-entry label { color: #dbe5f1; }
html[data-theme="light"] .agent-entry .language-control select,
html[data-theme="light"] .agent-entry .login-card select,
html[data-theme="light"] .agent-entry .language-trigger {
  border-color: #273449;
  background: #07101f;
  color: #f8fafc;
}
html[data-theme="light"] .agent-entry .login-tools .topbar-button,
html[data-theme="light"] .agent-entry .login-card .button { color: #052e16; }
