/* Studio web. Keep the Orbit palette and the training canvas. */
:root {
  --studio-entry: #1a171f;
  --studio-entry-ink: #f9f2f6;
  --studio-entry-muted: #c9b9c6;
  --studio-halo: #ff8fbd25;
  --studio-field: #242129;
  --studio-error: #ffb0c9;
  --studio-error-bg: #432437;
}

:root[data-theme="orbit-light"] {
  --studio-entry: #f8e9f0;
  --studio-entry-ink: #3b2634;
  --studio-entry-muted: #6b4d60;
  --studio-halo: #d64a8b22;
  --studio-field: #f5edf3;
  --studio-error: #8e204b;
  --studio-error-bg: #fae4ee;
}

.studio-theme-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line, #493643);
  border-radius: 50%;
  background: var(--surface, var(--studio-field));
  color: var(--ink, var(--studio-entry-ink));
}

.studio-theme-button:hover {
  background: var(--soft, var(--studio-halo));
}

.studio-theme-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.studio-entry-actions {
  display: flex;
  justify-content: flex-end;
  width: min(100%, 1100px);
  margin: 0 auto 12px;
}

.login-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: min(680px, calc(100dvh - 140px));
}

.login-story {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 67% 39%, var(--studio-halo), transparent 58%),
    var(--studio-entry);
  color: var(--studio-entry-ink);
}

.login-story :is(.brand, .login-copy h1) {
  color: var(--studio-entry-ink);
}

.login-story :is(.login-copy p, .login-foot, .brand small) {
  color: var(--studio-entry-muted);
}

.login-story .chips span {
  background: color-mix(in srgb, var(--studio-entry-ink) 7%, transparent);
  border-color: color-mix(in srgb, var(--studio-entry-ink) 17%, transparent);
  color: var(--studio-entry-muted);
}

.login-story .orbit-art i {
  border-color: color-mix(in srgb, var(--studio-entry-ink) 19%, transparent);
}

.login-form {
  min-width: 0;
  padding: clamp(25px, 4.8vw, 54px);
}

.login-form input {
  min-height: 49px;
  background: var(--studio-field);
  color: var(--ink);
  border-color: var(--line);
  font-size: 16px;
}

.login-form .notice.error,
.auth-shell :is(.error, .errorlist) {
  background: var(--studio-error-bg);
  color: var(--studio-error);
}

.workspace, .workspace > main, .topbar, .page-heading > *, .orbit-dashboard > * {
  min-width: 0;
}

.topbar {
  align-items: center;
}

.top-actions {
  flex-shrink: 0;
  gap: 6px;
}

.top-wordmark {
  min-width: 0;
}

.today-cover {
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 89% -5%, var(--studio-halo), transparent 67%),
    var(--studio-entry);
  color: var(--studio-entry-ink);
}

.today-cover :is(h1, .orbit-greeting) {
  color: var(--studio-entry-ink);
}

.today-cover > p {
  color: var(--studio-entry-muted);
}

.today-cover .avatar {
  background: var(--soft);
  color: var(--accent);
}

.orbit-week a,
.interval-config > label,
.interval-config input,
.card,
.timeline-next > div {
  min-width: 0;
}

.timeline-next strong,
.page-heading h1 {
  overflow-wrap: anywhere;
}

.interval-config {
  align-items: stretch;
}

.interval-config > label {
  grid-template-rows: auto 1fr auto;
  align-content: start;
}

.interval-config input {
  align-self: end;
  background: var(--studio-field);
  border-color: var(--line);
  color: var(--ink);
}

.interval-stage {
  background: var(--surface);
  color: var(--ink);
}

.security-codes {
  background: var(--studio-field);
  color: var(--ink);
}

.auth-body {
  background: var(--studio-entry);
  color: var(--studio-entry-ink);
  --ink: var(--studio-entry-ink);
  --line: color-mix(in srgb, var(--studio-entry-ink) 23%, transparent);
  color-scheme: dark;
}

[data-theme="orbit-light"] .auth-body {
  color-scheme: light;
}

.auth-shell .studio-entry-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.auth-shell .studio-theme-button {
  display: inline-grid;
  margin: 0;
  padding: 0;
  width: 42px;
  height: 42px;
  background: var(--studio-field);
  color: var(--studio-entry-ink);
  border-radius: 50%;
}

.auth-shell :is(input, .auth-codes) {
  background: var(--studio-field);
  border-color: var(--line);
  color: var(--studio-entry-ink);
}

.auth-shell :is(footer, .auth-help) {
  color: var(--studio-entry-muted);
}

.auth-shell :is(button:not(.studio-theme-button, .link-button), .auth-button) {
  background: var(--studio-entry-ink);
  color: var(--studio-entry);
}

@media (max-width: 740px) {
  .login-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .studio-entry-actions {
    margin-bottom: 9px;
  }

  .login-story {
    padding: 24px;
  }
}

@media (max-width: 700px) {
  .top-actions {
    gap: 3px;
  }

  .top-actions .studio-theme-button {
    width: 38px;
    height: 38px;
  }

  .mobile-bottom {
    padding-inline: max(10px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    border-color: var(--line);
  }
}

@media (max-width: 560px) {
  body[data-page="users"] .tabs {
    width: 100%;
    flex-wrap: wrap;
  }

  body[data-page="users"] .tabs a {
    flex: 1;
    padding-inline: 8px;
    text-align: center;
  }

  body[data-page="users"] .table-wrap {
    margin-inline: 0;
  }

  body[data-page="users"] .table-wrap table,
  .security-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  body[data-page="users"] .table-wrap :is(th, td),
  .security-table :is(th, td) {
    padding-inline: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body[data-page="users"] .table-wrap th:first-child {
    width: 36%;
  }

  body[data-page="users"] .table-wrap .pill {
    padding-inline: 4px;
  }
}

@media (max-width: 360px) {
  .today-cover h1 {
    font-size: 2.45rem;
  }

  .orbit-week a {
    padding-inline: 5px;
  }
}
