/* =========================================================
   STELNET — tokens
   Herramienta de campo: alta legibilidad al sol, datos reales
   en monoespaciada, estado siempre visible por color.
   ========================================================= */
:root{
  --bg:        #F2F4FA;
  --surface:   #FFFFFF;
  --ink:       #12142B;
  --ink-soft:  #5C6178;
  --line:      #E1E3F0;

  --brand:       #2F6FED;
  --brand-deep:  #17399E;
  --brand-wash:  #E9EFFE;
  --brand-cyan:  #0AD8E0;
  --brand-magenta: #D51FD0;

  --amber:      #E8952E;
  --amber-wash: #FCEFDC;

  --ok:         #2F8F5B;
  --ok-wash:    #E5F4EC;
  --bad:        #C1462F;
  --bad-wash:   #FBEAE5;
  --unknown:    #9AA0B8;

  --topbar-grad: linear-gradient(120deg, #0A0F3D 0%, #170B4D 55%, #240A4F 100%);

  --chart-bajada: #1FAE6E;
  --chart-subida: #7C5CFC;
  --chart-grid:   #E4E6EE;
  --chart-text:   #8B90A3;
  --topo-line:    #C7CBD6;
  --switch-off:   #C7CBD6;
  --card-shadow:  0 1px 3px rgba(20,22,50,0.06);

  --sans: 'Manrope', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --radius: 10px;
  --topbar-h: 64px;
  --tabbar-h: 64px;
  --rail-w: 232px;
}

:root[data-theme="dark"]{
  --bg:        #0B0D17;
  --surface:   #171A28;
  --ink:       #EDEEF6;
  --ink-soft:  #9599B3;
  --line:      #2B2E42;

  --brand:       #5B8CFF;
  --brand-deep:  #8FB0FF;
  --brand-wash:  #1B2A4D;
  --brand-cyan:  #3FE6ED;
  --brand-magenta: #E863E3;

  --amber:      #F0AC55;
  --amber-wash: #3B2C16;

  --ok:         #4CC98A;
  --ok-wash:    #16301F;
  --bad:        #E37460;
  --bad-wash:   #3A1E1A;
  --unknown:    #767BA0;

  --chart-bajada: #37D18E;
  --chart-subida: #9C87FF;
  --chart-grid:   #262A40;
  --chart-text:   #8286A6;
  --topo-line:    #3C4160;
  --switch-off:   #3C4160;
  --card-shadow:  0 1px 3px rgba(0,0,0,0.35);
}

:root[data-theme="dark"] .factura-preview,
:root[data-theme="dark"] .perfil-box img{
  background: #fff;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]):not([data-theme="dark"]){
    --bg:        #0B0D17;
    --surface:   #171A28;
    --ink:       #EDEEF6;
    --ink-soft:  #9599B3;
    --line:      #2B2E42;
    --brand:       #5B8CFF;
    --brand-deep:  #8FB0FF;
    --brand-wash:  #1B2A4D;
    --brand-cyan:  #3FE6ED;
    --brand-magenta: #E863E3;
    --amber:      #F0AC55;
    --amber-wash: #3B2C16;
    --ok:         #4CC98A;
    --ok-wash:    #16301F;
    --bad:        #E37460;
    --bad-wash:   #3A1E1A;
    --unknown:    #767BA0;
    --chart-bajada: #37D18E;
    --chart-subida: #9C87FF;
    --chart-grid:   #262A40;
    --chart-text:   #8286A6;
    --topo-line:    #3C4160;
    --switch-off:   #3C4160;
    --card-shadow:  0 1px 3px rgba(0,0,0,0.35);
  }
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button{ font-family: inherit; }
::selection{ background: var(--brand); color:#fff; }

/* ---------- layout shell ---------- */
.app-shell{
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: var(--topbar-h) 1fr var(--tabbar-h);
  grid-template-areas:
    "top"
    "main"
    "tabs";
}
@media (min-width: 900px){
  .app-shell{
    grid-template-columns: var(--rail-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas:
      "top  top"
      "rail main";
  }
}

/* ---------- topbar ---------- */
.topbar{
  grid-area: top;
  background: var(--topbar-grad);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 18px;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(58px + env(safe-area-inset-top, 0px));
  position: sticky; top:0; z-index: 40;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark-img{ height:30px; width:30px; object-fit:contain; flex-shrink:0; display:block; }
.brand-text{ display:flex; flex-direction:column; justify-content:center; gap:3px; line-height:1; }
.brand-name-img{ height:16px; width:auto; display:block; }
.brand-sub{ font-size:11px; color:rgba(255,255,255,0.62); font-weight:500; }
.topbar-status{
  display:flex; align-items:center; gap:6px;
  font-size:12px; font-weight:600; color:rgba(255,255,255,0.85);
}
.topbar-status .sep{ color:rgba(255,255,255,0.35); margin:0 2px; }
.logout-btn{
  margin-left: 10px;
  font-family: var(--sans); font-size: 11.5px; font-weight:700;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
}
.logout-btn:hover{ background: rgba(255,255,255,0.18); color:#fff; }
.theme-toggle-btn{
  background: rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.18);
  color:#fff; border-radius:8px; width:32px; height:32px; font-size:15px;
  cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  padding:0;
}
.theme-toggle-btn:hover{ background: rgba(255,255,255,0.18); }
@media (max-width: 480px){
  .topbar-status span:not(.dot){ display:none; }
  .topbar-status{ gap:8px; }
}
.dot{ width:7px; height:7px; border-radius:50%; display:inline-block; }
.dot-ok{ background:#4CD08A; }
.dot-bad{ background:#F1786A; }
.dot-unknown{ background:rgba(255,255,255,0.4); }

/* ---------- rail (desktop) ---------- */
.rail{
  grid-area: rail;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display:flex;
  flex-direction: column;
  gap: 2px;
}
.rail-group-label{
  font-size:11px;
  font-weight:700;
  color: var(--ink-soft);
  padding: 16px 12px 6px;
}
.rail-item{
  display:flex; align-items:center; gap:12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  border:none; background:none; text-align:left; width:100%;
}
.rail-item svg{ width:18px; height:18px; flex-shrink:0; }
.rail-item:hover{ background: var(--bg); color: var(--ink); }
.rail-item.active{ background: var(--brand-wash); color: var(--brand-deep); }
.rail-item .soon{
  margin-left:auto;
  font-size:9.5px;
  font-weight:700;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}
.nav-badge-count{
  margin-left:auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--bad);
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.nav-badge-count.nav-badge-ok{ background: var(--ok); }

.topo-tree{ font-size: 13.5px; }
.topo-item{ padding: 6px 0; }
.topo-rama{ padding-left: 22px; border-left: 2px dashed var(--line); margin-left: 6px; }
.topo-hoja{ font-size: 12.5px; color: var(--ink-soft); }

/* ---------- tabla de inventario ---------- */
.inv-wrap{ overflow-x: auto; margin-bottom: 18px; }
.inv-table{ width:100%; border-collapse:collapse; font-size:12px; min-width: 480px; }
.inv-table th{ text-align:left; font-size:10.5px; font-weight:700; color:var(--ink-soft); padding:6px 7px; border-bottom:1px solid var(--ink); white-space:nowrap; }
.inv-table td{ padding:5px 7px; border-bottom:1px solid var(--line); vertical-align:middle; }
.inv-table input{ width:100%; font-family:var(--sans); font-size:12px; padding:4px 5px; border:1px solid var(--line); border-radius:4px; background:var(--bg); color:var(--ink); box-sizing:border-box; }
.inv-table input.inv-mono{ font-family:var(--mono); }
.inv-table td.inv-static{ font-family:var(--mono); white-space:nowrap; }
.inv-divider td{ border-top:3px solid var(--ink); padding:0; height:0; }
.inv-total-row td{ font-weight:700; border-top:2px solid var(--ink); font-family:var(--mono); }
.inv-del-btn{ border:none; background:none; color:var(--bad); font-weight:700; cursor:pointer; font-size:14px; padding:2px 6px; }
.inv-add-row input{ min-width: 70px; }
.inv-add-row td{ background: var(--bg); }
.inv-total-general{
  display:flex; justify-content:space-between; align-items:center;
  background: var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:14px 16px; font-weight:700; font-size:14px; margin-top:6px;
}
.inv-total-general b{ font-family: var(--mono); color: var(--brand-deep); font-size:16px; }

/* ---------- tabbar (phone) ---------- */
.tabbar{
  grid-area: tabs;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display:flex;
  position: sticky; bottom:0; z-index:40;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item{
  flex:1;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding: 9px 4px 8px;
  border:none; background:none;
  color: var(--ink-soft);
  font-size:10.5px;
  font-weight:700;
}
.tab-item svg{ width:21px; height:21px; }
.tab-item.active{ color: var(--brand-deep); }

/* ---------- visibilidad responsive rail / tabbar ---------- */
.rail{ display:none; }
@media (min-width: 900px){
  .rail{ display:flex; }
  .tabbar{ display:none; }
}

/* ---------- content ---------- */
.content{
  grid-area: main;
  padding: 18px 16px 28px;
  overflow-y: auto;
}
@media (min-width: 900px){
  .content{ padding: 28px 32px 40px; max-width: 900px; }
}

.section-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.section-head h1{
  font-size: 20px;
  margin: 0;
  font-weight: 800;
}
.section-head .count{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------- search ---------- */
.search-row{
  display:flex; gap:8px;
  margin-bottom: 16px;
}
.search-box{
  flex:1;
  display:flex; align-items:center; gap:8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
}
.search-box svg{ width:16px; height:16px; color: var(--ink-soft); flex-shrink:0; }
.search-box input{
  border:none; outline:none; background:none;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  width:100%;
}
.filter-chip{
  display:flex; align-items:center; gap:6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13px;
  font-weight:700;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- client card ---------- */
.client-list{ display:flex; flex-direction:column; gap:10px; }
.client-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--unknown);
  border-radius: var(--radius);
  padding: 13px 14px;
}
.client-card.is-activo{ border-left-color: var(--ok); }
.client-card.is-suspendido{ border-left-color: var(--bad); }
.client-card.is-adeudo{ border-left-color: var(--amber); }

.client-top{
  display:flex; justify-content: space-between; align-items:flex-start; gap:10px;
  margin-bottom: 8px;
}
.client-name{ font-weight:800; font-size:15px; }
.client-name-site{ font-family: var(--mono); font-weight:600; font-size:12px; color: var(--ink-soft); }
.client-sub{ font-size:12.5px; color: var(--ink-soft); margin-top:1px; }
.status-pill{
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill.is-activo{ background: var(--ok-wash); color: var(--ok); }
.status-pill.is-suspendido{ background: var(--bad-wash); color: var(--bad); }
.status-pill.is-adeudo{ background: var(--amber-wash); color: var(--amber); }
.status-pill.is-desconocido{ background: var(--bg); color: var(--unknown); }

.client-meta{
  display:flex; flex-wrap:wrap; gap: 6px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 11px;
}
.client-meta b{ color: var(--ink); font-weight:600; }
.tel-link{ text-decoration: underline; text-underline-offset: 2px; cursor: pointer; color: var(--brand-deep); }

.client-actions{ display:flex; gap:7px; }
.btn{
  flex:1;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align:center;
  cursor:pointer;
}
.btn.btn-primary{ background: var(--brand); border-color: var(--brand); color:#fff; }
.btn.btn-danger{ color: var(--bad); border-color: var(--bad-wash); }
.btn.btn-ok{ color: var(--ok); border-color: var(--ok-wash); }

/* ---------- placeholder (secciones sin backend aún) ---------- */
.placeholder{
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align:center;
  color: var(--ink-soft);
}
.placeholder .ph-icon{
  width:38px; height:38px;
  margin: 0 auto 14px;
  color: var(--unknown);
}
.placeholder h2{ font-size:15px; color:var(--ink); margin: 0 0 6px; }
.placeholder p{ font-size:13px; margin:0; max-width: 320px; margin: 0 auto; }

/* ---------- stat row (Inicio) ---------- */
.stat-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (min-width:560px){ .stat-grid{ grid-template-columns: repeat(4,1fr); } }
.stat-box{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
}
.stat-box .num{ font-family: var(--mono); font-size:22px; font-weight:700; color: var(--brand-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-box .label{ font-size:11.5px; color: var(--ink-soft); margin-top:3px; }

.site-grid{ display:grid; grid-template-columns: 1fr; gap:10px; margin-bottom: 18px; }
@media (min-width:640px){ .site-grid{ grid-template-columns: 1fr 1fr; } }
.site-box{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.site-box .site-name{ font-weight:800; font-size:14px; display:flex; align-items:center; gap:7px; }
.site-row{
  display:flex; justify-content:space-between; font-size:12.5px; color: var(--ink-soft);
  padding: 6px 0; border-top:1px solid var(--line);
}
.site-row:first-of-type{ border-top:none; margin-top:8px; }
.site-row b{ font-family: var(--mono); color: var(--ink); font-weight:600; }

/* ---------- comparación de consumo (hoy vs. semana) ---------- */
.consumo-compare{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-bottom:18px; }
.consumo-col{ background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:14px; }
.consumo-col-title{
  font-size:11px; font-weight:800; color:var(--ink-soft); text-transform:uppercase;
  letter-spacing:.04em; text-align:center; margin-bottom:10px; padding-bottom:8px;
  border-bottom:1px solid var(--line);
}
.consumo-stat{ display:flex; align-items:center; gap:8px; padding:5px 0; }
.consumo-stat .consumo-flecha{ font-size:14px; width:18px; text-align:center; flex-shrink:0; }
.consumo-stat .consumo-txt{ flex:1; min-width:0; }
.consumo-stat .consumo-lbl{ font-size:10.5px; color:var(--ink-soft); }
.consumo-stat .consumo-val{ font-family:var(--mono); font-weight:700; color:var(--ink); font-size:13px; }
.consumo-rank{ font-size:11.5px; padding:5px 0; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:6px; }
.consumo-rank:first-of-type{ border-top:none; }
.consumo-rank .nom{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.consumo-rank b{ font-family:var(--mono); color:var(--brand-deep); flex-shrink:0; }

/* ---------- gráfico de tráfico interactivo ---------- */
.grafico-wrap{ position:relative; width:100%; }
.grafico-svg{ width:100%; height:auto; display:block; touch-action: pan-y; }
.grafico-tooltip{
  position:absolute; top:6px; background: var(--ink); color:#fff;
  font-size:11px; padding:6px 9px; border-radius:6px; pointer-events:none;
  line-height:1.5; font-family: var(--mono); white-space:nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.grafico-tooltip b{ font-weight:700; }
.grafico-legend{ display:flex; gap:16px; justify-content:center; margin-top:6px; font-size:11.5px; color:var(--ink-soft); }
.grafico-legend i{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:5px; vertical-align:middle; }

/* ---------- switch de vista topología ---------- */
.topo-switch{ display:flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.topo-switch-btn{
  border:none; background:var(--surface); color:var(--ink-soft); font-family:var(--sans);
  font-size:11.5px; font-weight:700; padding:6px 12px; cursor:pointer;
}
.topo-switch-btn.activo{ background:var(--brand); color:#fff; }

/* ---------- sheet "Más" ---------- */
.sheet-overlay{
  position: fixed; inset:0; background: rgba(10,20,17,0.45);
  display:flex; align-items:flex-end; justify-content:center;
  z-index: 200; opacity:0; pointer-events:none; transition: opacity .18s ease;
}
.sheet-overlay.open{ opacity:1; pointer-events:auto; }
.sheet{
  background: var(--surface);
  width:100%; max-width: 560px;
  border-radius: 16px 16px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .2s ease;
  max-height: 78vh; overflow-y:auto;
}
.sheet-overlay.open .sheet{ transform: translateY(0); }
.sheet-handle{ width:36px; height:4px; background: var(--line); border-radius:2px; margin: 4px auto 12px; }
.sheet-body .rail-item{ font-size:15px; padding: 13px 10px; }

/* ---------- toast ---------- */
.toast{
  position: fixed; left:50%; bottom: calc(var(--tabbar-h) + 14px);
  transform: translateX(-50%) translateY(12px);
  background: var(--ink); color:#fff;
  font-size: 13px; font-weight:600;
  padding: 10px 16px; border-radius: 8px;
  opacity:0; pointer-events:none; transition: all .18s ease;
  z-index: 300; white-space:nowrap;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }
@media (min-width:900px){ .toast{ bottom: 24px; } }

/* ---------- confirmación propia (reemplaza al confirm() del navegador) ---------- */
.confirm-overlay{
  position: fixed; inset:0; background: rgba(10,14,30,0.5);
  display:flex; align-items:center; justify-content:center;
  z-index: 250; padding: 20px;
  opacity:0; pointer-events:none; transition: opacity .15s ease;
}
.confirm-overlay.open{ opacity:1; pointer-events:auto; }
.confirm-box{
  background: var(--surface); border-radius: 14px;
  padding: 22px 20px 18px; width: 100%; max-width: 340px;
  box-shadow: 0 20px 60px rgba(10,14,30,0.35);
  transform: scale(0.94); transition: transform .15s ease;
  text-align: center;
}
.confirm-overlay.open .confirm-box{ transform: scale(1); }
.confirm-head{
  display:flex; align-items:center; justify-content:center;
  gap:9px; margin-bottom:10px;
}
.confirm-icon{
  width:26px; height:26px; border-radius:50%;
  background: var(--bad-wash); color: var(--bad);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.confirm-icon svg{ width:14px; height:14px; }
.confirm-title{ font-weight:800; font-size:16px; }
.confirm-msg{ font-size:13.5px; color: var(--ink-soft); margin-bottom:18px; line-height:1.45; }
.confirm-msg b{ color: var(--ink); font-weight:700; }
.confirm-actions{ display:flex; gap:8px; }
.confirm-actions .btn{ flex:1; }

.factura-box{ max-width: 640px; padding: 16px; }
.factura-preview{
  width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  max-height: 70vh; object-fit: contain; background: #fff;
}

/* ---------- perfil de cliente ---------- */
.perfil-box{ max-width: 480px; text-align: left; max-height: 82vh; overflow-y: auto; }
.perfil-title{ font-weight:800; font-size:16px; margin-bottom: 4px; }
.perfil-sub{ font-size:12.5px; color:var(--ink-soft); margin-bottom: 14px; }
.perfil-aviso{
  font-size: 12px; color: var(--amber);
  background: var(--amber-wash);
  padding: 8px 10px; border-radius: 6px;
  margin-bottom: 12px;
}
.perfil-section-title{
  font-size: 11.5px; font-weight: 800; color: var(--ink-soft);
  margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.04em;
}
.perfil-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.perfil-field{ margin-bottom: 8px; }
.perfil-field.full{ grid-column: 1 / -1; }
.perfil-field label{ display:block; font-size: 11px; color: var(--ink-soft); margin-bottom: 3px; font-weight:600; }
.perfil-field input, .perfil-field select{
  width: 100%; font-family: var(--sans); font-size: 13px;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink);
}
.perfil-field input:focus, .perfil-field select:focus{ outline: 2px solid var(--brand); outline-offset: 1px; }
.perfil-field input:disabled{ opacity: 0.6; }
.perfil-field input.money-readonly:disabled{ opacity: 1; color: var(--ink); background: var(--surface); border-color: var(--line); font-weight: 700; }

.perfil-toggle-row{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 12px;
}
.perfil-toggle-label{ font-size: 13px; font-weight: 700; color: var(--ink); }
.switch{
  width: 46px; height: 26px; border-radius: 999px;
  background: var(--switch-off); border: none; position: relative; cursor: pointer;
  padding: 0; flex-shrink: 0; transition: background .15s ease;
}
.switch.on{ background: var(--ok); }
.switch-knob{
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform .15s ease;
}
.switch.on .switch-knob{ transform: translateX(20px); }

.pago-toggle-row{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 11px;
}

/* ---------- pantalla de login ---------- */
.login-body{ margin:0; }
.login-page{
  min-height: 100dvh;
  background: var(--topbar-grad);
  display:flex; align-items:center; justify-content:center;
  padding: 24px;
}
.login-card{
  background: var(--surface);
  border-radius: 16px;
  padding: 36px 28px 28px;
  width: 100%; max-width: 340px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.login-mark{ width:56px; height:56px; object-fit:contain; margin: 0 auto 12px; display:block; }
.login-wordmark{ height:22px; width:auto; display:block; margin: 0 auto 6px; }
.login-sub{ font-size:12.5px; color: var(--ink-soft); margin: 0 0 26px; }
.login-field{ margin-bottom: 14px; }
.login-field input{
  width:100%;
  font-family: var(--sans); font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  text-align:center;
}
.login-field input:focus{ outline: 2px solid var(--brand); outline-offset: 1px; }
.login-error{
  font-size: 12.5px; color: var(--bad);
  background: var(--bad-wash);
  border-radius: 7px;
  padding: 8px 10px;
  margin-bottom: 14px;
}
.login-btn{ width:100%; padding: 12px; font-size: 14px; }
