:root {
  color-scheme: light;
  --bg: #f4f0fb;
  --bg-strong: #e7def7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-dark: #1d1531;
  --text: #161225;
  --muted: #37304c;
  --line: rgba(68, 51, 122, 0.2);
  --accent: #7b61ff;
  --accent-strong: #ff78b5;
  --accent-dark: #231b3c;
  --accent-soft: rgba(123, 97, 255, 0.14);
  --success: #146c4d;
  --danger: #a33a61;
  --shadow: 0 24px 60px rgba(45, 30, 90, 0.16);
  --shadow-soft: 0 12px 28px rgba(45, 30, 90, 0.13);
  --glass-highlight: rgba(255, 255, 255, 0.72);
  --glass-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.28));
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07070f;
  --bg-strong: #110f1f;
  --surface: rgba(17, 14, 30, 0.54);
  --surface-strong: #141120;
  --surface-dark: #f5f1ff;
  --text: #f6f1ff;
  --muted: #beb7d7;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #9380ff;
  --accent-strong: #ff79b7;
  --accent-dark: #f3efff;
  --accent-soft: rgba(147, 128, 255, 0.18);
  --success: #8bd4ba;
  --danger: #ffa0b5;
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.24);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(151, 120, 255, 0.16), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(255, 120, 181, 0.14), transparent 22%),
    linear-gradient(180deg, #f8f5ff 0%, #fcfbff 100%);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(147, 128, 255, 0.18), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(255, 121, 183, 0.12), transparent 24%),
    linear-gradient(180deg, #07070f 0%, #0d0a18 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.22), transparent 92%);
  pointer-events: none;
  opacity: 1;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 56px;
  position: relative;
  z-index: 1;
}

.top-controls {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.theme-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
}

.theme-switcher::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass-overlay);
  pointer-events: none;
}

:root[data-theme="dark"] .theme-switcher {
  background: var(--surface);
}

.theme-switcher__button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  background: transparent;
  color: #2e2741;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-switcher__button:hover {
  transform: translateY(-1px);
}

.theme-switcher__button.is-active {
  background: var(--surface-dark);
  color: #fff;
}

:root[data-theme="dark"] .theme-switcher__button.is-active {
  color: #171225;
}

.top-controls__login {
  min-width: 132px;
  text-align: center;
}

.top-controls__stack {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  width: 100%;
}

.top-controls__action {
  width: 100%;
}

.account-menu {
  position: relative;
}

.account-button {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.account-dropdown::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-overlay);
  pointer-events: none;
}

.account-dropdown > * {
  position: relative;
  z-index: 1;
}

.account-dropdown__header {
  display: grid;
  gap: 6px;
}

.account-dropdown__label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3d3653;
}

.account-dropdown__email {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
}

.account-dropdown__actions {
  display: grid;
  gap: 8px;
}

.account-dropdown .theme-switcher {
  width: 100%;
  justify-content: stretch;
}

.account-dropdown .theme-switcher__button {
  flex: 1 1 0;
  text-align: center;
}

.page-shell--auth {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.auth-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 420px;
  gap: 18px;
  align-items: center;
}

.auth-hero__copy,
.hero__copy,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.auth-hero__copy,
.hero__copy {
  padding: 56px;
  border-radius: var(--radius-xl);
}

.auth-hero__copy {
  padding: 38px 42px;
}

.hero__copy--compact {
  padding: 34px 40px;
}

.hero__copy,
.auth-hero__copy {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6547d9 0%, #7d58ea 48%, #db79a7 100%);
  border: 0;
  box-shadow: none;
}

:root[data-theme="dark"] .hero__copy,
:root[data-theme="dark"] .auth-hero__copy {
  background: linear-gradient(135deg, #4a33a1 0%, #6c49c2 48%, #c76696 100%);
}

.hero__copy::before,
.auth-hero__copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.42;
  pointer-events: none;
}

.hero__copy > *,
.auth-hero__copy > * {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero--landing,
.hero--app {
  grid-template-columns: 1fr;
}

.hero--app {
  margin-bottom: 14px;
}

.hero__eyebrow,
.card__kicker {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__eyebrow {
  color: rgba(255, 255, 255, 0.98);
  background: rgba(26, 18, 49, 0.16);
}

.card__kicker {
  color: #2f2650;
  background: rgba(123, 97, 255, 0.16);
}

.hero h1,
.card h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1;
  margin: 18px 0 14px;
}

.hero h1 {
  font-size: clamp(3.2rem, 5vw, 5.4rem);
  max-width: 14ch;
  color: #ffffff;
  text-wrap: balance;
}

.auth-hero__copy h1 {
  color: #ffffff;
}

.hero__text {
  max-width: 66ch;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero__chips span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__panel {
  display: grid;
  gap: 14px;
}

.metric,
.stat-card,
.feature-item,
.layer,
.timeline-grid span,
.card {
  border-radius: var(--radius-lg);
}

.metric,
.stat-card,
.feature-item,
.layer,
.timeline-grid span {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .feature-item,
:root[data-theme="dark"] .layer,
:root[data-theme="dark"] .timeline-grid span,
:root[data-theme="dark"] .card {
  background: var(--surface);
}

.metric::before,
.stat-card::before,
.feature-item::before,
.layer::before,
.timeline-grid span::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass-overlay);
  pointer-events: none;
}

.hero__panel .metric,
.hero__panel .stat-card {
  background: linear-gradient(180deg, rgba(26, 20, 45, 0.98), rgba(18, 14, 31, 0.98));
  border-color: rgba(189, 183, 211, 0.1);
  box-shadow: none;
}

.hero__panel .metric strong,
.hero__panel .stat-card strong,
.hero__panel .metric span,
.hero__panel .stat-card p,
.hero__panel .stat-card__label {
  color: #f6f1ff;
  position: relative;
  z-index: 1;
}

.hero__panel .metric span,
.hero__panel .stat-card p,
.hero__panel .stat-card__label {
  opacity: 0.82;
}

.metric strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
}

.metric span,
.stat-card p,
.feature-item p,
.layer p,
.section-note,
.workspace-meta p,
.chat-intro {
  color: var(--muted);
  position: relative;
  z-index: 1;
}


.stat-card__label,
.layer span {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.stat-card strong,
.feature-item strong,
.layer strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  position: relative;
  z-index: 1;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.section-grid,
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.card {
  padding: 28px;
  overflow: hidden;
  position: relative;
}

.chat-card {
  padding: 20px;
}

.layers-card,
.cta-card {
  margin-bottom: 18px;
}

.card__header {
  margin-bottom: 20px;
}

.feature-list,
.layers-grid {
  display: grid;
  gap: 12px;
}

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

.layer--wide {
  grid-column: 1 / -1;
}

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

.timeline-grid span {
  font-weight: 700;
}

.section-note {
  margin: 18px 0 0;
  line-height: 1.65;
}

.cta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.auth-card--standalone {
  max-width: 420px;
  width: 100%;
  justify-self: end;
}

.auth-hint {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-hint p {
  margin: 10px 0 0;
  font-weight: 700;
}

.tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(123, 97, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .tabs {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(189, 183, 211, 0.14);
}

.tab,
.button,
input,
textarea {
  font: inherit;
}

.tab {
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: #201a34;
  font-weight: 700;
  transition: 0.2s ease;
}

.tab:hover {
  background: rgba(123, 97, 255, 0.12);
}

.tab.is-active {
  background: var(--surface-dark);
  color: #fff;
}

:root[data-theme="dark"] .tab {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.02);
}

:root[data-theme="dark"] .tab:hover {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .tab.is-active {
  background: #f5f1ff;
  color: #171225;
}

.auth-form,
.chat-form,
.field {
  display: grid;
  gap: 14px;
}

label {
  font-size: 0.95rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: #514b68;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

input:focus,
textarea:focus {
  border-color: rgba(123, 97, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 14px 28px rgba(123, 97, 255, 0.24);
}

.button--ghost {
  color: #241d39;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(88, 70, 147, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .button--ghost {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .account-dropdown__actions .button--ghost {
  color: #ffffff;
}

.button--text {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  justify-self: start;
}

.button--text:hover:not(:disabled) {
  color: var(--text);
  transform: none;
}

.message {
  margin: 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.message.is-error {
  color: var(--danger);
}

.message.is-success {
  color: var(--success);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.chat-heading h2 {
  margin-bottom: 10px;
}

.chat-intro {
  margin: 0;
  max-width: 58ch;
  line-height: 1.6;
}

.workspace-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 220px;
}

.workspace-meta p {
  margin: 0;
}

.chat-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.service-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 18;
  width: min(336px, calc(100vw - 20px));
  display: grid;
  gap: 0;
  padding: 12px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: width 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.service-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-overlay);
  pointer-events: none;
}

.service-panel > * {
  position: relative;
  z-index: 1;
}

.service-panel__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.service-panel__toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

:root[data-theme="dark"] .service-panel__toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.service-panel__toggle-indicator {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 0 0 6px rgba(123, 97, 255, 0.12);
}

.service-panel__toggle-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.service-panel__toggle-copy strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.service-panel__toggle-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-panel__body {
  display: grid;
  gap: 10px;
  padding: 10px 4px 4px;
}

.service-panel.is-collapsed {
  width: 210px;
}

.service-panel.is-collapsed .service-panel__body {
  display: none;
}

.service-panel__row {
  display: grid;
  gap: 6px;
}

.service-panel__label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3d3653;
}

.service-panel__value {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.service-panel__value.is-error {
  color: var(--danger);
}

.service-panel__value.is-success {
  color: var(--success);
}

.service-panel__value--muted {
  color: #433c58;
}

.service-panel__value--input input {
  margin: 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  line-height: 1.5;
  color: #37304c;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.field--consent {
  gap: 0;
}

.field-hint {
  margin: -4px 0 0;
  color: #433c58;
  font-size: 0.9rem;
  line-height: 1.5;
}

.field-hint--strong {
  margin: 0;
  font-weight: 700;
}

.auth-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.model-picker {
  width: 180px;
}

.model-picker span {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.chat-log {
  display: grid;
  gap: 16px;
  min-height: 540px;
  max-height: 64vh;
  overflow: auto;
  padding: 8px 4px 8px;
  margin-bottom: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 97, 255, 0.35) transparent;
}

.chat-shell {
  display: grid;
  gap: 18px;
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 2px;
}

.chat-topbar__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.chat-topbar__copy {
  min-width: 0;
}

.chat-topbar__copy h2 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.chat-topbar__copy p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.55;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-soft);
}

.chat-avatar--assistant {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.chat-avatar--user {
  color: var(--text);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .chat-avatar--user {
  background: rgba(255, 255, 255, 0.06);
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

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

.message-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: min(82%, 780px);
}

.message-row--user .message-stack {
  justify-items: end;
}

.message-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  color: #3f3855;
  font-size: 0.82rem;
  font-weight: 700;
}

.message-meta span:last-child {
  font-weight: 600;
  opacity: 0.9;
}

.bubble {
  width: 100%;
  max-width: none;
  padding: 15px 18px;
  border-radius: 22px;
  line-height: 1.62;
  animation: fadeInUp 0.35s ease;
  white-space: pre-wrap;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bubble p {
  margin: 0;
}

.bubble--assistant {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(123, 97, 255, 0.14);
  border-bottom-left-radius: 10px;
}

:root[data-theme="dark"] .bubble--assistant {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(189, 183, 211, 0.1);
}

.chat-starters {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 0;
  align-items: stretch;
}

.chat-starters__button {
  min-height: 78px;
  border: 1px solid rgba(88, 70, 147, 0.18);
  border-radius: 28px;
  background: transparent;
  color: var(--text);
  padding: 12px 24px;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.chat-starters__button:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 97, 255, 0.34);
}

:root[data-theme="dark"] .chat-starters__button {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(237, 232, 246, 0.86);
}

:root[data-theme="dark"] .chat-starters__button:hover {
  border-color: rgba(180, 164, 255, 0.28);
  color: #f6f3ff;
}

@media (max-width: 1280px) {
  .chat-starters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bubble--user {
  color: #fff;
  background: linear-gradient(135deg, #705af6 0%, #ff79b7 100%);
  border-bottom-right-radius: 10px;
}

.bubble--thinking {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 18px;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.thinking-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(123, 97, 255, 0.62);
  animation: thinkingPulse 1.2s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.chat-composer {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .chat-composer {
  background: rgba(255, 255, 255, 0.04);
}

.chat-composer__field {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.chat-composer textarea {
  min-height: 54px;
  max-height: 180px;
  padding: 16px 18px;
  border-radius: 20px;
  resize: none;
  overflow-y: hidden;
  box-shadow: none;
}

.chat-composer textarea::placeholder {
  color: var(--muted);
}

.chat-send {
  flex: 0 0 auto;
  min-width: 128px;
  min-height: 54px;
  padding-inline: 18px;
}

.chat-composer__hint {
  margin: 0;
  padding: 0 4px;
  color: #433c58;
  font-size: 0.82rem;
  line-height: 1.4;
}

.chat-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.chat-actions--end {
  justify-content: flex-end;
}

.admin-page-shell {
  padding-bottom: 96px;
}

.admin-auth-hero .auth-hero__copy {
  min-height: auto;
  padding: 14px 24px !important;
}

.admin-shell {
  width: min(1440px, calc(100% - 24px));
  padding-top: 24px;
}

.admin-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  gap: 18px;
}

.admin-sidebar,
.admin-content,
.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-sidebar {
  align-self: start;
  position: sticky;
  top: 18px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

:root[data-theme="dark"] .admin-sidebar {
  background: rgba(12, 10, 22, 0.72);
}

.admin-sidebar__brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.admin-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.admin-sidebar__brand strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.admin-sidebar__brand p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-nav {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.admin-nav__link {
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.admin-nav__link:hover,
.admin-nav__link.is-active {
  background: rgba(123, 97, 255, 0.14);
  color: var(--text);
  transform: translateX(2px);
}

.admin-content {
  min-width: 0;
}

.admin-topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(240px, 320px) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 18px;
  z-index: 15;
}

:root[data-theme="dark"] .admin-topbar {
  background: rgba(12, 10, 22, 0.72);
}

.admin-topbar__title h1 {
  margin: 8px 0 0;
  font-size: 1.6rem;
}

.admin-topbar__search {
  margin: 0;
}

.admin-topbar__search input {
  width: 100%;
}

.admin-topbar__profile {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.admin-profile {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-profile__meta {
  display: grid;
  gap: 2px;
  text-align: right;
}

.admin-profile__meta strong {
  font-size: 0.95rem;
}

.admin-profile__meta span {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-pill--success {
  color: var(--success);
  background: rgba(20, 108, 77, 0.12);
  border-color: rgba(20, 108, 77, 0.2);
}

.status-pill--warning {
  color: #9a6800;
  background: rgba(183, 123, 17, 0.12);
  border-color: rgba(183, 123, 17, 0.2);
}

.status-pill--error {
  color: var(--danger);
  background: rgba(163, 58, 97, 0.12);
  border-color: rgba(163, 58, 97, 0.2);
}

.status-pill--info {
  color: var(--accent);
  background: rgba(123, 97, 255, 0.12);
  border-color: rgba(123, 97, 255, 0.2);
}

.admin-dashboard {
  min-width: 0;
}

.admin-section {
  display: grid;
  gap: 18px;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-metric-card {
  min-height: 116px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.admin-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.admin-metric-card strong {
  font-size: 2rem;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
}

.admin-summary {
  display: grid;
  gap: 16px;
}

.admin-summary__block {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .admin-summary__block {
  background: rgba(255, 255, 255, 0.04);
}

.admin-summary__block strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
}

.admin-summary__block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-summary__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.admin-summary__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
}

.admin-summary__list time {
  white-space: nowrap;
  font-size: 0.84rem;
}

.admin-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-health-item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.admin-health-item:hover {
  transform: translateY(-2px);
}

.admin-health-item__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.admin-health-item__head strong {
  font-family: "Space Grotesk", sans-serif;
}

.admin-health-item__head span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(123, 97, 255, 0.14);
}

.admin-health-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-health-item--success {
  border-color: rgba(20, 108, 77, 0.28);
}

.admin-health-item--success .admin-health-item__head span {
  background: rgba(20, 108, 77, 0.14);
  color: var(--success);
}

.admin-health-item--warning {
  border-color: rgba(183, 123, 17, 0.28);
}

.admin-health-item--warning .admin-health-item__head span {
  background: rgba(183, 123, 17, 0.14);
  color: #9a6800;
}

.admin-health-item--error {
  border-color: rgba(163, 58, 97, 0.34);
}

.admin-health-item--error .admin-health-item__head span {
  background: rgba(163, 58, 97, 0.14);
  color: var(--danger);
}

.admin-health-item--info .admin-health-item__head span {
  color: var(--accent);
}

.admin-server-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-server-item {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-server-item strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
}

.admin-server-item span {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.admin-server-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card__header--split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-toolbar--clients {
  grid-template-columns: minmax(0, 1fr) 200px 220px;
}

.field--compact {
  margin: 0;
}

.field--compact input,
.field--compact select {
  width: 100%;
}

.admin-section-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-table-wrap,
.admin-sessions-table-wrap {
  overflow-x: auto;
}

.admin-table,
.admin-sessions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td,
.admin-sessions-table th,
.admin-sessions-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th,
.admin-sessions-table th {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-cell-muted {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-pagination {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.admin-pagination__label {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-dialogs-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.admin-dialogs-list-pane,
.admin-dialogs-history-pane,
.admin-dialogs-profile-pane {
  min-width: 0;
}

.admin-dialogs-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.admin-dialog-item {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.admin-dialog-item:hover,
.admin-dialog-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(123, 97, 255, 0.32);
}

.admin-dialog-item.is-active {
  background: rgba(123, 97, 255, 0.12);
}

.admin-dialog-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-dialog-item__top strong {
  font-family: "Space Grotesk", sans-serif;
}

.admin-dialog-item__top span,
.admin-dialog-item p {
  color: var(--muted);
}

.admin-dialog-item p {
  margin: 0;
  line-height: 1.5;
}

.admin-dialog-item__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-history-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.admin-history-meta p {
  margin: 0;
  color: var(--muted);
}

.admin-history-meta strong {
  color: var(--text);
}

.admin-history-log {
  min-height: 560px;
  max-height: 760px;
  padding-right: 6px;
}

.admin-profile-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-profile-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.admin-profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-log-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.admin-log-item strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
}

.admin-log-item p,
.admin-log-item span {
  margin: 0;
  color: var(--muted);
}

.admin-log-item--error {
  border-color: rgba(163, 58, 97, 0.34);
}

.admin-log-item--warning {
  border-color: rgba(183, 123, 17, 0.34);
}

.admin-log-item--info {
  border-color: rgba(123, 97, 255, 0.24);
}

.admin-empty-state {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 20px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.admin-empty-state strong {
  color: var(--text);
}

.is-hidden {
  display: none;
}

.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 fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes thinkingPulse {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0) scale(0.92);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px) scale(1);
  }
}


@media (max-width: 980px) {
  .auth-hero,
  .hero,
  .section-grid,
  .stat-row,
  .layers-grid,
  .admin-app,
  .admin-summary-grid,
  .admin-dialogs-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

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

  .admin-sidebar,
  .admin-topbar {
    position: static;
  }

  .admin-topbar {
    grid-template-columns: 1fr;
  }

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

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

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .top-controls {
    top: 12px;
    right: 10px;
    left: 10px;
    align-items: stretch;
  }

  .theme-switcher {
    justify-content: center;
  }

  .account-dropdown {
    width: 100%;
  }

  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 132px;
  }

  .auth-hero__copy,
  .hero__copy,
  .card {
    padding: 22px 18px;
  }

  .hero__copy--compact {
    padding: 24px 18px;
  }

  .auth-card--standalone {
    justify-self: stretch;
    max-width: none;
  }

  .chat-header,
  .chat-actions,
  .auth-inline-actions,
  .hero__actions,
  .chat-meta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .service-panel {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
  }

  .service-panel.is-collapsed {
    width: min(220px, calc(100vw - 20px));
  }

  .chat-card {
    padding: 16px;
  }

  .chat-topbar {
    padding-top: 0;
  }

  .chat-topbar__copy p {
    font-size: 0.95rem;
  }

  .message-row,
  .chat-composer__field {
    gap: 10px;
  }

  .message-stack {
    max-width: 100%;
  }

  .workspace-meta {
    justify-items: stretch;
    min-width: 0;
  }

  .model-picker {
    width: 100%;
  }

  .bubble {
    max-width: 100%;
  }

  .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 0.84rem;
  }

  .chat-composer {
    padding: 12px;
  }

  .chat-composer__field {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-send {
    width: 100%;
    min-width: 0;
  }

  .admin-toolbar,
  .admin-toolbar--clients {
    grid-template-columns: 1fr;
  }
}

/* Admin panel refresh */
.admin-shell {
  width: min(1480px, calc(100% - 24px));
  padding-top: 20px;
}

.odmen-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 40px);
}

.odmen-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 20px;
  padding: 22px 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(86, 69, 140, 0.12);
  box-shadow: 0 22px 48px rgba(42, 29, 83, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .odmen-sidebar {
  background: rgba(15, 13, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}

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

.odmen-brand__logo {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 12px 24px rgba(123, 97, 255, 0.2);
}

.odmen-brand__copy {
  display: grid;
  gap: 4px;
}

.odmen-brand__copy strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
}

.odmen-brand__copy span,
.odmen-sidebar__meta-card p {
  color: var(--muted);
}

.odmen-nav {
  display: grid;
  gap: 8px;
}

.odmen-nav__link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.odmen-nav__link:hover,
.odmen-nav__link.is-active {
  color: var(--text);
  background: rgba(123, 97, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(123, 97, 255, 0.12);
  transform: translateX(2px);
}

.odmen-sidebar__meta-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(123, 97, 255, 0.08);
  border: 1px solid rgba(123, 97, 255, 0.12);
}

.odmen-sidebar__meta-card strong {
  font-size: 1rem;
}

.odmen-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.odmen-topbar {
  position: sticky;
  top: 18px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 360px) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(86, 69, 140, 0.12);
  box-shadow: 0 18px 40px rgba(42, 29, 83, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .odmen-topbar {
  background: rgba(15, 13, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}

.odmen-topbar__title h1 {
  margin: 8px 0 0;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.odmen-topbar__status {
  display: flex;
  justify-content: center;
}

.odmen-topbar__search {
  margin: 0;
}

.odmen-topbar__search input {
  width: 100%;
}

.odmen-topbar__profile {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.odmen-admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.odmen-admin-profile__avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--text);
  background: rgba(123, 97, 255, 0.1);
  border: 1px solid rgba(123, 97, 255, 0.14);
}

.odmen-admin-profile__meta {
  display: grid;
  gap: 2px;
}

.odmen-admin-profile__meta strong {
  font-size: 0.95rem;
}

.odmen-admin-profile__meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.odmen-state-banner {
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.odmen-state-banner--info {
  background: rgba(123, 97, 255, 0.12);
  color: var(--accent);
}

.odmen-state-banner--success {
  background: rgba(20, 108, 77, 0.12);
  color: var(--success);
}

.odmen-state-banner--warning {
  background: rgba(183, 123, 17, 0.12);
  color: #9a6800;
}

.odmen-state-banner--error {
  background: rgba(163, 58, 97, 0.12);
  color: var(--danger);
}

.odmen-dashboard,
.odmen-section {
  display: grid;
  gap: 18px;
}

.odmen-section__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.odmen-section__header h2 {
  margin: 0;
}

.odmen-section__header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.odmen-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(86, 69, 140, 0.12);
  box-shadow: 0 18px 40px rgba(42, 29, 83, 0.08);
}

:root[data-theme="dark"] .odmen-card {
  background: rgba(15, 13, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
}

.odmen-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.odmen-metric-card {
  min-height: 132px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(86, 69, 140, 0.12);
  box-shadow: 0 14px 28px rgba(42, 29, 83, 0.08);
  display: grid;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

:root[data-theme="dark"] .odmen-metric-card,
:root[data-theme="dark"] .odmen-health-card,
:root[data-theme="dark"] .odmen-server-card,
:root[data-theme="dark"] .odmen-dialog-item,
:root[data-theme="dark"] .odmen-profile-card,
:root[data-theme="dark"] .odmen-log-card,
:root[data-theme="dark"] .odmen-summary-inline,
:root[data-theme="dark"] .odmen-empty-state {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.odmen-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(42, 29, 83, 0.12);
}

.odmen-metric-card__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.odmen-metric-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.odmen-metric-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.odmen-metric-card--success {
  border-color: rgba(20, 108, 77, 0.16);
}

.odmen-metric-card--warning {
  border-color: rgba(183, 123, 17, 0.18);
}

.odmen-metric-card--error {
  border-color: rgba(163, 58, 97, 0.2);
}

.odmen-metric-card.is-loading strong,
.odmen-metric-card.is-loading p {
  opacity: 0.68;
}

.odmen-summary-row,
.odmen-server-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.odmen-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.odmen-summary-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(123, 97, 255, 0.05);
  display: grid;
  gap: 10px;
}

:root[data-theme="dark"] .odmen-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.odmen-summary-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.odmen-summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.odmen-summary-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.odmen-summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  color: var(--muted);
}

.odmen-summary-list time {
  white-space: nowrap;
  font-size: 0.82rem;
}

.odmen-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.odmen-health-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(42, 29, 83, 0.06);
  display: grid;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.odmen-health-card:hover,
.odmen-server-card:hover,
.odmen-log-card:hover,
.odmen-dialog-item:hover {
  transform: translateY(-2px);
}

.odmen-health-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.odmen-health-card__head strong {
  font-family: "Space Grotesk", sans-serif;
}

.odmen-health-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.odmen-health-card--success {
  border-color: rgba(20, 108, 77, 0.16);
}

.odmen-health-card--warning {
  border-color: rgba(183, 123, 17, 0.18);
}

.odmen-health-card--error {
  border-color: rgba(163, 58, 97, 0.2);
}

.odmen-server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.odmen-server-card {
  min-height: 124px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(42, 29, 83, 0.06);
  display: grid;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.odmen-server-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.odmen-server-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.odmen-server-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.odmen-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 220px;
  gap: 10px;
  margin-bottom: 14px;
}

.odmen-section-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.odmen-table-shell {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

:root[data-theme="dark"] .odmen-table-shell {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.odmen-table-shell--compact {
  min-height: 100%;
}

.admin-table,
.admin-sessions-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td,
.admin-sessions-table th,
.admin-sessions-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(86, 69, 140, 0.1);
  text-align: left;
  vertical-align: top;
}

.admin-table th,
.admin-sessions-table th {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-table tbody tr:hover,
.admin-sessions-table tbody tr:hover {
  background: rgba(123, 97, 255, 0.06);
}

.admin-cell-muted {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.admin-pagination__label {
  color: var(--muted);
}

.odmen-dialogs-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 16px;
  min-height: 720px;
}

.odmen-pane-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.odmen-dialogs-list {
  display: grid;
  gap: 10px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.odmen-dialog-item {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(42, 29, 83, 0.06);
  display: grid;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.odmen-dialog-item.is-active {
  background: rgba(123, 97, 255, 0.1);
  border-color: rgba(123, 97, 255, 0.2);
}

.odmen-dialog-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.odmen-dialog-item__head strong {
  font-family: "Space Grotesk", sans-serif;
}

.odmen-dialog-item__head time,
.odmen-dialog-item p {
  color: var(--muted);
}

.odmen-dialog-item p {
  margin: 0;
  line-height: 1.5;
}

.odmen-dialog-item__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.odmen-history-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.odmen-history-meta strong {
  font-size: 1.05rem;
}

.odmen-history-meta p {
  margin: 0;
  color: var(--muted);
}

.odmen-history-log {
  min-height: 620px;
  max-height: 740px;
  padding-right: 6px;
}

.odmen-summary-inline {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(123, 97, 255, 0.07);
  display: grid;
  gap: 8px;
}

.odmen-summary-inline strong {
  font-family: "Space Grotesk", sans-serif;
}

.odmen-summary-inline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.odmen-profile-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(42, 29, 83, 0.06);
}

.odmen-profile-card__hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.odmen-profile-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.odmen-profile-card__hero p {
  margin: 4px 0 0;
  color: var(--muted);
}

.odmen-profile-card__list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.odmen-profile-card__list div {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(86, 69, 140, 0.1);
}

.odmen-profile-card__list dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.odmen-profile-card__list dd {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.odmen-logs-list {
  display: grid;
  gap: 10px;
}

.odmen-log-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(86, 69, 140, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(42, 29, 83, 0.06);
  display: grid;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.odmen-log-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.odmen-log-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.odmen-log-card p,
.odmen-log-card time {
  margin: 0;
  color: var(--muted);
}

.odmen-log-card--error {
  border-color: rgba(163, 58, 97, 0.2);
}

.odmen-log-card--warning {
  border-color: rgba(183, 123, 17, 0.2);
}

.odmen-empty-state {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(86, 69, 140, 0.2);
  color: var(--muted);
  background: rgba(123, 97, 255, 0.04);
}

.odmen-empty-state strong {
  color: var(--text);
}

.odmen-empty-state p {
  margin: 0;
  line-height: 1.55;
}

.odmen-empty-state--compact {
  padding: 18px;
}

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

  .odmen-sidebar,
  .odmen-topbar {
    position: static;
  }

  .odmen-topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .odmen-summary-row,
  .odmen-server-row,
  .odmen-dialogs-layout {
    grid-template-columns: 1fr;
  }

  .odmen-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .odmen-metrics-grid,
  .odmen-summary-grid,
  .odmen-health-grid,
  .odmen-server-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .odmen-toolbar {
    grid-template-columns: 1fr;
  }

  .odmen-topbar__profile {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .admin-shell {
    width: min(100% - 16px, 100%);
  }

  .odmen-metrics-grid,
  .odmen-summary-grid,
  .odmen-health-grid,
  .odmen-server-grid {
    grid-template-columns: 1fr;
  }

  .odmen-sidebar,
  .odmen-topbar,
  .odmen-card,
  .odmen-dialog-item,
  .odmen-log-card,
  .odmen-profile-card {
    border-radius: 22px;
  }

  .odmen-admin-profile {
    width: 100%;
  }
}

/* Career landing design transfer start */
body:has(.page-shell--auth),
body:has(.hero--app) {
  --bg: #f7f5f0;
  --bg-strong: #efe9dc;
  --surface: rgba(255, 255, 255, 0.42);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --surface-dark: #2d2a26;
  --text: #2d2a26;
  --muted: #78716c;
  --line: rgba(28, 25, 23, 0.08);
  --accent: #4c1d95;
  --accent-strong: #be185d;
  --accent-dark: #2d2a26;
  --accent-soft: rgba(76, 29, 149, 0.1);
  --shadow: 0 24px 70px rgba(76, 29, 149, 0.12);
  --shadow-soft: 0 16px 40px rgba(45, 42, 38, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.72);
  --glass-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.14));
  background:
    radial-gradient(circle at 16% 6%, rgba(139, 92, 246, 0.12), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(236, 72, 153, 0.1), transparent 30%),
    #f7f5f0;
  color: var(--text);
}

:root[data-theme="dark"] body:has(.page-shell--auth),
:root[data-theme="dark"] body:has(.hero--app) {
  --bg: #06060b;
  --bg-strong: #0d0d16;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(255, 255, 255, 0.055);
  --surface-dark: #f5f5fa;
  --text: #f5f5fa;
  --muted: #71718c;
  --line: rgba(255, 255, 255, 0.06);
  --accent: #8b5cf6;
  --accent-strong: #ec4899;
  --accent-dark: #f5f5fa;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --accent-3: #6366f1;
  --success: #8bd4ba;
  --danger: #ffa0b5;
  --shadow: 0 24px 70px rgba(6, 6, 11, 0.44);
  --shadow-soft: 0 16px 42px rgba(6, 6, 11, 0.34);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  background:
    radial-gradient(circle at 18% 4%, rgba(139, 92, 246, 0.18), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(236, 72, 153, 0.14), transparent 30%),
    radial-gradient(circle at 20% 90%, rgba(99, 102, 241, 0.12), transparent 32%),
    #06060b;
}

body:has(.page-shell--auth)::before,
body:has(.hero--app)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.025;
  mask-image: none;
}

:root[data-theme="dark"] body:has(.page-shell--auth)::before,
:root[data-theme="dark"] body:has(.hero--app)::before {
  opacity: 0.035;
}

body:has(.page-shell--auth) .page-shell,
body:has(.hero--app) .page-shell {
  width: min(1120px, calc(100% - 40px));
}

body:has(.page-shell--auth) .top-controls,
body:has(.hero--app) .top-controls {
  top: 22px;
  right: 22px;
}

body:has(.page-shell--auth) .theme-switcher,
body:has(.hero--app) .theme-switcher {
  gap: 4px;
  padding: 5px;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

body:has(.page-shell--auth) .theme-switcher::before,
body:has(.hero--app) .theme-switcher::before {
  display: none;
}

body:has(.page-shell--auth) .theme-switcher__button,
body:has(.hero--app) .theme-switcher__button {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

body:has(.page-shell--auth) .theme-switcher__button:hover,
body:has(.hero--app) .theme-switcher__button:hover,
body:has(.page-shell--auth) .theme-switcher__button.is-active,
body:has(.hero--app) .theme-switcher__button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

:root[data-theme="dark"] body:has(.page-shell--auth) .theme-switcher__button.is-active,
:root[data-theme="dark"] body:has(.hero--app) .theme-switcher__button.is-active,
:root[data-theme="dark"] body:has(.page-shell--auth) .tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

:root[data-theme="dark"] body:has(.page-shell--auth) .tabs {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] body:has(.page-shell--auth) .tab {
  color: #71718c;
  background: transparent;
}

:root[data-theme="dark"] body:has(.page-shell--auth) .tab:hover {
  color: #f5f5fa;
  background: rgba(255, 255, 255, 0.055);
}

body:has(.page-shell--auth) .auth-hero,
body:has(.hero--app) .hero--app {
  gap: 20px;
}

body:has(.page-shell--auth) .auth-hero__copy,
body:has(.hero--app) .hero__copy,
body:has(.page-shell--auth) .card,
body:has(.hero--app) .card,
body:has(.hero--app) .service-panel,
body:has(.hero--app) .account-dropdown {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body:has(.page-shell--auth) .auth-hero__copy,
body:has(.hero--app) .hero__copy {
  position: relative;
  border-radius: 32px;
  padding: 46px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(76, 29, 149, 0.12), transparent 34%),
    radial-gradient(circle at 90% 16%, rgba(190, 24, 93, 0.09), transparent 32%),
    var(--surface);
}

:root[data-theme="dark"] body:has(.page-shell--auth) .auth-hero__copy,
:root[data-theme="dark"] body:has(.hero--app) .hero__copy {
  background:
    radial-gradient(circle at 12% 0%, rgba(139, 92, 246, 0.18), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(236, 72, 153, 0.13), transparent 32%),
    var(--surface);
}

body:has(.page-shell--auth) .auth-hero__copy::before,
body:has(.hero--app) .hero__copy::before,
body:has(.page-shell--auth) .card::before,
body:has(.hero--app) .card::before,
body:has(.hero--app) .service-panel::before,
body:has(.hero--app) .account-dropdown::before {
  background: var(--glass-overlay);
}

body:has(.page-shell--auth) .auth-hero__copy::after,
body:has(.hero--app) .hero__copy::after,
body:has(.page-shell--auth) .card::after,
body:has(.hero--app) .card::after,
body:has(.hero--app) .service-panel::after,
body:has(.hero--app) .account-dropdown::after {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  opacity: 0;
  transition: opacity 0.35s ease;
}

body:has(.page-shell--auth) .auth-hero__copy:hover::after,
body:has(.hero--app) .hero__copy:hover::after,
body:has(.page-shell--auth) .card:hover::after,
body:has(.hero--app) .card:hover::after,
body:has(.hero--app) .service-panel:hover::after,
body:has(.hero--app) .account-dropdown:hover::after {
  opacity: 1;
}

body:has(.page-shell--auth) .auth-hero__copy h1,
body:has(.hero--app) .hero h1,
body:has(.page-shell--auth) .card h2,
body:has(.hero--app) .card h2,
body:has(.hero--app) .chat-topbar__copy h2 {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

body:has(.page-shell--auth) .auth-hero__copy h1,
body:has(.hero--app) .hero h1 {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: clamp(36px, 5vw, 56px);
}

body:has(.page-shell--auth) .hero__text,
body:has(.hero--app) .hero__text,
body:has(.hero--app) .chat-topbar__copy p,
body:has(.hero--app) .service-panel__toggle-copy span,
body:has(.hero--app) .message-meta,
body:has(.hero--app) .chat-composer__hint,
body:has(.page-shell--auth) .field-hint,
body:has(.page-shell--auth) .checkbox-row,
body:has(.hero--app) .service-panel__label,
body:has(.hero--app) .service-panel__value--muted {
  color: var(--muted);
}

body:has(.page-shell--auth) .hero__chips span {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.28);
  color: var(--muted);
}

:root[data-theme="dark"] body:has(.page-shell--auth) .hero__chips span {
  background: rgba(255, 255, 255, 0.035);
}

body:has(.page-shell--auth) .card,
body:has(.hero--app) .card {
  border-radius: 24px;
}

body:has(.page-shell--auth) .card:hover,
body:has(.hero--app) .card:hover,
body:has(.hero--app) .service-panel:hover {
  border-color: rgba(76, 29, 149, 0.2);
  background: var(--surface-strong);
  transform: translateY(-2px);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="dark"] body:has(.page-shell--auth) .card:hover,
:root[data-theme="dark"] body:has(.hero--app) .card:hover,
:root[data-theme="dark"] body:has(.hero--app) .service-panel:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

body:has(.page-shell--auth) .tabs {
  background: rgba(76, 29, 149, 0.08);
  border: 1px solid var(--line);
}

body:has(.page-shell--auth) .tab {
  color: var(--muted);
}

body:has(.page-shell--auth) .tab:hover {
  background: rgba(76, 29, 149, 0.1);
}

body:has(.page-shell--auth) .tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

body:has(.page-shell--auth) input,
body:has(.page-shell--auth) textarea,
body:has(.hero--app) input,
body:has(.hero--app) textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  box-shadow: none;
}

:root[data-theme="dark"] body:has(.page-shell--auth) input,
:root[data-theme="dark"] body:has(.page-shell--auth) textarea,
:root[data-theme="dark"] body:has(.hero--app) input,
:root[data-theme="dark"] body:has(.hero--app) textarea {
  background: rgba(255, 255, 255, 0.03);
}

body:has(.page-shell--auth) input::placeholder,
body:has(.page-shell--auth) textarea::placeholder,
body:has(.hero--app) input::placeholder,
body:has(.hero--app) textarea::placeholder {
  color: var(--muted);
}

body:has(.page-shell--auth) input:focus,
body:has(.page-shell--auth) textarea:focus,
body:has(.hero--app) input:focus,
body:has(.hero--app) textarea:focus {
  border-color: rgba(76, 29, 149, 0.34);
  box-shadow: 0 0 0 4px rgba(76, 29, 149, 0.1);
}

:root[data-theme="dark"] body:has(.page-shell--auth) input:focus,
:root[data-theme="dark"] body:has(.page-shell--auth) textarea:focus,
:root[data-theme="dark"] body:has(.hero--app) input:focus,
:root[data-theme="dark"] body:has(.hero--app) textarea:focus {
  border-color: rgba(139, 92, 246, 0.42);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

body:has(.page-shell--auth) .button--primary,
body:has(.hero--app) .button--primary,
body:has(.hero--app) .chat-avatar--assistant,
body:has(.hero--app) .service-panel__toggle-indicator {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 42px rgba(76, 29, 149, 0.22), 0 10px 28px rgba(190, 24, 93, 0.14);
}

:root[data-theme="dark"] body:has(.page-shell--auth) .button--primary,
:root[data-theme="dark"] body:has(.hero--app) .button--primary,
:root[data-theme="dark"] body:has(.hero--app) .chat-avatar--assistant,
:root[data-theme="dark"] body:has(.hero--app) .service-panel__toggle-indicator {
  box-shadow: 0 18px 42px rgba(139, 92, 246, 0.28), 0 10px 28px rgba(236, 72, 153, 0.18);
}

body:has(.page-shell--auth) .button:hover:not(:disabled),
body:has(.hero--app) .button:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
}

body:has(.page-shell--auth) .button:active:not(:disabled),
body:has(.hero--app) .button:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
}

body:has(.page-shell--auth) .button--ghost,
body:has(.hero--app) .button--ghost,
body:has(.hero--app) .account-button,
body:has(.hero--app) .service-panel__toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
}

:root[data-theme="dark"] body:has(.page-shell--auth) .button--ghost,
:root[data-theme="dark"] body:has(.hero--app) .button--ghost,
:root[data-theme="dark"] body:has(.hero--app) .account-button,
:root[data-theme="dark"] body:has(.hero--app) .service-panel__toggle {
  background: rgba(255, 255, 255, 0.035);
}

body:has(.hero--app) .chat-card {
  padding: 22px;
}

body:has(.hero--app) .chat-log {
  min-height: 520px;
  padding: 10px 4px;
  scrollbar-color: rgba(76, 29, 149, 0.35) transparent;
}

:root[data-theme="dark"] body:has(.hero--app) .chat-log {
  scrollbar-color: rgba(139, 92, 246, 0.42) transparent;
}

body:has(.hero--app) .bubble {
  box-shadow: none;
}

body:has(.hero--app) .bubble--assistant {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

:root[data-theme="dark"] body:has(.hero--app) .bubble--assistant {
  background: rgba(255, 255, 255, 0.035);
}

body:has(.hero--app) .bubble--user {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

body:has(.hero--app) .chat-composer {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] body:has(.hero--app) .chat-composer {
  background: rgba(255, 255, 255, 0.03);
}

body:has(.hero--app) .chat-avatar--user {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
}

:root[data-theme="dark"] body:has(.hero--app) .chat-avatar--user {
  background: rgba(255, 255, 255, 0.035);
}

body:has(.hero--app) .service-panel__label,
body:has(.hero--app) .service-panel__value--muted,
body:has(.page-shell--auth) .field-hint,
body:has(.page-shell--auth) .checkbox-row {
  color: var(--muted);
}

body:has(.hero--app) .account-dropdown .theme-switcher {
  width: 100%;
}

@media (max-width: 980px) {
  body:has(.page-shell--auth) .auth-hero {
    grid-template-columns: 1fr;
  }

  body:has(.page-shell--auth) .auth-card--standalone {
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  body:has(.page-shell--auth) .page-shell,
  body:has(.hero--app) .page-shell {
    width: min(100% - 24px, 100%);
    padding-top: 118px;
  }

  body:has(.page-shell--auth) .top-controls,
  body:has(.hero--app) .top-controls {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  body:has(.page-shell--auth) .auth-hero__copy,
  body:has(.hero--app) .hero__copy,
  body:has(.page-shell--auth) .card,
  body:has(.hero--app) .card {
    padding: 24px 20px;
  }

  body:has(.page-shell--auth) .auth-hero__copy h1,
  body:has(.hero--app) .hero h1 {
    font-size: clamp(34px, 12vw, 48px);
  }
}
/* Career landing design transfer end */

/* Login page UX corrections start */
body:has(.page-shell--auth) .auth-hero__copy::after,
body:has(.page-shell--auth) .card::after,
body:has(.page-shell--auth) .auth-hero__copy:hover::after,
body:has(.page-shell--auth) .card:hover::after {
  display: none;
}
/* Login page UX corrections end */

/* Login hide chips start */
body:has(.page-shell--auth) .hero__chips {
  display: none;
}
/* Login hide chips end */

/* Login heading shimmer start */
@keyframes loginHeadingShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

body:has(.page-shell--auth) .auth-hero__copy h1 {
  background: linear-gradient(90deg, #6d28d9, #be185d, #4338ca, #6d28d9);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: loginHeadingShimmer 6s linear infinite;
}

:root[data-theme="dark"] body:has(.page-shell--auth) .auth-hero__copy h1 {
  background: linear-gradient(90deg, #a78bfa, #f472b6, #818cf8, #a78bfa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* Login heading shimmer end */

/* App page UX corrections start */
body:has(.hero--app) .hero__text,
body:has(.hero--app) .chat-topbar {
  display: none;
}
/* App page UX corrections end */

/* App title and hover corrections start */
body:has(.hero--app) .hero h1 {
  max-width: none;
  font-size: clamp(30px, 3.6vw, 44px);
  white-space: nowrap;
}

body:has(.hero--app) .hero__copy::after,
body:has(.hero--app) .card::after,
body:has(.hero--app) .service-panel::after,
body:has(.hero--app) .account-dropdown::after,
body:has(.hero--app) .hero__copy:hover::after,
body:has(.hero--app) .card:hover::after,
body:has(.hero--app) .service-panel:hover::after,
body:has(.hero--app) .account-dropdown:hover::after {
  display: none;
}

@media (max-width: 640px) {
  body:has(.hero--app) .hero h1 {
    font-size: clamp(28px, 8vw, 36px);
    white-space: normal;
  }
}
/* App title and hover corrections end */

/* App workspace redesign start */
body:has(.hero--app) {
  min-height: 100vh;
}

body:has(.hero--app) .page-shell {
  width: min(1180px, calc(100% - 40px));
  padding: 76px 0 36px;
}

body:has(.hero--app) .hero--app {
  margin-bottom: 12px;
}

body:has(.hero--app) .hero__copy {
  min-height: 0;
  padding: 18px 22px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

body:has(.hero--app) .hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
}

body:has(.hero--app) .app-grid {
  gap: 12px;
}

body:has(.hero--app) .chat-card {
  min-height: calc(100vh - 178px);
  padding: 18px;
  border-radius: 26px;
  transform: none;
}

body:has(.hero--app) .chat-card:hover {
  transform: none;
  background: var(--surface);
}

body:has(.hero--app) .chat-shell {
  min-height: calc(100vh - 214px);
  grid-template-rows: 1fr auto;
  gap: 14px;
}

body:has(.hero--app) .chat-log {
  min-height: 0;
  height: clamp(420px, 58vh, 680px);
  max-height: none;
  padding: 6px 4px 14px;
}

body:has(.hero--app) .message-row {
  gap: 10px;
}

body:has(.hero--app) .message-stack {
  max-width: min(78%, 760px);
}

body:has(.hero--app) .message-meta {
  color: var(--muted);
  font-size: 12px;
}

body:has(.hero--app) .chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  box-shadow: none;
}

body:has(.hero--app) .bubble {
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
}

body:has(.hero--app) .bubble--assistant {
  border-bottom-left-radius: 8px;
}

body:has(.hero--app) .bubble--user {
  border-bottom-right-radius: 8px;
}

body:has(.hero--app) .bubble--thinking {
  min-height: 50px;
}

body:has(.hero--app) .chat-composer {
  position: sticky;
  bottom: 0;
  gap: 7px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
}

:root[data-theme="dark"] body:has(.hero--app) .chat-composer {
  background: rgba(255, 255, 255, 0.045);
}

body:has(.hero--app) .chat-composer__field {
  align-items: stretch;
}

body:has(.hero--app) .chat-composer textarea {
  min-height: 56px;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.45;
}

body:has(.hero--app) .chat-send {
  min-width: 116px;
  min-height: 56px;
  align-self: stretch;
}

body:has(.hero--app) .chat-composer__hint {
  color: var(--muted);
  opacity: 0.72;
  font-size: 12px;
}

body:has(.hero--app) .service-panel {
  width: min(300px, calc(100vw - 20px));
  padding: 8px;
  border-radius: 18px;
  opacity: 0.82;
  transform: translateY(0);
}

body:has(.hero--app) .service-panel:hover,
body:has(.hero--app) .service-panel:not(.is-collapsed) {
  opacity: 1;
}

body:has(.hero--app) .service-panel.is-collapsed {
  width: 184px;
}

body:has(.hero--app) .service-panel__toggle {
  padding: 8px 10px;
  border-radius: 14px;
}

body:has(.hero--app) .service-panel__toggle-indicator {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 5px rgba(123, 97, 255, 0.1);
}

body:has(.hero--app) .service-panel__toggle-copy strong {
  font-size: 13px;
}

body:has(.hero--app) .service-panel__toggle-copy span,
body:has(.hero--app) .service-panel__value,
body:has(.hero--app) .service-panel__label {
  font-size: 12px;
}

body:has(.hero--app) .account-button {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

body:has(.hero--app) .account-dropdown {
  width: min(300px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 20px;
}

body:has(.hero--app) .account-dropdown__header {
  padding-bottom: 12px;
}

body:has(.hero--app) .account-dropdown__actions {
  gap: 8px;
}

body:has(.hero--app) .account-dropdown .theme-switcher {
  margin: 10px 0;
}

:root[data-theme="dark"] body:has(.hero--app) .account-dropdown__label {
  color: var(--text);
}

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

  body:has(.hero--app) .page-shell {
    width: min(100% - 20px, 100%);
    padding: 82px 0 96px;
  }

  body:has(.hero--app) .hero__copy {
    padding: 16px 18px;
  }

  body:has(.hero--app) .hero h1 {
    font-size: clamp(26px, 8vw, 34px);
    white-space: normal;
  }

  body:has(.hero--app) .chat-card {
    min-height: calc(100vh - 188px);
    padding: 12px;
    border-radius: 22px;
  }

  body:has(.hero--app) .chat-shell {
    min-height: calc(100vh - 216px);
  }

  body:has(.hero--app) .chat-log {
    height: calc(100vh - 342px);
    min-height: 320px;
  }

  body:has(.hero--app) .message-stack {
    max-width: 100%;
  }

  body:has(.hero--app) .message-row--assistant .chat-avatar {
    display: none;
  }

  body:has(.hero--app) .chat-composer {
    border-radius: 20px;
  }

  body:has(.hero--app) .service-panel {
    right: 10px;
    left: auto;
    bottom: 10px;
    width: min(230px, calc(100vw - 20px));
  }

  body:has(.hero--app) .service-panel.is-collapsed {
    width: min(178px, calc(100vw - 20px));
  }
}
/* App workspace redesign end */

/* App dialog badge start */
@keyframes careerDialogPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(76, 29, 149, 0.1);
  }
  50% {
    transform: scale(0.86);
    box-shadow: 0 0 0 11px rgba(190, 24, 93, 0.06);
  }
}

body:has(.hero--app) .hero--app {
  display: none;
}

body:has(.hero--app) .page-shell {
  padding-top: 76px;
}

body:has(.hero--app) .chat-card {
  min-height: calc(100vh - 118px);
}

body:has(.hero--app) .chat-shell {
  min-height: calc(100vh - 154px);
  grid-template-rows: auto 1fr auto;
}

body:has(.hero--app) .chat-topbar {
  display: flex;
  padding: 14px 12px 18px;
  border-bottom: 1px solid var(--line);
}

body:has(.hero--app) .chat-topbar__identity {
  gap: 0;
}

body:has(.hero--app) .chat-topbar .chat-avatar,
body:has(.hero--app) .chat-topbar__copy p {
  display: none;
}

body:has(.hero--app) .chat-topbar__copy h2 {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

body:has(.hero--app) .chat-topbar__copy h2::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  animation: careerDialogPulse 2.2s ease-in-out infinite;
  flex: 0 0 auto;
}

body:has(.hero--app) .chat-log {
  height: clamp(430px, 62vh, 720px);
  padding-top: 14px;
}

:root[data-theme="dark"] body:has(.hero--app) .chat-topbar__copy h2::before {
  box-shadow: 0 0 0 7px rgba(139, 92, 246, 0.14);
}

@media (max-width: 760px) {
  body:has(.hero--app) .page-shell {
    padding-top: 76px;
  }

  body:has(.hero--app) .chat-card {
    min-height: calc(100vh - 172px);
  }

  body:has(.hero--app) .chat-shell {
    min-height: calc(100vh - 196px);
  }

  body:has(.hero--app) .chat-topbar {
    padding: 12px 8px 14px;
  }

  body:has(.hero--app) .chat-topbar__copy h2 {
    font-size: clamp(20px, 6vw, 26px);
  }

  body:has(.hero--app) .chat-log {
    height: calc(100vh - 320px);
  }
}
/* App dialog badge end */

/* App dialog label color start */
:root[data-theme="light"] body:has(.hero--app) .chat-topbar__copy h2,
body:has(.hero--app) .chat-topbar__copy h2 {
  color: #2d2a26 !important;
  -webkit-text-fill-color: #2d2a26 !important;
  opacity: 1;
}

:root[data-theme="dark"] body:has(.hero--app) .chat-topbar__copy h2 {
  color: #f5f5fa !important;
  -webkit-text-fill-color: #f5f5fa !important;
}
/* App dialog label color end */
