:root {
  --bg: #0c1b29;
  --bg-soft: #12273a;
  --panel: rgba(11, 22, 35, 0.88);
  --panel-strong: #132638;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ecf4ff;
  --muted: #9fb1c5;
  --accent: #ff9350;
  --accent-strong: #ff7f36;
  --accent-soft: rgba(255, 147, 80, 0.14);
  --success: #3cc39a;
  --danger: #ff6d6d;
  --shadow: 0 28px 70px rgba(2, 9, 18, 0.42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Sora", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 147, 80, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(44, 122, 214, 0.16), transparent 24%),
    linear-gradient(180deg, #08131f 0%, #0e2232 100%);
}

a {
  color: #ffd1b0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-layout {
  width: min(1160px, calc(100% - 40px));
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: center;
}

.auth-layout-single {
  width: min(520px, calc(100% - 40px));
  grid-template-columns: 1fr;
  justify-content: center;
}

.auth-showcase,
.auth-card,
.chat-app {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-showcase {
  min-height: 680px;
  padding: 42px;
  background:
    linear-gradient(155deg, rgba(255, 147, 80, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(16, 33, 49, 0.96), rgba(11, 24, 38, 0.98));
}

.auth-showcase.alt {
  background:
    linear-gradient(155deg, rgba(60, 195, 154, 0.15), transparent 40%),
    linear-gradient(180deg, rgba(16, 33, 49, 0.96), rgba(11, 24, 38, 0.98));
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #09131e;
  color: #fff5eb;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-logo-sm {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
}

.auth-logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 20px;
}

.eyebrow,
.status-pill,
.live-pill,
.today-pill,
.day-pill {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 16px 0 10px;
  color: #ffc59b;
}

.auth-showcase h1,
.auth-head h2,
.chat-box-head h2,
.summary-head h2,
.chat-brand h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.auth-showcase h1 {
  max-width: 11ch;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.auth-copy {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.showcase-grid {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.mini-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.status-pill,
.live-pill,
.today-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
}

.status-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #d5e8ff;
}

.status-pill.success {
  background: rgba(60, 195, 154, 0.16);
  color: #7ff0c8;
}

.status-pill.danger {
  background: rgba(255, 109, 109, 0.14);
  color: #ffb0b0;
}

.status-pill.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: #d5e8ff;
}

.auth-card {
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 36px;
  background: rgba(9, 18, 29, 0.88);
}

.auth-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.field-block span {
  color: var(--muted);
  font-size: 0.92rem;
}

.text-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.text-input::placeholder {
  color: #7f93aa;
}

.text-input:focus {
  outline: none;
  border-color: rgba(255, 147, 80, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 147, 80, 0.12);
}

.primary-btn,
.send-btn,
.secondary-btn,
.ghost-btn,
.prompt-chip {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  font: inherit;
}

.primary-btn,
.send-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111722;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(255, 127, 54, 0.22);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.send-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.prompt-chip:hover {
  transform: translateY(-1px);
}

.auth-submit,
.booking-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 18px;
}

.ghost-btn {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.auth-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.skip-btn {
  width: 100%;
  margin-top: 14px;
}

.auth-message.compact {
  margin-top: 14px;
}

.auth-message.is-error {
  color: #ffb0b0;
}

.auth-message.is-success {
  color: #7ff0c8;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
}

.chat-page {
  display: grid;
  place-items: center;
  padding: 24px 16px 32px;
}

.chat-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.chat-app {
  width: min(1020px, 100%);
  padding: 18px;
  background: rgba(6, 14, 24, 0.78);
}

.chat-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 147, 80, 0.96), rgba(255, 123, 66, 0.9));
  color: #111722;
}

.chat-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-brand .brand-mark {
  background: rgba(0, 0, 0, 0.84);
  color: #fff;
}

.chat-brand .eyebrow,
.chat-brand .topbar-meta {
  color: rgba(17, 23, 34, 0.78);
}

.chat-brand h1 {
  font-size: 1.5rem;
}

.topbar-meta {
  margin: 8px 0 0;
}

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

.live-pill {
  background: rgba(17, 23, 34, 0.9);
  color: #fff6ef;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.chat-layout.single-column {
  grid-template-columns: 1fr;
}

.chat-box-card,
.summary-card,
.section-slab {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 24, 37, 0.96), rgba(9, 18, 29, 0.98));
}

.chat-box-card {
  padding: 18px;
}

.chat-box-head,
.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

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

.chat-box-head h2,
.summary-head h2 {
  font-size: 1.28rem;
}

.today-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #d5e8ff;
}

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chat-helper-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.session-strip {
  margin-top: 16px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.session-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-strip-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.session-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.session-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.session-item.active {
  border-color: rgba(255, 147, 80, 0.45);
  background: rgba(255, 147, 80, 0.1);
}

.session-open,
.session-remove {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.session-open {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  text-align: left;
}

.session-remove {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffc59b;
}

.session-remove:hover {
  background: rgba(255, 147, 80, 0.12);
}

.session-item-title,
.session-item-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-item-title {
  font-weight: 700;
}

.session-item-preview {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.session-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.helper-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.85rem;
}

.prompt-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 147, 80, 0.08);
  color: #ffc59b;
  box-shadow: inset 0 0 0 1px rgba(255, 147, 80, 0.18);
}

.chat-box {
  min-height: 430px;
  max-height: 520px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.day-pill {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  align-self: start;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.message {
  max-width: 78%;
  padding: 14px 16px;
  border-radius: 20px;
  animation: rise 0.22s ease;
}

.message.bot {
  justify-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.message.user {
  justify-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111722;
}

.message-text {
  margin: 0;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 16px;
}

.chat-input {
  border-radius: 20px;
}

.icon-btn {
  min-width: 112px;
  padding: 14px 18px;
  border-radius: 20px;
}

.api-hint {
  margin: 12px 0 0;
  color: #7f93aa;
  font-size: 0.92rem;
  line-height: 1.6;
}

.summary-card {
  padding: 18px;
}

.detail-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-item,
.summary-note {
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item span,
.summary-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-item strong {
  display: block;
  line-height: 1.5;
  word-break: break-word;
}

.summary-note {
  margin-top: 14px;
}

.summary-note p {
  margin: 0;
  line-height: 1.6;
}

.appointments-section {
  margin-top: 18px;
}

.section-slab {
  padding: 18px;
}

.appointments-head {
  margin-bottom: 0;
}

.appointment-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.appointment-list-grid {
  grid-template-columns: 1fr;
}

.appointment-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.appointment-card-row {
  display: grid;
  gap: 10px;
}

.appointment-bar-main {
  display: grid;
  gap: 10px;
}

.appointment-bar-main strong {
  font-size: 1rem;
}

.appointment-bar-cell,
.empty-state {
  color: var(--muted);
}

.appointment-bar-cell {
  display: grid;
  gap: 6px;
}

.appointment-bar-cell strong {
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.appointment-bar-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.appointment-bar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.appointment-badge,
.appointment-time {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.84rem;
}

.appointment-badge {
  background: rgba(255, 147, 80, 0.1);
  color: #ffc59b;
}

.appointment-time {
  background: rgba(255, 255, 255, 0.06);
  color: #d8e5f7;
}

.remove-btn {
  min-width: 98px;
  padding: 11px 14px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 109, 109, 0.12);
  color: #ffb0b0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 109, 109, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.remove-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.remove-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.detail-toggle-btn {
  min-width: 92px;
  padding: 11px 14px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.detail-toggle-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.detail-toggle-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.appointment-detail-panel {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.appointment-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.appointment-detail-item {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.appointment-detail-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.appointment-detail-item strong {
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.detail-error {
  color: #ffb0b0;
  line-height: 1.6;
}

.empty-state {
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.6;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .appointment-bar {
    grid-template-columns: 1fr 1fr;
  }

  .appointment-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .auth-showcase,
  .auth-card {
    min-height: auto;
  }

  .chat-app {
    width: min(760px, 100%);
  }
}

@media (max-width: 680px) {
  .auth-layout {
    width: min(100% - 20px, 1160px);
    min-height: auto;
    padding: 20px 0 24px;
  }

  .auth-showcase,
  .auth-card,
  .chat-app,
  .chat-box-card,
  .summary-card {
    border-radius: 24px;
  }

  .auth-showcase,
  .auth-card,
  .chat-app {
    padding: 20px;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .chat-box {
    min-height: 360px;
  }

  .appointment-bar {
    grid-template-columns: 1fr;
  }

  .appointment-detail-grid {
    grid-template-columns: 1fr;
  }


  .chat-input-row {
    grid-template-columns: 1fr;
  }

  .icon-btn {
    width: 100%;
  }

  .message {
    max-width: 90%;
  }
}
