diff --git a/src/index.html b/src/index.html index b598d71..2593bde 100644 --- a/src/index.html +++ b/src/index.html @@ -8,19 +8,20 @@ /* ─── Reset & Base ─────────────────────────────────────────────────── */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { - --bg: #0d0d0d; - --surface: #181818; - --surface2: #242424; - --border: #333; - --text: #e0e0e0; - --muted: #888; - --accent: #e63946; - --accent2: #f4a261; - --success: #2a9d8f; - --warning: #e9c46a; - --danger: #e63946; - --radius: 8px; - --font: 'Segoe UI', system-ui, sans-serif; + --red: #c0272d; + --red-dark: #9b1b1b; + --red-light: #fdf2f2; + --red-row: #fde8e8; + --bg: #ffffff; + --surface: #f7f7f7; + --surface2: #f0f0f0; + --border: #e0e0e0; + --text: #1a1a1a; + --muted: #777; + --green: #2e7d32; + --orange: #e65100; + --radius: 6px; + --font: 'Segoe UI', system-ui, -apple-system, sans-serif; } html, body { height: 100%; } body { @@ -29,500 +30,643 @@ color: var(--text); display: flex; flex-direction: column; - overflow: hidden; + min-height: 100vh; } - /* ─── Header ──────────────────────────────────────────────────────── */ - header { - display: flex; - align-items: center; - gap: 12px; - padding: 10px 16px; - background: var(--surface); - border-bottom: 1px solid var(--border); - flex-shrink: 0; - } - header .logo { - font-size: 1.1rem; - font-weight: 700; - color: var(--accent); - } - header .subtitle { font-size: 0.8rem; color: var(--muted); } - .header-spacer { flex: 1; } - .sync-badge { - font-size: 0.7rem; - padding: 3px 8px; - border-radius: 12px; - background: var(--surface2); - border: 1px solid var(--border); - color: var(--muted); - } - .sync-badge.synced { border-color: var(--success); color: var(--success); } - .sync-badge.error { border-color: var(--danger); color: var(--danger); } - - /* ─── Toolbar ──────────────────────────────────────────────────────── */ - .toolbar { - display: flex; - gap: 8px; - padding: 8px 16px; - background: var(--surface); - border-bottom: 1px solid var(--border); - flex-shrink: 0; - flex-wrap: wrap; - } - .toolbar select, .toolbar input { - background: var(--surface2); - border: 1px solid var(--border); - color: var(--text); - border-radius: var(--radius); - padding: 5px 10px; - font-size: 0.85rem; - } - .toolbar button { - background: var(--surface2); - border: 1px solid var(--border); - color: var(--text); - border-radius: var(--radius); - padding: 5px 14px; - font-size: 0.85rem; - cursor: pointer; - transition: all 0.15s; - } - .toolbar button:hover { border-color: var(--accent); color: var(--accent); } - .toolbar button.primary { background: var(--accent); border-color: var(--accent); color: #fff; } - .toolbar button.primary:hover { background: #c1121f; } - - /* ─── Main Form Area ───────────────────────────────────────────────── */ - .main { - flex: 1; - overflow-y: auto; - padding: 12px 16px; - } - - /* ─── Form Sections ────────────────────────────────────────────────── */ - .section { - background: var(--surface); - border: 1px solid var(--border); - border-radius: var(--radius); - margin-bottom: 12px; - overflow: hidden; - } - .section-header { - display: flex; - align-items: center; - padding: 8px 12px; - background: var(--surface2); - border-bottom: 1px solid var(--border); - cursor: pointer; - user-select: none; - gap: 8px; - } - .section-header:hover { background: #2a2a2a; } - .section-title { - font-size: 0.85rem; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.05em; - color: var(--accent2); - } - .section-badge { - font-size: 0.7rem; - padding: 2px 7px; - border-radius: 10px; - background: var(--accent); + /* ─── Header ────────────────────────────────────────────────────────── */ + .header { + background: var(--red); color: #fff; - display: none; - } - .section-badge.visible { display: inline; } - .section-toggle { margin-left: auto; color: var(--muted); font-size: 0.8rem; } - .section-body { padding: 12px; } - - /* ─── Form Grid ────────────────────────────────────────────────────── */ - .grid { display: grid; gap: 8px; } - .grid-2 { grid-template-columns: 1fr 1fr; } - .grid-3 { grid-template-columns: 1fr 1fr 1fr; } - .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; } - - label { - display: flex; - flex-direction: column; - gap: 3px; - font-size: 0.75rem; - color: var(--muted); - } - input, select, textarea { - background: var(--surface2); - border: 1px solid var(--border); - color: var(--text); - border-radius: var(--radius); - padding: 7px 10px; - font-size: 0.9rem; - font-family: var(--font); - width: 100%; - transition: border-color 0.15s; - } - input:focus, select:focus, textarea:focus { - outline: none; - border-color: var(--accent); - } - input[type="number"] { font-variant-numeric: tabular-nums; } - input:read-only { opacity: 0.6; cursor: not-allowed; } - .input-group { display: flex; gap: 6px; } - .input-group input { flex: 1; } - - /* ─── Table Editor ─────────────────────────────────────────────────── */ - .table-wrap { overflow-x: auto; } - table { width: 100%; border-collapse: collapse; font-size: 0.85rem; } - th { - background: var(--surface2); - color: var(--muted); - font-size: 0.7rem; - text-transform: uppercase; - letter-spacing: 0.04em; - padding: 5px 8px; - text-align: left; - border-bottom: 1px solid var(--border); - } - td { padding: 3px 8px; border-bottom: 1px solid #222; vertical-align: middle; } - tr:hover td { background: #1e1e1e; } - td input, td select { - padding: 4px 6px; - font-size: 0.82rem; - border-radius: 4px; - } - td input[type="number"] { text-align: right; width: 110px; } - td input[placeholder] { width: 140px; } - .btn-remove { - width: 26px; height: 26px; - background: transparent; - border: 1px solid transparent; - border-radius: 4px; - color: var(--muted); - cursor: pointer; - font-size: 1rem; - display: flex; align-items: center; justify-content: center; - } - .btn-remove:hover { border-color: var(--danger); color: var(--danger); background: rgba(230,57,70,0.1); } - .btn-add-row { - width: 100%; - padding: 6px; - margin-top: 6px; - background: transparent; - border: 1px dashed var(--border); - color: var(--muted); - border-radius: var(--radius); - cursor: pointer; - font-size: 0.8rem; - } - .btn-add-row:hover { border-color: var(--accent2); color: var(--accent2); } - - /* ─── Diferença Display ────────────────────────────────────────────── */ - .resultado { + padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; - padding: 10px 12px; - border-radius: var(--radius); - margin-top: 8px; - font-size: 1rem; + flex-shrink: 0; } - .resultado.ok { background: rgba(42,157,143,0.15); border: 1px solid var(--success); } - .resultado.diff { background: rgba(230,57,70,0.15); border: 1px solid var(--danger); } - .resultado .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; } - .resultado .value { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; } - .resultado.ok .value { color: var(--success); } - .resultado.diff .value { color: var(--danger); } + .header-title { font-size: 15px; font-weight: 700; } + .header-id { font-size: 11px; opacity: 0.85; font-family: monospace; } - /* ─── Action Bar ───────────────────────────────────────────────────── */ - .actions { + /* ─── Metadata Bar ─────────────────────────────────────────────────── */ + .meta-bar { + background: var(--surface); + border-bottom: 1px solid var(--border); + padding: 10px 20px; display: flex; - gap: 8px; + gap: 16px; + align-items: center; + flex-wrap: wrap; + flex-shrink: 0; + } + .meta-field { + display: flex; + flex-direction: column; + gap: 2px; + } + .meta-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; } + .meta-input, .meta-select { + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 6px 10px; + font-size: 13px; + background: #fff; + color: var(--text); + min-width: 120px; + outline: none; + font-family: var(--font); + } + .meta-input:focus, .meta-select:focus { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-light); } + .meta-select { cursor: pointer; } + + /* ─── Main single column ──────────────────────────────────────────── */ + .main { + flex: 1; + overflow-y: auto; + padding: 16px 20px 8px; + display: flex; + flex-direction: column; + gap: 0; + } + + /* ─── Section ───────────────────────────────────────────────────────── */ + .section { margin-bottom: 20px; } + .section-header { + font-size: 12px; + font-weight: 700; + color: var(--red); + text-transform: uppercase; + letter-spacing: 0.7px; + padding: 5px 0 5px; + margin-bottom: 6px; + border-bottom: 2px solid var(--red); + display: flex; + align-items: center; + gap: 6px; + } + .section-note { font-size: 10px; color: var(--muted); margin: 3px 0 5px; } + + /* ─── Table ─────────────────────────────────────────────────────────── */ + table { width: 100%; border-collapse: collapse; font-size: 12px; } + th { + background: var(--surface2); + font-weight: 700; + color: var(--muted); + text-align: left; + font-size: 10px; + text-transform: uppercase; + letter-spacing: 0.4px; + padding: 5px 8px; + border: 1px solid var(--border); + white-space: nowrap; + } + td { padding: 3px 6px; border: 1px solid var(--border); vertical-align: middle; } + td input[type="text"], td input[type="number"], td select, td textarea { + width: 100%; + border: none; + background: transparent; + font-size: 12px; + padding: 4px 2px; + outline: none; + font-family: var(--font); + color: var(--text); + resize: none; + } + td input:focus, td textarea:focus { background: #fffde7; } + td.num { text-align: right; } + td.num input { text-align: right; } + tr.total-row td { background: var(--red-row); font-weight: 700; color: var(--red-dark); font-size: 12px; } + tr.total-row td.num { color: var(--red); } + + .row-del { + width: 24px; + height: 24px; + border: none; + background: transparent; + color: #ccc; + cursor: pointer; + font-size: 14px; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + } + .row-del:hover { background: #fee2e2; color: var(--red); } + + /* ─── Add Row Button ────────────────────────────────────────────────── */ + .add-btn { + display: inline-flex; + align-items: center; + gap: 4px; + background: var(--red); + color: #fff; + border: none; + border-radius: var(--radius); + padding: 5px 12px; + font-size: 11px; + cursor: pointer; + font-weight: 600; + margin-top: 6px; + } + .add-btn:hover { background: var(--red-dark); } + + /* ─── System Values (Saldo de Caixa) ──────────────────────────────── */ + .sys-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0; + border: 1px solid var(--border); + border-radius: var(--radius); + overflow: hidden; + } + .sys-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 7px 12px; + border-bottom: 1px solid var(--border); + font-size: 12px; + background: #fff; + } + .sys-row:nth-child(odd) { background: var(--surface); } + .sys-row:last-child { border-bottom: none; } + .sys-row.total { background: var(--red-row); font-weight: 700; color: var(--red-dark); } + .sys-row .lbl { color: var(--muted); } + .sys-row.total .lbl { color: var(--red-dark); } + .sys-row .val { font-variant-numeric: tabular-nums; font-weight: 600; } + .sys-row.total .val { color: var(--red); font-size: 14px; } + .sys-row input { + border: none; + background: transparent; + text-align: right; + font-size: 12px; + font-family: var(--font); + font-weight: 600; + color: var(--text); + width: 100px; + padding: 2px; + outline: none; + } + .sys-row input:focus { background: #fffde7; border-radius: 3px; } + + /* ─── Fechamento (counted) ────────────────────────────────────────── */ + .fech-grid { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 10px; + } + .fech-item { + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 8px 12px; + background: #fff; + } + .fech-item-label { font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: 0.4px; margin-bottom: 4px; } + .fech-item input { + border: none; + font-size: 16px; + font-weight: 700; + color: var(--text); + width: 100%; + font-family: var(--font); + outline: none; + background: transparent; + text-align: right; + } + .fech-item input:focus { background: #fffde7; border-radius: 3px; } + .fech-total { + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 10px 14px; + background: var(--red-row); + display: flex; + justify-content: space-between; + align-items: center; + } + .fech-total-label { font-size: 11px; font-weight: 700; color: var(--red-dark); text-transform: uppercase; letter-spacing: 0.5px; } + .fech-total-value { font-size: 16px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; } + + /* ─── Diferença ──────────────────────────────────────────────────── */ + .dif-box { + border: 2px solid var(--border); + border-radius: var(--radius); padding: 12px 16px; + display: flex; + justify-content: space-between; + align-items: center; + background: #fff; + } + .dif-label { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; } + .dif-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; } + .dif-value.pos { color: var(--green); } + .dif-value.zero { color: var(--green); } + .dif-value.neg { color: var(--red); } + + /* ─── Cards (4 columns) ─────────────────────────────────────────────── */ + .cards-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 10px; + } + .card-col { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } + .card-col-header { + background: var(--red); + color: #fff; + text-align: center; + font-size: 10px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.6px; + padding: 6px 4px; + } + .card-col table { font-size: 11px; } + .card-col th { background: var(--red-light); color: var(--red-dark); font-size: 9px; padding: 3px 6px; } + .card-col td { padding: 2px 4px; } + .card-col td.num { text-align: right; } + .card-col tfoot td { background: var(--red-light); font-weight: 700; font-size: 11px; text-align: right; color: var(--red-dark); padding: 4px 6px; } + .soma-row { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 8px; + padding: 8px 12px; + background: var(--red-light); + border-radius: var(--radius); + font-size: 12px; + font-weight: 700; + color: var(--red-dark); + } + .soma-row span:last-child { font-size: 16px; color: var(--red); } + + /* ─── Footer ────────────────────────────────────────────────────────── */ + .footer { background: var(--surface); border-top: 1px solid var(--border); + padding: 10px 20px; + display: flex; + align-items: center; + gap: 10px; flex-shrink: 0; flex-wrap: wrap; } - .actions button { - flex: 1; - min-width: 120px; - padding: 10px 16px; - border-radius: var(--radius); - font-size: 0.9rem; - font-weight: 600; - cursor: pointer; - border: 1px solid var(--border); - background: var(--surface2); - color: var(--text); - transition: all 0.15s; - } - .actions button:hover { border-color: var(--accent); } - .actions button.btn-enviar { - background: var(--accent); - border-color: var(--accent); - color: #fff; - } - .actions button.btn-enviar:hover { background: #c1121f; } - .actions button:disabled { opacity: 0.4; cursor: not-allowed; } - - /* ─── Toast ────────────────────────────────────────────────────────── */ - #toast { - position: fixed; - bottom: 80px; - left: 50%; - transform: translateX(-50%) translateY(20px); - background: var(--surface2); - border: 1px solid var(--border); - color: var(--text); - padding: 10px 20px; - border-radius: var(--radius); - font-size: 0.85rem; - opacity: 0; - transition: all 0.3s; - z-index: 1000; - pointer-events: none; - max-width: 90vw; - } - #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } - #toast.success { border-color: var(--success); color: var(--success); } - #toast.error { border-color: var(--danger); color: var(--danger); } - - /* ─── Loading Overlay ──────────────────────────────────────────────── */ - #loading { - display: none; - position: fixed; - inset: 0; - background: rgba(0,0,0,0.6); - z-index: 999; + .auto-save { + display: flex; align-items: center; - justify-content: center; - flex-direction: column; - gap: 12px; - } - #loading.show { display: flex; } - .spinner { - width: 40px; height: 40px; - border: 3px solid var(--border); - border-top-color: var(--accent); - border-radius: 50%; - animation: spin 0.8s linear infinite; - } - @keyframes spin { to { transform: rotate(360deg); } } - - /* ─── Responsivo ───────────────────────────────────────────────────── */ - @media (max-width: 700px) { - .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } - .toolbar { gap: 6px; } - .actions button { min-width: 100px; font-size: 0.8rem; } - } - - /* ─── Print Preview Modal ─────────────────────────────────────────── */ - #modal-print { - display: none; - position: fixed; - inset: 0; - background: rgba(0,0,0,0.8); - z-index: 500; - align-items: center; - justify-content: center; - } - #modal-print.show { display: flex; } - #modal-print .paper { - background: #fff; - color: #000; - width: 280px; - padding: 16px; - border-radius: 4px; - font-family: 'Courier New', monospace; + gap: 6px; font-size: 11px; - line-height: 1.4; - max-height: 80vh; - overflow-y: auto; + color: var(--muted); + margin-right: auto; } - #modal-print .paper .p-title { text-align: center; font-weight: bold; font-size: 14px; } - #modal-print .paper .p-section { margin-top: 8px; } - #modal-print .paper .p-row { display: flex; justify-content: space-between; } - #modal-print .paper .p-divider { border-top: 1px dashed #000; margin: 4px 0; } - #modal-print .actions { background: transparent; border: none; justify-content: center; gap: 12px; } + .dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; } + .btn { + border: 1px solid var(--border); + background: #fff; + border-radius: var(--radius); + padding: 8px 16px; + font-size: 12px; + cursor: pointer; + display: flex; + align-items: center; + gap: 6px; + font-weight: 600; + font-family: var(--font); + color: var(--text); + } + .btn:hover { background: var(--surface2); } + .btn-danger { background: var(--red); color: #fff; border-color: var(--red); font-size: 13px; padding: 9px 18px; } + .btn-danger:hover { background: var(--red-dark); } + + /* ─── Scrollbar ────────────────────────────────────────────────────── */ + ::-webkit-scrollbar { width: 6px; } + ::-webkit-scrollbar-track { background: var(--surface); } + ::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; } - -
- - -
- ● Local -
- - -
- - - - -
- - - + +
+ Fechamento de Caixa — União +
- -
+ +
+
+ Data + +
+
+ Operador + +
+
+ Turno + +
+
+ Loja + +
+
- -
-
- Entradas - 0 - + +
+ + +
+
💸 Sangrias
+ + + + + + + + + + + + + + + + + + +
#HoraRetirada (R$)Gerente
TOTALR$ 0,00
+ +
+ + +
+
📝 Despesas
+ + + + + + + + + + + + + + + + + + +
#DescriçãoObsValor (R$)
TOTALR$ 0,00
+ +
+ + +
+
💳 PIX CNPJ
+ + + + + + + + + + + + + + + + + +
#NomeValor (R$)
TOTALR$ 0,00
+ +
+ + +
+
💰 Vales (Funcionários)
+ + + + + + + + + + + + + + + + + +
#NomeValor (R$)
TOTALR$ 0,00
+ +
+ + +
+
👥 À Receber (Clientes)
+ + + + + + + + + + + + + + + + + +
#NomeValor (R$)
TOTALR$ 0,00
+ +
+ + +
+
🖥️ Saldo de Caixa (Valores do Sistema)
+
+
+ Troco (+) + +
+
+ Crédito (+) ← Cartões + +
+
+ Débito (+) ← Cartões + +
+
+ Alimentação (+) ← Cartões + +
+
+ Vales (+) ← Vales + +
+
+ À Receber (+) ← Clientes + +
+
+ PIX (+) ← CNPJ + Cartão + +
+
+ TOTAL + R$ 0,00 +
-
-
- - - -
-
- Diferença - R$ 0,00 -
+
Informe o saldo esperado. Saldo de Caixa actual: R$ 0,00
+
+
- -
-
- Sangrias / Despesas - 0 - + +
+
🛒 Fechamento (Valores Contados)
+
+
+
Dinheiro
+ +
+
+
Cartões ← Soma cartões
+ +
+
+
À Receber ← À receber
+ +
-
-
- - - - +
+ Total Programa + R$ 0,00 +
+ + + +
+
+ Diferença + R$ 0,00 +
+
+ + +
+
❌ Cancelamentos
+
DescriçãoValor
+ + + + + + + + + + + + + + + + + +
#NúmeroValor (R$)Motivo
TOTALR$ 0,00
+ +
+ + +
+
💳 Cartões (4 Colunas)
+
+
+
Crédito
+ + +
#Valor (R$)
R$ 0,00
- +
-
- - - -
-
-
- - -
-
- Cartões / Voucher - 0 - -
-
-
- - - - -
-
- -
-
-
- - -
-
- A Receber - 0 - -
-
-
- - +
+
Débito
+
DescriçãoValor
+ +
#Valor (R$)
R$ 0,00
- + +
+
+
Alimentação
+ + + + +
#Valor (R$)
R$ 0,00
+ +
+
+
PIX
+ + + + +
#Valor (R$)
R$ 0,00
+
-
- - -
-
- Observaes / Info - -
-
- +
+ Soma Cartões (todas as colunas) + R$ 0,00
-
+
- -
- - - - -
- - -
- - -
Aguarde…
- - - - - -