4fb7fd209c
- New Deposits tab with ledger: date, checks total, cash, deposit total, item count, status - Slide-in deposit panel: date, currency, coin, cash back, dynamic check entry rows, live totals - Save deposit, then generate Deposit Slip or Deposit Report PDF - Deposit slip: 3.375" x 8.5" portrait with Style A background drawn server-side, digit-column amounts, GnuMICR routing/account line rotated 90 deg, rotated deposit total and check count in left margin - Deposit report: plain Courier ledger with depositor/bank info, check grid, totals - deposits and deposit_items tables in schema; ON DELETE CASCADE for items - Routes: GET/POST/PUT/DELETE /api/deposits, POST /api/deposit-pdf - Generating a slip marks deposit as printed; date range and status filters - README updated to describe deposit slip feature
698 lines
15 KiB
CSS
698 lines
15 KiB
CSS
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
:root {
|
|
--bg: #f5f5f5;
|
|
--surface: #ffffff;
|
|
--border: #d0d0d0;
|
|
--header-bg: #1a2b3c;
|
|
--header-fg: #ffffff;
|
|
--primary: #2563eb;
|
|
--primary-hover: #1d4ed8;
|
|
--danger: #dc2626;
|
|
--text: #1a1a1a;
|
|
--text-muted: #6b7280;
|
|
--row-hover: #f0f4ff;
|
|
--panel-width: 420px;
|
|
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font);
|
|
font-size: 13px;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Header ── */
|
|
header {
|
|
background: var(--header-bg);
|
|
color: var(--header-fg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 1rem;
|
|
height: 44px;
|
|
flex-shrink: 0;
|
|
}
|
|
.header-brand { font-size: 15px; font-weight: 600; }
|
|
.header-info { font-size: 12px; color: rgba(255,255,255,0.7); }
|
|
.header-info strong { color: #fff; }
|
|
.header-left { display: flex; align-items: center; gap: 10px; }
|
|
|
|
.account-switcher {
|
|
background: rgba(255,255,255,0.15);
|
|
border: 1px solid rgba(255,255,255,0.3);
|
|
color: #fff;
|
|
border-radius: 4px;
|
|
padding: 2px 6px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
.account-switcher option { background: var(--header-bg); color: #fff; }
|
|
.btn-header-icon {
|
|
background: rgba(255,255,255,0.15);
|
|
border: 1px solid rgba(255,255,255,0.3);
|
|
color: #fff;
|
|
border-radius: 4px;
|
|
padding: 2px 7px;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
line-height: 1.4;
|
|
}
|
|
.btn-header-icon:hover { background: rgba(255,255,255,0.28); }
|
|
|
|
/* ── Toolbar ── */
|
|
.toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 1rem;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
.toolbar-left { display: flex; align-items: center; gap: 8px; }
|
|
.toolbar-right { display: flex; align-items: center; gap: 8px; }
|
|
.toolbar label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
|
|
|
|
select {
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
font-size: 13px;
|
|
font-family: var(--font);
|
|
background: var(--surface);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ── Buttons ── */
|
|
button {
|
|
cursor: pointer;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
font-family: var(--font);
|
|
padding: 5px 12px;
|
|
line-height: 1.4;
|
|
transition: background 0.1s, opacity 0.1s;
|
|
}
|
|
button:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
|
|
.btn-primary { background: var(--primary); color: #fff; font-weight: 500; }
|
|
.btn-primary:not(:disabled):hover { background: var(--primary-hover); }
|
|
|
|
.btn-secondary {
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
}
|
|
.btn-secondary:hover { background: var(--bg); }
|
|
|
|
.btn-ghost { background: transparent; color: var(--text-muted); }
|
|
.btn-ghost:hover { color: var(--text); background: var(--bg); }
|
|
|
|
.btn-icon {
|
|
background: transparent;
|
|
color: rgba(255,255,255,0.75);
|
|
font-size: 22px;
|
|
padding: 0 6px;
|
|
line-height: 1;
|
|
border-radius: 3px;
|
|
}
|
|
.btn-icon:hover { color: #fff; background: rgba(255,255,255,0.1); }
|
|
|
|
.btn-sm {
|
|
padding: 2px 8px;
|
|
font-size: 12px;
|
|
}
|
|
.btn-edit { background: transparent; color: var(--primary); }
|
|
.btn-edit:hover { background: #eff6ff; }
|
|
.btn-delete { background: transparent; color: var(--danger); }
|
|
.btn-delete:hover { background: #fee2e2; }
|
|
.btn-reprint { background: transparent; color: var(--text-muted); }
|
|
.btn-reprint:hover { background: var(--bg); }
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
background: rgba(255,255,255,0.25);
|
|
border-radius: 10px;
|
|
padding: 1px 7px;
|
|
font-size: 11px;
|
|
min-width: 20px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ── Table ── */
|
|
.table-wrap {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
background: var(--surface);
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
background: #f8f8f8;
|
|
border-bottom: 2px solid var(--border);
|
|
padding: 6px 8px;
|
|
text-align: left;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
}
|
|
thead th.sortable { cursor: pointer; }
|
|
thead th.sortable:hover { color: var(--text); }
|
|
thead th.sort-asc .sort-indicator::after { content: ' ↑'; }
|
|
thead th.sort-desc .sort-indicator::after { content: ' ↓'; }
|
|
|
|
tbody tr { border-bottom: 1px solid #f0f0f0; }
|
|
tbody tr:hover { background: var(--row-hover); }
|
|
tbody tr.printed { color: var(--text-muted); }
|
|
|
|
td {
|
|
padding: 6px 8px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.col-select { width: 32px; }
|
|
.col-no { width: 60px; font-variant-numeric: tabular-nums; }
|
|
.col-date { width: 95px; white-space: nowrap; }
|
|
.col-amount { width: 95px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
|
|
.col-memo { color: var(--text-muted); font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.col-status { width: 88px; text-align: center; }
|
|
.col-actions { width: 130px; text-align: right; white-space: nowrap; }
|
|
|
|
.status-badge {
|
|
display: inline-block;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.05em;
|
|
text-transform: uppercase;
|
|
padding: 2px 7px;
|
|
border-radius: 10px;
|
|
}
|
|
.status-unprinted { background: #fef3c7; color: #92400e; }
|
|
.status-printed { background: #e0f2fe; color: #0369a1; }
|
|
|
|
.loading-row td,
|
|
.empty-row td { text-align: center; padding: 2rem; color: var(--text-muted); }
|
|
|
|
/* ── Slide-in panel ── */
|
|
#panel-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.3);
|
|
z-index: 100;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s;
|
|
}
|
|
#panel-overlay.open { opacity: 1; pointer-events: auto; }
|
|
|
|
#check-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
width: var(--panel-width);
|
|
height: 100vh;
|
|
background: var(--surface);
|
|
z-index: 101;
|
|
box-shadow: -4px 0 24px rgba(0,0,0,0.15);
|
|
transform: translateX(100%);
|
|
transition: transform 0.2s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow-y: auto;
|
|
}
|
|
#check-panel.open { transform: translateX(0); }
|
|
|
|
.panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 16px;
|
|
background: var(--header-bg);
|
|
color: var(--header-fg);
|
|
flex-shrink: 0;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
}
|
|
.panel-header h2 { font-size: 14px; font-weight: 600; }
|
|
|
|
/* ── Form ── */
|
|
#check-form {
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
flex: 1;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
.form-group label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--text-muted);
|
|
}
|
|
.form-group.required label::after { content: ' *'; color: var(--danger); }
|
|
|
|
.form-group input {
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 7px 10px;
|
|
font-size: 13px;
|
|
font-family: var(--font);
|
|
width: 100%;
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
}
|
|
.form-group input:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
|
|
}
|
|
.form-group input.error { border-color: var(--danger); }
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
}
|
|
|
|
.address-section {
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
}
|
|
.address-section summary {
|
|
padding: 8px 12px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
list-style: none;
|
|
}
|
|
.address-section summary::before { content: '▶ '; font-size: 9px; }
|
|
.address-section[open] summary::before { content: '▼ '; }
|
|
.address-section[open] summary { border-bottom: 1px solid var(--border); }
|
|
.address-fields {
|
|
padding: 10px 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding-top: 4px;
|
|
border-top: 1px solid var(--border);
|
|
margin-top: auto;
|
|
}
|
|
.form-actions .btn-primary { flex: 1; padding: 8px; }
|
|
|
|
/* ── Import modal ── */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.4);
|
|
z-index: 200;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.15s;
|
|
}
|
|
.modal-overlay.open { opacity: 1; pointer-events: auto; }
|
|
|
|
.modal {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -48%);
|
|
width: 480px;
|
|
max-width: calc(100vw - 2rem);
|
|
background: var(--surface);
|
|
border-radius: 6px;
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
|
|
z-index: 201;
|
|
display: flex;
|
|
flex-direction: column;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.15s, transform 0.15s;
|
|
}
|
|
.modal.open {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 16px;
|
|
background: var(--header-bg);
|
|
color: var(--header-fg);
|
|
border-radius: 6px 6px 0 0;
|
|
flex-shrink: 0;
|
|
}
|
|
.modal-header h2 { font-size: 14px; font-weight: 600; }
|
|
|
|
.modal-body {
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.modal-desc {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
line-height: 1.5;
|
|
}
|
|
.modal-desc code {
|
|
font-family: monospace;
|
|
background: var(--bg);
|
|
padding: 1px 4px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
input[type="file"] {
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 6px 8px;
|
|
font-size: 13px;
|
|
font-family: var(--font);
|
|
width: 100%;
|
|
background: var(--surface);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.import-log {
|
|
font-family: monospace;
|
|
font-size: 11px;
|
|
background: #0f172a;
|
|
color: #94a3b8;
|
|
border-radius: 4px;
|
|
padding: 10px 12px;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
line-height: 1.5;
|
|
}
|
|
.import-log.success { color: #86efac; }
|
|
.import-log.error { color: #fca5a5; }
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
/* ── Setup wizard ── */
|
|
.wizard-modal { width: 520px; }
|
|
|
|
.wizard-steps-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 16px 24px 0;
|
|
background: var(--surface);
|
|
}
|
|
.wizard-step-dot {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
.wizard-step-dot span {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
background: var(--border);
|
|
color: var(--text-muted);
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
.wizard-step-dot.active span,
|
|
.wizard-step-dot.done span {
|
|
background: var(--primary);
|
|
color: #fff;
|
|
}
|
|
.wizard-step-dot label {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
}
|
|
.wizard-step-dot.active label { color: var(--primary); }
|
|
.wizard-step-line {
|
|
flex: 1;
|
|
height: 2px;
|
|
background: var(--border);
|
|
margin: 0 8px;
|
|
margin-bottom: 18px;
|
|
transition: background 0.15s;
|
|
}
|
|
.wizard-step-line.done { background: var(--primary); }
|
|
|
|
.wizard-body { min-height: 240px; }
|
|
|
|
.wizard-error {
|
|
margin-top: 4px;
|
|
padding: 8px 10px;
|
|
background: #fee2e2;
|
|
color: var(--danger);
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.wizard-footer { justify-content: flex-end; }
|
|
.wizard-footer .btn-ghost { margin-right: auto; font-size: 12px; }
|
|
|
|
.form-row-3 { grid-template-columns: 1fr 80px 100px; }
|
|
.form-row-4 { grid-template-columns: repeat(4, 1fr); }
|
|
.field-hint {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* ── Account settings modal ── */
|
|
.settings-section-label {
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: var(--text-muted);
|
|
padding-bottom: 4px;
|
|
border-bottom: 1px solid var(--border);
|
|
margin-top: 4px;
|
|
}
|
|
.logo-preview {
|
|
margin-top: 6px;
|
|
}
|
|
.logo-preview img {
|
|
max-height: 60px;
|
|
max-width: 200px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 3px;
|
|
padding: 3px;
|
|
}
|
|
#acct-settings-modal .modal-body {
|
|
max-height: calc(100vh - 160px);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* ── View nav tabs ── */
|
|
.view-nav {
|
|
display: flex;
|
|
gap: 0;
|
|
background: var(--surface);
|
|
border-bottom: 2px solid var(--border);
|
|
flex-shrink: 0;
|
|
padding: 0 1rem;
|
|
}
|
|
.view-tab {
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
border-radius: 0;
|
|
padding: 8px 16px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
margin-bottom: -2px;
|
|
}
|
|
.view-tab:hover { color: var(--text); }
|
|
.view-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
|
|
|
|
/* ── View panes ── */
|
|
.view-pane {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
.view-pane[hidden] { display: none; }
|
|
|
|
/* ── Deposit panel ── */
|
|
#dep-panel-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.3);
|
|
z-index: 100;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s;
|
|
}
|
|
#dep-panel-overlay.open { opacity: 1; pointer-events: auto; }
|
|
|
|
#deposit-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
width: 560px;
|
|
max-width: 98vw;
|
|
height: 100vh;
|
|
background: var(--surface);
|
|
z-index: 101;
|
|
box-shadow: -4px 0 24px rgba(0,0,0,0.15);
|
|
transform: translateX(100%);
|
|
transition: transform 0.2s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow-y: auto;
|
|
}
|
|
#deposit-panel.open { transform: translateX(0); }
|
|
|
|
#deposit-panel-body {
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 14px;
|
|
flex: 1;
|
|
}
|
|
|
|
.dep-summary {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.dep-totals {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 8px 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
}
|
|
.dep-total-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
.dep-total-grand {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin-top: 4px;
|
|
padding-top: 4px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
/* Deposit check items table */
|
|
.dep-checks-section { display: flex; flex-direction: column; gap: 6px; flex: 1; }
|
|
.dep-checks-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--text-muted);
|
|
}
|
|
.dep-items-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 12px;
|
|
}
|
|
.dep-items-table thead th {
|
|
background: #f8f8f8;
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 4px 6px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
position: static;
|
|
}
|
|
.dep-items-table td {
|
|
padding: 2px 4px;
|
|
vertical-align: middle;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
.dep-item-input {
|
|
border: 1px solid var(--border);
|
|
border-radius: 3px;
|
|
padding: 3px 6px;
|
|
font-size: 12px;
|
|
font-family: var(--font);
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
}
|
|
.dep-item-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.dep-form-actions {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding-top: 4px;
|
|
border-top: 1px solid var(--border);
|
|
margin-top: auto;
|
|
flex-wrap: wrap;
|
|
}
|
|
.dep-pdf-btns { display: flex; gap: 6px; }
|