/* JINSCO 발주 시스템 공통 스타일 */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6ea;
  --line-strong: #cfd4da;
  --text: #1c2127;
  --muted: #6b7480;
  --faint: #9aa2ad;
  --brand: #156452;
  --brand-dark: #0f4c3e;
  --brand-soft: #e6f1ee;
  --accent: #1d5fd0;
  --danger: #c93a3a;
  --danger-soft: #fdecec;
  --warn: #b7791f;
  --warn-soft: #fdf3e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
}

* { box-sizing: border-box; }
/* .notice 처럼 display 를 정한 요소도 hidden 이면 숨긴다 (안 그러면 빈 오류 칸이 보인다) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕",
               "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 레이아웃 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
}
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.topnav { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.topnav a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted);
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.topnav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.topnav a.on { background: var(--brand-soft); color: var(--brand); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.who { color: var(--muted); }
.who b { color: var(--text); }

.page { max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; }
.page.narrow { max-width: 900px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h2 { font-size: 21px; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.page-head .spacer { margin-left: auto; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card-head {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-head h3 { font-size: 15px; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 폼 ---------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px;
}
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  outline: none; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(21, 100, 82, .14);
}
input:disabled, select:disabled { background: #f2f4f6; color: var(--faint); }
textarea { resize: vertical; min-height: 66px; }
input[type=number] { text-align: right; }
.hint { font-size: 12px; color: var(--faint); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; font: inherit; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--text); cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { background: #f7f8fa; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #164fb0; }
.btn.danger { background: #fff; border-color: #e8bcbc; color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn.lg { padding: 13px 22px; font-size: 16px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.toolbar .grow { flex: 1 1 180px; min-width: 140px; }
.toolbar label.inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; }
table.data { font-size: 14px; min-width: 100%; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.data thead th {
  background: #fafbfc; font-size: 12.5px; color: var(--muted); font-weight: 700;
  position: sticky; top: 0; white-space: nowrap; border-bottom: 1px solid var(--line-strong);
}
table.data tbody tr:hover { background: #fbfcfd; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.center, table.data th.center { text-align: center; }
table.data tfoot td { padding: 11px 12px; background: #fafbfc; font-weight: 700; border-top: 2px solid var(--line-strong); }
.row-click { cursor: pointer; }

.empty { padding: 46px 20px; text-align: center; color: var(--faint); font-size: 14px; }
.empty .big { font-size: 32px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------- 배지/칩 ---------- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.7; white-space: nowrap;
}
.badge.gray { background: #eef0f3; color: #5a636e; }
.badge.green { background: var(--brand-soft); color: var(--brand); }
.badge.blue { background: #e7effc; color: var(--accent); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.cold { background: #e6f2fa; color: #1f6f9c; }
.badge.frozen { background: #e8ecfb; color: #3a4cae; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  color: var(--muted);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { opacity: .65; font-size: 12px; margin-left: 3px; }

/* ---------- 통계 타일 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 2px; }

/* ---------- 알림 ---------- */
/* 문장 안의 <b> 가 flex 아이템이 되어 줄이 쪼개지지 않도록 block 으로 둔다 */
.notice {
  padding: 11px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  display: block; line-height: 1.6;
}
.notice.info { background: #eaf1fd; color: #1a4a9c; }
.notice.warn { background: var(--warn-soft); color: #8a5a10; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.ok { background: var(--brand-soft); color: var(--brand); }

#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(14px);
  background: #222; color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; z-index: 200; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); }

/* ---------- 모달 ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(20, 26, 33, .5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-back[hidden] { display: none !important; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column;
}
.modal.wide { max-width: 900px; }
.modal-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { font-size: 16px; }
.modal-head .x {
  margin-left: auto; border: 0; background: transparent; font-size: 22px; line-height: 1;
  color: var(--faint); cursor: pointer; padding: 0 4px;
}
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 로그인 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, #f0f4f1 0%, #f5f6f8 55%);
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .1); border: 1px solid var(--line); padding: 30px 28px 26px;
}
.login-card .mark { text-align: center; margin-bottom: 20px; }
.login-card .mark .logo {
  width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 800; margin: 0 auto 10px;
}
.login-card .mark h1 { font-size: 19px; }
.login-card .mark p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--faint); line-height: 1.8; }
.login-foot code { background: #f1f3f5; padding: 1px 6px; border-radius: 5px; font-size: 12px; color: #444; }

/* ---------- 상품 목록 ---------- */
.prod-list { display: flex; flex-direction: column; }
.prod {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.prod:last-child { border-bottom: 0; }
.prod.picked { background: var(--brand-soft); }
.prod.off { opacity: .5; }
.prod .info { flex: 1; min-width: 0; }
.prod .nm { font-weight: 700; font-size: 14.5px; }
.prod .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prod .price { text-align: right; white-space: nowrap; }
.prod .price b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.prod .price .tax { display: block; font-size: 11.5px; color: var(--faint); }
.prod .price .base { display: block; font-size: 11.5px; color: var(--faint); text-decoration: line-through; }

.qty { display: flex; align-items: center; gap: 0; flex: none; }
.qty button {
  width: 32px; height: 34px; border: 1px solid var(--line-strong); background: #fff;
  font-size: 17px; line-height: 1; cursor: pointer; color: var(--muted);
}
.qty button:first-child { border-radius: 8px 0 0 8px; }
.qty button:last-child { border-radius: 0 8px 8px 0; }
.qty button:hover { background: #f4f6f8; color: var(--text); }
.qty input {
  width: 52px; height: 34px; text-align: center; border: 1px solid var(--line-strong);
  border-left: 0; border-right: 0; border-radius: 0; padding: 0; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qty input:focus { box-shadow: none; border-color: var(--line-strong); }

/* 하단 고정 장바구니 바 */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line-strong);
  box-shadow: 0 -4px 18px rgba(16, 24, 40, .08);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}
.cartbar-inner {
  max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
}
.cartbar .sum { flex: 1; min-width: 0; }
.cartbar .sum .l1 { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cartbar .sum .l2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cartbar .sum .l2 small { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 5px; }

.cart-line {
  display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.cart-line:last-of-type { border-bottom: 0; }
.cart-line .nm { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.cart-line .nm span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.cart-line .amt { width: 92px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.cart-line .del { border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 17px; padding: 2px 4px; }
.cart-line .del:hover { color: var(--danger); }

.totals { border-top: 2px solid var(--line-strong); margin-top: 8px; padding-top: 10px; font-size: 14px; }
.totals .r { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.totals .r.big { font-size: 18px; font-weight: 800; color: var(--text); padding-top: 8px; }
.totals .r b { font-variant-numeric: tabular-nums; }

/* 발주 완료 */
.done { text-align: center; padding: 8px 4px 4px; }
.done .mark {
  width: 62px; height: 62px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 30px; margin: 0 auto 14px;
}
.done h3 { font-size: 20px; margin-bottom: 6px; }
.done p { color: var(--muted); margin: 0 0 4px; font-size: 14px; }
.done .box {
  background: var(--bg); border-radius: 10px; padding: 14px; margin-top: 16px;
  text-align: left; font-size: 14px;
}
.done .box .r { display: flex; justify-content: space-between; padding: 3px 0; }
.done .box .r span { color: var(--muted); }
.done .box .r b { font-variant-numeric: tabular-nums; }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; padding: 10px 15px; font: inherit; font-weight: 700;
  font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 인쇄 전표 ---------- */
.slip-page {
  background: #fff; max-width: 820px; margin: 18px auto; padding: 30px 34px;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.slip-title { text-align: center; font-size: 25px; font-weight: 800; letter-spacing: 8px; margin-bottom: 4px; }
.slip-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.slip-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.slip-party { border: 1px solid #333; }
.slip-party h4 {
  background: #f2f4f6; padding: 6px 10px; font-size: 12.5px; border-bottom: 1px solid #333;
  text-align: center; letter-spacing: 2px;
}
.slip-party table { font-size: 12.5px; }
.slip-party td { padding: 5px 9px; border-bottom: 1px solid #ddd; vertical-align: top; }
.slip-party td:first-child { width: 72px; background: #fafbfc; color: var(--muted); font-weight: 700; white-space: nowrap; }
.slip-party tr:last-child td { border-bottom: 0; }
table.slip-items { font-size: 13px; border: 1px solid #333; }
table.slip-items th {
  background: #f2f4f6; border: 1px solid #ccc; padding: 7px 8px; font-size: 12px; white-space: nowrap;
}
table.slip-items td { border: 1px solid #ddd; padding: 6px 8px; }
table.slip-items td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.slip-items td.center { text-align: center; }
table.slip-items tfoot td { background: #fafbfc; font-weight: 800; border-top: 2px solid #333; }
.slip-total-line {
  display: flex; justify-content: flex-end; gap: 26px; margin-top: 12px;
  font-size: 15px; font-weight: 800; align-items: baseline;
}
.slip-note { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.9; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.print-bar {
  max-width: 820px; margin: 18px auto 0; display: flex; gap: 8px; justify-content: flex-end; padding: 0 16px;
}

@media print {
  body { background: #fff; }
  .topbar, .print-bar, .cartbar, #toast { display: none !important; }
  .slip-page { border: 0; box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .slip-page + .slip-page { page-break-before: always; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .slip-page { padding: 20px 16px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .page { padding: 14px 12px 34px; }
  .topbar-inner { padding: 9px 12px; gap: 10px; flex-wrap: wrap; }
  .brand { font-size: 15.5px; }
  .topnav { order: 3; width: 100%; margin-left: 0; }
  .topnav a { padding: 6px 10px; font-size: 13.5px; }
  .topbar-right { margin-left: auto; }
  .who { display: none; }
  /* 좁은 화면에서는 상품명이 한 줄, 그 아래 [가격 ---- 수량] 으로 배치 */
  .prod { padding: 11px 12px; gap: 9px 10px; flex-wrap: wrap; }
  .prod .info { flex: 1 1 100%; }
  .prod .price { margin-right: auto; text-align: left; }
  .prod .price .base { display: inline; margin-right: 5px; }
  .prod .price .tax { display: inline; margin-left: 4px; }
  .qty button { width: 36px; height: 36px; }
  .qty input { width: 48px; height: 36px; }
  .cartbar-inner { gap: 9px; }
  .cartbar .sum .l2 { font-size: 17px; }
  .slip-parties { grid-template-columns: 1fr; }
  .modal { max-height: 92vh; }
}

/* ===================== JINSCO 확장 ===================== */

/* 로고 */
.logo-img { height: 26px; width: auto; display: block; }
.brand.with-logo { gap: 11px; }
.brand.with-logo .sep { width: 1px; height: 22px; background: var(--line-strong); }
.brand.with-logo .sub { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.login-card .mark .logo-img { height: 42px; margin: 0 auto 12px; }

/* 알림 벨 */
.bell { position: relative; }
.bell .dot {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: 10.5px;
  font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.noti-panel {
  position: fixed; top: 54px; right: 12px; width: min(380px, calc(100vw - 24px));
  max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 90;
}
.noti-panel[hidden] { display: none; }
.noti-item { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.noti-item:hover { background: #fafbfc; }
.noti-item.unread { background: var(--brand-soft); }
.noti-item .t { font-weight: 700; font-size: 13.5px; }
.noti-item .b { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.noti-item .d { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* 공지 */
.notice-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: 10px;
  margin-bottom: 14px; border: 1px solid transparent; cursor: pointer;
}
.notice-banner.일반 { background: #eef3fb; border-color: #d3e0f5; color: #1a4a9c; }
.notice-banner.중요 { background: var(--warn-soft); border-color: #f0dcb4; color: #8a5a10; }
.notice-banner.긴급 { background: var(--danger-soft); border-color: #f2c9c9; color: var(--danger); }
.notice-banner .ico { font-size: 17px; line-height: 1.3; flex: none; }
.notice-banner .tx { flex: 1; min-width: 0; }
.notice-banner .tx b { display: block; font-size: 14.5px; }
.notice-banner .tx span { font-size: 12.5px; opacity: .85; display: block; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-banner .more { font-size: 12.5px; font-weight: 700; white-space: nowrap; align-self: center; }

.notice-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.notice-card .hd { padding: 14px 16px; display: flex; gap: 10px; align-items: center; cursor: pointer; flex-wrap: wrap; }
.notice-card .hd .ttl { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.notice-card .bd { padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.notice-card .bd p { margin: 0 0 10px; white-space: pre-wrap; line-height: 1.7; font-size: 14px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; margin: 0 6px 6px 0;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fafbfc;
  font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none;
}
.file-chip:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); text-decoration: none; }
.file-chip .sz { color: var(--faint); font-weight: 500; font-size: 11.5px; }

/* 재고 */
.stock-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.stock-num.low { color: var(--warn); }
.stock-num.zero { color: var(--danger); }
tr.low-row { background: #fffaf0 !important; }
tr.zero-row { background: #fdf3f3 !important; }

/* 금액 강조 */
.money-pos { color: var(--danger); font-weight: 700; }
.money-zero { color: var(--faint); }
.mini { font-size: 12px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { font-variant-numeric: tabular-nums; }

/* 간단 막대 차트 */
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.bar-row .nm { width: 128px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .tr { flex: 1; background: #eef0f3; border-radius: 5px; height: 17px; overflow: hidden; }
.bar-row .fl { height: 100%; background: var(--brand); border-radius: 5px; }
.bar-row .vl { width: 92px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; flex: none; }

/* 파일 드롭존 */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: 10px; padding: 20px; text-align: center;
  color: var(--muted); font-size: 13.5px; cursor: pointer; background: #fafbfc;
}
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 7px 10px; background: #f6f7f9; border-radius: 7px; }
.file-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row button { border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 16px; }
.file-row button:hover { color: var(--danger); }

/* 관리자 탭이 많아 가로 스크롤 */
.tabs { scrollbar-width: thin; }
.tabs::-webkit-scrollbar { height: 3px; }
.tabs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

/* 원장 표 */
table.ledger td.debit { color: var(--danger); }
table.ledger td.credit { color: var(--brand); }
table.ledger tr.opening { background: #fafbfc; font-weight: 700; }

@media (max-width: 640px) {
  .logo-img { height: 22px; }
  .brand.with-logo .sub { display: none; }
  .bar-row .nm { width: 92px; }
  .bar-row .vl { width: 76px; font-size: 12px; }
  .noti-panel { top: 50px; right: 8px; }
}
