:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #d8dce2;
  --text: #111827;
  --muted: #6b7280;
  --blue: #1f4f99;
  --blue2: #2f5cff;
  --soft-blue: #eaf2ff;
}

/* 5년 백업 관리 및 클린업 알림 */
.backup-cleanup-banner {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:9px 16px;
  background:#fff3cd;
  border-bottom:1px solid #e4c66a;
  color:#644d08;
  font-size:13px;
}
.backup-cleanup-banner a { color:#493701; font-weight:800; text-underline-offset:3px; }
.db-manage-inline-actions,.db-cleanup-summary,.db-annual-create { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
.db-cleanup-summary { margin:8px 0 12px; }
.db-cleanup-summary span { padding:9px 13px; border:1px solid #d9e0e7; border-radius:8px; background:#f8fafc; }
.db-cleanup-needs-review { border-color:#d8a71c; box-shadow:0 0 0 2px rgba(216,167,28,.12); }
.db-annual-create label { display:flex; align-items:center; gap:8px; font-weight:700; }
.db-annual-create select { min-width:130px; }
.db-manage-card .data-table { min-width:760px; }
.db-manage-card .db-backup-list-table { min-width:1100px; }
.idea-rnd-report-button { white-space:nowrap; background:#183f58; color:#fff !important; border-color:#183f58; }
.idea-field-revision-memo { grid-column:1 / -1; }
@media (max-width:760px) {
  .backup-cleanup-banner { align-items:flex-start; flex-direction:column; gap:4px; }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { height: 56px; display:flex; align-items:center; justify-content:space-between; padding:0 18px; background:#eaeaea; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50; }
.brand { font-weight: 800; font-size: 18px; display:flex; align-items:center; gap:8px; }
.brand a { color:#111; }
.version { font-size:12px; color:#fff; background:#111827; border-radius:999px; padding:2px 7px; }
nav { display:flex; gap:14px; font-size:14px; }
.topbar nav {
  align-items: center;
  gap: 6px;
}
.topbar nav a {
  color: #243044;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 12px;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.topbar nav a:hover {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .10);
  text-decoration: none;
  transform: translateY(-1px);
}
.topbar nav a:focus-visible {
  outline: 3px solid rgba(47, 92, 255, .22);
  outline-offset: 2px;
}
.brand a:hover { text-decoration: none; color: var(--blue); }
.page { padding: 16px; }
.title-panel { display:flex; align-items:center; justify-content:space-between; background:#eaeaea; border:1px solid var(--line); padding:14px 18px; border-radius:14px; margin-bottom:12px; }
h1 { margin:0 0 5px; font-size:24px; }
h2 { margin:0; font-size:17px; }
.logo { max-width:280px; max-height:88px; object-fit:contain; }
.muted { color: var(--muted); margin: 2px 0; }
.small { font-size: 12px; }
.actionbar, .searchbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:10px; margin-bottom:12px; }
.sticky-actions { position:sticky; top:64px; z-index:40; box-shadow:0 4px 14px rgba(0,0,0,.05); }
button, .button, select, input, textarea { font-family: inherit; font-size:14px; }
button, .button { border:1px solid var(--line); background:#fff; border-radius:10px; padding:8px 12px; cursor:pointer; color:#111; display:inline-flex; align-items:center; justify-content:center; min-height:36px; }
button:hover, .button:hover { background:#f3f4f6; text-decoration:none; }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight:700; }
button.primary:hover { background:#153f7e; }
.status { margin-left:auto; color:var(--blue); font-weight:700; }
.layout { display:grid; grid-template-columns: minmax(560px, 1fr) 600px; gap:14px; align-items:start; }
.left-pane, .right-pane { min-width:0; }
.right-pane { position: sticky; top: 128px; align-self:start; max-height: calc(100vh - 140px); overflow:auto; }
.section-card, .option-card, .preview-card { background:#eaeaea; border:1px solid #111; border-radius:10px; padding:12px; margin-bottom:12px; }
.section-card h3, .option-card h3 { margin: 0 0 10px; font-size:17px; }
.fields-grid { display:grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap:10px 12px; }
.field { display:flex; flex-direction:column; gap:4px; }
.field label { font-weight:600; font-size:13px; }
.field.required label::after { content:" *"; color:#d11; }
.field.hidden { display:none; }
input, select, textarea { border:1px solid var(--line); border-radius:8px; padding:8px 9px; background:#fff; min-height:36px; }
textarea { width:100%; min-height:90px; resize:vertical; }
.hint { color:var(--blue2); font-size:12px; font-weight:700; min-height:16px; }
.rule-row { display:grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 1fr); gap:8px; align-items:center; margin:7px 0; }
.result-text { color:var(--blue); font-weight:800; margin:8px 0; }
.reference-text { color:var(--blue2); margin:6px 0; }
.memo-row { display:grid; grid-template-columns: 70px 1fr; gap:8px; align-items:center; margin-top:8px; }
.repeat-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.instance-card { border:1px solid var(--line); border-radius:10px; background:#fff; padding:10px; margin:8px 0; }
.instance-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; font-weight:800; }
.card-title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.copy-btn { background:var(--soft-blue); color:var(--blue); font-weight:700; }
.preview-card { background:#fff; border-color:var(--line); }
.preview-meta { color:var(--muted); font-size:13px; margin:8px 0; }
pre { white-space:pre-wrap; word-break:break-word; margin:0; font-family:"Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; font-size:14px; line-height:1.55; }
#previewText { min-height:480px; }
#individualText { min-height:160px; }
.table-wrap { overflow:auto; background:#fff; border:1px solid var(--line); border-radius:14px; }
.data-table { width:100%; border-collapse:collapse; min-width:2600px; font-size:13px; }
.data-table th, .data-table td { border-bottom:1px solid #eef0f3; padding:8px 10px; text-align:left; vertical-align:top; }
.data-table th { background:#f3f4f6; position:sticky; top:0; z-index:1; }
.wide-cell { max-width:320px; white-space:pre-wrap; }
.actions-cell { display:flex; flex-direction:column; gap:5px; white-space:nowrap; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .right-pane { position:static; max-height:none; }
  .fields-grid { grid-template-columns: 1fr; }
}

/* 주소검색 + 상세주소 */
.address-field { grid-column: 1 / -1; }
.address-combo-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) auto minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
}
.address-combo-row input { width: 100%; }
@media (max-width: 760px) {
  .address-combo-row { grid-template-columns: 1fr; }
}


/* v1.4 statistics / import pages */
.title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.daily-title-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.daily-title-tool-btn {
  border-color: #c7d7ff;
  background: #f8fbff;
  color: #1d4ed8;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}
.daily-title-tool-btn:hover,
.daily-title-tool-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  transform: translateY(-1px);
}
.daily-title-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 5px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.10);
}
.daily-title-tool-btn:hover .daily-title-tool-icon,
.daily-title-tool-btn.active .daily-title-tool-icon {
  background: rgba(255, 255, 255, 0.18);
}

.stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}
.chart-card, .summary-card, .card-form, .notice-card {
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.chart-card h2, .summary-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bar-row {
  display: grid;
  grid-template-columns: 170px minmax(120px, 1fr) 54px;
  gap: 10px;
  align-items: center;
}
.bar-label {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.bar-track {
  height: 24px;
  background: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, #dfeeff, #6aa7ff);
}
.bar-value {
  text-align: right;
  font-weight: 700;
}
.data-table.compact th,
.data-table.compact td {
  padding: 8px;
}
.notice {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
}
.notice.success {
  background: #f0fff4;
  border-color: #bfe7c7;
}
.notice.error {
  background: #fff3f3;
  border-color: #efb8b8;
}
.card-form {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.button-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
@media (max-width: 900px) {
  .stats-layout {
    grid-template-columns: 1fr;
  }
  .bar-row {
    grid-template-columns: 110px minmax(100px, 1fr) 42px;
  }
}

/* Customer self-check page */
.customer-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: #f7f8fb;
  border: 1px solid #dde2ea;
  border-radius: 18px;
  margin-bottom: 14px;
}
.customer-hero h1 { margin: 4px 0 8px; }
.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5772a4;
  font-weight: 700;
}
.notice-box {
  border: 1px solid #d7dfef;
  background: #f9fbff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  line-height: 1.55;
}
.customer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 14px;
  align-items: start;
}
.customer-main { min-width: 0; }
.customer-result-panel { position: sticky; top: 72px; }
.customer-question-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dedede;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0;
}
.customer-question-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
}
.customer-question-title small {
  color: #777;
  font-weight: 400;
}
.yn-toggle {
  display: flex;
  gap: 6px;
}
.yn-toggle button {
  min-width: 68px;
}
.yn-toggle button.selected {
  background: #1f4f99;
  color: #fff;
  border-color: #1f4f99;
}
.customer-result-card ul {
  padding-left: 20px;
}
.customer-result-empty {
  color: #777;
  background: #fafafa;
  border: 1px dashed #d5d5d5;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.55;
}
.customer-result-content {
  line-height: 1.55;
}
.customer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  .customer-layout { grid-template-columns: 1fr; }
  .customer-result-panel { position: static; }
  .customer-question-card { grid-template-columns: 1fr; }
}

/* Customer symptom-first refinement */
.customer-question-card.symptom-first {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.customer-question-card.expanded {
  border-color: #c9d8f5;
  background: #fbfdff;
}
.customer-question-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.followup-question {
  border-left: 4px solid #d8e5ff;
  background: #f5f8ff;
  border-radius: 12px;
  padding: 10px 12px;
}
.followup-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.diagnosis-toggle button {
  min-width: 58px;
}
.result-headline {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #1f4f99;
}
.result-headline.calm {
  color: #333;
}
.result-disease-card {
  border: 1px solid #d7dfef;
  background: #fbfdff;
  border-radius: 16px;
  padding: 14px;
  margin: 10px 0;
}
.result-badge {
  display: inline-block;
  font-weight: 800;
  color: #fff;
  background: #1f4f99;
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.result-option {
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  padding: 10px;
  margin-top: 10px;
}
.result-diagnosis {
  color: #666;
  font-size: 12px;
  margin-top: 8px;
}
@media (max-width: 980px) {
  .customer-question-card.symptom-first { grid-template-columns: 1fr; }
}


/* DB 목록 삭제 버튼 */
button.danger {
  background: #fff3f3;
  border-color: #ef9a9a;
  color: #b91c1c;
  font-weight: 700;
}
button.danger:hover {
  background: #fee2e2;
}
button.small-delete {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

/* DB 검색/목록: 상단 고정 가로 스크롤 */
.orders-toolbar {
  position: sticky;
  top: 64px;
  z-index: 35;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.table-scroll-shell {
  position: relative;
}
.table-scroll-top {
  position: sticky;
  top: 126px;
  z-index: 30;
  overflow-x: auto;
  overflow-y: hidden;
  height: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.table-scroll-top > div {
  height: 1px;
}
.orders-table-wrap {
  border-radius: 0 0 14px 14px;
}
.orders-data-table {
  min-width: 2600px;
}

/* 판매리스트 페이지네이션 */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* DB 검색: 선택 삭제 모드 */
.delete-select-col {
  display: none;
  width: 46px;
  text-align: center !important;
  vertical-align: middle !important;
}
.orders-delete-mode .delete-select-col,
.sales-delete-mode .delete-select-col,
.sales-bulk-date-mode .delete-select-col,
.repair-delete-mode .delete-select-col {
  display: table-cell;
}
.delete-select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.delete-mode-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}
.delete-mode-bar[hidden] {
  display: none !important;
}

/* 일일작업현황 */
.daily-work-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 5fr);
  gap: 14px;
  align-items: start;
}
.daily-work-form-card,
.daily-work-list-card {
  background: #fff;
  border-color: var(--line);
}
.daily-work-list-card {
  position: sticky;
  top: 76px;
  overflow: visible;
}
.daily-work-top-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.daily-help-box {
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0 12px;
  line-height: 1.55;
}
.daily-response-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.daily-response-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}
.daily-stage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.daily-stage-card {
  background: #fbfcfe;
  border: 1px solid #d8dce2;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(17,24,39,.04);
}
.daily-stage-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}
.daily-stage-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.daily-stage-card.is-skipped-stage {
  opacity: .58;
  background: #f3f4f6;
}
.daily-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.daily-step-grid,
.daily-customer-info-grid {
  margin-bottom: 10px;
}
.daily-note-field textarea {
  min-height: 64px;
}
.daily-savebar {
  margin-top: 14px;
}
.readonly-select {
  pointer-events: none;
  background: #f3f4f6;
}
.daily-work-search {
  position: static;
  box-shadow: none;
}
.daily-work-table-wrap {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  overflow-x: auto;
}
.daily-work-table {
  min-width: 1200px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2ff;
  color: #243044;
}
.status-완료 { background: #ecfdf5; color: #047857; }
.status-진행중 { background: #eff6ff; color: #1d4ed8; }
.status-대기 { background: #fff7ed; color: #c2410c; }

.daily-summary-panel {
  margin: 12px 0 12px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #f8fafc;
}
.daily-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.daily-summary-head h3 {
  margin: 0 0 2px;
}
.daily-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.daily-summary-card {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
}
.daily-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.daily-summary-card b {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1;
  color: #1f2937;
}
.daily-summary-card small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}
.daily-category-summary-card b {
  margin-top: 5px;
}
.daily-summary-card.strong {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.daily-summary-card.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}
.daily-summary-grid {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(420px, 1.3fr);
  gap: 10px;
}
.daily-summary-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
}
.daily-summary-box h4 {
  margin: 0 0 8px;
}
.daily-mini-list > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
}
.daily-mini-list > div:last-child {
  border-bottom: 0;
}
.daily-worker-summary-wrap {
  max-height: none;
  overflow: visible;
}
.daily-worker-summary-table {
  min-width: 620px;
}
@media (max-width: 1180px) {
  .daily-work-layout { grid-template-columns: 1fr; }
  .daily-work-list-card { position: static; max-height: none; }
  .daily-summary-grid { grid-template-columns: 1fr; }
}

/* 일일작업현황: 목록 단계 타임라인 */
.daily-list-help {
  margin: 8px 0 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.daily-work-table {
  min-width: 1900px;
}
.daily-stage-timeline-cell {
  min-width: 640px;
  max-width: 860px;
}
.daily-stage-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
}
.daily-stage-chip {
  min-width: 122px;
  max-width: 162px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 7px 9px;
  background: #f3f4f6;
  color: #9ca3af;
  line-height: 1.25;
}
.daily-stage-chip-title {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-stage-chip-meta {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: inherit;
  opacity: .88;
}
.daily-stage-chip-done {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #334155;
}
.daily-stage-chip-current {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37,99,235,.22);
  transform: translateY(-1px);
}
.daily-stage-chip-current.daily-stage-chip-final {
  background: #059669;
  border-color: #047857;
  color: #fff;
  box-shadow: 0 8px 18px rgba(5,150,105,.22);
}
.daily-stage-chip-skipped {
  background: #f9fafb;
  border-style: dashed;
  color: #9ca3af;
}
.current-stage-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  white-space: nowrap;
}

/* 일일작업현황: 전 단계 미진행 시 다음 단계 잠금 */
.daily-stage-card.is-locked-stage {
  opacity: .52;
  background: #f8fafc;
  border-style: dashed;
  box-shadow: none;
}
.daily-stage-card.is-locked-stage .daily-stage-head strong {
  color: #64748b;
}
.daily-stage-lock-message {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}
.daily-stage-card.is-locked-stage .daily-stage-lock-message {
  display: block;
}
.daily-stage-card.is-locked-stage input,
.daily-stage-card.is-locked-stage select,
.daily-stage-card.is-locked-stage textarea {
  cursor: not-allowed;
}

/* 일일작업현황: 목록 상단 단계 안내 이미지 */
.daily-stage-image-board {
  margin: 12px 0 12px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #ffffff;
}
.daily-stage-image-board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.daily-stage-image-board-head h3 {
  margin: 0;
  font-size: 16px;
}
.daily-stage-image-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  gap: 8px;
}
.daily-stage-image-item {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}
.daily-stage-image-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
  background: #f1f5f9;
}
.daily-stage-image-item figcaption {
  padding: 6px 7px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  color: #334155;
  text-align: center;
}
.daily-worker-total-list {
  margin-bottom: 8px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 6px 8px;
  background: #f8fafc;
}
@media (max-width: 1280px) {
  .daily-stage-image-strip { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
}
@media (max-width: 720px) {
  .daily-stage-image-strip { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

/* 일일작업현황 보완: 입력창/목록 1:4, 좁은 입력영역에 맞춰 필드 축소 */
.daily-work-layout {
  grid-template-columns: minmax(260px, 1fr) minmax(0, 4fr);
}
.daily-stage-card input,
.daily-stage-card select,
.daily-stage-card textarea {
  width: 100%;
  min-width: 0;
  font-size: 13px;
  padding: 7px 7px;
}
.daily-step-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.daily-customer-info-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.daily-stage-complete-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1f4f99;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.daily-stage-complete-row input {
  width: auto;
  min-height: auto;
  padding: 0;
}
.daily-response-toggle label {
  padding: 7px 10px;
  font-size: 13px;
}
.status-응대종료 { background: #f5f3ff; color: #6d28d9; }
@media (max-width: 1400px) {
  .daily-step-grid { grid-template-columns: 1fr; }
}

/* 일일작업현황 요약: 현재단계별 요약 제거 후 담당자별 요약을 전체 폭으로 표시 */
.daily-summary-grid-one {
  grid-template-columns: 1fr;
}
.daily-merged-cell {
  vertical-align: middle;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
}
.daily-worker-summary-table td[rowspan] {
  vertical-align: middle;
}

/* 일일작업현황: 단계별 메모 표시 */
.daily-stage-chip-note {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, .55);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.daily-stage-chip-current .daily-stage-chip-note {
  border-top-color: rgba(255,255,255,.45);
}

/* 일일작업현황: 담당자별 요약은 스크롤 없이 전체 표시 */
.daily-summary-box .daily-worker-summary-wrap {
  max-height: none;
  overflow: visible;
}
.daily-summary-box .daily-worker-summary-table {
  min-width: 0;
  width: 100%;
}


.current-stage-link {
  text-decoration: none;
}
.current-stage-link:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}
.daily-stage-chip {
  text-decoration: none;
  display: block;
}
.daily-stage-chip:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37,99,235,.12);
}
.daily-focus-stage {
  outline: 3px solid #f59e0b;
  box-shadow: 0 0 0 6px rgba(245,158,11,.18), 0 8px 20px rgba(15,23,42,.12);
}
.daily-settings-card {
  max-width: 980px;
}
.daily-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.daily-settings-textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .daily-settings-grid { grid-template-columns: 1fr; }
}

/* 일일작업현황 관리모드: 구역 구분 */
.soft-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 18px 0;
}
.notice.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

/* 일일작업현황 관리모드: 요약 표시명 설정 표 */
.summary-label-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.summary-label-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.summary-label-table th,
.summary-label-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}
.summary-label-table th {
  background: #f8fafc;
  font-size: 13px;
  color: #334155;
}
.summary-label-table tr:last-child td {
  border-bottom: 0;
}
.summary-label-table input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

.daily-summary-notes-cell {
  min-width: 180px;
  max-width: 420px;
  white-space: normal;
}

.daily-summary-note {
  display: block;
  margin: 2px 0;
  padding: 3px 6px;
  border-radius: 8px;
  background: #f6f8fb;
  color: #374151;
  font-size: 12px;
  line-height: 1.45;
}

/* 중복 가져오기 확인표 */
.duplicate-check-wrap {
  max-height: none;
  overflow: auto;
}
.duplicate-check-table th,
.duplicate-check-table td {
  vertical-align: top;
  white-space: normal;
  min-width: 150px;
}
.duplicate-check-table td div {
  line-height: 1.45;
  margin: 2px 0;
}
.daily-duplicate-report {
  margin: 14px 0;
  border-color: #f2c94c;
  background: #fffdf4;
}

/* DB 후보 선택/등록 표 */
.daily-import-preview-panel {
  margin-top: 14px;
}
.daily-import-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.daily-import-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.daily-import-preview-actions.bottom {
  justify-content: flex-end;
}
.daily-import-preview-table td,
.daily-import-preview-table th {
  vertical-align: top;
}
.daily-import-duplicate-row {
  opacity: .68;
  background: #f8fafc;
}
.daily-import-preview-wrap {
  max-height: none;
}

/* 판매/수선 DB에서 작업현황 선택 등록 */
.daily-db-source-panel {
  margin-top: 14px;
}
.daily-db-source-search {
  align-items: end;
  margin-top: 8px;
}
.daily-db-source-preview {
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}
.daily-db-source-panel .daily-import-preview-table td {
  vertical-align: top;
}

/* 일일작업현황: 보조 기능 패널 접기/펼치기 */
.daily-collapsible-panel {
  margin: 12px 0;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.daily-collapsible-panel.section-card {
  padding: 0;
}
.daily-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.daily-collapsible-summary::-webkit-details-marker {
  display: none;
}
.daily-collapsible-summary::before {
  content: '▶';
  flex: 0 0 auto;
  color: #1f4f9c;
  font-size: 12px;
  transform: translateY(-1px);
  transition: transform .15s ease;
}
.daily-collapsible-panel[open] .daily-collapsible-summary::before {
  transform: rotate(90deg) translateX(-1px);
}
.daily-collapsible-summary h3 {
  margin: 0 0 2px;
  font-size: 17px;
}
.daily-collapsible-summary p {
  margin: 0;
}
.daily-collapsible-summary:hover {
  background: #f1f6ff;
}
.daily-collapsible-action {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #c8d7f0;
  color: #1f4f9c;
  background: #edf4ff;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.daily-collapsible-panel[open] .daily-collapsible-action {
  font-size: 0;
}
.daily-collapsible-panel[open] .daily-collapsible-action::after {
  content: '접기';
  font-size: 13px;
}
.daily-collapsible-body {
  padding: 0 14px 14px;
  border-top: 1px solid #e5e7eb;
}
.daily-collapsible-desc {
  margin: 12px 0 6px;
}
.daily-collapsible-panel:not([open]) {
  box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
}
.daily-collapsible-panel[open] {
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.daily-db-source-panel.daily-collapsible-panel {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .daily-collapsible-summary {
    align-items: flex-start;
  }
  .daily-collapsible-action {
    padding: 6px 9px;
  }
}

/* 일일작업현황: 기간별 4줄 요약표 */
.daily-period-summary-box {
  margin-bottom: 12px;
}
.daily-period-summary-wrap {
  overflow-x: auto;
}
.daily-period-summary-table {
  min-width: 860px;
  width: 100%;
}
.daily-period-summary-table th,
.daily-period-summary-table td {
  vertical-align: middle;
}
.daily-period-total {
  font-size: 16px;
  font-weight: 900;
  color: #1f2937;
  white-space: nowrap;
}
.daily-period-summary-table td b {
  font-weight: 900;
}

/* 일일작업현황: 기간별 요약 가독성/클릭 필터 */
.daily-period-summary-table tbody tr:nth-child(odd) {
  background: #f1f7ff;
}
.daily-period-summary-table tbody tr:nth-child(even) {
  background: #ffffff;
}
.daily-summary-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.daily-summary-link:hover {
  background: #dbeafe;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}
.daily-summary-selected-cell {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
  background: #dbeafe !important;
}
.daily-selected-summary-box {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .08);
}
.daily-selected-summary-wrap {
  overflow-x: auto;
}
.daily-selected-summary-table {
  min-width: 760px;
}
.daily-worker-summary-box {
  margin-top: 12px;
}

/* 일일작업현황: 담당자별 작업/단계 요약 진행중/완료 분리 */
.daily-worker-status-block {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
}
.daily-worker-progress-block {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.daily-worker-completed-block {
  border-color: #bbf7d0;
  background: #f7fef9;
}
.daily-worker-status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.daily-worker-status-title h5 {
  margin: 0;
  font-size: 14px;
  color: #111827;
}
.daily-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.daily-status-dot-progress {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.daily-status-dot-completed {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

/* 일일작업현황: 단계표 아래 세부진행내역 진행중/완료 분리 */
.daily-detail-status-block {
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}
.daily-detail-progress-block {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.daily-detail-completed-block {
  border-color: #bbf7d0;
  background: #f7fef9;
}
.daily-detail-status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.daily-detail-status-title h3 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

/* 접근권한 / 로그인 */
.access-login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fafc 50%, #eef2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.access-login-wrap { width: min(760px, 100%); }
.access-login-card {
  background: rgba(255,255,255,.94);
  border: 1px solid #d7e1ef;
  border-radius: 26px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
  padding: 30px;
}
.access-login-title { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.access-login-title h1 { margin: 0; font-size: 28px; }
.access-login-title p { margin: 4px 0 0; color: #64748b; }
.brand-mark {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  background: #2563eb; color: white; font-weight: 800; font-size: 28px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .25);
}
.mode-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.mode-choice-card {
  border: 1px solid #dbe4f0; border-radius: 18px; padding: 16px;
  background: #f8fbff; cursor: pointer; display: grid; gap: 5px;
  transition: .15s ease;
}
.mode-choice-card:hover { border-color: #93c5fd; box-shadow: 0 8px 20px rgba(37,99,235,.12); transform: translateY(-1px); }
.mode-choice-card input { margin: 0 0 4px; }
.mode-choice-name { font-weight: 800; color: #0f172a; }
.mode-choice-desc { color: #64748b; font-size: 13px; }
.wide-button { width: 100%; justify-content: center; }
.access-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.9);
  padding: 7px 10px; border-radius: 999px; font-size: 13px; color: #334155;
}
.access-chip span { font-weight: 700; }
.access-chip a { color: #1d4ed8; text-decoration: none; font-weight: 700; }
.settings-group {
  border: 1px solid #d9e2ef; border-radius: 18px; background: #fbfdff; margin-bottom: 14px;
  overflow: hidden;
}
.settings-group summary {
  padding: 14px 16px; cursor: pointer; font-weight: 800; color: #0f172a;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
}
.settings-group-body { padding: 16px; }
.access-menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.access-menu-check {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid #dbe4f0; border-radius: 14px; background: white;
}
.access-menu-check span { font-weight: 700; }
.access-menu-check em { font-size: 12px; color: #64748b; margin-left: auto; font-style: normal; }
.access-menu-check.is-disabled { opacity: .62; background: #f1f5f9; }
@media (max-width: 720px) { .mode-choice-grid { grid-template-columns: 1fr; } }

/* 일일작업현황 요약 버튼 영역 */
.daily-summary-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 판매리스트 DB 화면 정리 */
.sales-data-table th.sales-action-col,
.sales-data-table td.sales-action-col {
  white-space: nowrap;
  text-align: center;
  min-width: 64px;
  width: 64px;
}
.sales-data-table td.sales-action-col .button.compact {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  line-height: 1.1;
}

/* 작업현황 검색: 특정월/특정주/기간 입력 정렬 */
.daily-work-search input[type="month"],
.daily-work-search input[type="week"],
.daily-work-search input[type="date"] {
  min-width: 132px;
}

/* 엑셀 가져오기 중복/업데이트 확인표: 가로 스크롤을 화면 상단에 고정 표시 */
.floating-x-scroll {
  position: sticky;
  top: 76px;
  z-index: 60;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  margin-top: 8px;
}
.floating-x-scroll > div { height: 1px; }
.floating-x-scroll + .duplicate-check-wrap,
.floating-x-scroll + .import-review-wrap {
  border-radius: 0 0 14px 14px;
  margin-top: 0;
}
.duplicate-check-wrap {
  max-height: 72vh;
  overflow: auto;
}
.duplicate-check-table th {
  top: 0;
  z-index: 2;
}

/* 기타업무: 사용자가 직접 입력한 업무명칭/단계명
   업무명칭과 단계명이 같은 줄에 붙지 않도록 각각 한 줄씩 표시한다. */
.daily-other-work-grid {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.daily-other-work-grid .field {
  max-width: 520px;
}

/* 메모 줄바꿈 보존: 실제 메모 텍스트에만 pre-wrap을 적용한다.
   셀(td)에 pre-wrap을 주면 템플릿 들여쓰기 공백/줄바꿈까지 보존되어
   빈 메모에도 위아래 공백 줄이 생기므로 셀은 normal로 유지한다. */
.daily-summary-note,
.daily-stage-chip-note {
  white-space: pre-wrap;
}
.daily-summary-notes-cell {
  white-space: normal !important;
}

/* 사용자 추가 카테고리 / 일일 Practice: 단계명 직접 입력 */
.daily-custom-category-stage-grid,
.daily-practice-stage-grid {
  margin-bottom: 10px;
}
.daily-custom-category-stage-grid .field,
.daily-practice-stage-grid .field {
  max-width: 420px;
}
.daily-custom-category-stage-grid .muted.small {
  display: block;
  margin-top: 5px;
}

/* 담당자별 요약: rowspan으로 생기던 과한 빈 공간을 줄이고 메모를 더 촘촘하게 표시 */
.daily-worker-summary-table th,
.daily-worker-summary-table td {
  padding: 5px 7px !important;
  vertical-align: top;
  line-height: 1.28;
}
.daily-worker-summary-table .daily-worker-cell,
.daily-worker-summary-table .daily-category-cell {
  width: 132px;
  white-space: nowrap;
}
.daily-worker-summary-table .daily-summary-notes-cell {
  min-width: 220px;
  max-width: 560px;
}
.daily-worker-summary-table .daily-summary-note {
  display: inline-block;
  max-width: 100%;
  margin: 0 4px 3px 0;
  padding: 3px 7px;
  vertical-align: top;
  line-height: 1.35;
  white-space: pre-wrap;
}

/* 담당자별 작업/단계 요약: 담당자별 카드 + 병합 셀 복구 + 과한 공백 축소 */
.daily-worker-summary-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.daily-worker-summary-card {
  border: 2px solid #334155;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}
.daily-worker-summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
}
.daily-worker-summary-card-title {
  font-weight: 900;
  color: #0f172a;
}
.daily-worker-summary-card .daily-worker-summary-wrap {
  margin: 0;
  overflow-x: auto;
}
.daily-worker-summary-card .daily-worker-summary-table {
  margin: 0;
  border-left: 0;
  border-right: 0;
}
.daily-worker-summary-card .daily-worker-summary-table th,
.daily-worker-summary-card .daily-worker-summary-table td {
  padding: 4px 7px !important;
  line-height: 1.25;
  height: auto;
  min-height: 0;
}
.daily-worker-summary-card .daily-worker-summary-table tbody tr {
  height: auto;
}
.daily-worker-summary-card .daily-merged-cell {
  background: #f8fafc;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid #cbd5e1;
}
.daily-worker-summary-card .daily-summary-notes-cell {
  min-width: 220px;
  max-width: none;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}
.daily-worker-summary-card .daily-summary-note {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 3px;
  padding: 2px 7px;
  line-height: 1.28;
  white-space: pre-wrap;
}
.daily-worker-summary-card .daily-summary-note:last-child {
  margin-bottom: 0;
}
.daily-worker-summary-card .daily-worker-cell {
  width: 120px;
}
.daily-worker-summary-card .daily-date-cell {
  width: 112px;
  min-width: 112px;
  white-space: nowrap;
}
.daily-worker-summary-card .daily-category-cell {
  width: 150px;
}


/* 2026-06 메모 공백 수정: td 내부 템플릿 공백은 렌더링하지 않고 실제 메모 내용만 줄바꿈 유지 */
.daily-worker-summary-card .daily-summary-notes-cell,
.daily-worker-summary-table .daily-summary-notes-cell,
.daily-summary-notes-cell {
  white-space: normal !important;
  vertical-align: top;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}
.daily-worker-summary-card .daily-summary-note,
.daily-worker-summary-table .daily-summary-note,
.daily-summary-note {
  white-space: pre-wrap !important;
  margin-top: 0;
  margin-bottom: 3px;
}
.daily-summary-notes-cell .muted {
  display: inline-block;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

/* 출고예정일 자동 설정 / 알림 패널 */
.due-days-settings-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--border, #d7dde8);
  border-radius: 12px;
}
.due-days-settings-table input[type="number"] {
  width: 90px;
  max-width: 90px;
}
.due-days-input-cell {
  white-space: nowrap;
}
.daily-due-alert-panel {
  margin: 16px 0;
  border: 2px solid #d7dde8;
  border-radius: 18px;
}
.daily-due-alert-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.daily-due-alert-head h3 {
  margin-bottom: 4px;
}
.daily-due-alert-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.daily-due-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-weight: 700;
  white-space: nowrap;
}
.daily-due-count.danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}
.daily-due-count.total {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.daily-due-alert-table-wrap {
  margin-top: 12px;
}
.daily-due-alert-table th,
.daily-due-alert-table td {
  vertical-align: middle;
}
.daily-due-row-overdue,
.daily-due-row-today {
  background: #fff1f2;
}
.daily-due-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}
.daily-due-badge-overdue,
.daily-due-badge-today {
  background: #dc2626;
  color: #fff;
}
.daily-due-date-danger {
  color: #b91c1c;
  font-weight: 800;
  background: #fff1f2;
}

/* 통계 화면 - DB별 가로막대그래프 + 롤리팝 차트 */
.stats-layout.stats-layout-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.stats-layout.stats-layout-wide .stats-summary-card {
  grid-column: 1 / -1;
}
.stat-horizontal-bar,
.lollipop-chart {
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}
.lollipop-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lollipop-row {
  display: grid;
  grid-template-columns: 170px minmax(120px, 1fr) 54px;
  gap: 10px;
  align-items: center;
}
.lollipop-label {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.lollipop-track {
  position: relative;
  height: 24px;
  border-bottom: 2px solid #eceff4;
}
.lollipop-line {
  position: absolute;
  left: 0;
  top: 11px;
  height: 3px;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dfeeff, #6aa7ff);
}
.lollipop-dot {
  position: absolute;
  top: 5px;
  width: 15px;
  height: 15px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #4f8ee8;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px #9fc3ff;
}
.lollipop-value {
  text-align: right;
  font-weight: 700;
}
@media (max-width: 1100px) {
  .stats-layout.stats-layout-wide {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .lollipop-row {
    grid-template-columns: 110px minmax(100px, 1fr) 42px;
  }
}

/* 인솔 출고예정 알림 - 자연폭 + 스크롤 제거 */
.daily-due-alert-table-wrap {
  width: 100%;
  overflow-x: hidden !important;
}
.daily-due-alert-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
  border-collapse: collapse;
}
.daily-due-alert-table th,
.daily-due-alert-table td {
  padding: 6px 8px !important;
  line-height: 1.2;
  vertical-align: middle;
}
.daily-due-badge {
  white-space: nowrap;
}


/* 통계 화면 - 그래프 1개 표시, 화면폭 자동 맞춤 */
.stats-chart-section {
  width: 100%;
  overflow-x: hidden;
}
.stats-chart-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.stats-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.stats-chart-header h2 {
  margin: 0;
}
.stats-fit-chart {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 680px;
  padding-right: 4px;
}
.stats-fit-row,
.bar-row.stats-fit-row,
.lollipop-row.stats-fit-row {
  display: grid;
  grid-template-columns: minmax(110px, 24%) minmax(0, 1fr) minmax(42px, 58px);
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.stats-fit-label,
.bar-label.stats-fit-label,
.lollipop-label.stats-fit-label {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.stats-fit-track,
.bar-track.stats-fit-track,
.lollipop-track.stats-fit-track {
  min-width: 0;
  width: 100%;
}
.stats-fit-value,
.bar-value.stats-fit-value,
.lollipop-value.stats-fit-value {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .stats-fit-row,
  .bar-row.stats-fit-row,
  .lollipop-row.stats-fit-row {
    grid-template-columns: minmax(90px, 32%) minmax(0, 1fr) minmax(36px, 50px);
    gap: 8px;
  }
}

/* 관리모드: 대리점별 +N일 설정 표는 한 화면 안에 표시 */
.due-days-settings-table-wrap {
  width: 100%;
  overflow-x: hidden !important;
}
.due-days-settings-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
}
.due-days-settings-table th,
.due-days-settings-table td {
  padding: 6px 8px !important;
  vertical-align: middle;
  white-space: nowrap;
}
.due-days-settings-table th:first-child,
.due-days-settings-table td:first-child {
  width: auto;
}
.due-days-settings-table th:last-child,
.due-days-settings-table td:last-child {
  width: 150px;
  text-align: left;
}
.due-days-settings-table input[type="number"] {
  width: 72px !important;
  max-width: 72px !important;
}

/* 관리모드: 새 주문서 담당자/대리점 설정 */
.order-settings-grid {
  margin-top: 12px;
}
.order-settings-textarea {
  min-height: 220px;
}
.order-required-sections {
  display: grid;
  gap: 10px;
  width: 100%;
  overflow-x: hidden;
}
.order-required-section {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border, #d7dde8);
  border-radius: 12px;
  background: #fff;
}
.order-required-section-title {
  flex: 0 0 6.5em;
  padding: 8px 4px;
  color: #334155;
  line-height: 1.35;
}
.order-required-options {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.order-required-option {
  display: flex;
  flex: 0 1 12em;
  align-items: center;
  gap: 7px;
  width: 12em;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #f8fafc;
  box-sizing: border-box;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.3;
}
.order-required-option:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.order-required-option input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}
.order-required-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .order-required-section {
    display: block;
  }
  .order-required-section-title {
    display: block;
    padding: 0 2px 8px;
  }
}
.order-branch-staff-table-wrap {
  width: 100%;
  overflow-x: hidden !important;
  border: 1px solid var(--border, #d7dde8);
  border-radius: 12px;
}
.order-branch-staff-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
}
.order-branch-staff-table th,
.order-branch-staff-table td {
  padding: 6px 8px !important;
  vertical-align: middle;
  white-space: nowrap;
}
.order-branch-staff-table select {
  width: 100%;
  max-width: 260px;
}

/* 인솔 출고예정 알림 - 자연폭 + 스크롤 제거 */
.daily-due-alert-table-wrap {
  width: 100%;
  overflow-x: hidden !important;
}
.daily-due-alert-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
  border-collapse: collapse;
}
.daily-due-alert-table th,
.daily-due-alert-table td {
  padding: 6px 8px !important;
  line-height: 1.2;
  vertical-align: middle;
}
.daily-due-badge {
  white-space: nowrap;
}


/* 진행중/완료 세부진행내역: 고객이름·출고예정일 최소 폭 보장 */
.daily-work-table th.daily-col-customer-name,
.daily-work-table td.daily-col-customer-name {
  min-width: 5.5em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.daily-work-table th.daily-col-due-date,
.daily-work-table td.daily-col-due-date {
  min-width: 11ch;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.daily-work-table td.daily-col-due-date .small {
  white-space: nowrap;
}

/* 공통 긴 표: 가로 스크롤바를 화면 상단에 항상 보이게 표시 */
.floating-x-scroll.is-hidden,
.table-scroll-top.is-hidden {
  display: none;
}
.table-wrap + .floating-x-scroll {
  margin-top: 0;
}
.floating-x-scroll:not(.is-hidden) + .table-wrap {
  border-radius: 0 0 14px 14px;
  margin-top: 0;
}

/* 2026-06 공통 검색바/가로스크롤 고정 정리
   - 판매리스트DB/수선내역DB/일일작업현황 검색바는 화면 상단에 유지
   - 넓은 표의 가로 스크롤바는 현재 보이는 검색바 바로 아래에 붙도록 JS에서 top 값을 보정 */
.orders-toolbar {
  position: sticky;
  top: 64px;
  z-index: 80;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.daily-work-search {
  position: sticky !important;
  top: 64px;
  z-index: 80;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.table-scroll-top,
.floating-x-scroll {
  position: sticky;
  z-index: 75;
  min-height: 18px;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  margin-top: 8px;
}
.table-scroll-top > div,
.floating-x-scroll > div {
  height: 1px;
}
.table-scroll-shell .table-wrap,
.floating-x-scroll + .table-wrap {
  border-radius: 0 0 14px 14px;
  margin-top: 0;
}
.table-scroll-top.is-hidden,
.floating-x-scroll.is-hidden {
  display: none !important;
}

/* 인솔 DB 목록 화면 가독성 개선: 짧은 항목 한 줄 보장 + 긴 항목만 자연 줄바꿈 */
.orders-data-table {
  table-layout: auto !important;
  min-width: 3000px;
}
.orders-data-table th,
.orders-data-table td {
  line-height: 1.25;
  vertical-align: middle;
}
.orders-data-table th {
  white-space: nowrap;
}
.orders-data-table .order-col-id {
  min-width: 5.5ch;
  text-align: center;
  white-space: nowrap;
}
.orders-data-table .order-col-mini {
  min-width: 4.5ch;
  text-align: center;
  white-space: nowrap;
}
.orders-data-table .order-col-date {
  min-width: 11ch;
  white-space: nowrap;
}
.orders-data-table .order-col-datetime {
  min-width: 18ch;
  white-space: nowrap;
  font-size: 12px;
}
.orders-data-table .order-col-phone {
  min-width: 14ch;
  white-space: nowrap;
}
.orders-data-table .order-col-name {
  min-width: 6em;
  max-width: 10em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.orders-data-table .order-col-name-en {
  min-width: 9em;
  max-width: 14em;
  white-space: normal;
  overflow-wrap: anywhere;
}
.orders-data-table .order-col-short,
.orders-data-table .order-col-route,
.orders-data-table .order-col-method {
  min-width: 6em;
  max-width: 10em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.orders-data-table .order-col-size,
.orders-data-table .order-col-price {
  min-width: 8ch;
  white-space: nowrap;
}
.orders-data-table .order-col-address {
  min-width: 18em;
  max-width: 32em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.orders-data-table .order-col-delivery,
.orders-data-table .order-col-note {
  min-width: 16em;
  max-width: 26em;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.orders-data-table .order-col-output {
  min-width: 26em;
  max-width: 42em;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.orders-data-table .order-col-source {
  min-width: 10em;
  max-width: 16em;
  white-space: normal;
  overflow-wrap: anywhere;
}
.orders-data-table .order-col-actions {
  min-width: 7em;
  white-space: nowrap;
}
.orders-data-table th.order-col-name,
.orders-data-table th.order-col-name-en,
.orders-data-table th.order-col-short,
.orders-data-table th.order-col-route,
.orders-data-table th.order-col-method,
.orders-data-table th.order-col-address,
.orders-data-table th.order-col-delivery,
.orders-data-table th.order-col-note,
.orders-data-table th.order-col-output,
.orders-data-table th.order-col-source {
  white-space: nowrap;
}

/* 완료 인솔 출고 리스트(.xls) 출력 패널 */
.daily-completed-insole-export-panel {
  margin-top: 12px;
}
.daily-completed-insole-export-form {
  align-items: end;
}
.daily-completed-insole-export-form .daily-export-folder-input {
  min-width: 280px;
  flex: 1 1 360px;
}
.daily-completed-insole-export-form .daily-export-filename-input {
  min-width: 150px;
  max-width: 190px;
}
.daily-export-help {
  margin: 8px 0 0;
}

/* 개인정보 동의서 / 태블릿 서명란 */
.privacy-consent-card {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.privacy-consent-card h3 {
  color: #0f172a;
}
.privacy-consent-text {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border-left: 4px solid #1d4ed8;
  border-radius: 10px;
  background: #ffffff;
  line-height: 1.55;
  font-weight: 600;
  color: #1f2937;
}
.privacy-consent-date-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #c7d9f6;
  color: #102a56;
}
.privacy-consent-date-label {
  font-weight: 900;
  color: #475569;
}
.signature-pad-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #94a3b8;
  border-radius: 14px;
  background: #ffffff;
}
.signature-pad-label {
  margin-bottom: 7px;
  font-weight: 900;
  color: #334155;
}
.signature-canvas {
  display: block;
  width: 100%;
  height: 170px;
  border: 1.5px solid #334155;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.signature-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 테스트: PC/태블릿/모바일 자동 반응형 UI 최적화
   - PC 기존 화면은 최대한 유지
   - 갤럭시탭 등 태블릿에서는 카드형 입력, 큰 터치 영역, 서명패드 확대 적용 */
.device-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #c7d9f6;
  color: #102a56;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.mode-tablet {
  background: #f4f7fb;
}
body.mode-tablet .page {
  padding: 14px;
}
body.mode-tablet .topbar {
  height: auto;
  min-height: 58px;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
}
body.mode-tablet .topbar nav {
  flex-wrap: wrap;
  gap: 6px;
}
body.mode-tablet .topbar nav a {
  min-height: 38px;
  padding: 8px 12px;
}
body.mode-tablet .title-panel {
  padding: 12px 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
}
body.mode-tablet .title-panel h1 {
  font-size: 22px;
}
body.mode-tablet .title-panel .logo {
  max-width: 210px;
  max-height: 70px;
}
body.mode-tablet .sticky-actions {
  top: 70px;
  padding: 10px;
  gap: 8px;
  border-radius: 16px;
}
body.mode-tablet .actionbar button,
body.mode-tablet .actionbar .button,
body.mode-tablet input,
body.mode-tablet select,
body.mode-tablet textarea {
  min-height: 46px;
  font-size: 15px;
}
body.mode-tablet button,
body.mode-tablet .button {
  padding: 10px 14px;
  border-radius: 12px;
}
body.mode-tablet .layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
body.mode-tablet .right-pane {
  position: static;
  max-height: none;
  overflow: visible;
}
body.mode-tablet .right-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
body.mode-tablet .preview-card {
  margin-bottom: 0;
}
body.mode-tablet #previewText {
  min-height: 220px;
  max-height: 340px;
  overflow: auto;
}
body.mode-tablet #individualText {
  min-height: 160px;
  max-height: 340px;
  overflow: auto;
}
body.mode-tablet .section-card,
body.mode-tablet .option-card,
body.mode-tablet .preview-card {
  border-color: #dbe3ee;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .055);
}
body.mode-tablet .section-card {
  padding: 14px;
}
body.mode-tablet .section-card h3,
body.mode-tablet .option-card h3 {
  font-size: 18px;
}
body.mode-tablet .fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
body.mode-tablet .field label {
  font-size: 13.5px;
  color: #243044;
}
body.mode-tablet .address-field {
  grid-column: 1 / -1;
}
body.mode-tablet .address-combo-row {
  grid-template-columns: minmax(0, 1.3fr) auto minmax(0, .9fr);
  gap: 8px;
}
body.mode-tablet #customOptionsRoot > .section-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
body.mode-tablet #customOptionsRoot > .section-card > h3,
body.mode-tablet #customOptionsRoot > .section-card > p {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
body.mode-tablet #customOptionsRoot > .section-card > .option-card {
  margin-bottom: 0;
  height: 100%;
}
body.mode-tablet #customOptionsRoot > .section-card > .tablet-full,
body.mode-tablet #privacyConsentRoot > .privacy-consent-card {
  grid-column: 1 / -1;
}
body.mode-tablet .option-card {
  padding: 12px;
}
body.mode-tablet .option-card .rule-row {
  grid-template-columns: 1fr;
  gap: 6px;
}
body.mode-tablet .option-card .rule-row label {
  font-weight: 800;
  color: #334155;
}
body.mode-tablet .memo-row {
  grid-template-columns: 60px minmax(0, 1fr);
}
body.mode-tablet .privacy-consent-card {
  background: #fbfdff;
  border-color: #c7d9f6;
}
body.mode-tablet .privacy-consent-text {
  font-size: 14.5px;
  line-height: 1.6;
}
body.mode-tablet .privacy-consent-date-row {
  min-height: 42px;
  padding: 8px 14px;
}
body.mode-tablet .signature-pad-box {
  padding: 14px;
  border-radius: 18px;
}
body.mode-tablet .signature-canvas {
  height: 220px;
  border-radius: 16px;
  border-width: 2px;
}
body.mode-tablet .signature-toolbar button {
  min-height: 44px;
}

body.mode-mobile .page {
  padding: 10px;
}
body.mode-mobile .topbar {
  height: auto;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
}
body.mode-mobile .topbar nav {
  flex-wrap: wrap;
}
body.mode-mobile .title-panel {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
body.mode-mobile .title-panel .logo {
  max-width: 180px;
  max-height: 60px;
}
body.mode-mobile .sticky-actions {
  position: static;
}
body.mode-mobile .actionbar button,
body.mode-mobile .actionbar .button,
body.mode-mobile input,
body.mode-mobile select,
body.mode-mobile textarea {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
}
body.mode-mobile .status,
body.mode-mobile .device-mode-badge {
  width: 100%;
  justify-content: center;
}
body.mode-mobile .layout,
body.mode-mobile .right-pane,
body.mode-mobile .fields-grid,
body.mode-mobile .address-combo-row,
body.mode-mobile #customOptionsRoot > .section-card {
  display: grid;
  grid-template-columns: 1fr;
}
body.mode-mobile .right-pane {
  position: static;
  max-height: none;
}
body.mode-mobile #previewText {
  min-height: 180px;
}
body.mode-mobile .section-card,
body.mode-mobile .option-card,
body.mode-mobile .preview-card {
  border-radius: 16px;
  background: #ffffff;
}
body.mode-mobile .signature-canvas {
  height: 200px;
}

/* 재고관리 1차 테스트버전 */
.inventory-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.inventory-item-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.inventory-sync-grid,
.inventory-movement-grid-2 {
  grid-template-columns: 1.4fr 0.6fr;
}
.inventory-movement-grid {
  grid-template-columns: 1.4fr 0.8fr 0.6fr 0.8fr;
}
.inventory-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.check-card {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e3f5;
  background: #f8fbff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}
.inventory-table-wrap { width: 100%; overflow-x: auto; }
.inventory-table th,
.inventory-table td,
.inventory-history-table th,
.inventory-history-table td {
  white-space: nowrap;
  vertical-align: middle;
}
.inventory-table td:nth-child(3),
.inventory-history-table td:nth-child(9) {
  white-space: normal;
  min-width: 180px;
}
.inventory-low-row {
  background: #fff5f5 !important;
}
.inventory-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2ff;
  color: #2f3b6f;
  white-space: nowrap;
  margin-right: 4px;
}
.inventory-badge.ok {
  background: #e8f7ed;
  color: #166534;
}
.inventory-badge.danger {
  background: #fee2e2;
  color: #b91c1c;
}
.inventory-badge.auto {
  background: #e0f2fe;
  color: #075985;
}
.inventory-badge.move {
  background: #f1f5f9;
  color: #334155;
}
.inline-form { display: inline; margin: 0; }
.link-button {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}
.danger-text { color: #b91c1c; }
.nowrap { white-space: nowrap !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.daily-inventory-panel {
  margin-bottom: 14px;
  border-color: #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.daily-inventory-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.daily-inventory-head h3 { margin: 0 0 4px; }
.daily-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 7px;
}
.daily-inventory-card {
  position: relative;
  border: 1px solid #d7e3f5;
  border-radius: 12px;
  background: #fff;
  padding: 8px 9px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.daily-inventory-card.is-low {
  border-color: #fecaca;
  background: #fff7f7;
}
.daily-inventory-name {
  font-weight: 950;
  font-size: 13px;
  padding-right: 34px;
  line-height: 1.25;
  word-break: keep-all;
}
.daily-inventory-code {
  color: #64748b;
  font-size: 12px;
  margin-top: 2px;
}
.daily-inventory-qty-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
}
.daily-inventory-qty-row b {
  font-size: 18px;
}
.daily-inventory-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}
.daily-inventory-low-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #dc2626;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .inventory-dashboard {
    grid-template-columns: 1fr;
  }
  .inventory-item-grid,
  .inventory-movement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-sync-grid,
  .inventory-movement-grid-2 {
    grid-template-columns: 1fr;
  }
  .daily-inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .inventory-item-grid,
  .inventory-movement-grid,
  .inventory-check-grid,
  .daily-inventory-grid {
    grid-template-columns: 1fr;
  }
}


/* 재고관리 화면 정리: 현황/내역 중심 + 관리 도구 접기 */
.inventory-toolbar-card {
  margin-bottom: 14px;
  border-color: #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.inventory-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.inventory-toolbar-head h2 { margin: 0 0 4px; }
.inventory-tool-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.inventory-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  border-color: #bfdbfe;
  background: #ffffff;
}
.inventory-tool-btn.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.inventory-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 900;
}
.inventory-tool-btn.active .inventory-tool-icon {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.inventory-tool-btn.primary-soft {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.14);
}
.inventory-tool-btn.primary-soft .inventory-tool-icon {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.inventory-tool-btn.primary-soft:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.inventory-tools-area {
  display: block;
  margin-bottom: 16px;
}
.inventory-tool-panel {
  display: none;
  margin-bottom: 14px;
  border-style: dashed;
}
.inventory-tool-panel.is-open {
  display: block;
  animation: inventoryPanelFade 0.18s ease-out;
}
.inventory-panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.inventory-panel-title-row h2 { margin: 0; }
.inventory-panel-close {
  flex: 0 0 auto;
}
.inventory-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  text-decoration: none;
  margin-right: 6px;
}
@keyframes inventoryPanelFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1180px) {
  .inventory-toolbar-head {
    align-items: stretch;
    flex-direction: column;
  }
  .inventory-tool-buttons {
    justify-content: stretch;
  }
  .inventory-tool-btn {
    flex: 1 1 180px;
    justify-content: center;
    min-height: 46px;
  }
}
@media (max-width: 720px) {
  .inventory-tool-buttons {
    flex-direction: column;
  }
  .inventory-tool-btn {
    width: 100%;
  }
  .inventory-panel-title-row {
    flex-direction: column;
  }
}

/* 재고관리 화면 압축형: 한 화면 표시 우선 */
.inventory-title-panel { margin-bottom: 8px; }
.inventory-title-panel h1 { margin-bottom: 4px; }
.inventory-title-panel .muted { margin: 2px 0; }
.inventory-db-path {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-toolbar-card,
.inventory-main-card,
.inventory-history-card {
  margin-bottom: 8px !important;
  padding: 12px !important;
}
.inventory-toolbar-head h2,
.inventory-main-card h2,
.inventory-history-card h2 {
  margin: 0 !important;
  font-size: 18px !important;
}
.inventory-main-card .card-title-row,
.inventory-history-card > h2 {
  margin-bottom: 6px !important;
}
.inventory-main-card .muted.small {
  display: none;
}
.inventory-table-wrap {
  width: 100%;
  overflow-x: hidden !important;
}
.inventory-fit-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse;
  font-size: 12px;
}
.inventory-fit-table th,
.inventory-fit-table td {
  padding: 4px 5px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.inventory-fit-table th {
  font-size: 11.5px;
  letter-spacing: -0.02em;
}
.inventory-fit-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.inventory-fit-table .clip-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}
.inventory-badge {
  padding: 2px 5px !important;
  font-size: 11px !important;
  margin-right: 2px !important;
}
.inventory-edit-link {
  min-height: 22px !important;
  padding: 2px 6px !important;
  margin-right: 2px !important;
  font-size: 11.5px;
}
.inventory-fit-table .link-button {
  font-size: 11.5px;
}
.inventory-form-card,
.inventory-move-card {
  padding: 12px !important;
}
.inventory-tool-panel {
  margin-bottom: 8px !important;
}

/* 재고현황 컬럼 폭 */
.inventory-table .inv-col-status { width: 5.4%; }
.inventory-table .inv-col-code { width: 10.5%; }
.inventory-table .inv-col-detail { width: 20%; }
.inventory-table .inv-col-category { width: 13%; }
.inventory-table .inv-col-qty { width: 6.3%; }
.inventory-table .inv-col-manage { width: 8.1%; }

/* 입출고/작업중/폐기내역 컬럼 폭 */
.inventory-history-table .hist-col-date { width: 8.8%; }
.inventory-history-table .hist-col-type { width: 8%; }
.inventory-history-table .hist-col-item { width: 21%; }
.inventory-history-table .hist-col-qty { width: 6%; }
.inventory-history-table .hist-col-branch { width: 9%; }
.inventory-history-table .hist-col-name { width: 8%; }
.inventory-history-table .hist-col-phone { width: 11%; }
.inventory-history-table .hist-col-work { width: 13%; }
.inventory-history-table .hist-col-reason { width: 15.2%; }

@media (max-width: 1180px) {
  .inventory-fit-table { font-size: 11px; }
  .inventory-fit-table th,
  .inventory-fit-table td { padding: 3px 4px !important; }
  .inventory-badge { font-size: 10px !important; padding: 2px 4px !important; }
  .inventory-edit-link,
  .inventory-fit-table .link-button { font-size: 10.5px; }
}

/* 재고관리 숨김/복구 및 내역 관리 버튼 보강 */
.inventory-hidden-row {
  opacity: 0.68;
  background: #f8fafc !important;
}
.inventory-badge.muted-badge {
  background: #e5e7eb;
  color: #374151;
  border: 1px solid #d1d5db;
}
.inventory-tool-buttons .inventory-tool-btn {
  white-space: nowrap;
}
.inventory-history-table .hist-col-date { width: 8.2%; }
.inventory-history-table .hist-col-type { width: 7.5%; }
.inventory-history-table .hist-col-item { width: 19%; }
.inventory-history-table .hist-col-qty { width: 5.5%; }
.inventory-history-table .hist-col-branch { width: 8%; }
.inventory-history-table .hist-col-name { width: 7.2%; }
.inventory-history-table .hist-col-phone { width: 10%; }
.inventory-history-table .hist-col-work { width: 5.8%; }
.inventory-history-table .hist-col-reason { width: 20.7%; }
.inventory-history-table .hist-col-manage { width: 8.1%; }
.inventory-history-table .nowrap,
.inventory-table .nowrap {
  white-space: nowrap !important;
}
.inventory-history-table .inline-form,
.inventory-table .inline-form {
  display: inline-block;
  margin: 0;
}
.inventory-history-table .inventory-edit-link,
.inventory-history-table .link-button,
.inventory-table .inventory-edit-link,
.inventory-table .link-button {
  padding: 1px 4px !important;
  min-height: 20px !important;
  line-height: 1.1 !important;
}
@media (max-width: 1180px) {
  .inventory-tool-buttons .inventory-tool-btn {
    flex: 1 1 170px;
    justify-content: center;
  }
  .inventory-history-table .hist-col-manage { width: 8.8%; }
}

/* 재고관리 연동/출고/폐기 표시 정리 */
.inventory-toolbar-form {
  display: inline-flex;
  margin: 0;
}
.inventory-badge.daily {
  background: #ede9fe;
  color: #5b21b6;
}
.inventory-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.inventory-history-head h2 { margin: 0 !important; }
.inventory-history-head .muted.small { margin: 0; }
.inventory-table td:nth-child(11) {
  white-space: nowrap !important;
  min-width: 0 !important;
}
.inventory-table .inv-col-status { width: 7%; }
.inventory-table .inv-col-code { width: 10%; }
.inventory-table .inv-col-detail { width: 24%; }
.inventory-table .inv-col-category { width: 14%; }
.inventory-table .inv-col-qty { width: 6%; }
.inventory-table .inv-col-manage { width: 9%; }
.inventory-table td:nth-child(3),
.inventory-table td:nth-child(4) {
  min-width: 0 !important;
  white-space: nowrap !important;
}
.inventory-history-table .inventory-badge.move {
  min-width: 36px;
}
.inventory-move-폐기 .inventory-badge.move,
.inventory-move-discard .inventory-badge.move {
  background: #fee2e2;
  color: #991b1b;
}
.inventory-move-출고 .inventory-badge.move {
  background: #dcfce7;
  color: #166534;
}
.inventory-move-작업중 .inventory-badge.move {
  background: #fef3c7;
  color: #92400e;
}
@media (max-width: 1180px) {
  .inventory-history-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .inventory-toolbar-form,
  .inventory-toolbar-form .inventory-tool-btn {
    width: 100%;
  }
}

/* 재고관리 현황표 시각 구분 개선
   - 항목 영역과 수량 영역을 색상/구분선으로 분리
   - 숫자는 가운데 정렬하여 옆 칸 값처럼 보이는 문제 완화
   - 한 화면 표시를 유지하면서 컬럼 경계를 더 명확하게 표시 */
.inventory-main-card,
.inventory-history-card {
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.inventory-fit-table {
  border: 1px solid #d7dee9 !important;
  border-radius: 10px;
  overflow: hidden;
}

.inventory-fit-table thead th {
  background: #eef2f7 !important;
  color: #0f172a;
  border-right: 1px solid #d1d9e6 !important;
  border-bottom: 1px solid #cbd5e1 !important;
  text-align: center !important;
}

.inventory-fit-table thead th:last-child,
.inventory-fit-table tbody td:last-child {
  border-right: 0 !important;
}

.inventory-fit-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

.inventory-fit-table tbody tr:nth-child(even) td {
  background-color: #f7f9fc;
}

.inventory-fit-table tbody td {
  border-right: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e7edf5 !important;
}

.inventory-fit-table tbody tr:hover td {
  background-color: #eef6ff !important;
}

/* 재고현황: 앞쪽 항목 정보 영역 */
.inventory-table tbody td:nth-child(1),
.inventory-table tbody td:nth-child(2),
.inventory-table tbody td:nth-child(3),
.inventory-table tbody td:nth-child(4) {
  background-color: #f8fbff !important;
}

/* 재고현황: 수량 영역 */
.inventory-table tbody td:nth-child(5),
.inventory-table tbody td:nth-child(6),
.inventory-table tbody td:nth-child(7),
.inventory-table tbody td:nth-child(8),
.inventory-table tbody td:nth-child(9),
.inventory-table tbody td:nth-child(10) {
  background-color: #ffffff !important;
  text-align: center !important;
  font-weight: 800;
}

/* 항목 영역과 수량 영역 시작점 강조 */
.inventory-table th:nth-child(5),
.inventory-table td:nth-child(5),
.inventory-history-table th:nth-child(4),
.inventory-history-table td:nth-child(4) {
  border-left: 2px solid #c5d3e6 !important;
}

.inventory-table th:nth-child(11),
.inventory-table td:nth-child(11),
.inventory-history-table th:nth-child(10),
.inventory-history-table td:nth-child(10) {
  border-left: 2px solid #d7dee9 !important;
}

/* 수량별 의미를 은은하게 구분 */
.inventory-table tbody td:nth-child(5) { color: #0f172a; }     /* 현재 */
.inventory-table tbody td:nth-child(6) { color: #92400e; }     /* 작업 */
.inventory-table tbody td:nth-child(7) { color: #14532d; }     /* 가용 */
.inventory-table tbody td:nth-child(8) { color: #475569; }     /* 안전 */
.inventory-table tbody td:nth-child(9) { color: #166534; }     /* 출고 */
.inventory-table tbody td:nth-child(10) { color: #991b1b; }    /* 폐기 */

.inventory-table tbody td:nth-child(7) {
  background-color: #f0fdf4 !important;
}

.inventory-table tbody td:nth-child(10) {
  background-color: #fff7f7 !important;
}

.inventory-table tbody tr.inventory-low-row td {
  background-color: #fff1f2 !important;
}

.inventory-table tbody tr.inventory-low-row td:nth-child(7) {
  background-color: #ffe4e6 !important;
  color: #b91c1c;
}

/* 입출고/작업중/폐기 내역도 항목과 수량 경계를 명확하게 */
.inventory-history-table tbody td:nth-child(1),
.inventory-history-table tbody td:nth-child(2),
.inventory-history-table tbody td:nth-child(3) {
  background-color: #f8fbff !important;
}

.inventory-history-table tbody td:nth-child(4) {
  text-align: center !important;
  font-weight: 900;
  background-color: #ffffff !important;
}

.inventory-history-table tbody td:nth-child(5),
.inventory-history-table tbody td:nth-child(6),
.inventory-history-table tbody td:nth-child(7),
.inventory-history-table tbody td:nth-child(8),
.inventory-history-table tbody td:nth-child(9) {
  background-color: #ffffff !important;
}

.inventory-history-table tbody tr.inventory-move-폐기 td:nth-child(4),
.inventory-history-table tbody tr.inventory-move-discard td:nth-child(4) {
  background-color: #fff1f2 !important;
  color: #b91c1c;
}

.inventory-history-table tbody tr.inventory-move-출고 td:nth-child(4) {
  background-color: #f0fdf4 !important;
  color: #166534;
}

.inventory-history-table tbody tr.inventory-move-작업중 td:nth-child(4) {
  background-color: #fffbeb !important;
  color: #92400e;
}

.inventory-table .clip-cell,
.inventory-history-table .clip-cell {
  padding-left: 7px !important;
  padding-right: 7px !important;
}

.inventory-table .num,
.inventory-history-table .num {
  text-align: center !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.inventory-badge.ok,
.inventory-badge.danger,
.inventory-badge.daily,
.inventory-badge.move,
.inventory-badge.auto,
.inventory-badge.muted-badge {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1180px) {
  .inventory-fit-table thead th,
  .inventory-fit-table tbody td {
    border-right-width: 1px !important;
  }
  .inventory-table .clip-cell,
  .inventory-history-table .clip-cell {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}


/* 재고 변동내역: 작업품목은 6글자 정도로 좁게, 사유/메모는 남은 폭을 크게 사용
   - 작업품목은 짧은 코드/품목명 중심이라 한 줄 유지
   - 사유/메모는 길어도 말줄임하지 않고 줄바꿈하여 확인 가능 */
.inventory-history-table .inventory-work-item-cell {
  max-width: 6.5em;
  width: 6.5em;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-weight: 700;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.inventory-history-table .inventory-reason-memo-cell {
  min-width: 18em;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.32;
  text-align: left;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
@media (max-width: 1180px) {
  .inventory-history-table .inventory-reason-memo-cell {
    min-width: 14em;
    line-height: 1.28;
  }
  .inventory-history-table .inventory-work-item-cell {
    max-width: 6em;
    width: 6em;
  }
}

/* 완료세부진행내역 / 재고 변동내역 페이지 처리 UI */
.inventory-page-size-form,
.daily-completed-page-size-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 12px;
}
.inventory-page-size-form label,
.daily-completed-page-size-form label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: #475569;
}
.inventory-page-size-form select,
.daily-completed-page-size-form select {
  min-height: 28px;
  padding: 2px 22px 2px 6px;
  font-size: 12px;
}
.compact-button {
  min-height: 28px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
}
.inventory-pagination-bar,
.daily-completed-pagination-bar {
  margin: 6px 0 8px !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}
.inventory-pagination-bar .button,
.daily-completed-pagination-bar .button {
  min-height: 28px !important;
  padding: 4px 9px !important;
  font-size: 12px !important;
}
.daily-completed-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.daily-title-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.daily-title-inline h3 {
  margin: 0;
}
@media (max-width: 1180px) {
  .inventory-page-size-form,
  .daily-completed-page-size-form {
    justify-content: flex-start;
  }
}

/* 일일작업현황 보조 도구: 재고관리 도구 버튼 스타일 통일 */
.daily-work-tool-card {
  margin: 10px 0 12px;
  border-color: #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.daily-work-tool-head h2 {
  margin: 0 0 4px;
}
.daily-work-tool-panel {
  padding: 12px !important;
  margin-bottom: 10px !important;
  border-style: dashed;
}
.daily-tool-panel-title-row {
  margin-bottom: 10px;
}
.daily-tool-panel-title-row h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.daily-work-tool-buttons .inventory-tool-btn {
  white-space: nowrap;
}
.daily-work-tools-area {
  margin-bottom: 12px;
}
.daily-db-source-panel.daily-work-tool-panel,
.daily-completed-insole-export-panel.daily-work-tool-panel {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .daily-work-tool-card .inventory-toolbar-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .daily-work-tool-buttons {
    justify-content: flex-start;
    width: 100%;
  }
}
@media (max-width: 720px) {
  .daily-work-tool-buttons .inventory-tool-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* 재고 변동내역 검색바 - 판매/수선 DB 검색 방식과 동일한 조합 검색 */
.inventory-history-search {
  margin: 6px 0 8px !important;
  padding: 7px 8px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  border: 1px solid #dbe5f4 !important;
  gap: 6px !important;
}
.inventory-history-search label {
  white-space: nowrap;
  font-size: 12px;
  color: #475569;
}
.inventory-history-search select,
.inventory-history-search input {
  min-height: 30px !important;
  font-size: 12px !important;
}
.inventory-history-search input[name="movement_keyword"],
.inventory-history-search input[name="movement_exclude_keyword"] {
  min-width: 150px;
  max-width: 220px;
}
@media (max-width: 1180px) {
  .inventory-history-search {
    align-items: stretch !important;
  }
  .inventory-history-search input[name="movement_keyword"],
  .inventory-history-search input[name="movement_exclude_keyword"] {
    min-width: 0;
    max-width: none;
    flex: 1 1 180px;
  }
}

/* 출고예정일 예외규칙 / 알림 개선 */
.due-exception-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.due-exception-table {
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}
.due-exception-table input[type="text"],
.due-exception-table input[type="number"],
.due-exception-table select {
  width: 100%;
  min-height: 34px;
  font-size: 13px;
}
.due-exception-table .center {
  text-align: center;
}
.due-exception-table .due-days-input-cell {
  min-width: 118px;
  white-space: nowrap;
}
.due-exception-table .due-days-inline {
  display: grid;
  grid-template-columns: max-content 64px max-content;
  align-items: center;
  justify-content: start;
  gap: 6px;
}
.due-exception-table .due-days-inline input[type="number"] {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  box-sizing: border-box;
}
.daily-due-count.tomorrow {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.daily-due-row-tomorrow {
  background: #fffbeb;
}
.daily-due-badge-tomorrow {
  background: #f59e0b;
  color: #fff;
}

/* DB 관리 / 초기화 접근 정리 */
.db-reset-card summary,
.db-manage-card summary {
  cursor: pointer;
  font-weight: 800;
  color: #334155;
}
.db-reset-body {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.db-reset-body input[type="text"] {
  max-width: 220px;
  min-height: 38px;
}
.db-manage-path-table th {
  width: 190px;
  white-space: nowrap;
  background: #f8fafc;
}
.db-manage-path-table td,
.db-backup-list-table td {
  word-break: break-all;
}
.db-backup-list-table th:nth-child(1),
.db-backup-list-table td:nth-child(1),
.db-backup-list-table th:nth-child(3),
.db-backup-list-table td:nth-child(3),
.db-backup-list-table th:nth-child(4),
.db-backup-list-table td:nth-child(4) {
  white-space: nowrap;
}

/* Sales/repair direct input visual form update */
.db-record-title-panel {
  background: linear-gradient(135deg, #f5f8ff, #eef3fb);
  border-color: #ccd9ee;
}
.db-record-modern-form {
  max-width: 1180px;
  gap: 14px;
  border-color: #d2dceb;
  box-shadow: 0 8px 22px rgba(20, 49, 93, .07);
}
.db-record-form-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid #e4e9f2;
}
.db-record-form-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.db-record-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 12px;
  color: #44546a;
}
.db-record-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: #f7f9fc;
  border: 1px solid #e3e8f0;
  border-radius: 999px;
  white-space: nowrap;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.legend-dot.date { background: #3b82f6; }
.legend-dot.money { background: #16a34a; }
.legend-dot.branch { background: #9333ea; }
.db-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 12px;
}
.db-record-field {
  border: 1px solid #e0e7f1;
  background: #fbfcff;
  border-radius: 12px;
  padding: 10px;
  gap: 6px;
}
.db-record-field > span {
  font-weight: 800;
  font-size: 13px;
  color: #1f2937;
}
.db-record-field input,
.db-record-field textarea {
  width: 100%;
  min-height: 40px;
  border-color: #cfd8e6;
  background: #fff;
}
.db-record-field textarea {
  min-height: 82px;
  line-height: 1.45;
}
.db-record-field.field-date { background: #f8fbff; border-color: #cfe0ff; }
.db-record-field.field-money { background: #f8fff9; border-color: #cfeeda; }
.db-record-field.field-branch { background: #fcfaff; border-color: #e0d3fb; }
.db-record-field.field-wide { grid-column: span 2; }
.db-record-field.field-money input { text-align: right; font-weight: 700; letter-spacing: .01em; }
.db-record-field.field-date input { font-weight: 700; color: #173d7a; }
.db-record-field.field-branch input { font-weight: 700; color: #4c1d95; }
.field-hint {
  font-style: normal;
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.35;
}
.db-record-submit-row {
  padding-top: 4px;
  border-top: 1px solid #edf0f5;
}
.db-record-submit-row button,
.db-record-submit-row .button {
  min-width: 92px;
}
@media (max-width: 980px) {
  .db-record-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .db-record-form-head { flex-direction: column; }
  .db-record-legend { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .db-record-grid { grid-template-columns: 1fr; }
  .db-record-field.field-wide { grid-column: auto; }
}

/* DB 관리 - 주요 사용 로그 */
.db-system-log-table th,
.db-system-log-table td {
  padding: 6px 7px;
  vertical-align: middle;
}
.db-system-log-table .nowrap {
  white-space: nowrap;
}
.db-system-log-table .log-target-cell {
  max-width: 420px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  color: #4b5563;
}

/* 일일작업현황: 진행중/완료 세부진행내역 카테고리 탭 */
.daily-detail-category-tabs-card {
  margin-top: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.daily-detail-category-tabs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.daily-detail-category-tabs-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #0f172a;
}
.daily-detail-category-tabs-head p { margin: 0; }
.daily-detail-category-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}
.daily-detail-category-tab {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 118px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.daily-detail-category-tab:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.daily-detail-category-tab.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12), 0 6px 14px rgba(37, 99, 235, .10);
}
.daily-detail-category-tab-label {
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.daily-detail-category-tab-counts {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}
.daily-detail-category-tab.active .daily-detail-category-tab-counts { color: #1e40af; }
@media (max-width: 1180px) {
  .daily-detail-category-tabs-card { padding: 10px; }
  .daily-detail-category-tabs-head { flex-direction: column; gap: 6px; }
  .daily-detail-category-tab { min-width: 126px; min-height: 52px; padding: 9px 11px; }
}

/* 일일작업현황 - 진행중 선택 일괄 완료 */
.daily-progress-title-row {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.daily-bulk-complete-form {
  margin-top: 8px;
}
.daily-bulk-complete-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #d7e3f4;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
}
.daily-bulk-complete-title {
  min-width: 190px;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.daily-bulk-complete-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin: 0;
}
.daily-bulk-complete-toolbar select,
.daily-bulk-complete-toolbar input[type="date"] {
  min-height: 34px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 5px 9px;
  font-size: 13px;
}
.daily-bulk-complete-help {
  margin: 0 0 8px 2px;
}
.daily-bulk-select-col {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  text-align: center !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.daily-bulk-select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.daily-bulk-selected-count {
  white-space: nowrap;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}
@media (max-width: 1180px) {
  .daily-bulk-complete-toolbar {
    align-items: stretch;
  }
  .daily-bulk-complete-title {
    width: 100%;
    min-width: 0;
  }
  .daily-bulk-complete-toolbar label {
    flex: 1 1 180px;
  }
  .daily-bulk-complete-toolbar button {
    min-height: 44px;
    flex: 1 1 180px;
  }
}

/* 단가표 관리 */
.price-list-page {
  padding: 16px;
}
.price-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  border: 1px solid #d6e3f5;
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.price-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.price-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #cfd9e8;
  border-radius: 999px;
  background: #fff;
  color: #243044;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.price-tab:hover {
  text-decoration: none;
  background: #f8fbff;
}
.price-tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.price-tab.settings {
  margin-left: auto;
}
.price-list-card,
.price-settings-card,
.card.price-list-card,
.card.price-settings-card {
  background: #fff;
  border: 1px solid #d8dce2;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
}
.price-list-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.price-list-toolbar .actions,
.actions.right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.price-list-table-wrap,
.price-settings-table-wrap {
  border-radius: 14px;
}
.price-list-table,
.price-settings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  font-size: 13px;
}
.price-list-table th,
.price-list-table td,
.price-settings-table th,
.price-settings-table td {
  border-bottom: 1px solid #edf0f5;
  padding: 8px;
  vertical-align: middle;
}
.price-list-table th,
.price-settings-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6fb;
  color: #1f2937;
  text-align: left;
  font-weight: 900;
}
.price-list-logo {
  flex: 0 0 auto;
}
.price-list-table tbody tr:nth-child(even) > td {
  background: #f8fafc;
}
.price-list-table tbody tr:nth-child(even) input,
.price-list-table tbody tr:nth-child(even) textarea {
  background: rgba(255, 255, 255, .92);
}
.price-list-table input,
.price-list-table textarea,
.price-settings-table input,
.price-settings-card input {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
}
.price-list-table textarea {
  min-height: 34px;
  resize: vertical;
}
.price-row-action-th,
.price-row-action {
  width: 118px;
  text-align: center !important;
  white-space: nowrap;
}
.price-row-action .btn.small {
  margin: 0 1px;
  padding-left: 7px;
  padding-right: 7px;
}
.btn.small,
button.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}
button.danger,
.btn.danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}
button.danger:hover,
.btn.danger:hover {
  background: #fee2e2;
}
.price-settings-card h2,
.price-settings-card h3 {
  margin: 14px 0 8px;
}
.price-settings-card h2:first-child {
  margin-top: 0;
}
.form-grid.price-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}
.price-settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 800;
  color: #374151;
}
.price-settings-grid label span {
  font-size: 13px;
}
.price-settings-table .center {
  text-align: center;
}
.price-settings-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
}
@media (max-width: 900px) {
  .price-list-toolbar {
    flex-direction: column;
  }
  .price-list-toolbar .actions {
    width: 100%;
  }
  .price-list-toolbar .actions button {
    flex: 1 1 140px;
  }
  .price-tab.settings {
    margin-left: 0;
  }
  .form-grid.price-settings-grid {
    grid-template-columns: 1fr;
  }
}
.price-hidden-inputs { display: none; }

/* 단가표 조회/수정/출력 모드 개선 */
.price-list-card.is-view-mode .price-list-table td {
  white-space: pre-wrap;
}
.price-list-table td[data-col="row_no"],
.price-list-table th:first-child,
.price-row-no {
  text-align: center;
}
.price-row-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #334155;
  font-weight: 900;
}
.price-empty-cell {
  text-align: center;
  color: #6b7280;
  padding: 28px 12px !important;
}
.print-only {
  display: none;
}
.price-print-header {
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #d8dce2;
}
.price-print-header h1 {
  margin: 4px 0 4px;
  font-size: 24px;
}
.price-print-header p {
  margin: 0;
  color: #6b7280;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }
  body {
    background: #fff !important;
  }
  .topbar,
  .no-print,
  .price-tabs,
  .price-list-head,
  .notice,
  .floating-x-scroll,
  .table-scroll-top {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .price-list-page {
    padding: 0 !important;
  }
  .price-list-card,
  .card.price-list-card {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  .price-list-table-wrap,
  .table-wrap.price-list-table-wrap {
    overflow: visible !important;
    border-radius: 0 !important;
  }
  .price-list-table {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 11px !important;
    border-collapse: collapse !important;
  }
  .price-list-table th,
  .price-list-table td {
    border: 1px solid #9ca3af !important;
    padding: 6px 7px !important;
    color: #111827 !important;
    background: #fff !important;
    white-space: pre-wrap !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .price-list-table th {
    position: static !important;
    text-align: center !important;
    font-weight: 900 !important;
    background: #eef2f7 !important;
  }
  .price-list-table tbody tr:nth-child(even) > td {
    background: #f4f6f8 !important;
  }
  .price-print-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 18px !important;
  }
  .price-print-header .logo {
    max-width: 220px !important;
    max-height: 72px !important;
  }
}

/* 단가표 연동 주문서 금액 패널 */
.order-price-card {
  border-color: #cfe0f7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.order-price-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.order-price-tab {
  border: 1px solid #d6e3f5;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 8px 13px;
  font-weight: 800;
  cursor: pointer;
}
.order-price-tab.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.order-price-linked-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0 14px;
  padding: 9px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.order-price-linked-label {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  margin-right: 2px;
}
.order-price-linked-plus {
  color: #94a3b8;
  font-weight: 900;
}
.order-price-source-pill,
.order-price-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-weight: 900;
  white-space: nowrap;
}
.order-price-source-pill {
  padding: 5px 9px;
  font-size: 12px;
}
.order-price-source-badge {
  min-width: 0;
  padding: 4px 7px;
  font-size: 11px;
}
.order-price-source-pill.source-insole_sales,
.order-price-source-badge.source-insole_sales {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.order-price-source-pill.source-insole_repair,
.order-price-source-badge.source-insole_repair {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.order-price-source-pill.source-orthopedic_shoes_production,
.order-price-source-badge.source-orthopedic_shoes_production {
  background: #fefce8;
  border-color: #fde68a;
  color: #a16207;
}
.order-price-source-pill.source-orthopedic_shoes_repair,
.order-price-source-badge.source-orthopedic_shoes_repair {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.order-price-source-pill.source-shoe_modification,
.order-price-source-badge.source-shoe_modification {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.order-price-source-pill.source-other,
.order-price-source-badge.source-other {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}
.order-price-groups {
  display: grid;
  gap: 12px;
}
.order-price-group {
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: #f8fbff;
  padding: 10px;
}
.order-price-group-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.order-price-group-head strong {
  color: #0f3b82;
  font-weight: 900;
  white-space: nowrap;
}
.order-price-group-name,
.order-product-select,
.order-product-custom {
  width: 100%;
  min-width: 0;
  font-weight: 800;
}
.order-product-select-wrap {
  display: grid;
  grid-template-columns: minmax(130px, 220px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.order-price-group-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.order-price-items {
  display: grid;
  gap: 8px;
}
.order-price-line {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr) 62px 72px 118px 62px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.order-price-line.is-as-service {
  background: #f8fafc;
  border-style: dashed;
}
.order-price-line.price-source-insole_sales {
  border-left: 5px solid #93c5fd;
}
.order-price-line.price-source-insole_repair {
  border-left: 5px solid #86efac;
}
.order-price-line.price-source-orthopedic_shoes_production {
  border-left: 5px solid #facc15;
}
.order-price-line.price-source-orthopedic_shoes_repair {
  border-left: 5px solid #fdba74;
}
.order-price-line.price-source-shoe_modification {
  border-left: 5px solid #c4b5fd;
}
.order-price-line.price-source-other {
  border-left: 5px solid #94a3b8;
}
.order-price-line-no {
  font-weight: 900;
  color: #475569;
  white-space: nowrap;
}
.order-price-item-select,
.order-discount-select {
  width: 100%;
  min-width: 0;
}
.order-price-qty {
  width: 100%;
  text-align: center;
}
.order-price-as-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-weight: 900;
  color: #475569;
  white-space: nowrap;
}
.order-price-as-check input {
  width: 16px;
  height: 16px;
}
.order-price-value {
  text-align: right;
  font-weight: 900;
  color: #0f3b82;
  white-space: nowrap;
}
.order-price-value small {
  display: block;
  margin-top: 2px;
  color: #b45309;
  font-size: 10px;
  font-weight: 900;
}
.order-price-add-row {
  display: flex;
  justify-content: flex-end;
}
.order-discount-row {
  display: grid;
  grid-template-columns: 90px minmax(160px, 260px);
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.order-discount-row label {
  font-weight: 900;
  color: #334155;
}
.order-price-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.order-price-summary > div {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 9px 10px;
}
.order-price-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}
.order-price-summary b {
  color: #0f172a;
}
.order-price-summary .final {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.order-price-summary .final b {
  color: #1d4ed8;
  font-size: 16px;
}

@media (max-width: 900px) {
  .order-price-group-head {
    grid-template-columns: 1fr;
  }
  .order-product-select-wrap {
    grid-template-columns: 1fr;
  }
  .order-price-group-actions {
    justify-content: flex-start;
  }
  .order-price-line {
    grid-template-columns: 64px 82px minmax(0, 1fr) 58px 62px 104px;
  }
  .order-price-line .button.danger {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .order-price-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 일일작업현황 작업현황등록 후보표: 가로 스크롤 제거용 초압축 레이아웃 */
.daily-db-source-panel .daily-import-preview-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: visible;
}
.daily-db-source-panel .daily-import-preview-table,
.daily-db-source-panel table.daily-import-preview-table.data-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  font-size: 11px;
}
.daily-db-source-panel .daily-import-preview-table th,
.daily-db-source-panel .daily-import-preview-table td {
  padding: 4px 4px !important;
  line-height: 1.16;
  vertical-align: middle !important;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.daily-db-source-panel .daily-import-preview-table input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
}
.daily-db-source-panel .daily-import-preview-table th:nth-child(1),
.daily-db-source-panel .daily-import-preview-table td:nth-child(1) { width: 28px !important; text-align:center; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(2),
.daily-db-source-panel .daily-import-preview-table td:nth-child(2) { width: 124px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(3),
.daily-db-source-panel .daily-import-preview-table td:nth-child(3) { width: 70px !important; white-space:nowrap; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(4),
.daily-db-source-panel .daily-import-preview-table td:nth-child(4) { width: 58px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(5),
.daily-db-source-panel .daily-import-preview-table td:nth-child(5) { width: 48px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(6),
.daily-db-source-panel .daily-import-preview-table td:nth-child(6) { width: 64px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(7),
.daily-db-source-panel .daily-import-preview-table td:nth-child(7) { width: 98px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(8),
.daily-db-source-panel .daily-import-preview-table td:nth-child(8) { width: 72px !important; text-align:right; white-space:nowrap; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(9),
.daily-db-source-panel .daily-import-preview-table td:nth-child(9) { width: 116px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(10),
.daily-db-source-panel .daily-import-preview-table td:nth-child(10) { width: 62px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(11),
.daily-db-source-panel .daily-import-preview-table td:nth-child(11) { width: 104px !important; }
.daily-db-source-panel .daily-import-preview-table th:nth-child(12),
.daily-db-source-panel .daily-import-preview-table td:nth-child(12) { width: 78px !important; }
.daily-db-source-panel .daily-import-preview-table td:nth-child(2) b,
.daily-db-source-panel .daily-import-preview-table td:nth-child(2) .muted.small,
.daily-db-source-panel .daily-import-preview-table td:nth-child(12) .muted.small {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-db-source-panel .daily-import-preview-table .badge,
.daily-db-source-panel .daily-import-preview-table .status-badge {
  padding: 2px 5px;
  font-size: 10px;
  white-space: nowrap;
}
.daily-db-source-panel .daily-source-category-select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 3px 18px 3px 5px;
  font-size: 11px;
}
.daily-db-source-panel .floating-x-scroll,
.daily-db-source-panel .floating-x-scroll:not(.is-hidden) {
  display: none !important;
}

/* 판매리스트 직접입력: 다중 판매항목/단가표/할인 연동 */
.sales-direct-price-panel {
  grid-column: 1 / -1;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 12px;
  background: #f8fbff;
  margin-bottom: 12px;
}
.sales-direct-items-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
}
.sales-direct-items-head p { margin: 3px 0 0; }
.sales-price-items-root {
  display: grid;
  gap: 8px;
}
.sales-price-item-line {
  display: grid;
  grid-template-columns: 96px minmax(150px, 210px) minmax(240px, 1fr) 112px 62px;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.sales-price-tab-select,
.sales-price-item-select {
  width: 100%;
  min-width: 0;
}
.sales-price-item-price {
  text-align: right;
  font-weight: 900;
  color: #0f3b82;
  white-space: nowrap;
}
.sales-discount-area {
  display: grid;
  grid-template-columns: 80px minmax(160px, 280px);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.sales-discount-area label {
  font-weight: 900;
  color: #334155;
}
.sales-price-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.sales-price-summary > div {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
}
.sales-price-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}
.sales-price-summary .final {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.sales-price-summary .final b {
  color: #1d4ed8;
  font-size: 16px;
}
.sales-price-row-count {
  grid-column: 1 / -1;
  margin: 0;
  padding: 7px 9px;
  border-radius: 10px;
  background: #eaf2ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
}
@media (max-width: 1100px) {
  .sales-price-item-line {
    grid-template-columns: 92px minmax(140px, 190px) minmax(180px, 1fr) 104px;
  }
  .sales-price-item-line .button.danger {
    grid-column: 1 / -1;
    justify-self: end;
  }
}
@media (max-width: 760px) {
  .sales-direct-items-head {
    display: grid;
  }
  .sales-direct-items-head .button {
    justify-self: stretch;
  }
  .sales-price-item-line {
    grid-template-columns: 1fr;
  }
  .sales-price-item-line .sales-price-item-price {
    text-align: left;
  }
  .sales-price-item-line .button.danger {
    grid-column: auto;
    justify-self: end;
  }
  .sales-discount-area,
  .sales-price-summary {
    grid-template-columns: 1fr;
  }
}

/* 수선내역 직접입력: 카테고리/단가표 연동 패널 */
.repair-order-price-panel {
  grid-column: 1 / -1;
  border: 1px solid #cfe0f7;
  border-radius: 16px;
  padding: 12px;
  background: #fbfdff;
  margin-bottom: 12px;
}
.repair-selected-category-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.repair-selected-category-line span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.repair-selected-category-line b {
  color: #1d4ed8;
}
.repair-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.repair-category-tab {
  border: 1px solid #d6e3f5;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 8px 13px;
  font-weight: 900;
  cursor: pointer;
}
.repair-category-tab.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.repair-items-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.repair-items-head p { margin: 3px 0 0; }
.repair-price-items-root {
  display: grid;
  gap: 8px;
}
.repair-price-item-line {
  display: grid;
  grid-template-columns: 94px minmax(240px, 1fr) 118px minmax(180px, 220px) 62px;
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.repair-price-item-value-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.repair-price-item-price {
  display: block;
  min-width: 0;
  text-align: right;
  font-weight: 900;
  color: #0f3b82;
  line-height: 1.15;
}
.repair-price-item-total {
  display: block;
  white-space: nowrap;
}
.repair-price-item-unit {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.repair-price-item-line .button.danger {
  justify-self: end;
  white-space: nowrap;
}
.repair-price-qty-wrap {
  min-width: 0;
}
.repair-price-qty-wrap .order-price-qty-label {
  display: none;
}
.repair-price-qty-wrap .order-price-qty-control {
  width: 100%;
}
.repair-price-qty-wrap .order-price-qty {
  min-width: 42px;
}
.repair-discount-area {
  display: grid;
  grid-template-columns: 80px minmax(160px, 260px);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.repair-discount-area label {
  font-weight: 900;
  color: #334155;
}
.repair-price-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.repair-price-summary > div {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 9px 10px;
}
.repair-price-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}
.repair-price-summary .final {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.repair-price-summary .final b {
  color: #1d4ed8;
  font-size: 16px;
}
@media (max-width: 900px) {
  .repair-price-item-line {
    grid-template-columns: 90px minmax(0, 1fr) 118px;
  }
  .repair-price-item-value-wrap {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .repair-price-item-line .button.danger {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .repair-price-summary { grid-template-columns: 1fr; }
}

/* 주문서 금액 병합 보기 */
.order-price-merged-view {
  margin-top: 12px;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
}
.order-price-merged-title {
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 8px;
}
.merged-product-block {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #fbfdff;
}
.merged-product-block:last-child {
  margin-bottom: 0;
}
.merged-product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #eef6ff;
  border-bottom: 1px solid #dbeafe;
}
.merged-product-head strong {
  color: #0f3b82;
  font-weight: 900;
}
.merged-product-head small,
.merged-source-head small {
  color: #475569;
  font-weight: 800;
}
.merged-source-block {
  margin: 8px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.merged-source-block.source-insole_sales { border-left-color: #93c5fd; }
.merged-source-block.source-insole_repair { border-left-color: #86efac; }
.merged-source-block.source-orthopedic_shoes_production { border-left-color: #facc15; }
.merged-source-block.source-orthopedic_shoes_repair { border-left-color: #fdba74; }
.merged-source-block.source-shoe_modification { border-left-color: #c4b5fd; }
.merged-source-block.source-other { border-left-color: #94a3b8; }
.merged-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 900;
  color: #334155;
}
.merged-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 120px minmax(90px, 1fr) 110px;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-top: 1px solid #f1f5f9;
}
.merged-source-head + .merged-item-row {
  border-top: 0;
}
.merged-item-name {
  min-width: 0;
  font-weight: 800;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.merged-item-meta,
.merged-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.merged-item-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}
.merged-as-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  border: 1px solid #fed7aa;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
}
.merged-item-total {
  text-align: right;
  color: #0f3b82;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .merged-product-head,
  .merged-source-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .merged-item-row {
    grid-template-columns: 1fr 96px;
  }
  .merged-item-status {
    grid-column: 1 / -1;
  }
}

/* WOTC manager 상단/로그인 UI 업데이트 */
.topbar {
  height: auto;
  min-height: 62px;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 18px 0;
  background: linear-gradient(180deg, #eef2f7 0%, #dfe5ee 100%);
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .07);
}
.topbar .main-tabs {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.topbar .main-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px 11px;
  color: #334155;
  font-weight: 800;
  letter-spacing: -.02em;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom-color: #aeb9c8;
  border-radius: 14px 14px 0 0;
  box-shadow: inset 0 -3px 0 rgba(148, 163, 184, .18), 0 -1px 0 rgba(255,255,255,.7);
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease;
  text-decoration: none;
}
.topbar .main-tab:hover,
.topbar .main-tab:focus-visible {
  color: #1f4f99;
  background: #ffffff;
  border-color: #93b4e7;
  box-shadow: inset 0 -3px 0 rgba(47, 92, 255, .18), 0 -5px 16px rgba(15, 23, 42, .10);
  transform: translateY(-4px);
  text-decoration: none;
  z-index: 2;
}
.topbar .main-tab.active {
  color: #0f3f89;
  background: #ffffff;
  border-color: #8fb0df;
  border-bottom-color: #ffffff;
  box-shadow: 0 -6px 18px rgba(31, 79, 153, .13);
  transform: translateY(-2px);
  z-index: 3;
}
.topbar .main-tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: #1f4f99;
  opacity: .9;
}
.topbar .access-chip {
  margin-left: auto;
  margin-bottom: 10px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .86);
  border-color: #dbe4f0;
}
.access-login-logo-banner {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  object-position: center;
  margin: 0 0 22px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 10px 24px rgba(15, 23, 42, .06);
}
.access-login-title h1 {
  letter-spacing: -.03em;
}

body.mode-tablet .topbar,
body.mode-mobile .topbar {
  min-height: 0;
  padding: 10px 10px 0;
  gap: 8px;
}
body.mode-tablet .topbar .main-tabs,
body.mode-mobile .topbar .main-tabs {
  width: 100%;
  gap: 3px;
}
body.mode-tablet .topbar .main-tab,
body.mode-mobile .topbar .main-tab {
  min-height: 38px;
  padding: 8px 11px 10px;
  font-size: 13px;
  border-radius: 12px 12px 0 0;
}
body.mode-mobile .topbar .main-tab {
  flex: 1 1 calc(33.333% - 4px);
  min-width: 92px;
  font-size: 12.5px;
  padding-left: 8px;
  padding-right: 8px;
}
body.mode-mobile .topbar .access-chip {
  width: 100%;
  justify-content: space-between;
  margin: 2px 0 8px;
}
body.mode-mobile .access-login-body {
  padding: 14px;
}
body.mode-mobile .access-login-card {
  padding: 18px;
  border-radius: 22px;
}
body.mode-mobile .access-login-logo-banner {
  max-height: 110px;
  border-radius: 18px;
  margin-bottom: 16px;
}

/* 개인정보 표시(마스킹 해제) 재인증 */
.privacy-display-control {
  flex: 0 0 auto;
  margin: 0 0 10px auto;
}
.privacy-display-control form { margin: 0; }
.privacy-display-button,
.privacy-mask-button {
  min-height: 40px;
  border-radius: 12px;
  padding: 9px 13px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.privacy-display-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e3a5f;
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}
.privacy-display-button:hover,
.privacy-display-button:focus-visible {
  color: #0f3f89;
  background: #eff6ff;
  border-color: #60a5fa;
  text-decoration: none;
}
.privacy-mask-button {
  color: #ffffff;
  background: #b42318;
  border-color: #b42318;
}
.privacy-mask-button:hover,
.privacy-mask-button:focus-visible {
  color: #ffffff;
  background: #912018;
  border-color: #912018;
}
.privacy-display-banner {
  position: static;
  z-index: 49;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 18px;
  color: #7f1d1d;
  background: #fff1f2;
  border-bottom: 1px solid #fda4af;
  box-shadow: 0 4px 10px rgba(127, 29, 29, .08);
  font-size: 13px;
}
.privacy-display-countdown {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: #ffffff;
  background: #b42318;
  border-radius: 999px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.privacy-brand-mark {
  width: 62px;
  color: #ffffff;
  background: #b42318;
  font-size: 16px;
}

body.mode-tablet .privacy-display-control,
body.mode-mobile .privacy-display-control {
  width: 100%;
  margin: 2px 0 8px;
}
body.mode-tablet .privacy-display-button,
body.mode-tablet .privacy-mask-button,
body.mode-mobile .privacy-display-button,
body.mode-mobile .privacy-mask-button,
body.mode-tablet .privacy-display-control form,
body.mode-mobile .privacy-display-control form {
  width: 100%;
}
body.mode-tablet .privacy-display-banner,
body.mode-mobile .privacy-display-banner {
  position: static;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
  padding: 9px 12px;
}

/* 2026-07: portrait tablet/mobile focus for 새주문서 + 고객용 체크 */
.device-info-btn {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #fff;
  border-color: #c7d9f6;
  color: #1e3a8a;
  white-space: nowrap;
}

/* 새주문서: 태블릿 세로 사용 기준, 한 줄 한 항목 카드형 */
body.mode-tablet #sectionsRoot .fields-grid,
body.mode-tablet #customOptionsRoot > .section-card,
body.mode-tablet #privacyConsentRoot,
body.mode-tablet #orderCategoryPriceRoot .order-price-groups {
  grid-template-columns: 1fr !important;
}
body.mode-tablet #sectionsRoot .section-card,
body.mode-tablet #orderCategoryPriceRoot .section-card,
body.mode-tablet #customOptionsRoot > .section-card,
body.mode-tablet #privacyConsentRoot .privacy-consent-card {
  border-radius: 24px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}
body.mode-tablet #sectionsRoot .section-card h3,
body.mode-tablet #orderCategoryPriceRoot .section-card h3,
body.mode-tablet #customOptionsRoot > .section-card h3,
body.mode-tablet #privacyConsentRoot .privacy-consent-card h3 {
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 14px;
}
body.mode-tablet #sectionsRoot .field {
  padding: 16px;
  border: 1px solid #d8e1ee;
  border-radius: 20px;
  background: #f4f6f9;
}
body.mode-tablet #sectionsRoot .field label,
body.mode-tablet #orderCategoryPriceRoot label,
body.mode-tablet #customOptionsRoot label {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
  color: #1f2937;
}
body.mode-tablet #sectionsRoot input,
body.mode-tablet #sectionsRoot select,
body.mode-tablet #sectionsRoot textarea,
body.mode-tablet #orderCategoryPriceRoot input,
body.mode-tablet #orderCategoryPriceRoot select,
body.mode-tablet #orderCategoryPriceRoot textarea,
body.mode-tablet #customOptionsRoot input,
body.mode-tablet #customOptionsRoot select,
body.mode-tablet #customOptionsRoot textarea {
  min-height: 64px;
  font-size: 22px;
  border-radius: 16px;
  padding: 12px 16px;
}
body.mode-tablet #sectionsRoot .address-combo-row {
  grid-template-columns: 1fr;
  gap: 10px;
}
body.mode-tablet #sectionsRoot .address-combo-row button {
  min-height: 62px;
  font-size: 21px;
  border-radius: 16px;
}
body.mode-tablet #customOptionsRoot > .section-card > .option-card,
body.mode-tablet #customOptionsRoot .instance-card {
  grid-column: 1 / -1 !important;
  margin: 0 0 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #d8e1ee;
  background: #f3f4f6;
}
body.mode-tablet #customOptionsRoot .option-card h3,
body.mode-tablet #customOptionsRoot .instance-title span {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
}
body.mode-tablet #customOptionsRoot .rule-row,
body.mode-tablet #customOptionsRoot .memo-row {
  grid-template-columns: 1fr !important;
  gap: 8px;
  padding: 12px 0;
}
body.mode-tablet #customOptionsRoot .yn-toggle,
body.mode-tablet .diagnosis-toggle,
body.mode-tablet .followup-options {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
body.mode-tablet #customOptionsRoot button,
body.mode-tablet #orderCategoryPriceRoot button {
  min-height: 58px;
  font-size: 20px;
  border-radius: 16px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-tab {
  min-height: 66px;
  font-size: 22px;
  border-radius: 20px;
  justify-content: flex-start;
  padding: 14px 18px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-linked-info {
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-source-pill,
body.mode-tablet #orderCategoryPriceRoot .order-price-source-badge {
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 999px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-group {
  padding: 16px;
  border-radius: 24px;
  background: #f3f4f6;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-group-head {
  grid-template-columns: 1fr;
  gap: 12px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-group-head strong {
  font-size: 25px;
}
body.mode-tablet #orderCategoryPriceRoot .order-product-select-wrap {
  grid-template-columns: 1fr;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-group-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-line {
  grid-template-columns: 1fr !important;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}
body.mode-tablet #orderCategoryPriceRoot .order-price-line-no {
  font-size: 24px;
  color: #0f3b82;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-as-check {
  justify-content: flex-start;
  font-size: 22px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  background: #f8fafc;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-as-check input {
  width: 28px;
  height: 28px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-value {
  text-align: left;
  font-size: 25px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #eef6ff;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-value small {
  font-size: 16px;
}
body.mode-tablet #orderCategoryPriceRoot .order-discount-row,
body.mode-tablet #orderCategoryPriceRoot .order-price-summary {
  grid-template-columns: 1fr !important;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-summary > div {
  padding: 14px;
  border-radius: 18px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-summary span {
  font-size: 17px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-summary b {
  font-size: 22px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-merged-view,
body.mode-tablet #orderCategoryPriceRoot .merged-product-block,
body.mode-tablet #orderCategoryPriceRoot .merged-source-block {
  border-radius: 20px;
}
body.mode-tablet #orderCategoryPriceRoot .order-price-merged-title,
body.mode-tablet #orderCategoryPriceRoot .merged-product-head strong {
  font-size: 24px;
}
body.mode-tablet #orderCategoryPriceRoot .merged-item-row {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px;
}
body.mode-tablet #orderCategoryPriceRoot .merged-item-name,
body.mode-tablet #orderCategoryPriceRoot .merged-item-total {
  font-size: 21px;
}
body.mode-tablet #privacyConsentRoot .privacy-consent-text {
  font-size: 20px;
  line-height: 1.75;
}
body.mode-tablet #privacyConsentRoot .signature-canvas {
  height: 280px;
}

/* 고객용 체크: 세로 태블릿에서 큼직한 1열 카드 유지 + 동의서 */
body.mode-tablet .customer-layout {
  grid-template-columns: 1fr !important;
  gap: 16px;
}
body.mode-tablet .customer-result-panel {
  position: static;
}
body.mode-tablet .customer-hero,
body.mode-tablet .notice-box,
body.mode-tablet .customer-main .section-card,
body.mode-tablet .customer-result-card {
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
body.mode-tablet .customer-hero h1 {
  font-size: 32px;
  line-height: 1.2;
}
body.mode-tablet .customer-main .section-card h3,
body.mode-tablet .customer-result-card h2 {
  font-size: 26px;
}
body.mode-tablet #customerFieldsRoot.fields-grid {
  grid-template-columns: 1fr !important;
}
body.mode-tablet #customerFieldsRoot .field {
  padding: 16px;
  border: 1px solid #d8e1ee;
  border-radius: 20px;
  background: #f3f4f6;
}
body.mode-tablet #customerFieldsRoot .field label {
  font-size: 22px;
  font-weight: 900;
  color: #1f2937;
}
body.mode-tablet #customerFieldsRoot input,
body.mode-tablet #customerFieldsRoot select,
body.mode-tablet #customerMemo {
  min-height: 64px;
  font-size: 22px;
  border-radius: 16px;
  padding: 12px 16px;
}
body.mode-tablet #customerFieldsRoot .address-combo-row {
  grid-template-columns: 1fr;
  gap: 10px;
}
body.mode-tablet .customer-question-card {
  grid-template-columns: 1fr !important;
  padding: 18px;
  border-radius: 22px;
  background: #f3f4f6;
}
body.mode-tablet .customer-question-title {
  font-size: 23px;
}
body.mode-tablet .customer-question-title small {
  font-size: 17px;
}
body.mode-tablet .yn-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 10px;
}
body.mode-tablet .yn-toggle button,
body.mode-tablet .customer-actions button {
  min-height: 62px;
  font-size: 21px;
  border-radius: 16px;
}
body.mode-tablet .followup-question {
  font-size: 20px;
  line-height: 1.55;
}
body.mode-tablet .customer-result-content,
body.mode-tablet .customer-result-empty,
body.mode-tablet .notice-box {
  font-size: 20px;
  line-height: 1.65;
}
.customer-consent-agree-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  padding: 12px 14px;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  background: #ffffff;
  font-weight: 900;
  color: #1f2937;
}
.customer-consent-agree-row input {
  width: 22px;
  height: 22px;
}
body.mode-tablet .customer-consent-agree-row {
  font-size: 21px;
}
body.mode-tablet .customer-privacy-consent-card .privacy-consent-text {
  font-size: 20px;
  line-height: 1.75;
}
body.mode-tablet .customer-privacy-consent-card .signature-canvas {
  height: 300px;
}

/* 휴대폰은 같은 구조를 유지하되 화면폭을 고려해 글씨를 약간 낮춘다. */
body.mode-mobile #sectionsRoot .fields-grid,
body.mode-mobile #customerFieldsRoot.fields-grid,
body.mode-mobile #customOptionsRoot > .section-card,
body.mode-mobile #orderCategoryPriceRoot .order-price-tabs,
body.mode-mobile #orderCategoryPriceRoot .order-price-group-head,
body.mode-mobile #orderCategoryPriceRoot .order-product-select-wrap,
body.mode-mobile #orderCategoryPriceRoot .order-price-line,
body.mode-mobile .customer-layout,
body.mode-mobile .customer-question-card {
  grid-template-columns: 1fr !important;
}
body.mode-mobile #sectionsRoot .field,
body.mode-mobile #customerFieldsRoot .field,
body.mode-mobile #customOptionsRoot .option-card,
body.mode-mobile #orderCategoryPriceRoot .order-price-line,
body.mode-mobile .customer-question-card {
  padding: 14px;
  border-radius: 18px;
  background: #f3f4f6;
}
body.mode-mobile #sectionsRoot label,
body.mode-mobile #customerFieldsRoot label,
body.mode-mobile #customOptionsRoot label,
body.mode-mobile .customer-question-title {
  font-size: 18px;
  font-weight: 900;
}
body.mode-mobile #sectionsRoot input,
body.mode-mobile #sectionsRoot select,
body.mode-mobile #customerFieldsRoot input,
body.mode-mobile #customerFieldsRoot select,
body.mode-mobile #orderCategoryPriceRoot input,
body.mode-mobile #orderCategoryPriceRoot select,
body.mode-mobile #customOptionsRoot input,
body.mode-mobile #customOptionsRoot select,
body.mode-mobile #customerMemo {
  min-height: 54px;
  font-size: 18px;
}

/* 2026-07: 새주문서 상단 헤더를 고객용 체크 스타일로 통일 + 태블릿 카테고리 선택 */
.order-form-hero {
  background: #f7f8fb;
  border-color: #dde2ea;
  align-items: center;
}
.order-form-hero .logo,
.customer-hero .logo {
  max-width: 280px;
  max-height: 88px;
  object-fit: contain;
}
.order-form-hero-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.order-form-hero h1 {
  margin: 4px 0 8px;
  letter-spacing: -.035em;
}
.order-form-hero-meta {
  margin: 10px 0 0;
  opacity: .72;
}
.order-hero-category-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  max-width: 760px;
}
.order-hero-category-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid #d1d9e6;
  border-radius: 16px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .055);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  text-align: left;
}
.order-hero-category-tab:hover {
  transform: translateY(-2px);
  border-color: #93b4e8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .09);
  background: #fbfdff;
}
.order-hero-category-tab.active {
  border-color: #1f4f99;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: inset 4px 0 0 #1f4f99, 0 8px 20px rgba(29, 78, 216, .12);
}
.order-hero-category-tab strong {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 950;
}
.order-hero-category-en {
  font-size: 10.5px;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 900;
}
/* 주문 종류는 최상단 헤더에서 선택하므로 금액 패널 내부 중복 탭은 숨긴다. */
#orderCategoryPriceRoot .order-price-tabs {
  display: none;
}

body.mode-tablet .order-form-hero,
body.mode-tablet .customer-hero {
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
body.mode-tablet .order-form-hero {
  align-items: center;
}
body.mode-tablet .order-form-hero h1,
body.mode-tablet .customer-hero h1 {
  font-size: 32px;
  line-height: 1.2;
}
body.mode-tablet .order-form-hero .muted,
body.mode-tablet .customer-hero .muted {
  font-size: 20px;
  line-height: 1.55;
}
body.mode-tablet .order-form-hero .eyebrow,
body.mode-tablet .customer-hero .eyebrow {
  font-size: 14px;
  letter-spacing: .09em;
}
body.mode-tablet .order-form-hero .logo,
body.mode-tablet .customer-hero .logo {
  max-width: 280px;
  max-height: 88px;
}
body.mode-tablet .order-hero-category-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: none;
}
body.mode-tablet .order-hero-category-tab {
  min-height: 78px;
  border-radius: 20px;
  padding: 14px 18px;
}
body.mode-tablet .order-hero-category-tab strong {
  font-size: 23px;
}
body.mode-tablet .order-hero-category-en {
  font-size: 12.5px;
}
body.mode-tablet .order-form-hero-meta {
  font-size: 14px !important;
}

/* 고객용 체크 태블릿 글자/카드 크기를 새주문서와 비슷한 체감으로 맞춤 */
body.mode-tablet .customer-question-card,
body.mode-tablet #customerFieldsRoot .field,
body.mode-tablet .customer-main .section-card {
  border-radius: 22px;
}
body.mode-tablet .customer-question-card {
  padding: 18px;
  background: #f3f4f6;
}
body.mode-tablet .customer-question-title {
  font-size: 24px;
  line-height: 1.28;
}
body.mode-tablet .customer-question-title small {
  font-size: 18px;
  line-height: 1.45;
}
body.mode-tablet #customerFieldsRoot .field label,
body.mode-tablet .customer-consent-agree-row,
body.mode-tablet .followup-question {
  font-size: 22px;
}
body.mode-tablet #customerFieldsRoot input,
body.mode-tablet #customerFieldsRoot select,
body.mode-tablet #customerMemo,
body.mode-tablet .customer-actions button,
body.mode-tablet .yn-toggle button {
  min-height: 64px;
  font-size: 22px;
  border-radius: 16px;
}
body.mode-tablet .customer-main .section-card h3,
body.mode-tablet .customer-result-card h2 {
  font-size: 26px;
}

body.mode-mobile .order-form-hero,
body.mode-mobile .customer-hero {
  flex-direction: column;
  align-items: stretch;
  border-radius: 22px;
  padding: 16px;
}
body.mode-mobile .order-form-hero .logo,
body.mode-mobile .customer-hero .logo {
  align-self: flex-end;
  max-width: 210px;
  max-height: 66px;
}
body.mode-mobile .order-hero-category-tabs {
  grid-template-columns: 1fr;
  gap: 8px;
}
body.mode-mobile .order-hero-category-tab {
  min-height: 62px;
}

/* 2026-07 주문서/고객체크 태블릿 세로 UI 2차 정리
   - 주문 종류 선택은 최상단 1곳만 사용
   - 주문서 헤더: 제목/로고 줄과 카테고리 선택 줄 분리
   - 일반사항/고객정보는 PC·태블릿 모두 한 줄 여러 항목 그리드 유지 */
.order-form-hero {
  display: block;
}
.order-form-hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.order-form-hero-title-row .logo {
  flex: 0 0 auto;
}
.order-hero-category-tabs {
  max-width: none;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
#orderCategoryPriceRoot .order-price-tabs {
  display: none !important;
}
#sectionsRoot .order-fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}
#sectionsRoot .field-address,
#sectionsRoot .field-delivery_other,
#sectionsRoot .field-visit_route_other {
  grid-column: 1 / -1;
}
#sectionsRoot .field-phone {
  grid-column: span 2;
}
#sectionsRoot .field-price input {
  font-weight: 900;
  color: #1d4ed8;
}
#customerFieldsRoot.fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}
#customerFieldsRoot .customer-field-address,
#customerFieldsRoot .customer-field-visit_route_other {
  grid-column: 1 / -1;
}
#customerFieldsRoot .customer-field-phone {
  grid-column: span 2;
}

body.mode-tablet .order-form-hero {
  display: block;
  align-items: stretch;
}
body.mode-tablet .order-form-hero-title-row,
body.mode-tablet .customer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
body.mode-tablet .order-form-hero .logo,
body.mode-tablet .customer-hero .logo {
  max-width: 280px;
  max-height: 88px;
}
body.mode-tablet .order-hero-category-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
body.mode-tablet .order-hero-category-tab {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 18px;
}
body.mode-tablet .order-hero-category-tab strong {
  font-size: 22px;
}
body.mode-tablet .order-hero-category-en {
  font-size: 11.5px;
}

body.mode-tablet #sectionsRoot .fields-grid,
body.mode-tablet #customerFieldsRoot.fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px 12px;
}
body.mode-tablet #sectionsRoot .field,
body.mode-tablet #customerFieldsRoot .field {
  padding: 10px 12px;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  background: #f7f8fb;
}
body.mode-tablet #sectionsRoot .field label,
body.mode-tablet #customerFieldsRoot .field label {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  color: #253044;
}
body.mode-tablet #sectionsRoot input,
body.mode-tablet #sectionsRoot select,
body.mode-tablet #sectionsRoot textarea,
body.mode-tablet #customerFieldsRoot input,
body.mode-tablet #customerFieldsRoot select {
  min-height: 46px;
  font-size: 16px;
  border-radius: 12px;
  padding: 8px 10px;
}
body.mode-tablet #sectionsRoot .field-address,
body.mode-tablet #sectionsRoot .field-delivery_other,
body.mode-tablet #sectionsRoot .field-visit_route_other,
body.mode-tablet #customerFieldsRoot .customer-field-address,
body.mode-tablet #customerFieldsRoot .customer-field-visit_route_other {
  grid-column: 1 / -1 !important;
}
body.mode-tablet #sectionsRoot .field-phone,
body.mode-tablet #customerFieldsRoot .customer-field-phone {
  grid-column: span 2 !important;
}
body.mode-tablet #sectionsRoot .address-combo-row,
body.mode-tablet #customerFieldsRoot .address-combo-row {
  grid-template-columns: minmax(0, 1.45fr) auto minmax(0, .9fr) !important;
  gap: 8px;
}
body.mode-tablet #sectionsRoot .address-combo-row button,
body.mode-tablet #customerFieldsRoot .address-combo-row button {
  min-height: 46px;
  font-size: 15px;
  border-radius: 12px;
}
body.mode-tablet #sectionsRoot .section-card h3,
body.mode-tablet .customer-main .section-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

body.mode-mobile .order-form-hero-title-row,
body.mode-mobile .customer-hero {
  flex-direction: column;
  align-items: stretch;
}
body.mode-mobile #sectionsRoot .fields-grid,
body.mode-mobile #customerFieldsRoot.fields-grid,
body.mode-mobile .order-hero-category-tabs {
  grid-template-columns: 1fr !important;
}
body.mode-mobile #sectionsRoot .field-phone,
body.mode-mobile #customerFieldsRoot .customer-field-phone {
  grid-column: 1 / -1 !important;
}
body.mode-mobile #sectionsRoot .address-combo-row,
body.mode-mobile #customerFieldsRoot .address-combo-row {
  grid-template-columns: 1fr !important;
}

/* 2026-07 주문서/고객체크/작업현황 보정
   - 주문서 카테고리는 제목/로고 다음 줄에 독립 배치
   - 주문 항목 수량은 항목 옆의 작은 칸으로 표시
   - 일일작업현황 저장바는 입력폼 상단에도 고정 */
.order-form-hero {
  display: block !important;
}
.order-form-hero-title-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.order-hero-category-tabs {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #dbe6f5;
  border-radius: 20px;
  background: #f5f7fb;
  clear: both;
}
.order-hero-category-tab {
  min-width: 0;
}
.order-price-qty-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.order-price-qty-label {
  font-size: 12px;
  font-weight: 900;
  color: #475569;
  white-space: nowrap;
}
.order-price-qty {
  max-width: 54px;
  min-width: 0;
  justify-self: stretch;
}
.daily-savebar-top {
  margin: 0 0 14px;
  top: 64px;
  border: 1px solid #dbe6f5;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.daily-savebar-top .status {
  font-weight: 800;
  color: #475569;
}
body.mode-tablet .order-form-hero-title-row,
body.mode-mobile .order-form-hero-title-row {
  display: flex !important;
}
body.mode-tablet .order-hero-category-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  margin-top: 18px !important;
}
body.mode-tablet .order-price-qty-wrap {
  grid-template-columns: 74px minmax(0, 1fr);
  padding: 10px 12px;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  background: #f8fafc;
}
body.mode-tablet .order-price-qty-label {
  font-size: 20px;
}
body.mode-tablet .order-price-qty {
  max-width: 96px;
  font-size: 22px;
}
body.mode-mobile .order-form-hero-title-row {
  flex-direction: column;
  align-items: stretch;
}
body.mode-mobile .order-hero-category-tabs {
  grid-template-columns: 1fr !important;
}
body.mode-mobile .order-price-qty-wrap {
  grid-template-columns: 64px minmax(0, 1fr);
}

/* 2026-07 주문서 수량 입력/일일작업현황 요약폭 보정
   - PC에서 수량 숫자가 스피너에 가려지지 않도록 폭을 넓힘
   - 태블릿에서도 +/− 버튼으로 수량 조정 가능하게 표시
   - 수량 직접입력 시 기존 1을 전체선택하여 바로 교체 가능
   - 선택조건 업무요약 표가 태블릿에서 혼자 길게 튀어나오지 않게 고정폭 제거 */
.order-price-line {
  grid-template-columns: 88px minmax(260px, 1fr) 132px 74px 118px 62px !important;
}
.order-price-qty-wrap {
  display: grid !important;
  grid-template-columns: 36px minmax(92px, 1fr) !important;
  gap: 6px;
  align-items: center;
  min-width: 124px;
}
.order-price-qty-control {
  display: grid;
  grid-template-columns: 32px minmax(54px, 1fr) 32px;
  align-items: center;
  gap: 4px;
  min-width: 94px;
}
.order-price-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.order-price-qty-btn:hover {
  background: #eaf2ff;
  border-color: #93c5fd;
}
.order-price-qty {
  width: 100% !important;
  min-width: 54px !important;
  max-width: none !important;
  box-sizing: border-box;
  text-align: center;
  font-weight: 900;
  color: #0f172a;
}
body.mode-tablet .order-price-line {
  grid-template-columns: 1fr !important;
}
body.mode-tablet .order-price-qty-wrap {
  grid-template-columns: 74px minmax(0, 1fr) !important;
  min-width: 0;
}
body.mode-tablet .order-price-qty-control {
  grid-template-columns: 58px minmax(96px, 1fr) 58px;
  gap: 8px;
  width: 100%;
}
body.mode-tablet .order-price-qty-btn {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  border-radius: 16px;
  font-size: 30px;
}
body.mode-tablet .order-price-qty {
  min-height: 58px;
  min-width: 96px !important;
  font-size: 24px !important;
  border-radius: 16px;
}
body.mode-mobile .order-price-qty-wrap {
  grid-template-columns: 64px minmax(0, 1fr) !important;
  min-width: 0;
}
body.mode-mobile .order-price-qty-control {
  grid-template-columns: 48px minmax(78px, 1fr) 48px;
  gap: 6px;
}
body.mode-mobile .order-price-qty-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 14px;
  font-size: 26px;
}
body.mode-tablet .daily-selected-summary-wrap,
body.mode-mobile .daily-selected-summary-wrap {
  overflow-x: hidden !important;
}
body.mode-tablet .daily-selected-summary-table,
body.mode-mobile .daily-selected-summary-table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}
body.mode-tablet .daily-selected-summary-table th,
body.mode-tablet .daily-selected-summary-table td,
body.mode-mobile .daily-selected-summary-table th,
body.mode-mobile .daily-selected-summary-table td {
  width: auto !important;
  padding: 6px 5px !important;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal !important;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.mode-tablet .daily-selected-summary-table .muted.small,
body.mode-mobile .daily-selected-summary-table .muted.small {
  font-size: 10.5px;
  line-height: 1.2;
}

/* 2026-07 고객용 체크 태블릿 입력 보정
   - 새주문서와 비슷하게 선택 입력칸이 잘 보이도록 폭/여백 정리
   - 발사이즈/신발사이즈/방문경로 선택칸이 태블릿에서 잘리지 않도록 보정
   - 방문경로 직접입력 칸은 표시될 때 한 줄 전체를 사용 */
body.mode-tablet #customerFieldsRoot.fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start;
}
body.mode-tablet #customerFieldsRoot .field {
  min-width: 0 !important;
  box-sizing: border-box;
}
body.mode-tablet #customerFieldsRoot .customer-field-foot_size select,
body.mode-tablet #customerFieldsRoot .customer-field-shoe_size_label select,
body.mode-tablet #customerFieldsRoot .customer-field-visit_route select,
body.mode-tablet #customerFieldsRoot .customer-field-gender select {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  padding-right: 36px !important;
  font-weight: 850;
  color: #0f172a;
}
body.mode-tablet #customerFieldsRoot .customer-field-foot_size,
body.mode-tablet #customerFieldsRoot .customer-field-shoe_size_label {
  background: #f8fafc;
}
body.mode-tablet #customerFieldsRoot .customer-field-visit_route_other:not(.hidden) {
  display: block !important;
  grid-column: 1 / -1 !important;
}
body.mode-tablet #customerFieldsRoot .customer-field-visit_route_other input {
  width: 100% !important;
}
body.mode-mobile #customerFieldsRoot .customer-field-visit_route_other:not(.hidden) {
  display: block !important;
}
body.mode-mobile #customerFieldsRoot .customer-field-foot_size select,
body.mode-mobile #customerFieldsRoot .customer-field-shoe_size_label select,
body.mode-mobile #customerFieldsRoot .customer-field-visit_route select,
body.mode-mobile #customerFieldsRoot .customer-field-gender select {
  width: 100% !important;
  min-width: 0 !important;
  padding-right: 34px !important;
  font-weight: 850;
}


/* 2026-07 주문항목/금액 PC 시각화 개선
   - PC에서 항목 제목을 한 줄 위로 빼서 단가표/항목/수량/A/S/금액이 씹히지 않게 함
   - 태블릿/모바일 기존 세로 카드형 레이아웃은 유지 */
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-line {
  grid-template-columns: minmax(120px, 150px) minmax(360px, 1fr) minmax(148px, 176px) 84px minmax(120px, 150px) 86px !important;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-line-no {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 0 8px;
  margin-bottom: 2px;
  border-bottom: 1px dashed #dbe6f5;
  color: #0f3b82;
  font-size: 15px;
  font-weight: 900;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-line-no::after {
  content: '단가표 항목 선택';
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-source-badge {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-item-select {
  min-height: 38px;
  font-size: 14px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-qty-wrap {
  min-width: 148px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-qty-control {
  grid-template-columns: 34px minmax(62px, 1fr) 34px;
  min-width: 136px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-qty {
  min-width: 62px !important;
  height: 34px;
  padding: 4px 6px;
  line-height: 1.2;
  font-size: 15px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-as-check {
  min-height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-value {
  font-size: 15px;
}
body:not(.mode-tablet):not(.mode-mobile) #orderCategoryPriceRoot .order-price-line .button.danger {
  min-width: 74px;
}

/* 2026-07 고객용 체크 일반사항/고객기본정보 배치 정리 */
.customer-fields-root.fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}
.customer-fields-root .field {
  min-width: 0;
}
.customer-fields-root .field input,
.customer-fields-root .field select,
.customer-fields-root .field textarea {
  width: 100%;
  min-width: 0;
}
.customer-basic-fields .customer-field-address,
.customer-basic-fields .customer-field-visit_route_other {
  grid-column: 1 / -1;
}
.customer-basic-fields .customer-field-phone {
  grid-column: span 2;
}
.customer-basic-fields .address-combo-row {
  grid-template-columns: minmax(260px, 1.3fr) auto minmax(220px, 1fr);
}

body.mode-tablet .customer-fields-root.fields-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px 14px;
}
body.mode-tablet .customer-fields-root .field {
  padding: 14px;
  border: 1px solid #d8e1ee;
  border-radius: 18px;
  background: #f3f4f6;
}
body.mode-tablet .customer-fields-root .field label {
  font-size: 20px;
  font-weight: 900;
  color: #1f2937;
}
body.mode-tablet .customer-fields-root input,
body.mode-tablet .customer-fields-root select,
body.mode-tablet .customer-fields-root textarea {
  min-height: 58px;
  font-size: 20px;
  border-radius: 15px;
  padding: 10px 14px;
}
body.mode-tablet .customer-basic-fields .customer-field-address,
body.mode-tablet .customer-basic-fields .customer-field-visit_route_other {
  grid-column: 1 / -1;
}
body.mode-tablet .customer-basic-fields .customer-field-phone {
  grid-column: span 2;
}
body.mode-tablet .customer-basic-fields .address-combo-row {
  grid-template-columns: minmax(0, 1.3fr) auto minmax(0, .9fr);
  gap: 10px;
}
body.mode-tablet .customer-basic-fields .address-combo-row button {
  min-height: 58px;
  font-size: 19px;
  font-weight: 800;
}

body.mode-mobile .customer-fields-root.fields-grid {
  grid-template-columns: 1fr !important;
}
body.mode-mobile .customer-basic-fields .customer-field-phone {
  grid-column: 1 / -1;
}
body.mode-mobile .customer-basic-fields .address-combo-row {
  grid-template-columns: 1fr;
}
@media (max-width: 760px) {
  .customer-fields-root.fields-grid {
    grid-template-columns: 1fr !important;
  }
  .customer-basic-fields .customer-field-phone {
    grid-column: 1 / -1;
  }
  .customer-basic-fields .address-combo-row {
    grid-template-columns: 1fr;
  }
}

/* 재고관리 엑셀 불러오기 카드 */
.inventory-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.inventory-import-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d8e4f5;
  border-radius: 18px;
  background: #f8fbff;
}
.inventory-import-card h3 {
  margin: 0;
  font-size: 16px;
  color: #10254d;
}
.inventory-import-card input[type="file"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d5deed;
  border-radius: 12px;
  background: #fff;
}
.inventory-import-card button {
  margin-top: auto;
}
@media (max-width: 760px) {
  .inventory-import-grid { grid-template-columns: 1fr; }
}

/* 재고관리: 번호/물품검색/상태클릭 빠른입력 개선 */
.inventory-count-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  vertical-align: middle;
}
.inventory-table .inv-col-no { width: 4.5%; }
.inventory-table .inv-col-status { width: 7.5%; }
.inventory-table .inv-col-code { width: 10%; }
.inventory-table .inv-col-detail { width: 22.5%; }
.inventory-table .inv-col-category { width: 12%; }
.inventory-table .inv-col-qty { width: 5.7%; }
.inventory-table .inv-col-manage { width: 9%; }
.inventory-no-cell {
  color: #475569 !important;
  font-weight: 900 !important;
}
.inventory-status-action {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}
.inventory-status-action:hover .inventory-badge {
  transform: translateY(-1px);
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.16), inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.inventory-status-action:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.inventory-table td:nth-child(12) {
  white-space: nowrap !important;
  min-width: 0 !important;
}
.inventory-table td:nth-child(3),
.inventory-table td:nth-child(4),
.inventory-table td:nth-child(5) {
  min-width: 0 !important;
  white-space: nowrap !important;
}
.inventory-table tbody td:nth-child(1),
.inventory-table tbody td:nth-child(2),
.inventory-table tbody td:nth-child(3),
.inventory-table tbody td:nth-child(4),
.inventory-table tbody td:nth-child(5) {
  background-color: #f8fbff !important;
}
.inventory-table tbody td:nth-child(6),
.inventory-table tbody td:nth-child(7),
.inventory-table tbody td:nth-child(8),
.inventory-table tbody td:nth-child(9),
.inventory-table tbody td:nth-child(10),
.inventory-table tbody td:nth-child(11) {
  background-color: #ffffff !important;
  text-align: center !important;
  font-weight: 800;
}
.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) {
  border-left: 2px solid #c5d3e6 !important;
}
.inventory-table th:nth-child(12),
.inventory-table td:nth-child(12) {
  border-left: 2px solid #d7dee9 !important;
}
.inventory-table tbody td:nth-child(6) { color: #0f172a !important; }
.inventory-table tbody td:nth-child(7) { color: #92400e !important; }
.inventory-table tbody td:nth-child(8) { color: #14532d !important; background-color: #f0fdf4 !important; }
.inventory-table tbody td:nth-child(9) { color: #475569 !important; }
.inventory-table tbody td:nth-child(10) { color: #166534 !important; }
.inventory-table tbody td:nth-child(11) { color: #991b1b !important; background-color: #fff7f7 !important; }
.inventory-table tbody tr.inventory-low-row td {
  background-color: #fff1f2 !important;
}
.inventory-table tbody tr.inventory-low-row td:nth-child(8) {
  background-color: #ffe4e6 !important;
  color: #b91c1c !important;
}
.inventory-picker-field {
  position: relative;
}
.inventory-item-picker {
  position: relative;
  width: 100%;
}
.inventory-picker-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  background: #fff;
}
.inventory-picker-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}
.inventory-picker-helper {
  margin-top: 5px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}
.inventory-picker-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.inventory-picker-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 28px);
  z-index: 80;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
  padding: 6px;
}
.inventory-item-picker.is-open .inventory-picker-list {
  display: grid;
  gap: 4px;
}
.inventory-picker-count {
  position: sticky;
  top: -6px;
  z-index: 2;
  padding: 7px 8px;
  margin: -6px -6px 4px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 900;
  border-bottom: 1px solid #c7d2fe;
}
.inventory-picker-option {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: #f8fafc;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}
.inventory-picker-option[hidden],
.inventory-picker-option.is-filtered-out {
  display: none !important;
}
.inventory-picker-option:hover,
.inventory-picker-option:focus-visible,
.inventory-picker-option.is-active {
  background: #eaf2ff;
  outline: 2px solid rgba(37, 99, 235, 0.22);
}
.inventory-picker-no {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 34px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 0.78rem;
}
.inventory-picker-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
}
.inventory-picker-sub {
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
}
.inventory-item-picker.has-no-match .inventory-picker-list::after {
  content: "검색 결과가 없습니다.";
  display: block;
  padding: 12px;
  color: #64748b;
  text-align: center;
}
@media (max-width: 900px) {
  .inventory-picker-list {
    position: static;
    margin-top: 8px;
    max-height: 420px;
  }
  .inventory-item-picker.is-open .inventory-picker-list {
    display: grid;
  }
  .inventory-picker-option {
    grid-template-columns: 46px minmax(0, 1fr);
    min-height: 48px;
    font-size: 1rem;
  }
  .inventory-picker-no {
    font-size: 0.92rem;
  }
  .inventory-picker-sub {
    grid-column: 2;
  }
}


@media (max-width: 760px) {
  .daily-title-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .daily-title-tool-btn {
    flex: 1 1 160px;
  }
  .daily-inventory-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* 재고관리: 선택 삭제/복구 모드 */
.inventory-section-title-row,
.inventory-history-head {
  align-items: flex-start;
}
.inventory-bulk-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.inventory-bulk-form {
  margin: 0;
}
.inventory-bulk-selected-bar {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 0 10px;
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #dbe4ef;
}
.inventory-bulk-form.is-selecting .inventory-bulk-selected-bar {
  display: flex;
}
.inventory-bulk-form:not(.is-selecting) .inventory-select-cell,
.inventory-bulk-form:not(.is-selecting) .inventory-select-col {
  display: none !important;
}
.inventory-select-cell {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  text-align: center !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  background: #f8fbff !important;
}
.inventory-select-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.danger-soft {
  background: #fff1f2 !important;
  color: #be123c !important;
  border-color: #fecdd3 !important;
}
.danger-soft:hover {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
}
.inventory-bulk-form.is-selecting tbody tr:has(.inventory-select-cell input:checked) td {
  background-color: #eff6ff !important;
}
.inventory-bulk-form.is-selecting tbody tr:hover td {
  background-color: #e0f2fe !important;
}

/* 선택 컬럼 추가 후 재고현황 컬럼 색상/경계 재정렬 */
.inventory-table .inv-col-select { width: 3.8%; }
.inventory-table .inv-col-no { width: 4.2%; }
.inventory-table .inv-col-status { width: 7%; }
.inventory-table .inv-col-code { width: 9.5%; }
.inventory-table .inv-col-detail { width: 21%; }
.inventory-table .inv-col-category { width: 11.5%; }
.inventory-table .inv-col-manage { width: 7.5%; }
.inventory-table td:nth-child(13),
.inventory-table th:nth-child(13) {
  white-space: nowrap !important;
  min-width: 0 !important;
  border-left: 2px solid #d7dee9 !important;
}
.inventory-table td:nth-child(4),
.inventory-table td:nth-child(5),
.inventory-table td:nth-child(6) {
  min-width: 0 !important;
  white-space: nowrap !important;
}
.inventory-table tbody td:nth-child(2),
.inventory-table tbody td:nth-child(3),
.inventory-table tbody td:nth-child(4),
.inventory-table tbody td:nth-child(5),
.inventory-table tbody td:nth-child(6) {
  background-color: #f8fbff !important;
}
.inventory-table tbody td:nth-child(7),
.inventory-table tbody td:nth-child(8),
.inventory-table tbody td:nth-child(9),
.inventory-table tbody td:nth-child(10),
.inventory-table tbody td:nth-child(11),
.inventory-table tbody td:nth-child(12) {
  background-color: #ffffff !important;
  text-align: center !important;
  font-weight: 800;
}
.inventory-table th:nth-child(7),
.inventory-table td:nth-child(7) {
  border-left: 2px solid #c5d3e6 !important;
}
.inventory-table tbody td:nth-child(7) { color: #0f172a !important; }
.inventory-table tbody td:nth-child(8) { color: #92400e !important; }
.inventory-table tbody td:nth-child(9) { color: #14532d !important; background-color: #f0fdf4 !important; }
.inventory-table tbody td:nth-child(10) { color: #475569 !important; }
.inventory-table tbody td:nth-child(11) { color: #166534 !important; }
.inventory-table tbody td:nth-child(12) { color: #991b1b !important; background-color: #fff7f7 !important; }
.inventory-table tbody tr.inventory-low-row td:nth-child(9) {
  background-color: #ffe4e6 !important;
  color: #b91c1c !important;
}

/* 선택 컬럼 추가 후 재고 변동내역 컬럼 색상/경계 재정렬 */
.inventory-history-table .hist-col-select { width: 3.5%; }
.inventory-history-table tbody td:nth-child(2),
.inventory-history-table tbody td:nth-child(3),
.inventory-history-table tbody td:nth-child(4) {
  background-color: #f8fbff !important;
}
.inventory-history-table tbody td:nth-child(5) {
  text-align: center !important;
  font-weight: 900;
  background-color: #ffffff !important;
}
.inventory-history-table tbody td:nth-child(6),
.inventory-history-table tbody td:nth-child(7),
.inventory-history-table tbody td:nth-child(8),
.inventory-history-table tbody td:nth-child(9),
.inventory-history-table tbody td:nth-child(10) {
  background-color: #ffffff !important;
}
.inventory-history-table th:nth-child(5),
.inventory-history-table td:nth-child(5) {
  border-left: 2px solid #c5d3e6 !important;
}
.inventory-history-table th:nth-child(11),
.inventory-history-table td:nth-child(11) {
  border-left: 2px solid #d7dee9 !important;
}
.inventory-history-table tbody tr.inventory-move-폐기 td:nth-child(5),
.inventory-history-table tbody tr.inventory-move-discard td:nth-child(5) {
  background-color: #fff1f2 !important;
  color: #b91c1c !important;
}
.inventory-history-table tbody tr.inventory-move-출고 td:nth-child(5) {
  background-color: #f0fdf4 !important;
  color: #166534 !important;
}
.inventory-history-table tbody tr.inventory-move-작업중 td:nth-child(5) {
  background-color: #fffbeb !important;
  color: #92400e !important;
}

@media (max-width: 900px) {
  .inventory-section-title-row,
  .inventory-history-head {
    flex-direction: column;
    align-items: stretch;
  }
  .inventory-bulk-toolbar,
  .inventory-bulk-selected-bar {
    justify-content: flex-start;
  }
}

/* 예약·일정 월간 달력 */
.schedule-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 18px 22px;
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}
.schedule-hero-eyebrow,
.schedule-today-eyebrow,
.schedule-modal-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}
.schedule-hero h1 { margin: 0 0 6px; font-size: 29px; }
.schedule-hero p { margin: 0; color: #64748b; font-size: 14px; }
.schedule-add-today { min-width: 142px; }
.schedule-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  background: #fff;
}
.schedule-month-nav { display: flex; align-items: center; gap: 7px; }
.schedule-nav-button { min-width: 40px; font-size: 22px; line-height: 1; }
.schedule-month-title { font-size: 23px; text-align: center; }
.schedule-legend { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.schedule-legend-item {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid transparent;
}
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 12px;
  align-items: start;
}
.schedule-calendar-card,
.schedule-today-card,
.schedule-due-card {
  border: 1px solid #d8e1ed;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(15, 23, 42, .045);
}
.schedule-calendar-card { overflow: hidden; }
.schedule-calendar-scroll { overflow: auto; }
.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
}
.schedule-weekday {
  padding: 11px 6px;
  border-right: 1px solid #dfe5ed;
  border-bottom: 1px solid #d7dee8;
  background: #f5f7fa;
  text-align: center;
  font-weight: 900;
  color: #334155;
}
.schedule-weekday.weekday-0 { color: #dc2626; }
.schedule-weekday.weekday-6 { color: #2563eb; }
.schedule-day {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 7px;
  border-right: 1px solid #e1e6ed;
  border-bottom: 1px solid #e1e6ed;
  background: #fff;
  cursor: pointer;
  transition: background .14s ease, box-shadow .14s ease;
}
.schedule-day:hover,
.schedule-day:focus-visible {
  background: #f8fbff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .18);
  outline: none;
}
.schedule-day.is-other-month { background: #fafafa; color: #a3a3a3; }
.schedule-day.is-today {
  background: #eef7ff;
  box-shadow: inset 0 0 0 1.5px #60a5fa;
}
.schedule-day-head { display: flex; align-items: center; min-height: 24px; gap: 5px; }
.schedule-day-number { font-size: 13px; font-weight: 900; }
.schedule-day.weekday-0 .schedule-day-number { color: #ef4444; }
.schedule-day.weekday-6 .schedule-day-number { color: #2563eb; }
.schedule-day.is-other-month .schedule-day-number { color: #b8bec7; }
.today-label {
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 900;
}
.schedule-day-add {
  margin-left: auto;
  width: 23px;
  min-width: 23px;
  height: 23px;
  min-height: 23px;
  padding: 0;
  border-radius: 999px;
  color: #2563eb;
  opacity: .35;
}
.schedule-day:hover .schedule-day-add,
.schedule-day:focus-within .schedule-day-add { opacity: 1; }
.schedule-day-events { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; min-width: 0; }
.schedule-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  width: 100%;
  min-height: 24px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  justify-content: start;
  text-align: left;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
}
.schedule-event:hover { filter: brightness(.97); }
.schedule-event-time { font-weight: 900; white-space: nowrap; }
.schedule-event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.type-customer { background: #e8f3ff; border-color: #b9dcff; color: #145da0; }
.type-leave { background: #fff4dc; border-color: #f5d89a; color: #8a5700; }
.type-other { background: #f1f3f6; border-color: #d9dee6; color: #475569; }
.schedule-more { padding: 2px 4px; color: #64748b; font-size: 10px; font-weight: 800; }
.schedule-today-panel { display: flex; flex-direction: column; gap: 12px; }
.schedule-today-card,
.schedule-due-card { padding: 14px; }
.schedule-today-heading,
.schedule-due-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.schedule-today-heading h2,
.schedule-due-heading h2 { margin: 0; font-size: 18px; }
.schedule-today-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 43px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 900;
}
.schedule-today-list { display: flex; flex-direction: column; gap: 7px; }
.schedule-today-event {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  justify-content: stretch;
}
.schedule-today-event-time { font-weight: 900; }
.schedule-today-event-body { display: flex; flex-direction: column; min-width: 0; }
.schedule-today-event-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-today-event-body small { margin-top: 3px; opacity: .75; }
.schedule-empty { padding: 22px 10px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; text-align: center; }
.schedule-due-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.schedule-due-stat {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe4ee;
  border-radius: 11px;
}
.schedule-due-stat span { grid-column: 1 / -1; font-size: 11px; font-weight: 800; color: #64748b; }
.schedule-due-stat b { font-size: 27px; line-height: 1; }
.schedule-due-stat small { color: #64748b; }
.schedule-due-stat.is-today { background: #eef7ff; border-color: #b9dcff; }
.schedule-due-stat.is-today b { color: #1d4ed8; }
.schedule-due-stat.is-overdue { background: #fff3f3; border-color: #fecaca; }
.schedule-due-stat.is-overdue b { color: #dc2626; }
.schedule-category-summary h3 { margin: 0 0 7px; font-size: 12px; color: #475569; }
.schedule-category-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.schedule-category-chips span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
}
.schedule-category-chips span b { color: #1d4ed8; }
.schedule-category-chips .is-empty { color: #94a3b8; }
.schedule-category-chips.overdue-chips span { background: #fff1f2; color: #9f1239; }
.schedule-category-chips.overdue-chips span b { color: #dc2626; }
.schedule-due-items { display: flex; flex-direction: column; gap: 5px; }
.schedule-due-item {
  display: flex;
  flex-direction: column;
  padding: 7px 8px;
  border-left: 3px solid #60a5fa;
  background: #f8fafc;
  border-radius: 5px;
  font-size: 11px;
}
.schedule-due-item.is-overdue { border-left-color: #ef4444; background: #fff7f7; }
.schedule-due-item span,
.schedule-due-item small { margin-top: 2px; color: #64748b; }
.schedule-more-line { color: #64748b; font-size: 11px; text-align: center; padding-top: 4px; }
.schedule-overdue-details { margin-top: 12px; border-top: 1px solid #e2e8f0; padding-top: 10px; }
.schedule-overdue-details summary { cursor: pointer; color: #b91c1c; font-weight: 900; font-size: 12px; margin-bottom: 8px; }
.schedule-modal[hidden] { display: none !important; }
.schedule-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.schedule-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .52); }
.schedule-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #d6deea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.schedule-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.schedule-modal-head h2 { margin: 0; font-size: 22px; }
.schedule-modal-close { width: 38px; min-width: 38px; height: 38px; padding: 0; font-size: 24px; }
.schedule-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 12px; }
.schedule-title-field,
.schedule-phone-field,
.schedule-memo-field { grid-column: 1 / -1; }
.schedule-form .field span { font-size: 13px; font-weight: 800; }
.schedule-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.schedule-delete-form { margin-top: -36px; width: max-content; }
body.schedule-modal-open { overflow: hidden; }

@media (max-width: 1180px) {
  .schedule-layout { grid-template-columns: 1fr; }
  .schedule-today-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .schedule-day { min-height: 118px; }
}
@media (max-width: 900px) {
  .schedule-hero { padding: 15px 17px; }
  .schedule-toolbar { grid-template-columns: auto 1fr; }
  .schedule-month-title { grid-column: 2; grid-row: 1; }
  .schedule-legend { grid-column: 1 / -1; justify-content: center; }
  .schedule-calendar { font-size: 12px; }
  .schedule-day { min-height: 108px; padding: 5px; }
  .schedule-event { padding: 4px; font-size: 10px; }
  .schedule-event-time { display: none; }
  .schedule-today-panel { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .schedule-hero { align-items: stretch; flex-direction: column; }
  .schedule-add-today { width: 100%; }
  .schedule-toolbar { grid-template-columns: 1fr; }
  .schedule-month-nav,
  .schedule-month-title,
  .schedule-legend { grid-column: 1; justify-content: center; }
  .schedule-month-title { grid-row: auto; }
  .schedule-calendar { min-width: 760px; }
  .schedule-form-grid { grid-template-columns: 1fr; }
  .schedule-title-field,
  .schedule-phone-field,
  .schedule-memo-field { grid-column: auto; }
  .schedule-delete-form { margin-top: 10px; width: 100%; }
  .schedule-delete-form button { width: 100%; }
}

/* 예약·일정 기간/종일 일정 확장 */
.schedule-event.is-period {
  border-radius: 0;
  margin-left: -8px;
  margin-right: -8px;
  width: calc(100% + 16px);
  padding-left: 8px;
  padding-right: 8px;
}
.schedule-event.is-period.is-period-start {
  margin-left: 0;
  width: calc(100% + 8px);
  border-radius: 7px 0 0 7px;
}
.schedule-event.is-period.is-period-end {
  margin-right: 0;
  width: calc(100% + 8px);
  border-radius: 0 7px 7px 0;
}
.schedule-event.is-period.is-period-start.is-period-end {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 7px;
}
.schedule-event.is-all-day {
  box-shadow: inset 3px 0 0 currentColor;
}
.schedule-event-continuation {
  display: block;
  grid-column: 1 / -1;
  min-height: 13px;
}
.schedule-today-event-period {
  color: #475569;
  font-size: 10px;
}
.schedule-time-field {
  transition: opacity .15s ease, filter .15s ease;
}
.schedule-time-field.is-disabled {
  opacity: .48;
  filter: grayscale(.15);
}
.schedule-all-day-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 11px;
  border: 1px solid #d7e0eb;
  border-radius: 11px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
}
.schedule-all-day-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.schedule-all-day-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .16s ease;
}
.schedule-all-day-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
  transition: transform .16s ease;
}
.schedule-all-day-toggle input:checked + .schedule-all-day-switch {
  background: #2563eb;
}
.schedule-all-day-toggle input:checked + .schedule-all-day-switch::after {
  transform: translateX(20px);
}
.schedule-all-day-toggle input:focus-visible + .schedule-all-day-switch {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}
.schedule-all-day-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.schedule-all-day-copy b {
  color: #1e293b;
  font-size: 13px;
}
.schedule-all-day-copy small {
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
}
@media (max-width: 900px) {
  .schedule-event.is-period {
    margin-left: -6px;
    margin-right: -6px;
    width: calc(100% + 12px);
    padding-left: 6px;
    padding-right: 6px;
  }
  .schedule-event.is-period.is-period-start,
  .schedule-event.is-period.is-period-end {
    width: calc(100% + 6px);
  }
  .schedule-event.is-period.is-period-start.is-period-end { width: 100%; }
}

/* 예약·일정 검색 및 일정 선택 보기 */
.schedule-search-card {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #d8e1ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(15, 23, 42, .035);
}
.schedule-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(120px, .7fr) minmax(135px, .8fr) minmax(145px, .8fr) minmax(145px, .8fr) auto;
  align-items: end;
  gap: 8px;
}
.schedule-search-form .field { min-width: 0; }
.schedule-search-keyword input { font-weight: 700; }
.schedule-search-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 1px;
}
.schedule-search-actions .button,
.schedule-search-actions button { white-space: nowrap; }
.schedule-search-results {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.schedule-search-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.schedule-search-result-head b { font-size: 14px; }
.schedule-search-result-head span { color: #64748b; font-size: 11px; font-weight: 800; }
.schedule-search-result-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding: 2px;
}
.schedule-search-result {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid currentColor;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.schedule-search-result:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px rgba(15, 23, 42, .10);
  filter: brightness(.985);
}
.schedule-search-result.is-selected {
  outline: 3px solid rgba(37, 99, 235, .28);
  box-shadow: 0 0 0 1px #2563eb, 0 7px 18px rgba(37, 99, 235, .16);
}
.schedule-search-result-date {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 900;
  opacity: .82;
}
.schedule-search-result strong {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.schedule-search-result small {
  margin-top: 3px;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  opacity: .78;
}
.schedule-event.is-selected,
.schedule-today-event.is-selected {
  position: relative;
  z-index: 3;
  outline: 3px solid rgba(37, 99, 235, .38);
  box-shadow: 0 0 0 1px #2563eb, 0 6px 14px rgba(37, 99, 235, .22);
  filter: saturate(1.12);
}
.schedule-selected-card {
  padding: 14px;
  border: 1px solid #93c5fd;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbff 0%, #eff6ff 100%);
  box-shadow: 0 7px 19px rgba(37, 99, 235, .10);
}
.schedule-selected-card[hidden] { display: none !important; }
.schedule-selected-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.schedule-selected-head h2 { margin: 0; font-size: 18px; }
.schedule-selected-clear {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  font-size: 21px;
  line-height: 1;
}
.schedule-selected-body { min-width: 0; }
.schedule-selected-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}
.schedule-selected-body h3 {
  margin: 9px 0 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.3;
  word-break: keep-all;
}
.schedule-selected-meta {
  display: grid;
  gap: 6px;
  margin: 0;
}
.schedule-selected-meta div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 7px;
}
.schedule-selected-meta dt { color: #64748b; font-size: 11px; font-weight: 900; }
.schedule-selected-meta dd { margin: 0; color: #334155; font-size: 12px; font-weight: 800; }
.schedule-selected-memo {
  margin: 11px 0 0;
  padding: 9px 10px;
  border: 1px dashed #bfdbfe;
  border-radius: 9px;
  background: rgba(255,255,255,.76);
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.schedule-selected-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

@media (max-width: 1350px) {
  .schedule-search-form {
    grid-template-columns: minmax(230px, 1.5fr) repeat(2, minmax(120px, .7fr)) repeat(2, minmax(135px, .8fr));
  }
  .schedule-search-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 900px) {
  .schedule-search-form { grid-template-columns: 1fr 1fr; }
  .schedule-search-keyword { grid-column: 1 / -1; }
  .schedule-search-actions { grid-column: 1 / -1; }
  .schedule-search-result-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .schedule-search-form { grid-template-columns: 1fr; }
  .schedule-search-keyword,
  .schedule-search-actions { grid-column: auto; }
  .schedule-search-actions > * { flex: 1; }
  .schedule-search-result-list { grid-template-columns: 1fr; max-height: 330px; }
}

/* 예약·일정 검색 접기 및 연/월 바로 이동 */
.schedule-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.schedule-search-toggle.is-active,
.schedule-jump-toggle.is-active {
  border-color: #2563eb;
  background: #eaf2ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .15);
}
.schedule-search-card[hidden],
.schedule-jump-panel[hidden] { display: none !important; }
.schedule-jump-wrap { position: relative; }
.schedule-jump-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: 286px;
  padding: 12px;
  border: 1px solid #cbd8e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}
.schedule-jump-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: end;
  gap: 7px;
  margin-bottom: 10px;
}
.schedule-jump-year-step {
  min-width: 38px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.schedule-jump-year-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}
.schedule-jump-year-label input {
  width: 100%;
  min-width: 0;
  height: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}
.schedule-jump-month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.schedule-jump-month {
  min-width: 0;
  min-height: 38px;
  padding: 7px 4px;
  border: 1px solid #d8e1ed;
  border-radius: 9px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.schedule-jump-month:hover,
.schedule-jump-month:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.schedule-jump-month.is-current {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
@media (max-width: 680px) {
  .schedule-hero-actions { width: 100%; }
  .schedule-hero-actions > * { flex: 1 1 0; }
  .schedule-jump-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(330px, calc(100vw - 30px));
    transform: translate(-50%, -50%);
    z-index: 2100;
  }
  .schedule-jump-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 재고현황 검색바 - 재고 변동내역과 같은 조합 검색 */
.inventory-status-search {
  margin-top: 8px !important;
}
.inventory-status-search input[name="inventory_keyword"],
.inventory-status-search input[name="inventory_exclude_keyword"] {
  min-width: 150px;
  max-width: 220px;
}
.inventory-count-badge.search-count {
  background: #e8f1ff;
  border-color: #b8d3ff;
  color: #1d5fae;
}
@media (max-width: 1180px) {
  .inventory-status-search input[name="inventory_keyword"],
  .inventory-status-search input[name="inventory_exclude_keyword"] {
    min-width: 0;
    max-width: none;
    flex: 1 1 180px;
  }
}

/* 예약·일정: 대한민국 공휴일 표시 */
.schedule-holiday-legend {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #dc2626;
}
.schedule-day.is-holiday:not(.is-today) {
  background-image: linear-gradient(180deg, rgba(254, 242, 242, .72), rgba(255, 255, 255, 0) 46px);
}
.schedule-day.is-holiday .schedule-day-number,
.schedule-day.is-holiday.weekday-6 .schedule-day-number {
  color: #dc2626;
}
.schedule-day.is-holiday.is-other-month .schedule-day-number {
  color: #f29a9a;
}
.schedule-holiday-name {
  min-width: 0;
  max-width: calc(100% - 62px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dc2626;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.schedule-day.is-other-month .schedule-holiday-name {
  color: #e7a0a0;
}
.schedule-day.is-today .schedule-holiday-name {
  color: #b91c1c;
}

@media (max-width: 900px) {
  .schedule-holiday-name {
    max-width: calc(100% - 50px);
    font-size: 8px;
  }
}

/* 관리모드: 일일작업현황 업무 카테고리 간편 관리 */
.daily-category-manager {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e3e9f1;
}
.daily-category-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.daily-category-manager-head h3 {
  margin: 0 0 4px;
}
.daily-core-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 14px;
}
.daily-core-category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  background: #f4f7fa;
  color: #526173;
  font-size: 12px;
  font-weight: 800;
}
.custom-category-list {
  display: grid;
  gap: 12px;
}
.custom-category-card,
.custom-category-new-card {
  padding: 14px;
  border: 1px solid #d7e1ed;
  border-radius: 13px;
  background: #fbfcfe;
}
.custom-category-new-card {
  margin-top: 14px;
  border-style: dashed;
  border-color: #9fc4f5;
  background: #f7fbff;
}
.custom-category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.custom-category-card-head strong {
  color: #20344d;
}
.custom-category-grid {
  grid-template-columns: minmax(180px, .75fr) minmax(260px, 1.5fr);
}
.custom-category-grid .daily-settings-textarea {
  min-height: 92px;
}
.custom-category-option,
.custom-category-delete-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #42556d;
  font-size: 12px;
  font-weight: 700;
}
.custom-category-delete-check {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #f3c4c4;
  border-radius: 8px;
  background: #fff7f7;
  color: #a33a3a;
}
.custom-category-move {
  min-width: 36px;
  padding-inline: 8px;
}
.custom-category-empty {
  padding: 13px;
  border: 1px dashed #d5deea;
  border-radius: 10px;
  text-align: center;
  background: #fafbfd;
}
@media (max-width: 820px) {
  .custom-category-grid {
    grid-template-columns: 1fr;
  }
  .custom-category-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .custom-category-card-head .button-row {
    width: 100%;
  }
}
.custom-category-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 8px;
}


/* DB 가격 표시·검색 합계 */
.money-cell {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.db-source-meta-col {
  color: #64748b;
  white-space: nowrap;
}
.db-price-summary {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d8e3f1;
  border-radius: 14px;
  background: #f8fbff;
}
.db-price-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.db-price-summary-head h2 {
  margin: 0 0 3px;
  font-size: 18px;
}
.db-price-summary-head p { margin: 0; }
.db-price-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.db-price-summary-card {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid #dbe4ef;
  border-radius: 11px;
  background: #fff;
}
.db-price-summary-card span,
.db-price-summary-card small { color: #64748b; }
.db-price-summary-card strong {
  font-size: 23px;
  line-height: 1.15;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.db-price-summary-card.is-final {
  border-color: #86b7f3;
  background: #edf6ff;
}
.db-summary-group + .db-summary-group {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #dbe4ef;
}
.db-summary-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #1e293b;
}
.db-summary-group h3 small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.db-summary-group > p {
  margin: -2px 0 9px;
}
.db-summary-count-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.db-summary-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid #f0c8c8;
  border-radius: 999px;
  background: #fff8f8;
  color: #7f1d1d;
}
.db-summary-count-chip.is-item {
  border-color: #cbdcf2;
  background: #f4f8ff;
  color: #173f73;
}
.db-summary-count-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}
.db-summary-count-chip strong {
  flex: 0 0 auto;
  padding-left: 8px;
  border-left: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.db-record-form input[readonly][data-db-column] {
  background: #eef4fb;
  color: #123a63;
  font-weight: 700;
  cursor: default;
}
@media (max-width: 720px) {
  .db-price-summary { padding: 13px; }
  .db-price-summary-grid { grid-template-columns: 1fr; }
}

/* 예약·일정 엑셀 다중 파일/폴더 불러오기 및 전화번호 */
.schedule-import-toggle.is-active {
  border-color: #0f766e;
  background: #e9fbf7;
  color: #0f766e;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .14);
}
.schedule-import-card[hidden] { display: none !important; }
.schedule-import-card {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid #cfe4df;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, #f5fffc 100%);
  box-shadow: 0 3px 12px rgba(15, 118, 110, .055);
}
.schedule-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.schedule-import-head h2 { margin: 2px 0 4px; color: #173f3a; font-size: 18px; }
.schedule-import-head p { margin: 0; color: #64748b; font-size: 12px; }
.schedule-import-format {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #b9dcd4;
  border-radius: 999px;
  background: #fff;
  color: #47706b;
  font-size: 11px;
  white-space: nowrap;
}
.schedule-import-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: stretch;
  gap: 9px;
}
.schedule-file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px dashed #7cc4b5;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.schedule-file-picker:hover,
.schedule-file-picker:focus-within {
  transform: translateY(-1px);
  border-color: #0f766e;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .10);
}
.schedule-file-picker.is-folder { border-color: #8bb8e8; }
.schedule-file-picker.is-folder:hover,
.schedule-file-picker.is-folder:focus-within { border-color: #2563eb; box-shadow: 0 6px 16px rgba(37, 99, 235, .10); }
.schedule-file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.schedule-file-picker-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e6f8f4;
  color: #0f766e;
  font-size: 21px;
  font-weight: 900;
}
.schedule-file-picker.is-folder .schedule-file-picker-icon { background: #eef6ff; color: #2563eb; }
.schedule-file-picker-copy { display: flex; flex-direction: column; min-width: 0; }
.schedule-file-picker-copy b { color: #1e293b; font-size: 13px; }
.schedule-file-picker-copy small { margin-top: 3px; color: #64748b; font-size: 10px; line-height: 1.35; }
.schedule-import-selection {
  grid-column: 1 / 3;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid #d8e2e9;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
}
.schedule-import-selection.has-files {
  border-color: #86d3c4;
  background: #ecfdf8;
  color: #0f766e;
  font-weight: 800;
}
.schedule-import-actions {
  grid-column: 3;
  grid-row: 2 / 4;
  display: flex;
  align-items: stretch;
}
.schedule-import-actions button { min-width: 170px; height: 100%; }
.schedule-import-map {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #dcebe7;
}
.schedule-import-map span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf7f5;
  color: #476b67;
  font-size: 10px;
}
.schedule-import-map b { color: #0f766e; }
.schedule-import-note {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.5;
}
.schedule-phone-field input { font-variant-numeric: tabular-nums; }

.schedule-import-year-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 150px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #f0c36b;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0 0%, #fffdf7 100%);
}
.schedule-import-step {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.schedule-import-year-copy { display: flex; flex-direction: column; min-width: 0; }
.schedule-import-year-copy b { color: #7a4c05; font-size: 14px; }
.schedule-import-year-copy em {
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #fef3c7;
  color: #b45309;
  font-size: 9px;
  font-style: normal;
}
.schedule-import-year-copy small { margin-top: 3px; color: #806a45; font-size: 10px; line-height: 1.4; }
.schedule-import-year-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8a94f;
  border-radius: 9px;
  background: #fff;
  color: #7a4c05;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}
.schedule-file-picker > .schedule-import-step {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  font-size: 9px;
  z-index: 1;
}
.schedule-import-actions .schedule-import-step {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  background: rgba(255,255,255,.24);
  vertical-align: middle;
}
.schedule-import-undo-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fff7f7;
}
.schedule-import-undo-box > div { display: flex; flex-direction: column; gap: 2px; }
.schedule-import-undo-box b { color: #991b1b; font-size: 12px; }
.schedule-import-undo-box span { color: #7f1d1d; font-size: 10px; line-height: 1.4; }
.schedule-import-preview {
  margin-top: 14px;
  padding: 13px;
  border: 2px solid #0f766e;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 118, 110, .08);
}
.schedule-import-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.schedule-import-preview-head h3 { margin: 2px 0 3px; color: #134e4a; font-size: 17px; }
.schedule-import-preview-head p { margin: 0; color: #64748b; font-size: 10px; }
.schedule-import-preview-safe {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 900;
}
.schedule-import-preview-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.schedule-import-preview-summary > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d9e8e5;
  border-radius: 9px;
  background: #f8fbfa;
}
.schedule-import-preview-summary span { display: block; color: #64748b; font-size: 9px; }
.schedule-import-preview-summary b { display: block; margin-top: 2px; color: #173f3a; font-size: 12px; overflow-wrap: anywhere; }
.schedule-import-preview-message {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 7px 0;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.45;
}
.schedule-import-preview-message b { flex-basis: 100%; }
.schedule-import-preview-message.is-warning { border: 1px solid #fde68a; background: #fffbeb; color: #92400e; }
.schedule-import-preview-message.is-error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.schedule-import-preview-files {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.45;
}
.schedule-import-preview-files b { flex: 0 0 auto; color: #334155; }
.schedule-import-preview-table-wrap {
  max-height: 390px;
  overflow: auto;
  border: 1px solid #d7e5e2;
  border-radius: 10px;
}
.schedule-import-preview-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 10px;
}
.schedule-import-preview-table th,
.schedule-import-preview-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #e5ecea;
  border-right: 1px solid #edf2f1;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.schedule-import-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e8f5f2;
  color: #134e4a;
  font-weight: 900;
}
.schedule-import-preview-table td small { display: block; margin-top: 2px; color: #94a3b8; }
.schedule-import-preview-table .schedule-import-preview-memo { max-width: 280px; white-space: pre-wrap; word-break: break-word; }
.schedule-import-preview-more { margin: 7px 0 0; color: #64748b; font-size: 10px; }
.schedule-import-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 11px;
}
.schedule-import-preview-actions form { margin: 0; }
.schedule-import-preview-actions button { min-width: 150px; }

@media (max-width: 980px) {
  .schedule-import-form { grid-template-columns: 1fr 1fr; }
  .schedule-import-selection { grid-column: 1 / -1; }
  .schedule-import-actions { grid-column: 1 / -1; grid-row: auto; }
  .schedule-import-actions button { width: 100%; min-height: 44px; }
  .schedule-import-preview-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .schedule-import-head { flex-direction: column; }
  .schedule-import-form { grid-template-columns: 1fr; }
  .schedule-import-selection,
  .schedule-import-actions { grid-column: 1; }
  .schedule-file-picker { min-height: 74px; }
  .schedule-import-year-field { grid-template-columns: auto 1fr; }
  .schedule-import-year-field select { grid-column: 1 / -1; }
  .schedule-import-preview-head,
  .schedule-import-undo-box { flex-direction: column; align-items: stretch; }
  .schedule-import-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-import-preview-actions { flex-direction: column; }
  .schedule-import-preview-actions button,
  .schedule-import-undo-box button { width: 100%; }
  .schedule-hero-actions > .schedule-import-toggle { flex-basis: 100%; }
}

/* 거래명세표 설정 */
.trade-statement-settings {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #dbe3ef;
}
.trade-statement-settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.trade-statement-address-field {
  grid-column: 1 / -1;
}
.trade-statement-address-field textarea {
  width: 100%;
  resize: vertical;
}
.trade-statement-stamp-setting {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px 20px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
}
.trade-statement-stamp-preview {
  display: grid;
  gap: 8px;
  justify-items: center;
  font-weight: 800;
  color: #334155;
}
.trade-statement-stamp-preview img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 6px;
}
.trade-statement-stamp-upload {
  display: grid;
  gap: 8px;
}
.trade-statement-stamp-upload small {
  color: #64748b;
}
.trade-statement-stamp-reset {
  grid-column: 2;
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #475569;
}
.trade-statement-stamp-reset input {
  width: auto;
}
@media (max-width: 900px) {
  .trade-statement-settings-grid { grid-template-columns: 1fr; }
  .trade-statement-address-field { grid-column: auto; }
  .trade-statement-stamp-setting { grid-template-columns: 1fr; }
  .trade-statement-stamp-reset { grid-column: auto; }
}

/* 일일작업현황 선택형 작업 사진 */
.daily-work-photo-manager {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #cfd8ee;
  border-radius: 14px;
  background: #f8faff;
}
.daily-work-photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.daily-work-photo-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.daily-work-photo-guide {
  margin: 8px 0 12px;
  line-height: 1.45;
}
.daily-work-photo-upload-grid {
  display: grid;
  /* 사진 영역은 일일작업 입력 패널 안의 좁은 폭을 기준으로 한 줄씩 배치 */
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.daily-work-photo-upload-grid > * {
  min-width: 0;
  max-width: 100%;
}
.daily-work-photo-upload-grid .field {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}
.daily-work-photo-upload-grid select,
.daily-work-photo-upload-grid input[type="text"],
.daily-work-photo-upload-grid input[type="file"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.daily-work-photo-file-field {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.daily-work-photo-file-field input[type="file"] {
  overflow: hidden;
  font-size: 12px;
}
.daily-work-photo-file-field input[type="file"]::file-selector-button {
  max-width: 105px;
  margin-right: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daily-work-photo-upload-button {
  width: 100%;
  min-height: 40px;
  white-space: nowrap;
}
.daily-work-photo-limit-text {
  margin-top: 7px;
}
.daily-work-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.daily-work-photo-card {
  overflow: hidden;
  border: 1px solid #d9dfec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(43, 59, 103, 0.06);
}
.daily-work-photo-card.is-primary {
  border-color: #4d67d9;
  box-shadow: 0 0 0 2px rgba(77, 103, 217, 0.12);
}
.daily-work-photo-link {
  position: relative;
  display: block;
  height: 145px;
  overflow: hidden;
  background: #edf1f8;
}
.daily-work-photo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.daily-work-photo-primary-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(50, 73, 166, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.daily-work-photo-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 86px;
  padding: 10px 11px 6px;
  font-size: 12px;
  color: #657089;
}
.daily-work-photo-meta strong {
  color: #18213a;
  font-size: 13px;
}
.daily-work-photo-meta p {
  margin: 4px 0 0;
  color: #26314b;
  line-height: 1.35;
  word-break: break-word;
}
.daily-work-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px 11px;
}
.daily-work-photo-actions .button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}
.daily-work-photo-empty {
  margin-top: 10px;
  padding: 15px;
  border: 1px dashed #d5dbea;
  border-radius: 10px;
  background: #fff;
  color: #7a8499;
  text-align: center;
}
.daily-work-photo-count {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid #d8dff0;
  border-radius: 999px;
  background: #f3f6ff;
  color: #3652b5;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.daily-work-photo-count:hover {
  background: #e8edff;
}

@media (max-width: 1100px) {
  .daily-work-photo-upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .daily-work-photo-upload-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .daily-work-photo-manager {
    padding: 12px;
  }
  .daily-work-photo-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .daily-work-photo-upload-grid {
    grid-template-columns: 1fr;
  }
  .daily-work-photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .daily-work-photo-link {
    height: 125px;
  }
}

@media (max-width: 430px) {
  .daily-work-photo-gallery {
    grid-template-columns: 1fr;
  }
}

/* 판매리스트/수선내역 DB 작업현황 등록 */
.db-work-register-card { margin-top: 14px; }
.db-work-register-table-wrap { width: 100%; overflow-x: auto; }
.db-work-register-table { min-width: 1180px; }
.db-work-register-table th,
.db-work-register-table td { padding: 6px 7px; vertical-align: middle; }
.db-work-register-table th:first-child,
.db-work-register-table td:first-child { width: 42px; text-align: center; }
.db-work-register-table th:nth-child(2),
.db-work-register-table td:nth-child(2) { width: 92px; text-align: center; }
.order-col-category { min-width: 112px; white-space: nowrap; }
.db-work-status-col { min-width: 92px; text-align: center; }

/* 판매리스트/수선내역 DB 표시항목 설정 */
.db-column-settings-panel {
  margin: 12px 0;
}
.db-column-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.db-column-settings-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
}
.db-column-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 7px 12px;
  max-height: 250px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}
.db-column-settings-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
}
.db-column-settings-grid input[type="checkbox"] {
  flex: 0 0 auto;
}
@media (max-width: 760px) {
  .db-column-settings-head { flex-direction: column; }
  .db-column-settings-grid { grid-template-columns: 1fr 1fr; }
}
.db-column-settings-panel[hidden],
[data-db-column][hidden] {
  display: none !important;
}

/* 재고 현황: 일일작업 연동 품목 우선 표시 + 기타 품목 기본 접기 */
.inventory-linked-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.inventory-count-badge.linked-count {
  background: #eaf3ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.inventory-secondary-details {
  margin-top: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}
.inventory-secondary-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #334155;
  user-select: none;
}
.inventory-secondary-details > summary::-webkit-details-marker {
  display: none;
}
.inventory-secondary-details > summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.15s ease;
  color: #64748b;
}
.inventory-secondary-details[open] > summary::before {
  transform: rotate(90deg);
}
.inventory-secondary-details[open] > summary {
  border-bottom: 1px solid #dbe4ef;
  background: #f1f5f9;
}
.inventory-secondary-content {
  padding: 10px 12px 12px;
  background: #fff;
}
.inventory-secondary-content > .muted.small {
  margin: 0 0 8px;
}
.inventory-details-state {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.inventory-secondary-details:not([open]) .inventory-details-open,
.inventory-secondary-details[open] .inventory-details-closed {
  display: none;
}
@media (max-width: 760px) {
  .inventory-secondary-details > summary {
    flex-wrap: wrap;
  }
  .inventory-details-state {
    margin-left: 0;
  }
}

/* 예전 엑셀 자료와 기존 작업현황 연결 */
.legacy-link-card {
  margin-bottom: 14px;
}
.legacy-link-source {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.legacy-link-source h2 {
  margin: 6px 0 8px;
  font-size: 18px;
}
.legacy-link-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 6px 12px;
  font-size: 13px;
}
.legacy-match-list {
  display: grid;
  gap: 8px;
}
.legacy-match-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.legacy-match-option:hover {
  background: #f8fafc;
}
.legacy-match-option.is-recommended {
  border-width: 2px;
  background: #f0fdf4;
}
.legacy-match-option.is-none {
  background: #f8fafc;
}
.legacy-match-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.legacy-match-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.legacy-match-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.legacy-match-meta,
.legacy-match-reasons {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.legacy-link-actions {
  position: sticky;
  bottom: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  margin-top: 14px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
}
@media (max-width: 900px) {
  .legacy-link-source-grid {
    grid-template-columns: 1fr;
  }
}

/* 판매리스트/수선내역 공통 상품명 설정 */
.product-name-column {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: nowrap;
}
.inline-product-name-control {
  position: relative;
  display: inline-block;
  width: 145px;
  margin: 0;
  vertical-align: middle;
}
.inline-product-name-select {
  width: 145px;
  min-width: 145px;
  max-width: 145px;
  padding: 5px 28px 5px 8px;
  line-height: 1.2;
}
.inline-product-name-save-state {
  position: absolute;
  left: 2px;
  top: 100%;
  min-width: 0;
  font-size: 10px;
  line-height: 1;
  color: #64748b;
  pointer-events: none;
}
.db-id-column {
  width: 72px;
  min-width: 72px;
  max-width: 86px;
  white-space: nowrap;
  text-align: center;
}
.product-name-setting-form {
  display: grid;
  grid-template-columns: minmax(90px, 0.5fr) minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
}
.product-name-setting-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}
.product-name-setting-form input {
  width: 100%;
  min-width: 0;
}
.product-name-settings-table th:first-child,
.product-name-settings-table td:first-child {
  width: 80px;
  text-align: center;
}
.product-name-setting-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.inline-form {
  display: inline-flex;
  margin: 0;
}
.product-name-guide {
  margin-bottom: 12px;
}
@media (max-width: 980px) {
  .product-name-setting-form {
    grid-template-columns: 1fr 1fr;
  }
  .product-name-setting-form button {
    min-height: 42px;
  }
}
@media (max-width: 640px) {
  .product-name-setting-form {
    grid-template-columns: 1fr;
  }
  .inline-product-name-select {
    min-width: 135px;
  }
}

/* 판매리스트·수선내역 직접입력 버튼 강조 */
.button.manual-entry-highlight {
  background: #e8f7ec;
  border-color: #9fd3ad;
  color: #175c2c;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(34, 112, 58, 0.10);
}
.button.manual-entry-highlight:hover {
  background: #d8f0df;
  border-color: #78bd8b;
  color: #104b23;
}

/* 2026-07-30 전체 탭 상단 헤더 시각화 통일
   고객용 체크·새주문서의 작은 영문 / 큰 제목 / 설명 / 밝은 배경 형식을 공통 적용 */
.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid #dde2ea;
  border-radius: 18px;
  background: #f7f8fb;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .045);
}
.page-hero-copy {
  flex: 1 1 360px;
  min-width: 0;
}
.page-hero .eyebrow {
  display: block;
  margin: 0;
  color: #5772a4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.35;
  text-transform: uppercase;
}
.page-hero h1 {
  margin: 4px 0 8px;
  font-size: 30px;
  line-height: 1.22;
  letter-spacing: -.035em;
}
.page-hero .muted {
  max-width: 820px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.page-hero-actions,
.page-hero > .title-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  align-content: center;
  gap: 8px;
  max-width: 62%;
  flex-wrap: wrap;
}
.page-hero-actions form,
.page-hero > .title-actions form {
  margin: 0;
}
.page-hero .logo {
  flex: 0 0 auto;
}

/* 기존 전용 헤더의 배경·테두리도 공통 헤더와 동일하게 맞춘다. */
.page-hero.customer-hero,
.page-hero.schedule-hero,
.page-hero.price-list-head,
.page-hero.order-form-hero {
  border: 1px solid #dde2ea;
  background: #f7f8fb;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .045);
}
.page-hero.schedule-hero {
  padding: 22px;
  border-radius: 18px;
  margin-bottom: 14px;
}
.page-hero.schedule-hero h1 {
  margin: 4px 0 8px;
  font-size: 30px;
}
.page-hero.schedule-hero p {
  font-size: 14px;
}
.page-hero .schedule-hero-eyebrow {
  margin: 0;
  color: #5772a4;
  font-size: 12px;
  letter-spacing: .09em;
}
.page-hero.price-list-head {
  padding: 22px;
  margin-bottom: 14px;
}
.price-list-page {
  padding: 0;
}

/* 주문서는 제목/로고 줄과 카테고리 선택 줄을 유지한다. */
.page-hero.order-form-hero {
  display: block !important;
}
.page-hero.order-form-hero .order-form-hero-title-row {
  width: 100%;
}

@media (max-width: 1180px) {
  .page-hero:not(.order-form-hero) {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-hero-actions,
  .page-hero > .title-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }
}

body.mode-tablet .page-hero {
  padding: 20px;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
body.mode-tablet .page-hero h1 {
  font-size: 32px;
  line-height: 1.2;
}
body.mode-tablet .page-hero .muted {
  font-size: 18px;
  line-height: 1.55;
}
body.mode-tablet .page-hero .eyebrow {
  font-size: 14px;
  letter-spacing: .09em;
}

body.mode-mobile .page-hero:not(.order-form-hero) {
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
}
body.mode-mobile .page-hero h1 {
  font-size: 27px;
}
body.mode-mobile .page-hero .muted {
  font-size: 15px;
  line-height: 1.55;
}
body.mode-mobile .page-hero-actions,
body.mode-mobile .page-hero > .title-actions {
  width: 100%;
  max-width: none;
  justify-content: flex-start;
}

/* 좁은 PC/태블릿에서 메뉴가 많은 화면만 세로 배치한다.
   기존 로고형 헤더(고객용 체크·새주문서·단가표)는 기존 가로 구성을 유지한다. */
@media (max-width: 1180px) {
  .page-hero:not(.order-form-hero):not(.customer-hero):not(.price-list-head) .page-hero-copy {
    flex: 0 1 auto;
    width: 100%;
  }
}
@media (max-width: 1180px) {
  .page-hero.customer-hero:not(.order-form-hero),
  .page-hero.price-list-head {
    flex-direction: row;
    align-items: center;
  }
}

/* 로고형 헤더의 기존 태블릿/모바일 배치를 보존한다. */
body.mode-tablet .page-hero.customer-hero .muted,
body.mode-tablet .page-hero.order-form-hero .muted {
  font-size: 20px;
}
body.mode-mobile .page-hero.customer-hero:not(.order-form-hero),
body.mode-mobile .page-hero.price-list-head {
  flex-direction: column;
  align-items: stretch;
}

/* 판매리스트 수정: 단가표/할인/품명/가격/비고 실시간 연동 */
.sales-edit-price-panel {
  border: 1px solid #bbd7c4;
  border-radius: 16px;
  padding: 14px;
  background: #f7fcf8;
  margin-bottom: 14px;
}
.sales-edit-price-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 11px;
}
.sales-edit-price-head p { margin: 4px 0 0; }
.sales-edit-select-grid,
.sales-edit-value-grid {
  display: grid;
  gap: 10px;
}
.sales-edit-select-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 10px;
}
.sales-edit-select-grid label {
  display: grid;
  gap: 5px;
  font-weight: 800;
  color: #334155;
}
.sales-edit-select-grid select { width: 100%; min-width: 0; }
.sales-edit-value-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}
.sales-edit-value-grid .field-wide { grid-column: 1 / -1; }
.sales-edit-value-grid .sales-edit-item-name-field { grid-column: span 3; }
.sales-edit-value-grid .sales-edit-note-field textarea { min-height: 92px; }
.sales-edit-note-field small { font-size: 11px; color: #64748b; font-weight: 700; }
.sales-edit-price-summary { margin-top: 10px; }
@media (max-width: 900px) {
  .sales-edit-select-grid,
  .sales-edit-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-edit-value-grid .sales-edit-item-name-field { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .sales-edit-select-grid,
  .sales-edit-value-grid { grid-template-columns: 1fr; }
  .sales-edit-value-grid .sales-edit-item-name-field,
  .sales-edit-value-grid .field-wide { grid-column: auto; }
}

/* 주문서 DB 표시항목 설정 */
[data-order-column][hidden] {
  display: none !important;
}

/* 판매리스트 직접입력 상세값: 수정 화면과 동일한 품명/가격/비고 흐름 */
.sales-price-item-card {
  border: 1px solid #cfe0d4;
  border-radius: 15px;
  background: #ffffff;
  padding: 12px;
}
.sales-price-item-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.sales-price-item-card-head p {
  margin: 3px 0 0;
}
.sales-direct-select-grid {
  grid-template-columns: repeat(2, minmax(190px, 1fr));
}
.sales-direct-value-grid {
  margin-top: 10px;
}
.sales-direct-row-summary {
  margin-top: 10px;
}
.sales-direct-row-summary > div {
  background: #f8fafc;
}
.sales-direct-row-summary .final {
  background: #eff6ff;
}
@media (max-width: 760px) {
  .sales-price-item-card-head {
    display: grid;
  }
  .sales-price-item-card-head .button.danger {
    justify-self: end;
  }
  .sales-direct-select-grid {
    grid-template-columns: 1fr;
  }
}

/* 인솔 출고예정 알림 - 상태 메모 및 촘촘한 표 배치 */
.daily-due-alert-table {
  font-size: 12.5px;
}
.daily-due-alert-table th,
.daily-due-alert-table td {
  padding: 4px 5px !important;
  line-height: 1.15;
}
.daily-due-alert-table th {
  color: #475569;
  font-size: 12px;
  letter-spacing: -0.01em;
}
.daily-due-alert-table .daily-due-status-col,
.daily-due-alert-table .daily-due-status-cell {
  width: 78px;
  white-space: nowrap;
  text-align: center;
}
.daily-due-alert-table .daily-col-due-date {
  width: 92px;
  white-space: nowrap;
  text-align: center;
}
.daily-due-alert-table th:last-child,
.daily-due-alert-table td:last-child {
  width: 42px;
  white-space: nowrap;
  text-align: center;
}
.daily-due-memo-col,
.daily-due-memo-cell {
  width: clamp(165px, 21vw, 250px);
  min-width: 150px;
}
.daily-due-memo-cell {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}
.daily-due-memo-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.daily-due-memo-input {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #1e293b;
  font-size: 12.5px;
  line-height: 1.15;
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.daily-due-memo-input::placeholder {
  color: #94a3b8;
}
.daily-due-memo-input:hover {
  border-color: #94a3b8;
  background: #fff;
}
.daily-due-memo-input:focus {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
  outline: none;
}
.daily-due-memo-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
}
.daily-due-memo-state.is-saving {
  color: #64748b;
}
.daily-due-memo-state.is-saved {
  color: #15803d;
}
.daily-due-memo-state.is-error {
  color: #b91c1c;
}
.daily-due-row-overdue .daily-due-memo-input,
.daily-due-row-today .daily-due-memo-input {
  border-color: #fecaca;
}
.daily-due-row-tomorrow .daily-due-memo-input {
  border-color: #fde68a;
}
.daily-due-row-overdue {
  box-shadow: inset 3px 0 0 #dc2626;
}
.daily-due-row-today {
  box-shadow: inset 3px 0 0 #ef4444;
}
.daily-due-row-tomorrow {
  box-shadow: inset 3px 0 0 #f59e0b;
}

@media (max-width: 1180px) {
  .daily-due-alert-table {
    font-size: 12px;
  }
  .daily-due-alert-table th,
  .daily-due-alert-table td {
    padding: 4px !important;
  }
  .daily-due-memo-col,
  .daily-due-memo-cell {
    width: 175px;
    min-width: 145px;
  }
  .daily-due-memo-editor {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }
  .daily-due-memo-state {
    min-width: 0;
    justify-content: flex-end;
    font-size: 9.5px;
    line-height: 1;
  }
}

/* 2026-07-31 아이디어 보드 - 포스트잇 형태의 업무 아이디어 기록 화면 */
.idea-board-hero .logo {
  max-width: 250px;
  max-height: 82px;
}
.idea-board-message {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.idea-board-message-success {
  border: 1px solid #a7d8b3;
  background: #edf9f0;
  color: #185d2b;
}
.idea-board-message-error {
  border: 1px solid #efb3b3;
  background: #fff1f1;
  color: #9f2020;
}
.idea-compose-card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #dde2ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .045);
}
.idea-compose-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.idea-compose-heading h2 {
  margin: 2px 0 0;
  font-size: 21px;
}
.idea-section-kicker {
  margin: 0;
  color: #5772a4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}
.idea-compose-form {
  display: grid;
  grid-template-columns: minmax(170px, .65fr) minmax(280px, 1.35fr);
  gap: 12px;
}
.idea-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.idea-field > span {
  font-size: 13px;
  font-weight: 800;
  color: #344054;
}
.idea-field select,
.idea-field input,
.idea-field textarea,
.idea-board-filter-form select,
.idea-board-filter-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd6e3;
  border-radius: 11px;
  background: #fff;
  color: #172033;
  font: inherit;
}
.idea-field select,
.idea-field input,
.idea-board-filter-form select,
.idea-board-filter-form input {
  min-height: 42px;
  padding: 8px 11px;
}
.idea-field textarea {
  min-height: 118px;
  padding: 11px 12px;
  line-height: 1.55;
  resize: vertical;
}
.idea-field-content {
  grid-column: 1 / -1;
}
.idea-compose-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.idea-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.idea-board-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.idea-board-count strong {
  font-size: 23px;
  color: #273b68;
}
.idea-board-count-label {
  color: #6e7f9d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
}
.idea-board-filter-form {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.idea-board-filter-form select {
  width: 150px;
}
.idea-search-field {
  width: min(280px, 34vw);
}
.idea-pinboard {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 28px;
  border: 1px solid #c9bda8;
  border-radius: 20px;
  background-color: #e7ddca;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(105, 85, 55, .11) 1px, transparent 1.5px),
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(90,65,35,.035));
  background-size: 24px 24px, 100% 100%;
  box-shadow: inset 0 0 0 7px rgba(122, 94, 58, .08), 0 5px 20px rgba(57, 43, 25, .08);
}
.idea-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  align-items: start;
  gap: 22px;
}
.idea-note {
  position: relative;
  min-height: 230px;
  padding: 24px 18px 15px;
  border: 1px solid rgba(92, 76, 41, .18);
  border-radius: 3px 3px 9px 4px;
  color: #2f2b22;
  box-shadow: 0 10px 14px rgba(58, 45, 26, .16), inset 0 -12px 24px rgba(255,255,255,.12);
  transform-origin: 50% 4%;
  transition: transform .16s ease, box-shadow .16s ease;
}
.idea-note:hover {
  z-index: 2;
  transform: translateY(-3px) rotate(0deg) scale(1.012);
  box-shadow: 0 14px 20px rgba(58, 45, 26, .2), inset 0 -12px 24px rgba(255,255,255,.12);
}
.idea-note-color-1 { background: #fff2a8; }
.idea-note-color-2 { background: #cdf0d6; }
.idea-note-color-3 { background: #ffd7b7; }
.idea-note-color-4 { background: #cfe8ff; }
.idea-note-color-5 { background: #e4d7ff; }
.idea-note-tilt-1 { transform: rotate(-.7deg); }
.idea-note-tilt-2 { transform: rotate(.55deg); }
.idea-note-tilt-3 { transform: rotate(-.35deg); }
.idea-note-tilt-4 { transform: rotate(.8deg); }
.idea-note-tilt-5 { transform: rotate(-.5deg); }
.idea-note-tilt-6 { transform: rotate(.25deg); }
.idea-note-pin {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(90, 23, 23, .25);
  border-radius: 50%;
  background: #ce5151;
  box-shadow: 0 2px 3px rgba(60, 20, 20, .28), inset 0 2px 2px rgba(255,255,255,.42);
  transform: translateX(-50%);
}
.idea-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.idea-note-staff {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid rgba(62, 55, 38, .2);
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  font-size: 12px;
  font-weight: 800;
}
.idea-note-number {
  color: rgba(47, 43, 34, .55);
  font-size: 11px;
  font-weight: 700;
}
.idea-note h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(58, 48, 30, .25);
  font-size: 18px;
  line-height: 1.35;
  word-break: break-word;
}
.idea-note-content {
  min-height: 90px;
  color: #3c372c;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.idea-note-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
  padding-top: 9px;
  border-top: 1px solid rgba(58, 48, 30, .12);
}
.idea-note-time {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  color: rgba(47, 43, 34, .63);
  font-size: 10px;
  line-height: 1.35;
}
.idea-note-edited {
  color: rgba(47, 43, 34, .5);
}
.idea-note-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.idea-note-actions form {
  margin: 0;
}
.idea-note-action,
.idea-note-delete {
  min-height: 28px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.38);
  color: #3e4b65;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.idea-note-delete {
  color: #9d3434;
}
.idea-note-action:hover,
.idea-note-delete:hover {
  background: rgba(255,255,255,.72);
}
.idea-board-empty {
  display: flex;
  min-height: 245px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #6f624f;
}
.idea-board-empty-note {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 3px;
  background: #fff2a8;
  box-shadow: 0 8px 12px rgba(58, 45, 26, .13);
  font-size: 24px;
  transform: rotate(-4deg);
}
.idea-board-empty h3 {
  margin: 0 0 6px;
}
.idea-board-empty p {
  margin: 0;
}
@media (max-width: 760px) {
  .idea-compose-form {
    grid-template-columns: 1fr;
  }
  .idea-field-content,
  .idea-compose-actions {
    grid-column: auto;
  }
  .idea-compose-actions,
  .idea-board-toolbar,
  .idea-board-filter-form {
    align-items: stretch;
    flex-direction: column;
  }
  .idea-board-filter-form {
    width: 100%;
  }
  .idea-board-filter-form label,
  .idea-board-filter-form select,
  .idea-search-field {
    width: 100%;
  }
  .idea-pinboard {
    padding: 20px 14px;
  }
  .idea-note-grid {
    grid-template-columns: 1fr;
  }
}
body.mode-tablet .idea-compose-card {
  padding: 22px;
}
body.mode-tablet .idea-field > span,
body.mode-tablet .idea-note-content {
  font-size: 17px;
}
body.mode-tablet .idea-field select,
body.mode-tablet .idea-field input {
  min-height: 52px;
  font-size: 18px;
}
body.mode-tablet .idea-field textarea {
  min-height: 150px;
  font-size: 18px;
}
body.mode-tablet .idea-note-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
body.mode-tablet .idea-note h3 {
  font-size: 22px;
}


/* 담당자별 작업/단계 요약: 모든 작업 사진을 개별 클릭 가능한 썸네일로 표시 */
.daily-worker-summary-card .daily-worker-summary-wrap {
  overflow-x: hidden;
}
.daily-worker-summary-card .daily-worker-summary-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.daily-worker-summary-card .daily-summary-photo-head,
.daily-worker-summary-card .daily-summary-photo-cell {
  width: 250px;
  min-width: 0;
  text-align: center;
  vertical-align: middle;
}
.daily-summary-photo-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  align-items: center;
}
.daily-summary-photo-thumb {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.daily-summary-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}
.daily-summary-photo-thumb:hover,
.daily-summary-photo-thumb:focus-visible {
  z-index: 1;
  border-color: #475569;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
  transform: translateY(-1px);
  outline: none;
}
.daily-summary-photo-empty {
  color: #94a3b8;
}
@media (max-width: 1180px) {
  .daily-worker-summary-card .daily-summary-photo-head,
  .daily-worker-summary-card .daily-summary-photo-cell {
    width: 210px;
  }
  .daily-summary-photo-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .daily-worker-summary-card .daily-summary-photo-head,
  .daily-worker-summary-card .daily-summary-photo-cell {
    width: 176px;
  }
  .daily-summary-photo-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
}


/* 담당자별 작업/단계 요약: 기간 두 줄 표시 및 열 너비 재배분 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(1),
.daily-worker-summary-card .daily-worker-summary-table .daily-worker-cell {
  width: 108px;
}
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(2),
.daily-worker-summary-card .daily-worker-summary-table .daily-date-cell {
  width: 148px;
}
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(3),
.daily-worker-summary-card .daily-worker-summary-table .daily-category-cell {
  width: 270px;
}
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(4) {
  width: 245px;
}
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(5) {
  width: auto;
}
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(7),
.daily-worker-summary-card .daily-worker-summary-table .daily-summary-count-cell {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  padding-left: 3px !important;
  padding-right: 3px !important;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.daily-worker-summary-card .daily-date-cell {
  white-space: nowrap;
  text-align: center;
}
.daily-work-date-range {
  display: inline-grid;
  gap: 1px;
  line-height: 1.2;
  white-space: nowrap;
}
.daily-work-date-range > span {
  display: block;
}
@media (max-width: 1400px) {
  .daily-worker-summary-card .daily-worker-summary-table th:nth-child(1),
  .daily-worker-summary-card .daily-worker-summary-table .daily-worker-cell { width: 92px; }
  .daily-worker-summary-card .daily-worker-summary-table th:nth-child(2),
  .daily-worker-summary-card .daily-worker-summary-table .daily-date-cell { width: 136px; }
  .daily-worker-summary-card .daily-worker-summary-table th:nth-child(3),
  .daily-worker-summary-card .daily-worker-summary-table .daily-category-cell { width: 220px; }
  .daily-worker-summary-card .daily-worker-summary-table th:nth-child(4) { width: 200px; }
}
/* 2026-08-02 아이디어 보드 단계형 흐름 · 이미지 첨부 · 자동 연결 화살표 */
.idea-compose-form {
  grid-template-columns: minmax(150px, .72fr) minmax(230px, 1fr) minmax(280px, 1.35fr);
}
.idea-field-title,
.idea-field-content,
.idea-attachment-panel,
.idea-existing-images,
.idea-compose-actions {
  grid-column: 1 / -1;
}
.idea-field-parent small,
.idea-field-images small,
.idea-field-caption small {
  color: #8290a6;
  font-size: 10px;
  font-weight: 600;
}
.idea-field-parent.is-disabled {
  opacity: .63;
}
.idea-field-parent small {
  min-height: 16px;
  line-height: 1.4;
}
.idea-attachment-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(250px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 13px;
  border: 1px solid #d9e0eb;
  border-radius: 13px;
  background: #f8fafc;
}
.idea-field-images input[type="file"] {
  min-height: 42px;
  padding: 7px;
  border: 1px dashed #b9c5d8;
  border-radius: 10px;
  background: #fff;
}
.idea-file-selection {
  overflow: hidden;
  color: #68758a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idea-complete-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #b9d7c2;
  border-radius: 11px;
  background: #eff9f2;
  color: #245e35;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.idea-complete-toggle input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #2f7b49;
}
.idea-existing-images {
  padding: 13px;
  border: 1px solid #d9e0eb;
  border-radius: 13px;
  background: #fff;
}
.idea-existing-images-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.idea-existing-images-heading span {
  color: #7b8799;
  font-size: 11px;
}
.idea-existing-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.idea-existing-image-item {
  overflow: hidden;
  border: 1px solid #dce2eb;
  border-radius: 11px;
  background: #f8fafc;
}
.idea-existing-image-item .idea-image-open {
  width: 100%;
  height: 112px;
}
.idea-existing-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idea-existing-image-item > div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 8px;
}
.idea-existing-image-item > div > span {
  overflow: hidden;
  color: #596579;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idea-image-delete {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 0;
  border-radius: 7px;
  background: #fce8e8;
  color: #a12c2c;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.idea-board-toolbar {
  min-height: 58px;
  align-items: flex-end;
  padding: 8px 0 10px;
}
.idea-flow-count {
  color: #73819a;
  font-size: 12px;
  font-weight: 700;
}
.idea-board-filter-form {
  flex: 0 1 auto;
  align-items: flex-end;
  flex-wrap: nowrap;
}
.idea-toolbar-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}
.idea-toolbar-field > span {
  min-height: 16px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}
.idea-toolbar-staff {
  width: 165px;
}
.idea-board-filter-form .idea-toolbar-staff select {
  width: 100%;
}
.idea-board-filter-form .idea-search-field {
  width: min(300px, 31vw);
}
.idea-toolbar-button,
.idea-toolbar-reset {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  white-space: nowrap;
}
.idea-flow-legend {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  padding: 10px 12px;
  border: 1px solid #d7dee9;
  border-radius: 14px;
  background: #fff;
  scrollbar-width: thin;
}
.idea-flow-legend-step {
  display: flex;
  min-width: max-content;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--idea-stage-border, #d2d8e1);
  border-radius: 10px;
  background: var(--idea-stage-soft, #f7f8fa);
}
.idea-flow-legend-step > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.idea-flow-legend-step strong {
  color: #243247;
  font-size: 12px;
  line-height: 1.25;
}
.idea-flow-legend-step small {
  color: #758198;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}
.idea-flow-legend-number {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--idea-stage-accent, #63708a);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.idea-flow-legend-arrow {
  color: #8a96a8;
  font-size: 19px;
  font-weight: 900;
}
.idea-stage-theme-proposal {
  --idea-stage-accent: #b98917;
  --idea-stage-soft: #fff9db;
  --idea-stage-border: #ead58c;
}
.idea-stage-theme-feasibility {
  --idea-stage-accent: #347b5a;
  --idea-stage-soft: #ecf8f1;
  --idea-stage-border: #a9d7bf;
}
.idea-stage-theme-revision {
  --idea-stage-accent: #b9652f;
  --idea-stage-soft: #fff1e7;
  --idea-stage-border: #e7bd9e;
}
.idea-stage-theme-follow_up {
  --idea-stage-accent: #3b70a7;
  --idea-stage-soft: #edf5fd;
  --idea-stage-border: #aecce8;
}
.idea-stage-theme-result {
  --idea-stage-accent: #7655a7;
  --idea-stage-soft: #f3eefb;
  --idea-stage-border: #c8b8e2;
}
.idea-flow-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.idea-flow-board {
  overflow: hidden;
  border: 1px solid #c9bda8;
  border-radius: 20px;
  background-color: #e7ddca;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(105, 85, 55, .105) 1px, transparent 1.5px),
    linear-gradient(135deg, rgba(255,255,255,.25), rgba(90,65,35,.035));
  background-size: 24px 24px, 100% 100%;
  box-shadow: inset 0 0 0 7px rgba(122, 94, 58, .07), 0 6px 22px rgba(57, 43, 25, .09);
}
.idea-flow-board-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(99, 77, 48, .17);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(4px);
}
.idea-flow-board-kicker {
  color: #6d7d98;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}
.idea-flow-board-header h2 {
  margin: 2px 0 3px;
  color: #202c40;
  font-size: 19px;
  line-height: 1.3;
}
.idea-flow-board-header p {
  margin: 0;
  color: #707c8f;
  font-size: 11px;
}
.idea-flow-board-summary {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}
.idea-flow-board-summary > span {
  display: flex;
  min-width: 66px;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: #fff;
  color: #68758a;
  font-size: 10px;
  font-weight: 800;
}
.idea-flow-board-summary strong {
  color: #273b68;
  font-size: 16px;
}
.idea-flow-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 18px;
  scrollbar-color: rgba(92, 72, 48, .38) transparent;
  scrollbar-width: thin;
}
.idea-flow-canvas {
  position: relative;
  min-width: 1480px;
  min-height: 292px;
}
.idea-flow-connectors {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.idea-flow-connectors marker path {
  fill: #68778e;
}
.idea-flow-path {
  fill: none;
  stroke: #68778e;
  stroke-width: 2.1;
  stroke-linecap: round;
  opacity: .76;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.65));
}
.idea-stage-columns {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(270px, 1fr));
  align-items: start;
  gap: 26px;
}
.idea-stage-column {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--idea-stage-border);
  border-radius: 15px;
  background: color-mix(in srgb, var(--idea-stage-soft) 83%, rgba(255,255,255,.73));
  box-shadow: 0 4px 12px rgba(55, 46, 31, .06);
}
.idea-stage-header {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255,255,255,.78);
}
.idea-stage-order {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--idea-stage-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.idea-stage-header > div {
  min-width: 0;
  flex: 1 1 auto;
}
.idea-stage-header h3 {
  margin: 0;
  color: #263346;
  font-size: 13px;
  line-height: 1.2;
}
.idea-stage-header p {
  margin: 2px 0 0;
  color: #758197;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}
.idea-stage-count {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--idea-stage-soft);
  color: var(--idea-stage-accent);
  font-size: 10px;
  font-weight: 900;
}
.idea-stage-stack {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  gap: 17px;
}
.idea-flow-note {
  z-index: 3;
  min-height: 205px;
  padding: 23px 14px 12px;
}
.idea-flow-note.is-completed {
  box-shadow: 0 10px 14px rgba(58, 45, 26, .12), inset 0 0 0 2px rgba(48, 121, 71, .28);
}
.idea-note-complete-badge {
  position: absolute;
  top: 8px;
  right: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(235, 251, 239, .86);
  color: #25683a;
  font-size: 8px;
  font-weight: 900;
}
.idea-flow-note .idea-note-header {
  padding-right: 4px;
}
.idea-flow-note .idea-note-content {
  min-height: 66px;
  font-size: 12.5px;
  line-height: 1.55;
}
.idea-flow-note .idea-note-footer {
  align-items: center;
  flex-direction: column;
}
.idea-flow-note .idea-note-time,
.idea-flow-note .idea-note-actions {
  width: 100%;
}
.idea-flow-note .idea-note-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.idea-note-next {
  background: rgba(255,255,255,.74);
  color: #275f48;
}
.idea-stage-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed color-mix(in srgb, var(--idea-stage-accent) 30%, transparent);
  border-radius: 11px;
  color: color-mix(in srgb, var(--idea-stage-accent) 70%, #6e7787);
  text-align: center;
}
.idea-stage-empty span {
  font-size: 11px;
  font-weight: 800;
}
.idea-stage-empty small {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 700;
}
.idea-image-open {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.idea-note-image-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.idea-note-image-thumb {
  min-width: 0;
  margin: 0;
}
.idea-note-image-thumb .idea-image-open {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(60, 52, 35, .16);
  border-radius: 8px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 2px 7px rgba(43, 36, 22, .08);
}
.idea-note-image-thumb .idea-image-open:hover {
  border-color: rgba(36, 100, 71, .42);
  box-shadow: 0 4px 11px rgba(31, 74, 56, .15);
  transform: translateY(-1px);
}
.idea-note-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idea-note-image-thumb figcaption {
  overflow: hidden;
  margin-top: 3px;
  color: rgba(47, 43, 34, .67);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idea-note-image-index {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(28, 38, 53, .76);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}
.idea-image-dialog {
  width: min(92vw, 1100px);
  max-height: 90vh;
  padding: 18px;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .34);
}
.idea-image-dialog::backdrop {
  background: rgba(15, 23, 42, .67);
}
.idea-image-dialog img {
  display: block;
  width: 100%;
  max-height: calc(90vh - 85px);
  object-fit: contain;
  border-radius: 10px;
  background: #f3f5f8;
}
.idea-image-dialog p {
  margin: 9px 34px 0 0;
  color: #536074;
  font-size: 12px;
  font-weight: 700;
}
.idea-image-dialog-close {
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 31, 46, .78);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
@supports not (background: color-mix(in srgb, white, black)) {
  .idea-stage-column { background: rgba(255,255,255,.72); }
  .idea-stage-empty { border-color: rgba(90, 103, 122, .28); color: #6e7787; }
}
@media (max-width: 980px) {
  .idea-compose-form {
    grid-template-columns: 1fr 1fr;
  }
  .idea-field-parent,
  .idea-field-title,
  .idea-field-content,
  .idea-attachment-panel,
  .idea-existing-images,
  .idea-compose-actions {
    grid-column: 1 / -1;
  }
  .idea-attachment-panel {
    grid-template-columns: 1fr 1fr;
  }
  .idea-complete-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .idea-board-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .idea-board-filter-form {
    width: 100%;
    justify-content: flex-start;
  }
  .idea-board-filter-form .idea-search-field {
    flex: 1 1 auto;
    width: auto;
  }
}
@media (max-width: 760px) {
  .idea-compose-form,
  .idea-attachment-panel {
    grid-template-columns: 1fr;
  }
  .idea-field-staff,
  .idea-field-stage,
  .idea-field-parent,
  .idea-field-title,
  .idea-field-content,
  .idea-attachment-panel,
  .idea-existing-images,
  .idea-compose-actions,
  .idea-complete-toggle {
    grid-column: auto;
  }
  .idea-board-filter-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .idea-toolbar-staff,
  .idea-board-filter-form .idea-search-field {
    width: auto;
  }
  .idea-toolbar-staff,
  .idea-board-filter-form .idea-search-field {
    grid-column: 1 / -1;
  }
  .idea-flow-board-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .idea-flow-scroll {
    padding: 13px 10px;
  }
  .idea-flow-canvas {
    min-width: 1410px;
  }
  .idea-stage-columns {
    grid-template-columns: repeat(5, 260px);
    gap: 20px;
  }
}
body.mode-tablet .idea-flow-canvas {
  min-width: 1710px;
}
body.mode-tablet .idea-stage-columns {
  grid-template-columns: repeat(5, minmax(315px, 1fr));
}
body.mode-tablet .idea-stage-header h3 {
  font-size: 17px;
}
body.mode-tablet .idea-stage-header p,
body.mode-tablet .idea-flow-note .idea-note-content {
  font-size: 14px;
}

/* 아이디어 보드 삭제 보호: 1차 확인 후 랜덤 영문 4자 입력 */
.idea-hidden-delete-form {
  display: none !important;
}
.idea-delete-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}
.idea-delete-dialog::backdrop {
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(3px);
}
.idea-delete-dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: #fff1f1;
  color: #c53030;
  font-size: 24px;
  font-weight: 900;
}
.idea-delete-dialog-kicker {
  margin: 0 0 4px;
  color: #b42318;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}
.idea-delete-dialog h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.idea-delete-dialog-target {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.idea-delete-dialog-help {
  margin: 15px 0 9px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}
.idea-delete-challenge {
  display: block;
  padding: 11px 14px;
  border: 1px dashed #ef9a9a;
  border-radius: 12px;
  background: #fff7f7;
  color: #a61b1b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: .34em;
  text-align: center;
  text-indent: .34em;
  user-select: all;
}
.idea-delete-code-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.idea-delete-code-field > span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.idea-delete-code-field input {
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid #d8dee8;
  border-radius: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .22em;
  text-align: center;
  text-transform: uppercase;
}
.idea-delete-code-field input:focus {
  border-color: #d84b4b;
  outline: 3px solid rgba(216, 75, 75, .14);
}
.idea-delete-dialog-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
}
.idea-delete-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 11px;
}
.idea-delete-confirm {
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: #b42318;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.idea-delete-confirm:disabled {
  background: #d8dee8;
  color: #8490a2;
  cursor: not-allowed;
}
@media (max-width: 560px) {
  .idea-delete-dialog {
    padding: 20px;
  }
  .idea-delete-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   2단계 할인 / 단가표 할인 시뮬레이터 / 두족패키지
   ========================================================= */
.discount-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  min-width: 0;
}
.discount-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9e3f2;
  border-radius: 16px;
  background: #f8fbff;
  min-width: 0;
}
.discount-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.discount-editor-head strong {
  font-size: 16px;
  color: #17233c;
}
.discount-editor-select-row,
.discount-editor-custom label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.discount-editor-select-row > span,
.discount-editor-custom label > span {
  font-size: 12px;
  font-weight: 800;
  color: #5f6f88;
}
.discount-editor select,
.discount-editor input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  background: #fff;
  color: #17233c;
  font: inherit;
}
.discount-editor-custom {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(130px, .9fr) minmax(120px, .8fr) minmax(180px, 1.5fr);
  gap: 10px;
  min-width: 0;
}
.discount-editor-custom[hidden] { display: none !important; }
.discount-editor-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.discount-editor-preview > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e4eaf3;
}
.discount-editor-preview span { font-size: 11px; color: #6b7890; }
.discount-editor-preview b { font-size: 15px; color: #243a67; }
.discount-editor-preview .final {
  background: #edf5ff;
  border-color: #bcd4f8;
}
.discount-editor-remove { white-space: nowrap; }
.order-discount-stack { margin-top: 18px; }
.order-add-discount-btn,
#addSalesAdditionalDiscountBtn,
#addSalesEditAdditionalDiscountBtn,
#addRepairAdditionalDiscountBtn {
  justify-self: start;
  min-height: 42px;
}

.price-discount-settings-table th:nth-child(1) { width: 24%; }
.price-discount-settings-table th:nth-child(2) { width: 18%; }
.price-discount-settings-table th:nth-child(3) { width: 18%; }
.price-discount-settings-table th:nth-child(4) { width: 30%; }
.price-discount-settings-table th:nth-child(5) { width: 10%; }
.price-discount-settings-table tr[data-discount-row] { cursor: pointer; }
.price-discount-settings-table tr[data-discount-row].is-simulator-active td {
  background: #eef5ff;
}
.price-discount-row-preview {
  color: #31548c;
  font-weight: 700;
  white-space: normal;
}
.price-discount-simulator {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(180px, .65fr) minmax(360px, 1.4fr);
  gap: 18px;
  align-items: end;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cbdcf4;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5f9ff, #fff);
}
.price-discount-simulator h4 { margin: 0 0 5px; }
.price-discount-simulator > label { display: grid; gap: 7px; }
.price-discount-simulator > label > span { font-size: 12px; font-weight: 800; color: #5a6a83; }
.price-discount-simulation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.price-discount-simulation-summary > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #fff;
}
.price-discount-simulation-summary span { font-size: 11px; color: #6e7a8f; }
.price-discount-simulation-summary b { color: #233c6d; }
.price-discount-simulation-summary .final { background: #eaf4ff; border-color: #b8d2f8; }
.price-discount-simulator > p { grid-column: 1 / -1; margin: -6px 0 0; }
.price-package-th { width: 112px; }
.price-package-cell { width: 112px; text-align: center; }
.price-package-cell select { width: 100%; min-width: 92px; }
.price-package-badge,
.order-package-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9f2ff;
  color: #24559a;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.order-package-badge.is-included { background: #eef8ee; color: #31733d; }
.order-price-line.is-package-included {
  border-color: #bcdabb;
  background: #f4fbf4;
}
.order-package-included-text { color: #33733d; font-weight: 900; }

.sales-direct-price-panel,
.sales-edit-price-panel,
.repair-order-price-panel { min-width: 0; }
.sales-price-item-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
}
.sales-price-item-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sales-price-item-select-grid,
.sales-price-item-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.sales-price-item-value-grid { grid-template-columns: minmax(200px, 1.4fr) minmax(130px, .7fr) minmax(130px, .7fr); }
.sales-price-item-value-grid label,
.sales-price-item-select-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.sales-price-item-value-grid label > span,
.sales-price-item-select-grid label > span {
  font-size: 12px;
  font-weight: 800;
  color: #61708a;
}
.sales-price-item-value-grid .field-wide { grid-column: 1 / -1; }
.sales-price-item-value-grid input,
.sales-price-item-value-grid textarea,
.sales-price-item-select-grid select {
  width: 100%;
  min-width: 0;
}
.sales-edit-discount-stack { margin: 14px 0; }

@media (max-width: 1100px) {
  .discount-editor-custom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-discount-simulator { grid-template-columns: 1fr 1fr; }
  .price-discount-simulation-summary { grid-column: 1 / -1; }
  .sales-price-item-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .discount-editor { padding: 12px; }
  .discount-editor-custom,
  .discount-editor-preview,
  .price-discount-simulator,
  .price-discount-simulation-summary,
  .sales-price-item-select-grid,
  .sales-price-item-value-grid { grid-template-columns: 1fr; }
  .price-discount-simulation-summary { grid-column: auto; }
  .price-discount-simulator > p { grid-column: auto; }
}

/* =========================================================
   2026-08 주문서/직접입력 할인 패널 배치 및 두족패키지 보정
   ========================================================= */
/* 새주문서: 품목 제목/패키지 표시를 한 줄, 선택과 버튼을 다음 줄에 정돈 */
#orderCategoryPriceRoot .order-price-group-head {
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "title title"
    "product actions";
  align-items: center;
  gap: 10px 12px;
}
#orderCategoryPriceRoot .order-price-group-title {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-bottom: 7px;
  border-bottom: 1px dashed #dbe6f5;
}
#orderCategoryPriceRoot .order-price-group-title strong {
  flex: 0 0 auto;
  color: #0f3b82;
  font-size: 16px;
}
#orderCategoryPriceRoot .order-product-select-wrap {
  grid-area: product;
  min-width: 0;
}
#orderCategoryPriceRoot .order-price-group-actions {
  grid-area: actions;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}
#orderCategoryPriceRoot .order-price-group-actions .button {
  min-height: 40px;
  white-space: nowrap;
}

/* 판매/수선 직접입력: 예전 2열 grid 규칙이 할인 편집기를 찌그러뜨리지 않게 함 */
.sales-discount-area.discount-stack,
.repair-discount-area.discount-stack,
.sales-edit-discount-stack.discount-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 14px !important;
  width: 100%;
  min-width: 0;
}
.sales-discount-area.discount-stack > *,
.repair-discount-area.discount-stack > *,
.sales-edit-discount-stack.discount-stack > * {
  min-width: 0;
  width: 100%;
}
.sales-discount-area.discount-stack > button,
.repair-discount-area.discount-stack > button,
.sales-edit-discount-stack.discount-stack > button {
  width: auto;
  justify-self: start;
}

/* 판매리스트 직접입력: 두족패키지 두 번째 품목 표시 */
.sales-price-item-card.is-package-included {
  border-color: #bcdabb;
  background: #f5fbf5;
}
.sales-price-item-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sales-price-item-card.is-package-included input[readonly],
.sales-price-item-card.is-package-included textarea[readonly] {
  background: #eef7ee;
  color: #356f3d;
  border-color: #c9dfca;
}

@media (max-width: 900px) {
  #orderCategoryPriceRoot .order-price-group-head {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "title"
      "product"
      "actions";
  }
  #orderCategoryPriceRoot .order-price-group-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* 판매리스트 전산등록일 일괄입력 */
.sales-bulk-date-bar { align-items: center; gap: 10px; flex-wrap: wrap; }
.sales-bulk-date-bar label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.sales-bulk-date-bar input[type="date"] { min-height: 38px; }

/* 수선주문서 작업 전·후 사진 */
.repair-photo-section {
  overflow: hidden;
}
.repair-photo-help {
  margin: -2px 0 14px;
}
.repair-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.repair-photo-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  background: #f8fafc;
}
.repair-photo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.repair-photo-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7eef9;
  color: #27476f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.repair-photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}
.repair-photo-thumb {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7dee9;
  border-radius: 12px;
  background: #fff;
}
.repair-photo-thumb.pending {
  border-style: dashed;
  border-color: #f59e0b;
}
.repair-photo-thumb img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: #e5e7eb;
}
.repair-photo-thumb img.clickable {
  cursor: zoom-in;
}
.repair-photo-thumb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 8px;
  font-size: 11px;
  color: #64748b;
}
.repair-photo-remove {
  border: 0;
  padding: 3px 6px;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.repair-photo-empty {
  grid-column: 1 / -1;
  padding: 24px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #94a3b8;
  text-align: center;
  background: #fff;
}
.repair-photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.repair-photo-select-button {
  display: flex;
  width: 100%;
  justify-content: center;
  cursor: pointer;
}
@media (max-width: 900px) {
  .repair-photo-grid {
    grid-template-columns: 1fr;
  }
  .repair-photo-thumb img {
    height: 170px;
  }
}
@media (max-width: 520px) {
  .repair-photo-gallery {
    grid-template-columns: 1fr;
  }
  .repair-photo-thumb img {
    height: auto;
    max-height: 280px;
  }
}

/* 2026-08 일일작업현황 목록 가독성 개선
   - 핵심 열은 더 이상 지나치게 좁아지지 않도록 최소 폭 보장
   - 카테고리/품목은 적당한 폭 안에서 줄바꿈하여 다른 핵심 열을 압박하지 않음
   - 대리점의 기존 자연 줄바꿈 동작은 유지 */
.daily-work-table th.daily-col-id,
.daily-work-table td.daily-col-id {
  min-width: 4.5em;
  white-space: nowrap;
}

.daily-work-table th.daily-col-status,
.daily-work-table td.daily-col-status {
  min-width: 6.2em;
  white-space: nowrap;
}

/* 고객이름은 기존 5.5em 최소폭 규칙을 유지하면서 고정축 역할 */
.daily-work-table th.daily-col-customer-name,
.daily-work-table td.daily-col-customer-name {
  min-width: 5.5em;
  white-space: nowrap;
}

/* 출고예정일은 기존 날짜 + 상태문구가 찌그러지지 않도록 유지 */
.daily-work-table th.daily-col-due-date,
.daily-work-table td.daily-col-due-date {
  min-width: 11ch;
  white-space: nowrap;
}

/* 열기/수정은 한 줄 유지. 최소한 '열기/'가 분리되지 않는다. */
.daily-work-table th.daily-col-action,
.daily-work-table td.daily-col-action {
  min-width: 6.5em;
  white-space: nowrap;
  word-break: keep-all;
}
.daily-work-table td.daily-col-action a {
  white-space: nowrap;
}

/* 긴 카테고리/품목이 한 칸을 과도하게 차지하지 않도록 적당히 줄바꿈 */
.daily-work-table th.daily-col-category,
.daily-work-table td.daily-col-category {
  min-width: 9.5em;
  width: 12em;
  max-width: 16em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.daily-work-table th.daily-col-item,
.daily-work-table td.daily-col-item {
  min-width: 10.5em;
  width: 14em;
  max-width: 18em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.daily-work-table td.daily-col-category .daily-col-wrap-text,
.daily-work-table td.daily-col-item .daily-col-wrap-text {
  display: block;
  max-width: 100%;
}

/* 날짜 문자열은 하이픈에서도 분리되지 않도록 하나의 표시 단위로 묶는다. */
.daily-date-nowrap {
  display: inline-block;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
.daily-period-summary-table thead th,
.daily-selected-summary-table thead th {
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}
.daily-work-table th.daily-col-customer-name,
.daily-work-table td.daily-col-customer-name {
  /* 글자 5자 공간 외에 셀 좌우 여백을 별도로 확보한다. */
  box-sizing: content-box;
  width: 5em;
  min-width: 5em;
  max-width: 5em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.daily-work-table th.daily-col-customer-name {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.daily-work-table td.daily-col-customer-name > b {
  display: block;
  width: 5em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.daily-work-table .daily-col-updated-at {
  width: 11ch;
  min-width: 11ch;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

/* 2026-09-11 세부진행내역: 한글 기준 대리점 6자 / 현재단계 20자.
   단어 단위로 줄바꿈하고, 폭보다 긴 단일 단어만 나누어 표시한다. */
.daily-work-table .daily-col-branch {
  box-sizing: content-box;
  width: 8em;
  min-width: 8em;
  max-width: 8em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.daily-work-table .daily-branch-text {
  display: block;
  width: 8em;
  line-height: 1.4;
}
.daily-work-table .daily-col-current-stage {
  width: 20em;
  max-width: 20em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.daily-work-table .daily-col-current-stage .current-stage-label {
  display: inline-block;
  max-width: 20em;
  box-sizing: border-box;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.daily-work-table th,
.daily-work-table td { padding-left: 10px; padding-right: 14px; }
.daily-work-table .daily-column-hidden { display: none !important; }
.daily-column-settings { margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
#dailyColumnOptions { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 10px 0; }
#dailyColumnOptions label { display: inline-flex; align-items: center; gap: 4px; }
.schedule-event[hidden] { display: none !important; }
#scheduleDayListItems { display: grid; gap: 8px; max-height: 65vh; overflow-y: auto; }
#scheduleDayListItems .schedule-event { white-space: normal; text-align: left; min-height: 38px; }
button.schedule-more { cursor: pointer; background: transparent; border: 0; text-align: left; }

/* 2026-08-11 담당자별 작업/단계 요약 전용 열폭 보정
   - 세부진행내역/일일작업 목록의 열폭 규칙과 분리
   - 핵심 열은 더 이상 압축되지 않게 하고 남는 폭은 메모에 우선 배정
   - 업무/단계는 단어 단위 줄바꿈, 사진은 한 줄 최대 3개 썸네일 */
.daily-worker-summary-card .daily-worker-summary-wrap {
  overflow-x: auto !important;
  overflow-y: visible;
}
.daily-worker-summary-card .daily-worker-summary-table {
  width: 100% !important;
  min-width: 980px !important;
  table-layout: fixed !important;
}

/* 작업진행자: 한글 약 5자 폭 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(1),
.daily-worker-summary-card .daily-worker-summary-table .daily-worker-cell {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  white-space: nowrap;
  text-align: center;
}

/* 업무수행일: YYYY-MM-DD가 한 줄에 정확히 보일 정도 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(2),
.daily-worker-summary-card .daily-worker-summary-table .daily-date-cell {
  width: 102px !important;
  min-width: 102px !important;
  max-width: 102px !important;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 업무: 약 10자 폭, 공백/단어 경계 우선 줄바꿈 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(3),
.daily-worker-summary-card .daily-worker-summary-table .daily-category-cell {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word;
  line-height: 1.35;
}

/* 단계: 약 10자 폭, 글자 중간보다 단어 단위 줄바꿈 우선 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(4),
.daily-worker-summary-card .daily-worker-summary-table .daily-stage-label-cell {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word;
  line-height: 1.35;
  vertical-align: top;
  min-width: 0;
}

/* 메모: 고정폭을 두지 않고 남는 가로 공간을 가장 많이 사용 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(5),
.daily-worker-summary-card .daily-worker-summary-table .daily-summary-notes-cell {
  width: auto !important;
  min-width: 300px !important;
  max-width: none !important;
}
.daily-worker-summary-card .daily-summary-note {
  width: auto;
  max-width: 100%;
  white-space: pre-wrap !important;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.4;
}

/* 사진: 메모 폭을 과하게 뺏지 않도록 3열 썸네일 기준 */
.daily-worker-summary-card .daily-summary-photo-head,
.daily-worker-summary-card .daily-summary-photo-cell {
  width: 156px !important;
  min-width: 156px !important;
  max-width: 156px !important;
  padding-left: 5px !important;
  padding-right: 5px !important;
}
.daily-worker-summary-card .daily-summary-photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100%;
}

/* 작업건수: 한글 약 4자 폭, 숫자는 한 줄 유지 */
.daily-worker-summary-card .daily-worker-summary-table th:nth-child(7),
.daily-worker-summary-card .daily-worker-summary-table .daily-summary-count-cell {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
  white-space: nowrap;
  text-align: center;
}

/* 좁은 화면에서도 열을 다시 찌그러뜨리지 않고 가로 스크롤로 보존 */
@media (max-width: 1180px) {
  .daily-worker-summary-card .daily-worker-summary-table {
    min-width: 980px !important;
  }
  .daily-worker-summary-card .daily-summary-photo-head,
  .daily-worker-summary-card .daily-summary-photo-cell {
    width: 144px !important;
    min-width: 144px !important;
    max-width: 144px !important;
  }
}


/* 2026-08-13 담당자별 요약 rowspan 열 위치 버그 수정
   tbody는 nth-child가 아니라 의미 클래스 기준으로 제어해야 병합행에서도 같은 열 규칙이 유지됨. */
.daily-worker-summary-card .daily-worker-summary-table .daily-worker-cell {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  white-space: nowrap !important;
}
.daily-worker-summary-card .daily-worker-summary-table .daily-date-cell {
  width: 102px !important;
  min-width: 102px !important;
  max-width: 102px !important;
  white-space: nowrap !important;
}
.daily-worker-summary-card .daily-worker-summary-table .daily-category-cell {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}
.daily-worker-summary-card .daily-worker-summary-table .daily-stage-label-cell {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  line-height: 1.35;
  vertical-align: top;
}
.daily-worker-summary-card .daily-worker-summary-table .daily-summary-notes-cell {
  min-width: 300px !important;
  white-space: normal !important;
  vertical-align: top;
}

/* 2026-08-24 아이디어보드 시각 정렬 */
.idea-attachment-panel {
  align-items: stretch;
}
.idea-attachment-panel .idea-field-images,
.idea-attachment-panel .idea-field-caption {
  display: grid;
  grid-template-rows: minmax(18px, auto) 42px minmax(16px, auto);
  align-self: stretch;
  align-items: start;
  gap: 6px;
}
.idea-attachment-panel .idea-field-images input[type="file"],
.idea-attachment-panel .idea-field-caption input {
  height: 42px;
  min-height: 42px;
  margin: 0;
}
.idea-attachment-panel .idea-field-caption::after {
  content: "";
  display: block;
  min-height: 16px;
}
.idea-attachment-panel .idea-complete-toggle {
  align-self: start;
  margin-top: 24px;
}
.idea-board-filter-form [data-search-reset] {
  min-height: 42px;
  height: 42px;
  margin: 0;
  white-space: nowrap;
}
.idea-flow-board-summary .idea-rnd-report-button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: #fff;
  color: #273b68 !important;
  font-size: 11px;
  font-weight: 800;
}
.idea-flow-board-summary .idea-rnd-report-button:hover {
  background: #f2f5f9;
  border-color: #bfc9d8;
}

/* WOTC 전체 라이트·다크 테마: 기본값은 라이트 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1722;
  --panel: #172131;
  --line: #3b4758;
  --text: #edf2f7;
  --muted: #a7b2c1;
  --blue: #79aef5;
  --blue2: #8dafff;
  --soft-blue: #1d3554;
}
.topbar-controls {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  max-width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px auto;
}
.topbar-controls .privacy-display-control { width: auto; margin: 0; }
.privacy-account-controls { display: inline-flex; align-items: center; gap: 8px; }
.privacy-account-controls .logout-button { white-space: nowrap; }
.wotc-theme-switch {
  display: inline-flex;
  overflow: hidden;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.wotc-theme-choice {
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-right: 1px solid #d8e0e9;
  border-radius: 0;
  background: transparent;
  color: #526174;
  font-size: 12px;
  font-weight: 800;
}
.wotc-theme-choice:last-child { border-right: 0; }
.wotc-theme-choice[aria-pressed="true"] {
  background: #274e78;
  color: #fff;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .topbar { background: #121b28; border-color: #354254; }
html[data-theme="dark"] .topbar nav a { color: #cfdae8; }
html[data-theme="dark"] .topbar nav a:hover,
html[data-theme="dark"] .topbar nav a.active { background: #243248; color: #fff; }
html[data-theme="dark"] .wotc-theme-switch { background: #111a27; border-color: #46556a; }
html[data-theme="dark"] .wotc-theme-choice { color: #aebbd0; border-color: #3d4b5e; }
html[data-theme="dark"] .wotc-theme-choice[aria-pressed="true"] { background: #dce9f8; color: #19344f; }
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .option-card,
html[data-theme="dark"] .preview-card,
html[data-theme="dark"] .page-hero,
html[data-theme="dark"] .title-panel,
html[data-theme="dark"] .actionbar,
html[data-theme="dark"] .searchbar,
html[data-theme="dark"] .idea-compose-card,
html[data-theme="dark"] .idea-flow-legend,
html[data-theme="dark"] .idea-flow-board-header,
html[data-theme="dark"] .idea-existing-images,
html[data-theme="dark"] dialog {
  background: #172131 !important;
  border-color: #3b4758 !important;
  color: #edf2f7 !important;
}
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .instance-card,
html[data-theme="dark"] .idea-attachment-panel {
  background: #111a27 !important;
  border-color: #39475a !important;
  color: #e7edf5;
}
html[data-theme="dark"] .data-table th { background: #223044 !important; color: #edf2f7; border-color: #435167; }
html[data-theme="dark"] .data-table td { border-color: #2e3a4c; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .idea-field input,
html[data-theme="dark"] .idea-field select,
html[data-theme="dark"] .idea-field textarea,
html[data-theme="dark"] .idea-board-filter-form input,
html[data-theme="dark"] .idea-board-filter-form select {
  background: #0f1825 !important;
  border-color: #46556a !important;
  color: #f3f6fa !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #8390a2; }
html[data-theme="dark"] button,
html[data-theme="dark"] .button { background: #202d40; border-color: #46556a; color: #eaf0f7; }
html[data-theme="dark"] button:hover,
html[data-theme="dark"] .button:hover { background: #2a3950; }
html[data-theme="dark"] button.primary,
html[data-theme="dark"] .primary { background: #376fae; border-color: #4b83c2; color: #fff; }
html[data-theme="dark"] .muted,
html[data-theme="dark"] .small,
html[data-theme="dark"] .idea-field > span,
html[data-theme="dark"] .idea-toolbar-field > span,
html[data-theme="dark"] .idea-flow-board-header p { color: #a7b2c1 !important; }
html[data-theme="dark"] .notice-box { background: #17283a; border-color: #3d526a; color: #dbe7f3; }
html[data-theme="dark"] .notice.success { background: #173b2b; border-color: #34785a; color: #c7f2db; }
html[data-theme="dark"] .notice.warn { background: #453715; border-color: #8d7428; color: #ffe9a6; }
html[data-theme="dark"] .notice.error { background: #472327; border-color: #93515a; color: #ffd4d8; }
html[data-theme="dark"] .privacy-display-banner { background: #17342f; border-color: #3a7467; color: #d5f5eb; }
html[data-theme="dark"] .backup-cleanup-banner { background: #493d1b; border-color: #8e772b; color: #ffedac; }
html[data-theme="dark"] .backup-cleanup-banner a { color: #fff2bd; }
html[data-theme="dark"] .idea-flow-board-header h2,
html[data-theme="dark"] .idea-board-count strong { color: #e7edf5; }
html[data-theme="dark"] .idea-flow-board-summary > span,
html[data-theme="dark"] .idea-flow-board-summary .idea-rnd-report-button { background: #202d40; border-color: #46556a; color: #d9e5f3 !important; }
html[data-theme="dark"] .idea-flow-board-summary strong { color: #fff; }
html[data-theme="dark"] .idea-stage-column { background: rgba(23,33,49,.92); }
html[data-theme="dark"] .idea-stage-header h3,
html[data-theme="dark"] .idea-flow-legend-step strong { color: #26354a; }
html[data-theme="dark"] .gait-insight-shell,
html[data-theme="dark"] .gait-insight-frame { background: #111110; border-color: #3b4758; }
body.mode-tablet .topbar-controls,
body.mode-mobile .topbar-controls { width: 100%; justify-content: flex-end; margin: 2px 0 8px; }
body.mode-tablet .topbar-controls .privacy-display-control,
body.mode-mobile .topbar-controls .privacy-display-control { width: auto; margin: 0; }
body.mode-tablet .topbar-controls .privacy-display-button,
body.mode-tablet .topbar-controls .privacy-mask-button,
body.mode-mobile .topbar-controls .privacy-display-button,
body.mode-mobile .topbar-controls .privacy-mask-button,
body.mode-tablet .topbar-controls .privacy-display-control form,
body.mode-mobile .topbar-controls .privacy-display-control form { width: auto; }
@media (max-width: 760px) {
  .topbar-controls { width: 100%; justify-content: flex-end; gap: 5px; margin: 2px 0 8px; }
  body.mode-tablet .topbar-controls .privacy-display-control,
  body.mode-mobile .topbar-controls .privacy-display-control { width: auto; margin: 0; }
  body.mode-tablet .topbar-controls .privacy-display-button,
  body.mode-tablet .topbar-controls .privacy-mask-button,
  body.mode-mobile .topbar-controls .privacy-display-button,
  body.mode-mobile .topbar-controls .privacy-mask-button,
  body.mode-tablet .topbar-controls .privacy-display-control form,
  body.mode-mobile .topbar-controls .privacy-display-control form { width: auto; }
  .wotc-theme-choice { padding: 5px 7px; font-size: 11px; }
  .idea-attachment-panel .idea-complete-toggle { margin-top: 0; }
}

/* Customer reuse and clearly separated access roles. */
.customer-link-panel { padding:14px; margin:12px 0 18px; border:1px solid #cbd9ec; border-radius:12px; background:#f4f8ff; }
.customer-link-panel > label { display:flex; align-items:center; gap:12px; font-weight:700; }
.customer-link-panel select { min-width:140px; }
.customer-link-search { margin-top:12px; }
.customer-link-search[hidden] { display:none; }
.customer-link-search > input { max-width:320px; margin-right:8px; }
.customer-link-results { display:grid; gap:8px; max-height:280px; overflow:auto; }
.customer-link-result { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px; border:1px solid #dae2ec; border-radius:8px; background:#fff; }
.access-role-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:16px 0; }
.access-role-card { padding:20px; border:1px solid #ccd8e6; border-top:5px solid #2e5e9e; border-radius:12px; }
.access-role-card.dealer-role { border-top-color:#16816f; }
.access-role-card h3 { margin:0 0 10px; }
.access-role-badge { display:inline-block; padding:4px 10px; border-radius:20px; background:#e8effb; color:#24508c; font-weight:700; }
.dealer-role .access-role-badge { background:#e2f3ee; color:#166b5d; }
.new-account-card { padding:20px; border:2px solid #a9c1e5; border-radius:12px; margin-top:20px; }
html[data-theme="dark"] :is(.customer-link-panel,.customer-link-result,.access-role-card,.new-account-card) { background:#192333; color:#edf2f8; border-color:#3e536d; }
@media(max-width:800px) { .access-role-columns { grid-template-columns:1fr; } }
[data-named-tunnel][hidden], #tunnel-url-link[hidden], #tunnel-copy[hidden] { display:none; }
.access-role-columns { align-items:start; } .access-role-card .access-menu-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .access-role-card .access-menu-check { padding:10px; min-height:0; } @media(max-width:480px) { .access-role-card .access-menu-grid { grid-template-columns:1fr; } }
