:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152033;
  background: #f4f7fb;
  font-synthesis: none;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --navy: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --panel: #ffffff;
  --soft: #f8fafc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.auth-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.12), transparent 28rem),
    linear-gradient(135deg, #eef4ff 0%, #f8fafc 52%, #ffffff 100%);
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 430px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  padding: 34px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

.brand-mark-small {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 17px;
}

.eyebrow {
  margin: 20px 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.auth-card h1,
.chat-header h1,
.right-future h2 {
  margin: 0;
  color: var(--navy);
}

.auth-copy {
  margin: 10px 0 26px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 650;
  color: #334155;
}

.auth-form input {
  width: 100%;
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 13px;
  outline: none;
  background: #fff;
  color: var(--navy);
}

.auth-form input:focus,
.composer textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-hint {
  margin: -7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

.form-message.success {
  color: #047857;
}

.primary-button,
.send-button {
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  min-height: 46px;
}

.primary-button:hover,
.send-button:hover {
  background: var(--blue-dark);
}

.primary-button:disabled,
.send-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.auth-switch {
  margin: 24px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.chat-page {
  height: 100dvh;
  overflow: hidden;
  background: #eef3f9;
}

.chat-layout {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-columns: 20% 50% 30%;
  overflow: hidden;
}

.left-column,
.right-column,
.center-column {
  min-width: 0;
  min-height: 0;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-size: 18px;
}

.future-panel {
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
}

.future-panel p {
  margin: 8px 0 0;
}

.future-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.account-box {
  margin-top: auto;
  display: grid;
  gap: 9px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.text-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.center-column {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--panel);
}

.chat-header {
  flex: 0 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.chat-header .eyebrow {
  margin: 0 0 4px;
}

.chat-header h1 {
  font-size: 24px;
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 1));
}

.message {
  width: min(82%, 680px);
  margin-bottom: 14px;
  border-radius: 16px;
  padding: 13px 15px;
  line-height: 1.55;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  overflow-wrap: anywhere;
}

.message p {
  margin: 0;
  white-space: pre-wrap;
}

.message-label {
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.68;
}

.assistant-message {
  margin-right: auto;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}

.user-message {
  margin-left: auto;
  background: var(--blue);
  color: #fff;
}

.composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer textarea {
  min-width: 0;
  flex: 1 1 auto;
  max-height: 124px;
  min-height: 46px;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  color: var(--navy);
  line-height: 1.45;
}

.send-button {
  flex: 0 0 auto;
  min-width: 72px;
  height: 46px;
  padding: 0 16px;
}

.right-column {
  padding: 24px 20px;
  border-left: 1px solid var(--line);
  background: #f8fafc;
}

.right-future {
  min-height: 210px;
}

.right-future h2 {
  margin-top: 12px;
  font-size: 18px;
}

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

@media (max-width: 900px) {
  .chat-layout {
    grid-template-columns: 18% 62% 20%;
  }

  .left-column,
  .right-column {
    padding-inline: 12px;
  }

  .future-panel {
    padding: 12px;
  }
}

@media (max-width: 700px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .left-column,
  .right-column {
    display: none;
  }

  .center-column {
    width: 100%;
  }
}
