/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg: #ebe4d8;
  --ink: #1c1915;
  --muted: #6e655c;
  --line: #e3d8c8;
  --card: #fffdf9;
  --accent: #d4531e;
  --accent-ink: #8a3412;
  --teal: #0f6b62;
  --teal-soft: #e6f4f1;
  --red: #b42318;
  --red-soft: #fdecea;
  --amber: #9a6700;
  --amber-soft: #fff4d6;
  --sidebar: #1a2330;
  --chip: #f3ece2;
  --shadow: 0 12px 32px rgba(48, 32, 16, 0.06);
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(212, 83, 30, 0.08), transparent 50%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }

.shell { display: grid; grid-template-columns: 140px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar);
  color: #f3ecdf;
  display: flex;
  flex-direction: column;
  padding: 12px 6px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 6px; align-items: flex-start; color: inherit; text-decoration: none; padding: 2px 4px 12px; }
.brand strong { display: block; font-size: 11px; letter-spacing: -0.03em; line-height: 1.25; }
.brand small { color: #b7c0cc; font-size: 10px; }
.mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: #243044; display: grid; place-items: center; flex: none;
}
.mark i {
  width: 10px; height: 10px; border: 1.4px solid #e7d7c4;
  transform: rotate(45deg); display: block; position: relative;
}
.mark i::after {
  content: ""; position: absolute; inset: 3px; background: var(--accent);
}
.side-nav { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: 1 1; min-height: 0; overflow: auto; }
.nav-link {
  color: #d5dbe3; text-decoration: none; border-radius: 8px;
  padding: 7px 6px; display: flex; justify-content: flex-start; align-items: center;
  font-size: 12px; white-space: normal; line-height: 1.25; text-align: left;
}
.nav-link.on { background: #243044; color: white; }
.nav-link:hover, .nav-link.on:hover { background: #2f6bff; color: white; }
.nav-link em {
  background: var(--accent); color: white; border-radius: 999px;
  font-style: normal; font-size: 12px; min-width: 20px; text-align: center; padding: 1px 6px;
  margin-left: auto;
}
.nav-search { display: inline-flex; align-items: center; gap: 6px; }
.nav-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.web-memo { display: flex; flex-direction: column; gap: 12px; }
.web-memo h2 { margin: 0; }
.web-memo textarea { min-height: 96px; resize: vertical; }
.ibk-link {
  display: inline-flex; align-items: center; gap: 8px;
  width: -moz-fit-content;
  width: fit-content; padding: 8px 12px; border-radius: 12px;
  background: #e8f0ff; color: #0b3f91; font-weight: 700; text-decoration: none;
}
.ibk-link svg { width: 40px; height: 40px; flex: none; }
.ibk-link svg rect { fill: #0b3f91; }
.ibk-link svg path { fill: none; stroke: white; stroke-width: 1.8; stroke-linejoin: round; }
.nav-sub {
  color: #b7c3d1; text-decoration: none; border-radius: 8px;
  margin: 2px 0 2px 10px; padding: 5px 6px;
  font-size: 11px; line-height: 1.25; display: block;
}
.nav-sub.on { background: #243044; color: white; }
.nav-sub:hover, .nav-sub.on:hover { background: #2f6bff; color: white; }
.sheet-rows { display: flex; flex-direction: column; gap: 12px; }
.sheet-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-gap: 12px;
  gap: 12px;
  align-items: stretch;
}
.sheet-box {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  min-height: 132px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sheet-box h3 { margin: 0; font-size: 15px; }
.sheet-box input { width: 100%; }
.sheet-box .muted { margin: 0; }
.sheet-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  cursor: pointer;
}
.sheet-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sheet-check span {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #1c1915; display: block; flex: none;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.sheet-check:active span { transform: scale(0.78); }
.sheet-check input:checked + span {
  background: #6e6760;
  border-color: #6e6760;
  box-shadow: inset 0 0 0 3px #fff;
}
.sheet-check.done-check { border-radius: 8px; padding: 4px 8px; }
.sheet-check.done-check:hover { background: #2f6bff; color: white; }
.sheet-check.done-check:hover span { border-color: white; }
.sheet-record { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sheet-actions { display: flex; justify-content: flex-end; }
.progress-card { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.progress-date {
  max-width: none;
  width: 100%;
  min-height: 0;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  background: #2f6bff;
  border-color: #1f4fd0;
  color: white;
}
.progress-date h3 { flex: none; }
.progress-date h3, .progress-date .muted { color: white; }
.progress-date .muted { flex: 1 1; }
.progress-date input { width: auto; flex: none; background: white; color: var(--ink); }
.progress-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.progress-steps .sheet-box { width: 210px; min-height: 220px; }
.step-memo { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.step-memo textarea { width: 100%; min-height: 64px; resize: vertical; border: 0; padding: 0; background: transparent; }
.step-caption { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.size-row { display: flex; align-items: center; gap: 2px; }
.size-row i { font-style: normal; }
.progress-steps .size-row { gap: 4px; }
.progress-steps .size-row input { width: 6.2ch; max-width: 6.2ch; min-width: 6.2ch; padding: 4px 2px; text-align: center; font-size: 14px; }
.progress-steps .qty-input { width: 8ch; max-width: 8ch; min-width: 8ch; text-align: center; font-size: 14px; padding: 4px 2px; }
.progress-steps .sheet-box.board-box { width: 100%; min-height: 0; }
.board-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 8px 12px; gap: 8px 12px; align-items: end; }
.board-grid .span-2 { grid-column: span 2; }
.paper-name { flex-direction: row; align-items: center; gap: 8px; }
.paper-name span { flex: none; font-weight: 650; color: var(--ink); }
.paper-name input { flex: 1 1; min-width: 0; }
.board-grid .sheet-check { align-self: center; }
.board-grid textarea { min-height: 42px; }
.progress-steps .sheet-box.print-box { width: 100%; min-height: 0; }
.print-grid { display: grid; grid-template-columns: 1.1fr 1.3fr auto auto 1.1fr auto; grid-gap: 8px 12px; gap: 8px 12px; align-items: end; }
.print-grid .date-view { margin: 0; align-self: end; }
.print-memo { margin-top: 10px; border: 1px solid #1c1915; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.print-memo strong { font-size: 14pt; }
.print-inks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.hover-tip { position: relative; }
.hover-pop {
  display: none;
  position: absolute;
  z-index: 8;
  left: 0;
  bottom: calc(100% + 6px);
  background: #243044;
  color: white;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(28, 25, 21, 0.18);
}
.hover-tip:hover .hover-pop { display: block; }
.hover-pop.ask { left: auto; right: 0; width: 260px; white-space: normal; }
.receive-move.over .receive-ask,
.receive-move.away .receive-ask { display: block; }
.receive-ask.places { white-space: normal; width: 220px; }
.receive-move.over .receive-ask.places,
.receive-move.away .receive-ask.places { display: flex; flex-direction: column; gap: 4px; }
.receive-ask.places b { font-weight: 650; }
.receive-move.over .receive-ask { background: #2f6bff; }
.receive-move.away .receive-ask { background: #c62828; }
.box-progress .hover-pop,
.box-progress .receive-move.over .receive-ask,
.box-progress .receive-move.away .receive-ask,
.box-progress .modal {
  background: #c62828;
  color: white;
  font-size: 14pt;
}
.box-progress .modal h2,
.box-progress .modal p,
.box-progress .modal strong { color: white; }
.inspect-note { display: flex; flex-direction: column; gap: 6px; }
.inspect-note p { margin: 0; font-size: 12px; }
.date-view { min-height: 28px; border: 1px dashed #cfc6ba; border-radius: 8px; padding: 4px 8px; color: var(--ink); }
.progress-steps .sheet-box.on { border-color: #243044; box-shadow: inset 0 0 0 2px #243044; }
.finder-hits { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.finder-hits li { display: inline-flex; align-items: center; gap: 4px; }
.side-foot { margin-top: auto; padding: 8px 4px 0; }
.side-foot p { color: #93a0b0; font-size: 11px; line-height: 1.45; }
.side-foot .btn { padding: 6px 4px; font-size: 12px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; background: #121922; border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.role-switch button { border: 0; background: transparent; color: #c5ced8; border-radius: 9px; padding: 8px; }
.role-switch button.on { background: #fffdf9; color: var(--ink); }

.main { min-width: 0; padding: 28px 16px 64px; }
.page, .page.narrow, .page.sheet-page { max-width: none; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; line-height: 1.25; }
.eyebrow { margin: 0 0 6px; color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.lede, .muted { color: var(--muted); line-height: 1.5; }
.lede { margin: 8px 0 0; max-width: 62ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--ink);
  padding: 10px 14px; text-decoration: none; font-weight: 650;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn.gray { background: #6e6760; border-color: #6e6760; color: white; }
.btn.print-btn:hover:not(:disabled) { background: #2f6bff; border-color: #2f6bff; color: white; }
.print-preview {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 25, 21, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.print-preview-bar { display: flex; align-items: center; gap: 12px; color: white; }
.print-preview-time { min-width: 48px; font-weight: 700; }
.print-preview iframe {
  width: min(210mm, calc(100% - 24px));
  height: min(78vh, 297mm);
  background: white;
  border: 0;
  box-shadow: 0 16px 40px rgba(28, 25, 21, 0.28);
}
.print-preview.now { background: transparent; pointer-events: none; }
.print-preview.now .print-preview-bar { display: none; }
.print-preview.now iframe {
  position: fixed; left: -120vw; top: 0;
  width: 210mm; height: 297mm;
  box-shadow: none;
}
.btn.ghost { background: transparent; }
.btn.danger { background: white; color: var(--red); border-color: #f0c7c3; }
.btn.small { padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.btn:disabled { opacity: 0.55; cursor: default; }

.banner {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; background: white;
}
.banner.soft { background: #f7f1e7; }
.banner.ok { background: var(--teal-soft); color: #0c4f49; }
.banner.warn { background: var(--amber-soft); color: #7a5200; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 12px; gap: 12px; margin: 8px 0 14px; }
.stat {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 34px; letter-spacing: -0.05em; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); }
.stat.late b { color: var(--red); }
.stat.today b { color: var(--amber); }
.stat.run b { color: var(--teal); }
.stat.on { outline: 2px solid var(--ink); }

.load-row { display: grid; grid-template-columns: repeat(8, 1fr); grid-gap: 8px; gap: 8px; margin-bottom: 16px; }
.load-cell {
  background: transparent; border: 1px dashed #d3c6b4; border-radius: 14px; padding: 10px 8px; text-align: left;
}
.load-cell b { display: block; font-size: 20px; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.load-cell span { color: var(--muted); font-size: 12px; }
.load-cell.on { background: var(--ink); color: white; border-style: solid; }
.load-cell.on span { color: #ddd4c8; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.search, input, select, textarea {
  background: white; border: 1px solid #ddd3c5; border-radius: 12px; padding: 10px 12px; width: 100%;
}
.search { max-width: 280px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 0; background: var(--chip); border-radius: 999px; padding: 8px 12px; }
.chip.on { background: var(--ink); color: white; }

.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin: 6px 0 10px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.seg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.seg.done { background: var(--teal); }
.seg.doing { background: #e0a100; }
.seg.wait { background: #d9d0c4; }
.seg.late { background: var(--red); }
.seg.off { background: transparent; border: 1px dashed #cfc4b4; }

.order-head, .order-row {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 150px 1fr 120px 110px;
  grid-gap: 12px;
  gap: 12px; align-items: center;
}
.order-head { color: var(--muted); font-size: 12px; padding: 0 16px 6px; }
.orders { display: flex; flex-direction: column; gap: 8px; }
.order-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.order-row:hover { border-color: #c8b8a4; }
.order-row strong, .order-row small { display: block; }
.order-row small, .due-mini { color: var(--muted); font-size: 12px; }
.order-row.late { box-shadow: inset 3px 0 0 var(--red), var(--shadow); }
.order-row.today { box-shadow: inset 3px 0 0 #d97706, var(--shadow); }
.order-row.done { box-shadow: inset 3px 0 0 var(--teal), var(--shadow); }
.order-row.quote { box-shadow: inset 3px 0 0 #8d7b68, var(--shadow); }
.track-wrap { display: flex; align-items: center; gap: 8px; }
.track { display: flex; gap: 4px; }
.track .seg { width: 14px; height: 14px; }
.track-count { color: var(--muted); font-size: 12px; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.money { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; font-weight: 650; }
.badge {
  display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700;
  background: var(--chip);
}
.badge.late { background: var(--red-soft); color: var(--red); }
.badge.today { background: var(--amber-soft); color: var(--amber); }
.badge.run, .badge.done { background: var(--teal-soft); color: var(--teal); }
.badge.quote, .badge.cancelled { background: #efe8de; color: #5e564e; }

.feed { margin-top: 28px; }
.feed h2, .card h2, .card h3 { margin: 0; letter-spacing: -0.03em; }
.feed ul, .alert-list, .preview ul { list-style: none; padding: 0; margin: 12px 0 0; }
.feed li { display: grid; grid-template-columns: 120px 1fr; grid-gap: 10px; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.feed time { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 12px; gap: 12px; }
.form-grid label, .date-pair label, .worker-box, .process-top label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.span-2 { grid-column: span 2; }
.name-row { display: flex; gap: 8px; align-items: center; }
.page > .name-row { margin-bottom: 12px; }
.name-row input { flex: 1 1; min-width: 0; }
.editor { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 12px; gap: 12px; margin-bottom: 12px; }
.schedule { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.schedule li {
  display: grid; grid-template-columns: 1fr 220px; grid-gap: 12px; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: #f7f3ec;
}
.schedule li.on { background: white; border: 1px solid var(--line); }
.check { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 15px; }
.check input { width: auto; }
.check small, .schedule small { display: block; color: var(--muted); font-weight: 400; }
.due { display: flex; flex-direction: column; gap: 4px; }
.skip { color: var(--muted); font-size: 13px; text-align: right; }
.savebar, .row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions.tight { justify-content: flex-start; }
.form-error { color: var(--red); }
.meta { display: grid; grid-template-columns: repeat(5, 1fr); grid-gap: 10px; gap: 10px; margin-bottom: 14px; }
.meta div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.meta span { display: block; color: var(--muted); font-size: 12px; }
.memo { background: #f7f1e7; border-radius: 14px; padding: 12px 14px; }

.stepper { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 18px 1fr auto; grid-gap: 12px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 99px; margin-top: 5px; background: #d9d0c4; }
.step.done .dot { background: var(--teal); }
.step.doing .dot { background: #e0a100; }
.step.late .dot { background: var(--red); }
.step.off { opacity: 0.55; }
.step small { display: block; color: var(--muted); }
.step-actions { display: flex; gap: 6px; }
.worker-line { display: grid; grid-template-columns: 90px 1fr 1fr; grid-gap: 8px; gap: 8px; align-items: center; margin-bottom: 8px; }
.worker-box input { min-width: 180px; }
.sole { margin-top: 18px; }

.floor { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); grid-gap: 10px; gap: 10px; overflow-x: auto; padding-bottom: 12px; }
.floor-col { background: rgba(255, 253, 249, 0.55); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 240px; }
.floor-col header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.floor-col header span { background: var(--ink); color: white; border-radius: 99px; min-width: 22px; text-align: center; font-size: 12px; }
.floor-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.floor-card.late { border-color: #efc1bc; box-shadow: inset 3px 0 0 var(--red); }
.floor-card a { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; margin-bottom: 8px; }
.floor-card small { color: var(--muted); }

.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-list li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.alert-top, .alert-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert-list pre { white-space: pre-wrap; font-family: inherit; background: #fff8df; border-radius: 12px; padding: 12px; margin: 10px 0; }
.alert-foot { color: var(--muted); font-size: 13px; }
.guide { margin: 0; padding-left: 18px; color: var(--ink); line-height: 1.6; }
.connected { color: var(--teal); font-weight: 700; }
.process-card, .type-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fff; }
.process-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.process-top label { flex: 1 1; min-width: 160px; }
.index { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: white; display: grid; place-items: center; font-weight: 700; }
.bands { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bands-label { color: var(--muted); font-size: 12px; }
.band { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.band input { width: 110px; }
.type-editor { display: flex; flex-direction: column; gap: 10px; }
.type-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0; }
.preview { background: #f7f3ec; border-radius: 14px; padding: 12px; }
.preview li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #e5d9c8; }
.check.inline { flex-direction: row; color: var(--ink); }
.empty, .boot { padding: 28px; background: var(--card); border-radius: var(--radius); border: 1px dashed #d3c6b4; }
.boot { margin: 40px auto; max-width: 520px; }
.toast {
  position: fixed; right: 24px; bottom: 24px; background: var(--ink); color: white;
  padding: 12px 14px; border-radius: 14px; max-width: 360px; z-index: 20;
  box-shadow: var(--shadow);
}
.modal-back { position: fixed; inset: 0; background: rgba(22, 18, 14, 0.45); display: grid; place-items: center; z-index: 30; }
.modal { width: min(420px, calc(100% - 32px)); background: white; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.modal h2 { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page.sheet-page { max-width: none; }
.money-sm { font-size: 22px; letter-spacing: -0.04em; }
.party-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 14px; gap: 14px; }
.pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 12px; gap: 12px; }
.invoice-head, .invoice-row {
  display: grid;
  grid-template-columns: 150px 1.2fr 1.3fr 120px 110px 88px;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
}
.invoice-head { color: var(--muted); font-size: 12px; padding: 0 16px 6px; }
.invoice-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.invoice-row:hover { border-color: #c8b8a4; }
.invoice-row strong, .invoice-row small { display: block; }
.invoice-row small { color: var(--muted); font-size: 12px; }
.tax-line-wrap { overflow: auto; }
.tax-line {
  display: grid;
  grid-template-columns: 52px 52px 1.4fr 1fr 84px 100px 120px 96px 1fr auto;
  grid-gap: 6px;
  gap: 6px;
  align-items: center;
  min-width: 980px;
  margin-bottom: 6px;
}
.tax-line.head { color: var(--muted); font-size: 12px; }
.tax-frame { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 16px; overflow: auto; }
.tax-sheet {
  min-width: 760px;
  border: 2px solid #c4372f;
  color: #7a1d18;
  padding: 12px;
  background: white;
}
.tax-sheet.supplier { border-color: #1d4e89; color: #163a66; }
.tax-top, .tax-foot { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; }
.tax-title { display: flex; flex-direction: column; align-items: center; flex: 1 1; }
.tax-title strong { font-size: 28px; letter-spacing: 0.4em; }
.tax-serial { width: 220px; border-collapse: collapse; }
.tax-sheet table { width: 100%; border-collapse: collapse; }
.tax-sheet th, .tax-sheet td { border: 1px solid currentColor; padding: 4px 6px; color: var(--ink); font-size: 12px; font-weight: 500; }
.tax-sheet th { color: inherit; width: 72px; background: transparent; }
.tax-parties { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; }
.tax-party { display: grid; grid-template-columns: 28px 1fr; border: 1px solid currentColor; }
.tax-party + .tax-party { border-left: 0; }
.tax-party-label { display: grid; place-items: center; writing-mode: vertical-rl; letter-spacing: 0.2em; font-weight: 700; }
.tax-party dl { margin: 0; }
.tax-party dl > div { display: grid; grid-template-columns: 72px 1fr 48px 1fr; border-top: 1px solid currentColor; }
.tax-party dl > div:first-child { border-top: 0; }
.tax-party dt, .tax-party dd { margin: 0; padding: 4px 6px; }
.tax-party dt { color: inherit; }
.tax-party dd.wide { grid-column: 2 / -1; }
.tax-amounts, .tax-items { margin-top: 8px; }
.tax-amounts .num, .tax-items .num { text-align: right; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.tax-items td { height: 28px; }
.tax-foot { margin-top: 8px; border: 1px solid currentColor; }
.tax-foot div { flex: 1 1; display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-left: 1px solid currentColor; }
.tax-foot div:first-child { border-left: 0; }
.tax-claim { display: flex; gap: 8px; align-items: center; }
.tax-claim em { font-style: normal; display: inline-flex; align-items: center; gap: 4px; }
.tax-claim i { width: 12px; height: 12px; border: 1px solid currentColor; display: inline-block; }
.tax-claim i.on { background: currentColor; }
.tax-note { display: flex; gap: 8px; align-items: baseline; }
.sheet-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 16px; }
.sheet { width: 100%; border-collapse: collapse; min-width: 980px; }
.sheet th, .sheet td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; font-size: 13px; }
.sheet th { background: #1a2330; color: #f4eee6; font-weight: 650; }
.sheet small, .sheet strong { display: block; }
.sheet small { color: var(--muted); }
.sheet-input, .sheet select { padding: 7px 8px; }
.plan-sign { display: grid; grid-template-columns: repeat(3, 140px); grid-gap: 18px; gap: 18px; justify-content: flex-end; margin: 18px 0; }
.plan-sign div { display: flex; gap: 8px; align-items: center; }
.plan-sign b { flex: 1 1; border-bottom: 1px solid #8d8174; height: 28px; }
.print-only { display: none; }
.cal-nav { display: flex; gap: 8px; margin-bottom: 10px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-gap: 6px; gap: 6px; margin-bottom: 16px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.cal-day {
  min-height: 112px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  text-align: left;
}
.cal-day:disabled { visibility: hidden; }
.cal-day.on { outline: 2px solid var(--ink); }
.cal-day.today > strong { color: var(--accent-ink); }
.cal-day small { color: var(--muted); }
.cal-count { display: none; }
.cal-chip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 11px;
  background: var(--teal-soft);
  color: #0c4f49;
}
.cal-chip.late { background: var(--red-soft); color: var(--red); }
.cal-chip.today { background: var(--amber-soft); color: var(--amber); }
.cal-chip.done { background: #efe8de; color: #5e564e; }
.cal-chip.quote, .cal-chip.memo { background: #e7eef8; color: #1d4e89; }
.day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.day-list a { text-decoration: none; color: inherit; }
.day-list li { background: #f7f3ec; border-radius: 12px; padding: 10px 12px; }
.day-list li.search-hit { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.day-list li.search-hit > div { min-width: 0; flex: 1 1; }
.search-hide { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.day-list strong, .day-list small { display: block; }
.day-list small { color: var(--muted); }
.cal-date-field { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.cal-date-field input { width: auto; }
.day-manual:has(.form-grid) { flex-direction: column; align-items: stretch; }
.side-search { margin: 0 8px 12px; }
.side-search input { background: #121922; color: #f4eee6; border-color: #314056; }
.side-search input::placeholder { color: #93a0b0; }
.search.wide { max-width: 480px; }
.proc-grid { display: flex; flex-direction: column; gap: 8px; }
.proc-row {
  display: grid;
  grid-template-columns: 36px minmax(120px, 160px) 168px 1fr;
  grid-gap: 8px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: #f7f3ec;
}
.proc-row.on { background: white; border: 1px solid var(--line); }
.proc-row .due input { width: 100%; }
.line-card h2, .line-card h3 { margin: 0; }
.multi { position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.multi-btn {
  text-align: left;
  background: white;
  border: 1px solid #ddd3c5;
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 42px;
  color: var(--ink);
}
.multi-panel {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}
.mail-row { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.biz-modal { width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; }
.mail-modal { width: min(480px, calc(100% - 32px)); }
.price-note { margin: 28px 0 0; color: var(--muted); font-size: 13px; }
.prod-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); grid-gap: 8px; gap: 8px; }
.prod-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #f7f3ec; border-radius: 14px; padding: 10px; min-width: 0;
}
.prod-card.on { background: white; border: 1px solid var(--line); }
.prod-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.prod-card .check { flex-direction: row; color: var(--ink); font-size: 14px; font-weight: 700; }
.prod-card small { color: var(--muted); }
.a4-stage { background: #d9d1c4; border-radius: 18px; padding: 18px 12px 28px; margin: 8px 0 18px; }
.a4-label { text-align: center; color: #5c534a; margin: 0 0 12px; font-size: 13px; }
.a4 {
  display: block;
  width: min(210mm, 100%);
  min-height: 297mm;
  margin: 0 auto;
  background: white;
  color: #1c1915;
  box-shadow: 0 16px 40px rgba(40, 28, 16, 0.16);
  padding: 14mm 12mm;
}
.a4 header { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 12px; }
.a4 h1 { margin: 0; font-size: 28px; letter-spacing: 0.12em; }
.a4 table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.a4 th, .a4 td { border: 1px solid #222; padding: 6px 8px; text-align: left; font-size: 12px; color: #1c1915; }
.a4-meta th { width: 72px; background: #f6f3ee; }
.a4 thead th { width: auto; background: #f6f3ee; }
.a4-actions { display: flex; justify-content: center; margin-top: 16px; }
.result-page { display: flex; flex-direction: column; }
.result-page > * { order: 2; }
.result-page > .page-head { order: 0; }
.result-page > .a4-stage { order: 1; }

@media print {
  @page { size: 210mm 297mm; margin: 40mm 16mm 16mm 16mm; }
  .sidebar, .no-print, .toast, .side-foot, .modal-back { display: none !important; }
  .shell { display: block; background: white; }
  .main { padding: 0; }
  body { background: white; }
  .print-only, .a4 { display: block; }
  .page:has(.a4-stage) > :not(.a4-stage) { display: none !important; }
  .a4-stage { background: white; padding: 0; margin: 0; border-radius: 0; }
  .a4-label, .a4-actions { display: none !important; }
  .a4 {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .plan-print-head h1, .a4 h1 { margin: 0; font-size: 28px; }
  .a4 header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; }
  .a4 table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  .a4 th, .a4 td { border: 1px solid #222; padding: 6px 8px; text-align: left; font-size: 12px; }
  .a4-meta th { width: 72px; background: #f4f4f4; }
  .a4 thead th { width: auto; background: #f4f4f4; }
  .sheet-wrap, .tax-frame { border: 0; box-shadow: none; }
}

@media (max-width: 980px) {
  .shell { display: grid; grid-template-columns: 140px 1fr; }
  .sidebar { height: 100vh; flex-direction: column; }
  .side-nav { flex-direction: column; width: auto; overflow: auto; }
  .toolbar, .chips, .legend { width: 100%; }
  .legend { margin-top: 8px; }
  .main { padding: 18px 14px 48px; }
  .stats, .load-row, .form-grid, .meta, .party-grid, .pay-grid { grid-template-columns: 1fr 1fr; }
  .invoice-head { display: none; }
  .invoice-row { grid-template-columns: 1fr; }
  .cal-day { min-height: 72px; }
  .cal-chip, .cal-more { display: none; }
  .cal-count { display: block; }
  .load-row { grid-template-columns: repeat(4, 1fr); }
  .order-head { display: none; }
  .order-row, .schedule li, .process-top, .worker-line, .proc-row { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 26px; }
  .span-2 { grid-column: auto; }
  .side-foot .who { display: flex; }
  .now-step, .now-actions { align-items: stretch; }
}

@media (max-width: 720px) {
  .sidebar {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .nav-link { min-height: 44px; padding: 12px 14px; }
  .side-foot .btn { min-height: 40px; padding: 8px 12px; }
  .main {
    padding: 14px 12px max(32px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .page-head { width: 100%; }
  .page-head h1 { font-size: 24px; }
  .page-head .row-actions { width: 100%; }
  .lede { max-width: none; }
  input, select, textarea, .search { font-size: 16px; }
  .search, .search.wide { max-width: none; }
  .btn { min-height: 44px; white-space: nowrap; }
  .banner { align-items: center; }
  .banner .btn { flex: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid, .meta, .party-grid, .pay-grid, .date-pair { grid-template-columns: 1fr; }
  .load-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 28px; }
  .order-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .order-row > span:first-child strong { font-size: 18px; }
  .track { flex-wrap: wrap; }
  .floor { grid-auto-flow: row; grid-template-columns: 1fr; }
  .floor-col { min-height: 0; }
  .prod-row { grid-template-columns: 1fr; }
  .step { grid-template-columns: 18px 1fr; }
  .step-actions { grid-column: 2; flex-wrap: wrap; }
  .now-actions { width: 100%; }
  .now-actions input, .now-actions .btn { flex: 1 1 120px; min-width: 0; }
  .row-actions .btn { flex-grow: 1; flex-shrink: 1; flex-basis: calc(50% - 8px); }
  .section-head, .name-row { flex-direction: column; align-items: stretch; }
  .feed li { grid-template-columns: 1fr; gap: 2px; }
  .cal { gap: 3px; }
  .cal-dow { font-size: 11px; }
  .cal-day { min-height: 48px; padding: 3px; border-radius: 8px; }
  .a4 { width: 100%; min-height: 0; padding: 12px; }
  .a4 h1 { font-size: 22px; letter-spacing: 0.06em; }
  .a4-stage { overflow: auto; }
  .login-card { margin: 12px auto; padding: 20px 16px; }
  .toast {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: none;
  }
  .modal, .biz-modal, .mail-modal { width: calc(100% - 20px); }
  .plan-sign { grid-template-columns: 1fr; justify-content: stretch; }
  .issuer-list li { grid-template-columns: 72px 1fr; }
  .issuer-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

.login-card {
  margin: 48px auto;
  width: min(420px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.who { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 14px; }
.who small { color: #9aa6b2; }
.now-step { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.now-step h2 { margin: 4px 0; }
.now-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.now-actions input { min-width: 160px; }
.user-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.user-list button { text-align: left; width: 100%; border: 1px solid #e4d8c8; background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.user-list button.on { border-color: #c96a2b; }
.user-list span, .log-table small { display: block; color: var(--muted); font-size: 12px; }
.log-scroll { overflow: auto; max-height: 360px; }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th, .log-table td { border-bottom: 1px solid #eadfd2; padding: 8px 6px; text-align: left; vertical-align: top; }
.quote-sheet {
  display: flex;
  flex-direction: column;
  width: min(210mm, 100%);
  min-height: 297mm;
  margin: 0 auto 28px;
  background: white;
  box-shadow: 0 16px 40px rgba(40, 28, 16, 0.16);
  box-sizing: border-box;
}
.quote-sheet .a4.quote-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  box-shadow: none;
}
.quote-sheet .a4-actions {
  margin-top: auto;
  padding: 8px 12mm 14mm;
}
.quote-frame {
  border: 2px solid #1c1915;
  padding: 22px 22px 18px;
  min-height: 0;
  box-shadow: none;
}
.quote-frame header { border-bottom: 1px solid #1c1915; padding-bottom: 12px; }
  .quote-issuer { display: block; margin: 4px 0 8px; color: #5c534a; font-size: 13px; line-height: 1.45; }
.issuer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.issuer-list li {
  display: grid;
  grid-template-columns: 88px 1fr;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.issuer-label { color: var(--muted); font-size: 13px; }
.issuer-list strong { font-weight: 650; }
.issuer-actions { display: flex; gap: 6px; }

.today-search { max-width: none; margin: 0; font-size: 18px; padding: 14px 16px; }
.today-pick { position: relative; margin: 4px 0 14px; }
.today-suggest {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 6px; list-style: none;
  background: white; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); max-height: 240px; overflow: auto;
}
.today-suggest button {
  width: 100%; text-align: left; border: 0; background: transparent;
  border-radius: 10px; padding: 8px 10px;
}
.today-suggest button:hover { background: #e7f0ff; }
.day-box {
  display: flex; flex-direction: column; gap: 12px;
  background: white; border: 2px solid #1c1915; border-radius: 8px; padding: 16px;
}
.day-box h2 { margin: 0; }
.day-checks { display: flex; flex-direction: column; gap: 8px; }
.day-checks label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.day-checks input { width: 18px; height: 18px; }
.day-qty { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 8px; gap: 8px; }
.day-qty div { background: #f6f1e8; border-radius: 12px; padding: 10px 12px; }
.day-qty small { color: var(--muted); font-size: 12px; }
.day-qty strong { display: block; margin-top: 4px; font-size: 20px; }
.today-company { margin-top: 18px; }
.today-company h2 { margin: 0 0 10px; }
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); grid-gap: 12px; gap: 12px; }
.job-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  box-shadow: var(--shadow);
}
.job-card.doing { border-color: #b7ddd8; background: linear-gradient(180deg, #f4fbf9, var(--card)); }
.job-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.job-top strong { display: block; font-size: 18px; }
.job-top small, .job-process { color: var(--muted); }
.job-process { margin: 0; }
.job-live, .job-wait {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700;
}
.job-live { background: var(--teal-soft); color: var(--teal); }
.job-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); display: block; }
.job-wait { background: var(--chip); color: var(--muted); }
.job-times { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 8px; gap: 8px; }
.job-times div { background: #f6f1e8; border-radius: 14px; padding: 10px 12px; }
.job-times small { color: var(--muted); font-size: 12px; }
.job-times strong { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -0.03em; }

.work-companies { display: flex; flex-direction: column; gap: 12px; }
.work-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.work-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d9d0c4;
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 8px 2px 2px;
  font-size: 10pt;
  line-height: 1.2;
}
.work-icon span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a2330;
  color: #f4eee6;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex: none;
}
.work-icon { transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease; }
.work-icon:hover, .work-icon:focus-visible { border-color: #1a2330; }
.work-icon:active { transform: scale(0.96); background: #efe6da; }
.work-block { margin-top: 22px; }
.work-block h2 { margin: 0 0 8px; }
.work-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 8px; flex-wrap: wrap; }
.work-head h2 { margin: 0; font-size: 10pt; }
.shell .to-top {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  width: 76px;
  height: 28px;
  margin: 0;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  background: #ffe14a;
  color: #1c1915;
  border-color: #e0b400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shell .to-top:hover { background: #2f6bff; border-color: #2f6bff; color: white; }
.box-progress h2,
.box-progress h3,
.box-progress .work-icon,
.box-progress .work-head h2,
.box-progress .sheet-box h3,
.box-progress .xl thead th { font-size: 14pt; }
.work-head p { font-size: 9pt; }
.work-pages { display: flex; flex-direction: column; gap: 18px; align-items: stretch; width: 100%; }
.work-a4 {
  width: 100%;
  box-sizing: border-box;
  background: white;
  border: 1px solid #d9d0c4;
  box-shadow: 0 12px 28px rgba(48, 32, 16, 0.08);
  padding: 8px 6px 12px;
}
.work-page-no { margin: 0 0 8px; color: var(--muted); font-size: 9pt; }
.work-a4 .xl { min-width: 0; width: 100%; }
.month-pick { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); max-width: 220px; }
.xl-wrap { overflow: auto; border: 2px solid #1c1915; background: white; }
.xl { width: 100%; border-collapse: collapse; min-width: 0; }
.xl.colbus { min-width: 720px; }
.xl.material-stock { min-width: 0; margin-top: 8px; }
.xl.colbus td:nth-child(n + 2):nth-child(-n + 4) input:not([type="checkbox"]) { min-width: 140px; }
.xl.material { min-width: 760px; }
.xl.material td.xl-num,
.xl.material th.xl-num { width: 8ch; max-width: none; }
.xl.material td.xl-num input { width: 100%; max-width: none; min-width: 0; }
.xl th, .xl td { border: 1px solid #1c1915; padding: 3px 4px; text-align: center; vertical-align: middle; background: white; font-size: 9pt; }
.xl thead th { background: #1a2330; color: #f4eee6; font-size: 9pt; font-weight: 650; }
.xl td:nth-child(-n + 3), .xl th:nth-child(-n + 3) { text-align: left; }
.xl th.xl-size, .xl td.xl-size { width: 14ch; min-width: 14ch; }
.xl td.xl-size input { min-width: 12.5ch; }
.xl th.xl-num, .xl td.xl-num { width: 6.5ch; max-width: 6.5ch; }
.xl td.xl-num input { width: 5.5ch; min-width: 0; max-width: 5.5ch; padding-right: 0; }
.box-progress .xl th.xl-name,
.box-progress .xl td.xl-name { width: 8em; min-width: 8em; max-width: none; }
.box-progress .xl td.xl-name input { width: 100%; min-width: 6.6em; max-width: none; box-sizing: border-box; }
.box-progress .xl th.xl-num,
.box-progress .xl td.xl-num { width: 11ch; max-width: none; }
.box-progress .xl td.xl-num input { width: 9ch; min-width: 9ch; max-width: none; }
.work-journal .xl th.xl-num,
.work-journal .xl td.xl-num { width: auto; max-width: none; }
.work-journal .xl.work-log { table-layout: fixed; width: 100%; }
.work-journal .xl.work-log .col-date { width: 13%; }
.work-journal .xl.work-log .col-name { width: 15%; }
.work-journal .xl.work-log .col-size { width: 12%; }
.work-journal .xl.work-log .col-num { width: 8%; }
.work-journal .xl.work-log .col-money { width: 10%; }
.work-journal .xl.work-log .col-mark { width: 4%; }
.work-journal .xl.work-log .col-photo { width: 5%; }
.work-journal .xl.work-log .col-act { width: 5%; }
.work-journal .xl.work-log th,
.work-journal .xl.work-log td { font-size: 12pt; }
.work-journal .xl.work-log thead th { font-size: 12pt; line-height: 1.25; white-space: normal; }
.work-journal .xl.work-log input:not([type="checkbox"]) { width: 100%; min-width: 0; max-width: none; box-sizing: border-box; }
.work-journal .xl.work-log td.xl-num input { text-align: center; }
.xl input { width: 100%; min-width: 0; border-radius: 4px; padding: 2px 4px; font-size: 9pt; }
.box-progress input:not([type="checkbox"]),
.box-progress textarea,
.box-progress select,
.box-progress .xl input,
.box-progress .progress-steps .size-row input,
.box-progress .progress-steps .qty-input { font-size: 12pt; }
.work-journal input:not([type="checkbox"]),
.work-journal textarea,
.work-journal select { font-size: 12pt; }
.work-journal input.need,
input.need { outline: 2px solid #c62828; background: #fff4f2; }
.design-output .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.design-output .design-sheet { display: flex; flex-direction: column; padding: 0; overflow: visible; }
.design-output .design-extra { display: grid; place-items: center; padding: 6px; background: white; }
.design-output .design-print-tip { position: relative; display: grid; place-items: center; }
.design-output .design-row-print { transition: none; }
.design-output .design-row-print.hot,
.design-output .design-print-tip:hover .design-row-print {
  background: #c62828; color: white; border-color: #c62828;
}
.design-output .design-print-ask {
  position: absolute; right: 0; bottom: 100%; z-index: 30;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  width: 220px; margin: 0; padding: 10px 12px;
  background: #c62828; color: white; font-size: 14pt; line-height: 1.35;
  border-radius: 8px; box-shadow: 0 8px 20px rgba(28, 25, 21, 0.18);
}
.design-output .design-print-ask .btn { background: white; color: #c62828; border-color: white; transition: none; }
.design-output .design-row {
  display: grid; grid-template-columns: repeat(6, 1fr); align-items: stretch;
  min-height: 52px; border-bottom: 1px solid #1c1915;
}
.design-output .design-row:last-child { border-bottom: 0; }
.design-output .design-row input {
  width: 100%; min-width: 0; border: 0; border-radius: 0; background: white; color: #1c1915;
  font-size: 12pt; padding: 10px 14px; border-right: 1px solid #1c1915;
}
.design-output .design-row input::placeholder { color: #8a8178; }
.design-output .design-row > input:last-child { border-right: 0; }
.design-output .design-labels > span {
  display: grid; place-items: center; min-height: 52px;
  border-right: 1px solid #1c1915; background: #2f6bff; color: white;
  font-size: 12pt; font-weight: 700;
}
.design-output .design-labels > span:last-child { border-right: 0; }
.design-output .design-labels > span.design-blue { background: #2f6bff; }
.design-output .design-image {
  position: relative; display: grid; place-items: center; cursor: pointer;
  width: 100%; min-height: 52px; border: 0; background: white; overflow: hidden; padding: 6px;
  font: inherit; color: inherit;
}
.design-output .design-image:hover .design-image-icon {
  border-color: #c62828; background: #c62828;
}
.design-output .design-image:hover .design-image-icon svg { stroke: white; }
.design-output .design-image:hover .design-image-icon circle { fill: white; }
.design-output .design-image:hover img { outline: 3px solid #c62828; outline-offset: 2px; }
.design-output .design-extra { display: grid; place-items: center; padding: 6px; background: white; }
.design-output .design-row-print { font-size: 12pt; padding: 6px 12px; }
.design-output .design-image-cell { position: relative; display: grid; min-width: 0; border-right: 1px solid #1c1915; }
.design-output .design-image-cell input {
  position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; border: 0; pointer-events: none;
}
.design-output .design-image img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.design-output .design-image-icon {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1.5px solid #1c1915; border-radius: 4px; background: white;
}
.design-output .design-image-icon svg {
  width: 22px; height: 22px; fill: none; stroke: #1c1915; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round;
}
.design-output .design-image-icon circle { fill: #1c1915; stroke: none; }
.order-entry .lede,
.order-entry .muted,
.order-entry .eyebrow,
.order-entry label,
.order-entry input,
.order-entry select,
.order-entry textarea,
.order-entry .btn,
.order-entry .btn.small,
.order-entry th,
.order-entry td,
.order-entry .order-head,
.order-entry small { font-size: 12pt; }
.xl .btn { font-size: 9pt; padding: 3px 6px; min-height: 0; }
.xl-mark label {
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  width: 100%;
  min-width: 32px;
  min-height: 32px;
}
.xl-mark input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.xl-mark span {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #1c1915; display: block;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.xl-mark label:active span { transform: scale(0.78); }
.xl-mark input:checked + span {
  background: #6e6760;
  border-color: #6e6760;
  box-shadow: inset 0 0 0 3px #fff;
}
.xl-mark input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.xl td.xl-money { text-align: right; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.xl-new td { background: #fbf7f1; }
.xl-cell { display: flex; flex-direction: column; gap: 6px; min-width: 120px; }
.xl-photo { display: flex; align-items: center; gap: 8px; }
.xl-photo label { position: relative; cursor: pointer; color: var(--muted); font-size: 9pt; }
.xl-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.xl-thumb { border: 0; background: transparent; padding: 0; }
.xl-thumb img, .xl-photo img { width: 72px; height: 48px; object-fit: cover; border: 1px solid #1c1915; background: white; }
.photo-pop { display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(920px, calc(100% - 24px)); }
.photo-pop img { width: 100%; max-height: 78vh; object-fit: contain; background: white; border-radius: 12px; }
.quote-no { text-align: right; }
.quote-no small { display: block; color: #6e655c; margin-top: 4px; }
.quote-box { border: 1px solid #1c1915; margin-top: 16px; }
.quote-table { width: 100%; border-collapse: collapse; margin: 0; }
.quote-table th, .quote-table td { border: 1px solid #1c1915; padding: 14px 16px; font-size: 15px; }
.quote-table th { width: 128px; background: #f6f1e8; letter-spacing: -0.02em; }
.quote-table td { white-space: pre-line; }
.quote-table td small { color: #6e655c; }

@media print {
  html, body, .shell, .main, .page, .result-page, .a4-stage {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  .result-page > * { order: 0 !important; }
  .sidebar, .no-print, .toast, .side-foot, .modal-back, .a4-label, .a4-actions { display: none !important; }
  .page:has(.a4-stage) > :not(.a4-stage) { display: none !important; }
  .a4-stage, .a4 { display: block !important; overflow: visible !important; width: auto !important; height: auto !important; min-height: 0 !important; }
  .quote-sheet {
    display: flex !important;
    width: auto !important;
    min-height: 273mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
    background: white !important;
  }
  .quote-sheet:last-child { break-after: auto; page-break-after: auto; }
  .quote-sheet .quote-frame { border: 2px solid #1c1915; }
  .work-pages { display: block !important; }
  .work-a4 {
    width: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    break-after: page;
    page-break-after: always;
  }
  .work-a4:last-child { break-after: auto; page-break-after: auto; }
  .xl-wrap { overflow: visible !important; border: 0 !important; width: 100% !important; max-width: 100% !important; }
  .xl, table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed;
  }
  .xl th, .xl td, .xl th.xl-size, .xl td.xl-size, .xl th.xl-num, .xl td.xl-num {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    font-size: 8pt !important;
  }
  .xl input, .xl .btn { font-size: 8pt !important; max-width: 100% !important; }
  .xl-thumb img, .xl-photo img { width: 28px !important; height: 20px !important; }
  img { max-width: 100% !important; }
}

