/* ============================================================
   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: var(--text-md);
  line-height: 24px;
  font-weight: 600;
  color: var(--ink);
}

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

.settings-form .field > .badge { align-self: flex-start; }

.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: var(--text-base);
  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: var(--text-sm);
  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: var(--text-base);
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
}

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

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

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Signed-out pages have no topbar, so fill the whole viewport. */
  min-height: 100dvh;
  padding: var(--geist-gap);
  /* Plant photo from republicextrusions.com under a dark overlay. */
  background:
    linear-gradient(rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.72)),
    url("/assets/sign-in-background-41533f67.jpg") center / cover no-repeat,
    #111;
}

.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: flex;
  align-items: center;
  justify-content: center;
}

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

.auth-tagline {
  margin-top: var(--geist-space-2x);
  text-align: center;
}

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

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

.auth-help {
  margin: var(--geist-space-4x) 0 var(--geist-space-2x);
  color: var(--ds-gray-900);
  font-size: var(--text-sm);
  line-height: 18px;
  text-align: center;
}

.auth-support {
  margin-top: var(--geist-space-6x);
  color: var(--ds-gray-900);
}

.auth-support a { color: inherit; text-decoration: underline; }

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

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

.auth-footer { margin-top: 16px; font-size: var(--text-sm); line-height: 18px; }
