:root {
  color-scheme: light;
  --navy-950: #041522;
  --navy-900: #071c2c;
  --navy-850: #0b2639;
  --navy-800: #0e2e44;
  --canvas: #edf3f7;
  --paper: #fbfdff;
  --white: #ffffff;
  --ink: #102331;
  --ink-soft: #344b5a;
  --muted: #6f8491;
  --subtle: #97aab4;
  --line: #dce7ed;
  --line-strong: #c8d8e1;
  --mint: #25d4f5;
  --mint-bright: #78eaff;
  --mint-soft: #e0f8ff;
  --mint-deep: #087ea6;
  --blue: #3f78ff;
  --warn: #9a640c;
  --danger: #c13e35;
  --shadow-xl: 0 32px 90px rgba(2, 20, 34, 0.27);
  --shadow-lg: 0 22px 60px rgba(14, 43, 62, 0.13);
  --shadow-sm: 0 8px 24px rgba(15, 48, 67, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Login */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 36px;
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 212, 245, 0.09), transparent 28%),
    radial-gradient(circle at 88% 80%, rgba(77, 121, 238, 0.08), transparent 28%),
    #e9f0f4;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(420px, 0.83fr);
  width: min(1180px, 100%);
  min-height: min(700px, calc(100vh - 72px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 42px 46px 32px;
  background:
    radial-gradient(circle at 90% 14%, rgba(37, 212, 245, 0.18), transparent 29%),
    radial-gradient(circle at 10% 92%, rgba(77, 121, 238, 0.16), transparent 31%),
    linear-gradient(145deg, var(--navy-950), #082238 58%, #092d43);
  color: var(--white);
}

.showcase-grid {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(135deg, transparent, #000 32%, #000 74%, transparent);
}

.login-showcase::before,
.login-showcase::after {
  position: absolute;
  border: 1px solid rgba(120, 234, 255, 0.22);
  border-radius: 50%;
  content: "";
}

.login-showcase::before {
  top: 86px;
  right: -118px;
  width: 340px;
  height: 340px;
}

.login-showcase::after {
  top: 142px;
  right: -62px;
  width: 230px;
  height: 230px;
}

.agency-brand,
.sidebar-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(120, 234, 255, 0.32);
  border-radius: 15px;
  background: rgba(120, 234, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.brand-symbol svg {
  width: 26px;
  height: 26px;
  fill: var(--mint-bright);
}

.brand-symbol .brand-signal {
  fill: none;
  stroke: var(--mint-bright);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.agency-brand span,
.sidebar-brand > div:nth-child(2) span {
  display: block;
  color: var(--mint-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.agency-brand strong,
.sidebar-brand > div:nth-child(2) strong {
  display: block;
  margin-top: 4px;
  color: var(--white);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.showcase-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 66px 0 54px;
}

.showcase-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.19em;
}

.showcase-label span {
  width: 28px;
  height: 1px;
  background: var(--mint);
}

.showcase-copy h1 {
  margin-top: 24px;
  color: #f7fffc;
  font-size: clamp(40px, 4.1vw, 62px);
  font-weight: 610;
  letter-spacing: -0.055em;
  line-height: 1.14;
}

.showcase-copy h1 em,
.conversation-intro h3 em {
  color: var(--mint-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.showcase-description {
  margin-top: 27px;
  color: rgba(237, 249, 245, 0.63);
  font-size: 15px;
  line-height: 1.8;
}

.showcase-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.showcase-metrics div {
  display: grid;
  gap: 5px;
  padding: 22px 18px 21px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.showcase-metrics div:first-child {
  padding-left: 0;
}

.showcase-metrics div:last-child {
  border-right: 0;
}

.showcase-metrics strong {
  color: #f9fffd;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.showcase-metrics span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.showcase-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.showcase-footer span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.03em;
  text-transform: none;
}

.showcase-footer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(37, 212, 245, 0.09);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 62px clamp(42px, 5vw, 72px);
  background: var(--paper);
}

.private-label {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid #c9e8f2;
  border-radius: 999px;
  background: #edf9fd;
  color: var(--mint-deep);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.login-header h2 {
  margin-top: 19px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 690;
  letter-spacing: -0.045em;
}

.login-header p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 29px;
  padding: 15px 16px;
  border: 1px solid #dcebf1;
  border-radius: 14px;
  background: #f2f8fb;
  color: var(--muted);
}

.notice-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--white);
  color: var(--mint-deep);
  box-shadow: 0 3px 12px rgba(31, 74, 64, 0.08);
}

.notice-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.demo-notice p {
  font-size: 11px;
  line-height: 1.55;
}

.demo-notice strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 12px;
}

.login-fields {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.field-control {
  position: relative;
}

.field-control svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--subtle);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.login-field input {
  width: 100%;
  height: 52px;
  padding: 0 15px 0 46px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-field input:focus {
  border-color: #4ab8d5;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 212, 245, 0.12);
}

.login-error {
  min-height: 18px;
  margin-top: 7px;
  color: var(--danger);
  font-size: 11px;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 18px 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--navy-950);
  color: var(--white);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(7, 22, 32, 0.18);
}

.login-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--mint-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-button:hover {
  background: #0d2a35;
  transform: translateY(-1px);
}

.login-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-footnote i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #bcc9c6;
}

body.authenticated .login-screen {
  display: none;
}

body.locked .app-shell {
  display: none;
}

/* Application */

.app-shell {
  display: grid;
  grid-template-columns: minmax(330px, 360px) minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  min-width: 0;
  overflow: hidden;
  background: var(--canvas);
}

.scenario-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 24px 22px;
  background:
    radial-gradient(circle at 5% 30%, rgba(37, 212, 245, 0.08), transparent 31%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: var(--white);
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.sidebar-brand {
  min-height: 48px;
}

.brand-symbol.compact {
  width: 41px;
  height: 41px;
  border-radius: 12px;
}

.brand-symbol.compact svg {
  width: 22px;
  height: 22px;
}

.demo-chip {
  margin-left: auto;
  padding: 5px 7px;
  border: 1px solid rgba(120, 234, 255, 0.24);
  border-radius: 6px;
  color: rgba(120, 234, 255, 0.72);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.workspace-title {
  margin-top: 38px;
}

.workspace-title p {
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.workspace-title h1 {
  margin-top: 10px;
  color: #f4fbf9;
  font-size: 25px;
  font-weight: 580;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.workspace-title h1 span {
  color: var(--mint-bright);
}

.status-card {
  display: grid;
  gap: 13px;
  margin-top: 25px;
  padding: 18px;
  border: 1px solid rgba(120, 234, 255, 0.13);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.status-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-card-head > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(224, 255, 246, 0.72);
  font-size: 9px;
  font-weight: 730;
  letter-spacing: 0.02em;
}

.status-card-head b {
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(37, 212, 245, 0.11);
  color: var(--mint-bright);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(37, 212, 245, 0.1);
}

.status-card h2 {
  color: #effbf7;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.status-card > p {
  color: rgba(232, 246, 242, 0.43);
  font-size: 11px;
  line-height: 1.6;
}

.data-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.data-metrics div {
  display: grid;
  gap: 3px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.data-metrics div:first-child {
  text-align: left;
}

.data-metrics div:last-child {
  border-right: 0;
  text-align: right;
}

.data-metrics strong {
  color: #ecfbf7;
  font-size: 15px;
  font-weight: 610;
}

.data-metrics span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}

.question-section {
  flex: 0 0 auto;
  min-height: 0;
  margin-top: 29px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading > div {
  display: grid;
  gap: 4px;
}

.section-heading span {
  color: rgba(255, 255, 255, 0.28);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.section-heading strong {
  color: rgba(247, 255, 252, 0.86);
  font-size: 12px;
  font-weight: 650;
}

#reloadScenarios {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

#reloadScenarios svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

#reloadScenarios:hover {
  border-color: rgba(120, 234, 255, 0.32);
  background: rgba(120, 234, 255, 0.08);
  color: var(--mint-bright);
}

.scenario-list {
  display: grid;
  gap: 7px;
  counter-reset: scenario;
}

.scenario-button {
  position: relative;
  width: 100%;
  min-height: 50px;
  padding: 11px 36px 11px 45px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(241, 251, 248, 0.57);
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
  counter-increment: scenario;
}

.scenario-button::before {
  position: absolute;
  top: 50%;
  left: 10px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
  font-weight: 750;
  content: counter(scenario, decimal-leading-zero);
}

.scenario-button::after {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-52%);
  color: rgba(255, 255, 255, 0.18);
  font-size: 15px;
  content: "›";
}

.scenario-button:hover {
  border-color: rgba(120, 234, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: #f0fcf8;
  transform: translateX(2px);
}

.scenario-button:hover::before {
  border-color: rgba(120, 234, 255, 0.28);
  color: var(--mint-bright);
}

#reloadScenarios:disabled,
.scenario-button:disabled,
#sendButton:disabled,
textarea:disabled {
  cursor: wait;
  opacity: 0.46;
}

.scenario-button:disabled:hover {
  border-color: transparent;
  background: transparent;
  transform: none;
}

.sidebar-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: rgba(37, 212, 245, 0.08);
  color: var(--mint-bright);
}

.footer-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.sidebar-footer p {
  display: grid;
  gap: 2px;
}

.sidebar-footer strong {
  color: rgba(248, 255, 253, 0.62);
  font-size: 9px;
  font-weight: 680;
}

.sidebar-footer span {
  color: rgba(255, 255, 255, 0.27);
  font-size: 8px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 100px;
  padding: 20px clamp(28px, 3.2vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 253, 252, 0.94);
  backdrop-filter: blur(14px);
}

.chat-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mint-deep);
  font-size: 8px;
  font-weight: 830;
  letter-spacing: 0.15em;
}

.eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(37, 212, 245, 0.11);
}

.chat-title h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.chat-title > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.model-badge {
  display: grid;
  min-width: 162px;
  max-width: 240px;
  gap: 3px;
  padding: 8px 11px;
  border: 1px solid #b8dfee;
  border-radius: 9px;
  background: linear-gradient(180deg, #f0faff, #ffffff);
  box-shadow: 0 6px 16px rgba(18, 86, 116, 0.07);
}

.model-badge span {
  color: var(--mint-deep);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.model-badge strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 740;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #c9e7f2;
  border-radius: 9px;
  background: #eef9fd;
  color: var(--mint-deep);
  font-size: 9px;
  font-weight: 730;
  white-space: nowrap;
}

.agent-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

.agent-badge svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.muted-badge {
  border-color: var(--line);
  background: var(--white);
  color: var(--muted);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px max(32px, calc((100vw - 1160px) / 2));
  background:
    radial-gradient(circle at 82% 9%, rgba(37, 212, 245, 0.055), transparent 25%),
    linear-gradient(180deg, #f8fbfa, #f2f6f5);
  scrollbar-color: #c5d2cf transparent;
}

.conversation-intro {
  position: relative;
  width: min(700px, 100%);
  margin: auto auto 10px;
  padding: 34px 36px 31px;
  overflow: hidden;
  border: 1px solid rgba(28, 75, 71, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(37, 212, 245, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.conversation-intro::after {
  position: absolute;
  top: -55px;
  right: -40px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(37, 212, 245, 0.18);
  border-radius: 50%;
  content: "";
}

.intro-label {
  color: var(--mint-deep);
  font-size: 8px;
  font-weight: 840;
  letter-spacing: 0.16em;
}

.conversation-intro h3 {
  margin-top: 15px;
  color: var(--ink);
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 610;
  letter-spacing: -0.05em;
  line-height: 1.22;
}

.conversation-intro h3 em {
  color: var(--mint-deep);
}

.conversation-intro p {
  width: min(520px, 100%);
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 21px;
}

.capability-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: 0.02em;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(850px, 100%);
  line-height: 1.66;
}

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

.message.agent,
.message.loading {
  align-self: flex-start;
}

.message-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(37, 212, 245, 0.22);
  border-radius: 11px;
  background: var(--navy-900);
  color: var(--mint-bright);
  font-size: 9px;
  font-weight: 820;
  box-shadow: 0 6px 16px rgba(7, 22, 32, 0.12);
}

.message.user .message-avatar {
  border-color: rgba(77, 121, 238, 0.2);
  background: #e9eefb;
  color: #355dbf;
  box-shadow: none;
}

.message-content {
  max-width: min(750px, calc(100vw - 470px));
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 5px 17px 17px 17px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-soft);
  font-size: 12px;
  white-space: pre-wrap;
  box-shadow: 0 8px 24px rgba(23, 47, 52, 0.055);
}

.message-label {
  margin-bottom: 7px;
  color: var(--mint-deep);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.message.user .message-label {
  color: rgba(120, 234, 255, 0.72);
  text-align: right;
}

.message-text {
  white-space: pre-wrap;
}

.message.user .message-content {
  border-color: #173744;
  border-radius: 17px 5px 17px 17px;
  background: #102b38;
  color: #f2fbf8;
}

.message.loading .message-content {
  display: grid;
  gap: 12px;
  min-width: min(100%, 380px);
  color: var(--muted);
}

.progress-track {
  position: relative;
  width: 310px;
  max-width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e5;
}

.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-deep), var(--mint));
  animation: progress-slide 1.05s ease-in-out infinite;
}

@keyframes progress-slide {
  0% { transform: translateX(-110%); }
  55% { width: 64%; }
  100% { transform: translateX(235%); }
}

.meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: var(--subtle);
  font-size: 9px;
  white-space: normal;
}

.meta::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.message.user .meta {
  color: rgba(255, 255, 255, 0.55);
}

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

.reference {
  position: relative;
  min-width: 0;
  padding: 11px 11px 11px 29px;
  overflow: hidden;
  border: 1px solid #ddeaf0;
  border-radius: 10px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  white-space: normal;
}

.reference strong,
.reference span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference strong {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.reference span {
  margin-top: 2px;
  color: var(--subtle);
  font-size: 8px;
}

.reference::before {
  position: absolute;
  top: 12px;
  left: 11px;
  width: 8px;
  height: 10px;
  border: 1px solid #55b9d4;
  border-radius: 2px;
  content: "";
}

.reference::after {
  position: absolute;
  top: 15px;
  left: 14px;
  width: 4px;
  height: 1px;
  background: #55b9d4;
  box-shadow: 0 3px 0 #55b9d4;
  content: "";
}

.composer-zone {
  padding: 16px max(28px, calc((100vw - 1160px) / 2)) 18px;
  border-top: 1px solid var(--line);
  background: rgba(251, 253, 252, 0.97);
  backdrop-filter: blur(14px);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 11px;
}

.composer-box {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--white);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.composer-box:focus-within {
  border-color: #5bbbd3;
  box-shadow: 0 0 0 4px rgba(37, 212, 245, 0.1), var(--shadow-sm);
}

textarea {
  display: block;
  width: 100%;
  min-height: 60px;
  max-height: 145px;
  resize: none;
  padding: 14px 16px 8px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

textarea::placeholder {
  color: #a0afb4;
}

textarea:disabled {
  background: #f2f5f4;
}

.composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 10px 16px;
  color: var(--subtle);
  font-size: 8px;
}

kbd {
  padding: 2px 4px;
  border: 1px solid #dbe3e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f7f9f9;
  color: #78888e;
  font-family: inherit;
  font-size: 7px;
}

.private-status {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.private-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

#sendButton {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  align-self: start;
  border: 0;
  border-radius: 14px;
  background: var(--navy-950);
  color: var(--mint-bright);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(7, 22, 32, 0.16);
}

#sendButton svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

#sendButton:hover {
  background: #103441;
  transform: translateY(-2px);
}

#sendButton:disabled {
  cursor: wait;
  opacity: 0.45;
  transform: none;
}

.composer-disclaimer {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 8px;
  text-align: center;
}

.is-answering .composer-box {
  border-color: #cfdad7;
}

@media (max-width: 1050px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
  }

  .login-showcase {
    padding-inline: 36px;
  }

  .showcase-copy h1 {
    font-size: 42px;
  }

  .app-shell {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .scenario-panel {
    padding-inline: 20px;
  }

  .chat-title > span {
    max-width: 430px;
  }
}

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

  .login-screen {
    align-items: start;
    padding: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-showcase {
    min-height: 390px;
    padding: 30px;
  }

  .showcase-copy {
    padding: 48px 0 38px;
  }

  .showcase-copy h1 {
    font-size: 39px;
  }

  .showcase-description br {
    display: none;
  }

  .showcase-footer {
    display: none;
  }

  .login-panel {
    padding: 42px 30px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .scenario-panel {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 22px;
  }

  .workspace-title,
  .status-card,
  .sidebar-footer {
    display: none;
  }

  .question-section {
    margin-top: 23px;
  }

  .scenario-list {
    display: flex;
    width: 100%;
    max-width: calc(100vw - 44px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
  }

  .scenario-button {
    min-width: 260px;
  }

  .chat-panel {
    height: 720px;
    min-height: 720px;
  }

  .chat-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 22px;
  }

  .chat-title > span {
    max-width: calc(100vw - 44px);
  }

  .chat-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .chat-actions .agent-badge {
    display: none;
  }

  .model-badge {
    min-width: 190px;
    max-width: 100%;
  }

  .messages {
    padding: 25px 18px;
  }

  .conversation-intro {
    margin-block: 0;
    padding: 27px 22px;
  }

  .message-content {
    max-width: calc(100vw - 86px);
  }

  .references {
    grid-template-columns: 1fr;
  }

  .composer-zone {
    padding: 12px 18px 15px;
  }

  .composer-meta > span:first-child {
    display: none;
  }

  .composer-meta {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .login-screen {
    padding: 0;
    background: var(--white);
  }

  .login-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-showcase {
    min-height: 330px;
    padding: 24px;
    border-radius: 0 0 24px 24px;
  }

  .showcase-copy {
    padding: 38px 0 22px;
  }

  .showcase-copy h1 {
    font-size: 34px;
  }

  .showcase-description {
    font-size: 13px;
  }

  .showcase-metrics {
    display: none;
  }

  .login-panel {
    padding: 34px 24px 42px;
  }

  .login-header h2 {
    font-size: 27px;
  }

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

  #sendButton {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
