/* ============================================================
   Settings + Appearance theme picker
   ============================================================ */

.settings {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: var(--geist-gap);
}

.settings.agent-prompt-settings {
  max-width: 72rem;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--geist-gap-half);
  padding: var(--geist-space-4x);
  background: var(--ds-background-100);
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
}

.settings-heading {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--ink);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--geist-gap);
}

.settings-admin-links {
  display: grid;
  overflow: hidden;
  background: var(--ds-background-100);
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
}

.settings-admin-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--geist-space-4x);
  min-height: 40px;
  padding: var(--geist-space-3x) var(--geist-space-4x);
  box-shadow: inset 0 -1px var(--ds-gray-400);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: background-color 0.15s cubic-bezier(.4, 0, .2, 1), box-shadow 0.15s cubic-bezier(.4, 0, .2, 1);
}

.settings-admin-link:last-child {
  box-shadow: none;
}

.settings-admin-link:hover {
  background: var(--surface-hover);
}

.settings-admin-link:focus-visible {
  position: relative;
  outline: none;
  box-shadow: var(--ds-focus-ring);
}

.settings-admin-link span {
  display: grid;
  gap: 2px;
}

.settings-admin-link small {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 18px;
}

.agent-prompt-textarea {
  min-height: 26rem;
  font-family: var(--font-mono);
}

/* Theme picker — hairline group of three flush option rows. */
.theme-options {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  max-width: 560px;
  overflow: hidden;
  background: var(--ds-background-100);
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: var(--geist-space-4x);
  padding: var(--geist-space-4x);
  box-shadow: inset 0 -1px var(--ds-gray-400);
  cursor: pointer;
  transition: background-color 0.15s cubic-bezier(.4, 0, .2, 1), box-shadow 0.15s cubic-bezier(.4, 0, .2, 1);
}

.theme-option:last-child { box-shadow: none; }
.theme-option:hover { background: var(--ds-gray-100); }
.theme-option:has(input:checked) { background: var(--ds-gray-100); }

.theme-option:has(input:focus-visible) {
  position: relative;
  outline: none;
  box-shadow: var(--ds-focus-ring);
}

.theme-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--ds-blue-700);
}

.theme-swatch {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--ds-background-100);
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
  color: var(--ink-muted);
}

.theme-swatch--dark { background: #000; color: #ededed; }
.theme-swatch--light { background: #fff; color: #171717; }
.theme-swatch--system {
  background: linear-gradient(135deg, #fff 0 49%, #000 51% 100%);
  color: var(--ink-muted);
}

.theme-option-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.theme-option-name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
}

.theme-option-desc {
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-subtle);
}

/* ============================================================
   Auth screens
   ============================================================ */

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--header-height));
  padding: var(--geist-gap);
  background: var(--ds-background-100);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: var(--geist-space-6x);
  background: var(--ds-background-100);
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
}

.auth-brand .brand {
  font-size: 18px;
}

.auth-form {
  display: grid;
  gap: var(--geist-space-4x);
  margin-top: var(--geist-space-6x);
}

.auth-microsoft {
  margin-top: var(--geist-space-6x);
}

.auth-divider {
  margin: var(--geist-space-4x) 0 calc(-1 * var(--geist-space-2x));
  color: var(--ds-gray-900);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-title {
  margin: var(--geist-space-6x) 0 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.auth-alert {
  margin-top: var(--geist-space-4x);
}

.auth-footer { margin-top: 16px; font-size: 13px; line-height: 18px; }
