:root {
  --bg: #0b0f14;
  --bg-soft: #10161d;
  --panel: #121820;
  --panel-2: #182028;
  --panel-3: #1e2832;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f3f6f9;
  --muted: #8b98a5;
  --accent: #3fa86f;
  --accent-soft: rgba(63, 168, 111, 0.14);
  --accent-hover: #52c585;
  --accent-navy: #1a365d;
  --chatgpt: #10a37f;
  --chatgpt-soft: rgba(16, 163, 127, 0.18);
  --gemini: #8e75ff;
  --gemini-soft: rgba(142, 117, 255, 0.18);
  --danger: #ff7b7b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-width: 300px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(32, 184, 205, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.06), transparent 24%),
    var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.app {
  display: flex;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: rgba(18, 24, 32, 0.92);
  border-right: 1px solid var(--border);
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 4px 10px;
}

.brand-logo,
.welcome-logo,
.topbar-logo,
.assistant-avatar img {
  display: block;
}

.brand-logo {
  width: auto;
  height: 46px;
  max-width: 148px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tagline,
#status-text {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

#status-text {
  margin-top: 4px;
  font-size: 0.7rem;
  opacity: 0.9;
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p,
.sidebar-note,
.hint,
.credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.primary-btn,
.ghost-btn,
.icon-btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(63, 168, 111, 0.2), rgba(26, 54, 93, 0.16));
  border-color: rgba(63, 168, 111, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  border-color: rgba(63, 168, 111, 0.45);
  background: var(--panel-3);
}

.btn-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.chat-list-label {
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: none;
  place-items: center;
}

.mobile-only {
  display: none;
}

.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px 2px 0;
  -webkit-overflow-scrolling: touch;
}

.chat-item {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-item:hover {
  background: var(--panel-2);
}

.chat-item.active {
  background: var(--accent-soft);
  border-color: rgba(32, 184, 205, 0.22);
}

.chat-item-title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

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

.credit a,
.hint a {
  font-weight: 600;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  width: auto;
  height: 34px;
  max-width: 120px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 6px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

#model-select,
#provider-select {
  min-width: 140px;
  max-width: 280px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  font-size: 0.92rem;
}

.toggle input {
  display: none;
}

.toggle-ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #334155;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-ui {
  background: var(--accent);
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 24px 18px 28px;
  touch-action: pan-y;
}

.welcome {
  max-width: 760px;
  margin: 5vh auto 0;
  text-align: center;
  padding: 0 8px;
}

.welcome-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 24px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.welcome-logo--chatgpt {
  width: 92px;
  height: 92px;
  padding: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(16, 163, 127, 0.28),
    0 18px 44px rgba(16, 163, 127, 0.22);
}

.welcome-logo--perplexity {
  box-shadow:
    0 0 0 1px rgba(63, 168, 111, 0.22),
    0 18px 44px rgba(26, 54, 93, 0.18);
}

.welcome-logo--gemini {
  width: 92px;
  height: 92px;
  padding: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(142, 117, 255, 0.28),
    0 18px 44px rgba(66, 133, 244, 0.2);
}

.welcome h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
}

.welcome p {
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 520px;
  line-height: 1.6;
}

.suggestions {
  display: grid;
  gap: 12px;
}

.suggestion {
  border: 1px solid var(--border);
  background: rgba(18, 24, 32, 0.88);
  color: var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.suggestion:hover {
  border-color: rgba(32, 184, 205, 0.35);
  background: var(--panel-2);
  transform: translateY(-1px);
}

.suggestion-label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  max-width: 860px;
  margin: 0 auto 20px;
  padding: 4px 0;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar {
  background: var(--panel-3);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
}

.assistant-avatar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.assistant-avatar--chatgpt {
  background: linear-gradient(180deg, rgba(16, 163, 127, 0.16), rgba(16, 163, 127, 0.06));
  border-color: rgba(16, 163, 127, 0.34);
  box-shadow: 0 8px 22px rgba(16, 163, 127, 0.16);
}

.assistant-avatar--perplexity {
  background: linear-gradient(180deg, rgba(63, 168, 111, 0.12), rgba(26, 54, 93, 0.08));
  border-color: rgba(63, 168, 111, 0.24);
}

.assistant-avatar--gemini {
  background: linear-gradient(180deg, rgba(142, 117, 255, 0.16), rgba(66, 133, 244, 0.08));
  border-color: rgba(142, 117, 255, 0.34);
  box-shadow: 0 8px 22px rgba(66, 133, 244, 0.16);
}

.assistant-avatar img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.assistant-avatar--chatgpt img {
  width: 26px;
  height: 26px;
}

.assistant-avatar--gemini img {
  width: 26px;
  height: 26px;
}

.message.user .bubble {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 6px;
  padding: 14px 16px;
}

.message.assistant .bubble {
  padding-top: 2px;
}

.bubble {
  line-height: 1.65;
  word-break: break-word;
  min-width: 0;
}

.bubble.user-text {
  white-space: pre-wrap;
}

.bubble.error {
  color: var(--danger);
}

.bubble.thinking {
  color: var(--muted);
}

.thinking-status {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 1.65em;
}

.thinking-text {
  display: inline-block;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.thinking-text.fade-out {
  opacity: 0.35;
  transform: translateY(2px);
}

.thinking-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 2px;
}

.thinking-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: thinking-dot 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes thinking-dot {
  0%, 80%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.bubble.markdown :first-child {
  margin-top: 0;
}

.bubble.markdown :last-child {
  margin-bottom: 0;
}

.bubble.markdown p,
.bubble.markdown ul,
.bubble.markdown ol,
.bubble.markdown pre,
.bubble.markdown blockquote {
  margin: 0.75em 0;
}

.bubble.markdown h1,
.bubble.markdown h2,
.bubble.markdown h3,
.bubble.markdown h4 {
  margin: 1em 0 0.5em;
  line-height: 1.3;
}

.bubble.markdown h1 { font-size: 1.4rem; }
.bubble.markdown h2 { font-size: 1.25rem; }
.bubble.markdown h3 { font-size: 1.1rem; }

.bubble.markdown ul,
.bubble.markdown ol {
  padding-left: 1.4rem;
}

.bubble.markdown li + li {
  margin-top: 0.35em;
}

.bubble.markdown a {
  color: var(--accent);
}

.bubble.markdown code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15em 0.35em;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.bubble.markdown pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
}

.code-block {
  margin: 0.85em 0;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  background: #0d1117;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.copy-btn,
.small-btn {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: transparent;
}

.code-block pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.bubble.markdown blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--muted);
}

.bubble.markdown table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.bubble.markdown th,
.bubble.markdown td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.composer-wrap {
  flex-shrink: 0;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(16px);
}

.composer {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 10px 10px 10px 14px;
  box-shadow: var(--shadow);
}

.composer:focus-within {
  border-color: rgba(32, 184, 205, 0.35);
  box-shadow: 0 0 0 4px rgba(32, 184, 205, 0.08), var(--shadow);
}

#prompt {
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  max-height: 180px;
  padding: 10px 4px;
}

#send-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: #041016;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(32, 184, 205, 0.24);
}

#send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hint {
  max-width: 860px;
  margin: 12px auto 0;
  text-align: center;
}

.sidebar-backdrop {
  display: none;
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.account-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.account-role {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: capitalize;
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.admin-form {
  display: grid;
  gap: 8px;
}

.admin-form input,
.admin-form select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.user-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
}

.user-row-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.user-row-meta {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: capitalize;
}

.login-page {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.login-shell {
  min-height: 100dvh;
  padding: clamp(16px, 3vw, 32px);
  padding-bottom: calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-bottom));
}

.login-layout {
  min-height: calc(100dvh - clamp(32px, 6vw, 64px));
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.login-panel-inner {
  width: 100%;
  padding: clamp(24px, 4vw, 36px) clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(18, 24, 32, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-logo {
  width: min(100%, 220px);
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 0 0 20px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.login-panel h1 {
  margin: 0;
  text-align: left;
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  letter-spacing: -0.03em;
}

.login-subtitle {
  color: var(--muted);
  margin: 8px 0 24px;
  text-align: left;
  line-height: 1.5;
}

.login-credit {
  margin-top: 22px;
  text-align: left;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.login-form input {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(63, 168, 111, 0.45);
  box-shadow: 0 0 0 3px rgba(63, 168, 111, 0.12);
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.login-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
}

.login-showcase {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(63, 168, 111, 0.14), transparent 42%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.1), transparent 38%),
    rgba(18, 24, 32, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(63, 168, 111, 0.04), transparent 55%);
  pointer-events: none;
}

.showcase-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: clamp(24px, 4vw, 36px) clamp(20px, 3vw, 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.showcase-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.showcase-title {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.showcase-lead {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 52ch;
}

.showcase-providers {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.provider-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.provider-card strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.provider-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.provider-logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.provider-card--perplexity {
  border-color: rgba(63, 168, 111, 0.22);
  background: linear-gradient(90deg, rgba(63, 168, 111, 0.08), rgba(255, 255, 255, 0.02));
}

.provider-card--chatgpt {
  border-color: rgba(16, 163, 127, 0.22);
  background: linear-gradient(90deg, rgba(16, 163, 127, 0.08), rgba(255, 255, 255, 0.02));
}

.provider-card--gemini {
  border-color: rgba(142, 117, 255, 0.22);
  background: linear-gradient(90deg, rgba(142, 117, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.showcase-section {
  margin-bottom: 20px;
}

.showcase-section-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.model-chip--accent {
  border-color: rgba(63, 168, 111, 0.24);
  background: rgba(63, 168, 111, 0.1);
  color: #b8f0d0;
}

.model-chip--highlight {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.12);
  color: #c7d9ff;
}

.showcase-features {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.showcase-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.showcase-feature strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.showcase-feature span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.showcase-feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-panel {
    justify-content: stretch;
  }

  .login-showcase {
    max-height: none;
  }

  .showcase-inner {
    overflow: visible;
  }

  .model-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .model-chips::-webkit-scrollbar {
    display: none;
  }

  .showcase-providers {
    grid-template-columns: 1fr;
  }

  .showcase-features {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 560px) and (max-width: 900px) {
  .showcase-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 901px) and (max-width: 1040px) {
  .login-layout {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  }

  .showcase-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 901px) {
  .login-panel-inner,
  .login-showcase {
    min-height: min(720px, calc(100dvh - 64px));
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-only {
    display: grid;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

  #model-select {
    width: 100%;
    max-width: none;
  }

  .messages {
    padding: 16px 12px 24px;
  }
}
