feat(cobranza): rediseño visual flat-green del panel de cobranza
Aplica el rediseño del frontend (web/cobranza.html) manteniendo el comportamiento intacto: - Nueva paleta flat (verde) + tipografía Space Grotesk - Header con badge "WK"; se elimina el bloque disclaimer - Iconos emoji del UI reemplazados por SVG inline; botones con etiquetas de texto (EDITAR/BORRAR/GUARDAR) Sin cambios de lógica: el set de funciones JS y los endpoints consumidos son idénticos a la versión previa; se conservan los emojis 🏦/⚠️ del texto del mensaje de WhatsApp y el placeholder __TOKEN__. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1345a4f324
commit
f83b6ff31a
1 file changed
+248
-219
+248
-219
@@ -4,269 +4,301 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Cobranza Acumulada · WK</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
|
||||
:root {
|
||||
--bg: #e8eaf0;
|
||||
--shadow-light: rgba(255,255,255,0.85);
|
||||
--shadow-dark: rgba(180,185,200,0.6);
|
||||
--text-primary: #2d3148;
|
||||
--text-secondary: #7b82a0;
|
||||
--text-tertiary: #a8aec4;
|
||||
--accent: #4f8ef7;
|
||||
--accent-glow: rgba(79,142,247,0.25);
|
||||
--accent-soft: rgba(79,142,247,0.08);
|
||||
--success: #34c98a;
|
||||
--success-soft: rgba(52,201,138,0.12);
|
||||
--wa: #25b86a;
|
||||
--danger: #f06070;
|
||||
--danger-soft: rgba(240,96,112,0.12);
|
||||
--warning: #f0a020;
|
||||
--warning-soft: rgba(240,160,32,0.12);
|
||||
--vr-soft: rgba(124,92,247,0.12);
|
||||
--vr: #7c5cf7;
|
||||
--extra-soft: rgba(240,160,32,0.14);
|
||||
--extra: #d97f08;
|
||||
--renta-soft: rgba(79,142,247,0.10);
|
||||
--renta: #4f8ef7;
|
||||
--nm-out: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
|
||||
--nm-in: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
|
||||
--nm-subtle: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
|
||||
--bg: #eef1f6;
|
||||
--surface: #ffffff;
|
||||
--surface-2: #f4f6fa;
|
||||
--line: #e4e8ef;
|
||||
--line-strong: #d4dae4;
|
||||
|
||||
--shadow-light: rgba(255,255,255,0.9);
|
||||
--shadow-dark: rgba(20,28,46,0.10);
|
||||
|
||||
--text-primary: #131922;
|
||||
--text-secondary: #586173;
|
||||
--text-tertiary: #97a1b2;
|
||||
|
||||
--accent: #0e7c66;
|
||||
--accent-strong: #0a6151;
|
||||
--accent-soft: rgba(14,124,102,0.10);
|
||||
--accent-glow: rgba(14,124,102,0.30);
|
||||
|
||||
--success: #15a06a;
|
||||
--success-soft: rgba(21,160,106,0.12);
|
||||
--wa: #1faf5a;
|
||||
|
||||
--danger: #d8473f;
|
||||
--danger-soft: rgba(216,71,63,0.12);
|
||||
--warning: #bd6b12;
|
||||
--warning-soft: rgba(189,107,18,0.13);
|
||||
|
||||
--vr-soft: rgba(124,77,208,0.13);
|
||||
--vr: #7c4dd0;
|
||||
--extra-soft: rgba(176,101,12,0.15);
|
||||
--extra: #aa620c;
|
||||
--renta-soft: rgba(37,99,201,0.11);
|
||||
--renta: #2563c9;
|
||||
|
||||
/* legacy neumorphic tokens remapped to flat elevation */
|
||||
--nm-out: 0 1px 2px rgba(18,24,38,.05), 0 8px 22px -8px rgba(18,24,38,.16);
|
||||
--nm-in: inset 0 0 0 1px var(--line-strong);
|
||||
--nm-subtle: 0 1px 2px rgba(18,24,38,.06), 0 0 0 1px var(--line);
|
||||
--radius-card: 16px;
|
||||
}
|
||||
body { background: var(--bg); min-height: 100vh; font-family: 'DM Sans', sans-serif; color: var(--text-primary); padding: 1.5rem 1rem 5rem; }
|
||||
.container { max-width: 560px; margin: 0 auto; }
|
||||
.container { max-width: 600px; margin: 0 auto; }
|
||||
|
||||
.header { text-align: center; margin-bottom: 1.3rem; animation: fadeUp 0.6s ease both; }
|
||||
.header-icon { width: 56px; height: 56px; border-radius: 17px; background: var(--bg); box-shadow: var(--nm-out); display: flex; align-items: center; justify-content: center; margin: 0 auto 0.7rem; font-size: 24px; }
|
||||
.header h1 { font-size: 20px; font-weight: 500; letter-spacing: -0.3px; }
|
||||
.header p { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
|
||||
.header { display: flex; align-items: center; gap: 13px; margin-bottom: 1.5rem; animation: fadeUp 0.6s ease both; }
|
||||
.header-icon { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(150deg, var(--accent), var(--accent-strong)); color: #fff; box-shadow: 0 6px 16px -4px var(--accent-glow); display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; flex-shrink: 0; }
|
||||
.header-text { min-width: 0; }
|
||||
.header h1 { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.1; }
|
||||
.header p { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }
|
||||
|
||||
.tabs { display: flex; gap: 8px; background: var(--bg); box-shadow: var(--nm-in); border-radius: 14px; padding: 5px; margin-bottom: 1.3rem; animation: fadeUp 0.62s ease both; }
|
||||
.tab { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 10px; font-size: 13px; font-weight: 500; font-family: 'DM Sans', sans-serif; color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; }
|
||||
.tab.active { background: var(--bg); box-shadow: var(--nm-subtle); color: var(--accent); }
|
||||
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 1.4rem; animation: fadeUp 0.62s ease both; }
|
||||
.tab { flex: 1; padding: 9px 8px; border: none; background: transparent; border-radius: 9px; font-size: 13px; font-weight: 600; font-family: 'DM Sans', sans-serif; color: var(--text-secondary); cursor: pointer; transition: all 0.18s ease; }
|
||||
.tab:hover { color: var(--text-primary); }
|
||||
.tab.active { background: var(--surface); box-shadow: 0 1px 2px rgba(18,24,38,.08), 0 0 0 1px var(--line); color: var(--accent); }
|
||||
|
||||
.disclaimer { display: flex; align-items: flex-start; gap: 9px; background: var(--accent-soft); border-radius: 14px; padding: 0.8rem 1rem; margin-bottom: 1.3rem; font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
|
||||
.disclaimer { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--nm-subtle); border-radius: 13px; padding: 0.85rem 1rem; margin-bottom: 1.3rem; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
|
||||
.disclaimer strong { color: var(--accent); font-weight: 600; }
|
||||
|
||||
.dup-banner { display: none; align-items: center; gap: 10px; background: var(--warning-soft); border-radius: 14px; padding: 0.85rem 1rem; margin-bottom: 1.3rem; font-size: 13px; color: var(--text-primary); }
|
||||
.dup-banner { display: none; align-items: center; gap: 11px; background: var(--warning-soft); border: 1px solid rgba(189,107,18,0.22); border-radius: 13px; padding: 0.8rem 1rem; margin-bottom: 1.3rem; font-size: 13px; color: var(--text-primary); }
|
||||
.dup-banner.show { display: flex; }
|
||||
.dup-banner .ico { font-size: 18px; }
|
||||
.dup-banner .ico { font-size: 17px; }
|
||||
.dup-banner .msg { flex: 1; line-height: 1.4; }
|
||||
.dup-banner .msg b { color: var(--warning); font-weight: 600; }
|
||||
.dup-banner button { padding: 8px 14px; border-radius: 12px; border: none; background: var(--bg); box-shadow: var(--nm-subtle); color: var(--warning); font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 12.5px; white-space: nowrap; }
|
||||
.dup-banner button:active { box-shadow: var(--nm-in); }
|
||||
.dup-banner .msg b { color: var(--warning); font-weight: 700; }
|
||||
.dup-banner button { padding: 8px 14px; border-radius: 10px; border: none; background: var(--warning); box-shadow: 0 4px 10px -3px rgba(189,107,18,.5); color: #fff; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 12.5px; white-space: nowrap; transition: all 0.15s ease; }
|
||||
.dup-banner button:active { transform: scale(0.96); }
|
||||
|
||||
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.3rem; }
|
||||
.stat { background: var(--bg); border-radius: 16px; box-shadow: var(--nm-out); padding: 1rem 1.15rem; }
|
||||
.stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.8px; }
|
||||
.stat-value { font-size: 21px; font-weight: 600; margin-top: 4px; }
|
||||
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.4rem; }
|
||||
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--nm-out); padding: 0.95rem 1.1rem; }
|
||||
.stat-label { font-size: 10.5px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
|
||||
.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 25px; font-weight: 600; margin-top: 5px; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
|
||||
.stat-value.accent { color: var(--accent); }
|
||||
.stat-value.warning { color: var(--warning); }
|
||||
|
||||
.section-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px 4px; }
|
||||
.section-label { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.9px; margin: 0 0 12px 2px; display: flex; align-items: center; gap: 7px; }
|
||||
.btn-wide, .btn, .btn-save, .btn-cliente, .dup-banner button, .undo-fab, .btn-cobro, .btn-pagado, .btn-edit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
|
||||
.ic { flex: 0 0 auto; vertical-align: middle; }
|
||||
.opt-num { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
|
||||
|
||||
.card { background: var(--bg); border-radius: 18px; box-shadow: var(--nm-out); padding: 1.1rem 1.25rem; margin-bottom: 14px; animation: fadeUp 0.5s ease both; }
|
||||
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.7rem; gap: 10px; }
|
||||
.card-cliente { font-size: 15px; font-weight: 600; line-height: 1.25; }
|
||||
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--nm-out); padding: 1.15rem 1.25rem; margin-bottom: 14px; animation: fadeUp 0.5s ease both; }
|
||||
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; gap: 10px; }
|
||||
.card-cliente { font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: -0.2px; }
|
||||
.card-vehiculo { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
|
||||
.pill-tipo { font-size: 10.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.4px; display: inline-block; margin-top: 6px; }
|
||||
.pill-tipo { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.4px; display: inline-block; margin-top: 7px; }
|
||||
.pill-tipo.renta { background: var(--renta-soft); color: var(--renta); }
|
||||
.pill-tipo.extra { background: var(--extra-soft); color: var(--extra); }
|
||||
.pill-tipo.vr { background: var(--vr-soft); color: var(--vr); }
|
||||
.badge-atraso { background: var(--warning-soft); color: var(--warning); border-radius: 20px; padding: 4px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
|
||||
.badge-atraso { background: var(--warning-soft); color: var(--warning); border-radius: 999px; padding: 4px 11px; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.tel-row { display: flex; align-items: center; gap: 8px; background: var(--bg); box-shadow: var(--nm-in); border-radius: 11px; padding: 8px 12px; margin-bottom: 0.85rem; font-size: 12.5px; cursor: pointer; }
|
||||
.tel-row .tel-num { flex: 1; color: var(--text-primary); }
|
||||
.tel-row { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-bottom: 0.85rem; font-size: 12.5px; cursor: pointer; transition: all 0.15s ease; }
|
||||
.tel-row:hover { border-color: var(--line-strong); }
|
||||
.tel-row .tel-num { flex: 1; color: var(--text-primary); font-variant-numeric: tabular-nums; }
|
||||
.tel-row.empty .tel-num { color: var(--text-tertiary); }
|
||||
.tel-row .tel-edit { color: var(--text-tertiary); font-size: 12px; }
|
||||
.tel-row .tel-edit { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.4px; }
|
||||
|
||||
.desglose { display: flex; flex-direction: column; gap: 6px; padding: 0.75rem 0; border-top: 1px solid rgba(168,174,196,0.2); border-bottom: 1px solid rgba(168,174,196,0.2); margin-bottom: 0.85rem; }
|
||||
.desglose-row { display: flex; justify-content: space-between; font-size: 13px; }
|
||||
.desglose { display: flex; flex-direction: column; gap: 7px; padding: 0.8rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 0.85rem; }
|
||||
.desglose-row { display: flex; justify-content: space-between; font-size: 13px; gap: 10px; }
|
||||
.desglose-row .lbl { color: var(--text-secondary); }
|
||||
.desglose-row .val { font-weight: 500; }
|
||||
.desglose-row .val { font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.desglose-row.moratorio .val { color: var(--warning); }
|
||||
.desglose-row.abono .val { color: var(--success); }
|
||||
.mora-hint { font-size: 10px; color: var(--text-tertiary); font-weight: 400; }
|
||||
|
||||
/* Personalizar mensaje */
|
||||
.cuenta-card { background: var(--bg); box-shadow: var(--nm-subtle); border-radius: 14px; padding: 0.9rem 1rem; margin-bottom: 12px; }
|
||||
.cuenta-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 10px; }
|
||||
.cuenta-titulo { font-size: 13px; font-weight: 600; flex: 1; }
|
||||
.cuenta-toggle { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); }
|
||||
.cuenta-toggle input[type=checkbox] { width: 36px; height: 20px; appearance: none; background: var(--bg); box-shadow: var(--nm-in); border-radius: 12px; position: relative; cursor: pointer; transition: background 0.2s; }
|
||||
.cuenta-toggle input[type=checkbox]::before { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-tertiary); transition: all 0.2s; }
|
||||
.cuenta-toggle input[type=checkbox]:checked { background: var(--accent-soft); }
|
||||
.cuenta-toggle input[type=checkbox]:checked::before { left: 18px; background: var(--accent); }
|
||||
.cuenta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||||
.cuenta-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--nm-subtle); border-radius: 13px; padding: 0.95rem 1rem; margin-bottom: 12px; }
|
||||
.cuenta-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 10px; }
|
||||
.cuenta-titulo { font-size: 13px; font-weight: 700; flex: 1; line-height: 1.3; }
|
||||
.cuenta-toggle { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
|
||||
.cuenta-toggle input[type=checkbox] { width: 38px; height: 22px; appearance: none; -webkit-appearance: none; background: var(--line-strong); border-radius: 999px; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
|
||||
.cuenta-toggle input[type=checkbox]::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: all 0.2s; }
|
||||
.cuenta-toggle input[type=checkbox]:checked { background: var(--accent); }
|
||||
.cuenta-toggle input[type=checkbox]:checked::before { left: 18px; }
|
||||
.cuenta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
|
||||
.cuenta-grid .full { grid-column: 1 / -1; }
|
||||
.cuenta-grid label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 3px; font-weight: 600; }
|
||||
.cuenta-grid input { width: 100%; padding: 8px 11px; border-radius: 10px; background: var(--bg); box-shadow: var(--nm-in); border: none; font-size: 12.5px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; font-variant-numeric: tabular-nums; }
|
||||
.cuenta-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
|
||||
.cuenta-actions .btn-row-del { width: 32px; height: 32px; }
|
||||
.cuenta-grid label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 4px; font-weight: 700; }
|
||||
.cuenta-grid input { width: 100%; padding: 9px 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; font-variant-numeric: tabular-nums; transition: all 0.15s ease; }
|
||||
.cuenta-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
|
||||
.cuenta-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; align-items: center; }
|
||||
.cuenta-actions .btn-row-del { padding: 8px 14px; }
|
||||
|
||||
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; font-size: 13px; color: var(--text-primary); cursor: pointer; }
|
||||
.check-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
|
||||
.check-row { display: flex; align-items: center; gap: 11px; padding: 9px 2px; font-size: 13px; color: var(--text-primary); cursor: pointer; }
|
||||
.check-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
|
||||
|
||||
.preview-msg { background: var(--bg); box-shadow: var(--nm-in); border-radius: 14px; padding: 0.95rem 1.05rem; font-size: 12.5px; color: var(--text-primary); white-space: pre-wrap; line-height: 1.55; font-family: 'DM Sans', sans-serif; }
|
||||
.preview-msg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 1rem 1.1rem; font-size: 12.5px; color: var(--text-primary); white-space: pre-wrap; line-height: 1.6; font-family: 'DM Sans', sans-serif; }
|
||||
|
||||
.form-hint code { background: var(--accent-soft); color: var(--accent); padding: 1px 5px; border-radius: 5px; font-size: 11px; }
|
||||
.form-hint code { background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 5px; font-size: 11px; font-family: 'Space Grotesk', monospace; }
|
||||
|
||||
/* Renglones manuales */
|
||||
.tag-manual { font-size: 9px; padding: 2px 7px; border-radius: 8px; font-weight: 700; letter-spacing: 0.4px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
|
||||
.btn-row-del { width: 28px; height: 28px; border-radius: 8px; background: var(--bg); box-shadow: var(--nm-subtle); border: none; cursor: pointer; color: var(--danger); font-size: 12px; }
|
||||
.btn-row-del:active { box-shadow: var(--nm-in); }
|
||||
.tag-manual { font-size: 9px; padding: 2px 7px; border-radius: 6px; font-weight: 700; letter-spacing: 0.4px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
|
||||
.btn-row-del { padding: 6px 12px; border-radius: 8px; background: transparent; border: none; cursor: pointer; color: var(--danger); font-size: 11px; font-weight: 700; letter-spacing: 0.4px; transition: all 0.15s ease; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
|
||||
.btn-row-del:hover { background: var(--danger-soft); border-color: transparent; }
|
||||
.btn-row-del:active { transform: scale(0.94); }
|
||||
|
||||
/* Abonos pendientes */
|
||||
.pendientes-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0.85rem; }
|
||||
.ab-pendiente { display: flex; align-items: center; gap: 8px; background: var(--bg); box-shadow: var(--nm-subtle); border-radius: 12px; padding: 9px 11px; }
|
||||
.ab-pendiente { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; }
|
||||
.ab-info { flex: 1; min-width: 0; }
|
||||
.ab-monto { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
|
||||
.ab-monto { font-size: 13.5px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
|
||||
.ab-meta { font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.badge-pend { font-size: 9px; padding: 3px 8px; border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; background: var(--warning-soft); color: var(--warning); }
|
||||
.ab-btn { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: var(--bg); box-shadow: var(--nm-subtle); border: none; cursor: pointer; font-size: 13px; }
|
||||
.badge-pend { font-size: 9px; padding: 3px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; background: var(--warning-soft); color: var(--warning); }
|
||||
.ab-btn { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 13px; transition: all 0.15s ease; }
|
||||
.ab-btn.saldar { color: var(--success); }
|
||||
.ab-btn.cancelar { color: var(--danger); }
|
||||
.ab-btn:active { box-shadow: var(--nm-in); }
|
||||
.ab-btn:active { transform: scale(0.94); }
|
||||
|
||||
.progress-wrap { margin-bottom: 0.85rem; }
|
||||
.progress-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
|
||||
.progress-info .pct { color: var(--success); font-weight: 600; }
|
||||
.progress-bar { height: 8px; border-radius: 6px; background: var(--bg); box-shadow: var(--nm-in); overflow: hidden; }
|
||||
.progress-fill { height: 100%; border-radius: 6px; background: var(--success); transition: width 0.5s ease; }
|
||||
.abonos-list { margin-top: 8px; padding-left: 4px; }
|
||||
.abono-item { font-size: 11px; color: var(--text-tertiary); display: flex; justify-content: space-between; padding: 2px 0; }
|
||||
.progress-info .pct { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; }
|
||||
.progress-bar { height: 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
|
||||
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--success), #1bbd7d); transition: width 0.5s ease; }
|
||||
.abonos-list { margin-top: 9px; padding-left: 2px; }
|
||||
.abono-item { font-size: 11px; color: var(--text-tertiary); display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.card-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; }
|
||||
.card-total .lbl { font-size: 13px; color: var(--text-secondary); }
|
||||
.card-total .val { font-size: 20px; font-weight: 600; }
|
||||
.card-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.95rem; }
|
||||
.card-total .lbl { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
|
||||
.card-total .val { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
|
||||
|
||||
.card-actions { display: flex; gap: 10px; }
|
||||
.btn { flex: 1; padding: 11px; border-radius: 13px; border: none; font-size: 13px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 6px; }
|
||||
.btn-cobro { background: var(--accent); color: white; box-shadow: 0 6px 16px var(--accent-glow); }
|
||||
.card-actions { display: flex; gap: 9px; }
|
||||
.btn { flex: 1; padding: 11px; border-radius: 11px; border: 1px solid transparent; font-size: 13px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.17s ease; display: flex; align-items: center; justify-content: center; gap: 6px; }
|
||||
.btn-cobro { background: var(--accent); color: white; box-shadow: 0 6px 16px -5px var(--accent-glow); }
|
||||
.btn-cobro:hover { background: var(--accent-strong); }
|
||||
.btn-cobro:active { transform: scale(0.97); }
|
||||
.btn-pagado { background: var(--bg); color: var(--success); box-shadow: var(--nm-subtle); }
|
||||
.btn-pagado:active { box-shadow: var(--nm-in); }
|
||||
.btn-edit { flex: 0 0 auto; width: 42px; background: var(--bg); color: var(--text-secondary); box-shadow: var(--nm-subtle); }
|
||||
.btn-edit:active { box-shadow: var(--nm-in); }
|
||||
.btn-danger-soft { background: var(--bg); color: var(--danger); box-shadow: var(--nm-subtle); }
|
||||
.btn-pagado { background: var(--surface); color: var(--success); border-color: var(--line); }
|
||||
.btn-pagado:hover { background: var(--success-soft); border-color: transparent; }
|
||||
.btn-pagado:active { transform: scale(0.97); }
|
||||
.btn-edit { flex: 0 0 auto; width: auto; padding-left: 16px; padding-right: 16px; background: var(--surface); color: var(--text-secondary); border-color: var(--line); }
|
||||
.btn-edit:hover { background: var(--surface-2); }
|
||||
.btn-edit:active { transform: scale(0.97); }
|
||||
.btn-danger-soft { background: var(--surface); color: var(--danger); border-color: var(--line); }
|
||||
.btn-danger-soft:hover { background: var(--danger-soft); border-color: transparent; }
|
||||
|
||||
/* Modo edición inline */
|
||||
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
|
||||
.edit-field label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 4px; font-weight: 600; }
|
||||
.edit-field input { width: 100%; padding: 10px 12px; border-radius: 11px; background: var(--bg); box-shadow: var(--nm-in); border: none; font-size: 13px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; }
|
||||
.edit-field label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 5px; font-weight: 700; }
|
||||
.edit-field input { width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; transition: all 0.15s ease; }
|
||||
.edit-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
|
||||
.edit-field.full { grid-column: 1 / -1; }
|
||||
.edit-actions { display: flex; gap: 10px; }
|
||||
|
||||
.footer-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 1.5rem; }
|
||||
.btn-wide { width: 100%; padding: 14px; border-radius: 15px; border: none; font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg); box-shadow: var(--nm-out); color: var(--text-primary); }
|
||||
.btn-wide:active { box-shadow: var(--nm-in); }
|
||||
.btn-wide { width: 100%; padding: 13px; border-radius: 13px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.17s ease; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); box-shadow: var(--nm-subtle); color: var(--text-primary); }
|
||||
.btn-wide:hover { border-color: var(--line-strong); background: var(--surface-2); }
|
||||
.btn-wide:active { transform: scale(0.99); }
|
||||
.btn-wide.accent { color: var(--accent); }
|
||||
.btn-wide.accent:hover { background: var(--accent-soft); border-color: transparent; }
|
||||
.btn-wide.lote { color: var(--wa); }
|
||||
.btn-wide.lote:hover { background: var(--success-soft); border-color: transparent; }
|
||||
|
||||
.undo-fab { position: fixed; bottom: 1.3rem; left: 1.3rem; z-index: 90; padding: 12px 18px; border-radius: 16px; border: none; background: var(--bg); box-shadow: var(--nm-out); color: var(--text-primary); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: all 0.2s ease; }
|
||||
.undo-fab:active { box-shadow: var(--nm-in); }
|
||||
.undo-fab { position: fixed; bottom: 1.3rem; left: 1.3rem; z-index: 90; padding: 11px 17px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 22px -6px rgba(18,24,38,.22); color: var(--text-primary); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: all 0.17s ease; }
|
||||
.undo-fab:hover { background: var(--surface-2); }
|
||||
.undo-fab:active { transform: scale(0.96); }
|
||||
.undo-fab:disabled { opacity: 0.4; cursor: default; }
|
||||
|
||||
/* Wrap: scrollable en ambos ejes con tope de altura para que el sticky
|
||||
funcione en móvil dentro del panel. */
|
||||
.tabla-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 72vh; background: var(--bg); box-shadow: var(--nm-out); border-radius: 16px; }
|
||||
table.tabla { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg); font-size: 11px; }
|
||||
/* Fondo del header: color sólido SIN alpha. Si tuviera rgba con
|
||||
transparencia, las filas se verían atravesadas al hacer scroll. */
|
||||
table.tabla th { background: #dfe4f3; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; padding: 11px 6px; text-align: right; font-size: 9.5px; }
|
||||
table.tabla th:first-child, table.tabla td:first-child { text-align: left; padding-left: 12px; }
|
||||
table.tabla td { padding: 9px 6px; text-align: right; border-top: 1px solid rgba(168,174,196,0.15); background: var(--bg); }
|
||||
table.tabla td.cliente { font-weight: 600; font-size: 11px; }
|
||||
table.tabla td.veh { color: var(--text-secondary); font-size: 10px; }
|
||||
.tabla-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 72vh; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--nm-out); border-radius: 14px; }
|
||||
table.tabla { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); font-size: 11px; }
|
||||
table.tabla th { background: #eef1f6; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; padding: 11px 7px; text-align: right; font-size: 9.5px; }
|
||||
table.tabla th:first-child, table.tabla td:first-child { text-align: left; padding-left: 13px; }
|
||||
table.tabla td { padding: 14px 11px; text-align: right; border-top: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums; }
|
||||
table.tabla td.cliente { font-weight: 700; font-size: 11px; }
|
||||
table.tabla td.veh { color: var(--text-secondary); font-size: 10px; font-weight: 400; }
|
||||
table.tabla td.mora { color: var(--warning); }
|
||||
table.tabla td.total { font-weight: 600; color: var(--accent); }
|
||||
table.tabla td.total { font-weight: 700; color: var(--accent); }
|
||||
table.tabla .pill-tipo { font-size: 9px; padding: 2px 6px; }
|
||||
table.tabla thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 2px 5px -3px rgba(18,24,38,.4); }
|
||||
table.tabla tbody td:first-child { position: sticky; left: 0; z-index: 1; background: #ffffff; box-shadow: 3px 0 6px -4px rgba(18,24,38,.28); min-width: 150px; max-width: 220px; }
|
||||
table.tabla thead th:first-child { position: sticky; left: 0; top: 0; z-index: 3; background: #e8ecf3; box-shadow: 3px 3px 6px -3px rgba(18,24,38,.35); min-width: 150px; max-width: 220px; }
|
||||
|
||||
/* Sticky en dos ejes:
|
||||
z-index 3 (esquina) > 2 (encabezado) > 1 (columna Cliente) > 0 (celdas).
|
||||
TODOS los fondos sticky son SÓLIDOS (sin alpha) para que nada se
|
||||
transparente al hacer scroll. */
|
||||
table.tabla thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 3px 6px -3px rgba(120,130,160,0.55); }
|
||||
table.tabla tbody td:first-child { position: sticky; left: 0; z-index: 1; background: #e8eaf0; box-shadow: 3px 0 6px -3px rgba(120,130,160,0.45); min-width: 150px; max-width: 220px; }
|
||||
table.tabla thead th:first-child { position: sticky; left: 0; top: 0; z-index: 3; background: #cfd6e7; box-shadow: 3px 3px 6px -3px rgba(120,130,160,0.6); min-width: 150px; max-width: 220px; }
|
||||
|
||||
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(200,204,220,0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 100; align-items: center; justify-content: center; padding: 1.2rem; }
|
||||
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(19,25,34,0.40); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 100; align-items: center; justify-content: center; padding: 1.2rem; }
|
||||
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
|
||||
.modal { background: var(--bg); border-radius: 26px; box-shadow: 12px 12px 32px var(--shadow-dark), -8px -8px 24px var(--shadow-light); padding: 1.6rem; width: 100%; max-width: 440px; animation: slideUp 0.32s cubic-bezier(0.34,1.2,0.64,1) both; max-height: 90vh; overflow-y: auto; }
|
||||
.modal { background: var(--surface); border-radius: 20px; box-shadow: 0 24px 60px -12px rgba(15,22,38,.4); border: 1px solid var(--line); padding: 1.6rem; width: 100%; max-width: 440px; animation: slideUp 0.32s cubic-bezier(0.34,1.2,0.64,1) both; max-height: 90vh; overflow-y: auto; }
|
||||
.modal.lote { max-width: 540px; }
|
||||
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
|
||||
.modal-title { font-size: 17px; font-weight: 600; }
|
||||
.modal-close { width: 32px; height: 32px; border-radius: 10px; background: var(--bg); box-shadow: var(--nm-subtle); border: none; cursor: pointer; color: var(--text-secondary); font-size: 18px; }
|
||||
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }
|
||||
.modal-close { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; color: var(--text-secondary); font-size: 18px; line-height: 1; transition: all 0.15s ease; }
|
||||
.modal-close:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
|
||||
|
||||
.opt-card { background: var(--bg); border-radius: 15px; box-shadow: var(--nm-subtle); padding: 1rem 1.15rem; margin-bottom: 12px; cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent; }
|
||||
.opt-card:active { box-shadow: var(--nm-in); }
|
||||
.opt-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
|
||||
.opt-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; padding-left: 26px; }
|
||||
.opt-monto { color: var(--accent); font-weight: 600; }
|
||||
.opt-card { background: var(--surface); border-radius: 13px; box-shadow: none; border: 1.5px solid var(--line); padding: 1rem 1.15rem; margin-bottom: 11px; cursor: pointer; transition: all 0.17s ease; }
|
||||
.opt-card:hover { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.opt-card:active { transform: scale(0.99); }
|
||||
.opt-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
|
||||
.opt-desc { font-size: 12px; color: var(--text-secondary); margin-top: 5px; padding-left: 26px; }
|
||||
.opt-monto { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.form-group { margin-bottom: 1rem; }
|
||||
.form-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; display: block; }
|
||||
.form-input { width: 100%; padding: 12px 16px; border-radius: 13px; background: var(--bg); box-shadow: var(--nm-in); border: none; font-size: 14px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; }
|
||||
.form-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }
|
||||
.btn-save { width: 100%; padding: 14px; border-radius: 15px; background: var(--accent); box-shadow: 0 8px 24px var(--accent-glow); border: none; cursor: pointer; color: white; font-size: 15px; font-weight: 500; font-family: 'DM Sans', sans-serif; }
|
||||
.form-group { margin-bottom: 1.1rem; }
|
||||
.form-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; display: block; }
|
||||
.form-input { width: 100%; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; transition: all 0.15s ease; }
|
||||
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
|
||||
textarea.form-input { line-height: 1.5; resize: vertical; }
|
||||
.form-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 7px; line-height: 1.5; }
|
||||
.btn-save { width: 100%; padding: 13px; border-radius: 12px; background: var(--accent); box-shadow: 0 8px 20px -6px var(--accent-glow); border: none; cursor: pointer; color: white; font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; transition: all 0.17s ease; }
|
||||
.btn-save:hover { background: var(--accent-strong); }
|
||||
.btn-save:active { transform: scale(0.98); }
|
||||
|
||||
.link-result { background: var(--bg); box-shadow: var(--nm-in); border-radius: 13px; padding: 1rem; margin-bottom: 1rem; text-align: center; }
|
||||
.link-result .check { font-size: 30px; margin-bottom: 8px; }
|
||||
.link-result { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; text-align: center; }
|
||||
.link-result .check { font-size: 28px; margin-bottom: 8px; }
|
||||
.link-result .ltext { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
|
||||
.link-url { font-size: 12px; color: var(--accent); word-break: break-all; background: var(--accent-soft); padding: 8px 12px; border-radius: 10px; }
|
||||
.link-url { font-size: 12px; color: var(--accent); word-break: break-all; background: var(--accent-soft); padding: 8px 12px; border-radius: 9px; }
|
||||
|
||||
.entrega-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 1px; margin: 1rem 0 10px; text-align: center; }
|
||||
.btn-cliente { width: 100%; padding: 14px; border-radius: 15px; background: var(--wa); box-shadow: 0 8px 22px rgba(37,184,106,0.25); border: none; cursor: pointer; color: white; font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
|
||||
.entrega-label { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.9px; margin: 1rem 0 11px; text-align: center; }
|
||||
.btn-cliente { width: 100%; padding: 13px; border-radius: 12px; background: var(--wa); box-shadow: 0 8px 20px -6px rgba(31,175,90,0.45); border: none; cursor: pointer; color: white; font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; transition: all 0.17s ease; }
|
||||
.btn-cliente:hover { filter: brightness(1.05); }
|
||||
.btn-cliente:active { transform: scale(0.98); }
|
||||
.reenvio-divider { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-bottom: 10px; }
|
||||
.reenvio-divider { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-bottom: 11px; }
|
||||
.reenvio-row { display: flex; gap: 10px; }
|
||||
.reenvio-row select { flex: 1; padding: 12px 14px; border-radius: 13px; background: var(--bg); box-shadow: var(--nm-in); border: none; font-size: 13px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; -webkit-appearance: none; }
|
||||
.btn-reenviar { flex: 0 0 auto; width: 54px; border-radius: 13px; background: var(--bg); box-shadow: var(--nm-subtle); border: none; cursor: pointer; color: var(--accent); font-size: 17px; }
|
||||
.btn-reenviar:active { box-shadow: var(--nm-in); }
|
||||
.reenvio-row select { flex: 1; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; -webkit-appearance: none; }
|
||||
.reenvio-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
.btn-reenviar { flex: 0 0 auto; width: 54px; border-radius: 11px; background: var(--accent); border: none; cursor: pointer; color: #fff; font-size: 17px; transition: all 0.15s ease; }
|
||||
.btn-reenviar:active { transform: scale(0.95); }
|
||||
|
||||
.lote-row { background: var(--bg); box-shadow: var(--nm-subtle); border-radius: 14px; padding: 0.85rem 0.95rem; margin-bottom: 11px; transition: opacity 0.2s ease; }
|
||||
.lote-row.off { opacity: 0.45; }
|
||||
.lote-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
|
||||
.lote-check { width: 26px; height: 26px; border-radius: 8px; background: var(--bg); box-shadow: var(--nm-in); border: none; cursor: pointer; color: var(--success); font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
||||
.lote-check.on { box-shadow: var(--nm-subtle); }
|
||||
.lote-cli { flex: 1; font-size: 13px; font-weight: 600; line-height: 1.25; }
|
||||
.lote-row { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--nm-subtle); border-radius: 13px; padding: 0.9rem 0.95rem; margin-bottom: 11px; transition: opacity 0.2s ease, border-color 0.15s ease; }
|
||||
.lote-row.off { opacity: 0.5; }
|
||||
.lote-row-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
|
||||
.lote-check { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-strong); cursor: pointer; color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s ease; }
|
||||
.lote-check.on { background: var(--accent); border-color: var(--accent); }
|
||||
.lote-cli { flex: 1; font-size: 13px; font-weight: 700; line-height: 1.3; }
|
||||
.lote-veh { font-size: 10px; color: var(--text-secondary); font-weight: 400; }
|
||||
.badge-sin { font-size: 9px; color: var(--danger); background: var(--danger-soft); padding: 3px 8px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
|
||||
.badge-sin { font-size: 9px; color: var(--danger); background: var(--danger-soft); padding: 3px 8px; border-radius: 6px; font-weight: 700; white-space: nowrap; }
|
||||
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
|
||||
.seg-btn { padding: 8px 4px; border-radius: 10px; background: var(--bg); box-shadow: var(--nm-subtle); border: none; font-family: 'DM Sans', sans-serif; font-size: 10.5px; font-weight: 500; color: var(--text-secondary); cursor: pointer; line-height: 1.35; text-align: center; transition: all 0.15s ease; }
|
||||
.seg-btn.active { box-shadow: var(--nm-in); color: var(--accent); }
|
||||
.seg-btn span { display: block; font-size: 10px; color: var(--text-tertiary); font-weight: 600; margin-top: 2px; }
|
||||
.seg-btn { padding: 8px 4px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-family: 'DM Sans', sans-serif; font-size: 10.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; line-height: 1.35; text-align: center; transition: all 0.15s ease; }
|
||||
.seg-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
|
||||
.seg-btn span { display: block; font-size: 10px; color: var(--text-tertiary); font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
|
||||
.seg-btn.active span { color: var(--accent); }
|
||||
.lote-personal { margin-top: 9px; }
|
||||
.lote-personal input { width: 100%; padding: 9px 12px; border-radius: 11px; background: var(--bg); box-shadow: var(--nm-in); border: none; font-size: 13px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; }
|
||||
.lote-summary { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin: 1.2rem 0 1rem; padding: 0 4px; }
|
||||
.lote-personal input { width: 100%; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; }
|
||||
.lote-personal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
|
||||
.lote-summary { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin: 1.2rem 0 1rem; padding: 0 2px; }
|
||||
.lote-summary .lt { color: var(--text-secondary); }
|
||||
.lote-summary .lv { font-weight: 600; color: var(--accent); font-size: 18px; }
|
||||
.lote-summary .lv { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--accent); font-size: 19px; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(90px); background: var(--text-primary); color: white; padding: 11px 22px; border-radius: 20px; font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px rgba(45,49,72,0.3); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); z-index: 200; white-space: nowrap; max-width: 90vw; }
|
||||
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(90px); background: var(--text-primary); color: white; padding: 11px 22px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: 0 12px 28px rgba(15,22,38,0.35); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); z-index: 200; white-space: nowrap; max-width: 90vw; }
|
||||
.toast.show { transform: translateX(-50%) translateY(0); }
|
||||
|
||||
.view { display: none; }
|
||||
.view.active { display: block; animation: fadeUp 0.4s ease both; }
|
||||
|
||||
/* Directorio */
|
||||
.dir-card { background: var(--bg); box-shadow: var(--nm-subtle); border-radius: 13px; padding: 0.85rem 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
|
||||
.dir-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.3; word-break: break-word; }
|
||||
.dir-tel { flex: 0 0 130px; padding: 8px 11px; border-radius: 10px; background: var(--bg); box-shadow: var(--nm-in); border: none; font-size: 12.5px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; font-variant-numeric: tabular-nums; }
|
||||
.dir-save { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: var(--bg); box-shadow: var(--nm-subtle); border: none; cursor: pointer; color: var(--accent); font-size: 15px; }
|
||||
.dir-save:active { box-shadow: var(--nm-in); }
|
||||
.dir-save.saved { color: var(--success); }
|
||||
.tel-fuente { font-size: 10px; padding: 2px 8px; border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-left: 6px; }
|
||||
.dir-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--nm-subtle); border-radius: 12px; padding: 0.85rem 1rem; margin-bottom: 9px; display: flex; align-items: center; gap: 11px; }
|
||||
.dir-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3; word-break: break-word; }
|
||||
.dir-tel { flex: 0 0 130px; padding: 9px 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-primary); font-family: 'DM Sans', sans-serif; outline: none; font-variant-numeric: tabular-nums; transition: all 0.15s ease; }
|
||||
.dir-tel:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
|
||||
.dir-save { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--accent); font-size: 15px; transition: all 0.15s ease; }
|
||||
.dir-save:hover { background: var(--accent-soft); border-color: transparent; }
|
||||
.dir-save:active { transform: scale(0.94); }
|
||||
.dir-save.saved { color: var(--success); background: var(--success-soft); border-color: transparent; }
|
||||
.tel-fuente { font-size: 10px; padding: 2px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-left: 6px; }
|
||||
.tel-fuente.directorio { background: var(--accent-soft); color: var(--accent); }
|
||||
.tel-fuente.personalizado { background: var(--warning-soft); color: var(--warning); }
|
||||
|
||||
/* Pantalla de Acceso expirado: oculta por default. */
|
||||
.expired-screen { display: none; position: fixed; inset: 0; z-index: 300; background: var(--bg); align-items: center; justify-content: center; padding: 24px; }
|
||||
.expired-card { background: var(--bg); border-radius: 28px; box-shadow: var(--nm-out); padding: 40px 32px; max-width: 380px; width: 100%; text-align: center; }
|
||||
.expired-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--bg); box-shadow: var(--nm-out); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 36px; }
|
||||
.expired-card h1 { font-size: 22px; font-weight: 600; margin: 0 0 12px; color: var(--text-primary); }
|
||||
.expired-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--nm-out); padding: 40px 32px; max-width: 380px; width: 100%; text-align: center; }
|
||||
.expired-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; font-size: 34px; }
|
||||
.expired-card h1 { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; margin: 0 0 12px; color: var(--text-primary); }
|
||||
.expired-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.55; margin: 0; }
|
||||
.expired-card strong { color: var(--accent); font-weight: 600; }
|
||||
|
||||
@@ -279,9 +311,11 @@
|
||||
<div class="container">
|
||||
|
||||
<div class="header">
|
||||
<div class="header-icon">💼</div>
|
||||
<h1>Cobranza acumulada</h1>
|
||||
<p id="userline">Cargando…</p>
|
||||
<div class="header-icon">WK</div>
|
||||
<div class="header-text">
|
||||
<h1>Cobranza acumulada</h1>
|
||||
<p id="userline">WK Cobranza</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabs">
|
||||
@@ -291,15 +325,10 @@
|
||||
<button class="tab" onclick="setView('mensaje', this)">Mensaje</button>
|
||||
</div>
|
||||
|
||||
<div class="disclaimer">
|
||||
<span>💡</span>
|
||||
<span>Acumula vencimientos diariamente a las <strong>9:30 am</strong>. Cada concepto (renta, extra, VR) se cobra por separado.</span>
|
||||
</div>
|
||||
|
||||
<div class="dup-banner" id="dup-banner">
|
||||
<span class="ico">⚠️</span>
|
||||
<span class="ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86 1.82 18a1 1 0 0 0 .86 1.5h16.64a1 1 0 0 0 .86-1.5L13.71 3.86a1 1 0 0 0-1.72 0z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg></span>
|
||||
<span class="msg"><b id="dup-count">0</b> conceptos duplicados detectados.</span>
|
||||
<button onclick="eliminarDuplicados()">🧹 Eliminar</button>
|
||||
<button onclick="eliminarDuplicados()"><svg class="ic" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V6"/></svg> Eliminar</button>
|
||||
</div>
|
||||
|
||||
<div class="summary">
|
||||
@@ -311,24 +340,24 @@
|
||||
<div class="section-label" id="section-count">renglones</div>
|
||||
<div id="lista"></div>
|
||||
<div class="footer-actions">
|
||||
<button class="btn-wide" onclick="abrirCrearRenglon()">➕ Agregar renglón</button>
|
||||
<button class="btn-wide lote" onclick="abrirLote()">📤 Cobrar en lote</button>
|
||||
<button class="btn-wide accent" onclick="cargarCobranza()">⬇️ Cargar cobranza de hoy</button>
|
||||
<button class="btn-wide" onclick="abrirCrearRenglon()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg> Agregar renglón</button>
|
||||
<button class="btn-wide lote" onclick="abrirLote()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg> Cobrar en lote</button>
|
||||
<button class="btn-wide accent" onclick="cargarCobranza()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"/></svg> Cargar cobranza de hoy</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="view" id="view-tabla">
|
||||
<div class="section-label">Vista tabla — desliza horizontal →</div>
|
||||
<button class="btn-wide" style="margin-bottom:12px" onclick="abrirCrearRenglon()">➕ Agregar renglón</button>
|
||||
<button class="btn-wide" style="margin-bottom:12px" onclick="abrirCrearRenglon()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg> Agregar renglón</button>
|
||||
<div class="tabla-wrap"><table class="tabla" id="tabla"></table></div>
|
||||
</div>
|
||||
|
||||
<div class="view" id="view-mensaje">
|
||||
<div class="section-label">🏦 Cuentas para transferencia SPEI</div>
|
||||
<div class="section-label"><svg class="ic" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21h18M4 10h16M5 6l7-3 7 3M5 10v11M19 10v11M9 14v3M15 14v3"/></svg> Cuentas para transferencia SPEI</div>
|
||||
<div id="cuentas-lista"></div>
|
||||
<button class="btn-wide" style="margin:0 0 22px" onclick="abrirNuevaCuenta()">➕ Agregar otra cuenta</button>
|
||||
<button class="btn-wide" style="margin:0 0 22px" onclick="abrirNuevaCuenta()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg> Agregar otra cuenta</button>
|
||||
|
||||
<div class="section-label">✉️ Plantilla del mensaje</div>
|
||||
<div class="section-label"><svg class="ic" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 6 10-6"/></svg> Plantilla del mensaje</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">Saludo</label>
|
||||
<textarea class="form-input" id="pl-saludo" rows="2" oninput="renderVistaPreviaMsg()"></textarea>
|
||||
@@ -348,32 +377,32 @@
|
||||
<label class="check-row"><input type="checkbox" id="pl-link" onchange="renderVistaPreviaMsg()"> Incluir link de pago (Conekta)</label>
|
||||
</div>
|
||||
|
||||
<button class="btn-save" onclick="guardarPlantilla()">💾 Guardar plantilla</button>
|
||||
<button class="btn-save" onclick="guardarPlantilla()">Guardar plantilla</button>
|
||||
|
||||
<div class="section-label" style="margin-top:24px">👁 Vista previa</div>
|
||||
<div class="section-label" style="margin-top:24px"><svg class="ic" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></svg> Vista previa</div>
|
||||
<div class="preview-msg" id="preview-msg"></div>
|
||||
</div>
|
||||
|
||||
<div class="view" id="view-directorio">
|
||||
<div class="section-label">Contactos manuales</div>
|
||||
<div id="manual-lista"></div>
|
||||
<button class="btn-wide" style="margin:0 0 18px" onclick="abrirCrearManual()">➕ Agregar contacto manual</button>
|
||||
<button class="btn-wide" style="margin:0 0 18px" onclick="abrirCrearManual()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg> Agregar contacto manual</button>
|
||||
|
||||
<div class="section-label">Clientes del Sheet</div>
|
||||
<input type="text" id="dir-buscar" class="form-input" placeholder="🔎 Buscar cliente…" oninput="renderDirectorio()" style="margin-bottom:14px">
|
||||
<input type="text" id="dir-buscar" class="form-input" placeholder="Buscar cliente…" oninput="renderDirectorio()" style="margin-bottom:14px">
|
||||
<div id="dir-lista"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="undo-fab" id="undo-fab" onclick="deshacer()">↩️ Deshacer</button>
|
||||
<button class="undo-fab" id="undo-fab" onclick="deshacer()"><svg class="ic" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h11a5 5 0 0 1 0 10h-1"/></svg> Deshacer</button>
|
||||
|
||||
<div class="modal-overlay" id="modal"><div class="modal" id="modal-inner"></div></div>
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<section id="expired" class="expired-screen">
|
||||
<div class="expired-card">
|
||||
<div class="expired-icon">🔒</div>
|
||||
<div class="expired-icon"><svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg></div>
|
||||
<h1>Link expirado</h1>
|
||||
<p>Envía <strong>mi cobranza</strong> al bot de WhatsApp para obtener uno nuevo.</p>
|
||||
</div>
|
||||
@@ -459,8 +488,8 @@ function renderDirectorio(){
|
||||
contManual.innerHTML = manuales.map(c => `
|
||||
<div class="dir-card" data-id="${escapeAttr(c.id||'')}">
|
||||
<div class="dir-name">${c.nombre}<div style="font-size:10px;color:var(--text-tertiary);font-weight:400">+521 ${fmtTel(c.telefono)}</div></div>
|
||||
<button class="dir-save" onclick="abrirEditarManual('${escapeAttr(c.id||'')}')" title="Editar">✏️</button>
|
||||
<button class="dir-save" style="color:var(--danger)" onclick="eliminarManual('${escapeAttr(c.id||'')}')" title="Eliminar">🗑</button>
|
||||
<button class="dir-save" style="color:var(--accent);width:auto;height:auto;padding:9px 14px;background:transparent;border:none;font-size:11px;font-weight:700;letter-spacing:0.4px;white-space:nowrap" onclick="abrirEditarManual('${escapeAttr(c.id||'')}')" title="Editar">EDITAR</button>
|
||||
<button class="dir-save" style="color:var(--danger);width:auto;height:auto;padding:9px 14px;background:transparent;border:none;font-size:11px;font-weight:700;letter-spacing:0.4px;white-space:nowrap" onclick="eliminarManual('${escapeAttr(c.id||'')}')" title="Eliminar">BORRAR</button>
|
||||
</div>`).join("");
|
||||
}
|
||||
}
|
||||
@@ -482,7 +511,7 @@ function renderDirectorio(){
|
||||
<input class="dir-tel" maxlength="10" inputmode="numeric" placeholder="10 dígitos"
|
||||
value="${c.telefono||''}" data-norm="${escapeAttr(c.nombre_norm)}"
|
||||
oninput="this.value=this.value.replace(/\\D/g,'').slice(0,10)">
|
||||
<button class="dir-save" onclick="guardarDirectorio('${escapeAttr(c.nombre_norm)}', this)" title="Guardar">💾</button>
|
||||
<button class="dir-save" style="color:var(--renta);width:auto;height:auto;padding:9px 14px;background:transparent;border:none;font-size:11px;font-weight:700;letter-spacing:0.4px;white-space:nowrap" onclick="guardarDirectorio('${escapeAttr(c.nombre_norm)}', this)" title="Guardar">GUARDAR</button>
|
||||
</div>`).join("");
|
||||
}
|
||||
|
||||
@@ -635,9 +664,9 @@ function renderCardNormal(r){
|
||||
const badge = (fuente === "personalizado")
|
||||
? `<span class="tel-fuente personalizado">personalizado</span>`
|
||||
: `<span class="tel-fuente directorio">del directorio</span>`;
|
||||
tel = `<div class="tel-row" onclick="editarTel('${r.id}')"><span>📱</span><span class="tel-num">+521 ${fmtTel(telEf)}${nombreOverride}${badge}</span><span class="tel-edit">✏️</span></div>`;
|
||||
tel = `<div class="tel-row" onclick="editarTel('${r.id}')"><span class="tel-ico"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="2" width="12" height="20" rx="2"/><path d="M11 18h2"/></svg></span><span class="tel-num">+521 ${fmtTel(telEf)}${nombreOverride}${badge}</span><span class="tel-edit">EDITAR</span></div>`;
|
||||
} else {
|
||||
tel = `<div class="tel-row empty" onclick="editarTel('${r.id}')"><span>📱</span><span class="tel-num">Agregar número de cliente</span><span class="tel-edit">+</span></div>`;
|
||||
tel = `<div class="tel-row empty" onclick="editarTel('${r.id}')"><span class="tel-ico"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="2" width="12" height="20" rx="2"/><path d="M11 18h2"/></svg></span><span class="tel-num">Agregar número de cliente</span><span class="tel-edit">+</span></div>`;
|
||||
}
|
||||
const conceptoLbl = TIPO_LABEL[r.tipo] || "Concepto";
|
||||
const abonosArr = (r.abonos || []);
|
||||
@@ -661,7 +690,7 @@ function renderCardNormal(r){
|
||||
<div class="ab-pendiente">
|
||||
<div class="ab-info">
|
||||
<div class="ab-monto">${fmt(a.monto)}</div>
|
||||
<div class="ab-meta">📅 ${fmtFechaEs(a.fecha) || a.fecha || ""}${a.concepto ? " · " + a.concepto : ""}</div>
|
||||
<div class="ab-meta"><svg class="ic" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-1px;margin-right:3px"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>${fmtFechaEs(a.fecha) || a.fecha || ""}${a.concepto ? " · " + a.concepto : ""}</div>
|
||||
</div>
|
||||
<span class="badge-pend">pendiente</span>
|
||||
<button class="ab-btn saldar" onclick="saldarAbono('${r.id}','${a.id}')" title="Saldar">✓</button>
|
||||
@@ -681,9 +710,9 @@ function renderCardNormal(r){
|
||||
}
|
||||
let venceLinea = "";
|
||||
if((r.tipo === "vr" || r.tipo === "extra") && r.fecha_vencimiento){
|
||||
venceLinea = `<div style="font-size:11.5px;color:var(--text-secondary);margin-top:5px">📅 Vence: ${fmtFechaEs(r.fecha_vencimiento)}</div>`;
|
||||
venceLinea = `<div style="font-size:11.5px;color:var(--text-secondary);margin-top:5px"><svg class="ic" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-1px;margin-right:3px"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>Vence: ${fmtFechaEs(r.fecha_vencimiento)}</div>`;
|
||||
} else if(r.tipo === "renta" && r.dia_pago){
|
||||
venceLinea = `<div style="font-size:11.5px;color:var(--text-secondary);margin-top:5px">📅 Día de pago: ${r.dia_pago} de cada mes</div>`;
|
||||
venceLinea = `<div style="font-size:11.5px;color:var(--text-secondary);margin-top:5px"><svg class="ic" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-1px;margin-right:3px"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>Día de pago: ${r.dia_pago} de cada mes</div>`;
|
||||
}
|
||||
return `
|
||||
<div class="card-top">
|
||||
@@ -701,9 +730,9 @@ function renderCardNormal(r){
|
||||
${prog}
|
||||
<div class="card-total"><span class="lbl">Saldo pendiente</span><span class="val">${fmt(saldo)}</span></div>
|
||||
<div class="card-actions">
|
||||
<button class="btn btn-cobro" onclick="abrirCobro('${r.id}')">💳 Generar cobro</button>
|
||||
<button class="btn btn-cobro" onclick="abrirCobro('${r.id}')"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/></svg> Generar cobro</button>
|
||||
<button class="btn btn-pagado" onclick="marcarPagado('${r.id}')">✓ Saldar</button>
|
||||
<button class="btn btn-edit" onclick="entrarEdicion('${r.id}')">✏️</button>
|
||||
<button class="btn btn-edit" onclick="entrarEdicion('${r.id}')">Editar</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
@@ -738,9 +767,9 @@ function renderEditInline(r){
|
||||
<div class="edit-field"><label>Teléfono (10 díg.)</label><input value="${escapeAttr(editDraft.telefono)}" maxlength="10" inputmode="numeric" oninput="editDraft.telefono=this.value.replace(/\\D/g,'').slice(0,10)"></div>
|
||||
</div>
|
||||
<div class="edit-actions">
|
||||
<button class="btn btn-cobro" onclick="guardarEdicion()">💾 Guardar</button>
|
||||
<button class="btn btn-cobro" style="background:var(--renta);box-shadow:0 6px 16px -5px rgba(37,99,201,0.4)" onclick="guardarEdicion()">Guardar</button>
|
||||
<button class="btn btn-pagado" onclick="cancelarEdicion()">Cancelar</button>
|
||||
<button class="btn btn-danger-soft" onclick="eliminarEditado()" title="Eliminar renglón">🗑</button>
|
||||
<button class="btn btn-danger-soft" onclick="eliminarEditado()" title="Eliminar renglón">BORRAR</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
@@ -808,7 +837,7 @@ function renderTabla(){
|
||||
<td class="mora">${fmtK(r.moratorio)}</td>
|
||||
<td style="color:var(--success)">${(Number(r.abonado)||0) > 0 ? fmtK(r.abonado) : "—"}</td>
|
||||
<td class="total">${fmtK(r.saldo)}</td>
|
||||
<td><button class="btn-row-del" onclick="eliminarRenglon('${r.id}', '${escapeAttr(r.cliente)}')" title="Eliminar">🗑</button></td>
|
||||
<td><button class="btn-row-del" onclick="eliminarRenglon('${r.id}', '${escapeAttr(r.cliente)}')" title="Eliminar">BORRAR</button></td>
|
||||
</tr>`;
|
||||
}).join("");
|
||||
// Envolvemos en thead/tbody para que el sticky sea consistente entre browsers.
|
||||
@@ -823,7 +852,7 @@ function editarTel(id){
|
||||
const dirTel = r.telefono_directorio || "";
|
||||
const override = r.telefono || "";
|
||||
const yaSugerido = dirTel
|
||||
? `<div style="font-size:12px;color:var(--text-secondary);margin-bottom:8px;">📒 En el directorio: <strong>+521 ${fmtTel(dirTel)}</strong></div>`
|
||||
? `<div style="font-size:12px;color:var(--text-secondary);margin-bottom:8px;"><svg class="ic" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-2px;margin-right:4px"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>En el directorio: <strong>+521 ${fmtTel(dirTel)}</strong></div>`
|
||||
: `<div style="font-size:12px;color:var(--text-tertiary);margin-bottom:8px;">Este cliente aún no tiene número en el directorio.</div>`;
|
||||
// Dropdown agrupado: contactos del Sheet, contactos manuales, opción
|
||||
// de "Agregar contacto nuevo…" siempre al final.
|
||||
@@ -840,7 +869,7 @@ function editarTel(id){
|
||||
let selectorHTML = `<option value="">— elegir contacto —</option>`;
|
||||
if(sheetOpts) selectorHTML += `<optgroup label="Clientes del Sheet">${sheetOpts}</optgroup>`;
|
||||
if(manualOpts) selectorHTML += `<optgroup label="Contactos manuales">${manualOpts}</optgroup>`;
|
||||
selectorHTML += `<option value="__nuevo__">➕ Agregar contacto nuevo…</option>`;
|
||||
selectorHTML += `<option value="__nuevo__">+ Agregar contacto nuevo…</option>`;
|
||||
|
||||
document.getElementById("modal-inner").innerHTML = `
|
||||
<div class="modal-header"><span class="modal-title">Número de cobro</span><button class="modal-close" onclick="cerrar()">×</button></div>
|
||||
@@ -869,7 +898,7 @@ function editarTel(id){
|
||||
<input type="text" maxlength="100" class="form-input" id="inp-nuevo-nombre" placeholder="Nombre del contacto" style="margin-bottom:8px">
|
||||
<input type="tel" maxlength="10" inputmode="numeric" class="form-input" id="inp-nuevo-tel" placeholder="Teléfono (10 díg.)"
|
||||
oninput="this.value=this.value.replace(/\\D/g,'').slice(0,10)">
|
||||
<button class="btn btn-cobro" style="width:100%;margin-top:10px;padding:11px" onclick="crearContactoNuevoYUsar('${id}')">💾 Guardar y usar para este cobro</button>
|
||||
<button class="btn btn-cobro" style="width:100%;margin-top:10px;padding:11px" onclick="crearContactoNuevoYUsar('${id}')">Guardar y usar para este cobro</button>
|
||||
<div class="form-hint" style="margin-top:6px">El contacto queda disponible en el dropdown para futuras tarjetas.</div>
|
||||
</div>
|
||||
${override ? `<button class="btn btn-pagado" style="width:100%;margin-top:10px;padding:12px" onclick="quitarOverride('${id}')">Quitar personalizado y usar directorio</button>` : ``}
|
||||
@@ -980,9 +1009,9 @@ function abrirCobro(id){
|
||||
document.getElementById("modal-inner").innerHTML = `
|
||||
<div class="modal-header"><span class="modal-title">Generar cobro</span><button class="modal-close" onclick="cerrar()">×</button></div>
|
||||
<p style="font-size:13px;color:var(--text-secondary);margin-bottom:1.2rem;">Cliente: <strong style="color:var(--text-primary)">${r.cliente}</strong><br>${r.vehiculo}<br><span class="pill-tipo ${r.tipo}">${TIPO_LABEL[r.tipo]||r.tipo}</span></p>
|
||||
<div class="opt-card" onclick="cobroConfirmar('saldo', ${saldo})"><div class="opt-title">1️⃣ Replicar saldo acumulado</div><div class="opt-desc">Total con intereses: <span class="opt-monto">${fmt(saldo)}</span></div></div>
|
||||
<div class="opt-card" onclick="cobroConfirmar('sinmora', ${capital_neto})"><div class="opt-title">2️⃣ Sin intereses moratorios</div><div class="opt-desc">Solo capital: <span class="opt-monto">${fmt(capital_neto)}</span></div></div>
|
||||
<div class="opt-card" onclick="cobroPersonalForm()"><div class="opt-title">3️⃣ Monto personalizado / abono</div><div class="opt-desc">Define monto y concepto</div></div>`;
|
||||
<div class="opt-card" onclick="cobroConfirmar('saldo', ${saldo})"><div class="opt-title"><span class="opt-num">1</span> Replicar saldo acumulado</div><div class="opt-desc">Total con intereses: <span class="opt-monto">${fmt(saldo)}</span></div></div>
|
||||
<div class="opt-card" onclick="cobroConfirmar('sinmora', ${capital_neto})"><div class="opt-title"><span class="opt-num">2</span> Sin intereses moratorios</div><div class="opt-desc">Solo capital: <span class="opt-monto">${fmt(capital_neto)}</span></div></div>
|
||||
<div class="opt-card" onclick="cobroPersonalForm()"><div class="opt-title"><span class="opt-num">3</span> Monto personalizado / abono</div><div class="opt-desc">Define monto y concepto</div></div>`;
|
||||
document.getElementById("modal").classList.add("open");
|
||||
}
|
||||
// ── Flujo UNIFICADO de cobro (plantilla + opcional link Conekta) ──
|
||||
@@ -1066,7 +1095,7 @@ function mostrarPreviewCobro(r, monto, concepto, link, texto){
|
||||
const opciones = CONTACTOS.map(c => `<option>${c}</option>`).join("");
|
||||
const avisoPendiente = cobroState.id_abono
|
||||
? `<div style="font-size:12px;color:var(--text-secondary);background:var(--warning-soft);border-radius:11px;padding:9px 12px;margin-bottom:14px;line-height:1.45">
|
||||
🕐 Se registró un <strong style="color:var(--warning)">abono pendiente</strong> por ${fmt(monto)}. El saldo de la tarjeta NO baja hasta que el abono se salde (manualmente o por pago Conekta).
|
||||
<svg class="ic" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-2px;margin-right:4px"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>Se registró un <strong style="color:var(--warning)">abono pendiente</strong> por ${fmt(monto)}. El saldo de la tarjeta NO baja hasta que el abono se salde (manualmente o por pago Conekta).
|
||||
</div>` : "";
|
||||
const linkBlock = link
|
||||
? `<div style="font-size:11px;color:var(--accent);word-break:break-all;background:var(--accent-soft);padding:8px 12px;border-radius:10px;margin-bottom:14px">${link}</div>`
|
||||
@@ -1081,11 +1110,11 @@ function mostrarPreviewCobro(r, monto, concepto, link, texto){
|
||||
<textarea class="form-input" id="cobro-texto" rows="14" style="font-family:'DM Sans',sans-serif;font-size:12.5px;line-height:1.5">${escapeAttr(texto)}</textarea>
|
||||
</div>
|
||||
<div class="entrega-label">¿Cómo lo entregas?</div>
|
||||
<button class="btn-cliente" onclick="enviarMensajeCobroCliente()">📲 Enviar al cliente</button>
|
||||
<button class="btn-cliente" onclick="enviarMensajeCobroCliente()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg> Enviar al cliente</button>
|
||||
<div class="reenvio-divider">o reenviar a un contacto</div>
|
||||
<div class="reenvio-row">
|
||||
<select id="sel-contacto-cobro">${opciones}</select>
|
||||
<button class="btn-reenviar" onclick="reenviarMensajeCobroContacto()">➤</button>
|
||||
<button class="btn-reenviar" onclick="reenviarMensajeCobroContacto()"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
@@ -1280,7 +1309,7 @@ function renderLote(){
|
||||
<div class="section-label">${loteState.filas.length} renglones · elige el tipo de cobro</div>
|
||||
${rows}
|
||||
<div class="lote-summary"><span class="lt"><span id="lote-count">0</span> seleccionados</span><span class="lv" id="lote-total">$0</span></div>
|
||||
<button class="btn-cliente" onclick="enviarLote()">📤 Enviar cobros automáticamente</button>`;
|
||||
<button class="btn-cliente" onclick="enviarLote()"><svg class="ic" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg> Enviar cobros automáticamente</button>`;
|
||||
actualizarLoteSummary();
|
||||
}
|
||||
function setLoteTipo(i,t){ loteState.filas[i].tipo = t; renderLote(); }
|
||||
@@ -1393,8 +1422,8 @@ function renderCuentasLista(){
|
||||
<div class="full"><label>CLABE (18 dígitos)</label><input value="${escapeAttr(c.clabe||'')}" maxlength="18" inputmode="numeric" oninput="this.value=this.value.replace(/\\D/g,'').slice(0,18); actualizarCampoCuenta('${escapeAttr(c.id)}','clabe',this.value)"></div>
|
||||
</div>
|
||||
<div class="cuenta-actions">
|
||||
<button class="btn-save" style="padding:9px 18px;width:auto;font-size:12.5px" onclick="guardarCuenta('${escapeAttr(c.id)}')">💾 Guardar</button>
|
||||
<button class="btn-row-del" onclick="eliminarCuenta('${escapeAttr(c.id)}')" title="Eliminar">🗑</button>
|
||||
<button class="btn-save" style="padding:9px 18px;width:auto;font-size:12.5px" onclick="guardarCuenta('${escapeAttr(c.id)}')">Guardar</button>
|
||||
<button class="btn-row-del" onclick="eliminarCuenta('${escapeAttr(c.id)}')" title="Eliminar">BORRAR</button>
|
||||
</div>
|
||||
</div>`).join("");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user