:root {
  --bg: #060606;
  --panel: rgba(15, 15, 15, 0.82);
  --panel-strong: rgba(19, 19, 19, 0.94);
  --panel-soft: rgba(27, 27, 27, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.7);
  --muted-soft: rgba(255, 255, 255, 0.52);
  --accent: #ffbf08;
  --accent-strong: #ffca2e;
  --accent-shadow: rgba(255, 191, 8, 0.22);
  --assistant-bubble: linear-gradient(180deg, rgba(44, 44, 44, 0.92), rgba(29, 29, 29, 0.92));
  --user-bubble: linear-gradient(180deg, rgba(34, 34, 34, 0.95), rgba(24, 24, 24, 0.95));
  --glass: rgba(255, 255, 255, 0.04);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 191, 8, 0.1), transparent 16%),
    radial-gradient(circle at 82% 78%, rgba(255, 191, 8, 0.08), transparent 18%),
    linear-gradient(135deg, #020202 0%, #080808 42%, #030303 100%);
  overflow-x: hidden;
  overflow-y: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100vw - 20px));
  height: calc(100vh - 16px);
  margin: 8px auto;
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) minmax(520px, 1.48fr);
  gap: 14px;
  align-items: stretch;
}

.login-body {
  min-height: 100%;
  overflow: auto;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(7, 7, 7, 0.98));
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-copy {
  margin: 30px 0 24px;
}

.login-copy h1 {
  margin: 8px 0;
  font-size: 2rem;
}

.login-copy p {
  margin: 0;
  color: var(--muted);
}

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

.login-form label {
  color: var(--muted);
  font-size: 0.95rem;
}

.login-form input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: inherit;
  padding: 0 14px;
  outline: none;
}

.login-form input:focus {
  border-color: rgba(255, 191, 8, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 191, 8, 0.12);
}

.login-form button,
.logout-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.login-form button {
  min-height: 46px;
}

.login-error {
  display: none;
  margin: 0;
  color: #ff8f8f;
  font-size: 0.9rem;
}

.login-has-error .login-error {
  display: block;
}

.logout-form {
  margin: 0;
}

.logout-button {
  min-height: 34px;
  padding: 0 14px;
}

.brand-panel,
.chat-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.92), rgba(7, 7, 7, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-panel {
  min-height: 0;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.brand-orbit {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 191, 8, 0.9);
  pointer-events: none;
}

.orbit-top {
  width: 420px;
  height: 420px;
  top: -230px;
  left: -170px;
  opacity: 0.85;
  box-shadow: inset 0 0 120px rgba(255, 191, 8, 0.08);
}

.orbit-bottom {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -200px;
  opacity: 0.55;
  background: radial-gradient(circle at center, rgba(255, 191, 8, 0.38), transparent 62%);
  filter: blur(6px);
}

.brand-header,
.brand-copy,
.feature-grid,
.chat-header,
.messages,
.composer {
  position: relative;
  z-index: 1;
}

.smartfit-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  position: relative;
}

.smartfit-small {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: #f7f7f7;
  letter-spacing: -0.04em;
}

.smartfit-fit {
  font-size: 48px;
  line-height: 0.88;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.08em;
  text-transform: lowercase;
}

.smartfit-arc {
  width: 46px;
  height: 10px;
  border-bottom: 4px solid var(--accent);
  border-radius: 0 0 999px 999px;
  margin-top: -2px;
}

.brand-copy {
  margin-top: 0;
  max-width: 15ch;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.brand-copy h1 span {
  color: var(--accent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.feature-card {
  padding: 10px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 13, 13, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  min-height: 58px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 191, 8, 0.5);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  background: rgba(18, 18, 18, 0.92);
}

.feature-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.chat-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.assistant-badge {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffd857, var(--accent));
  color: #151515;
  box-shadow: 0 12px 28px var(--accent-shadow);
}

.assistant-face {
  font-size: 22px;
  font-weight: 900;
}

.chat-header-copy {
  min-width: 0;
}

.chat-header-copy h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chat-header-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  animation: float-in 0.26s ease;
}

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

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.message-row.assistant .message-avatar {
  background: radial-gradient(circle at 35% 30%, #ffd857, var(--accent));
  color: #151515;
  box-shadow: 0 10px 22px rgba(255, 191, 8, 0.2);
}

.message-row.user .message-avatar {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.92);
}

.message-avatar span {
  font-size: 16px;
  line-height: 1;
}

.message {
  max-width: min(74%, 600px);
  padding: 14px 16px 10px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
}

.message-row.assistant .message {
  background: var(--assistant-bubble);
  border-top-left-radius: 12px;
}

.message-row.user .message {
  background: var(--user-bubble);
  border-top-right-radius: 12px;
}

.message-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
}

.message-meta {
  margin-top: 8px;
  color: var(--muted-soft);
  font-size: 12px;
}

.choice-grid {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  border: 1px solid rgba(255, 191, 8, 0.28);
  border-radius: 999px;
  background: rgba(255, 191, 8, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.choice-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 191, 8, 0.55);
  background: rgba(255, 191, 8, 0.14);
}

.choice-chip:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.composer {
  margin: 0 16px 16px;
  padding: 12px 14px 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.95), rgba(11, 11, 11, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.composer textarea {
  width: 100%;
  border: none;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  min-height: 28px;
  max-height: 180px;
}

.composer textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.composer textarea:focus {
  outline: none;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.form-status {
  color: var(--muted-soft);
  font-size: 13px;
  min-height: 18px;
}

.send-button {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 191, 8, 0.26);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(36, 36, 36, 0.94), rgba(19, 19, 19, 0.94));
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.send-button:hover {
  transform: translateY(-1px) scale(1.02);
  border-color: rgba(255, 191, 8, 0.52);
  box-shadow: 0 12px 28px rgba(255, 191, 8, 0.16);
}

.send-icon {
  display: inline-block;
  transform: translateX(1px) rotate(-18deg);
  font-size: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  body {
    overflow-y: auto;
  }

  .app-shell {
    width: min(1100px, calc(100vw - 28px));
    height: auto;
    margin: 14px auto;
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 0;
  }

  .brand-copy {
    max-width: 100%;
  }

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

  .chat-shell {
    min-height: 72vh;
  }
}

@media (max-width: 900px) {
  .app-shell {
    gap: 18px;
  }

  .chat-shell {
    order: 1;
    min-height: min(78vh, 860px);
  }

  .brand-panel {
    order: 2;
    padding: 24px 22px 24px;
  }

  .brand-copy {
    margin-top: 18px;
    max-width: 100%;
  }

  .brand-copy h1 {
    max-width: 10ch;
  }

  .subtitle {
    max-width: 42ch;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: calc(100vw - 16px);
    gap: 16px;
    margin: 8px auto;
  }

  .brand-panel,
  .chat-shell {
    border-radius: 24px;
  }

  .brand-panel {
    padding: 22px 18px 22px;
    gap: 18px;
  }

  .orbit-top {
    width: 280px;
    height: 280px;
    top: -170px;
    left: -150px;
  }

  .orbit-bottom {
    width: 220px;
    height: 220px;
    right: -90px;
    bottom: -120px;
  }

  .smartfit-fit {
    font-size: 58px;
  }

  .brand-copy {
    margin-top: 22px;
  }

  .brand-copy h1 {
    font-size: clamp(30px, 10vw, 44px);
    max-width: 12ch;
    line-height: 0.98;
  }

  .subtitle {
    margin-top: 16px;
    font-size: 16px;
    max-width: 34ch;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
  }

  .feature-card {
    min-height: 92px;
    padding: 16px 14px;
    gap: 10px;
    font-size: 15px;
    border-radius: 16px;
  }

  .feature-icon {
    width: 22px;
    height: 22px;
    font-size: 18px;
  }

  .chat-header {
    padding: 18px;
  }

  .assistant-badge {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .assistant-face {
    font-size: 22px;
  }

  .chat-header-actions {
    display: none;
  }

  .messages {
    padding: 16px;
  }

  .message-row {
    gap: 10px;
  }

  .message-avatar {
    width: 36px;
    height: 36px;
  }

  .message {
    max-width: calc(100% - 46px);
    padding: 16px 16px 10px;
  }

  .composer {
    margin: 0 14px 14px;
    padding: 14px;
  }

  .form-status {
    font-size: 12px;
  }

  .send-button {
    width: 48px;
    height: 48px;
  }
}

/* Login aligned with refreshed assistant shell */
.login-body {
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 191, 8, 0.16), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(255, 191, 8, 0.08), transparent 18%),
    #030303;
}

.login-shell {
  padding: 18px;
}

.login-panel {
  width: min(500px, 100%);
  padding: 30px 34px 34px;
  border-radius: 28px;
  border-color: rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 191, 8, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(14, 14, 14, 0.94), rgba(4, 4, 4, 0.98));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.login-robot {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(255, 191, 8, 0.22));
}

.login-copy {
  margin: 14px 0 24px;
}

.login-copy h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 800;
}

.login-copy h1 span {
  color: var(--accent);
}

.login-copy p {
  margin: 10px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.login-form {
  text-align: left;
  gap: 12px;
}

.login-form input {
  min-height: 52px;
  border-radius: 18px;
  border-color: rgba(255, 191, 8, 0.26);
  background: rgba(7, 7, 7, 0.94);
}

.login-form button {
  min-height: 52px;
  margin-top: 4px;
  box-shadow: 0 12px 30px rgba(255, 191, 8, 0.22);
}

@media (max-width: 520px) {
  .app-shell {
    width: calc(100vw - 12px);
    margin: 6px auto;
    gap: 10px;
  }

  .brand-panel,
  .chat-shell {
    border-radius: 20px;
  }

  .brand-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    padding: 16px 14px;
  }

  .orbit-top,
  .orbit-bottom {
    display: none;
  }

  .smartfit-small {
    font-size: 18px;
  }

  .smartfit-fit {
    font-size: 42px;
  }

  .smartfit-arc {
    width: 46px;
    height: 10px;
    border-bottom-width: 4px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .brand-copy {
    margin-top: 0;
  }

  .brand-copy h1 {
    font-size: clamp(22px, 7.2vw, 30px);
    max-width: 8ch;
    line-height: 1;
  }

  .subtitle {
    display: none;
  }

  .feature-grid {
    display: none;
  }

  .chat-shell {
    min-height: 74vh;
  }

  .chat-header {
    gap: 12px;
    padding: 14px;
  }

  .chat-header-copy h2 {
    font-size: 17px;
  }

  .chat-header-copy p {
    font-size: 12px;
  }

  .messages {
    padding: 14px;
    gap: 12px;
  }

  .message-row {
    gap: 8px;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
  }

  .message-avatar span {
    font-size: 16px;
  }

  .message {
    max-width: calc(100% - 40px);
    padding: 12px 12px 9px;
    border-radius: 18px;
  }

  .message-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .composer {
    margin: 0 10px 10px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .composer textarea {
    font-size: 14px;
  }

  .form-status {
    font-size: 11px;
  }

  .send-button {
    width: 42px;
    height: 42px;
  }

  .send-icon {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .brand-panel {
    column-gap: 12px;
    padding: 14px 12px;
  }

  .smartfit-fit {
    font-size: 38px;
  }

  .brand-copy h1 {
    font-size: 20px;
  }

  .eyebrow {
    display: none;
  }
}

/* SmartFit Assistant refreshed shell */
body {
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 191, 8, 0.12), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(255, 191, 8, 0.07), transparent 18%),
    #030303;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 36px 36px;
}

.app-shell {
  width: min(1500px, calc(100vw - 14px));
  height: calc(100vh - 14px);
  margin: 7px auto;
  grid-template-columns: minmax(390px, 0.45fr) minmax(620px, 1fr);
  gap: 18px;
}

.brand-panel,
.chat-shell {
  border-radius: 28px;
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(180deg, rgba(14, 14, 14, 0.9), rgba(3, 3, 3, 0.96)),
    radial-gradient(circle at 45% 18%, rgba(255, 191, 8, 0.1), transparent 35%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.54);
}

.brand-panel {
  padding: 16px 24px 18px;
  justify-content: flex-start;
  gap: 12px;
}

.brand-header {
  display: flex;
  justify-content: center;
}

.brand-robot {
  width: min(190px, 72%);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(255, 191, 8, 0.24));
}

.brand-copy {
  max-width: 28ch;
  margin: 0;
  padding-left: 0;
}

.brand-copy h1 {
  position: relative;
  margin: 0;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--ink);
}

.brand-copy h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 5px;
  height: calc(2.5em + 2px);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 191, 8, 0.5);
}

.brand-copy h1 span {
  display: block;
  color: var(--accent);
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.feature-card {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 16px;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

.feature-card span:last-child {
  min-width: 0;
  line-height: 1.25;
}

.chat-shell {
  background:
    radial-gradient(circle at 72% 4%, rgba(255, 191, 8, 0.09), transparent 22%),
    linear-gradient(180deg, rgba(13, 13, 13, 0.94), rgba(3, 3, 3, 0.97));
}

.chat-header {
  min-height: 86px;
  padding: 14px 28px;
  gap: 18px;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.assistant-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 0 28px rgba(255, 191, 8, 0.22);
}

.chat-header-copy h2 {
  font-size: 24px;
  letter-spacing: 0;
}

.chat-header-copy h2 span {
  color: var(--accent);
}

.chat-header-copy p {
  margin-top: 5px;
  font-size: 15px;
}

.chat-header-actions {
  margin-left: auto;
}

.logout-button {
  min-height: 42px;
  padding: 0 24px;
  box-shadow: 0 8px 28px rgba(255, 191, 8, 0.22);
}

.messages {
  padding: 36px 32px 22px;
  gap: 16px;
}

.message-row.assistant {
  align-items: center;
}

.message-avatar {
  width: 74px;
  height: 74px;
  overflow: hidden;
  background: transparent;
  border: none;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 191, 8, 0.18));
}

.message-row.assistant .message-avatar {
  background: transparent;
  box-shadow: none;
}

.message {
  max-width: min(72%, 680px);
  padding: 22px 30px 16px;
  border-radius: 34px;
}

.message-row.assistant .message {
  border-top-left-radius: 34px;
  background: linear-gradient(180deg, rgba(38, 38, 38, 0.94), rgba(24, 24, 24, 0.94));
  border-color: rgba(255, 255, 255, 0.12);
}

.message-text {
  font-size: 14px;
  line-height: 1;
}

.message-text::first-line {
  color: var(--ink);
}

.message-meta {
  font-size: 13px;
}

.composer {
  min-height: 76px;
  margin: 0 32px 22px;
  padding: 0 10px 0 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-radius: 999px;
  border-color: rgba(255, 191, 8, 0.52);
  background: rgba(7, 7, 7, 0.96);
}

.composer::before {
  content: "✦";
  color: var(--accent);
  font-size: 22px;
  margin-right: 14px;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.composer textarea {
  grid-column: 1;
  grid-row: 1;
  min-height: 44px;
  padding: 9px 10px 8px 42px;
  font-size: 17px;
}

.composer-footer {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
}

.form-status {
  display: none;
}

.send-button {
  width: 64px;
  height: 64px;
  border: 0;
  background: var(--accent);
  color: #050505;
  box-shadow: 0 12px 30px rgba(255, 191, 8, 0.28);
}

.send-button:hover {
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(255, 191, 8, 0.34);
}

.send-icon {
  font-size: 28px;
  transform: translateX(2px) rotate(-18deg);
}

@media (max-width: 980px) {
  .app-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .chat-shell {
    min-height: 72vh;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .brand-panel,
  .chat-shell {
    border-radius: 22px;
  }

  .brand-robot {
    width: min(170px, 68%);
  }

  .chat-header {
    min-height: 92px;
    padding: 16px;
  }

  .assistant-badge {
    width: 58px;
    height: 58px;
  }

  .chat-header-copy h2 {
    font-size: 20px;
  }

  .chat-header-copy p {
    font-size: 13px;
  }

  .logout-button {
    min-height: 40px;
    padding: 0 18px;
  }

  .messages {
    padding: 22px 16px;
  }

  .message-avatar {
    width: 44px;
    height: 44px;
  }

  .message {
    max-width: calc(100% - 54px);
    padding: 16px 16px 12px;
    border-radius: 22px;
  }

  .message-text {
    font-size: 15px;
  }

  .composer {
    min-height: 62px;
    margin: 0 12px 12px;
    padding-left: 16px;
  }

  .composer textarea {
    font-size: 14px;
    padding-left: 34px;
  }

  .send-button {
    width: 50px;
    height: 50px;
  }
}
