/* 모바일 입출고 — 한 손 조작, 큰 터치 타겟 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Malgun Gothic', '맑은 고딕', -apple-system, sans-serif;
  background: #f1f5f9; color: #1e293b; font-size: 15px;
  display: flex; flex-direction: column; min-height: 100dvh;
}

#top {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #1e293b; color: #fff;
}
#top .brand { font-weight: 800; font-size: 17px; flex: 1; }
.chip {
  border: 1px solid #475569; background: #334155; color: #e2e8f0;
  border-radius: 18px; padding: 7px 12px; font-size: 13px; text-decoration: none;
  font-weight: 600; cursor: pointer;
}

#tabs { display: flex; background: #1e293b; padding: 0 8px 8px; gap: 6px; }
.tab {
  flex: 1; border: none; border-radius: 10px; padding: 12px 0;
  background: #334155; color: #94a3b8; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tab.active { background: #2563eb; color: #fff; }

#scanBox { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 10px 12px; }
#camWrap { position: relative; margin-bottom: 10px; border-radius: 12px; overflow: hidden; background: #000; }
#cam { width: 100%; max-height: 38vh; display: block; object-fit: cover; }
#camHint {
  position: absolute; bottom: 8px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000;
}
#scanRow { display: flex; gap: 8px; }
#manualForm { flex: 1; display: flex; gap: 8px; }
#manualInput {
  flex: 1; min-width: 0; border: 1.5px solid #cbd5e1; border-radius: 10px;
  padding: 0 12px; font-size: 16px; height: 48px;
}
.big-btn {
  height: 48px; padding: 0 14px; border: 1.5px solid #cbd5e1; border-radius: 10px;
  background: #fff; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.big-btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.big-btn.active { background: #16a34a; border-color: #16a34a; color: #fff; }

#content { flex: 1; padding: 12px; overflow-y: auto; }
.idle-msg { text-align: center; color: #64748b; padding: 40px 20px; font-size: 15px; line-height: 1.7; }
.idle-msg b { color: #1e293b; }

.pcard { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.pcard .pname { font-weight: 800; font-size: 16px; line-height: 1.35; }
.pcard .popt { margin-top: 4px; }
.pcard .popt .opt { display: inline-block; background: #dbeafe; color: #1d4ed8; font-weight: 800; border-radius: 8px; padding: 3px 10px; font-size: 15px; }
.pcard .pnums { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; color: #64748b; }
.pcard .pnums b { color: #1e293b; font-size: 15px; }
.pcard .pnums .warn b { color: #d97706; }
.pcard .pnums .danger b { color: #dc2626; }
.pcancel { margin-top: 10px; width: 100%; }

.qty-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.qty-row label { font-weight: 700; font-size: 14px; }
.qty-btn {
  width: 52px; height: 52px; font-size: 24px; font-weight: 800; border-radius: 12px;
  border: 1.5px solid #cbd5e1; background: #fff; cursor: pointer;
}
.qty-input {
  flex: 1; min-width: 0; height: 52px; text-align: center; font-size: 22px; font-weight: 800;
  border: 1.5px solid #cbd5e1; border-radius: 12px;
}

.sect-title { font-weight: 800; font-size: 14px; color: #475569; margin: 16px 2px 8px; }
.loc-list { display: flex; flex-direction: column; gap: 8px; }
.loc-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1.5px solid #cbd5e1; background: #fff; border-radius: 12px;
  padding: 14px; font-size: 15px; cursor: pointer; text-align: left;
}
.loc-btn .lcode { font-weight: 800; font-size: 17px; color: #1d4ed8; }
.loc-btn .lqty { margin-left: auto; font-weight: 800; font-size: 16px; }
.loc-hint { color: #64748b; font-size: 13px; margin-top: 8px; line-height: 1.6; }

#log { padding: 0 12px 12px; }
#log .log-item { font-size: 12px; color: #64748b; padding: 3px 2px; border-top: 1px dashed #e2e8f0; }

/* 하단 시트 */
#sheetBack {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50;
  display: flex; align-items: flex-end;
}
#sheet {
  background: #fff; width: 100%; border-radius: 18px 18px 0 0; padding: 18px 16px 24px;
}
#sheet .sheet-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
#sheet .sheet-sub { color: #64748b; font-size: 13px; margin-bottom: 12px; }
#sheet .sheet-btns { display: flex; gap: 8px; margin-top: 14px; }
#sheet .sheet-btns .big-btn { flex: 1; }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.level-grid .big-btn { height: 56px; font-size: 17px; }

.hidden { display: none !important; }

#toastWrap { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 99; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast {
  background: #1e293b; color: #fff; border-radius: 12px; padding: 12px 14px;
  font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(-8px);
  transition: all .18s; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: none; }
.toast.success { background: #15803d; }
.toast.error { background: #b91c1c; }
