/* ==========================================================================
   BULLDER · settings — ajustes de la cuenta y de la app.
   Prefijo: st-
   ========================================================================== */

.st-block { display: block; }
.st-index, .st-main { display: flex; flex-direction: column; gap: var(--sp-5); }
.st-index { max-width: 640px; margin: 0 auto; }
.st-layout { display: block; }
.st-side { display: none; }
.st-main { max-width: 640px; margin: 0 auto; }

/* grupos de lista */
.st-group { display: flex; flex-direction: column; }
.st-group-title { margin: 0 0 10px 4px; }
.st-group-note { margin: 10px 4px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.st-row { min-height: 62px; cursor: pointer; }
div.st-row { cursor: default; }
.st-row .li-title { display: block; }
.st-row .li-sub { line-height: 1.35; }
.st-val { font-size: 14px; font-weight: 600; color: var(--text-2); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.st-val.is-empty { color: var(--text-3); font-weight: 500; }
.st-nav.is-active { background: var(--accent-soft); }
.st-nav.is-active .li-title { color: var(--accent); }
.st-lead { color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.st-foot-note { font-size: 12.5px; line-height: 1.5; color: var(--text-3); text-align: center; padding: 0 var(--sp-3); }
.st-version { text-align: center; font-size: 12px; color: var(--text-3); letter-spacing: .02em; }
.st-logout { margin-top: 4px; }
.st-quiet { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14.5px; }
.st-quiet .ic { color: var(--ok); }

/* tarjeta de la persona */
.st-me { display: flex; align-items: center; gap: 14px; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .12s var(--ease); min-width: 0; }
.st-me:hover { border-color: var(--line-strong); }
.st-me:active { transform: scale(.985); }
.st-me.is-active { border-color: var(--accent); }
.st-me b { font: 700 18px/1.25 var(--font-display); }
.st-me-edit { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }

/* más / menos */
.st-stepper { display: flex; align-items: center; gap: 2px; flex: none; margin-right: -6px; }
.st-stepper b { min-width: 46px; text-align: center; font: 700 16px/1 var(--font-display); }
.st-stepper .icon-btn { width: 40px; height: 40px; background: var(--surface-2); }
.st-stepper .icon-btn:hover { background: var(--surface-3); }
.st-stepper .icon-btn .ic { width: 18px; height: 18px; }

/* apariencia */
.st-seg-card { display: flex; flex-direction: column; gap: var(--sp-4); }
.st-seg-row { display: flex; flex-direction: column; gap: 8px; }
.st-seg-row .segmented { background: var(--surface-2); border-color: transparent; }
.st-seg-row .segmented button { min-height: 40px; }

/* perfil: foto */
.st-photo { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 2px; }
.st-photo-btn { position: relative; border-radius: 50%; transition: transform .12s var(--ease); }
.st-photo-btn:active { transform: scale(.96); }
.st-photo-btn .avatar { width: 112px; height: 112px; font-size: 40px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5.5px var(--line-strong); }
.st-photo-cam { position: absolute; right: 0; bottom: 2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3.5px var(--bg); }
.st-photo-btn.is-busy { pointer-events: none; }
.st-photo-btn.is-busy .avatar { opacity: .45; }
.st-photo-btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.st-photo-actions { display: flex; gap: 8px; }
.st-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.st-savebar { position: sticky; bottom: 0; z-index: 4; margin: 4px calc(var(--sp-4) * -1) 0; padding: var(--sp-3) var(--sp-4) calc(var(--safe-b) + var(--sp-3)); background: linear-gradient(to top, var(--bg) 70%, transparent); }

/* recorte de la foto */
.st-crop { position: relative; width: min(100%, 340px); aspect-ratio: 1 / 1; margin: 6px auto 0; border-radius: var(--r); overflow: hidden; background: var(--surface-2); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.st-crop:active { cursor: grabbing; }
.st-crop-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.st-crop-ring { position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(4, 5, 14, .58); outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -2px; }
.st-zoom { display: flex; align-items: center; gap: 6px; width: min(100%, 340px); margin: 14px auto 8px; }
.st-range { flex: 1; min-width: 0; height: 32px; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.st-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.st-range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.st-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-elev); box-shadow: var(--shadow-sm); }
.st-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-elev); box-shadow: var(--shadow-sm); }

/* formularios en hoja */
.st-sheet-form { display: flex; flex-direction: column; gap: var(--sp-4); padding-bottom: var(--sp-2); }
.st-sheet-form .btn-lg { margin-top: 4px; }

/* dispositivos */
.st-session { align-items: center; }
.st-session .badge { flex: none; }

/* tus datos */
.st-card { display: flex; align-items: flex-start; gap: var(--sp-4); padding: var(--sp-5) var(--sp-4); }
.st-card-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.st-danger { border-color: color-mix(in srgb, var(--danger) 34%, transparent); }
.st-danger .st-card-ic { background: var(--danger-soft); color: var(--danger); }

/* acerca de */
.st-about-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: var(--sp-4) 0 var(--sp-2); }
.st-about-head p { max-width: 320px; }
.st-install { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.st-install .btn { flex: none; }
.st-steps-grid { display: grid; gap: var(--sp-4); }
.st-steps h4 { font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.st-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 10px; }
.st-steps li { counter-increment: st; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.st-steps li::before { content: counter(st); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font: 700 12.5px/1 var(--font); flex: none; }
.st-steps li b { color: var(--text); font-weight: 650; }
.st-steps li .ic { display: inline-block; vertical-align: -3px; margin: 0 1px; color: var(--text); }

/* ------------------------------------------------------------------ escritorio: lista a la izquierda, contenido a la derecha */
@media (min-width: 960px) {
  .st-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
  .st-side { display: flex; flex-direction: column; gap: var(--sp-4); position: sticky; top: calc(var(--topbar-h) + var(--sp-4)); }
  .st-side .st-row { min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
  .st-side .st-me { padding: 14px; border-radius: var(--r); }
  .st-side .st-me .avatar { width: 52px; height: 52px; font-size: 20px; }
  .st-side .st-me b { font-size: 16px; }
  .st-side .st-group-title { margin-bottom: 8px; }
  .st-main { margin: 0; max-width: 620px; width: 100%; }
  .st-val { max-width: 260px; }
  .st-savebar { position: static; margin: 4px 0 0; padding: 0; background: none; }
  .st-savebar .btn { width: auto; min-width: 220px; display: inline-flex; }
  .st-photo { flex-direction: row; gap: var(--sp-5); padding: var(--sp-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
  .st-photo-btn .avatar { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5.5px var(--line-strong); }
  .st-photo-cam { box-shadow: 0 0 0 3.5px var(--surface); }
  .st-steps-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .st-foot-note { text-align: left; padding: 0 4px; }
}

/* tema claro: el verde de marca no alcanza contraste AA como texto; los enlaces usan un tono más oscuro */
:root[data-theme="light"] .st-layout .link, :root[data-theme="light"] .st-index .link { color: color-mix(in srgb, var(--accent) 58%, #000); }
