@font-face {
  font-family: "Avara";
  src: url("/fonts/app/avara/Avara-Black.otf") format("opentype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --sidebar: #f0ede6;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --surface-3: #f2efe9;
  --line: rgba(58, 70, 82, 0.13);
  --line-strong: rgba(74, 168, 168, 0.4);
  --text: #2f3a44;
  --muted: #64727f;
  --faint: #8a97a3;
  --accent: #3f9d9d;
  --accent-soft: #7cc2c2;
  --purple: #8b7fd6;
  --warning: #c9893d;
  --danger: #cf5f76;
  --success: #47957a;
  --shadow-soft: rgba(58, 70, 82, 0.13);
  --sidebar-width: 292px;
  --font-sans: "Noto Sans SC Variable", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "LXGW WenKai", "Noto Sans SC Variable", ui-serif, serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --font-brand-en: "Avara", "LXGW WenKai", var(--font-sans);
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { margin: 0; overflow: hidden; color: var(--text); background: var(--bg); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
.hidden { display: none !important; }

.app-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); width: 100%; height: 100dvh; transition: grid-template-columns .24s ease; }
.app-layout.sidebar-hidden { grid-template-columns: 0 minmax(0, 1fr); }

.sidebar { position: relative; z-index: 30; display: flex; min-width: 0; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: linear-gradient(180deg, #f1eee7 0%, #ece8e0 100%); transition: transform .24s ease, opacity .2s ease; }
.sidebar-hidden .sidebar { opacity: 0; transform: translateX(-100%); pointer-events: none; }
.sidebar-header { display: flex; align-items: center; gap: 11px; height: 67px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); }
.brand-avatar { flex: 0 0 35px; width: 35px; height: 35px; border: 2px solid rgba(74,168,168,.4); border-radius: 50%; object-fit: cover; background: var(--surface); }
.brand-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.brand-copy strong { overflow: hidden; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong .brand-en { font-family: var(--font-brand-en); font-weight: 400; letter-spacing: .04em; }
.brand-kicker { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.icon-button { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; transition: .18s ease; }
.icon-button:hover { color: var(--text); border-color: var(--line); background: rgba(58,70,82,.05); }
.collapse-button { font-size: 24px; }
.new-session-button { display: flex; align-items: center; justify-content: center; gap: 9px; height: 42px; margin: 14px; border: 1px solid var(--line-strong); border-radius: 11px; color: #226060; background: rgba(74,168,168,.1); font-size: 12px; font-weight: 700; transition: .18s ease; }
.new-session-button:hover { background: rgba(74,168,168,.18); transform: translateY(-1px); }

.sidebar-section { min-height: 0; padding: 0 10px 10px; }
.sessions-section { flex: 1.08; }
.jobs-section { flex: .92; border-top: 1px solid var(--line); padding-top: 9px; }
.sidebar-section-heading { display: flex; align-items: center; justify-content: space-between; height: 33px; padding: 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.count-label { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: var(--muted); background: rgba(58,70,82,.07); text-align: center; font-size: 10px; }
.vertical-list { height: calc(100% - 33px); overflow-x: hidden; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; scrollbar-color: rgba(100,114,127,.3) transparent; }
.empty-state { margin: 10px 7px; color: var(--faint); font-size: 12px; line-height: 1.5; }
.session-item, .job-item { display: block; width: 100%; margin: 2px 0; border: 1px solid transparent; border-radius: 10px; color: var(--text); text-align: left; background: transparent; transition: .16s ease; }
.session-item { padding: 10px 26px 9px 10px; }
.session-item-wrap { position: relative; }
.session-delete { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); display: grid; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 7px; color: var(--faint); background: transparent; font-size: 15px; line-height: 1; opacity: 0; transition: .16s ease; }
.session-item-wrap:hover .session-delete, .session-delete:focus-visible { opacity: 1; }
.session-delete:hover { color: var(--danger); background: rgba(207,95,118,.1); }
@media (hover: none) { .session-delete { opacity: 1; } }
.session-item:hover, .job-item:hover { background: rgba(58,70,82,.05); }
.session-item.active { border-color: rgba(74,168,168,.3); background: rgba(74,168,168,.1); }
.session-item-title, .job-item-title { overflow: hidden; color: #3a4653; font-size: 12.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.session-item.active .session-item-title { color: #226060; }
.session-item-meta, .job-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--faint); font-size: 10.5px; }
.job-item { padding: 9px 10px; }
.job-item.active { background: rgba(139,127,214,.1); }
.job-status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--faint); }
.job-status-dot.completed { background: var(--success); }
.job-status-dot.failed { background: var(--danger); }
.job-status-dot.needs_input { background: var(--warning); }
.job-status-dot.running { background: var(--accent); box-shadow: 0 0 8px rgba(74,168,168,.7); }
.sidebar-footer { display: flex; align-items: center; gap: 7px; height: 45px; padding: 0 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-link { color: var(--muted); text-decoration: none; font-size: 11px; white-space: nowrap; transition: .16s ease; }
.sidebar-link:hover { color: var(--accent); }
.sidebar-link span { font-size: 10px; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.health-dot.ok { background: var(--success); box-shadow: 0 0 8px rgba(71,149,122,.5); }
.health-dot.error { background: var(--danger); }
.comfy-address { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 10px; }
.sidebar-scrim { display: none; }

.main-shell { display: flex; min-width: 0; height: 100dvh; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 80% -10%, rgba(139,178,178,.22), transparent 34rem), var(--bg); }
.main-header { position: relative; z-index: 10; display: flex; align-items: center; gap: 12px; flex: 0 0 67px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(247,245,240,.9); backdrop-filter: blur(18px); }
.menu-button { display: none; }
.sidebar-hidden .menu-button { display: grid; }
.session-heading { min-width: 0; flex: 1; }
.session-title-row { display: flex; align-items: center; gap: 9px; }
.session-title-row h1 { overflow: hidden; margin: 0; font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.text-button { padding: 2px 6px; border: 0; color: var(--faint); background: transparent; font-size: 10.5px; }
.text-button:hover { color: var(--accent); }
.session-id { display: block; overflow: hidden; max-width: 500px; margin-top: 3px; color: var(--faint); font-family: var(--font-mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.job-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; color: var(--muted); background: rgba(58,70,82,.06); font-size: 10.5px; font-weight: 800; }
.job-badge.running { color: #1f6b6b; background: rgba(74,168,168,.14); }
.job-badge.completed { color: #2e7a5f; background: rgba(71,149,122,.13); }
.job-badge.needs_input { color: #9c6a1f; background: rgba(201,137,61,.13); }
.job-badge.failed { color: #a03a50; background: rgba(207,95,118,.12); }

.agent-stage { min-height: 0; flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.agent-feed { width: min(100%, 1060px); min-height: 100%; margin: 0 auto; padding: 34px 42px 54px; }
.welcome-panel { display: grid; min-height: 52vh; place-content: center; justify-items: center; text-align: center; }
.welcome-avatar { width: 88px; height: 88px; border: 3px solid #ffffff; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 24px rgba(74,168,168,.22), 0 0 0 1px rgba(74,168,168,.22); }
.welcome-panel h2 { margin: 17px 0 8px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: 0; }
.welcome-panel > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.suggestion-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.suggestion { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: #55636f; background: #ffffff; font-size: 12.5px; }
.suggestion:hover { border-color: var(--line-strong); color: var(--accent); background: rgba(74,168,168,.07); }

.timeline-divider { display: flex; align-items: center; gap: 12px; margin: 23px 0 18px; color: var(--faint); font-size: 11px; }
.timeline-divider::before, .timeline-divider::after { height: 1px; flex: 1; content: ""; background: var(--line); }
.chat-message { display: flex; gap: 11px; margin: 17px 0; }
.chat-message.user { justify-content: flex-end; }
.message-avatar { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: var(--surface); font-size: 12px; font-weight: 800; }
.message-content { max-width: min(780px, 85%); padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; color: #3a4653; background: #ffffff; font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.chat-message.user .message-content { border-color: rgba(74,168,168,.28); border-radius: 14px 4px 14px 14px; color: #2d5252; background: rgba(74,168,168,.12); }

.turn-section { margin: 20px 0 30px; }
.turn-header { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.turn-header strong { color: #2f3a44; font-size: 13px; }
.turn-id { color: var(--faint); font-family: var(--font-mono); font-size: 10px; }
.turn-status { margin-left: auto; color: var(--muted); font-size: 10.5px; }
.progress-track { height: 3px; overflow: hidden; border-radius: 999px; background: rgba(47,58,68,.09); }
.progress-bar { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transition: width .3s ease; }
.status-copy { min-height: 18px; margin: 8px 0 14px; color: var(--faint); font-size: 12px; }
.trace-root { display: flex; flex-direction: column; gap: 10px; }
.trace-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fdfcf9; }
.trace-card summary { display: flex; align-items: center; gap: 8px; padding: 11px 13px; color: #3a4653; cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; }
.trace-card summary::-webkit-details-marker { display: none; }
.trace-card summary::before { content: "›"; color: var(--faint); font-size: 16px; transform: rotate(90deg); transition: .18s; }
.trace-card:not([open]) summary::before { transform: rotate(0); }
.trace-card.thinking { border-color: rgba(139,127,214,.25); background: rgba(139,127,214,.08); }
.trace-card.thinking summary { color: #5b4fb0; }
.trace-card.tool { border-color: rgba(201,137,61,.28); background: rgba(201,137,61,.08); }
.trace-card.tool summary { color: #8a5f1f; }
.trace-card.error { border-color: rgba(207,95,118,.32); }
.trace-text { max-height: 360px; overflow: auto; margin: 0; padding: 0 14px 13px 30px; color: #55636f; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.agent-output { padding: 13px 15px; border-left: 2px solid var(--accent); border-radius: 0 12px 12px 0; color: #38444f; background: rgba(74,168,168,.07); font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.agent-event-marker { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11px; }
.agent-event-marker::before { width: 6px; height: 6px; border-radius: 50%; content: ""; background: var(--accent); }
.plan-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #ffffff; font-size: 12px; line-height: 1.7; }
.plan-card strong { color: #2f3a44; }
.result-block { margin-top: 16px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.result-heading strong { font-size: 13.5px; }
.result-heading span { color: var(--faint); font-size: 10.5px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fdfcf9; }
.result-card img { display: block; width: 100%; max-height: 560px; object-fit: contain; background: #f1eee8; }
.result-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; color: var(--muted); font-size: 11.5px; }
.result-card-footer a { color: var(--accent); text-decoration: none; }
.scene-summary { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.error-banner, .question-banner { padding: 11px 13px; border: 1px solid rgba(201,137,61,.4); border-radius: 11px; color: #8a5f1f; background: rgba(201,137,61,.1); font-size: 12.5px; line-height: 1.6; }
.error-banner { border-color: rgba(207,95,118,.4); color: #a03a50; background: rgba(207,95,118,.08); }

.composer-shell { position: relative; z-index: 12; flex: 0 0 auto; padding: 0 24px 18px; background: linear-gradient(180deg, transparent 0, rgba(247,245,240,.92) 18%, var(--bg) 46%); }
.composer-inner { width: min(100%, 980px); margin: 0 auto; }
.question-banner { margin-bottom: 8px; }
.settings-drawer { margin-bottom: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9; box-shadow: 0 -12px 36px var(--shadow-soft); }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.drawer-heading > div { display: flex; flex-direction: column; gap: 3px; }
.drawer-heading strong { font-size: 13px; }
.drawer-heading span { color: var(--faint); font-size: 10px; }
.settings-grid { display: grid; grid-template-columns: 1.35fr 1fr 1.15fr .65fr .8fr; gap: 10px; }
.settings-grid label { color: var(--muted); font-size: 10.5px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); outline: none; color: var(--text); background: #ffffff; transition: .18s ease; }
input:focus, select:focus, textarea:focus { border-color: rgba(74,168,168,.6); box-shadow: 0 0 0 3px rgba(74,168,168,.14); }
.settings-grid input, .settings-grid select { height: 38px; margin-top: 6px; padding: 0 10px; border-radius: 9px; font-size: 12px; }
.reference-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 11px; background: #fdfcf9; }
.reference-preview img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.reference-preview > div { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.reference-preview strong { overflow: hidden; color: #3a4653; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.reference-preview span { color: var(--faint); font-size: 9.5px; }
.composer-form { overflow: hidden; border: 1px solid rgba(58,70,82,.16); border-radius: 16px; background: #fffdf9; box-shadow: 0 14px 46px rgba(58,70,82,.13); }
.composer-toolbar { display: flex; align-items: center; gap: 5px; padding: 7px 9px 0; }
.toolbar-button { display: inline-flex; align-items: center; gap: 5px; min-height: 27px; padding: 0 8px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10.5px; }
.toolbar-button:hover, .toolbar-button.active { color: var(--accent); background: rgba(74,168,168,.08); }
.composer-context { margin-left: auto; padding-right: 3px; color: var(--faint); font-size: 10px; }
.composer-row { display: flex; align-items: flex-end; gap: 9px; padding: 7px 9px 9px 13px; }
.composer-row textarea { min-height: 42px; max-height: 150px; resize: none; overflow-y: auto; padding: 10px 1px 7px; border: 0; background: transparent; box-shadow: none; font-size: 14.5px; line-height: 1.55; }
.composer-row textarea::placeholder { color: #93a1ac; }
.send-button { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; min-width: 74px; height: 38px; justify-content: center; border: 0; border-radius: 11px; color: #0e3d3d; background: linear-gradient(135deg, var(--accent-soft), var(--accent)); font-size: 12px; font-weight: 900; box-shadow: 0 6px 18px rgba(63,157,157,.25); }
.send-button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.send-button:disabled { cursor: not-allowed; opacity: .48; filter: none; transform: none; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: min(390px, calc(100% - 40px)); padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: #ffffff; box-shadow: 0 14px 34px rgba(58,70,82,.16); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .app-layout { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); opacity: 0; transform: translateX(-100%); pointer-events: none; }
  .app-layout.sidebar-open .sidebar { opacity: 1; transform: translateX(0); pointer-events: auto; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 20; display: block; border: 0; opacity: 0; pointer-events: none; background: rgba(58,70,82,.35); transition: .2s ease; }
  .app-layout.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .menu-button, .sidebar-hidden .menu-button { display: grid; }
  .collapse-button { transform: rotate(180deg); }
  .main-shell { width: 100%; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid label:first-child { grid-column: span 2; }
}

@media (max-width: 620px) {
  .main-header { padding: 0 12px; }
  .header-actions .icon-button { display: none; }
  .session-id { max-width: 220px; }
  .agent-feed { padding: 25px 14px 42px; }
  .welcome-panel { min-height: 48vh; }
  .suggestion-row { align-items: stretch; flex-direction: column; }
  .suggestion { width: 100%; }
  .message-content { max-width: 92%; }
  .result-grid { grid-template-columns: 1fr; }
  .composer-shell { padding: 0 10px 10px; }
  .composer-context { display: none; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid label:first-child, .settings-grid label:nth-child(3) { grid-column: span 2; }
  .send-button { min-width: 46px; }
  .send-button span:first-child { display: none; }
}

/* ===== 登录界面 ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1100px 700px at 15% -10%, rgba(63, 157, 157, 0.28), transparent 60%),
    radial-gradient(900px 650px at 112% 112%, rgba(139, 127, 214, 0.26), transparent 55%),
    linear-gradient(160deg, #1b2a33 0%, #243642 55%, #2c3d48 100%);
}
.login-card {
  width: min(380px, 100%); padding: 40px 36px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px;
  background: rgba(247, 245, 240, 0.985);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  text-align: center;
  animation: login-in 0.45s ease both;
}
@keyframes login-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.login-avatar {
  width: 78px; height: 78px; border: 3px solid rgba(63, 157, 157, 0.45);
  border-radius: 50%; object-fit: cover; background: var(--surface);
}
.login-brand { margin-top: 13px; }
.login-brand .brand-kicker { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: 0.2em; }
.login-brand strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--text); }
.login-brand strong .brand-en { font-family: var(--font-brand-en); font-weight: 400; }
.login-subtitle { margin: 7px 0 26px; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.login-field input {
  height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); outline: none; transition: 0.18s ease;
}
.login-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 157, 157, 0.18); }
.login-remember { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; cursor: pointer; user-select: none; }
.login-remember input { width: 15px; height: 15px; accent-color: var(--accent); }
.login-error { margin: 0; color: var(--danger); font-size: 12.5px; text-align: left; }
.login-button {
  height: 44px; margin-top: 2px; border: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent) 0%, #2e7d7d 100%);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.22em; cursor: pointer;
  box-shadow: 0 6px 18px rgba(63, 157, 157, 0.35); transition: 0.18s ease;
}
.login-button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(63, 157, 157, 0.45); }
.login-button:disabled { opacity: 0.6; cursor: default; transform: none; }
.login-hint { margin: 22px 0 0; color: var(--faint); font-size: 11.5px; }

.logout-button {
  margin-left: auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; transition: 0.16s ease;
}
.logout-button:hover { color: var(--danger); border-color: rgba(207, 95, 118, 0.45); }

.auth-mode-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin: 0 0 22px; border-radius: 11px; background: var(--surface-3);
}
.auth-mode {
  height: 34px; border: none; border-radius: 8px; color: var(--muted);
  background: transparent; font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  cursor: pointer; transition: 0.18s ease;
}
.auth-mode.active { color: #fff; background: linear-gradient(135deg, var(--accent) 0%, #2e7d7d 100%); box-shadow: 0 3px 10px rgba(63, 157, 157, 0.3); }
.auth-mode:not(.active):hover { color: var(--text); }

.current-user {
  max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--accent); font-weight: 700; font-size: 11px;
}
