/* Cuentas GR Skin · estilo "Sereno": blanco y grises cálidos de su web; verde, ámbar y teja para lo que tiene que verse. */
:root {
  /* Paleta del tema de su web en Wix. Nada fuera de aquí. */
  --texto: #52504e; --texto2: #726e6b; --texto3: #8d8f8b; --suave: #b3aeab; --linea: #efebe7; --linea2: #f4f1ee;
  --fondo: #ffffff; --fondo2: #faf8f6; --fondo3: #f4f1ee; --borde: #e6e3dd; --oscuro: #22201e;
  --oro: #d8b552; --oliva: #4e5245; --salvia: #bfc0b0; --caramelo: #c9a075; --caramelo2: #8a6a45; --rosa: #f2eae7; --nude: #e5cec0;
  /* Usos */
  --ing: #4e5245; --ing-fondo: #eceee6; --gas: #c9a075; --gas-txt: #8a6a45; --gas-fondo: #f2eae7;
  --c1: #4e5245; --c2: #c9a075; --c3: #d8b552; --c4: #8a6a45; --c5: #bfc0b0; --c6: #b3aeab;
  --bien: #4e5245; --aviso: #d8b552; --serio: #8a6a45;
  --nav-h: 68px; --sans: Montserrat, system-ui, sans-serif; --ui: Poppins, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--fondo3); color: var(--texto); font-family: var(--sans); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
input, select, button, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 400; }
::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }
[hidden] { display: none !important; }

/* ---------- Estructura: móvil (barra abajo) y ordenador (menú lateral) ---------- */
.app { min-height: 100dvh; background: var(--fondo); display: flex; flex-direction: column; position: relative; }
.pantalla { flex-grow: 1; display: flex; flex-direction: column; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); min-width: 0; }
.pantalla.sin-nav { padding-bottom: 0; }
.cab { padding: calc(20px + env(safe-area-inset-top)) 22px 10px 22px; display: flex; align-items: center; gap: 8px; }
.cab h1 { flex-grow: 1; font-size: 22px; letter-spacing: -0.01em; }
.cab.col { flex-direction: column; align-items: stretch; gap: 12px; }
.cuerpo { flex-grow: 1; padding: 4px 22px 16px 22px; min-width: 0; }
.back { width: 44px; height: 44px; margin-left: -12px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 22px; }
.back:active { background: var(--fondo2); }
.solo-pc { display: none; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--oscuro); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.nav button { flex: 1 1 0; min-height: var(--nav-h); border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #a8a29c; position: relative; }
.nav button.on { color: var(--oro); }
.nav button span { font-family: var(--ui); font-size: 9.5px; }
.nav .pin { position: absolute; top: 12px; right: 22px; width: 8px; height: 8px; border-radius: 4px; background: var(--oro); }
.nav .marca-nav { position: absolute; top: 8px; right: 18px; }
.nav .logo, .nav .pie { display: none; }
.dos { display: block; }
.resumen-pc { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }

@media (min-width: 900px) {
  body { background: var(--fondo2); }
  .app { flex-direction: row; min-height: 100vh; background: var(--fondo2); }
  .nav { order: -1; position: sticky; top: 0; left: auto; right: auto; bottom: auto; flex-direction: column; width: 240px; height: 100vh; flex-shrink: 0; padding: 28px 16px 22px 16px; gap: 2px; background: var(--fondo); border-right: 1px solid var(--linea); }
  .nav button { flex: 0 0 auto; min-height: 48px; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 16px; border-radius: 12px; color: var(--texto2); }
  .nav button span { font-family: var(--sans); font-size: 14px; letter-spacing: 0.02em; }
  .nav button:hover { background: var(--fondo2); color: var(--texto); }
  .nav button.on { background: var(--fondo2); color: var(--texto); box-shadow: inset 3px 0 0 var(--oro); }
  .nav .pin { top: 20px; right: 16px; }
  .nav .marca-nav { position: static; margin-left: auto; }
  .nav .logo { display: block; padding: 0 16px 30px 16px; color: var(--texto2); }
  .nav .logo svg { width: 76px; height: auto; display: block; }
  .nav .logo small { display: block; font-family: var(--ui); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--suave); margin-top: 10px; }
  .nav .pie { display: block; margin-top: auto; padding: 16px; border-top: 1px solid var(--linea); font-family: var(--ui); font-size: 11px; color: var(--suave); line-height: 1.6; }
  .pantalla { padding: 34px 44px 44px 44px; max-width: 1240px; width: 100%; }
  .pantalla.sin-nav { max-width: none; }
  .cab { padding: 0 0 18px 0; }
  .cab h1 { font-size: 28px; font-weight: 300; letter-spacing: -0.01em; }
  .cab.col { gap: 14px; }
  .cuerpo { padding: 0; }
  .back { margin-left: -8px; }
  .solo-pc { display: block; }
  .solo-movil { display: none !important; }
  .dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .grid2 { grid-template-columns: 1fr 1fr; gap: 20px; }
  .panel { background: var(--fondo); border-radius: 20px; padding: 24px 26px; border: 1px solid var(--linea); }
  .lista-pc { background: var(--fondo); border-radius: 20px; padding: 6px 26px; border: 1px solid var(--linea); }
  .pie-movs { border-radius: 0 0 20px 20px; }
  .tarjeta { box-shadow: none; border: 1px solid var(--linea); padding: 8px 26px 26px 26px; }
  .per { max-width: 420px; }
  .resumen-pc { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
}
@media (max-width: 899px) { .panel { padding: 0; } .panel + .panel { margin-top: 22px; } }

/* ---------- Texto ---------- */
.p { font-family: var(--ui); font-size: 12px; color: var(--texto2); line-height: 1.5; }
.lab { display: block; font-family: var(--ui); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texto2); margin: 14px 0 4px 0; }
.lab small { letter-spacing: 0; text-transform: none; color: var(--suave); font-size: 10px; }
.tit { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 4px 0; }
.tit > span:first-child { font-family: var(--ui); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texto2); }
.tit .n, .tit .m { width: 82px; text-align: right; font-family: var(--ui); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto2); }
.grande { font-size: 34px; font-weight: 200; letter-spacing: -0.03em; }
.pos { color: var(--oliva); } .neg { color: var(--caramelo2); }
.h2 { font-size: 16px; font-weight: 500; margin: 0 0 4px 0; }

/* ---------- Campos ---------- */
.inp { width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid var(--linea); background: transparent; font-size: 16px; color: var(--texto); outline: none; padding: 0; border-radius: 0; min-width: 0; }
.inp:focus { border-bottom-color: var(--texto2); }
.inp::placeholder { color: var(--suave); }
input[type="date"].inp, input[type="month"].inp { font-size: 15px; }
.imp { display: flex; align-items: baseline; gap: 6px; border-bottom: 1px solid var(--linea); min-width: 0; }
.imp input { flex-grow: 1; width: 100%; min-width: 0; min-height: 44px; border: 0; outline: none; background: transparent; font-size: 26px; font-weight: 200; letter-spacing: -0.02em; color: var(--texto); padding: 0; }
.imp input::placeholder { color: var(--suave); font-weight: 200; }
.imp span { font-size: 17px; font-weight: 200; color: var(--texto3); }
.imp.xl input { font-size: 32px; }
.caja { width: 100%; min-height: 52px; border: 1px solid var(--borde); border-radius: 14px; padding: 0 16px; font-size: 16px; outline: none; background: var(--fondo); }
.caja:focus { border-color: var(--texto2); }
.seg { display: flex; background: var(--fondo3); border-radius: 22px; padding: 3px; }
.seg button { flex: 1 1 0; min-height: 38px; border: 0; border-radius: 19px; background: transparent; color: var(--texto2); font-size: 13px; font-weight: 500; padding: 0 6px; white-space: nowrap; }
.seg button.on { background: var(--fondo); color: var(--texto); box-shadow: 0 1px 2px rgba(82,80,78,0.08); }
.seg.mini button { min-height: 30px; font-size: 12px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px 0; }
.chips button, .chips-wrap button { min-height: 40px; padding: 0 14px; border: 1px solid var(--borde); border-radius: 20px; background: var(--fondo); color: var(--texto); font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }
.chips button.on, .chips-wrap button.on { background: var(--texto); color: #fff; border-color: var(--texto); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.btnP { width: 100%; min-height: 52px; border: 0; border-radius: 26px; background: var(--texto); color: #fff; font-size: 15px; font-weight: 500; letter-spacing: 0.03em; }
.btnP:disabled { opacity: 0.5; }
.btnS { width: 100%; min-height: 46px; border: 1px solid var(--texto2); border-radius: 23px; background: var(--fondo); color: var(--texto2); font-size: 14px; font-weight: 500; }
.btnT { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--caramelo2); font-size: 14px; }
.sw { width: 46px; height: 27px; border-radius: 14px; display: flex; align-items: center; padding: 0 3px; flex-shrink: 0; border: 0; background: #d9d4cf; justify-content: flex-start; transition: background .15s; }
.sw.on { background: var(--texto); justify-content: flex-end; }
.sw span { width: 21px; height: 21px; border-radius: 11px; background: #fff; display: block; }
.fila2 { display: flex; gap: 14px; }
.fila2 > * { flex: 1 1 0; min-width: 0; }
.fila2 > .fijo { flex: 0 0 auto; }

/* ---------- Listas ---------- */
.fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linea2); font-size: 13.5px; }
.fila .c { font-family: var(--ui); font-size: 12.5px; color: var(--texto2); flex-grow: 1; min-width: 0; }
.fila .n { width: 82px; text-align: right; white-space: nowrap; flex-shrink: 0; }
.fila .m { width: 82px; text-align: right; white-space: nowrap; color: var(--suave); flex-shrink: 0; }
.tot { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--texto); font-size: 14px; font-weight: 500; }
.tot .n { width: 82px; text-align: right; } .tot .m { width: 82px; text-align: right; color: var(--suave); font-weight: 400; }
.item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; border-top: 1px solid var(--linea2); background: transparent; text-align: left; }
.item:active, .item:hover { background: var(--fondo2); }
.item .t { display: block; font-size: 14px; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { display: block; font-family: var(--ui); font-size: 11px; color: var(--texto2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .cuerpo-item { flex-grow: 1; min-width: 0; }
.bola { width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; font-weight: 500; }
.bola.ing { background: var(--ing-fondo); color: var(--oliva); } .bola.gas { background: var(--gas-fondo); color: var(--caramelo2); }
.punto { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }
.card { background: var(--fondo2); border-radius: 20px; padding: 15px 17px; }
.card.borde { background: var(--fondo); border: 1px solid var(--linea); }
.card.oro { background: var(--fondo); border: 2px solid var(--oro); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.kpi { background: var(--fondo2); border-radius: 18px; padding: 13px 15px; border-left: 4px solid var(--suave); }
.kpi.k-ing { border-left-color: var(--oliva); } .kpi.k-gas { border-left-color: var(--caramelo); } .kpi.k-serio { border-left-color: var(--caramelo2); } .kpi.k-info { border-left-color: var(--oro); }
@media (min-width: 900px) { .kpi { background: var(--fondo); border: 1px solid var(--linea); border-left-width: 4px; padding: 16px 18px; } .kpi .v { font-size: 28px; font-weight: 200; } }
.kpi .k { font-family: var(--ui); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto2); }
.kpi .v { font-size: 24px; font-weight: 300; letter-spacing: -0.02em; margin-top: 2px; }
.kpi .p { font-size: 11px; }
.per { display: flex; align-items: center; justify-content: space-between; background: var(--fondo2); border-radius: 22px; padding: 4px; }
.per button { width: 44px; height: 36px; border: 0; background: transparent; color: var(--texto); font-size: 20px; border-radius: 18px; }
.per span { font-size: 14px; }
.barra { height: 6px; background: #ece7e1; border-radius: 3px; overflow: hidden; }
.barra > i { display: block; height: 100%; background: var(--oro); border-radius: 3px; }
.vacio { text-align: center; padding: 40px 20px; }

/* ---------- Avisos: fondos llenos con los colores de su paleta, icono y título; nunca solo color ---------- */
.aviso { display: flex; gap: 13px; border-radius: 16px; padding: 15px 16px; border: 0; background: var(--fondo3); color: var(--texto); text-align: left; width: 100%; align-items: flex-start; }
.aviso .ic { width: 28px; height: 28px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.92); color: var(--texto); }
.aviso .tt { display: block; font-size: 15px; font-weight: 500; line-height: 1.35; color: inherit; }
.aviso .p { color: inherit; opacity: 0.88; }
.aviso.serio, .aviso.alerta { background: var(--caramelo2); color: #ffffff; } .aviso.serio .ic, .aviso.alerta .ic { color: var(--caramelo2); }
.aviso.aviso-oro, .aviso.stock { background: var(--oro); color: var(--oscuro); } .aviso.aviso-oro .ic, .aviso.stock .ic { color: #8a6a45; }
.aviso.cuotas { background: var(--oliva); color: #ffffff; } .aviso.cuotas .ic { color: var(--oliva); }
.aviso.bien { background: var(--salvia); color: var(--oscuro); } .aviso.bien .ic { color: var(--oliva); }
.aviso.neutro { background: var(--borde); color: var(--texto); } .aviso.neutro .ic { color: var(--texto2); }
button.aviso { transition: transform .12s, filter .12s; } button.aviso:hover { filter: brightness(1.04); } button.aviso:active { transform: scale(0.99); }

.marca { min-width: 20px; height: 20px; border-radius: 10px; background: var(--caramelo2); color: #fff; font-family: var(--ui); font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.etiq { display: inline-block; font-family: var(--ui); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 10px; }
.etiq.ing { background: var(--ing-fondo); color: var(--oliva); } .etiq.gas { background: var(--gas-fondo); color: var(--caramelo2); } .etiq.serio { background: var(--caramelo2); color: #fff; } .etiq.oro { background: var(--oro); color: var(--oscuro); }

/* ---------- Inicio ---------- */
.inicio-cab { padding: calc(20px + env(safe-area-inset-top)) 22px 0 22px; display: flex; align-items: flex-start; justify-content: space-between; }
.campana { width: 44px; height: 44px; border: 1px solid var(--linea); border-radius: 22px; background: var(--fondo); display: flex; align-items: center; justify-content: center; position: relative; }
.campana .marca { position: absolute; top: 4px; right: 4px; height: 18px; min-width: 18px; font-size: 10px; }
.hoja { flex-grow: 1; background: var(--fondo2); border-radius: 30px 30px 0 0; margin-top: 18px; padding: 18px 16px 18px 16px; display: flex; flex-direction: column; }
.tarjeta { background: var(--fondo); border-radius: 22px; padding: 4px 18px 18px 18px; box-shadow: 0 1px 2px rgba(82,80,78,0.04), 0 6px 20px rgba(82,80,78,0.05); }
@media (min-width: 900px) { .inicio-cab { padding: 0 0 18px 0; } .hoja { background: transparent; margin: 0; padding: 0; border-radius: 0; } }

/* ---------- Gráficas ---------- */
.graf { width: 100%; height: auto; display: block; font-family: var(--ui); }
.graf .eje { stroke: #ddd7d0; stroke-width: 1; }
.graf .txt { fill: var(--texto2); font-size: 11px; }
.graf .txt.b { fill: var(--texto); font-weight: 500; }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-family: var(--ui); font-size: 12px; color: var(--texto2); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut { display: flex; gap: 18px; align-items: center; }
.donut svg { width: 150px; height: 150px; flex-shrink: 0; }
.donut .lista { flex-grow: 1; min-width: 0; }
.hbar { margin: 8px 0; }
.hbar .l { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.hbar .b { height: 10px; background: #ece7e1; border-radius: 3px; overflow: hidden; }
.hbar .b i { display: block; height: 100%; border-radius: 3px; background: var(--oliva); }
.pagos { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: #ece7e1; margin-top: 6px; gap: 2px; }
.pagos i:first-child { background: var(--oliva); } .pagos i:last-child { background: var(--oro); }

/* ---------- Toast, modal, login ---------- */
.toast { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(92vw, 470px); display: flex; align-items: center; gap: 11px; background: var(--oscuro); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(34,32,30,0.28); color: #f2eae7; font-size: 14px; z-index: 20; }
.toast .ic { width: 24px; height: 24px; border-radius: 12px; background: var(--oro); color: var(--oscuro); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.toast.error .ic { background: var(--caramelo); }
.modal { position: fixed; inset: 0; background: rgba(34,32,30,0.5); display: flex; align-items: center; justify-content: center; padding: 0 28px; z-index: 30; }
.modal > div { background: var(--fondo); border-radius: 22px; padding: 24px 22px 18px 22px; width: 100%; max-width: 380px; text-align: center; }
.modal h2 { font-size: 17px; font-weight: 500; margin-bottom: 6px; }
.modal .btnP.rojo { background: var(--caramelo2); }
.login { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 32px; min-height: 100dvh; width: 100%; max-width: 440px; margin: 0 auto; }
.login .logo { text-align: center; margin-bottom: 40px; }
.login .logo svg { width: 120px; height: auto; color: var(--texto2); display: block; margin: 0 auto; }
.login .logo i { display: block; height: 1px; background: var(--oro); width: 40px; margin: 16px auto; }
.login .logo small { font-family: var(--ui); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--texto2); }
.cargando { text-align: center; padding: 60px 20px; color: var(--suave); font-family: var(--ui); font-size: 12px; width: 100%; }

/* Logo en la cabecera del móvil */
.logo-movil { width: 44px; color: var(--texto2); display: block; }
.logo-movil svg { width: 100%; height: auto; display: block; }
.kpi-grande { background: var(--fondo); border: 1px solid var(--linea); border-radius: 18px; padding: 18px 20px; }
.kpi-grande .k { font-family: var(--ui); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texto2); display: flex; align-items: center; gap: 8px; }
.kpi-grande .k i { width: 8px; height: 8px; border-radius: 4px; display: inline-block; }
.kpi-grande .v { font-size: 30px; font-weight: 200; letter-spacing: -0.02em; margin-top: 6px; }
.kpi-grande .p { margin-top: 2px; }
button.kpi-grande { text-align: left; cursor: pointer; } button.kpi-grande:hover { border-color: var(--borde); background: var(--fondo2); }
@media (min-width: 900px) { .inicio-cab .saludo { font-size: 28px !important; font-weight: 300; } .inicio-cab .p { font-size: 13px; } }
@media (min-width: 900px) { .toast { left: auto; right: 32px; transform: none; top: 24px; } .chips { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 899px) { .kpi .v { font-size: 21px; white-space: nowrap; } }
