Files
acs/frontend/src/styles/common.css
unknown 17d6036bca feat(web): 감사 로그·발송 내역 관리 화면 추가
- AuditLogPage(/audit): 최근 관리 행위(승인/반려·블랙리스트) 조회.
- DeliveryOutboxPage(/deliveries): 출입증 발송 내역 조회(성공/실패/전체 필터) + 실패건 수동 재발송.
- api.ts/types에 listAudit·listDeliveries·retryDelivery + AuditLog·PassDelivery 타입 추가.
- Layout 네비(ADMIN)와 App 라우팅(ADMIN 가드) 연결, common.css에 row-gap·cell-error 유틸 추가.

검증: tsc+vite 빌드 통과. 런타임 승인 후 GET /api/admin/audit·/deliveries 응답이 타입과 일치 확인.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:03:51 +09:00

311 lines
12 KiB
CSS

:root {
--primary: #2563eb;
--primary-dark: #1d4ed8;
--bg: #f1f5f9;
--surface: #ffffff;
--border: #e2e8f0;
--text: #0f172a;
--muted: #64748b;
--green: #16a34a;
--amber: #d97706;
--red: #dc2626;
--gray: #64748b;
--blue: #2563eb;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: 'Segoe UI', 'Malgun Gothic', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
/* ===== Layout ===== */
.app-shell { min-height: 100vh; }
.topbar {
display: flex;
align-items: center;
gap: 12px;
padding: 0 16px;
height: 58px;
background: var(--surface);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 10;
width: 100%;
box-sizing: border-box;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; flex-shrink: 0; cursor: pointer; color: var(--text); }
.brand:hover { color: var(--primary); }
.brand-badge { height: 24px; width: auto; display: block; }
/* nav takes the middle space and scrolls internally if too narrow, so the
brand (left) and user/logout (right) always stay visible. */
.nav {
display: flex;
gap: 2px;
flex: 1 1 auto;
min-width: 0;
flex-wrap: nowrap;
overflow-x: auto;
scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
padding: 8px 10px;
border-radius: 8px;
color: var(--muted);
font-weight: 500;
white-space: nowrap;
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: #eff6ff; color: var(--primary); }
.user-box { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.role-tags { display: inline-flex; gap: 4px; }
.role-tag {
background: #eef2ff; color: #4338ca;
font-size: 11px; font-weight: 700;
padding: 2px 6px; border-radius: 6px;
}
.content { max-width: 1080px; margin: 0 auto; padding: 28px 24px; }
/* ===== Center (auth) ===== */
.center-screen {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.auth-card { width: 360px; text-align: center; }
.auth-badge { display: block; width: 72px; height: 72px; margin: 0 auto 12px; object-fit: contain; }
.auth-card .field { text-align: left; }
.auth-title { margin: 0 0 4px; font-size: 20px; }
.auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.hint { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }
/* IME hints: works in Whale/Firefox (English default / Korean default); ignored elsewhere. */
.ime-en { ime-mode: inactive; }
.ime-ko { ime-mode: active; }
/* ===== Cards / page head ===== */
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
}
.card h3 { margin-top: 0; }
.page-head {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 20px;
}
.page-head h2 { margin: 0; }
.head-actions { display: flex; gap: 8px; }
/* ===== Fields / forms ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: #334155; }
.field input, .field select, .field textarea {
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 14px;
background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
/* react-datepicker: make the input fill the field like the native ones */
.field .react-datepicker-wrapper { width: 100%; }
.field .react-datepicker__input-container input { width: 100%; box-sizing: border-box; }
/* clearer popup border + shadow, and a full-width [입력] footer button */
.acs-datepicker .react-datepicker { border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.dt-actions { padding: 8px; border-top: 1px solid var(--border); }
.dt-confirm { width: 100%; }
/* In-app modal dialog (replaces window.prompt/confirm) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { background: #fff; border-radius: 12px; padding: 20px; width: 420px; max-width: 100%; box-shadow: 0 12px 32px rgba(0,0,0,0.2); }
.modal-title { margin: 0 0 8px; font-size: 16px; }
.modal-message { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.modal-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* Public entrance kiosk */
.kiosk { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg, #f1f5f9); }
.kiosk-card { width: 420px; max-width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); text-align: center; }
.kiosk-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.kiosk-result { margin-top: 16px; }
.kiosk-ok { font-size: 18px; font-weight: 700; margin: 12px 0 20px; }
.btn-primary.full, .btn-success.full, .btn-danger.full, .btn-ghost.full { width: 100%; padding: 14px; font-size: 16px; }
/* Password field with show/hide toggle */
.password-wrap { position: relative; display: flex; }
.password-wrap input { flex: 1; width: 100%; padding-right: 42px; }
.password-toggle {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
font-size: 16px;
line-height: 1;
padding: 4px 6px;
cursor: pointer;
opacity: .8;
}
.password-toggle:hover { opacity: 1; }
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0 18px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
/* faint inline helper next to a label */
.hint-inline { font-weight: 400; font-style: normal; color: var(--muted); font-size: 12px; }
/* consent checkbox block */
.consent-box {
background: #f8fafc;
border: 1px solid var(--border);
border-radius: 8px;
padding: 12px 14px;
margin-bottom: 8px;
}
.consent-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px; color: #334155; line-height: 1.5; }
.consent-label input { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; }
/* ===== Buttons ===== */
button { font-family: inherit; cursor: pointer; }
.btn-primary, .btn-ghost, .btn-success, .btn-danger {
padding: 9px 16px; border-radius: 8px; font-weight: 600; font-size: 14px;
border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary.full { width: 100%; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-link-danger { background: none; border: none; color: var(--red); font-weight: 600; }
.action-cell { display: flex; gap: 8px; }
/* ===== Stats ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
background: var(--surface); border: 1px solid var(--border);
border-radius: 12px; padding: 18px 20px;
border-left: 4px solid var(--gray);
}
.stat-card.accent-blue { border-left-color: var(--blue); }
.stat-card.accent-amber { border-left-color: var(--amber); }
.stat-card.accent-green { border-left-color: var(--green); }
.stat-card.accent-gray { border-left-color: var(--gray); }
.stat-value { font-size: 30px; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }
/* ===== Table ===== */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
text-align: left; padding: 11px 12px;
border-bottom: 1px solid var(--border);
font-size: 14px;
}
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: none; }
.table tbody tr:hover { background: #f8fafc; }
/* ===== Badges ===== */
.badge {
display: inline-block; padding: 3px 10px; border-radius: 999px;
font-size: 12px; font-weight: 700;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #e2e8f0; color: #475569; }
/* ===== Alerts ===== */
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-info { background: #dbeafe; color: #1e40af; }
.muted { color: var(--muted); }
/* ===== Access console ===== */
.console-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.inline-form input:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
.qr-scanner { position: relative; margin-top: 12px; max-width: 360px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #000; }
.qr-scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-scanner-guide { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.25); pointer-events: none; }
@media (max-width: 720px) {
.console-grid { grid-template-columns: 1fr; }
}
.btn-link { background: none; border: none; color: var(--primary); font-weight: 600; }
.row-actions { display: flex; gap: 10px; }
/* ===== Report ===== */
.report-row { display: flex; align-items: flex-end; gap: 16px; }
.report-row .field { margin-bottom: 0; }
/* ===== Badge ===== */
.badge-sheet { display: flex; justify-content: center; padding: 12px; }
.badge-card {
width: 320px;
background: #fff;
border: 2px solid var(--primary);
border-radius: 16px;
padding: 24px;
text-align: center;
box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.badge-head {
background: var(--primary); color: #fff;
font-weight: 700; padding: 8px; border-radius: 8px; margin-bottom: 16px;
}
.badge-name { font-size: 26px; font-weight: 800; }
.badge-company { color: var(--muted); margin-bottom: 16px; }
.badge-qr { width: 200px; height: 200px; image-rendering: pixelated; }
.badge-meta { text-align: center; margin: 16px 0; font-size: 13px; }
.badge-meta > div { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.badge-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
@media print {
.topbar, .no-print { display: none !important; }
.content { padding: 0; }
body { background: #fff; }
.badge-card { box-shadow: none; }
}
@media (max-width: 720px) {
.stat-grid { grid-template-columns: repeat(2, 1fr); }
.form-grid { grid-template-columns: 1fr; }
.nav { display: none; }
}
/* inline row of controls (e.g. filter + refresh in page-head) */
.row-gap { display: flex; gap: 8px; align-items: center; }
/* long delivery error text: keep the row compact, reveal full text on hover (title attr) */
.cell-error { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--red, #c0392b); }