:root { font-family: system-ui, -apple-system, "Noto Sans KR", sans-serif; color: #334155; background: #f5f6fa; }
* { box-sizing: border-box; }
body { margin: 0; padding: 12px 10px 28px; }
[hidden] { display: none !important; }
main { width: 100%; max-width: 780px; margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
h1 { margin: 0; font-size: 22px; line-height: 1.4; }
.home-link { padding: 10px 14px; border: 1px solid #c8d3df; border-radius: 9px; background: #fff; color: #334155; font-size: 14px; text-decoration: none; }
.search-card { padding: 14px; border: 1px solid #dce2ea; border-radius: 12px; background: #fff; }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.search-row { display: flex; gap: 8px; align-items: stretch; }
input, button { font: inherit; }
input { width: 100%; min-width: 0; padding: 11px 10px; border: 1px solid #c8d3df; border-radius: 8px; color: #172033; background: #fff; font-size: 16px; }
input::placeholder { font-size: 13px; color: #6b7280; }
button { flex: 0 0 auto; min-height: 46px; padding: 10px 13px; border: 0; border-radius: 8px; background: #7f8c8d; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
input:focus, button:focus-visible, a:focus-visible, .table-scroll:focus-visible { outline: 2px solid #52728f; outline-offset: 2px; }
.status { margin: 10px 3px 14px; font-size: 13px; line-height: 1.5; color: #5c6b7f; }
.status.error { padding: 11px 12px; border-radius: 8px; color: #9f2333; background: #fff0f1; }
.result-card { overflow: hidden; border: 1px solid #c8d3df; border-radius: 10px; background: #fff; }
.result-header { padding: 13px 12px 12px; border-bottom: 1px solid #c8d3df; background: #f6f8fb; }
h2 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.updated-at { margin: 4px 0 10px; font-size: 12px; color: #5c6b7f; }
.totals { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 6px; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.count { background: #fff; border: 1px solid #dce2ea; }
.normal { background: #bcd2ef; color: #2b4f77; }
.defect { background: #e9bdd0; color: #7b3654; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 340px; border-collapse: collapse; table-layout: fixed; font-size: 13px; line-height: 1.4; }
.type-column { width: 14%; } .zone-column { width: 17%; } .location-column { width: 45%; } .quantity-column { width: 24%; }
th, td { padding: 9px 8px; border-bottom: 1px solid #d8e0e8; text-align: left; white-space: nowrap; }
thead th { background: #f6f8fb; font-weight: 600; }
tbody .stock-type, tbody .location, tbody .quantity { font-weight: 700; }
.quantity { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.defect-row { background: #f7e7ee; }
.defect-row .stock-type { color: #7b3654; }
.negative { color: #a12630; }
tfoot th, tfoot td { font-weight: 700; }
.normal-summary { background: #edf2f7; }
.defect-summary { background: #e9bdd0; color: #7b3654; }
tfoot tr:last-child > * { border-bottom: 0; }
.empty-row { padding: 20px 12px; white-space: normal; text-align: center; color: #5c6b7f; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 360px) {
  .search-card { padding: 11px; }
  .search-row { gap: 6px; }
  button { padding-inline: 11px; }
  h2 { font-size: 15px; }
  th, td { padding: 8px 6px; }
}
