:root {
  color-scheme: light;
  --bg: #f4f7fc;
  --bg-gradient-top: #f7f9fd;
  --bg-gradient-bottom: #edf2fb;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --border: #d6dfef;
  --text: #14213d;
  --muted: #64748b;
  --primary: #316eff;
  --primary-hover: #467dff;
  --danger: #d6455d;
  --user-bubble: #dfe9ff;
  --assistant-bubble: #ffffff;
  --surface-subtle: rgba(20, 33, 61, 0.03);
  --surface-subtle-hover: rgba(20, 33, 61, 0.06);
  --surface-strong: rgba(20, 33, 61, 0.05);
  --shadow-focus: rgba(49, 110, 255, 0.15);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f7fc;
  --bg-gradient-top: #f7f9fd;
  --bg-gradient-bottom: #edf2fb;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --border: #d6dfef;
  --text: #14213d;
  --muted: #64748b;
  --primary: #316eff;
  --primary-hover: #467dff;
  --danger: #d6455d;
  --user-bubble: #dfe9ff;
  --assistant-bubble: #ffffff;
  --surface-subtle: rgba(20, 33, 61, 0.03);
  --surface-subtle-hover: rgba(20, 33, 61, 0.06);
  --surface-strong: rgba(20, 33, 61, 0.05);
  --shadow-focus: rgba(49, 110, 255, 0.15);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg-gradient-top) 0%, var(--bg-gradient-bottom) 100%);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  overflow: visible;
}

.login-view,
:root[data-theme='light'] .login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  background: url('../background.png') center center / cover no-repeat;
}

.login-view::before,
.login-view::after {
  content: '';
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.login-view::before {
  inset: 0;
  opacity: 0;
  background: transparent;
  mask-image: none;
}

.login-view::after {
  width: min(44vw, 520px);
  height: min(44vw, 520px);
  border-radius: 999px;
  right: 8vw;
  bottom: 10vh;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 68%);
  filter: blur(10px);
}

.portal-header {
  width: min(1180px, 100%);
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.portal-hero {
  position: relative;
  text-align: center;
}

.portal-hero-content {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 4px 16px 2px;
  color: #12203b;
}

.portal-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 42px rgba(8, 15, 30, 0.12);
  backdrop-filter: blur(18px) saturate(150%);
  scrollbar-width: thin;
}

.portal-nav-item {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(22, 101, 52, 0.18);
  border-radius: 8px;
  color: #17324d;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.portal-nav-item:hover {
  border-color: rgba(22, 101, 52, 0.34);
  background: rgba(255, 255, 255, 0.84);
}

.portal-nav-item.active {
  border-color: rgba(22, 101, 52, 0.58);
  color: #ffffff;
  background: #166534;
  box-shadow: 0 10px 24px rgba(22, 101, 52, 0.28);
}

.portal-nav-item:disabled,
.portal-nav-item[aria-disabled='true'] {
  cursor: default;
  opacity: 0.58;
  color: rgba(23, 50, 77, 0.72);
  background: rgba(255, 255, 255, 0.38);
}

.portal-nav-item:disabled:hover,
.portal-nav-item[aria-disabled='true']:hover {
  border-color: rgba(22, 101, 52, 0.18);
  background: rgba(255, 255, 255, 0.38);
}

.portal-nav-toggle {
  display: none;
}

.login-stage {
  width: min(1180px, 100%);
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 480px);
  gap: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding-bottom: 24px;
}

.high-resolution-view .login-stage {
  grid-template-columns: minmax(0, 1fr);
}

.daily-updates-panel {
  width: 100%;
  height: 580px;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 26px 70px rgba(8, 14, 28, 0.18);
  backdrop-filter: blur(20px) saturate(140%);
  color: #16233d;
}

.daily-updates-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(20, 33, 61, 0.1);
}

.daily-updates-heading {
  min-width: 0;
}

.daily-updates-heading h2 {
  margin: 0;
  color: #12203b;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.daily-updates-language {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 8px;
  background: rgba(20, 33, 61, 0.06);
}

.daily-updates-language-button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(18, 32, 59, 0.68);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.daily-updates-language-button:hover {
  color: #12203b;
}

.daily-updates-language-button.active {
  background: #ffffff;
  color: #12203b;
  box-shadow: 0 2px 8px rgba(8, 14, 28, 0.1);
}

.daily-updates-language-button:focus-visible,
.daily-updates-retry:focus-visible,
.daily-updates-scroll:focus-visible,
.daily-update-link:focus-visible {
  outline: 3px solid rgba(49, 110, 255, 0.25);
  outline-offset: 2px;
}

.daily-updates-run-status {
  margin: 0;
  padding: 9px 24px;
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(22, 101, 52, 0.07);
  color: #245d38;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.daily-updates-run-status.partial {
  background: rgba(180, 83, 9, 0.08);
  color: #8a460c;
}

.daily-updates-run-status.stale {
  background: rgba(180, 35, 72, 0.08);
  color: #9f2546;
}

.daily-updates-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.daily-updates-list {
  min-width: 0;
}

.daily-updates-date-group {
  margin: 0;
  padding: 10px 24px 8px;
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(238, 244, 255, 0.72);
  color: rgba(18, 32, 59, 0.68);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.daily-update-item {
  min-width: 0;
  padding: 18px 24px 17px;
  border-bottom: 1px solid rgba(20, 33, 61, 0.1);
}

.daily-update-title {
  margin: 0;
  overflow-wrap: anywhere;
  color: #12203b;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.42;
  letter-spacing: 0;
}

.daily-update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 8px;
  color: rgba(18, 32, 59, 0.6);
  font-size: 15px;
  line-height: 1.4;
}

.daily-update-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-update-summary {
  margin: 11px 0 0;
  overflow-wrap: anywhere;
  color: rgba(18, 32, 59, 0.82);
  font-size: 15px;
  line-height: 1.62;
  white-space: pre-line;
}

.daily-update-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.daily-update-translation-pending {
  color: #8a460c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.daily-update-link {
  margin-left: auto;
  color: #1c4f98;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

.daily-update-link::after {
  content: ' \2197';
}

.daily-update-link:hover {
  color: #166534;
  text-decoration: underline;
}

.daily-updates-feedback {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  text-align: center;
}

.daily-updates-feedback p {
  margin: 0;
  color: rgba(18, 32, 59, 0.66);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}

.daily-updates-feedback.error p {
  color: #9f2546;
}

.daily-updates-retry {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(20, 33, 61, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #12203b;
  font-size: 14px;
  font-weight: 750;
}

.daily-updates-retry:hover {
  border-color: rgba(22, 101, 52, 0.4);
  background: #ffffff;
}

.daily-updates-loading-more {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(18, 32, 59, 0.62);
  font-size: 13px;
  font-weight: 700;
}

.daily-updates-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(20, 33, 61, 0.16);
  border-top-color: #166534;
  border-radius: 50%;
  animation: daily-updates-spin 700ms linear infinite;
}

.daily-updates-sentinel {
  width: 100%;
  height: 1px;
}

@keyframes daily-updates-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .daily-updates-spinner {
    animation: none;
  }
}

.login-logo-frame {
  width: 238px;
  height: 238px;
  border-radius: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.26);
  border: none;
  box-shadow: 0 14px 40px rgba(17, 25, 45, 0.12);
  overflow: hidden;
}

.login-logo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-brand-subtitle {
  margin: 0;
  color: rgba(18, 32, 59, 0.68);
  font-size: 16px;
  line-height: 1.5;
}

:root[data-theme='light'] .login-brand-subtitle {
  color: rgba(18, 32, 59, 0.68);
}

.login-card[data-auth-mode='home'] {
  justify-content: center;
  text-align: center;
  min-height: 580px;
}

.login-card[data-auth-mode='home'] .login-card-brand {
  margin-top: auto;
}

.login-card[data-auth-mode='home'] .auth-home-view {
  margin-top: 28px;
  margin-bottom: auto;
}

.login-card-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-brand-wordmark {
  font-size: 36px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #12203b;
}

.auth-home-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-legal-link {
  align-self: center;
  color: #263d6c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.auth-legal-link:hover,
.auth-legal-link:focus-visible {
  color: var(--primary);
}

.login-home-button {
  width: 100%;
}

.login-card-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.login-card {
  width: min(100%, 480px);
  border-radius: 32px;
  padding: 36px 32px 30px;
  max-height: none;
  overflow: visible;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(20px) saturate(145%);
  box-shadow: 0 26px 80px rgba(8, 14, 28, 0.22);
  color: #16233d;
}

@media (max-height: 760px) {
  .login-view,
  :root[data-theme='light'] .login-view {
    grid-template-rows: auto auto;
    align-content: start;
  }

  .login-stage {
    align-items: flex-start;
  }
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.12) 100%);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-card-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.high-resolution-card {
  max-width: 520px;
}

.high-resolution-message {
  align-items: flex-start;
}

.high-resolution-return {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 120ms ease;
}

.high-resolution-return:hover {
  background: var(--primary-hover);
}

.login-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-secondary-button {
  width: 100%;
}

.temporary-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.temporary-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(9px);
}

.temporary-confirm-dialog {
  position: relative;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.98) 100%);
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.28);
  color: #14213d;
}

.temporary-confirm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(20, 33, 61, 0.62);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.temporary-confirm-close:hover {
  border-color: rgba(20, 33, 61, 0.1);
  background: rgba(20, 33, 61, 0.05);
  color: #14213d;
}

.temporary-confirm-close-icon,
.temporary-confirm-mark-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.temporary-confirm-close-icon {
  width: 17px;
  height: 17px;
}

.temporary-confirm-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(29, 45, 80, 0.12);
  border-radius: 18px;
  background: rgba(49, 110, 255, 0.1);
  color: #1d2d50;
}

.temporary-confirm-mark-icon {
  width: 25px;
  height: 25px;
}

.temporary-confirm-dialog h2 {
  margin: 0;
  color: #12203b;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 760;
  letter-spacing: 0;
}

.temporary-confirm-dialog p {
  margin: 2px 0 0;
  color: #4b5870;
  font-size: 16px;
  line-height: 1.62;
}

.temporary-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.temporary-confirm-actions button {
  min-height: 50px;
  border-radius: 16px;
  font-weight: 650;
}

.temporary-confirm-actions button.primary {
  background: #1d2d50;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(29, 45, 80, 0.18);
}

.temporary-confirm-actions button.primary:hover {
  background: #24375f;
}

.temporary-confirm-actions button:disabled,
.temporary-confirm-actions button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.46;
}

.temporary-confirm-actions button.ghost {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(20, 33, 61, 0.12);
  color: #16233d;
}

.temporary-confirm-actions button.ghost:hover {
  background: rgba(255, 255, 255, 0.78);
}

.signup-wait-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 0 2px;
}

.runtime-start-view {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 6px 0 2px;
}

.runtime-start-spinner {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(49, 110, 255, 0.08);
  border: 1px solid rgba(49, 110, 255, 0.16);
}

.runtime-start-spinner span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.28;
  animation: liteEllipsisPulse 1.1s infinite ease-in-out;
}

.runtime-start-spinner span:nth-child(2) {
  animation-delay: 0.14s;
}

.runtime-start-spinner span:nth-child(3) {
  animation-delay: 0.28s;
}

.runtime-start-view h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.runtime-start-view p {
  margin: 0;
  line-height: 1.6;
}

.runtime-start-actions {
  width: 100%;
}

.signup-wait-kicker {
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #3557a6;
  font-weight: 700;
}

.signup-wait-view h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.signup-wait-view p {
  margin: 0;
  line-height: 1.6;
}

.signup-wait-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-step {
  border: 1px solid rgba(20, 33, 61, 0.1);
  background: rgba(255, 255, 255, 0.44);
  border-radius: 14px;
  padding: 12px 14px;
  color: rgba(18, 32, 59, 0.68);
}

.signup-step.active {
  border-color: rgba(49, 110, 255, 0.24);
  background: rgba(49, 110, 255, 0.12);
  color: #12203b;
}

.signup-step.completed {
  border-color: rgba(20, 33, 61, 0.12);
  color: #12203b;
}

.login-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-card-label {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(28, 53, 103, 0.14);
  background: rgba(28, 53, 103, 0.08);
  color: #274784;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

:root[data-theme='light'] .login-card-label {
  color: #274784;
}

.login-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.045em;
  color: #12203b;
}

.login-card-header p {
  margin: 0;
  line-height: 1.65;
}

.login-card .muted,
.login-card-header p,
.signup-wait-view p,
.runtime-start-view p {
  color: rgba(18, 32, 59, 0.68);
}

.login-submit {
  margin-top: 4px;
}

.login-inline-action {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.login-link-button {
  border: 0;
  background: transparent;
  color: #1d2d50;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.login-link-button:hover {
  color: var(--primary);
  text-decoration: underline;
}

.email-verification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  align-items: stretch;
}

.login-card .email-code-button {
  min-height: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.code-status {
  color: rgba(18, 32, 59, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.agreement-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agreement-checkbox-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: #344056;
  font-size: 13px;
  line-height: 1.48;
  cursor: pointer;
}

.agreement-checkbox-row input,
.login-card .agreement-checkbox-row input,
:root[data-theme='light'] .login-card .agreement-checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #1d2d50;
}

.agreement-checkbox-row a {
  color: #1f58a6;
  font-weight: 650;
}

.agreement-checkbox-row a:hover,
.agreement-checkbox-row a:focus-visible {
  color: var(--primary);
}

.temporary-agreement-checkbox-row {
  margin-top: 2px;
}

.temporary-confirm-dialog .agreement-checkbox-row {
  color: #344056;
}

.login-card button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.brand {
  color: var(--primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.brand.small {
  margin-bottom: 4px;
}

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

.tiny {
  font-size: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-6 {
  gap: 6px;
}

.gap-12 {
  gap: 12px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--shadow-focus);
}

.login-card input {
  border-radius: 16px;
  border-color: rgba(20, 33, 61, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: #12203b;
}

.login-card input::placeholder {
  color: rgba(18, 32, 59, 0.42);
}

:root[data-theme='light'] .login-card input {
  background: rgba(255, 255, 255, 0.7);
}

.login-card input:focus {
  border-color: rgba(49, 110, 255, 0.35);
  box-shadow: 0 0 0 4px rgba(49, 110, 255, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

button.primary,
button.ghost {
  border-radius: 12px;
  border: 1px solid transparent;
  transition: 120ms ease;
}

button.primary {
  background: var(--primary);
  color: white;
  padding: 11px 16px;
}

button.primary:hover {
  background: var(--primary-hover);
}

button.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  padding: 10px 14px;
}

.login-card button.primary,
.login-card button.ghost {
  min-height: 50px;
  border-radius: 16px;
  font-weight: 600;
}

.login-card button.primary {
  background: #1d2d50;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(29, 45, 80, 0.18);
}

.login-card button.primary:hover {
  background: #24375f;
}

.login-card button.ghost {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(20, 33, 61, 0.12);
  color: #16233d;
}

.login-card button.ghost:hover {
  background: rgba(255, 255, 255, 0.48);
}

button.ghost:hover {
  background: var(--surface-subtle-hover);
}

button.small {
  padding: 8px 12px;
  font-size: 13px;
}

button.stretch {
  width: 100%;
}

.error {
  color: #b42348;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
}

.success {
  color: #1f8a5b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-error {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 129, 0.24);
  border-radius: 12px;
  background: rgba(255, 107, 129, 0.08);
}

:root[data-theme='light'] .chat-error {
  border-color: rgba(214, 69, 93, 0.18);
  background: rgba(214, 69, 93, 0.08);
}

.workspace-view {
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width, 300px) 8px minmax(0, 1fr);
  overflow: hidden;
}

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

:root[data-theme='light'] .sidebar {
  background: rgba(255, 255, 255, 0.85);
}

.sidebar-header,
.files-header,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-header > div:first-child {
  min-width: 0;
}

#user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-section-title {
  margin-top: 4px;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-section-title.no-margin {
  margin: 0;
}

.chat-list {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.chat-load-more-shell {
  padding: 8px 0 4px;
}

.chat-load-more-button {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.chat-load-more-button:hover:not(:disabled) {
  border-color: #36508a;
  background: #142449;
}

:root[data-theme='light'] .chat-load-more-button:hover:not(:disabled) {
  border-color: #8db0ff;
  background: #f8fbff;
}

.chat-load-more-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.chat-item-shell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-item-shell.renaming .chat-item-actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-item-editing {
  cursor: default;
}

.chat-item:hover {
  border-color: #36508a;
}

:root[data-theme='light'] .chat-item:hover {
  border-color: #8db0ff;
  background: #f8fbff;
}

.chat-item.active {
  border-color: var(--primary);
  background: #142449;
}

:root[data-theme='light'] .chat-item.active {
  border-color: #9cbcff;
  background: #e8f0ff;
}

.chat-item-title {
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-item-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.chat-item-title-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
  line-height: 1.4;
}

.chat-item-title-input:focus {
  outline: 2px solid rgba(122, 162, 255, 0.28);
  outline-offset: 1px;
}

.chat-item-title-error {
  color: #b42348;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-wrap;
}

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

.chat-item-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.chat-item-shell:hover .chat-item-actions,
.chat-item-shell:focus-within .chat-item-actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-rename-button,
.chat-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-subtle);
  border-radius: 8px;
  padding: 0;
}

.chat-rename-button:hover {
  border-color: rgba(122, 162, 255, 0.45);
  background: rgba(122, 162, 255, 0.12);
}

.chat-delete-button:hover {
  border-color: rgba(255, 107, 129, 0.45);
  background: rgba(255, 107, 129, 0.08);
}

.chat-rename-icon {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.chat-delete-icon {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

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

.topbar {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 32, 0.55);
  backdrop-filter: blur(14px);
}

:root[data-theme='light'] .topbar {
  background: rgba(255, 255, 255, 0.7);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-export-button {
  position: absolute;
  top: 12px;
  left: 18px;
  z-index: 5;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  transition: opacity 120ms ease, transform 120ms ease;
}

.chat-tab-panel:hover .chat-export-button,
.chat-export-button:focus,
.chat-export-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-export-button:disabled {
  cursor: not-allowed;
}

.chat-tab-panel:hover .chat-export-button:disabled,
.chat-export-button:disabled:focus,
.chat-export-button:disabled:focus-visible {
  opacity: 0.55;
}

.chat-export-button:disabled:hover {
  border-color: var(--border);
  background: var(--panel);
}

.chat-export-icon {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

@media (hover: none) {
  .chat-export-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .chat-export-button:disabled {
    opacity: 0.55;
  }
}

.topbar-password-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.model-select-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  max-width: min(360px, 48vw);
}

.model-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 7px 10px;
}

.model-select {
  max-width: 100%;
  min-width: min(260px, 48vw);
}

.model-select:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.content-grid {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8px var(--files-width, 340px);
  overflow: hidden;
}

.panel-resizer {
  position: relative;
  width: 8px;
  min-width: 8px;
  background: transparent;
  cursor: col-resize;
}

.panel-resizer::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 52px;
  border-radius: 999px;
  background: var(--surface-strong);
  transition: background 120ms ease;
}

.panel-resizer:hover::before,
.panel-resizer.dragging::before {
  background: rgba(91, 140, 255, 0.7);
}

.chat-panel,
.files-panel {
  min-height: 0;
  overflow: hidden;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-right: 1px solid var(--border);
}

.messages {
  overflow: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
}

.message {
  max-width: 820px;
  width: min(820px, 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message.user {
  align-self: flex-end;
}

.message.assistant {
  align-self: flex-start;
}

.message-role {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.message-content {
  line-height: 1.55;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--assistant-bubble);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-files[hidden] {
  display: none !important;
}

.message-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 320px);
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.message-file-icon {
  flex: 0 0 auto;
  color: var(--primary);
}

.message-file-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-file-name,
.message-file-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-name {
  font-size: 13px;
  line-height: 1.35;
}

.message-file-meta {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}

.message.user .message-content {
  background: var(--user-bubble);
}

.message-timestamp {
  width: fit-content;
  max-width: 100%;
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.message-timestamp[hidden] {
  display: none !important;
}

.message:hover .message-timestamp,
.message:focus-within .message-timestamp {
  opacity: 1;
}

.message.user .message-timestamp {
  align-self: flex-end;
  text-align: right;
}

.message.assistant .message-timestamp {
  align-self: flex-start;
  text-align: left;
}

.message-content.streaming-placeholder {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
}

.message-inline-streaming {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.message-inline-streaming span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: liteEllipsisPulse 1.1s infinite ease-in-out;
}

.message-inline-streaming span:nth-child(2) {
  animation-delay: 0.14s;
}

.message-inline-streaming span:nth-child(3) {
  animation-delay: 0.28s;
}

.message-streaming-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  color: var(--muted);
}

.message-streaming-indicator[hidden] {
  display: none !important;
}

.message-streaming-indicator.inline {
  padding: 2px 4px 2px 2px;
}

.message-streaming-indicator.footer {
  padding-top: 2px;
}

.message.user .message-streaming-indicator {
  justify-content: flex-end;
}

.message.assistant .message-streaming-indicator {
  justify-content: flex-start;
}

.message-streaming-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  animation: liteEllipsisPulse 1.1s infinite ease-in-out;
}

.message-streaming-indicator span:nth-child(2) {
  animation-delay: 0.14s;
}

.message-streaming-indicator span:nth-child(3) {
  animation-delay: 0.28s;
}

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

.message-meta-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-meta {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.message-meta summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.message-meta summary::-webkit-details-marker {
  display: none;
}

.message-meta-body {
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.message-meta-reasoning .message-meta-body {
  color: #d9e2f7;
}

.tool-call-item + .tool-call-item {
  margin-top: 12px;
}

.tool-call-name {
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-line + .progress-line {
  margin-top: 6px;
}

.message-meta-body pre {
  margin: 0;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0d1427;
}

.message-meta-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.message-actions {
  display: flex;
  width: fit-content;
  margin-top: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
  pointer-events: auto;
}

.message.user .message-actions {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.assistant .message-actions {
  align-self: flex-start;
  justify-content: flex-start;
}

.message-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-subtle);
  border-radius: 8px;
  padding: 0;
}

.message-copy-button[hidden] {
  display: none !important;
}

.message-copy-button:hover {
  background: var(--surface-subtle-hover);
}

.message-copy-icon {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.message-content > :first-child {
  margin-top: 0;
}

.message-content > :last-child {
  margin-bottom: 0;
}

.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
  margin: 0.9em 0 0.35em;
  line-height: 1.3;
}

.message-content h1 {
  font-size: 1.45rem;
}

.message-content h2 {
  font-size: 1.28rem;
}

.message-content h3 {
  font-size: 1.12rem;
}

.message-content p,
.message-content ul,
.message-content ol,
.message-content blockquote,
.message-content pre,
.message-content table,
.message-content hr {
  margin: 0.5em 0;
}

.message-content ul,
.message-content ol {
  padding-left: 1.25em;
}

.message-content li + li {
  margin-top: 0.18em;
}

.message-content li > p {
  margin: 0.15em 0;
}

.message-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  padding: 0.14em 0.4em;
  border-radius: 8px;
  background: var(--surface-strong);
}

.message-content pre {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0d1427;
  color: #edf3ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-content pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-content blockquote {
  padding: 0.1em 0 0.1em 0.9em;
  border-left: 3px solid rgba(91, 140, 255, 0.6);
  color: #c6d2ee;
}

:root[data-theme='light'] .message-content pre {
  background: #eef4ff;
  border-color: #d3def4;
  color: #1f2f52;
}

:root[data-theme='light'] .message-content blockquote {
  color: #4a5f86;
}

:root[data-theme='light'] .message-content a {
  color: #2f63d7;
}

.message-content hr {
  border: none;
  border-top: 1px solid var(--border);
}

.message-content a {
  color: #8eb5ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-content table {
  display: table;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.message-content th,
.message-content td {
  padding: 6px 9px;
  border: 1px solid var(--border);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-content th {
  background: var(--surface-strong);
}

.composer {
  border-top: 1px solid var(--border);
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(11, 16, 32, 0.55);
}

:root[data-theme='light'] .composer {
  background: #f7faff;
}

.composer-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  width: 100%;
}

.composer-entry-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.composer-input-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  width: 100%;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-list[hidden] {
  display: none !important;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 280px);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  min-height: 38px;
}

.attachment-chip.uploading {
  border-color: rgba(91, 140, 255, 0.4);
}

.attachment-chip.error {
  border-color: rgba(255, 107, 129, 0.45);
}

.attachment-chip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-chip-name,
.attachment-chip-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip-name {
  font-size: 13px;
  line-height: 1.3;
}

.attachment-chip-meta {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}

.attachment-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0;
  flex: 0 0 22px;
}

.attachment-chip-remove:hover {
  border-color: var(--border);
  background: var(--surface-subtle-hover);
  color: var(--text);
}

.file-input {
  display: none;
}

.composer textarea {
  resize: none;
  min-height: 46px;
  max-height: calc(1.55em * 8 + 24px);
  overflow-y: hidden;
  line-height: 24px;
}

.composer-actions {
  display: flex;
  justify-content: stretch;
  align-items: flex-end;
  gap: 12px;
}

.composer-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 14px;
  padding: 0;
  flex: 0 0 46px;
}

.composer-submit-actions {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.composer-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 14px;
  padding: 0 6px;
  flex: 0 0 46px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
}

.composer-mode-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.composer-mode-button:hover {
  background: var(--surface-subtle-hover);
  color: var(--text);
}

.composer-mode-button.active {
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

.composer-mode-button:disabled {
  opacity: 0.65;
}

.attach-button {
  align-self: stretch;
}

.composer-attachment-icon {
  width: 20px;
  height: 20px;
}

.composer-icon-button:hover {
  background: var(--surface-subtle-hover);
}

.composer-icon-button:disabled {
  opacity: 0.65;
}

.composer-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.files-panel {
  background: rgba(19, 27, 49, 0.35);
  display: flex;
  flex-direction: column;
}

:root[data-theme='light'] .files-panel {
  background: #f7faff;
}

.files-header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.files-header-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

:root[data-theme='light'] .files-header {
  background: #f7faff;
}

.files-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.file-open-controls {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.file-open-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-path-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.file-path-display {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.file-path-prefix {
  flex: 0 0 auto;
}

.file-path-tail {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-open-buttons .ghost.small {
  flex: 0 0 auto;
}

.file-tree {
  padding: 12px 14px 18px;
  overflow: auto;
  min-height: 0;
}

.tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: max-content;
}

.tree-node {
  margin: 2px 0;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
}

.tree-toggle,
.tree-spacer,
.tree-download {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  background: transparent;
  color: var(--muted);
}

.tree-toggle:hover,
.tree-download:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.tree-label {
  min-width: max-content;
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.tree-label:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tree-label.active {
  background: rgba(91, 140, 255, 0.12);
  border-color: rgba(91, 140, 255, 0.4);
}

.tree-children {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  min-width: max-content;
}

.empty-state {
  color: var(--muted);
  padding: 12px 8px;
}

.approval-modal,
.password-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.approval-backdrop,
.password-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(8px);
}

.approval-dialog,
.password-dialog {
  position: relative;
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(19, 27, 49, 0.96) 0%, rgba(11, 16, 32, 0.98) 100%);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

:root[data-theme='light'] .approval-dialog,
:root[data-theme='light'] .password-dialog {
  border-color: rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 1) 100%);
  box-shadow: 0 20px 56px rgba(26, 56, 104, 0.16);
}

.approval-kicker {
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
}

.approval-dialog h2,
.password-dialog h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.password-dialog {
  width: min(460px, 100%);
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approval-description {
  margin: 0;
  line-height: 1.65;
}

.approval-command-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.approval-command-label {
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.approval-command {
  margin: 0;
  max-height: min(34vh, 260px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.approval-actions,
.password-actions {
  display: grid;
  gap: 10px;
}

.approval-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.approval-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.password-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.danger-button {
  border: 1px solid rgba(255, 107, 129, 0.35);
  background: rgba(255, 107, 129, 0.12);
  color: #ffd5dc;
  border-radius: 14px;
  padding: 12px 14px;
}

.danger-button:hover {
  background: rgba(255, 107, 129, 0.18);
}

.danger-button:disabled {
  opacity: 0.65;
}

.loading::after {
  content: '...';
}

@media (max-width: 1100px) {
  .workspace-view {
    grid-template-columns: 260px 8px minmax(0, 1fr);
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-grid > .panel-resizer.inner {
    display: none;
  }

  .files-panel {
    border-top: 1px solid var(--border);
    min-height: 0;
  }

  .chat-panel {
    border-right: none;
  }
}

@media (max-width: 800px) {
  .login-view,
  :root[data-theme='light'] .login-view {
    --mobile-browser-bottom-space: 180px;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-rows: auto auto;
    align-content: start;
    padding: 16px;
    padding-bottom: calc(var(--mobile-browser-bottom-space) + env(safe-area-inset-bottom));
    gap: 16px;
    scroll-padding-bottom: calc(var(--mobile-browser-bottom-space) + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .portal-header {
    gap: 8px;
  }

  .portal-hero {
    text-align: left;
  }

  .portal-hero-content {
    padding: 0 4px;
  }

  .portal-hero h1 {
    font-size: 26px;
    line-height: 1.12;
  }

  .portal-nav {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 6px;
    overflow-x: visible;
    border-radius: 12px;
  }

  .portal-nav-item {
    width: auto;
    align-self: center;
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }

  .portal-nav > .portal-nav-item:not(.active) {
    display: none;
  }

  .portal-nav.expanded > .portal-nav-item:not(.active) {
    grid-column: 1 / -1;
    display: inline-flex;
    justify-self: center;
  }

  .portal-nav-toggle {
    width: 38px;
    min-height: 38px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: 1px solid rgba(22, 101, 52, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: #17324d;
  }

  .portal-nav-toggle:hover {
    border-color: rgba(22, 101, 52, 0.34);
    background: rgba(255, 255, 255, 0.84);
  }

  .portal-nav-toggle-bar {
    width: 16px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
  }

  .login-stage {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 18px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .login-card-shell {
    order: 1;
  }

  .daily-updates-panel {
    order: 2;
    height: min(540px, 68dvh);
    min-height: 400px;
  }

  .daily-updates-header {
    gap: 12px;
    padding: 18px 18px 14px;
  }

  .daily-updates-heading h2 {
    font-size: 21px;
  }

  .daily-updates-language-button {
    padding: 0 9px;
  }

  .daily-updates-run-status,
  .daily-updates-date-group,
  .daily-update-item {
    padding-right: 18px;
    padding-left: 18px;
  }

  .login-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 28px 22px 24px;
    border-radius: 26px;
  }

  .login-card[data-auth-mode='home'] {
    min-height: 0;
  }

  .login-logo-frame {
    width: 184px;
    height: 184px;
    border-radius: 30px;
  }

  .login-brand-wordmark {
    font-size: 30px;
  }

  .login-brand-subtitle,
  :root[data-theme='light'] .login-brand-subtitle {
    font-size: 15px;
  }

  .login-card h2 {
    font-size: 26px;
  }

  .login-secondary-actions {
    grid-template-columns: 1fr;
  }

  .temporary-confirm-modal {
    padding: 16px;
  }

  .temporary-confirm-dialog {
    padding: 24px 20px 20px;
    border-radius: 22px;
  }

  .temporary-confirm-dialog h2 {
    font-size: 23px;
  }

  .temporary-confirm-actions {
    grid-template-columns: 1fr;
  }

  .composer-input-wrap {
    grid-template-columns: 1fr;
  }

  .composer-input-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

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

  .topbar-actions {
    justify-content: flex-start;
  }

  .model-select-wrap,
  .model-select {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .attachment-chip {
    max-width: 100%;
  }

  .workspace-view {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 40vh) minmax(0, 1fr);
  }

  .approval-modal,
  .password-modal {
    padding: 16px;
  }

  .approval-dialog,
  .password-dialog {
    padding: 20px;
    border-radius: 20px;
  }

  .approval-dialog h2,
  .password-dialog h2 {
    font-size: 24px;
  }

  .approval-actions,
  .password-actions {
    grid-template-columns: 1fr;
  }

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

  .files-header-actions {
    justify-content: flex-start;
  }

  .workspace-view > .panel-resizer {
    display: none;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
}

/* Workspace redesign inspired by the reference chat page. */
.workspace-view {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #172033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --user-bubble: #e8f1ff;
  --assistant-bubble: #ffffff;
  --surface-subtle: rgba(15, 23, 42, 0.035);
  --surface-subtle-hover: rgba(37, 99, 235, 0.08);
  --surface-strong: rgba(15, 23, 42, 0.08);
  --shadow-focus: rgba(37, 99, 235, 0.14);
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width, 288px) 8px minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

.workspace-view button.primary,
.workspace-view button.ghost {
  border-radius: 10px;
}

.workspace-view button.primary {
  border: 1px solid transparent;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
}

.workspace-view button.primary:hover {
  background: var(--primary-hover);
}

.workspace-view button.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.workspace-view button.ghost:hover {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--surface-subtle-hover);
}

.workspace-view .panel-resizer {
  width: 8px;
  min-width: 8px;
  background: transparent;
}

.workspace-view .panel-resizer::before {
  width: 2px;
  height: 48px;
  background: rgba(148, 163, 184, 0.34);
}

.workspace-view .panel-resizer:hover::before,
.workspace-view .panel-resizer.dragging::before {
  background: var(--primary);
}

.workspace-view .sidebar {
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  backdrop-filter: none;
  box-shadow: 8px 0 22px rgba(15, 23, 42, 0.035);
  overflow: visible;
  position: relative;
  z-index: 20;
}

.workspace-view .sidebar-header {
  height: 68px;
  min-height: 68px;
  flex: 0 0 68px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  gap: 12px;
}

.sidebar-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  border: 0;
  overflow: hidden;
}

.workspace-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-account {
  min-width: 0;
  position: relative;
  flex: 1 1 auto;
}

.sidebar-brand-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-view .brand.small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.update-notes-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.update-notes-button:hover,
.update-notes-button[aria-expanded='true'] {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.update-notes-button.has-unread {
  border-color: rgba(220, 38, 38, 0.26);
  background: rgba(220, 38, 38, 0.06);
}

.update-notes-icon,
.update-notes-close-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.update-notes-icon {
  width: 19px;
  height: 19px;
}

.update-notes-close-icon {
  width: 15px;
  height: 15px;
}

.update-notes-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: var(--danger);
  pointer-events: none;
}

.update-notes-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(2px);
}

.update-notes-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  width: min(520px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 56px));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
  transform: translate(-50%, -50%);
}

.update-notes-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.update-notes-title {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 750;
}

.update-notes-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.update-notes-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.update-notes-close:hover {
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.update-notes-summary {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.update-notes-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.update-notes-entry {
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}

.update-notes-entry:first-child {
  padding-top: 0;
  border-top: 0;
}

.update-notes-entry + .update-notes-entry {
  margin-top: 18px;
}

.update-notes-entry-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.update-notes-entry-title {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.update-notes-entry-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.update-notes-entry-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.update-notes-entry-items {
  margin: 10px 0 0;
  padding-left: 20px;
}

.update-notes-entry-items li + li {
  margin-top: 7px;
}

.workspace-view #user-email {
  margin-top: 3px;
  max-width: 148px;
  line-height: 1.25;
}

.workspace-view #logout-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.workspace-view .sidebar-actions {
  padding: 16px 16px 10px;
}

.workspace-view #new-chat-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
}

.new-chat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 17px;
  line-height: 1;
}

.workspace-view .sidebar-section-title {
  margin: 10px 16px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-view .sidebar-section-title.no-margin {
  margin: 0;
}

.workspace-view .chat-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 8px 16px;
  gap: 2px;
  overflow-y: auto;
}

.workspace-view .chat-list::-webkit-scrollbar,
.workspace-view .messages::-webkit-scrollbar,
.workspace-view .file-tree::-webkit-scrollbar,
.workspace-view .file-preview-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.workspace-view .chat-list::-webkit-scrollbar-thumb,
.workspace-view .messages::-webkit-scrollbar-thumb,
.workspace-view .file-tree::-webkit-scrollbar-thumb,
.workspace-view .file-preview-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  border: 2px solid transparent;
  background-clip: content-box;
}

.workspace-view .chat-item-shell {
  position: relative;
  display: block;
  padding: 0;
}

.workspace-view .chat-item {
  min-height: 58px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 40px 10px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.workspace-view .chat-item:hover {
  border-color: transparent;
  background: #f1f5f9;
}

.workspace-view .chat-item.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.chat-item-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-item-leading-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.chat-item-leading-icon::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 5px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 3px 0 currentColor;
  opacity: 0.55;
}

.workspace-view .chat-item.active .chat-item-leading-icon {
  border-color: rgba(37, 99, 235, 0.44);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.workspace-view .chat-item-title {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
  word-break: normal;
}

.workspace-view .chat-item-meta {
  padding-left: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.35;
}

.workspace-view .chat-item-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.workspace-view .chat-item-shell:hover .chat-item-actions,
.workspace-view .chat-item-shell:focus-within .chat-item-actions,
.workspace-view .chat-item-shell.renaming .chat-item-actions {
  opacity: 1;
  pointer-events: auto;
}

.workspace-view .chat-rename-button,
.workspace-view .chat-delete-button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border-color: var(--border);
  background: var(--panel);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.workspace-view .chat-item-editing {
  padding: 10px;
}

.workspace-view .chat-item-title-input {
  border-radius: 10px;
  background: var(--panel);
}

.workspace-view .main-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  box-shadow: -10px 0 22px rgba(15, 23, 42, 0.025);
}

.workspace-view .topbar {
  height: 68px;
  min-height: 68px;
  flex: 0 0 68px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.topbar-title-area {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-panel-button,
.mobile-panel-backdrop {
  display: none;
}

.mobile-panel-button-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.workspace-view .topbar h1 {
  max-width: min(48vw, 560px);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 750;
}

.workspace-view .topbar-actions {
  gap: 12px;
}

.workspace-view .topbar-password-button {
  display: none !important;
}

.workspace-view .model-select-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.workspace-view .model-select-wrap > .tiny {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.workspace-view .model-select {
  min-width: 0;
  max-width: 260px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 4px 24px 4px 2px;
  font-size: 13px;
  font-weight: 650;
  outline: none;
}

.workspace-view .model-select {
  width: var(--model-select-width, auto);
  min-width: 0;
  max-width: min(520px, 42vw);
}

.workspace-view .model-select:focus {
  box-shadow: none;
}

.workspace-view .content-grid {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8px var(--files-width, 320px);
  overflow: hidden;
  background: var(--panel);
}

.workspace-view .chat-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.workspace-tabs {
  min-width: 0;
  min-height: 43px;
  display: flex;
  align-items: end;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  overflow-x: auto;
  overflow-y: hidden;
}

.workspace-tab {
  min-width: 0;
  max-width: 220px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  flex: 0 0 auto;
}

.workspace-tab.closeable {
  min-width: 88px;
  justify-content: space-between;
}

.workspace-tab:hover {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
}

.workspace-tab.active {
  border-color: var(--border);
  background: var(--panel);
  color: var(--text);
}

.workspace-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tab-close {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  flex: 0 0 18px;
}

.workspace-tab-close:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.workspace-tab-panels,
.file-preview-panels,
.workspace-tab-panel {
  min-width: 0;
  min-height: 0;
}

.workspace-tab-panels {
  display: grid;
  overflow: hidden;
}

.workspace-tab-panel[hidden],
.file-preview-panels[hidden] {
  display: none !important;
}

.chat-tab-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.file-preview-panels {
  display: flex;
  overflow: hidden;
}

.file-preview-panel {
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
}

.file-preview-toolbar {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
}

.file-preview-title-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.file-preview-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 750;
}

.file-preview-meta {
  min-height: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.file-preview-actions {
  flex: 0 0 auto;
}

.file-preview-download {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 0;
  flex: 0 0 34px;
}

.file-preview-download:hover {
  background: var(--surface-subtle-hover);
  color: var(--text);
}

.file-preview-download-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.file-preview-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 24px 24px, rgba(37, 99, 235, 0.035), transparent 30px),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.file-preview-code {
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 18px 22px;
  color: #111827;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}

.file-preview-image-wrap {
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.file-preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.file-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  background: #ffffff;
}

.file-preview-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 650;
}

.file-preview-empty-actions {
  display: flex;
  justify-content: center;
}

.workspace-view .messages {
  min-height: 0;
  padding: 26px min(5vw, 48px);
  gap: 18px;
  background:
    radial-gradient(circle at 24px 24px, rgba(37, 99, 235, 0.04), transparent 30px),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  scroll-behavior: smooth;
}

.workspace-view .messages.restoring-scroll {
  scroll-behavior: auto;
}

.workspace-view .messages > .empty-state {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 17px;
  font-weight: 650;
}

.workspace-view .messages > .empty-state::before {
  content: '';
  width: 138px;
  height: 138px;
  background: url('./icons/potato-agent-icon.png') center / contain no-repeat;
}

.workspace-view .message {
  max-width: min(860px, 92%);
  width: fit-content;
  min-width: min(260px, 100%);
  gap: 7px;
}

.workspace-view .message.user {
  align-self: flex-end;
}

.workspace-view .message.assistant {
  align-self: flex-start;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-view .message.user .message-head {
  flex-direction: row-reverse;
}

.workspace-view .message-role {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.workspace-view .message.user .message-role {
  text-align: right;
}

.workspace-view .message-content {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--assistant-bubble);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.055);
  color: var(--text);
  font-size: 15px;
  line-height: 1.62;
}

.workspace-view .message.user .message-content {
  border-color: #bfdbfe;
  background: var(--user-bubble);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.workspace-view .message-timestamp {
  font-size: 11px;
}

.workspace-view .message-meta {
  border-radius: 12px;
  background: var(--surface-subtle);
}

.workspace-view .message-meta summary {
  background: transparent;
}

.workspace-view .message-actions {
  margin-top: 0;
}

.workspace-view .message-copy-button {
  border-color: var(--border);
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.workspace-view .message-file-chip {
  background: var(--panel);
}

.workspace-view .composer {
  position: relative;
  border-top: 0;
  padding: 16px 24px 14px;
  background: transparent;
}

:root[data-theme='light'] .workspace-view .composer {
  background: transparent;
}

.workspace-view .composer-actions {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.workspace-view .composer-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.workspace-view .composer-input-wrap:focus-within {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 0 4px var(--shadow-focus), 0 14px 32px rgba(15, 23, 42, 0.08);
}

.workspace-view .composer-entry-shell {
  min-width: 0;
  gap: 8px;
}

.workspace-view .composer-input-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: end;
  gap: 6px;
}

.workspace-view .composer textarea {
  min-height: 42px;
  max-height: calc(1.55em * 8 + 24px);
  padding: 9px 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  line-height: 24px;
}

.workspace-view .composer textarea:focus {
  box-shadow: none;
}

.workspace-view .composer textarea::placeholder {
  color: rgba(100, 116, 139, 0.78);
}

.workspace-view .composer-icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  border-color: transparent;
  background: transparent;
}

.workspace-view .composer-submit-actions {
  align-items: flex-end;
  gap: 6px;
}

.workspace-view .composer-mode-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  border-color: transparent;
  background: rgba(100, 116, 139, 0.08);
}

.workspace-view .composer-mode-button:hover {
  background: rgba(37, 99, 235, 0.09);
}

.workspace-view .composer-mode-button.active {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.13);
}

.workspace-view .attach-button {
  align-self: end;
  color: var(--muted);
}

.workspace-view .attach-button:hover {
  background: rgba(37, 99, 235, 0.09);
}

.workspace-view #send-button {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.workspace-view #send-button-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.workspace-view #send-button:hover {
  background: var(--primary-hover);
}

.workspace-view #send-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.workspace-view .attachment-chip {
  border-radius: 11px;
  background: var(--panel);
}

.workspace-view .files-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: #f8fafc;
}

.workspace-view .files-header {
  height: 68px;
  min-height: 68px;
  flex: 0 0 68px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.92);
  gap: 12px;
  align-items: center;
}

.workspace-view .files-header-main {
  min-width: 0;
  gap: 0;
}

.files-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.files-title-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  color: var(--muted);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-view .files-header .sidebar-section-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  text-transform: none;
  letter-spacing: 0;
}

.workspace-view #cwd-label {
  display: none !important;
}

.workspace-view .files-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workspace-view .files-icon-button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.workspace-view .files-icon-button:hover {
  border-color: var(--border);
  background: var(--panel);
  color: var(--text);
}

.workspace-view .files-action-icon {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.workspace-view #file-open-button {
  display: none !important;
}

.workspace-view .file-open-controls {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  gap: 0;
}

.workspace-view .file-path-input {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel-soft);
  font-size: 13px;
}

.workspace-view .file-path-display {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.workspace-view .file-path-prefix {
  color: var(--primary);
  font-weight: 650;
}

.workspace-view .file-path-tail {
  color: #334155;
}

.workspace-view .file-open-buttons {
  display: none !important;
}

.workspace-view .file-tree {
  min-height: 0;
  padding: 10px 8px 16px;
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
}

.workspace-view .tree-list,
.workspace-view .tree-children {
  min-width: max-content;
}

.workspace-view .tree-children {
  margin-left: 12px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.workspace-view .tree-node {
  margin: 1px 0;
}

.workspace-view .tree-row {
  min-height: 32px;
  width: max-content;
  min-width: 100%;
  gap: 4px;
  border-radius: 9px;
}

.workspace-view .tree-row:hover {
  background: var(--panel);
}

.workspace-view .tree-toggle,
.workspace-view .tree-spacer,
.workspace-view .tree-download {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border-radius: 8px;
}

.workspace-view .tree-label {
  min-width: max-content;
  flex: 0 0 auto;
  padding: 6px 8px;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
}

.workspace-view .tree-label:hover {
  background: transparent;
}

.workspace-view .tree-label.active {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.workspace-view .tree-download {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, background 120ms ease;
}

.workspace-view .tree-row:hover .tree-download,
.workspace-view .tree-download:focus {
  opacity: 1;
  pointer-events: auto;
}

.workspace-view .empty-state {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .workspace-view {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
  }

  .workspace-view > .panel-resizer {
    display: none;
  }

  .workspace-view .content-grid > .panel-resizer.inner {
    display: none;
  }

  .workspace-view .main-panel {
    min-height: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .mobile-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
  }

  .mobile-panel-backdrop[hidden] {
    display: none !important;
  }

  .workspace-view .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    width: min(86vw, 340px);
    max-height: none;
    height: 100vh;
    height: 100dvh;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
    transform: translateX(-100%);
    transition: transform 180ms ease;
    overflow: hidden;
  }

  .workspace-view.mobile-chats-open .sidebar {
    transform: none;
  }

  .workspace-view .sidebar-header {
    height: auto;
    flex-basis: auto;
    min-height: 62px;
    padding: 12px;
  }

  .update-notes-panel {
    left: calc(12px + env(safe-area-inset-left));
    right: calc(12px + env(safe-area-inset-right));
    top: calc(12px + env(safe-area-inset-top));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-height: none;
    box-sizing: border-box;
    overflow-y: auto;
    padding: 18px;
    border-radius: 12px;
    transform: none;
  }

  .update-notes-heading {
    position: sticky;
    top: -18px;
    z-index: 1;
    margin: -18px -18px 0;
    padding: 18px 18px 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
  }

  .update-notes-title {
    font-size: 18px;
  }

  .update-notes-summary,
  .update-notes-list {
    font-size: 15px;
  }

  .update-notes-entry-heading {
    display: block;
  }

  .update-notes-entry-date {
    margin-top: 4px;
    white-space: normal;
  }

  .workspace-view .sidebar-actions {
    padding: 12px 12px 8px;
  }

  .workspace-view .chat-list {
    padding: 0 8px 10px;
  }

  .workspace-view .topbar {
    height: auto;
    flex-basis: auto;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 12px 14px;
  }

  .topbar-title-area {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .workspace-view .topbar-actions {
    width: 100%;
    align-items: stretch;
  }

  .workspace-view .chat-export-button {
    top: 10px;
    left: 12px;
    min-height: 36px;
    padding: 0 10px;
  }

  .mobile-panel-button {
    min-width: 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--text);
    font-size: 12px;
    line-height: 1;
    font-weight: 750;
    white-space: nowrap;
  }

  .mobile-panel-button[aria-expanded='true'] {
    border-color: rgba(37, 99, 235, 0.32);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
  }

  .workspace-view .topbar h1 {
    min-width: 0;
    max-width: 100%;
    text-align: center;
    font-size: 18px;
  }

  .workspace-view .model-select-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .workspace-view .model-select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .workspace-view .content-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .workspace-tabs {
    min-height: 39px;
    padding: 6px 10px 0;
  }

  .workspace-tab {
    min-width: 0;
    max-width: 168px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .workspace-tab.closeable {
    min-width: 78px;
  }

  .workspace-view .messages {
    padding: 18px 14px;
  }

  .file-preview-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 12px;
  }

  .file-preview-actions {
    align-self: flex-end;
  }

  .file-preview-code {
    padding: 14px;
    font-size: 12px;
  }

  .workspace-view .message {
    max-width: 100%;
    min-width: 0;
  }

  .workspace-view .composer {
    padding: 12px 12px 10px;
  }

  .workspace-view .composer-input-wrap {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workspace-view .files-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    width: min(88vw, 380px);
    height: 100vh;
    height: 100dvh;
    border-top: 0;
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 42px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 180ms ease;
  }

  .workspace-view.mobile-files-open .files-panel {
    transform: none;
  }

  .workspace-view .files-header {
    height: auto;
    flex-basis: auto;
    padding: 12px;
  }
}

.workspace-view .sidebar-header {
  justify-content: flex-start;
}

.workspace-view #logout-button {
  display: none !important;
}

.workspace-view .sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.72);
  background: rgba(248, 250, 252, 0.68);
}

.sidebar-user-card {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sidebar-user-text {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.sidebar-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.workspace-view .sidebar-footer #user-email {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.sidebar-settings-button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.sidebar-settings-button:hover {
  border-color: var(--border);
  background: var(--panel);
  color: var(--text);
}

.sidebar-settings-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.sidebar-settings-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: 210px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.sidebar-settings-menu-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}

.sidebar-settings-menu-item:hover {
  background: #f1f5f9;
}

.sidebar-settings-menu-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
  pointer-events: none;
}
