/* Flow Web — estilos de settings (instalación, acceso, asistente, perfil, preferencias, respaldo, usuario) */

/* --- Pantallas de acceso (install / login / setup) ------------------------- */
.auth-card.auth-card-wide {
  width: min(560px, 100%);
}
.auth-brand h1 {
  font-size: 1.6rem;
  line-height: 1.2;
}
.auth-title {
  font-size: 1.35rem;
  line-height: 1.25;
}
.auth-lead {
  color: var(--semi);
}
.auth-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--semi);
  font-size: 0.8rem;
}
.auth-footer a {
  color: var(--primary);
}
.auth-footer a:hover {
  text-decoration: underline;
}
.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: var(--semi);
}
.link-btn {
  color: var(--primary);
  font-weight: 500;
  font-size: inherit;
}
.link-btn:hover {
  text-decoration: underline;
}
.lang-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--semi);
  font-size: 0.85rem;
}
.lang-select select {
  width: auto;
  min-height: 36px;
  padding-block: 4px;
  font-size: 0.85rem;
}
.form-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 4px;
}
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tarjetas de elección (base de datos, inicio del asistente) */
.choice-list {
  display: grid;
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
  text-align: start;
  box-shadow: inset 0 0 0 2px transparent;
  transition: background 0.12s, box-shadow 0.12s;
}
.choice:hover:not(:disabled) {
  background: var(--card-hover);
}
.choice.selected {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.choice:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.choice > .msr {
  flex: none;
  color: var(--primary);
}
.choice-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.choice-title {
  font-weight: 600;
}
.choice-subtitle {
  color: var(--semi);
  font-size: 0.85rem;
}

/* --- Asistente inicial ------------------------------------------------------ */
.setup-steps {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.setup-steps span {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.setup-steps span.done {
  background: var(--primary);
}
.setup-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.setup-account {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 0 0 2px transparent;
}
.setup-account.selected {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.setup-account-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 180px;
  min-width: 0;
  text-align: start;
}
.setup-account-toggle > .msr {
  color: var(--primary);
}
.setup-account .field {
  flex: 1 1 140px;
}
.setup-currency {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  text-align: start;
}
.setup-currency:hover {
  background: var(--card-hover);
}
.setup-currency-code {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.setup-chips .chip {
  min-height: 38px;
}

/* Resumen de un respaldo */
.summary-list {
  display: grid;
  gap: 2px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.summary-row:last-child {
  border-bottom: 0;
}
.summary-row strong {
  font-variant-numeric: tabular-nums;
}

/* --- Perfil ----------------------------------------------------------------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
}
.profile-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
}
.profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--semi);
  font-size: 0.8rem;
}
.profile-footer a {
  color: var(--primary);
}

/* --- Preferencias ----------------------------------------------------------- */
.pref-row {
  flex-wrap: wrap;
}
.pref-row .tile-body {
  flex: 1 1 180px;
}
.pref-row .tile-title,
.pref-row .tile-subtitle {
  white-space: normal;
}
.pref-row select.input {
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
}
.pref-row .segmented {
  flex: 0 1 auto;
}

/* --- Selector de tema ------------------------------------------------------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 12px;
}
.theme-swatch {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.theme-swatch:hover {
  outline-color: var(--line);
}
.theme-swatch.selected {
  outline-color: var(--primary);
}
.theme-swatch-dot {
  display: grid;
  place-items: center;
  width: 58%;
  height: 58%;
  border-radius: 50%;
}
.theme-swatch-dot .msr {
  font-size: 18px;
}

/* --- Respaldo y usuario ----------------------------------------------------- */
.section-note {
  color: var(--semi);
  font-size: 0.88rem;
}
.danger-zone {
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--expense) 45%, transparent);
}
.sheet-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Filas cuyo texto puede ocupar varias líneas */
.tile-wrap .tile-title,
.tile-wrap .tile-subtitle {
  white-space: normal;
}
