/* Deliberately small and hand-written. The public site's stylesheet is built
   for a marketing page; this is a data-entry screen used by two people. */
:root {
  --ink: #1b1b1b; --muted: #6b6b6b; --line: #d8d8d8;
  --bg: #fff; --panel: #f7f7f7; --accent: #14508c; --danger: #a02020;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 15px/1.5 "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo",
        "Noto Sans KR", system-ui, sans-serif;
}
header {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline;
  justify-content: space-between;
  padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
header nav { display: flex; gap: 1rem; align-items: baseline; }
header form { display: inline; }
main { padding: 1.2rem; max-width: 1100px; }
h1 { font-size: 1.35rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
a { color: var(--accent); }
.muted { color: var(--muted); }
small { display: block; color: var(--muted); font-size: .82rem; }

.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.fields { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.fields label { display: block; font-weight: 600; }
input, select, button { font: inherit; }
input:not([type=file]), select {
  width: 100%; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 3px;
}
input.num { text-align: right; }
.btn {
  display: inline-block; padding: .45rem .9rem; border: 0; border-radius: 3px;
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
}
.btn.secondary { background: #555; }
button.link {
  background: none; border: 0; padding: 0 .3rem; color: var(--accent);
  cursor: pointer; text-decoration: underline;
}
button.link.danger { color: var(--danger); }

table { border-collapse: collapse; width: 100%; margin: .8rem 0; }
th, td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: left; }
thead th { background: var(--panel); }
td.num, th.num { text-align: right; }
tfoot td { background: var(--panel); font-weight: 600; }
td.files { white-space: nowrap; }
table.entry input { border: 0; padding: .2rem; }
table.entry input:focus { outline: 2px solid var(--accent); }

dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }

.flash { padding: .6rem .9rem; border-radius: 3px; background: #e8f1e8; border: 1px solid #b9d3b9; }
.flash.err { background: #fbeaea; border-color: #e0b4b4; }

/* Inventory. The tags carry meaning, so they are not colour alone — each one
   also reads as a word, for the same reason the stock table spells out 부족. */
.tag {
  display: inline-block; padding: .05rem .4rem; margin-left: .3rem;
  border-radius: 3px; font-size: .78rem; background: #e4e4e4; color: #333;
}
.tag.warn { background: #f6e3c5; color: #7a4a00; }
.tag.in   { background: #dce9f5; color: #14508c; }
.tag.out  { background: #e6e0f0; color: #4a3a70; }
.tag.return { background: #f6e3c5; color: #7a4a00; }
.tag.adjust { background: #e4e4e4; color: #444; }
tr.low td { background: #fdf4e6; }
table select { padding: .2rem; }

/* The site is used on a phone in the workshop as well as at a desk. */
@media (max-width: 700px) {
  main { padding: .8rem; }
  table.entry { display: block; overflow-x: auto; }
}
