Files
check-printing/public/css/style.css
T

414 lines
9.3 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; }
/* ── 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);
}