/* Cuentas del día (2026-10-20) — formulario compartido calendario + chat del Equipo.
   Ver js/gastos-form.js. Daltónico: símbolo + texto siempre (✔ / ○ / ⚠️ / ●). */
.gf { --gf-tx: #111827; --gf-mu: #6b7280; --gf-ln: #d1d5db; --gf-bg: #fff; --gf-campo: #f9fafb; --gf-ok: #166534; --gf-mal: #b91c1c; --gf-ac: #1d4ed8;
  color: var(--gf-tx); font-size: 15px; font-variant-numeric: tabular-nums; }
.gf-oculto { display: none !important; }
.gf-est { margin: 8px 8px 4px; padding: 8px 10px; font-weight: 700; font-size: 14px; border-radius: 8px; }
.gf-est.ok { background: #dcfce7; color: var(--gf-ok); border: 2px solid var(--gf-ok); }
.gf-est.no { background: #f3f4f6; color: #374151; border: 2px dashed #9ca3af; }
.gf-sec { background: var(--gf-bg); margin: 8px; padding: 10px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.gf-sec h4 { margin: 0 0 8px; font-size: 15px; }
.gf-fila { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gf-lbl { font-weight: 600; font-size: 14px; }
.gf-monto { display: flex; align-items: center; gap: 2px; border: 1.5px solid var(--gf-ln); border-radius: 9px; background: var(--gf-campo); padding: 0 8px; flex: 0 1 150px; min-width: 110px; }
.gf-monto span { color: var(--gf-mu); font-weight: 700; }
.gf-monto input { border: 0; background: transparent; font-size: 17px; padding: 10px 2px; width: 100%; min-width: 0; text-align: right; color: inherit; outline: none; font-variant-numeric: tabular-nums; }
.gf-monto:focus-within { border-color: var(--gf-ac); box-shadow: 0 0 0 2px rgba(29,78,216,.25); }
.gf-chip { border: 1.5px solid var(--gf-ln); background: var(--gf-bg); color: inherit; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.gf-g { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.gf-g input { border: 1.5px solid var(--gf-ln); border-radius: 9px; background: var(--gf-campo); padding: 10px 9px; font-size: 16px; min-width: 0; color: inherit; }
.gf-g input:focus { outline: none; border-color: var(--gf-ac); box-shadow: 0 0 0 2px rgba(29,78,216,.25); }
.gf-g .gf-co { flex: 1; }
.gf-g .gf-mo { width: 32%; max-width: 120px; text-align: right; }
.gf-g.mal .gf-mo { border-color: var(--gf-mal); border-style: dashed; }
.gf-x { width: 34px; height: 40px; flex-shrink: 0; border: 0; background: transparent; color: var(--gf-mu); font-size: 17px; cursor: pointer; }
.gf-mas { width: 100%; padding: 10px; border-radius: 9px; border: 1.5px dashed var(--gf-ln); background: transparent; color: var(--gf-ac); font-weight: 700; font-size: 15px; cursor: pointer; }
.gf-vacio { color: var(--gf-mu); font-size: 14px; }
.gf-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--gf-ln); font-size: 15px; }
.gf-cuenta { margin: 8px; padding: 10px 14px; border-radius: 12px; background: #eff6ff; border: 2px solid var(--gf-ac); }
.gf-cuenta div { display: flex; justify-content: space-between; padding: 2px 0; font-size: 15px; }
.gf-cuenta .gf-res { border-top: 2px solid var(--gf-ac); margin-top: 4px; padding-top: 6px; font-size: 19px; font-weight: 800; }
.gf-cuenta .gf-res.neg { color: var(--gf-mal); }
.gf-formas { display: flex; gap: 6px; flex-wrap: wrap; }
.gf-forma { flex: 1 1 30%; min-width: 96px; padding: 10px 6px; border-radius: 9px; border: 2px solid var(--gf-ln); background: var(--gf-campo); color: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.gf-forma.on { background: #111827; color: #fff; border-color: #111827; }
.gf-forma.on::after { content: ' ✔'; }
.gf-mixto { margin-top: 8px; }
.gf-ef { margin-top: 6px; font-weight: 700; }
.gf-ef.mal { color: var(--gf-mal); }
.gf-nota input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--gf-ln); border-radius: 9px; background: var(--gf-campo); padding: 10px; font-size: 16px; color: inherit; }
.gf-pie { position: sticky; bottom: 0; padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px)); background: #f3f4f6; box-shadow: 0 -2px 8px rgba(0,0,0,.08); z-index: 2; }
html.theme-neuronal .gf-pie { background: #0b1220; }
.gf-mini { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; font-size: 13.5px; margin: 0 4px 6px; }
.gf-mini .neg { color: var(--gf-mal); }
.gf-guardar { width: 100%; padding: 13px; border-radius: 10px; border: 0; background: #166534; color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; }
.gf-guardar:disabled { opacity: .6; }
.gf-est2 { text-align: center; font-size: 13px; color: var(--gf-mu); margin-top: 6px; min-height: 1em; }
.gf-est2.sucio { color: #92400e; font-weight: 700; }
.gf input:disabled { opacity: .85; }

/* Calendario: modo oscuro neuronal */
html.theme-neuronal .gf { --gf-tx: #e5e7eb; --gf-mu: #9ca3af; --gf-ln: #374151; --gf-bg: #111827; --gf-campo: #0b1220; }
html.theme-neuronal .gf-cuenta { background: #0b1a33; }
html.theme-neuronal .gf-est.ok { background: #052e16; color: #86efac; border-color: #22c55e; }
html.theme-neuronal .gf-est.no { background: #1f2937; color: #d1d5db; }
html.theme-neuronal .gf-forma.on { background: #e5e7eb; color: #111827; }
/* 2026-10-21: gastos que pagó Luis + resultado del día */
.gf-luis { border-left: 4px solid #7c3aed; }
.gf-resdia { background: #f5f3ff; border-color: #7c3aed; }
.gf-resdia .gf-res { border-top-color: #7c3aed; }
html.theme-neuronal .gf-resdia { background: #1e1638; }

/* ===== Calendario: botón "💵 Gastos" en la franja de cada día + ventana ===== */
/* 2026-10-21: franja compacta (64px como antes de Gastos) para que las horas empiecen arriba */
body.con-gastos .notes-gutter-spacer { height: 64px; }
body.con-gastos .notes-strip { min-height: 64px; display: flex; flex-direction: column; }
body.con-gastos .notes-strip-placeholder { min-height: 20px; padding: 4px 8px; flex: 1; }
body.con-gastos .notes-strip-ta { min-height: 20px; flex: 1; }
body.con-gastos .notes-strip-placeholder .notes-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gastos-btn {
  display: flex; align-items: center; justify-content: center; gap: 3px; width: calc(100% - 8px); margin: 0 4px 4px;
  height: 22px; padding: 0 6px; border-radius: 6px; border: 1.5px dashed #9ca3af; background: #fff; color: #374151;
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; flex-shrink: 0;
}
.gastos-btn:hover { border-color: #166534; }
.gastos-btn.gastos-ok { background: #16a34a; color: #fff; border: 1.5px solid #14532d; }
.gastos-btn .gb-monto { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sunday-notes-zone .gastos-btn { width: 100%; margin: 0; height: 30px; }
.gastos-mes { display: block; max-width: 100%; margin: -2px 0 3px; padding: 0 4px; border: 1px solid #14532d; border-radius: 4px; background: #16a34a; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.3; text-align: left; cursor: pointer; overflow: hidden; }
html.theme-neuronal .gastos-btn { background: #111827; color: #d1d5db; border-color: #4b5563; }
html.theme-neuronal .gastos-btn.gastos-ok { background: #16a34a; color: #fff; border-color: #86efac; }

.gastos-fondo { position: fixed; inset: 0; z-index: 10040; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gastos-caja { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #f3f4f6; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.gastos-cab { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.gastos-cab h3 { margin: 0; flex: 1; font-size: 18px; color: #111827; }
.gastos-cab h3 small { display: block; font-size: 13px; font-weight: 600; color: #6b7280; }
.gastos-cerrar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f3f4f6; font-size: 18px; cursor: pointer; color: #111827; }
.gastos-cuerpo { overflow-y: auto; flex: 1; background: #f3f4f6; }
.gastos-aviso { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10060; max-width: 90%; padding: 11px 18px; border-radius: 9px; background: #166534; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.gastos-aviso.err { background: #b91c1c; }
html.theme-neuronal .gastos-caja, html.theme-neuronal .gastos-cuerpo { background: #0b1220; }
html.theme-neuronal .gastos-cab { background: #111827; border-color: #374151; }
html.theme-neuronal .gastos-cab h3 { color: #e5e7eb; }
html.theme-neuronal .gastos-cerrar { background: #1f2937; color: #e5e7eb; }
@media (max-width: 767px) {
  .gastos-fondo { padding: 0; align-items: stretch; }
  .gastos-caja { max-width: none; max-height: none; border-radius: 0; }
  .gastos-btn .gb-monto { display: none; }
  .gastos-btn { font-size: 11px; padding: 0 3px; }
}

/* Renglón chico abajo del botón (2026-10-21): "Entró $X · Gastó $Y". La lista gasto por gasto
   solo se ve al abrir el botón. */
.gastos-zona { margin: 0 4px 3px; cursor: pointer; }
.gastos-zona .gastos-btn { width: 100%; margin: 0; }
.gastos-renglon { margin-top: 1px; font-size: 10.5px; line-height: 1.25; color: #374151; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.gastos-renglon.hidden { display: none; }
.gastos-renglon .gr-g { font-weight: 700; }
.sunday-notes-zone .gastos-zona { margin: 0; }
html.theme-neuronal .gastos-renglon { color: #d1d5db; }
.gastos-renglon .gr-neg { color: #b91c1c; font-weight: 800; }
html.theme-neuronal .gastos-renglon .gr-neg { color: #fca5a5; }
.gastos-mes .gr-neg { background: #fff; color: #b91c1c; border-radius: 3px; padding: 0 2px; }
@media (max-width: 767px) {
  /* columna angosta: los dos datos uno bajo otro, letra chica */
  .gastos-renglon { font-size: 9px; line-height: 1.15; white-space: normal; }
  .gastos-renglon .gr-e, .gastos-renglon .gr-g, .gastos-renglon .gr-neg { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gastos-renglon .gr-sep { display: none; }
}

/* Tarjeta "Cuentas de la semana" (en lugar de No Instalado, solo admin/Yordi). El signo + / − y ✔ / ⚠️ dicen el estado; el color solo acompaña. */
.metric-card.cuentas-semana.cs-pos { background: #0f766e; box-shadow: 0 2px 8px rgba(15,118,110,.3); }
.metric-card.cuentas-semana.cs-neg { background: #dc2626; box-shadow: 0 2px 8px rgba(220,38,38,.3); }
html.theme-neuronal .metric-card.cuentas-semana.cs-pos .metric-value { color: #5eead4; text-shadow: 0 0 12px rgba(45,212,191,.45); }
@media (max-width: 767px) {
  .metric-card.cuentas-semana { gap: 6px; }
  .metric-card.cuentas-semana .metric-label { white-space: normal; line-height: 1.15; }
}
