/* Designovel PLM 디자인 시스템 — © 2026 Designovel Inc. — 모바일 우선, PC 반응형(≥1024px 사이드바) */
:root {
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans Thai', 'Noto Sans Khmer', 'Helvetica Neue', 'Segoe UI', sans-serif;
  --brand: #1f2a5a;
  --brand-2: #2a3a8f;
  --accent: #1aa6a0;
  --accent-soft: #e2f5f4;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #171a2b;
  --text-2: #5b6079;
  --text-3: #8d92a8;
  --line: #e3e6ef;
  --ok: #1d9a5b; --ok-soft: #e4f6ec;
  --warn: #d97b06; --warn-soft: #fdf0dc;
  --danger: #d2383f; --danger-soft: #fde8e9;
  --info: #2f6fdb; --info-soft: #e6eefc;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23,26,43,.06), 0 8px 24px -12px rgba(23,26,43,.18);
  --tab-h: 64px; --header-h: 56px; --sidebar-w: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --touch: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8fa0ff; --brand-2: #6d7fe6; --accent: #3ad1c9; --accent-soft: #10302f;
    --bg: #0f1220; --surface: #171b2e; --surface-2: #1f2440; --text: #eef0fa; --text-2: #aeb4cf; --text-3: #7d8399; --line: #2a3050;
    --ok: #3fcf82; --ok-soft: #10301f; --warn: #f0a93a; --warn-soft: #3a2a10; --danger: #ff6b70; --danger-soft: #3a1518; --info: #6b9cf5; --info-soft: #152339;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --brand: #8fa0ff; --brand-2: #6d7fe6; --accent: #3ad1c9; --accent-soft: #10302f;
  --bg: #0f1220; --surface: #171b2e; --surface-2: #1f2440; --text: #eef0fa; --text-2: #aeb4cf; --text-3: #7d8399; --line: #2a3050;
  --ok: #3fcf82; --ok-soft: #10301f; --warn: #f0a93a; --warn-soft: #3a2a10; --danger: #ff6b70; --danger-soft: #3a1518; --info: #6b9cf5; --info-soft: #152339;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; max-width: 100vw; overflow-x: hidden; overflow-wrap: anywhere; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.45; font-size: 15px; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.modal-open { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; } h4 { font-size: 14px; color: var(--text-2); }
p { margin: 0 0 8px; }
img { max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }
pre.err { white-space: pre-wrap; font-size: 12px; color: var(--danger); background: var(--danger-soft); padding: 10px; border-radius: var(--radius-sm); }

/* 레이아웃 */
.app { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 100vw; }
.header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 6px; padding: 0 10px; min-width: 0; overflow: hidden; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.header .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; color: var(--text); white-space: nowrap; flex: 0 0 auto; }
.header .brand img, .header .brand svg { width: 28px; height: 28px; border-radius: 7px; }
.header .brand small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.header .spacer { flex: 1; }
.header .tenant-btn { flex: 0 1 auto; min-width: 0; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.header .dot.off { background: var(--text-3); box-shadow: 0 0 0 3px var(--surface-2); }
.icon-btn { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; display: inline-grid; place-items: center; font-size: 18px; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.icon-btn .count.warn { background: var(--warn); }
.lang-select { height: 36px; max-width: 120px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 8px; font-size: 13px; }
@media (max-width: 639px) { .lang-select { max-width: 64px; padding: 0 4px; font-size: 12px; } .header .icon-btn { width: 36px; } .header .brand small { display: none; } }

.main { padding: 16px 16px calc(var(--tab-h) + var(--safe-b) + 20px); width: 100%; max-width: 100%; min-width: 0; }
.page { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.page > * { min-width: 0; max-width: 100%; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.page-head h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.page-head > div { min-width: 0; }
.page-loading { display: grid; place-items: center; min-height: 40vh; }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; width: 100%; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(160%) blur(12px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 11px; font-weight: 600; min-height: var(--touch); }
.tabbar a .ic { font-size: 22px; line-height: 1; }
.tabbar a.active { color: var(--brand); }
.tabbar a.scan { color: #fff; }
.tabbar a.scan .ic { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-2), var(--accent)); display: grid; place-items: center; margin-top: -22px; box-shadow: var(--shadow); }
.tabbar a.scan span:last-child { color: var(--text-3); }
.tabbar .badge-dot { position: absolute; margin-left: 22px; margin-top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.sidebar { display: none; }
/* 모바일(<1024px): 손 뻗은 거리에서도 읽히는 크기 */
@media (max-width: 1023.98px) {
  body { font-size: 17px; line-height: 1.4; }
  h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 18px; } h4 { font-size: 16px; }
  .page-head h1 { font-size: 24px !important; }
  .btn { min-height: 52px; font-size: 17px; padding: 0 18px; border-radius: 14px; }
  .btn-sm { min-height: 44px; font-size: 15px; }
  .btn-lg { min-height: 60px; font-size: 19px; }
  .btn-xl { min-height: 76px; font-size: 20px; }
  .btn-xl .ic { font-size: 30px; }
  .btn-xl small { font-size: 14px; }
  .input, select.input, textarea.input { min-height: 54px; font-size: 18px; padding: 12px 14px; }
  .field label, .label { font-size: 15px; }
  .list-item { min-height: 64px; padding: 14px 16px; }
  .list-item .title { font-size: 18px; }
  .list-item .sub, .list-item .meta { font-size: 15px; }
  .list-item .chev { font-size: 22px; }
  .badge { font-size: 14px; padding: 4px 11px; }
  .state-chips .badge { font-size: 15px; padding: 7px 13px; }
  .kpi .v { font-size: 38px; }
  .kpi .k { font-size: 14px; }
  .tabbar a { font-size: 13px; }
  .tabbar a .ic { font-size: 24px; }
  .muted { font-size: 15px; }
  .banner { font-size: 16px; padding: 12px 16px; }
  .table { font-size: 16px; }
  .table th { font-size: 14px; }
  .table th, .table td { padding: 12px 14px; }
  .spec-grid { font-size: 16px; }
  .chip { min-height: 48px; font-size: 16px; padding: 10px 16px; }
  .segment button { min-height: 46px; font-size: 16px; padding: 0 16px; }
  .checkbox input { width: 26px; height: 26px; }
  .icon-btn { font-size: 22px; }
  .tab { font-size: 16px; }
  .keypad button { min-height: 64px; font-size: 26px; }
  .qty-display { font-size: clamp(38px, 12vw, 56px); }
  .photos .ph, .photos .add { width: 88px; height: 88px; }
  .toast { font-size: 16px; padding: 14px 18px; }
  .step-dots .sd { font-size: 15px; } .step-dots .sd .n { width: 30px; height: 30px; font-size: 14px; }
  .empty { font-size: 16px; }
}

@media (min-width: 1024px) {
  .app { grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: auto 1fr; grid-template-areas: "side head" "side main"; }
  .header { grid-area: head; }
  .sidebar { grid-area: side; display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh; overflow: auto; }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--text); }
  .sidebar .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .sidebar .group { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; padding: 12px 10px 4px; }
  .sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; }
  .sidebar a .ic { width: 22px; text-align: center; }
  .sidebar a:hover { background: var(--surface-2); color: var(--text); }
  .sidebar a.active { background: var(--accent-soft); color: var(--brand); }
  .sidebar .foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--text-3); }
  .main { grid-area: main; padding: 22px 28px 40px; max-width: 1400px; }
  html, body { overflow-x: auto; }
  .tabbar { display: none; }
  .header .brand { display: none; }
}

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; transition: transform .06s ease, background .15s ease, box-shadow .15s ease; text-decoration: none; white-space: nowrap; max-width: 100%; min-width: 0; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--brand); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-xl { min-height: 72px; font-size: 17px; flex-direction: column; gap: 4px; border-radius: 18px; white-space: normal; text-align: center; line-height: 1.25; padding: 10px 12px; }
.btn-xl .ic { font-size: 26px; }
.btn-xl small { font-weight: 500; font-size: 12px; opacity: .8; white-space: normal; }
.btn-lg, .btn-block { white-space: normal; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 auto; min-width: 0; }
@media (min-width: 640px) { .actions .btn { flex: 0 0 auto; } }

/* 입력 */
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; outline: none; transition: border .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.lg { min-height: 60px; font-size: 26px; font-weight: 700; text-align: center; letter-spacing: .02em; }
textarea.input { min-height: 80px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.form { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row > * { flex: 1; min-width: 0; }
.checkbox { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-weight: 500; }
.checkbox input { width: 22px; height: 22px; accent-color: var(--accent); }
.segment { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.segment button { border: 0; background: transparent; min-height: 36px; padding: 0 12px; white-space: nowrap; border-radius: 9px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.segment button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* 카드·목록 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; max-width: 100%; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { flex: 1; }
.card.flat { box-shadow: none; }
.card.tone-warn { background: var(--warn-soft); border-color: transparent; }
.card.tone-ok { background: var(--ok-soft); border-color: transparent; }
.card.tone-danger { background: var(--danger-soft); border-color: transparent; }
.card.tone-info { background: var(--info-soft); border-color: transparent; }
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); min-height: 56px; color: inherit; }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--surface-2); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow-wrap: anywhere; }
.list-item .sub { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.list-item .meta { font-size: 13px; color: var(--text-3); text-align: right; white-space: nowrap; flex: 0 0 auto; max-width: 40%; }
.list-item .chev { color: var(--text-3); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.kpi { min-width: 0; }
.kpi .v { font-size: 24px; overflow-wrap: anywhere; font-weight: 800; letter-spacing: -.02em; }
.kpi .k { font-size: 12px; color: var(--text-2); font-weight: 600; }
.kpi.tone-warn .v { color: var(--warn); } .kpi.tone-danger .v { color: var(--danger); } .kpi.tone-ok .v { color: var(--ok); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .input { flex: 1; min-width: 160px; width: auto; }
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: 12px; color: var(--text-2); font-weight: 700; background: var(--surface-2); position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; min-height: var(--touch); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); line-height: 1.6; }
.badge.ok, .badge.st-approved, .badge.st-done, .badge.st-finished, .badge.st-committed, .badge.st-shipped, .badge.st-applied, .badge.st-active { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.st-qc_hold, .badge.st-repair, .badge.st-repairing, .badge.st-changes_requested, .badge.st-review, .badge.st-reviewing, .badge.st-submitted, .badge.st-extracting { background: var(--warn-soft); color: var(--warn); }
.badge.danger, .badge.st-cancelled, .badge.st-scrapped, .badge.st-failed, .badge.st-revoked { background: var(--danger-soft); color: var(--danger); }
.badge.info, .badge.st-in_progress, .badge.st-in_production, .badge.st-planned, .badge.st-confirmed, .badge.st-assigned, .badge.st-at_subcon, .badge.st-extracted, .badge.st-validated { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--accent-soft); color: var(--brand); }
.empty { text-align: center; color: var(--text-3); padding: 40px 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .ic { font-size: 40px; opacity: .5; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.muted { color: var(--text-3); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.between > * { min-width: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 40px; color: var(--text-2); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; display: flex; }
.progress span { display: block; height: 100%; }
.progress .p-fin { background: var(--ok); } .progress .p-wip { background: var(--info); } .progress .p-hold { background: var(--warn); } .progress .p-ship { background: var(--brand); } .progress .p-q { background: var(--line); }

/* 상태 알림 배너 */
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; flex-wrap: wrap; }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.danger { background: var(--danger-soft); color: var(--danger); }
.banner.info { background: var(--info-soft); color: var(--info); }

/* 토스트·모달 */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(8px); transition: all .25s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: var(--ok); color: #fff; } .toast-warn { background: var(--warn); color: #fff; } .toast-error { background: var(--danger); color: #fff; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,12,24,.5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .2s ease; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.modal-head { display: flex; align-items: center; padding: 14px 16px 6px; gap: 10px; }
.modal-head h3 { flex: 1; }
.modal-body { padding: 10px 16px calc(16px + var(--safe-b)); overflow: auto; }
.confirm-msg { font-size: 16px; font-weight: 600; }
.confirm-detail { background: var(--surface-2); border-radius: 10px; padding: 10px; font-size: 13px; margin-top: 8px; }
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { width: min(560px, 100%); border-radius: 20px; max-height: 86dvh; }
  .modal-wide { width: min(960px, 100%); }
}

/* 숫자 키패드 */
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.keypad button { min-height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 22px; font-weight: 700; color: var(--text); cursor: pointer; }
.keypad button:active { background: var(--surface-2); }
.keypad button.fn { font-size: 16px; color: var(--text-2); background: var(--surface-2); }
.qty-display { text-align: center; font-size: clamp(30px, 10vw, 44px); font-weight: 800; letter-spacing: -.02em; padding: 8px 0; font-variant-numeric: tabular-nums; }
.qty-display small { font-size: 16px; color: var(--text-2); font-weight: 600; margin-left: 6px; }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; }
.split-row .input { width: 110px; text-align: center; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--text-2); }
.stepper input { width: 70px; border: 0; text-align: center; font-size: 18px; font-weight: 700; background: transparent; color: var(--text); }

/* 스캐너 */
.scanner { position: relative; width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; max-height: 62dvh; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scanner .frame div { width: 68%; aspect-ratio: 1; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.9); position: relative; }
.scanner .frame div::after { content: ''; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scanline 2s ease-in-out infinite; }
@keyframes scanline { 0%,100% { transform: translateY(-120px); } 50% { transform: translateY(120px); } }
.scanner .hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-weight: 600; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
@media (min-width: 1024px) { .scanner { max-width: 480px; } }

/* 사진 */
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos .ph { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--surface-2); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph .x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; cursor: pointer; }
.photos .add { width: 76px; height: 76px; border-radius: 10px; border: 1.5px dashed var(--line); background: transparent; display: grid; place-items: center; font-size: 24px; color: var(--text-3); cursor: pointer; }
.zoom-img { width: 100%; border-radius: 12px; background: var(--surface-2); cursor: zoom-in; }
.pin-layer { position: relative; display: inline-block; max-width: 100%; }
.pin-layer img { display: block; max-width: 100%; border-radius: 12px; }
.pin { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; box-shadow: var(--shadow); cursor: pointer; }
.pin.me { background: var(--accent); }

/* 로그인 */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent 60%), radial-gradient(900px 500px at 100% 100%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%), var(--bg); }
.auth-card { width: min(440px, 100%); background: var(--surface); border-radius: 24px; padding: 28px 24px; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.auth-card .logo { display: flex; align-items: center; gap: 12px; }
.auth-card .logo img { width: 48px; height: 48px; border-radius: 12px; }
.auth-card .logo h1 { font-size: 24px; letter-spacing: -.03em; }
.auth-card .logo p { margin: 0; color: var(--text-2); font-size: 13px; }

/* 대형 작업 안내 */
.spec-block { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.spec-block h4 { margin-bottom: 6px; }
.spec-grid { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 12px; font-size: 14px; }
.spec-grid dt { color: var(--text-3); white-space: nowrap; } .spec-grid dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.state-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.state-chips .badge { font-size: 13px; padding: 5px 11px; }
.state-chips .badge b { margin-left: 5px; font-variant-numeric: tabular-nums; }
.step-dots { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 4px 0; max-width: 100%; scrollbar-width: none; }
.step-dots .sd { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.step-dots .sd .n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.step-dots .sd.active .n { background: var(--brand); color: #fff; } .step-dots .sd.active { color: var(--text); font-weight: 700; }
.step-dots .sd.done .n { background: var(--ok-soft); color: var(--ok); }
.step-dots .arrow { color: var(--line); }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .tl { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.timeline .tl::before { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline .tl:last-child::before { display: none; }
.timeline .tl .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); margin-top: 2px; }
.timeline .tl.ok .dot { background: var(--ok); } .timeline .tl.warn .dot { background: var(--warn); } .timeline .tl.info .dot { background: var(--info); }
.sheet-list a.btn-xl { justify-content: center; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-grid > * { min-width: 0; }
@media (min-width: 640px) { .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lang-grid button { min-height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; color: var(--text); }
.lang-grid button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--brand); }
.pin-dots { display: flex; gap: 12px; justify-content: center; padding: 10px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-3); }
.pin-dots span.on { background: var(--brand); border-color: var(--brand); }
.worker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.worker-grid button { min-height: 72px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 16px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.worker-grid button small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print { .header, .tabbar, .sidebar, .toasts { display: none !important; } .main { padding: 0; } }

/* 저작권 표기 */
.copyright { font-size: 11px; color: var(--text-3); line-height: 1.5; }
.sidebar .foot .copyright { display: block; margin-top: 8px; }


/* ───── 빠른 입력 컴포넌트 (components/quick.js) */
body.sheet-open { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10,12,24,.5); z-index: 95; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet-backdrop.closing { opacity: 0; transition: opacity .18s ease; }
.sheet { background: var(--surface); width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
.sheet-backdrop.closing .sheet { transform: translateY(30px); transition: transform .18s ease; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 6px 20px; }
.sheet-head h3 { flex: 1; font-size: 20px; }
.sheet-x { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-size: 20px; cursor: pointer; }
.sheet-body { padding: 8px 16px calc(18px + var(--safe-b)); overflow: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 1024px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { width: min(520px, 100%); border-radius: 20px; max-height: 86dvh; animation: fade .15s ease; }
  .sheet-wide { width: min(880px, 100%); }
  .sheet-grip { display: none; }
  .sheet-head { padding: 16px 12px 6px 20px; }
}

/* 스텝퍼 */
.qstep { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qstep-label { font-weight: 700; font-size: 16px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.qstep-max { color: var(--text-3); font-weight: 600; }
.qstep-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; align-items: stretch; }
.qstep-btn { min-height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-size: 32px; font-weight: 700; color: var(--text); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.qstep-btn:active { background: var(--line); transform: scale(.97); }
.qstep-val { min-height: 64px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); display: flex; align-items: baseline; justify-content: center; gap: 6px; cursor: pointer; font-variant-numeric: tabular-nums; min-width: 0; padding: 0 8px; }
.qstep-val:active { border-color: var(--accent); }
.qstep-num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.qstep-unit { font-size: 16px; font-weight: 600; color: var(--text-2); }
.qstep.at-max .qstep-val { border-color: var(--ok); } .qstep.at-max .qstep-num { color: var(--ok); }
.qstep-quick { display: flex; gap: 8px; }
.qstep-q { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; color: var(--text-2); cursor: pointer; }
.qstep-q:active { background: var(--surface-2); }
.qstep-md .qstep-row { grid-template-columns: 52px minmax(0, 1fr) 52px; }
.qstep-md .qstep-btn, .qstep-md .qstep-val { min-height: 52px; font-size: 26px; }
.qstep-md .qstep-num { font-size: 26px; }
.qstep-md .qstep-quick { display: none; }
.qstep-xl .qstep-btn, .qstep-xl .qstep-val { min-height: 76px; }
.qstep-xl .qstep-num { font-size: 44px; }
.qstep-xl .qstep-btn { font-size: 36px; }
@media (min-width: 1024px) {
  .qstep-row { grid-template-columns: 48px minmax(0, 1fr) 48px; }
  .qstep-btn, .qstep-val { min-height: 48px; font-size: 22px; }
  .qstep-num { font-size: 24px; }
  .qstep-xl .qstep-btn, .qstep-xl .qstep-val { min-height: 56px; }
  .qstep-xl .qstep-num { font-size: 30px; }
  .qstep-q { min-height: 36px; font-size: 13px; }
}

/* 큰 키패드 */
.bigkp { display: flex; flex-direction: column; gap: 10px; }
.bigkp-display { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 6px 0 0; }
.bigkp-val { font-size: clamp(48px, 14vw, 64px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.bigkp-val.over { color: var(--danger); }
.bigkp-unit { font-size: 20px; color: var(--text-2); font-weight: 600; }
.bigkp-meta { text-align: center; color: var(--text-3); font-weight: 600; min-height: 22px; font-size: 15px; }
.bigkp-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bigkp-key { min-height: 68px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 30px; font-weight: 700; color: var(--text); cursor: pointer; touch-action: manipulation; }
.bigkp-key:active { background: var(--surface-2); transform: scale(.97); }
.bigkp-key.fn { background: var(--surface-2); color: var(--text-2); font-size: 22px; }
.bigkp-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 4px; }
@media (min-width: 1024px) { .bigkp-key { min-height: 52px; font-size: 22px; } .bigkp-val { font-size: 44px; } }

/* 빠른 선택 목록 */
.qpick { display: flex; flex-direction: column; gap: 10px; }
.qpick-search { font-size: 18px; }
.qpick-list { display: flex; flex-direction: column; gap: 8px; max-height: 52dvh; overflow: auto; }
.qpick-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; color: var(--text); width: 100%; }
.qpick-row:active { background: var(--surface-2); }
.qpick-row.selected { border-color: var(--accent); background: var(--accent-soft); }
.qpick-row:disabled { opacity: .5; }
.qpick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qpick-label { font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.qpick-sub { font-size: 14px; color: var(--text-2); }
.qpick-chev { color: var(--text-3); font-size: 22px; }
.qpick-row.selected .qpick-chev { color: var(--accent); font-weight: 800; }
.qpick-empty { text-align: center; color: var(--text-3); padding: 24px; }
.qpick-create { width: 100%; }
.qpick-form { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 12px; }
.qpick-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; color: var(--text-2); }
.qpick-form-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
@media (min-width: 1024px) { .qpick-row { min-height: 48px; } .qpick-label { font-size: 15px; } .qpick-sub { font-size: 13px; } }

/* 큰 알약 토글 */
.qseg { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); }
.qseg-opt { min-height: 56px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: 17px; color: var(--text-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 8px; text-align: center; touch-action: manipulation; }
.qseg-opt small { font-weight: 500; font-size: 13px; color: var(--text-3); }
.qseg-opt .qseg-ic { font-size: 22px; }
.qseg-opt.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.qseg-opt.active small { color: rgba(255,255,255,.8); }
.qseg-lg .qseg-opt { min-height: 64px; }
.qseg-sm .qseg-opt { min-height: 44px; font-size: 15px; }
@media (min-width: 1024px) { .qseg-opt { min-height: 44px; font-size: 14px; } .qseg-lg .qseg-opt { min-height: 48px; } }

/* 하단 고정 확인 바 */
.confirm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(160%) blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(0,0,0,.12); }
.confirm-bar-inner { display: flex; align-items: center; gap: 12px; max-width: 1100px; margin: 0 auto; }
.confirm-bar-summary { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.confirm-bar-summary .muted { display: block; font-weight: 500; }
.confirm-bar-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.confirm-bar-actions .btn { min-width: 120px; }
body.has-confirm-bar .main { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 110px); }
body.has-confirm-bar .tabbar { display: none; }
@media (min-width: 1024px) { .confirm-bar { left: var(--sidebar-w); } body.has-confirm-bar .main { padding-bottom: 120px; } }

/* KPI 행(모바일 페이지 전용; admin.css 의 .grid-3 재정의와 무관) */
.kpi-row { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-row > * { min-width: 0; }

/* 큰 숫자 표시 행(홈·작업 상세) */
.bignum { font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.bignum small { font-size: 16px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.qty-pill { display: inline-flex; align-items: baseline; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 6px 12px; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.qty-pill small { font-size: 13px; font-weight: 600; color: var(--text-2); }
.list-item .qty-pill { flex: 0 0 auto; }
.action-tile { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; color: var(--text); box-shadow: var(--shadow); }
.action-tile:active { background: var(--surface-2); }
.action-tile:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.action-tile .ic { font-size: 30px; width: 44px; text-align: center; flex: 0 0 auto; }
.action-tile .body { flex: 1; min-width: 0; }
.action-tile .label { font-weight: 800; font-size: 20px; color: var(--text); }
.action-tile.primary .label { color: #fff; }
.action-tile.danger .label { color: var(--danger); }
.action-tile .sub { font-size: 15px; color: var(--text-2); }
.action-tile .qty-pill { flex: 0 0 auto; }
.action-tile.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.action-tile.primary .sub { color: rgba(255,255,255,.8); }
.action-tile.primary .qty-pill { background: rgba(255,255,255,.18); color: #fff; } .action-tile.primary .qty-pill small { color: rgba(255,255,255,.8); }
.action-tile.danger { border-color: var(--danger); color: var(--danger); }
@media (min-width: 1024px) { .action-tile { min-height: 64px; } .action-tile .label { font-size: 16px; } .action-tile .sub { font-size: 13px; } .action-tile .ic { font-size: 22px; } }
.summary-box { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.summary-box .row-line { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.summary-box .row-line b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ───────── 카메라(전체 화면) · 촬영 허브 · 모바일 디지털화 — W1 */
.cam { position: fixed; inset: 0; z-index: 120; background: #000; color: #fff; display: flex; flex-direction: column; animation: fade .15s ease; }
body.cam-open { overflow: hidden; }
.cam-top { display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 8px; }
.cam-title { flex: 1; text-align: center; font-weight: 700; font-size: 16px; }
.cam-icon { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; }
.cam-icon.active { background: var(--accent); }
.cam-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #111; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; }
.cam-guide { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cam-guide div { border: 2px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
.cam-guide-doc div { width: 86%; aspect-ratio: 1 / 1.3; }
.cam-guide-photo div { width: 82%; aspect-ratio: 1; border-radius: 22px; }
.cam-guide-label div { width: 88%; aspect-ratio: 1.6; }
.cam-guide-qr div { width: 68%; aspect-ratio: 1; }
.cam-hint { position: absolute; left: 12px; right: 12px; bottom: 14px; text-align: center; font-weight: 600; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.cam-flash.on { opacity: .85; }
.cam-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px; background: #000; scrollbar-width: none; }
.cam-thumb { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.3); }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cam-thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; }
.cam-thumb span { position: absolute; left: 4px; bottom: 2px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.cam-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 20px max(16px, env(safe-area-inset-bottom)); background: #000; }
.cam-shutter { width: 84px; height: 84px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; justify-self: center; }
.cam-shutter span { width: 66px; height: 66px; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shutter:active span { transform: scale(.88); }
.cam-side { border: 0; background: transparent; color: #fff; font-size: 26px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; cursor: pointer; }
.cam-side small { font-size: 12px; font-weight: 600; }
.cam-side:disabled { opacity: .35; }
.cam-done:not(:disabled) { color: var(--accent); }
.cam-status { padding: 10px 16px max(16px, env(safe-area-inset-bottom)); background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; }
.photos .add.cam-add, .photos .add[data-album] { flex-direction: column; gap: 2px; font-size: 22px; }
.photos .add small { font-size: 11px; font-weight: 600; }
.cap-preview { display: flex; gap: 12px; align-items: flex-start; }
.cap-preview img { width: 112px; height: 112px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; border: 1px solid var(--line); }
.cap-tags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cap-steps { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; }
.cap-step { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); flex: 1; }
.cap-step span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.cap-step.now { color: var(--text); font-weight: 700; } .cap-step.now span { background: var(--accent); color: #fff; }
.cap-step.done span { background: var(--ok); color: #fff; }
.cap-src .thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 6px; }
.cap-src .thumbs img { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; flex: 0 0 auto; }
.cap-src .thumbs img.active { border-color: var(--accent); }
.thumbs.small img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; margin-right: 10px; }
.cap-qty { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cap-qty-color { border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.cap-qty-head .input { font-weight: 700; }
.cap-qty-color { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.cap-qty-head { grid-column: 1 / -1; }
.cap-qty-cell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.cap-qty-size { font-size: 12px; font-weight: 700; color: var(--text-2); text-align: center; }
.cap-qty-val { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-size: 22px; font-weight: 800; color: var(--text); cursor: pointer; }
.cap-qty-cell.low-conf .cap-qty-val, .input.low-conf { border-color: var(--warn); background: var(--warn-soft); }
