/* AS APP · 16 · Preferencias · limpio y theme-safe */
body.as-route-preferences .as-pref-page{
  width:min(100%,var(--as-app-mobile-width));
  max-width:var(--as-app-mobile-width);
  min-height:100dvh;
  margin:0 auto;
  padding:var(--as-space-5) var(--as-space-4) 120px;
  box-sizing:border-box;
  background:var(--as-bg);
  color:var(--as-text);
  font-family:var(--as-font-ui);
}

body.as-route-preferences .as-pref-top{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
}

body.as-route-preferences .as-pref-back{
  width:40px;
  height:40px;
  min-width:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  border:1px solid var(--as-border);
  background:var(--as-surface-card);
  color:var(--as-text);
  text-decoration:none;
  font-size:var(--as-size-section-title);
  line-height:1;
}

body.as-route-preferences .as-pref-heading{min-width:0;flex:1}
body.as-route-preferences .as-pref-kicker{
  margin-bottom:6px;
  color:var(--as-gold);
  font-size:var(--as-size-kicker);
  line-height:1.1;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
body.as-route-preferences .as-pref-heading h1{
  margin:0!important;
  color:var(--as-text)!important;
  font-family:var(--as-font-title)!important;
  font-size:var(--as-size-page-title)!important;
  line-height:var(--as-line-title)!important;
  font-weight:var(--as-weight-title)!important;
  letter-spacing:-.025em!important;
}
body.as-route-preferences .as-pref-heading p{
  margin:0!important;
  color:var(--as-text-muted)!important;
  font-size:var(--as-size-body)!important;
  line-height:1.45!important;
}
body.as-route-preferences .as-pref-autosave-note{
  margin-top:9px;
  color:var(--as-text-soft);
  font-size:var(--as-size-meta);
}

body.as-route-preferences .as-pref-settings-list{display:grid;gap:var(--as-space-3)}

body.as-route-preferences .as-pref-setting-card{
  overflow:hidden;
  padding:var(--as-space-4);
  box-sizing:border-box;
  border:1px solid var(--as-border);
  border-radius:var(--as-radius-lg);
  background:var(--as-surface-card);
  color:var(--as-text);
  box-shadow:var(--as-shadow-card);
}

body.as-route-preferences .as-pref-setting-head{
  display:flex;
  align-items:center;
  gap:var(--as-space-3);
  margin-bottom:14px;
}
body.as-route-preferences .as-pref-setting-head>div:last-child{min-width:0;flex:1}
body.as-route-preferences .as-pref-setting-icon{
  width:44px;
  height:44px;
  min-width:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--as-gold-border);
  border-radius:13px;
  background:var(--as-gold-surface);
  color:var(--as-gold);
  font-size:var(--as-size-subheading);
  line-height:1;
  font-weight:800;
}
body.as-route-preferences .as-pref-setting-head h2{
  margin:1px 0 var(--as-space-1)!important;
  color:var(--as-text)!important;
  font-family:var(--as-font-title)!important;
  font-size:var(--as-size-card-title)!important;
  line-height:1.15!important;
  font-weight:500!important;
}
body.as-route-preferences .as-pref-setting-head p{
  margin:0!important;
  color:var(--as-text-soft)!important;
  font-size:var(--as-size-small)!important;
  line-height:1.45!important;
}

body.as-route-preferences .as-pref-setting-control{display:grid;gap:7px}
body.as-route-preferences .as-pref-setting-control label{
  color:var(--as-text-muted)!important;
  font-size:var(--as-size-small)!important;
  font-weight:700!important;
}
body.as-route-preferences .as-pref-setting-control select{
  width:100%;
  min-height:46px;
  padding:0 var(--as-space-3);
  box-sizing:border-box;
  border:1px solid var(--as-border-input)!important;
  border-radius:12px!important;
  background:var(--as-surface-input)!important;
  color:var(--as-text)!important;
  font-size:var(--as-size-ui)!important;
}
body.as-route-preferences .as-pref-setting-control select:disabled{
  opacity:1!important;
  color:var(--as-text-muted)!important;
  -webkit-text-fill-color:var(--as-text-muted)!important;
}

body.as-route-preferences .as-pref-segmented{
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  width:100%!important;
  padding:var(--as-space-1)!important;
  box-sizing:border-box!important;
  border:1px solid var(--as-border)!important;
  border-radius:var(--as-radius-md)!important;
  background:var(--as-surface-2)!important;
  opacity:1!important;
}
body.as-route-preferences .as-pref-segmented button{
  flex:1 1 0!important;
  min-width:0!important;
  width:auto!important;
  min-height:42px!important;
  margin:0!important;
  padding:0 7px!important;
  box-sizing:border-box!important;
  border:0!important;
  border-radius:var(--as-radius-sm)!important;
  background:transparent!important;
  color:var(--as-text-muted)!important;
  font-size:var(--as-size-small)!important;
  line-height:1!important;
  font-weight:750!important;
  white-space:nowrap!important;
  opacity:1!important;
}
body.as-route-preferences .as-pref-segmented button.is-selected{
  background:var(--as-gold)!important;
  color:var(--as-text-inverse)!important;
  box-shadow:0 3px 10px var(--as-palette-rgba-0-0-0-0p12)!important;
}
body.as-route-preferences .as-pref-segmented button:disabled{
  cursor:default!important;
  -webkit-text-fill-color:currentColor!important;
}
body.as-route-preferences .as-pref-disabled-control{opacity:1!important}

body.as-route-preferences .as-pref-option-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:58px;
  padding:13px 0;
  border-top:1px solid var(--as-border-soft);
}
body.as-route-preferences .as-pref-option-row:first-of-type{border-top:0}
body.as-route-preferences .as-pref-option-row>div{min-width:0;padding-right:var(--as-space-1)}
body.as-route-preferences .as-pref-option-row strong{
  display:block;
  margin-bottom:var(--as-space-1);
  color:var(--as-text)!important;
  font-size:var(--as-size-body)!important;
  line-height:1.25;
}
body.as-route-preferences .as-pref-option-row span{
  display:block;
  color:var(--as-text-muted)!important;
  font-size:11.5px!important;
  line-height:1.4;
}

body.as-route-preferences .as-pref-switch{
  position:relative;
  display:inline-flex;
  flex:0 0 46px;
  width:46px;
  height:26px;
}
body.as-route-preferences .as-pref-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
body.as-route-preferences .as-pref-switch>span{
  position:absolute;
  inset:0;
  border:1px solid var(--as-border-control);
  border-radius:var(--as-radius-round);
  background:var(--as-surface-control);
}
body.as-route-preferences .as-pref-switch>span:before{
  content:"";
  position:absolute;
  width:20px;
  height:20px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:var(--as-text-soft);
}
body.as-route-preferences .as-pref-switch input:checked + span{
  background:var(--as-gold-surface-3);
  border-color:var(--as-gold-border-strong);
}
body.as-route-preferences .as-pref-switch input:checked + span:before{
  left:22px;
  background:var(--as-gold);
}

body.as-route-preferences .as-pref-pending{
  display:inline-block;
  margin-top:9px!important;
  padding:5px var(--as-space-2)!important;
  border:1px solid var(--as-gold-border)!important;
  border-radius:var(--as-radius-round)!important;
  background:var(--as-gold-surface)!important;
  color:var(--as-gold-muted)!important;
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:700!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
}

body.as-route-preferences .as-pref-local-button{
  width:100%;
  min-height:46px;
  border:1px solid var(--as-border-input);
  border-radius:12px;
  background:var(--as-surface-input);
  color:var(--as-text-dim);
  font-size:var(--as-size-body);
  font-weight:750;
}
body.as-route-preferences .as-pref-local-button:disabled{opacity:1!important}

body.as-route-preferences .as-pref-privacy-link{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  border:1px solid var(--as-border);
  border-radius:12px;
  background:var(--as-surface-2);
  color:var(--as-text)!important;
  text-decoration:none!important;
  font-weight:750;
}

body.as-route-preferences .as-pref-security-live>.as-pref-fold{
  display:block!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
body.as-route-preferences .as-pref-security-live>.as-pref-fold>summary{display:none!important}
body.as-route-preferences .as-pref-security-live .as-pref-fold-body{padding:0!important;background:transparent!important}
body.as-route-preferences .as-pref-security-live .as-app-section-label,
body.as-route-preferences .as-pref-security-live .as-pref-fold-body>h2{display:none!important}
body.as-route-preferences .as-pref-security-live .as-pref-fold-body>details,
body.as-route-preferences .as-pref-security-live .as-app-card{
  margin:0!important;
  padding:14px!important;
  border:1px solid var(--as-border)!important;
  border-radius:var(--as-radius-md)!important;
  background:var(--as-surface-2)!important;
  color:var(--as-text)!important;
}
body.as-route-preferences .as-pref-security-live .as-security-toggle{
  color:var(--as-gold)!important;
  font-size:var(--as-size-small)!important;
  font-weight:800!important;
}
body.as-route-preferences .as-pref-security-live form{
  display:grid!important;
  gap:10px!important;
  margin-top:var(--as-space-3)!important;
}
body.as-route-preferences .as-pref-security-live input[type="password"]{
  width:100%!important;
  min-height:46px!important;
  box-sizing:border-box!important;
  padding:var(--as-space-3) 46px var(--as-space-3) 13px!important;
  border:1px solid var(--as-border-input)!important;
  border-radius:12px!important;
  background:var(--as-surface-input)!important;
  color:var(--as-text)!important;
}
body.as-route-preferences .as-pref-security-live button[type="submit"]{
  width:100%!important;
  min-height:48px!important;
  border:0!important;
  border-radius:13px!important;
  background:var(--as-gold)!important;
  color:var(--as-text-inverse)!important;
  font-weight:800!important;
}

body.as-route-preferences .as-pref-danger-zone{
  margin-top:14px!important;
  margin-bottom:18px!important;
  padding-top:14px!important;
  border-top:1px solid var(--as-border-soft)!important;
}
body.as-route-preferences .as-pref-danger-copy strong{
  display:block;
  margin-bottom:var(--as-space-1);
  color:var(--as-text)!important;
  font-size:var(--as-size-body)!important;
}
body.as-route-preferences .as-pref-danger-copy span{
  display:block;
  margin-bottom:10px;
  color:var(--as-text-soft)!important;
  font-size:11.5px!important;
  line-height:1.4;
}
body.as-route-preferences .as-pref-danger-zone :is(button,input[type="submit"]){
  display:block!important;
  position:static!important;
  width:100%!important;
  min-height:48px!important;
  margin:0!important;
  padding:var(--as-space-3) 14px!important;
  box-sizing:border-box!important;
  border:1px solid var(--as-danger)!important;
  border-radius:12px!important;
  background:var(--as-danger-bg)!important;
  color:var(--as-danger-text)!important;
  font-size:var(--as-size-body)!important;
  font-weight:800!important;
  line-height:1.2!important;
  box-shadow:none!important;
}

body.as-route-preferences .as-password-wrap{position:relative!important;width:100%!important}
body.as-route-preferences .as-password-wrap input{padding-right:46px!important}
body.as-route-preferences .as-password-eye{
  position:absolute!important;
  right:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:32px!important;
  height:32px!important;
  min-height:32px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--as-text-muted)!important;
  font-size:var(--as-size-subheading)!important;
  line-height:1!important;
  cursor:pointer!important;
}

@media(max-width:380px){
  body.as-route-preferences .as-pref-segmented button{
    font-size:var(--as-size-meta)!important;
    padding:0 var(--as-space-1)!important;
  }
}


/* 2.3.5 · PREFERENCIAS · cabecera limpia */
body.as-route-preferences .as-pref-top{
  align-items:center!important;
}

body.as-route-preferences .as-pref-heading{
  display:flex!important;
  align-items:center!important;
  min-height:40px!important;
}

body.as-route-preferences .as-pref-heading h1{
  margin:0!important;
  font-size:var(--as-size-page-title)!important;
  line-height:1!important;
}


/* 2.3.8 · Preferencias · alineación exacta */
body.as-route-preferences .as-pref-top{
  display:grid!important;
  grid-template-columns:40px minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:var(--as-space-3)!important;
}
body.as-route-preferences .as-pref-back{
  align-self:center!important;
  justify-self:start!important;
}
body.as-route-preferences .as-pref-heading{
  height:40px!important;
  min-height:40px!important;
  display:flex!important;
  align-items:center!important;
}
body.as-route-preferences .as-pref-heading h1{
  margin:0!important;
  padding:0!important;
  line-height:40px!important;
}


/* 2.3.43 · Preferencias esenciales y correcciones de ancho */
body.as-route-preferences .as-pref-security-live,
body.as-route-preferences .as-pref-security-live .as-pref-fold-body,
body.as-route-preferences .as-pref-security-live details,
body.as-route-preferences .as-pref-security-live form,
body.as-route-preferences .as-pref-security-live .as-password-wrap,
body.as-route-preferences .as-pref-security-live input,
body.as-route-preferences .as-pref-security-live button[type="submit"]{
  max-width:100%!important;
  box-sizing:border-box!important;
}
body.as-route-preferences .as-pref-security-live button[type="submit"]{
  display:block!important;
  margin:0 auto!important;
  width:100%!important;
}
body.as-route-preferences .as-delete-account-box{margin:0!important;padding:0!important;border:0!important}
body.as-route-preferences .as-delete-account-title strong{display:block!important;margin-bottom:6px!important;font-size:var(--as-size-option-title)!important;line-height:1.25!important;color:var(--as-text)!important}
body.as-route-preferences .as-delete-account-copy{margin-bottom:var(--as-space-3)!important;color:var(--as-text-soft)!important;font-size:var(--as-size-small)!important;line-height:1.5!important}
