:root {
  --background: #181818;
  --surface: rgba(36, 36, 35, 0.92);
  --gold: #c79b42;
  --gold-light: #e6c97a;
  --gold-dark: #8b6225;
  --silver: #e9e9e9;
  --muted: #aeb1b5;
  --line: rgba(199, 155, 66, 0.28);
  --success: #8fc89a;
  --danger: #e8a39d;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(199, 155, 66, 0.13), transparent 32rem),
    radial-gradient(circle at 90% 88%, rgba(233, 233, 233, 0.07), transparent 34rem),
    var(--background);
  color: var(--silver);
  font-family: var(--font-space-grotesk), "Helvetica Neue", sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
form { margin: 0; }

.ssl-warning {
  position: relative;
  z-index: 50;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid rgba(232, 163, 157, 0.45);
  background: #3a211f;
  color: #ffd2ce;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
}

.is-hidden { display: none !important; }
.single-card { grid-template-columns: minmax(20rem, 32rem); justify-content: center; }
.single-card .login-card h1 {
  margin: 1rem 0;
  font-family: Georgia, serif;
  font-size: 2.2rem;
  font-weight: 500;
}

.chat-login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  overflow: hidden;
}

.chat-login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 27rem);
  padding: clamp(2rem, 5vw, 3.2rem);
}

.chat-login-card .brand-mark {
  margin: 0 auto;
}

.chat-login-card .eyebrow {
  margin-top: 1.6rem;
  text-align: center;
}

.chat-login-card h1 {
  margin: 0;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 2.2rem;
  font-weight: 500;
  text-align: center;
}

.lumyrax-mark {
  border-color: rgba(233, 233, 233, 0.48);
  background: linear-gradient(145deg, rgba(233, 233, 233, 0.12), rgba(199, 155, 66, 0.05));
  color: var(--silver);
}

.chat-shell {
  min-height: 100vh;
}

.chat-header {
  min-height: 4.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(199, 155, 66, 0.16);
  background: rgba(18, 18, 18, 0.82);
}

.chat-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.chat-brand strong {
  font-family: var(--font-cinzel), Georgia, serif;
  font-weight: 500;
}

.chat-surface {
  min-height: calc(100vh - 4.8rem);
  display: grid;
  place-items: center;
}

.chat-surface h1 {
  font-family: var(--font-cinzel), Georgia, serif;
  font-weight: 500;
}

.ambient {
  position: fixed;
  pointer-events: none;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  opacity: 0.75;
}

.ambient-one {
  top: -16rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(199, 155, 66, 0.21), transparent 70%);
}

.ambient-two {
  right: -15rem;
  bottom: -17rem;
  background: radial-gradient(circle, rgba(233, 233, 233, 0.11), transparent 70%);
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(28rem, 0.75fr);
  align-items: center;
  gap: clamp(4rem, 9vw, 10rem);
  max-width: 78rem;
  margin: 0 auto;
  padding: 4rem;
  overflow: hidden;
}

.login-brand { position: relative; z-index: 1; }

.brand-mark {
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(230, 201, 122, 0.12), rgba(139, 98, 37, 0.06));
  color: var(--gold-light);
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 8px rgba(199, 155, 66, 0.045), 0 18px 50px rgba(0, 0, 0, 0.28);
}

.brand-mark.small {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 0.8rem;
  box-shadow: none;
}

.eyebrow, .panel-kicker {
  margin: 1.75rem 0 0.6rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand h1, .sidebar h1, .workspace-heading h2 {
  margin: 0;
  font-family: var(--font-cinzel), Georgia, serif;
  font-weight: 500;
}

.login-brand h1 {
  max-width: 9ch;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.login-intro {
  max-width: 34rem;
  margin: 1.8rem 0 2.2rem;
  color: var(--muted);
  font-size: 1.07rem;
  line-height: 1.7;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.security-note strong, .security-note span { display: block; }
.security-note strong { margin-bottom: 0.2rem; color: var(--silver); }
.security-icon { color: var(--gold); font-size: 1rem; }

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.login-card {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 4vw, 3.3rem);
}

.login-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
}

.login-card > p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.panel-kicker { margin-top: 0; }
.login-form { display: grid; gap: 1.2rem; margin-top: 2rem; }
.field { display: grid; gap: 0.48rem; }

.field > span:first-child {
  color: #d5d6d8;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.field input {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.78rem 0.95rem;
  border: 1px solid rgba(199, 155, 66, 0.32);
  border-radius: 12px;
  outline: none;
  background: rgba(9, 9, 9, 0.42);
  color: var(--silver);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:hover { border-color: rgba(199, 155, 66, 0.55); }

.field input:focus {
  border-color: var(--gold);
  background: rgba(9, 9, 9, 0.58);
  box-shadow: 0 0 0 3px rgba(199, 155, 66, 0.1);
}

.field input:disabled {
  cursor: not-allowed;
  color: #888;
  border-color: rgba(255, 255, 255, 0.09);
}

.field input::placeholder { color: #737373; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 4rem; }

.reveal-button {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--gold-light);
  font-size: 0.72rem;
  cursor: pointer;
}

.button {
  min-height: 2.85rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { cursor: wait; opacity: 0.6; }

.button.primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 52%, var(--gold-dark));
  color: #17120a;
  box-shadow: 0 12px 26px rgba(139, 98, 37, 0.23);
}

.button.secondary {
  border-color: rgba(199, 155, 66, 0.5);
  background: rgba(199, 155, 66, 0.08);
  color: var(--gold-light);
}

.button.danger {
  border-color: rgba(213, 83, 83, 0.55);
  background: rgba(213, 83, 83, 0.1);
  color: #efaaa5;
}

.button.ghost { border-color: rgba(255, 255, 255, 0.12); background: transparent; color: var(--muted); }
.button.full { width: 100%; }
.button.compact { min-height: 2.25rem; padding: 0.5rem 1rem; font-size: 0.73rem; }
.form-message { padding: 0.8rem 1rem; border-radius: 10px; font-size: 0.8rem; }

.form-message.error {
  border: 1px solid rgba(232, 163, 157, 0.32);
  background: rgba(232, 163, 157, 0.08);
  color: var(--danger);
}

.form-message.success {
  border: 1px solid rgba(143, 200, 154, 0.3);
  background: rgba(143, 200, 154, 0.08);
  color: var(--success);
}

.admin-shell { min-height: 100vh; }

.admin-header {
  height: 4.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.25rem;
  border-bottom: 1px solid rgba(199, 155, 66, 0.16);
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(18px);
}

.brand-lockup, .account-area { display: flex; align-items: center; gap: 0.9rem; }
.brand-lockup span, .brand-lockup strong { display: block; }

.brand-lockup span {
  color: var(--gold);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-lockup strong {
  margin-top: 0.1rem;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 0.93rem;
  font-weight: 500;
}

.account-area { color: var(--muted); font-size: 0.75rem; }
.account-area strong { color: var(--silver); }

.admin-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-right: 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-nav a {
  padding: 0.55rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-nav a:hover {
  color: var(--silver);
  background: rgba(255, 255, 255, 0.035);
}

.admin-nav a.active {
  border-color: rgba(199, 155, 66, 0.38);
  background: rgba(199, 155, 66, 0.09);
  color: var(--gold-light);
}

.admin-grid {
  min-height: calc(100vh - 4.8rem);
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
}

.sidebar {
  padding: 2rem 1.25rem;
  border-right: 1px solid rgba(199, 155, 66, 0.14);
  background: rgba(20, 20, 20, 0.48);
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.55rem 1.3rem;
}

.sidebar-heading .eyebrow { margin: 0 0 0.35rem; }
.sidebar h1 { font-size: 1.65rem; }

.icon-button {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(199, 155, 66, 0.08);
  color: var(--gold-light);
  font-size: 1.35rem;
  cursor: pointer;
}

.create-card {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 14px;
}

.create-card h2 {
  margin: 0 0 0.2rem;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
}

.compact-field { gap: 0.3rem; }
.compact-field input { min-height: 2.55rem; padding: 0.55rem 0.7rem; font-size: 0.78rem; }
.user-list { display: grid; gap: 0.4rem; }

.user-row {
  width: 100%;
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.68rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.user-row:hover { background: rgba(255, 255, 255, 0.025); }

.user-row.selected {
  border-color: rgba(199, 155, 66, 0.32);
  background: linear-gradient(90deg, rgba(199, 155, 66, 0.12), rgba(199, 155, 66, 0.025));
}

.avatar {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 155, 66, 0.35);
  border-radius: 50%;
  background: rgba(199, 155, 66, 0.08);
  color: var(--gold-light);
  font-size: 0.69rem;
  font-weight: 700;
}

.avatar.inactive { filter: grayscale(1); opacity: 0.55; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 0.8rem; }
.user-copy small { margin-top: 0.18rem; color: var(--muted); font-size: 0.67rem; }
.user-copy .presence-copy { color: var(--muted); }
.user-copy .presence-copy.online { color: var(--success); font-weight: 700; }
.status-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #696969; }
.status-dot.online { background: var(--success); box-shadow: 0 0 0 4px rgba(143, 200, 154, 0.08); }

.workspace {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem);
}

.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.7rem;
}

.workspace-heading .eyebrow { margin: 0 0 0.5rem; }
.workspace-heading h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
.workspace-heading p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.8rem; }

.workspace-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.force-logout-form {
  margin: 0;
}

.presence-summary {
  display: grid;
  justify-items: end;
  gap: 0.28rem;
  max-width: 30rem;
}

.presence-summary small {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
  text-align: right;
}

.status-badge {
  flex: 0 0 auto;
  padding: 0.48rem 0.8rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.status-badge.active {
  border-color: rgba(143, 200, 154, 0.38);
  background: rgba(143, 200, 154, 0.08);
  color: var(--success);
}

.status-badge.disabled { border-color: rgba(255, 255, 255, 0.12); color: var(--muted); }
.status-badge.mini { margin-left: auto; padding: 0.35rem 0.65rem; font-size: 0.6rem; }
.settings-panel { margin-top: 1rem; padding: clamp(1.4rem, 3vw, 2rem); }
.section-title > div, .connected-heading > div { display: flex; align-items: flex-start; gap: 0.9rem; }
.section-number { color: var(--gold); font-family: var(--font-cinzel), Georgia, serif; font-size: 0.78rem; }

.section-title h3, .connected-heading h3, .service-card h3 {
  margin: 0;
  font-family: var(--font-cinzel), Georgia, serif;
  font-weight: 500;
}

.section-title p, .connected-heading p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.73rem; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.7rem;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.15rem;
  padding-top: 1.15rem;
  cursor: pointer;
}

.switch-field input { position: absolute; opacity: 0; }

.switch {
  position: relative;
  width: 2.65rem;
  height: 1.42rem;
  border-radius: 999px;
  background: #4c4c4b;
  transition: background 150ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.22rem;
  width: 1.02rem;
  height: 1.02rem;
  border-radius: 50%;
  background: #c9c9c7;
  transition: transform 150ms ease;
}

.switch-field input:checked + .switch { background: var(--gold-dark); }
.switch-field input:checked + .switch::after { transform: translateX(1.18rem); background: var(--gold-light); }
.switch-field strong, .switch-field small { display: block; }
.switch-field strong { font-size: 0.77rem; }
.switch-field small { margin-top: 0.14rem; color: var(--muted); font-size: 0.66rem; }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.connected-heading { margin: 2.1rem 0 1.05rem; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.service-card { padding: 1.35rem; }
.service-top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.35rem; }

.service-icon {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(199, 155, 66, 0.09);
  color: var(--gold-light);
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 0.7rem;
  font-weight: 700;
}

.service-icon.silver {
  border-color: rgba(233, 233, 233, 0.38);
  background: rgba(233, 233, 233, 0.06);
  color: var(--silver);
}

.service-card h3 { font-size: 0.93rem; }
.service-card .service-top p { margin: 0.23rem 0 0; color: var(--muted); font-size: 0.62rem; }
.service-card > .field + .field { margin-top: 1rem; }

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.encrypted-note { color: var(--muted); font-size: 0.62rem; }

.statistics-panel {
  display: grid;
  gap: 1.5rem;
}

.live-monitor-panel {
  display: grid;
  gap: 1rem;
}

.live-monitor-heading {
  align-items: center;
}

.live-monitor-heading > div {
  align-items: center;
}

.section-number.live {
  border-color: var(--success);
  color: var(--success);
  font-size: 0.65rem;
  box-shadow: 0 0 0 0.35rem rgba(82, 196, 138, 0.08);
}

.live-monitor-refresh {
  color: var(--success);
  font-size: 0.66rem;
  font-weight: 800;
}

.live-monitor-list {
  display: grid;
  gap: 0.65rem;
}

.live-monitor-row {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.live-monitor-platform {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 0.8rem;
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 900;
}

.live-monitor-platform.platform-dreamteam_moderation { border-color: #62a8ff; color: #8fc2ff; }
.live-monitor-platform.platform-s69 { border-color: #a88bff; color: #c1afff; }
.live-monitor-platform.platform-livecreator { border-color: #42cbb3; color: #74e4d1; }

.live-monitor-copy,
.live-monitor-copy strong,
.live-monitor-copy span,
.live-monitor-timing,
.live-monitor-timing strong,
.live-monitor-timing span {
  display: block;
  min-width: 0;
}

.live-monitor-copy strong {
  overflow: hidden;
  color: var(--silver);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-monitor-copy span,
.live-monitor-timing span,
.live-monitor-empty span {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.live-monitor-timing {
  min-width: 8.7rem;
  text-align: right;
}

.live-monitor-timing strong {
  color: var(--success);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.live-monitor-empty {
  display: grid;
  place-items: center;
  min-height: 6rem;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  text-align: center;
}

.live-monitor-empty strong {
  color: var(--silver);
  font-size: 0.8rem;
}

.statistics-periods {
  display: grid;
  gap: 0.85rem;
}

.statistics-period {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.018);
}

.statistics-period[open] {
  border-color: rgba(199, 155, 66, 0.3);
  background: rgba(199, 155, 66, 0.025);
}

.statistics-period > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1rem;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.statistics-period > summary::-webkit-details-marker {
  display: none;
}

.statistics-period > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.statistics-period-copy,
.statistics-period-copy strong,
.statistics-period-copy small {
  display: block;
}

.statistics-period-copy strong {
  color: var(--silver);
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.statistics-period-copy small {
  margin-top: 0.24rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.statistics-period-totals {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.68rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.statistics-period-totals > span {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.statistics-period-totals .ins {
  color: var(--success);
}

.statistics-period-totals .outs {
  color: #e6a19b;
}

.statistics-period-chevron {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1px solid var(--gold-light);
  border-bottom: 1px solid var(--gold-light);
  transform: rotate(45deg) translate(-0.1rem, -0.1rem);
  transition: transform 160ms ease;
}

.statistics-period[open] .statistics-period-chevron {
  transform: rotate(225deg) translate(-0.05rem, -0.05rem);
}

.statistics-period-content {
  display: grid;
  gap: 1.25rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.statistics-period-note {
  margin: 0;
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.64rem;
}

.statistics-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.statistics-tile,
.statistics-platforms article {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.statistics-tile span,
.statistics-tile strong,
.statistics-tile small,
.statistics-platforms span,
.statistics-platforms strong,
.statistics-platforms small {
  display: block;
}

.statistics-tile span,
.statistics-platforms span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.statistics-tile strong {
  margin-top: 0.35rem;
  color: var(--silver);
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.statistics-tile.ins strong { color: var(--success); }
.statistics-tile.outs strong { color: #e6a19b; }

.statistics-tile small,
.statistics-platforms small {
  margin-top: 0.25rem;
  color: #777;
  font-size: 0.6rem;
}

.statistics-section {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.statistics-heading {
  margin-bottom: 0.85rem;
}

.statistics-heading h4 {
  margin: 0;
  color: var(--silver);
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 0.9rem;
  font-weight: 500;
}

.statistics-heading p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.66rem;
}

.statistics-time-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.statistics-time-card {
  --statistics-accent: var(--theme-accent, #c98600);
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--statistics-accent) 48%, var(--theme-border, transparent));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--statistics-accent) 10%, var(--theme-surface-soft, rgba(255, 255, 255, 0.025)));
}

.statistics-time-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 0.2rem;
  background: var(--statistics-accent);
  content: "";
}

.statistics-time-card.day { --statistics-accent: #a96e00; }
.statistics-time-card.night { --statistics-accent: #425fc1; }
.statistics-time-card.weekend { --statistics-accent: #16785f; }

.statistics-time-card span,
.statistics-time-card strong,
.statistics-time-card small {
  display: block;
}

.statistics-time-card span {
  color: var(--theme-text, var(--silver));
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.statistics-time-card strong {
  margin-top: 0.5rem;
  color: var(--statistics-accent);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.statistics-time-values {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.statistics-time-card .statistics-time-values strong.ins {
  color: var(--statistics-accent);
}

.statistics-time-card .statistics-time-values strong.outs {
  color: var(--danger);
}

.statistics-time-card small {
  margin-top: 0.35rem;
  color: var(--theme-muted, var(--muted));
  font-size: 0.62rem;
}

.statistics-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.statistics-platforms strong {
  margin-top: 0.35rem;
  color: var(--gold-light);
  font-size: 0.82rem;
}

.loading-screen, .empty-state { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 1.5rem; color: var(--muted); }
.loading-screen p { font-size: 0.8rem; }
.empty-state { min-height: 24rem; }
.empty-state h3 { margin: 0; font-family: var(--font-cinzel), Georgia, serif; color: var(--silver); }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; gap: 3rem; padding: 3rem 1.5rem; }
  .login-brand h1 { font-size: 4rem; }
  .admin-grid { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid rgba(199, 155, 66, 0.14); }
  .user-list { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
}

@media (max-width: 680px) {
  .admin-header { height: auto; padding: 1rem; }
  .account-area > span { display: none; }
  .account-area { gap: 0.45rem; }
  .admin-nav { padding-right: 0.45rem; }
  .admin-nav a { padding: 0.5rem 0.62rem; }
  .workspace { padding: 2rem 1rem; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading-actions {
    align-items: flex-end;
    flex-direction: column;
  }
  .statistics-overview {
    grid-template-columns: 1fr;
  }
  .statistics-time-categories {
    grid-template-columns: 1fr;
  }
  .statistics-period > summary {
    grid-template-columns: minmax(0, 1fr) 1rem;
  }
  .statistics-period-totals {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .statistics-period-chevron {
    grid-column: 2;
    grid-row: 1;
  }
  .statistics-platforms {
    grid-template-columns: 1fr;
  }
  .live-monitor-heading {
    align-items: flex-start;
    gap: 0.6rem;
    flex-direction: column;
  }
  .live-monitor-row {
    grid-template-columns: 2.7rem minmax(0, 1fr);
  }
  .live-monitor-timing {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }
  .settings-grid, .service-grid { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { width: 100%; }
  .service-top { flex-wrap: wrap; }
  .status-badge.mini { margin-left: 0; }
}

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

/* Chat workspace */

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

.chat-body {
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% -8%, rgba(199, 155, 66, 0.12), transparent 31rem),
    #141414;
}

.chat-body,
.chat-body * {
  font-family: Arial, Helvetica, sans-serif;
}

.chat-body textarea,
.chat-body select {
  font: inherit;
}

.chat-body textarea {
  resize: vertical;
}

.chat-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: 3.85rem auto minmax(0, 1fr);
}

.chat-header {
  grid-row: 1;
  position: relative;
  min-height: 3.85rem;
  gap: 1.25rem;
  padding: 0 1rem;
  border-bottom-color: rgba(255, 255, 255, 0.07);
  background: rgba(17, 17, 17, 0.94);
  backdrop-filter: blur(18px);
}

.dialog-stopwatch {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  min-width: 4.7rem;
  padding: 0.34rem 0.68rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.34);
  color: var(--silver);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.dialog-stopwatch.overdue {
  border-color: rgba(255, 72, 72, 0.5);
  color: #ff4848;
  font-weight: 800;
}

.chat-brand {
  flex: 0 0 auto;
}

.chat-brand > div:last-child strong,
.chat-brand > div:last-child span {
  display: block;
}

.chat-brand > div:last-child strong {
  font-size: 0.93rem;
  letter-spacing: 0.01em;
}

.chat-brand > div:last-child span {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chat-source-area,
.chat-source-strip {
  display: flex;
  align-items: center;
}

.chat-source-area {
  min-width: 0;
  gap: 0.65rem;
  margin-right: auto;
}

.chat-source-strip {
  gap: 0.48rem;
}

.chat-navigation-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.chat-navigation-actions .chat-action {
  min-height: 1.75rem;
  padding-inline: 0.7rem;
  border-radius: 999px;
  color: var(--gold-light);
}

.chat-source {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 1.75rem;
  padding: 0 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #7e8083;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.chat-source i,
.platform-state {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #555;
}

.chat-source.configured {
  color: #c3b998;
  border-color: rgba(199, 155, 66, 0.22);
}

.chat-source.configured i,
.platform-state.configured {
  background: var(--gold);
}

.chat-source.connected {
  color: var(--success);
  border-color: rgba(143, 200, 154, 0.22);
}

.chat-source.connected i,
.platform-state.connected {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(143, 200, 154, 0.08);
}

.chat-header-actions,
.chat-account,
.traffic-legend,
.traffic-value {
  display: flex;
  align-items: center;
}

.chat-header-actions {
  flex: 0 0 auto;
  gap: 1.25rem;
}

.sound-settings {
  position: relative;
}

.sound-settings > summary {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 0.88rem;
  list-style: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.sound-settings > summary::-webkit-details-marker {
  display: none;
}

.sound-settings > summary:hover,
.sound-settings[open] > summary {
  border-color: rgba(199, 155, 66, 0.58);
  background: rgba(199, 155, 66, 0.1);
}

.sound-settings > summary.muted {
  color: #6f7072;
}

.sound-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.7rem);
  right: 0;
  width: 18rem;
  padding: 0.9rem;
  border: 1px solid rgba(199, 155, 66, 0.34);
  border-radius: 0.85rem;
  background: #1c1c1b;
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, 0.48);
}

.sound-panel strong,
.sound-panel small {
  display: block;
}

.sound-panel strong {
  color: #ededed;
  font-size: 0.76rem;
}

.sound-panel small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.sound-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.sound-options button,
.sound-off {
  min-height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.48rem;
  background: #151515;
  color: #b9b9b9;
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
}

.sound-options button:hover,
.sound-off:hover,
.sound-options button.selected,
.sound-off.selected {
  border-color: rgba(199, 155, 66, 0.64);
  background: rgba(199, 155, 66, 0.12);
  color: var(--gold-light);
}

.sound-off {
  width: 100%;
  margin-top: 0.45rem;
}

.chat-account {
  gap: 0.75rem;
  padding-left: 1.15rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-account > span {
  color: #c8c8c8;
  font-size: 0.7rem;
  font-weight: 650;
}

.traffic-legend {
  gap: 0.95rem;
}

.traffic-value {
  position: relative;
  gap: 0.18rem;
  padding-left: 0.7rem;
}

.traffic-value i {
  position: absolute;
  left: 0;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
}

.traffic-in i { background: #75bd85; }
.traffic-out i { background: #db7770; }
.traffic-value strong { font-size: 0.76rem; }
.traffic-value small { color: var(--muted); font-size: 0.65rem; }
.traffic-value em {
  margin-left: 0.18rem;
  color: #696b6e;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.chat-notice {
  grid-row: 2;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(232, 163, 157, 0.22);
  background: rgba(87, 39, 35, 0.8);
  color: #f2b9b4;
  font-size: 0.7rem;
  text-align: center;
}

.chat-notice.success {
  border-bottom-color: rgba(143, 200, 154, 0.24);
  background: rgba(35, 72, 44, 0.8);
  color: var(--success);
}

.chat-workspace {
  grid-row: 3;
  height: auto;
  max-height: none;
  min-height: 0;
  display: grid;
  grid-template-columns:
    minmax(15.5rem, 0.78fr)
    minmax(34rem, 2.55fr)
    minmax(15.5rem, 0.78fr);
  grid-template-areas: "customer conversation profile";
  gap: 0;
  overflow: hidden;
}

.chat-rail {
  min-height: 0;
  padding: 0.7rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(199, 155, 66, 0.28) transparent;
  background: rgba(18, 18, 18, 0.62);
}

.chat-rail-left {
  grid-area: customer;
  border-right: 1px solid rgba(255, 255, 255, 0.065);
}

.chat-rail-right {
  grid-area: profile;
  border-left: 1px solid rgba(255, 255, 255, 0.065);
}

.chat-card {
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 42%),
    rgba(30, 30, 29, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.11);
}

.chat-card + .chat-card {
  margin-top: 0.75rem;
}

.chat-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.chat-card-heading h1,
.chat-card-heading h2 {
  margin: 0;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.25;
}

.chat-card-heading h2 {
  font-size: 0.91rem;
}

.profile-name-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.profile-name-button.enabled {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(199, 155, 66, 0.45);
  text-underline-offset: 0.18rem;
}

.profile-name-button:disabled {
  opacity: 1;
}

.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.compact-heading {
  align-items: center;
  margin-bottom: 0.9rem;
}

.chat-overline {
  margin: 0 0 0.28rem;
  color: var(--gold);
  font-size: 0.57rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.source-pill {
  max-width: 8rem;
  padding: 0.28rem 0.48rem;
  overflow: hidden;
  border: 1px solid rgba(199, 155, 66, 0.23);
  border-radius: 999px;
  color: #c5b98d;
  font-size: 0.54rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-facts {
  display: grid;
  gap: 0;
  margin: 0.85rem 0 0;
}

.profile-config {
  position: relative;
  margin: -1.55rem 0 0 auto;
  width: max-content;
}

.profile-config summary {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 155, 66, 0.35);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 0.65rem;
  cursor: pointer;
  list-style: none;
}

.profile-config summary::-webkit-details-marker {
  display: none;
}

.profile-config dl {
  position: absolute;
  z-index: 12;
  top: 1.7rem;
  right: 0;
  width: 17rem;
  max-height: 20rem;
  margin: 0;
  padding: 0.8rem;
  overflow: auto;
  border: 1px solid rgba(199, 155, 66, 0.28);
  border-radius: 10px;
  background: #181817;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.profile-config dl > div {
  display: grid;
  grid-template-columns: minmax(5rem, 0.75fr) minmax(0, 1.25fr);
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-config dt,
.profile-config dd {
  margin: 0;
  font-size: 0.58rem;
}

.profile-config dt { color: #85878a; }
.profile-config dd { color: #d1d1d1; }

.profile-section {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.livecreator-notes-center {
  flex: 0 0 auto;
  margin: 0.38rem 0.75rem 0;
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(199, 155, 66, 0.24);
  border-radius: 11px;
  background: rgba(27, 27, 26, 0.92);
}

.livecreator-notes-center .note-fields {
  max-height: none;
  padding: 0;
  overflow: visible;
}

.livecreator-notes-center .dynamic-field {
  gap: 0.22rem;
}

.livecreator-notes-center .dynamic-field textarea {
  min-height: 3.2rem;
  max-height: 5rem;
}

.profile-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0.65rem 0 0.45rem;
}

.profile-tabs button {
  flex: 1;
  min-height: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
  color: #888a8d;
  font-size: 0.57rem;
  cursor: pointer;
}

.profile-tabs button.active {
  border-color: rgba(199, 155, 66, 0.42);
  color: var(--gold-light);
  background: rgba(199, 155, 66, 0.1);
}

.profile-tabs button span {
  margin-left: 0.35rem;
  padding: 0.08rem 0.32rem;
  border-radius: 999px;
  background: #783e3e;
  color: #fff;
}

.profile-fact {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(4.8rem, 0.72fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.53rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.profile-fact dt,
.profile-fact dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-fact dt {
  color: #7f8185;
  font-size: 0.62rem;
}

.profile-fact dd {
  color: #d4d4d4;
  font-size: 0.67rem;
  font-weight: 600;
  text-align: right;
}

.profile-fact.wide {
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.profile-fact.wide dd {
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}

.profile-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr));
  gap: 0.35rem;
  max-height: 14.25rem;
  margin-top: 0.55rem;
  padding-right: 0.15rem;
  overflow-y: auto;
}

.media-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 9px;
  background: #101010;
}

.media-tile.clickable {
  cursor: pointer;
}

.media-tile.clickable:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.media-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-tile figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 0.35rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.84));
  font-size: 0.52rem;
}

.dynamic-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.birthday-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.dynamic-field {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
}

.dynamic-field.wide,
.dynamic-field:has(textarea) {
  grid-column: 1 / -1;
}

.dynamic-field-label {
  color: #8e9093;
  font-size: 0.58rem;
  font-weight: 650;
}

.dynamic-field input,
.dynamic-field textarea,
.dynamic-field select,
.chat-search input {
  width: 100%;
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  outline: none;
  background: rgba(10, 10, 10, 0.45);
  color: #dedede;
  font-size: 0.65rem;
  line-height: 1.45;
}

.dynamic-field input:focus,
.dynamic-field textarea:focus,
.dynamic-field select:focus,
.chat-search input:focus {
  border-color: rgba(199, 155, 66, 0.65);
  box-shadow: 0 0 0 3px rgba(199, 155, 66, 0.08);
}

.dynamic-field input:disabled,
.dynamic-field textarea:disabled,
.dynamic-field select:disabled {
  color: #a5a5a5;
  background: rgba(255, 255, 255, 0.02);
}

.dynamic-field small {
  color: #6d6f72;
  font-size: 0.53rem;
}

.save-state {
  color: var(--success);
  font-size: 0.55rem;
}

.segmented-control {
  display: flex;
  padding: 0.16rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.segmented-control button {
  padding: 0.28rem 0.4rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #777;
  font-size: 0.52rem;
  cursor: pointer;
}

.segmented-control button.active {
  background: rgba(199, 155, 66, 0.15);
  color: var(--gold-light);
}

.chat-search {
  display: block;
  margin-bottom: 0.65rem;
}

.chat-search input {
  min-height: 2rem;
  padding-left: 0.7rem;
}

.note-fields {
  max-height: 24rem;
  padding-right: 0.25rem;
  overflow-y: auto;
}

.variable-note-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.variable-note-form input {
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  outline: none;
  background: rgba(10, 10, 10, 0.45);
  color: #dedede;
  font-size: 0.62rem;
}

.conversation-column {
  grid-area: conversation;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(199, 155, 66, 0.045), transparent 25rem),
    rgba(22, 22, 22, 0.7);
}

.dialog-banner {
  height: 4.8rem;
  max-height: 4.8rem;
  flex: 0 0 4.8rem;
  display: flex;
  flex-direction: column;
  margin: 0.4rem 0.75rem 0;
  padding: 0.48rem 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(199, 155, 66, 0.28);
  border-radius: 10px;
  background: rgba(91, 64, 35, 0.28);
  color: #e2e2e2;
  font-size: 0.65rem;
  line-height: 1.32;
  text-align: left;
}

.dialog-banner strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--gold-light);
  font-size: 0.6rem;
}

.dialog-banner span {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 0.35rem;
  overflow-y: auto;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(199, 155, 66, 0.35) transparent;
}

.conversation-info-card {
  margin: 0.75rem 1rem 0;
}

.conversation-toolbar {
  min-height: 3.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.dialog-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4e4e4e;
}

.live-dot.active {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(143, 200, 154, 0.08);
}

.dialog-identity strong,
.dialog-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-identity strong {
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 0.9rem;
  font-weight: 500;
}

.dialog-identity small {
  max-width: 35rem;
  margin-top: 0.2rem;
  color: #77797c;
  font-size: 0.59rem;
}

.dialog-actions,
.composer-tools,
.message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.chat-action {
  min-height: 1.9rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: #aeb0b2;
  font-size: 0.57rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-action:hover:not(:disabled) {
  border-color: rgba(199, 155, 66, 0.42);
  color: var(--gold-light);
}

.chat-action.primary {
  border-color: rgba(199, 155, 66, 0.35);
  background: rgba(199, 155, 66, 0.1);
  color: var(--gold-light);
}

.chat-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.message-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-loading,
.conversation-empty {
  height: 100%;
  min-height: 15rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  padding: 2rem;
  text-align: center;
}

.chat-loading strong,
.conversation-empty h2 {
  margin: 0.5rem 0 0;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1.18rem;
  font-weight: 500;
}

.chat-loading small,
.conversation-empty p {
  max-width: 30rem;
  margin: 0;
  color: #77797c;
  font-size: 0.66rem;
  line-height: 1.6;
}

.loading-ring,
.empty-orbit {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 155, 66, 0.35);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: Georgia, serif;
}

.loading-ring {
  border-color: rgba(199, 155, 66, 0.18);
  border-top-color: var(--gold);
  animation: chat-spin 1s linear infinite;
}

@keyframes chat-spin {
  to { transform: rotate(360deg); }
}

.empty-orbit {
  box-shadow: 0 0 0 8px rgba(199, 155, 66, 0.035);
}

.dancing-bear {
  position: relative;
  width: 5.5rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  margin: 0.35rem auto 0;
}

.dancing-bear span {
  display: block;
  font-size: 3.25rem;
  line-height: 1;
  filter: drop-shadow(0 0.65rem 0.65rem rgba(0, 0, 0, 0.32));
  transform-origin: 50% 90%;
  animation: bear-dance 0.85s ease-in-out infinite alternate;
}

.dancing-bear::before,
.dancing-bear::after {
  position: absolute;
  color: var(--gold-light);
  font-size: 1rem;
  opacity: 0.75;
  animation: bear-note 1.1s ease-in-out infinite;
}

.dancing-bear::before {
  content: "♪";
  top: 0.2rem;
  left: 0.15rem;
}

.dancing-bear::after {
  content: "♫";
  top: -0.15rem;
  right: 0;
  animation-delay: 0.45s;
}

@keyframes bear-dance {
  0% { transform: translate(-0.5rem, 0.15rem) rotate(-9deg); }
  50% { transform: translate(0, -0.6rem) rotate(0deg) scale(1.04); }
  100% { transform: translate(0.5rem, 0.15rem) rotate(9deg); }
}

@keyframes bear-note {
  0%, 100% { opacity: 0.2; transform: translateY(0) scale(0.85); }
  50% { opacity: 0.9; transform: translateY(-0.45rem) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .dancing-bear span,
  .dancing-bear::before,
  .dancing-bear::after {
    animation: none;
  }
}

.message-list {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  padding: 0.8rem 0.95rem;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(199, 155, 66, 0.25) transparent;
}

.message {
  width: min(92%, 58rem);
  align-self: flex-start;
}

.message.outgoing {
  align-self: flex-end;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0.25rem 0.3rem;
  color: #77797c;
  font-size: 0.54rem;
}

.message-meta strong {
  color: #bcbdbf;
  font-size: 0.6rem;
}

.message-meta span {
  padding: 0.16rem 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.message-meta time {
  margin-left: auto;
}

.message-bubble {
  padding: 0.68rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 5px 13px 13px 13px;
  background: #252525;
  color: #dedede;
  font-size: 0.82rem;
  line-height: 1.52;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-annotations {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    white-space: pre-line;
}

.option-dynamic-field input[type="checkbox"] {
    width: auto;
    min-height: 1rem;
    margin-right: auto;
}

.outgoing .message-bubble {
  border-color: rgba(199, 155, 66, 0.2);
  border-radius: 13px 5px 13px 13px;
  background: linear-gradient(145deg, rgba(199, 155, 66, 0.15), rgba(68, 53, 29, 0.44));
}

.system-message {
  width: min(90%, 50rem);
  align-self: center;
}

.system-message .message-bubble {
  border-style: dashed;
  background: transparent;
  color: #929497;
  text-align: center;
}

.message-actions {
  margin-top: 0.32rem;
}

.composer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0 0.75rem 0.7rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(199, 155, 66, 0.22);
  border-radius: 14px;
  background: rgba(28, 28, 28, 0.96);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
}

.conversation-column.has-active-dialog .composer {
  display: block !important;
}

.composer textarea {
  width: 100%;
  min-height: 3.65rem;
  padding: 0.35rem 0.45rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e3e3e3;
  font-size: 0.75rem;
  line-height: 1.55;
}

.composer textarea::placeholder {
  color: #626467;
}

.reply-context {
  margin-bottom: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-left: 2px solid var(--gold);
  background: rgba(199, 155, 66, 0.05);
  color: #9c9d9f;
  font-size: 0.6rem;
}

.composer-footer,
.composer-submit {
  display: flex;
  align-items: center;
}

.composer-footer {
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.composer-submit {
  flex: 0 0 auto;
  gap: 0.75rem;
}

.composer-send-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.character-count {
  color: #727477;
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
}

.character-count.valid {
  color: var(--success);
}

.shortkey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.shortkey {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
  color: #989a9d;
  cursor: pointer;
}

.shortkey kbd {
  min-width: 1.7rem;
  padding: 0.2rem;
  border: 1px solid rgba(199, 155, 66, 0.22);
  border-radius: 4px;
  background: rgba(199, 155, 66, 0.06);
  color: var(--gold-light);
  font: 700 0.52rem/1 monospace;
  text-align: center;
}

.shortkey span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-list {
  display: grid;
  gap: 0.58rem;
}

.platform-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.platform-monogram {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199, 155, 66, 0.22);
  border-radius: 7px;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 0.58rem;
}

.platform-copy {
  min-width: 0;
}

.platform-copy strong,
.platform-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-copy strong {
  color: #c6c6c6;
  font-size: 0.62rem;
}

.platform-copy small {
  margin-top: 0.16rem;
  color: #737578;
  font-size: 0.52rem;
}

.chat-option-dialog {
  width: min(92vw, 30rem);
  padding: 0;
  border: 1px solid rgba(199, 155, 66, 0.38);
  border-radius: 16px;
  background: #222220;
  color: var(--silver);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.chat-option-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.chat-option-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.chat-option-dialog h2 {
  margin: 0;
  font-family: var(--font-cinzel), Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
}

.dialog-close {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.option-select-field {
  margin-top: 0.4rem;
}

.option-image-tabs {
  display: flex;
  gap: 0.4rem;
  padding-bottom: 0.15rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(199, 155, 66, 0.35) transparent;
}

.option-image-tabs button {
  min-height: 2rem;
  flex: 0 0 auto;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: #9b9d9f;
  font-size: 0.63rem;
  font-weight: 700;
  cursor: pointer;
}

.option-image-tabs button.active {
  border-color: rgba(199, 155, 66, 0.55);
  background: rgba(199, 155, 66, 0.14);
  color: var(--gold-light);
}

.option-image-grid {
  max-height: 24rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 0.55rem;
  padding: 0.1rem;
  overflow-y: auto;
}

.option-image-tile {
  position: relative;
  min-width: 0;
  min-height: 9.5rem;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #151515;
  cursor: pointer;
}

.option-image-tile:hover,
.option-image-tile.selected {
  border-color: var(--gold);
}

.option-image-tile.selected {
  box-shadow: 0 0 0 2px rgba(199, 155, 66, 0.18);
}

.option-image-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.option-image-tile strong {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4rem 0.45rem 0.42rem;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: #f0f0f0;
  font-size: 0.56rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-image-sent {
  position: absolute;
  top: 0.38rem;
  right: 0.38rem;
  padding: 0.24rem 0.38rem;
  border-radius: 999px;
  background: rgba(45, 104, 61, 0.92);
  color: #d7f5de;
  font-size: 0.5rem;
  font-weight: 700;
}

.option-preview {
  margin: 0;
  min-height: 10rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #181817;
}

.option-description {
  margin: -0.35rem 0 0;
  color: #96989a;
  font-size: 0.61rem;
  line-height: 1.45;
}

.message-media {
  width: min(18rem, 100%);
  max-height: 13.5rem;
  display: block;
  margin-bottom: 0.55rem;
  border-radius: 8px;
  object-fit: contain;
}

.media-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem 0.5rem;
  color: #77797c;
  font-size: 0.62rem;
  text-align: center;
}

.option-preview img {
  display: block;
  width: 100%;
  max-height: 18rem;
  object-fit: contain;
}

.option-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.content-dialog {
  padding: 1.25rem;
}

.content-dialog-text {
  color: #b7b7b7;
  font-size: 0.7rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.content-dialog .profile-media {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 16rem));
  justify-content: center;
  max-height: 60vh;
  overflow-y: auto;
}

.content-dialog .media-tile {
  aspect-ratio: 4 / 5;
}

/* Slightly larger chat typography without changing the surrounding controls. */
.chat-brand > div:last-child strong { font-size: 1rem; }
.chat-brand > div:last-child span,
.chat-source { font-size: 0.67rem; }
.chat-account > span { font-size: 0.76rem; }
.traffic-value strong { font-size: 0.82rem; }
.traffic-value small { font-size: 0.7rem; }
.traffic-value em { font-size: 0.6rem; }
.chat-notice { font-size: 0.76rem; }
.chat-card-heading h1 { font-size: 1.14rem; }
.chat-card-heading h2 { font-size: 0.98rem; }
.chat-overline { font-size: 0.63rem; }
.source-pill { font-size: 0.6rem; }
.profile-config dt,
.profile-config dd { font-size: 0.64rem; }
.profile-tabs button { font-size: 0.63rem; }
.profile-fact dt { font-size: 0.68rem; }
.profile-fact dd { font-size: 0.73rem; }
.media-tile figcaption { font-size: 0.58rem; }
.dynamic-field-label { font-size: 0.64rem; }
.dynamic-field input,
.dynamic-field textarea,
.dynamic-field select,
.chat-search input {
  font-size: 0.71rem;
  line-height: 1.33;
}
.dynamic-field small { font-size: 0.59rem; }
.save-state { font-size: 0.61rem; }
.segmented-control button { font-size: 0.58rem; }
.variable-note-form input { font-size: 0.68rem; }
.dialog-banner { font-size: 0.71rem; }
.dialog-banner strong { font-size: 0.66rem; }
.dialog-identity strong { font-size: 0.97rem; }
.dialog-identity small { font-size: 0.65rem; }
.chat-action { font-size: 0.63rem; }
.chat-loading small,
.conversation-empty p { font-size: 0.72rem; }
.message-meta { font-size: 0.6rem; }
.message-meta strong { font-size: 0.66rem; }
.message-bubble { font-size: 0.78rem; }
.composer textarea {
  font-size: 0.82rem;
  line-height: 1.42;
}
.reply-context,
.character-count { font-size: 0.66rem; }
.shortkey kbd { font-size: 0.58rem; }
.shortkey span { font-size: 0.61rem; }
.option-image-tile strong { font-size: 0.62rem; }
.option-image-sent { font-size: 0.56rem; }
.option-description { font-size: 0.67rem; }
.media-empty { font-size: 0.68rem; }
.content-dialog-text { font-size: 0.76rem; }

@media (max-width: 820px) {
  .chat-body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .chat-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }

  .chat-header {
    min-height: 4rem;
  }

  .chat-source-area,
  .traffic-legend,
  .chat-account > span {
    display: none;
  }

  .chat-header-actions {
    margin-left: auto;
  }

  .sound-panel {
    position: fixed;
    top: 4.2rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .chat-workspace {
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .chat-rail-left {
    order: 1;
  }

  .chat-rail-right {
    order: 3;
    display: block;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  }

  .chat-rail {
    overflow: visible;
  }

  .chat-rail-left {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  }

  .conversation-column {
    order: 2;
    height: auto;
    max-height: none;
    min-height: 42rem;
    overflow: visible;
  }

  .conversation-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .message {
    width: 90%;
  }
}

@media (max-width: 520px) {
  .chat-header {
    padding: 0 0.75rem;
  }

  .chat-brand .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .chat-account {
    padding-left: 0;
    border-left: 0;
  }

  .chat-rail,
  .message-list {
    padding: 0.75rem;
  }

  .dynamic-fields {
    grid-template-columns: 1fr;
  }

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

  .dynamic-field.wide,
  .dynamic-field:has(textarea) {
    grid-column: auto;
  }

  .composer {
    margin: 0 0.65rem 0.65rem;
  }

  .composer-footer {
    align-items: flex-end;
  }

  .composer-submit {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
  }
}

/* Lumyrax Kobalt & Mango: gemeinsamer Tag-/Nachtmodus */
:root[data-theme="day"] {
  --background: #eef4ff;
  --surface: #ffffff;
  --gold: #f6b83f;
  --gold-light: #ffc857;
  --gold-dark: #c98600;
  --silver: #172a4a;
  --muted: #5d7092;
  --line: rgba(36, 87, 214, 0.2);
  --success: #179f90;
  --danger: #c65353;
  --theme-bg: #eef4ff;
  --theme-surface: #ffffff;
  --theme-surface-soft: #f5f9ff;
  --theme-surface-tint: #ddebff;
  --theme-header: #2457d6;
  --theme-header-strong: #193b8f;
  --theme-accent: #f6b83f;
  --theme-accent-soft: #fff2b7;
  --theme-secondary: #39b7a5;
  --theme-text: #172a4a;
  --theme-muted: #5d7092;
  --theme-border: rgba(36, 87, 214, 0.2);
  --theme-shadow: 0 14px 38px rgba(25, 59, 143, 0.12);
  --theme-input: #ffffff;
  --theme-incoming: #ddebff;
  --theme-outgoing: #fff2b7;
}

:root[data-theme="night"] {
  --background: #0e1b33;
  --surface: #172a4a;
  --gold: #ffc247;
  --gold-light: #ffd36d;
  --gold-dark: #c98600;
  --silver: #eaf2ff;
  --muted: #afc3e6;
  --line: rgba(57, 116, 255, 0.34);
  --success: #45d6c5;
  --danger: #ff8f87;
  --theme-bg: #08172d;
  --theme-surface: #1a355b;
  --theme-surface-soft: #102746;
  --theme-surface-tint: #274b7b;
  --theme-header: #2457d6;
  --theme-header-strong: #193b8f;
  --theme-accent: #ffc247;
  --theme-accent-soft: #5b4721;
  --theme-secondary: #45d6c5;
  --theme-text: #f7faff;
  --theme-muted: #cfddf4;
  --theme-border: rgba(137, 174, 244, 0.48);
  --theme-shadow: 0 16px 44px rgba(2, 8, 20, 0.38);
  --theme-input: #24466f;
  --theme-incoming: #315b90;
  --theme-outgoing: #725822;
}

html[data-theme],
html[data-theme] body {
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: Arial, Helvetica, sans-serif;
}

html[data-theme] body {
  background-image:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--theme-header) 14%, transparent), transparent 31rem),
    radial-gradient(circle at 92% 88%, color-mix(in srgb, var(--theme-secondary) 10%, transparent), transparent 34rem);
}

html[data-theme] :where(
  .login-brand h1,
  .sidebar h1,
  .workspace-heading h2,
  .login-card h2,
  .chat-card-heading h1,
  .chat-card-heading h2,
  .dialog-identity strong,
  .chat-loading strong,
  .conversation-empty h2
) {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--theme-text);
  text-shadow: none;
}

.theme-toggle {
  min-width: 4.75rem;
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.28rem 0.42rem;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--theme-surface-tint);
  color: var(--theme-text);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(12, 32, 72, 0.12);
}

.theme-toggle:hover {
  border-color: var(--theme-accent);
}

.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent) 35%, transparent);
  outline-offset: 2px;
}

.theme-toggle-floating {
  position: fixed;
  z-index: 80;
  top: 1rem;
  right: 1rem;
}

.theme-toggle-icon {
  width: 0.85rem;
  font-size: 0.78rem;
  line-height: 1;
  text-align: center;
  opacity: 0.45;
}

html[data-theme="day"] .theme-toggle-icon.sun,
html[data-theme="night"] .theme-toggle-icon.moon {
  color: var(--theme-accent);
  opacity: 1;
}

.theme-toggle-track {
  position: relative;
  width: 1.85rem;
  height: 1rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-header) 24%, var(--theme-surface));
  box-shadow: inset 0 0 0 1px var(--theme-border);
}

.theme-toggle-track i {
  position: absolute;
  top: 0.14rem;
  left: 0.15rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 1px 4px rgba(10, 25, 55, 0.25);
  transition: transform 180ms ease;
}

html[data-theme="night"] .theme-toggle-track i {
  transform: translateX(0.82rem);
}

html[data-theme] .panel {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  backdrop-filter: none;
}

html[data-theme] :where(.admin-header, .chat-header) {
  border-bottom-color: color-mix(in srgb, var(--theme-accent) 35%, transparent);
  background: linear-gradient(90deg, var(--theme-header-strong), var(--theme-header));
  color: #ffffff;
}

html[data-theme] :where(.admin-header, .chat-header) :where(strong, span) {
  color: inherit;
}

html[data-theme] :where(.brand-lockup span, .brand-lockup strong, .chat-brand strong, .chat-brand span) {
  color: #ffffff;
}

html[data-theme] .brand-mark {
  border-color: var(--theme-accent);
  background: var(--theme-accent);
  color: #172a4a;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--theme-accent) 16%, transparent);
}

html[data-theme] .brand-mark.small {
  box-shadow: none;
}

html[data-theme] .lumyrax-mark {
  border-color: var(--theme-accent);
  background: var(--theme-accent);
  color: #172a4a;
}

html[data-theme] :where(.eyebrow, .panel-kicker, .chat-overline) {
  color: var(--theme-header);
}

html[data-theme="night"] :where(.eyebrow, .panel-kicker, .chat-overline) {
  color: var(--theme-accent);
}

html[data-theme] :where(.login-intro, .security-note, .login-card > p, .workspace-heading > div > p) {
  color: var(--theme-muted);
}

html[data-theme] .security-note strong {
  color: var(--theme-text);
}

html[data-theme] .ambient-one {
  background: radial-gradient(circle, color-mix(in srgb, var(--theme-header) 24%, transparent), transparent 70%);
}

html[data-theme] .ambient-two {
  background: radial-gradient(circle, color-mix(in srgb, var(--theme-accent) 18%, transparent), transparent 70%);
}

html[data-theme] :where(.field > span:first-child, .dynamic-field-label) {
  color: var(--theme-text);
}

html[data-theme] :where(
  .field input,
  .dynamic-field input,
  .dynamic-field textarea,
  .dynamic-field select,
  .chat-search input,
  .variable-note-form input
) {
  border-color: var(--theme-border);
  background: var(--theme-input);
  color: var(--theme-text);
}

html[data-theme] :where(
  .field input,
  .dynamic-field input,
  .dynamic-field textarea,
  .dynamic-field select,
  .chat-search input,
  .variable-note-form input
)::placeholder {
  color: color-mix(in srgb, var(--theme-muted) 78%, transparent);
}

html[data-theme] :where(
  .field input,
  .dynamic-field input,
  .dynamic-field textarea,
  .dynamic-field select,
  .chat-search input,
  .variable-note-form input
):focus {
  border-color: var(--theme-header);
  background: var(--theme-input);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-header) 18%, transparent);
}

html[data-theme] .button.primary {
  border-color: color-mix(in srgb, var(--theme-accent) 80%, #9b6a00);
  background: var(--theme-accent);
  color: #172a4a;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--theme-accent) 26%, transparent);
}

html[data-theme] .button.secondary {
  border-color: var(--theme-header);
  background: color-mix(in srgb, var(--theme-header) 9%, var(--theme-surface));
  color: var(--theme-header);
}

html[data-theme="night"] .button.secondary {
  border-color: var(--theme-secondary);
  color: var(--theme-secondary);
}

html[data-theme] .button.danger {
  border-color: #c74848;
  background: color-mix(in srgb, #c74848 10%, var(--theme-surface));
  color: #a62929;
}

html[data-theme="night"] .button.danger {
  color: #ffaaa5;
}

html[data-theme] .button.ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

html[data-theme] .reveal-button {
  color: var(--theme-header);
}

html[data-theme="night"] .reveal-button {
  color: var(--theme-accent);
}

html[data-theme] .admin-grid {
  background: var(--theme-bg);
}

html[data-theme] .sidebar {
  border-right-color: var(--theme-border);
  background: var(--theme-surface-tint);
}

html[data-theme="night"] .sidebar {
  background: var(--theme-surface-soft);
}

html[data-theme] .icon-button {
  border-color: var(--theme-header);
  background: var(--theme-header);
  color: #ffffff;
}

html[data-theme] .user-row {
  color: var(--theme-text);
}

html[data-theme] .user-row:hover {
  background: color-mix(in srgb, var(--theme-header) 7%, var(--theme-surface));
}

html[data-theme] .user-row.selected {
  border-color: color-mix(in srgb, var(--theme-accent) 72%, var(--theme-header));
  background: var(--theme-accent-soft);
}

html[data-theme="night"] .user-row.selected {
  color: #ffffff;
}

html[data-theme] .avatar {
  background: var(--theme-header);
  color: #ffffff;
}

html[data-theme] :where(.user-copy small, .encrypted-note, .service-card .service-top p) {
  color: var(--theme-muted);
}

html[data-theme] :where(.admin-nav, .account-area, .chat-account) {
  border-color: rgba(255, 255, 255, 0.25);
}

html[data-theme] .admin-nav a {
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme] .admin-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme] .admin-nav a.active {
  border-color: var(--theme-accent);
  background: var(--theme-accent);
  color: #172a4a;
}

html[data-theme] :where(.settings-panel, .service-card, .statistics-period, .live-monitor-row) {
  border-color: var(--theme-border);
  background: var(--theme-surface);
}

html[data-theme] :where(.section-number, .service-icon) {
  border-color: var(--theme-header);
  color: var(--theme-header);
}

html[data-theme] :where(.statistics-tile, .statistics-platforms article) {
  border-color: var(--theme-border);
  background: var(--theme-surface-soft);
}

html[data-theme] :where(.statistics-tile span, .statistics-platforms span, .statistics-heading p, .statistics-period-note, .live-monitor-copy span, .live-monitor-timing span, .live-monitor-empty span) {
  color: var(--theme-muted);
}

html[data-theme] :where(.statistics-tile strong, .statistics-heading h4, .statistics-period-copy strong, .live-monitor-copy strong, .live-monitor-empty strong) {
  color: var(--theme-text);
  font-family: Arial, Helvetica, sans-serif;
}

html[data-theme] :where(.statistics-section, .statistics-period-content) {
  border-color: var(--theme-border);
}

html[data-theme="night"] .statistics-time-card.day { --statistics-accent: #ffc247; }
html[data-theme="night"] .statistics-time-card.night { --statistics-accent: #9db2ff; }
html[data-theme="night"] .statistics-time-card.weekend { --statistics-accent: #59d7b2; }

html[data-theme] .chat-shell {
  background: var(--theme-bg);
}

html[data-theme] .chat-source {
  border-color: rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme] .chat-source.configured {
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}

html[data-theme] .chat-source.connected {
  border-color: var(--theme-secondary);
  color: #ffffff;
}

html[data-theme] .chat-source.connected i {
  background: var(--theme-secondary);
}

html[data-theme] .chat-header .theme-toggle {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
}

html[data-theme] .chat-header .theme-toggle-track {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

html[data-theme] .admin-header .theme-toggle {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
}

html[data-theme] .admin-header .theme-toggle-track {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

html[data-theme] :where(.sound-settings > summary, .profile-config summary) {
  border-color: color-mix(in srgb, var(--theme-accent) 65%, transparent);
  color: var(--theme-accent);
}

html[data-theme] :where(.sound-panel, .profile-config dl, .chat-option-dialog) {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme] :where(.sound-panel strong, .profile-config dd, .chat-option-dialog h2) {
  color: var(--theme-text);
}

html[data-theme] :where(.sound-options button, .sound-off, .option-image-tabs button) {
  border-color: var(--theme-border);
  background: var(--theme-surface-soft);
  color: var(--theme-muted);
}

html[data-theme] :where(
  .sound-options button:hover,
  .sound-off:hover,
  .sound-options button.selected,
  .sound-off.selected,
  .option-image-tabs button.active
) {
  border-color: var(--theme-accent);
  background: var(--theme-accent-soft);
  color: var(--theme-text);
}

html[data-theme] .chat-workspace {
  background: var(--theme-bg);
}

html[data-theme] .chat-rail {
  background: var(--theme-surface-tint);
  scrollbar-color: var(--theme-header) transparent;
}

html[data-theme="night"] .chat-rail {
  background: var(--theme-surface-soft);
}

html[data-theme] :where(.chat-rail-left, .chat-rail-right) {
  border-color: var(--theme-border);
}

html[data-theme] .chat-card {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

html[data-theme] :where(.profile-section, .profile-fact, .profile-config dl > div) {
  border-color: var(--theme-border);
}

html[data-theme] .livecreator-notes-center {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
}

html[data-theme] :where(.profile-fact dt, .profile-config dt, .dynamic-field small) {
  color: var(--theme-muted);
}

html[data-theme] :where(.profile-fact dd, .profile-config dd) {
  color: var(--theme-text);
}

html[data-theme] .profile-tabs button {
  border-color: var(--theme-border);
  background: var(--theme-surface-soft);
  color: var(--theme-muted);
}

html[data-theme] .profile-tabs button.active {
  border-color: var(--theme-header);
  background: var(--theme-surface-tint);
  color: var(--theme-header);
}

html[data-theme="night"] .profile-tabs button.active {
  color: var(--theme-accent);
}

html[data-theme] .source-pill {
  border-color: var(--theme-border);
  background: var(--theme-surface-tint);
  color: var(--theme-header-strong);
}

html[data-theme="night"] .source-pill {
  color: var(--theme-accent);
}

html[data-theme] :where(.segmented-control, .shortkey) {
  border-color: var(--theme-border);
  background: var(--theme-surface-soft);
}

html[data-theme] .segmented-control button {
  color: var(--theme-muted);
}

html[data-theme] .segmented-control button.active {
  background: var(--theme-header);
  color: #ffffff;
}

html[data-theme] .conversation-column {
  background: var(--theme-surface-soft);
}

html[data-theme="night"] .conversation-column {
  background:
    radial-gradient(circle at 50% 15%, rgba(57, 116, 255, 0.12), transparent 24rem),
    #0f203a;
}

html[data-theme] .conversation-toolbar {
  border-color: var(--theme-border);
  background: var(--theme-surface);
}

html[data-theme] .dialog-identity small,
html[data-theme] :where(.chat-loading small, .conversation-empty p, .message-meta) {
  color: var(--theme-muted);
}

html[data-theme] .dialog-banner {
  border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--theme-border));
  background: var(--theme-accent-soft);
  color: var(--theme-text);
  scrollbar-color: var(--theme-accent) transparent;
}

html[data-theme] .dialog-banner strong {
  color: color-mix(in srgb, var(--theme-accent) 82%, var(--theme-text));
}

html[data-theme] .chat-action {
  border-color: var(--theme-border);
  background: var(--theme-surface-soft);
  color: var(--theme-text);
}

html[data-theme] .chat-action:hover:not(:disabled),
html[data-theme] .chat-action.primary {
  border-color: var(--theme-header);
  background: var(--theme-surface-tint);
  color: var(--theme-header);
}

html[data-theme="night"] .chat-action:hover:not(:disabled),
html[data-theme="night"] .chat-action.primary {
  border-color: var(--theme-secondary);
  color: var(--theme-secondary);
}

html[data-theme] .message-list {
  scrollbar-color: var(--theme-header) transparent;
}

html[data-theme] .message-meta strong {
  color: var(--theme-text);
}

html[data-theme] .message-meta span {
  background: var(--theme-surface-tint);
}

html[data-theme] .message-bubble {
  border-color: color-mix(in srgb, var(--theme-header) 20%, transparent);
  background: var(--theme-incoming);
  color: var(--theme-text);
  box-shadow: 0 5px 16px color-mix(in srgb, var(--theme-header) 9%, transparent);
}

html[data-theme] .outgoing .message-bubble {
  border-color: color-mix(in srgb, var(--theme-accent) 58%, transparent);
  background: var(--theme-outgoing);
  color: var(--theme-text);
}

html[data-theme="night"] .message-bubble,
html[data-theme="night"] .outgoing .message-bubble {
  color: #f4f7ff;
}

html[data-theme] .system-message .message-bubble {
  background: transparent;
  color: var(--theme-muted);
}

html[data-theme] .composer {
  border-color: var(--theme-border);
  background: var(--theme-surface);
  box-shadow: 0 -12px 36px color-mix(in srgb, var(--theme-header) 11%, transparent);
}

html[data-theme] .composer textarea {
  color: var(--theme-text);
}

html[data-theme] .composer textarea::placeholder,
html[data-theme] .character-count {
  color: var(--theme-muted);
}

html[data-theme] .composer-footer {
  border-color: var(--theme-border);
}

html[data-theme] .option-preview {
  border-color: var(--theme-border);
  background: var(--theme-surface-soft);
}

html[data-theme] :where(.option-description, .content-dialog-text, .media-empty, .platform-copy small) {
  color: var(--theme-muted);
}

html[data-theme] .platform-copy strong {
  color: var(--theme-text);
}

html[data-theme] .platform-monogram {
  border-color: var(--theme-header);
  color: var(--theme-header);
}

html[data-theme] :where(.chat-card-heading h1, .chat-card-heading h2) {
  font-size: 1rem;
}

html[data-theme] :where(.profile-fact dt, .dynamic-field-label) {
  font-size: 0.68rem;
}

html[data-theme] :where(.profile-fact dd, .dynamic-field input, .dynamic-field textarea, .dynamic-field select) {
  font-size: 0.74rem;
}

html[data-theme] .message-bubble {
  font-size: 0.88rem;
  line-height: 1.5;
}

html[data-theme] .composer textarea {
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .theme-toggle {
    min-width: 4.2rem;
  }
}

@media (max-width: 680px) {
  .theme-toggle-floating {
    top: 0.65rem;
    right: 0.65rem;
  }

  .admin-header .theme-toggle-icon,
  .chat-header .theme-toggle-icon {
    display: none;
  }

  .admin-header .theme-toggle,
  .chat-header .theme-toggle {
    min-width: 2.7rem;
  }
}

/* Kompakter Dialogkopf: Informationen oben, Aktionen beim Nachrichtenfeld. */
.conversation-info-card {
  margin: 0.38rem 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 11px;
}

.conversation-info-card .dynamic-fields {
  gap: 0.42rem 0.58rem;
}

.conversation-info-card .dynamic-field {
  gap: 0.2rem;
}

.conversation-info-card .dynamic-field input,
.conversation-info-card .dynamic-field select {
  min-height: 2.2rem;
  padding: 0.4rem 0.55rem;
}

.conversation-info-card .dynamic-field textarea {
  min-height: 3rem;
  max-height: 4rem;
  padding: 0.42rem 0.55rem;
}

.composer-tool-groups {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.composer-tool-groups .composer-tools,
.composer-tool-groups .dialog-actions {
  display: contents;
}

.composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.composer-submit {
  width: 100%;
  justify-content: flex-end;
}

.profile-facts-disclosure {
  margin-top: 0.85rem;
  border-top: 1px solid var(--theme-border, rgba(255, 255, 255, 0.08));
}

.profile-facts-disclosure > summary {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  color: var(--theme-text, #d4d4d4);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.profile-facts-disclosure > summary::-webkit-details-marker {
  display: none;
}

.profile-facts-disclosure > summary::after {
  content: "+";
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.12));
  border-radius: 50%;
  color: var(--theme-header, var(--gold-light));
  font-size: 1rem;
  line-height: 1;
}

.profile-facts-disclosure[open] > summary::after {
  content: "−";
}

.profile-facts-disclosure .profile-facts {
  margin: 0;
  padding-bottom: 0.25rem;
}

.option-copy-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin-top: -0.2rem;
}

.option-copy-tools input {
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  outline: 0;
  background: var(--theme-input, rgba(10, 10, 10, 0.45));
  color: var(--theme-text, #dedede);
  font: inherit;
}

.option-copy-tools span {
  grid-column: 1 / -1;
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 700;
}

@media (max-width: 520px) {
  .option-copy-tools {
    grid-template-columns: 1fr;
  }
}

.emoji-input-wrap {
  position: relative;
  min-width: 0;
}

.emoji-input-wrap textarea {
  padding-right: 2.8rem;
}

.emoji-trigger {
  position: absolute;
  z-index: 2;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.12));
  border-radius: 50%;
  background: var(--theme-surface-soft, rgba(0, 0, 0, 0.24));
  color: var(--theme-text, #f1f1f1);
  font-size: 1rem;
  cursor: pointer;
}

.emoji-trigger:hover,
.emoji-trigger[aria-expanded="true"] {
  border-color: var(--theme-accent, var(--gold));
  background: var(--theme-accent-soft, rgba(199, 155, 66, 0.16));
}

.emoji-clipboard {
  position: absolute;
  z-index: 40;
  right: 0.35rem;
  bottom: 2.8rem;
  width: min(20rem, calc(100vw - 3rem));
  max-height: 13rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.28rem;
  padding: 0.65rem;
  overflow-y: auto;
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.14));
  border-radius: 12px;
  background: var(--theme-surface, #222220);
  box-shadow: var(--theme-shadow, 0 18px 50px rgba(0, 0, 0, 0.45));
}

.emoji-clipboard button {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
}

.emoji-clipboard button:hover,
.emoji-clipboard button:focus-visible {
  border-color: var(--theme-accent, var(--gold));
  background: var(--theme-accent-soft, rgba(199, 155, 66, 0.14));
  outline: 0;
}

@media (max-width: 520px) {
  .emoji-clipboard {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
