/**
 * Dialer Bot demo console
 * Website theme + soft dashboard surface (dark rail, light workspace, pastel pills)
 */

:root {
  --bg-page: #f3f6f4;
  --bg-primary: #ffffff;
  --bg-secondary: #faf8f4;
  --bg-tertiary: #eef3f0;
  --bg-elevated: #ffffff;

  --text-primary: #193e39;
  --text-secondary: #52525a;
  --text-tertiary: #7a8480;
  --text-light: #a3aea9;

  --border-light: #e8eeea;
  --border-medium: #dce4df;
  --border-strong: #c5d0ca;

  --rail: #1e322d;
  --rail-soft: #243a34;
  --rail-text: rgba(255, 255, 255, 0.72);
  --rail-muted: rgba(255, 255, 255, 0.42);

  --accent: #60d184;
  --accent-bright: #dbfe7a;
  --accent-deep: #102d23;
  --accent-soft: #e8f8ee;
  --accent-border: #b8e8c6;

  --success: #2f9d63;
  --success-soft: #e6f7ed;
  --warn: #c47a1a;
  --warn-soft: #fff4e5;
  --info: #3b82c4;
  --info-soft: #e8f2fb;
  --purple: #6b5ce0;
  --purple-soft: #efecff;
  --danger: #d64545;
  --danger-soft: #fdeeee;

  --drawer-width: 232px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-light: 0 1px 2px rgba(16, 45, 35, 0.04), 0 8px 24px rgba(16, 45, 35, 0.04);
  --font: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text-primary);
  background: var(--bg-page);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }

.app {
  display: grid;
  grid-template-columns: var(--drawer-width) 1fr;
  min-height: 100vh;
}

/* ——— Dark rail (dashboard-style) ——— */
.nav-drawer {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px;
  background: var(--rail);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 20;
}

.workspace-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: default;
  text-align: left;
  transition: var(--ease);
}

.workspace-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.workspace-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(96, 209, 132, 0.15);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.workspace-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.workspace-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.workspace-plan {
  font-size: 11px;
  color: var(--rail-muted);
  font-weight: 500;
}

.chev {
  color: var(--rail-muted);
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}

.nav-label {
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--rail-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--rail-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: var(--ease);
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: transparent;
  flex-shrink: 0;
  transition: var(--ease);
}

.nav-item svg {
  color: var(--rail-muted);
}

.nav-item:hover:not(.is-disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item:hover:not(.is-disabled) svg {
  color: #fff;
}

.nav-item.active {
  background: rgba(219, 254, 122, 0.1);
  color: #fff;
}

.nav-item.active .nav-icon {
  background: var(--rail-soft);
  box-shadow: inset 0 0 0 1px rgba(96, 209, 132, 0.45);
}

.nav-item.active svg {
  color: var(--accent);
}

.nav-item.is-disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.nav-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  font-size: 11.5px;
  color: var(--rail-muted);
  font-weight: 500;
}

.nav-footer-session {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.session-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-label {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  font-size: 12px;
}

.session-expiry {
  font-size: 11px;
  color: var(--rail-muted);
  padding-left: 15px;
}

.btn-logout {
  margin-top: 2px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: var(--ease);
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.logout-top {
  display: none;
}

.nav-footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 209, 132, 0.2);
}

/* ——— Access-code login ——— */
.login-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-page);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 480px);
  min-height: 100vh;
}

.login-stage {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 28px 36px 32px;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(96, 209, 132, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(219, 254, 122, 0.1), transparent 50%),
    linear-gradient(160deg, #162823 0%, #1e322d 48%, #243a34 100%);
}

.login-stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.login-stage-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  bottom: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 209, 132, 0.22), transparent 68%);
  pointer-events: none;
  animation: login-breathe 7s ease-in-out infinite;
}

.login-stage-top,
.login-stage-copy,
.login-viz {
  position: relative;
  z-index: 1;
}

.login-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: fade-up 0.45s ease both;
}

.login-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-wordmark-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(96, 209, 132, 0.14);
  box-shadow: inset 0 0 0 1px rgba(96, 209, 132, 0.35);
}

.login-wordmark-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-env {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.login-stage-copy {
  max-width: 34rem;
  animation: fade-up 0.5s ease 0.06s both;
}

.login-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.login-hero {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: #fff;
}

.login-lede {
  margin: 16px 0 0;
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 500;
}

.login-viz {
  width: min(420px, 100%);
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  animation: fade-up 0.55s ease 0.12s both;
}

.login-viz-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.login-viz-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 209, 132, 0.2);
  animation: login-pulse 1.8s ease-in-out infinite;
}

.login-viz-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-viz-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.38);
}

.login-viz-steps li span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.28);
  font-variant-numeric: tabular-nums;
}

.login-viz-steps li.done {
  color: rgba(255, 255, 255, 0.72);
}

.login-viz-steps li.done span {
  color: var(--accent);
}

.login-viz-steps li.active {
  background: rgba(219, 254, 122, 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(96, 209, 132, 0.35);
}

.login-viz-steps li.active span {
  color: var(--accent-bright);
}

.login-wave {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 36px;
  margin-top: 14px;
  padding: 0 4px;
}

.login-wave span {
  flex: 1;
  border-radius: 99px 99px 4px 4px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  opacity: 0.55;
  transform-origin: bottom center;
  animation: login-wave 1.2s ease-in-out infinite;
}

.login-wave span:nth-child(1) { height: 28%; animation-delay: 0s; }
.login-wave span:nth-child(2) { height: 48%; animation-delay: 0.08s; }
.login-wave span:nth-child(3) { height: 72%; animation-delay: 0.16s; }
.login-wave span:nth-child(4) { height: 44%; animation-delay: 0.24s; }
.login-wave span:nth-child(5) { height: 90%; animation-delay: 0.1s; }
.login-wave span:nth-child(6) { height: 58%; animation-delay: 0.2s; }
.login-wave span:nth-child(7) { height: 36%; animation-delay: 0.05s; }
.login-wave span:nth-child(8) { height: 78%; animation-delay: 0.18s; }
.login-wave span:nth-child(9) { height: 52%; animation-delay: 0.12s; }
.login-wave span:nth-child(10) { height: 66%; animation-delay: 0.22s; }
.login-wave span:nth-child(11) { height: 40%; animation-delay: 0.06s; }
.login-wave span:nth-child(12) { height: 55%; animation-delay: 0.14s; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(96, 209, 132, 0.07), transparent 60%),
    var(--bg-page);
}

.login-panel-inner {
  width: min(360px, 100%);
  animation: fade-up 0.45s ease 0.08s both;
}

.login-panel-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.login-panel-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.login-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.login-sub {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 34ch;
}

.login-label {
  display: block;
  margin: 28px 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.otp-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 12px repeat(3, 1fr);
  gap: 8px;
  align-items: center;
}

.otp-sep {
  width: 8px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--border-strong);
}

.otp-digit {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0;
  outline: none;
  transition: var(--ease);
  caret-color: var(--accent-deep);
}

.otp-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 209, 132, 0.2);
}

.otp-digit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--bg-tertiary);
}

.otp-row.is-error .otp-digit {
  border-color: #e8a0a0;
  background: var(--danger-soft);
}

.otp-row.shake {
  animation: otp-shake 0.42s ease;
}

@keyframes otp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes login-wave {
  0%, 100% { transform: scaleY(0.55); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 0.85; }
}

@keyframes login-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes login-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

.login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.login-hint {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 22px;
  font-size: 14px;
}

.login-assurance {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-assurance li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.login-assurance svg {
  color: var(--success);
  flex-shrink: 0;
}

.login-foot {
  margin: 28px 0 0;
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 500;
}

/* ——— Page ——— */
.page {
  min-width: 0;
  padding: 22px 28px 48px;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(96, 209, 132, 0.08), transparent 55%),
    var(--bg-page);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
  animation: fade-up 0.35s ease both;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.breadcrumb .sep { color: var(--text-light); }
.breadcrumb .current { color: var(--text-secondary); font-weight: 600; }

.top-bar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-sub {
  margin: 8px 0 0;
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Soft pastel chips (dashboard tags) */
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.chip.live {
  color: var(--success);
  background: var(--success-soft);
}

.chip.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.chip.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Buttons */
.btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-bright);
  color: var(--accent-deep);
  box-shadow: 0 1px 0 rgba(16, 45, 35, 0.06);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(219, 254, 122, 0.35);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-light);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--text-light);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Record fields row */
.record-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-light);
  animation: fade-up 0.4s ease 0.04s both;
}

.field-cell {
  padding: 14px 16px;
  border-right: 1px dashed var(--border-medium);
  min-width: 0;
  transition: background 0.15s ease;
}

.field-cell:last-child { border-right: 0; }

.field-cell:hover {
  background: var(--bg-secondary);
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.field-label svg {
  color: var(--text-light);
}

.field-value {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* Content grid */
.page-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  align-items: start;
  animation: fade-up 0.45s ease 0.08s both;
}

.col-side, .col-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.panel {
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px 0 10px;
  box-shadow: var(--shadow-light);
}

.panel-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 8px;
}

.panel-h h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.mono, .hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.pipeline {
  list-style: none;
  margin: 0;
  padding: 0 6px 6px;
}

.pipeline li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin: 0 4px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: var(--ease);
}

.step-index {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  width: 20px;
}

.pipeline li.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.pipeline li.active .step-index {
  color: var(--success);
}

.pipeline li.done {
  color: var(--text-primary);
}

.pipeline li.done .step-index {
  color: var(--success);
}

.pipeline li.fail {
  color: var(--danger);
  background: var(--danger-soft);
}

.prop-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px dashed var(--border-light);
  font-size: 13px;
}

.prop-row span {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 12px;
}

.prop-row strong {
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.panel-hint {
  margin: 4px 14px 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
  color: var(--text-tertiary);
  font-size: 12px;
}

.panel-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}

#qaStatus.ok { color: var(--success); }
#qaStatus.bad { color: var(--danger); }

/* Activity / transcript */
.transcript-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.transcript {
  list-style: none;
  margin: 0;
  padding: 0 6px 10px;
  max-height: 620px;
  overflow: auto;
  flex: 1;
}

.transcript:not(:empty) + .transcript-empty {
  display: none;
}

.transcript-empty {
  margin: 24px 16px 32px;
  padding: 32px 22px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.55;
  background: var(--bg-secondary);
}

.transcript li {
  padding: 12px 12px;
  margin: 0 4px 4px;
  border-radius: 12px;
  transition: background 0.15s ease;
  animation: row-in 0.22s ease both;
  border-bottom: 1px dashed transparent;
}

.transcript li:hover {
  background: var(--bg-secondary);
}

.transcript .who {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.transcript .bot .who {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.transcript .you .who {
  color: var(--info);
  background: var(--info-soft);
}

.transcript .sys {
  color: var(--warn);
  font-size: 12.5px;
}

.transcript .sys .who {
  color: var(--warn);
  background: var(--warn-soft);
}

.transcript li > div {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.55;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .nav-drawer { display: none; }
  .logout-top { display: inline-flex; }
  .page-grid, .record-board { grid-template-columns: 1fr; }
  .field-cell {
    border-right: 0;
    border-bottom: 1px dashed var(--border-medium);
  }
  .top-bar { flex-direction: column; }
  .page { padding: 16px; }
  .top-bar h1 { font-size: 20px; }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-stage {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
    padding: 32px 20px 40px;
    align-content: center;
  }
  .login-panel-brand {
    display: inline-flex;
  }
  .login-title {
    font-size: 24px;
  }
  .otp-digit {
    height: 48px;
    font-size: 20px;
  }
}
