/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  /* surfaces & text */
  --bg:           #131314;
  --surface:      #1e1e1f;
  --surface2:    #2a2a2b;
  --border:      #2e2e30;
  --text:        #e3e3e3;
  --text-muted:  #8e8e8e;
  --text-faint:  #555;

  /* accents */
  --red:         #C5050C;
  --red-hover:   #a00008;
  --accent-blue: #60a5fa;
  --danger:      #f87171;

  /* state */
  --pill-hover:        #333;
  --input-focus:       #444;
  --input-focus-ring:  #333;
  --shadow:            rgba(0, 0, 0, 0.5);
  --overlay:           rgba(0, 0, 0, 0.55);

  /* layout */
  --sidebar-w:          56px;
  --sidebar-w-expanded: 260px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #f5f4ef;
    --surface:    #ffffff;
    --surface2:   #ebe9e4;
    --border:     #dddbd5;
    --text:       #1a1a1a;
    --text-muted: #6b7280;
    --text-faint: #9ca3af;

    --red-hover:        #9B0000;
    --accent-blue:      #2563eb;
    --danger:           #dc2626;

    --pill-hover:       #e5e3dd;
    --input-focus:      #999;
    --input-focus-ring: #ccc;
    --shadow:           rgba(0, 0, 0, 0.12);
    --overlay:          rgba(0, 0, 0, 0.35);
  }
}

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

/* `[hidden]` must beat author display rules (e.g. .model-pill { display:flex }) */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.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;
}

.layout {
  display: flex;
  height: 100dvh;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w-expanded);
  min-width: var(--sidebar-w-expanded);
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  gap: 2px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  transition: width 0.18s ease, min-width 0.18s ease;
  position: relative;
}
.sidebar.collapsed {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  padding: 12px 0;
  align-items: center;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 10px;
  width: 100%;
}
.sidebar.collapsed .sidebar-header {
  padding: 0 0 8px;
  flex-direction: column;
  gap: 4px;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-brand { display: none; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

.sidebar-actions { padding-bottom: 6px; }

.sidebar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.sidebar-row:hover { background: var(--surface); color: var(--text); }
.sidebar-row svg { flex-shrink: 0; }
.sidebar.collapsed .sidebar-row {
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
}
.sidebar.collapsed .sidebar-label { display: none; }

.sidebar-chats {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}
.sidebar-chats::-webkit-scrollbar { width: 4px; }
.sidebar-chats::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar.collapsed .sidebar-chats { display: none; }

.chat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.chat-item:hover { background: var(--surface); color: var(--text); }
.chat-item.active { background: var(--surface2); color: var(--text); }
.chat-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-delete {
  visibility: hidden;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.chat-item:hover .chat-item-delete { visibility: visible; }
.chat-item-delete:hover { color: var(--danger); background: var(--bg); }

.chats-empty {
  padding: 16px 10px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  position: relative;
}

/* ── Profile pill + menu ───────────────────────────────────────────────────── */
.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s;
}
.profile-pill:hover { background: var(--surface); }

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  background: var(--red);
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.profile-email {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-role {
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.profile-role[data-role="admin"]     { color: var(--danger); }
.profile-role[data-role="developer"] { color: var(--accent-blue); }

.profile-caret {
  flex-shrink: 0;
  color: var(--text-faint);
}

.sidebar.collapsed .profile-pill { justify-content: center; padding: 4px; }
.sidebar.collapsed .profile-info,
.sidebar.collapsed .profile-caret { display: none; }

.profile-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 4px;
  right: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 50;
}
.profile-menu[hidden] { display: none; }
.sidebar.collapsed .profile-menu {
  left: calc(100% + 6px);
  right: auto;
  bottom: 4px;
  min-width: 180px;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  text-align: left;
}
.profile-menu-item:hover  { background: var(--surface); }
.profile-menu-item[hidden] { display: none; }

/* ── Settings modal ────────────────────────────────────────────────────────── */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  padding: 24px;
}
.settings-overlay[hidden] { display: none; }
.settings-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.settings-section-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.settings-models {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.settings-model {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}
.settings-model:hover,
.settings-model.selected { background: var(--surface2); color: var(--text); }
.settings-model-name { flex: 1; }
.settings-model-meta {
  font-size: 11px;
  color: var(--text-faint);
}
.settings-model .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.settings-status {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Main pane ─────────────────────────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center, rgba(197, 5, 12, 0.13) 0%, transparent 65%);
  pointer-events: none;
  animation: glowPulse 2.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 1.2; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.75; transform: translate(-50%, -50%) scale(1.6); }
}
@keyframes glowBurst {
  0%   { opacity: 1;   transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 0.6; transform: translate(-50%, -50%) scale(4); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(6); }
}
.glow.burst { animation: glowBurst 1.1s ease-out forwards; }

.main.landing-mode { justify-content: center; }
.main.landing-mode .chat-area {
  flex: 0 0 auto;
  overflow: visible;
}

.chat-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}
.chat-area::-webkit-scrollbar { width: 4px; }
.chat-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Landing ───────────────────────────────────────────────────────────────── */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 12px;
  transition: opacity 0.15s ease;
}

.landing-chips {
  display: none;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 24px 24px;
  transition: opacity 0.15s ease;
}
.main.landing-mode .landing-chips { display: block; }

.greeting {
  font-size: 44px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.6px;
  text-align: center;
  margin-bottom: 24px;
}
.greeting span { color: var(--text-muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s, opacity 0.4s ease;
  font-family: inherit;
  text-align: left;
  line-height: 1.3;
}
.chip.fading { opacity: 0; }
.chip:hover {
  background: var(--surface2);
  border-color: var(--input-focus);
  transform: translateY(-1px);
}
.chip svg {
  flex-shrink: 0;
  color: var(--red);
  width: 16px;
  height: 16px;
}

/* ── Conversation ──────────────────────────────────────────────────────────── */
.messages {
  display: none;
  flex-direction: column;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 8px;
}
.messages.visible { display: flex; }

.msg-user {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0;
}
.msg-user .bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px 20px 4px 20px;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 75%;
  color: var(--text);
}

.msg-bot {
  display: flex;
  gap: 14px;
  padding: 16px 0 8px;
  align-items: flex-start;
}
.bot-avatar {
  width: 30px;
  height: 30px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}
.bot-body { flex: 1; min-width: 0; }
.bot-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.bot-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}
.bot-text p { margin-bottom: 10px; }
.bot-text p:last-child { margin-bottom: 0; }
.bot-text strong { font-weight: 600; color: var(--text); }
.bot-text ul, .bot-text ol { padding-left: 20px; margin-bottom: 10px; }
.bot-text li { margin-bottom: 4px; }
.bot-text code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
  font-family: "Fira Code", monospace;
}
.bot-text pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin-bottom: 10px;
}
.bot-text pre code { background: none; border: none; padding: 0; }
.bot-text h1, .bot-text h2, .bot-text h3 {
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}

/* ── Sources ──────────────────────────────────────────────────────────────── */
.sources-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
}
.sources-btn:hover { border-color: var(--input-focus); color: var(--text); }
.sources-btn svg { transition: transform 0.2s; }
.sources-btn.open svg { transform: rotate(180deg); }

.sources-grid {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.sources-grid.open { display: grid; }

.source-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
}
.source-code { font-size: 12px; font-weight: 700; color: var(--danger); }
.source-dept { font-size: 11px; color: var(--text-faint); margin-bottom: 3px; }
.source-text { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

/* ── Typing indicator ──────────────────────────────────────────────────────── */
.typing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.typing-label {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
.stopped-marker {
  color: var(--text-faint);
  font-size: 12px;
  font-style: italic;
}
.typing {
  display: flex;
  gap: 5px;
  padding: 4px 0;
  height: 24px;
  align-items: center;
}
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint);
  animation: pulse 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}
@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.stream-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--text-muted);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.6s infinite;
}

/* ── Input bar ─────────────────────────────────────────────────────────────── */
.input-wrap {
  padding: 12px 24px 24px;
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.input-shell { position: relative; }

.input-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 12px 12px 12px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-bar:focus-within {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 1px var(--input-focus-ring);
}

textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  resize: none;
  line-height: 1.5;
  max-height: 160px;
}
textarea::placeholder { color: var(--text-faint); }

.bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.model-pill:hover { background: var(--pill-hover); color: var(--text); }
.model-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.model-pill.locked { cursor: default; }
.model-pill.locked:hover { background: var(--surface2); color: var(--text-muted); }
.model-pill.locked > svg { display: none; }

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.12s, background 0.12s;
}
.send-btn:hover { background: var(--red-hover); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 10px;
}

/* ── Model dropdown ────────────────────────────────────────────────────────── */
.model-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 220px;
  /* Cap height so it always fits in the viewport (especially in landing mode
     where the input bar is vertically centered and the dropdown grows up). */
  max-height: min(60vh, calc(100dvh - 200px));
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 1px;
  z-index: 100;
  box-shadow: 0 8px 24px var(--shadow);
}
.main.landing-mode .model-dropdown { max-height: 42vh; }
.model-dropdown.open { display: flex; }

.model-group {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  padding: 8px 12px 4px;
}
.model-group:first-child { padding-top: 4px; }

.model-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-muted);
  transition: background 0.1s, color 0.1s;
}
.model-option:hover, .model-option.selected {
  background: var(--surface);
  color: var(--text);
}
.model-option .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}

/* Provider dot colors apply everywhere a [data-provider] container is used */
[data-provider="google"]    .dot { background: #4285f4; }
[data-provider="anthropic"] .dot { background: #d97757; }
[data-provider="openai"]    .dot { background: #10a37f; }
[data-provider="groq"]      .dot { background: #f55036; }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Auth overlay ──────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.auth-overlay[hidden] { display: none; }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.auth-close:hover { background: var(--surface2); color: var(--text); }
.profile-role-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}
.sign-in-pill .profile-avatar {
  background: var(--surface2);
  color: var(--text-muted);
}
.auth-logo {
  width: 48px;
  height: 48px;
  background: var(--red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  color: #fff;
  align-self: center;
  margin-bottom: 4px;
}
.auth-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}
.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 4px;
}
.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
}
.auth-card input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.12s;
}
.auth-card input:focus { border-color: var(--input-focus); }
.auth-submit {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
}
.auth-submit:hover { background: var(--red-hover); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-error {
  font-size: 12.5px;
  color: var(--danger);
  text-align: center;
  min-height: 16px;
}