/* ══════════════════════════════════════════════════════════════
   일지 작성 현황 캘린더 컴포넌트 스타일
   ══════════════════════════════════════════════════════════════ */

/* 날짜 선택기 래퍼 */
.journal-date-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.journal-date-picker-wrapper #journalDateDisplay {
  width: 130px;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  font-family: var(--font-body);
  transition: border-color var(--t-normal);
}

.journal-date-picker-wrapper #journalDateDisplay:hover,
.journal-date-picker-wrapper #journalDateDisplay:focus {
  border-color: var(--hairline-strong);
  outline: none;
}

/* 캘린더 토글 버튼 */
.calendar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--ink);
  transition: all var(--t-normal);
}

.calendar-toggle-btn:hover {
  border-color: var(--hairline-strong);
  background: var(--paper);
}

.calendar-toggle-btn svg {
  pointer-events: none;
}

/* 캘린더 팝업 오버레이 */
#journalCalendarModal {
  z-index: 10001 !important;  /* 일지 편집기(9999)보다 높게, !important로 강제 적용 */
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box;
}

#journalCalendarModal[style*="display: none"] {
  display: none !important;
}

/* 캘린더 팝업 본체 */
.journal-calendar-popup {
  width: 520px;
  min-width: 500px;
  max-width: 96vw;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  font-family: var(--font-body);
}

/* 캘린더 헤더 */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.calendar-month-year {
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--ink);
}

.calendar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink);
  transition: all var(--t-normal);
}

.calendar-nav-btn:hover {
  border-color: var(--hairline-strong);
  background: #fff;
}

.calendar-nav-btn:active {
  transform: scale(0.96);
}

.calendar-nav-btn svg {
  pointer-events: none;
}

/* 요일 헤더 */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 12px 20px 0;
  background: #fff;
}

.calendar-weekday {
  text-align: center;
  font-size: 14px;
  font-weight: var(--weight-medium);
  color: var(--ink-soft);
  padding: 10px 0;
}

/* 날짜 그리드 */
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px 20px 18px;
  background: #fff;
  max-height: 460px;
  overflow-y: auto;
}

/* 날짜 셀 */
.calendar-day {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 64px;
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-top: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  color: var(--ink);
  transition: all var(--t-normal);
  background: #fff;
  border: 1px solid transparent;
}

.calendar-day:hover:not(.calendar-day-empty):not(.calendar-day-disabled) {
  background: var(--paper);
  border-color: var(--hairline);
}

.calendar-day-empty {
  cursor: default;
}

.calendar-day-disabled {
  color: var(--ink-soft);
  cursor: not-allowed;
}

/* 오늘 날짜 표시 */
.calendar-day-today {
  background: rgba(110, 110, 117, 0.06);
}

/* 선택된 날짜 */
.calendar-day-selected {
  background: #1F1D1A !important;
  color: #F4F0E8 !important;
  border-color: #1F1D1A !important;
}

/* 작성 현황 표시자 */
.calendar-day-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  margin-top: 4px;
}

/* O 완료 — 일지 캘린더는 텍스트 O, 온도기록 호환 빈 마커는 점 형태 유지 */
.calendar-day-status-done {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2F2A24;
  font-size: 17px;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.calendar-day-status-done:empty {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4B4540;
  border: 1px solid rgba(75, 69, 64, 0.26);
}

/* △ 작성중/대기중 */
.calendar-day-status-progress,
.calendar-day-status-draft,
.calendar-day-status-resubmit {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7A6652;
  font-size: 18px;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.calendar-day-selected .calendar-day-status-done,
.calendar-day-selected .calendar-day-status-progress,
.calendar-day-selected .calendar-day-status-draft,
.calendar-day-selected .calendar-day-status-resubmit {
  color: #F4F0E8;
}

/* 범례 */
.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 24px;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-symbol {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #2F2A24;
  font-size: 15px;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.legend-symbol.legend-progress {
  color: #7A6652;
  font-size: 16px;
}

.legend-symbol.legend-empty {
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-xs);
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.legend-done {
  background: #4A4A48;
}

.legend-dot.legend-draft {
  background: transparent;
  border: 2px solid #8A8A92;
  box-sizing: border-box;
}

.legend-dot.legend-missing {
  background: transparent;
  border: 2px solid #dc2626;
  box-sizing: border-box;
}

.legend-dot.legend-resubmit {
  background: var(--seal-amber);
  border-radius: 2px;
}

.legend-label {
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}

/* 모바일 반응형 */
@media (max-width: 480px) {
  .journal-calendar-popup {
    width: 360px;
    min-width: 280px;
  }

  .calendar-days {
    gap: 4px;
    padding: 8px 12px 14px;
  }

  .calendar-day {
    min-height: 44px;
    min-width: 44px;
    font-size: 14px;
    padding-top: 9px;
  }

  .calendar-day-status {
    min-height: 16px;
    margin-top: 3px;
  }

  .calendar-day-status-done,
  .calendar-day-status-progress,
  .calendar-day-status-draft,
  .calendar-day-status-resubmit {
    width: 18px;
    height: 16px;
    font-size: 15px;
  }

  .calendar-legend {
    gap: 12px;
    padding: 10px 16px;
  }

  .legend-item {
    gap: 4px;
  }

  .legend-label {
    font-size: 11px;
  }
}

/* 타블릿 터치 영역 최소 44px 유지 */
@media (pointer: coarse) {
  .calendar-day,
  .calendar-nav-btn,
  .calendar-toggle-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* raw_excel now reuses the same calendar UI as temperature records.
   Keep only a scoped overflow guard, not a different pill-button design. */
.raw-excel-calendar-days {
  overflow-x: hidden;
}

.raw-excel-main-grid,
.raw-excel-daily-grid {
  max-width: 100%;
}
@media (max-width: 1180px) {
  .raw-excel-main-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 980px) {
  .raw-excel-daily-grid {
    grid-template-columns: 1fr !important;
  }
}


/* raw_excel sheet-like detail renderer */
.raw-excel-sheet-wrap {
  width: 100%;
}
.raw-excel-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink, #111827);
}
.raw-excel-sheet-toolbar span {
  margin-left: 8px;
  color: var(--gray4, #52525b);
  font-size: 12px;
  font-weight: 700;
}
.raw-excel-sheet-toolbar button,
.rx-sheet-actions button {
  border: 1px solid var(--gray2, #d4d4d8);
  background: #fff;
  color: var(--ink, #111827);
  border-radius: 2px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.raw-excel-paper {
  background: #f8f8f8;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  padding: 12px;
  overflow: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.raw-excel-top-summary {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #d4d4d8;
  border-radius: 2px;
  background: #f8fafc;
}
.raw-excel-top-summary .rx-esign-panel {
  flex: 1 1 520px;
  margin-top: 0;
}
.raw-excel-top-summary .rx-sheet-actions {
  flex: 0 0 auto;
  align-items: center;
  margin-top: 0;
}
.raw-excel-section-tabs {
  position: relative;
  z-index: 6;
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.raw-excel-section-tabs button {
  border: 1px solid #d4d4d8;
  background: #fff;
  color: #111827;
  border-radius: 2px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.raw-excel-section-tab.is-active,
.raw-excel-section-tabs button.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.raw-excel-sheet-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  overflow: visible;
}
.raw-excel-sheet-grid .rx-sheet-section:not(.is-active) {
  display: none;
}
.raw-excel-sheet-grid .rx-sheet-section.is-active {
  display: block;
}
.raw-excel-sheet-grid .rx-production-sheet {
  width: 100%;
  min-width: 1040px;
}
.raw-excel-sheet-grid .rx-material-sheet {
  width: 100%;
  min-width: 720px;
}
.rx-sheet-section {
  background: #fff;
}
.rx-excel-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 12px;
  color: #111;
}
.rx-excel-table th,
.rx-excel-table td {
  border: 1px solid #222;
  height: 28px;
  padding: 0 4px;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
  overflow: hidden;
}
.rx-title {
  height: 52px !important;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 4px;
  background: #fff;
}
.rx-approval-head,
.rx-approval-cell,
.rx-head,
.rx-label,
.rx-total {
  background: #f2f2f2;
  font-weight: 900;
}
.rx-approval-head {
  width: 34px;
  white-space: pre-line;
}
.rx-approval-cell,
.rx-approval-sign {
  height: 28px !important;
}
.rx-approval-name,
.rx-approval-sign,
.rx-input-cell,
.rx-date,
.rx-total-input,
.rx-note-cell {
  background: #fff;
}
.rx-label {
  text-align: left !important;
  padding-left: 8px !important;
}
.rx-unit {
  text-align: right !important;
  font-weight: 800;
  background: #fff;
}
.rx-num {
  width: 34px;
  font-weight: 700;
  background: #fff;
}
.rx-material-name {
  text-align: left !important;
  padding-left: 8px !important;
  background: #fff;
  font-weight: 700;
}
.rx-empty-material {
  height: 92px !important;
  color: #52525b;
  background: #fff;
  font-weight: 700;
}
.rx-w-no { width: 34px; }
.rx-w-product { width: 128px; }
.rx-w-qty { width: 82px; }
.rx-w-action { width: 74px; }
.rx-w-small { width: 58px; }
.rx-w-mat { width: 190px; }
.rx-w-matnum { width: 118px; }
.rx-w-matnum-wide { width: 128px; }
.rx-cell-control,
.raw-excel-sheet-wrap input,
.raw-excel-sheet-wrap select,
.raw-excel-sheet-wrap textarea {
  width: 100%;
  height: 100%;
  min-height: 26px;
  border: 0 !important;
  outline: 0;
  border-radius: 0 !important;
  box-sizing: border-box;
  background: transparent !important;
  text-align: center;
  font: inherit;
  padding: 0 3px !important;
}
.raw-excel-sheet-wrap select {
  text-align-last: center;
}
.rx-hidden-select {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}
.rx-note {
  min-height: 74px !important;
  padding: 8px !important;
  text-align: left !important;
  resize: vertical;
}
.rx-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.rx-sheet-actions .rx-primary {
  background: #2f2f2f;
  border-color: #2f2f2f;
  color: #fff;
}
@media (max-width: 900px) {
  .raw-excel-top-summary {
    flex-direction: column;
  }
  .raw-excel-top-summary .rx-sheet-actions {
    justify-content: flex-start;
  }
  .raw-excel-paper {
    padding: 8px;
  }
  .raw-excel-sheet-grid {
    min-width: 0;
  }
  .raw-excel-sheet-grid .rx-production-sheet {
    min-width: 1040px;
  }
  .raw-excel-sheet-grid .rx-material-sheet {
    min-width: 720px;
  }
}

.rx-material-unit { text-align: center !important; white-space: nowrap; font-size: 11px; letter-spacing: 0; }

.rx-esign-panel {
  margin-top: 10px;
  border: 1px solid #222;
  background: #fff;
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 54px;
  font-family: Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
.rx-esign-title {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #222;
  background: #f2f2f2;
  font-weight: 900;
}
.rx-esign-box {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #52525b;
  font-size: 12px;
  font-weight: 700;
}

.rx-product-empty-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px 0;
  padding: 10px 12px;
  border: 1px solid #d4d4d8;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 700;
}
.rx-product-empty-hint span {
  color: #9a3412;
  font-weight: 600;
}

.rx-fixed-product-cell {
  background:#fff;
  color:#111827;
  font-weight:800;
  text-align:left;
  padding:0 8px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.rx-fixed-product-name { display:block; overflow:hidden; text-overflow:ellipsis; }
.rx-fixed-product-empty { color:#a1a1aa; font-weight:700; }
.rx-fixed-product-add {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:3px 9px;
  border:1px dashed #9ca3af;
  border-radius:999px;
  background:#f8fafc;
  color:#4b5563;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.rx-fixed-product-add:hover {
  background:#eef2ff;
  border-color:#6b7280;
  color:#111827;
}

.rx-tool-button {
  border:1px solid #111827;
  border-radius:7px;
  background:#111827;
  color:#fff;
  padding:9px 12px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.rx-tool-button:hover { background:#27272a; }

.rx-archive-guide {
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-bottom:12px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#f8fafc;
  color:#374151;
  font-size:12px;
}
.rx-archive-guide b { color:#111827; font-size:13px; }
.rx-recipe-table { border:1px solid #e5e7eb; border-radius:10px; overflow:hidden; }
.rx-recipe-head, .rx-recipe-row { display:grid; grid-template-columns: 1.1fr .85fr .7fr .75fr; gap:0; align-items:center; }
.rx-recipe-head { background:#f3f4f6; color:#111827; font-size:12px; font-weight:800; }
.rx-recipe-head span, .rx-recipe-row span { padding:9px 10px; border-right:1px solid #e5e7eb; }
.rx-recipe-row { border-top:1px solid #e5e7eb; }
.rx-recipe-row input[type="number"] { margin:6px 8px; border:1px solid #d1d5db; border-radius:7px; padding:7px 8px; font-size:13px; }
.rx-ledger-check {
  display:flex;
  align-items:center;
  gap:6px;
  margin:6px 8px;
  color:#111827;
  font-size:12px;
  font-weight:800;
}
.rx-ledger-check input { width:auto; height:auto; margin:0; }
.rx-submix-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:6px 8px;
  min-height:28px;
  border:1px solid #d1d5db;
  border-radius:999px;
  background:#f8fafc;
  color:#374151;
  font-size:12px;
  font-weight:800;
}


.raw-excel-page {
  max-width:1540px;
  margin:0 auto;
}
.raw-excel-header-tools {
  width:min(760px, 54vw);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  align-items:stretch;
}
.rx-top-action-card {
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:76px;
  padding:12px 14px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,0.05);
  cursor:pointer;
}
.rx-top-action-card-primary { border-color:#d1d5db; background:#f8fafc; }
.rx-top-action-card div { min-width:0; flex:1 1 auto; }
.rx-top-action-card b {
  display:block;
  color:#111827;
  font-size:13px;
  font-weight:900;
  line-height:1.25;
}
.rx-top-action-card span {
  display:block;
  margin-top:4px;
  color:#6b7280;
  font-size:11px;
  font-weight:700;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.rx-top-action-card button {
  flex:0 0 auto;
  border:1px solid #111827;
  border-radius:8px;
  background:#111827;
  color:#fff;
  min-width:84px;
  padding:8px 10px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.rx-top-action-card-primary button { border-color:#111827; background:#111827; }
.rx-import-status {
  display:inline-flex !important;
  align-items:center;
  width:max-content;
  max-width:100%;
  margin-top:6px !important;
  padding:3px 7px;
  border-radius:999px;
  font-style:normal;
  font-size:11px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
}
.rx-import-status.is-empty {
  border:1px solid #e5e7eb;
  background:#fff;
  color:#6b7280;
}
.rx-import-status.is-ready {
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#334155;
}
@media (max-width: 1080px) {
  .raw-excel-page .ccp-page-header { flex-direction:column; }
  .raw-excel-header-tools { width:100%; grid-template-columns:1fr; }
}
@media (min-width: 1280px) {
  .raw-excel-page { padding-left:28px !important; padding-right:28px !important; }
}

.rx-import-modal,
.rx-product-picker-modal {
  position:fixed;
  inset:0;
  z-index:9200;
  background:rgba(15,23,42,0.38);
  padding:28px;
  box-sizing:border-box;
}
.rx-import-dialog,
.rx-product-picker-dialog {
  width:min(920px, calc(100vw - 56px));
  max-width:920px;
  margin:0 auto;
  background:#fff;
  border-radius:8px;
  box-shadow:0 20px 52px rgba(0,0,0,0.22);
  max-height:calc(100vh - 56px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.rx-import-head,
.rx-product-picker-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 24px;
  border-bottom:1px solid #e5e7eb;
}
.rx-import-title,
.rx-product-picker-title {
  color:#111827;
  font-size:17px;
  font-weight:900;
}
.rx-import-sub,
.rx-product-picker-sub {
  margin-top:3px;
  color:#6b7280;
  font-size:12px;
  font-weight:700;
}
.rx-import-head button,
.rx-product-picker-head button {
  width:32px;
  height:32px;
  border:1px solid #d1d5db;
  border-radius:7px;
  background:#fff;
  color:#111827;
  cursor:pointer;
}
.rx-import-body,
.rx-product-picker-body {
  padding:18px 24px 24px;
  overflow:auto;
}
.rx-product-picker-tools {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:18px 24px 0;
  padding:16px 18px;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#f8fafc;
  color:#111827;
  font-size:12px;
  font-weight:800;
}
.rx-product-picker-tools div { min-width:0; }
.rx-product-picker-tools b {
  display:block;
  color:#111827;
  font-size:13px;
  font-weight:900;
  line-height:1.25;
}
.rx-product-picker-tools span {
  display:block;
  margin-top:4px;
  color:#6b7280;
  line-height:1.35;
}
.rx-product-picker-import {
  flex:0 0 auto;
  border:1px solid #111827;
  border-radius:8px;
  background:#111827;
  color:#fff;
  padding:9px 12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.rx-import-body label {
  display:block;
  margin:0 0 8px;
  color:#111827;
  font-size:12px;
  font-weight:800;
}
.rx-import-file-row {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.rx-import-file-row input[type="file"] { flex:1 1 auto; }
.rx-import-file-row button {
  flex:0 0 auto;
  border:1px solid #111827;
  border-radius:8px;
  background:#111827;
  color:#fff;
  padding:9px 14px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.rx-import-body input[type="file"],
.rx-import-body textarea,
.rx-product-picker-search input {
  width:100%;
  min-height:38px;
  border:1px solid #d1d5db !important;
  border-radius:7px !important;
  background:#fff !important;
  box-sizing:border-box;
  color:#111827;
  font:inherit;
  text-align:left;
  padding:8px 10px !important;
}
.rx-import-body textarea {
  min-height:150px;
  resize:vertical;
}
.rx-import-actions,
.rx-product-picker-search {
  display:flex;
  gap:10px;
  align-items:center;
  margin:14px 24px 0;
}
.rx-import-actions { margin-left:0; margin-right:0; }
.rx-import-actions button,
.rx-product-picker-search button {
  border:1px solid #111827;
  border-radius:7px;
  background:#111827;
  color:#fff;
  padding:9px 12px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.rx-import-result {
  min-height:18px;
  margin-top:10px;
  color:#166534;
  font-size:12px;
  font-weight:800;
}
.rx-import-result.is-error { color:#b91c1c; }

.rx-report-list-wrap {
  margin-top:14px;
  border-top:1px solid #e5e7eb;
  padding-top:12px;
}
.rx-report-list-title {
  color:#111827;
  font-size:12px;
  font-weight:900;
  margin-bottom:8px;
}
.rx-report-list { display:grid; gap:8px; }
.rx-report-empty {
  padding:10px 12px;
  border:1px dashed #d1d5db;
  border-radius:9px;
  color:#6b7280;
  font-size:12px;
  font-weight:800;
}
.rx-report-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
}
.rx-report-row b {
  display:block;
  color:#111827;
  font-size:12px;
  font-weight:900;
}
.rx-report-row span {
  display:block;
  margin-top:3px;
  color:#6b7280;
  font-size:11px;
  font-weight:700;
}
.rx-report-row button,
.rx-report-remove-btn {
  min-width:72px;
  height:28px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#374151;
  font-size:11px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  padding:0 9px;
}
.rx-report-remove-btn:hover {
  border-color:#9ca3af;
  background:#f8fafc;
  color:#111827;
}
.rx-product-picker-item {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
  border:1px solid #e5e7eb;
  border-radius:7px;
  background:#fff;
  color:#111827;
  padding:10px 12px;
  text-align:left;
  cursor:pointer;
}
.rx-product-picker-item:hover { background:#f8fafc; border-color:#9ca3af; }
.rx-product-picker-item b,
.rx-product-picker-name { font-size:13px; font-weight:900; }
.rx-product-picker-item span,
.rx-product-picker-meta { color:#6b7280; font-size:12px; font-weight:700; }
.rx-product-picker-empty {
  padding:24px;
  border:1px dashed #d1d5db;
  border-radius:8px;
  color:#6b7280;
  text-align:center;
  font-size:13px;
  font-weight:800;
}

.rx-package-config { display:grid; grid-template-columns:90px 1fr auto; gap:8px; align-items:center; border:1px solid #e5e7eb; border-radius:10px; padding:10px; }
.rx-package-config label { font-size:12px; font-weight:800; color:#111827; }
.rx-package-config input { border:1px solid #d1d5db; border-radius:7px; padding:8px 10px; font-size:13px; }
.rx-package-config button { border:1px solid #111827; border-radius:7px; background:#111827; color:#fff; padding:8px 12px; font-size:12px; font-weight:800; cursor:pointer; }
.rx-package-preview { margin-top:10px; color:#4b5563; font-size:12px; }
.rx-package-preview b { display:inline-block; margin:2px; padding:3px 7px; border-radius:999px; background:#f3f4f6; color:#111827; }

.rx-name-pick {
  width:100%;
  min-height:32px;
  border:0;
  background:#fff;
  color:#111827;
  font:inherit;
  text-align:center;
  cursor:pointer;
  padding:5px 6px;
}
.rx-name-pick:hover { background:#f8fafc; outline:1px dashed #9ca3af; outline-offset:-2px; }

/* raw_excel readability: prevent wrapped headers/cells and hide number spinners */
.raw-excel-sheet-wrap .ccp-page-title-icon,
.ccp-page-title-icon {
  border-radius: 9px;
}
.rx-excel-table th,
.rx-excel-table td {
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rx-excel-table .rx-head,
.rx-excel-table .rx-total,
.rx-excel-table .rx-label {
  line-height: 1.15;
  font-size: 11px;
  padding-left: 4px;
  padding-right: 4px;
}
.raw-excel-sheet-wrap input[type="number"]::-webkit-outer-spin-button,
.raw-excel-sheet-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.raw-excel-sheet-wrap input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.rx-name-pick {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}
.rx-name-empty {
  color:#9ca3af;
  font-size:11px;
  font-weight:600;
}

.rx-worker-count-cell input { text-align: right !important; padding-right: 5px !important; }
.rx-fixed-suffix {
  text-align:left !important;
  padding-left:4px !important;
  font-weight:800;
  background:#fff;
}
.rx-package-config-cell { text-align:right !important; padding-right:6px !important; }
.rx-package-inline-btn {
  border:1px solid #9ca3af;
  border-radius:4px;
  background:#fff;
  color:#374151;
  font-size:11px;
  font-weight:800;
  padding:4px 7px;
  cursor:pointer;
  white-space:nowrap;
}
.rx-package-inline-btn:hover { background:#f3f4f6; }

.rx-package-edit-head { padding:0 !important; background:#fffef7 !important; }
.rx-package-edit-head .rx-package-size-input {
  width: calc(100% - 18px) !important;
  min-width: 28px;
  height: 28px !important;
  min-height: 28px !important;
  border: 1px solid #9ca3af !important;
  border-radius: 4px !important;
  background: #fff !important;
  text-align: right !important;
  padding: 0 3px !important;
  font-size: 11px;
  font-weight: 800;
}
.rx-package-edit-head span { display:inline-block; width:16px; font-size:10px; font-weight:800; }
.rx-package-cancel-btn { margin-left:4px; border-color:#d1d5db; color:#6b7280; }

.raw-excel-paper { position: relative; }
.raw-excel-watermark {
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  user-select:none;
  color: rgba(17,24,39,0.095);
  font-size: clamp(52px, 8vw, 112px);
  font-weight: 900;
  letter-spacing: -0.06em;
  transform: rotate(-18deg);
  z-index: 5;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}

.rx-esign-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:8px; align-items:stretch; }
.rx-sign-card { min-width:0; text-align:center; padding:9px 10px; background:#fff; border:1px solid #d1d5db; border-radius:10px; box-shadow:0 1px 2px rgba(15,23,42,0.04); }
.rx-sign-role { font-size:11px; line-height:1.25; color:#4b5563; font-weight:900; margin-bottom:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rx-sign-name { font-weight:900; color:#111827; font-size:12px; margin-bottom:5px; min-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rx-sign-name.rx-sign-wait { color:#9ca3af; }
.rx-sign-img { max-width:142px; max-height:48px; border:1px solid #d1d5db; border-radius:4px; background:#fff; object-fit:contain; }
.rx-sign-empty { color:#9ca3af; font-size:10px; padding:10px 0; white-space:nowrap; }
.rx-sign-time { font-size:9px; color:#9ca3af; margin-top:4px; white-space:nowrap; }

@media (max-width: 760px) {
  .rx-esign-cards {
    display:flex;
    overflow-x:auto;
    padding-bottom:4px;
    scroll-snap-type:x proximity;
  }
  .rx-sign-card {
    flex:0 0 190px;
    scroll-snap-align:start;
  }
}


/* Polished e-sign panel: override the old 2-column approval-table layout. */
.rx-esign-panel {
  display:block;
  min-height:0;
  margin-top:0;
  padding:10px;
  border:1px solid #d4d4d8;
  border-radius:10px;
  background:#f8fafc;
  font-family: Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
.rx-esign-panel .rx-esign-title {
  display:block;
  border-right:0;
  background:transparent;
  font-size:13px;
  line-height:1.2;
  color:#111827;
  white-space:nowrap;
}
.rx-esign-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  min-width:0;
}
.rx-esign-status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:max-content;
  white-space:nowrap;
  font-size:12px;
  font-weight:900;
  color:#374151;
  border:1px solid #d1d5db;
  border-radius:999px;
  padding:4px 10px;
  background:#fff;
}

@media (max-width: 640px) {
  .rx-product-picker-tools { flex-direction:column; align-items:stretch; }
  .rx-product-picker-import { width:100%; }
}

.audit-mode-journal-overview-panel[hidden],
.audit-mode-journal-overview-panel [hidden],
.audit-mode-shell [data-audit-standard-tool][hidden],
#audit-mode-standard-results[hidden] {
  display: none !important;
}

.audit-mode-journal-overview-panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

#audit-mode-journal-overview-root,
#audit-mode-journal-overview-detail {
  min-width: 0;
}

#audit-mode-journal-overview-detail {
  min-height: 360px;
  padding-bottom: 20px;
}

.rx-product-cell-wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  width:100%;
}
.rx-product-cell-wrap .rx-name-pick {
  flex:1 1 auto;
  min-width:0;
  max-width:calc(100% - 74px);
}
.rx-row-remove-btn {
  flex:0 0 66px;
  min-width:66px;
  border:1px solid #9ca3af;
  border-radius:999px;
  background:#f8fafc;
  color:#374151;
  height:24px;
  padding:0 8px;
  font-size:10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 1px 2px rgba(15,23,42,0.08);
}
.rx-row-remove-btn:hover {
  border-color:#4b5563;
  background:#eef2f7;
  color:#111827;
}

.rx-product-cell-stack {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  width:100%;
  min-width:0;
  padding:1px 0 2px;
}
.rx-product-cell-stack .rx-name-pick {
  width:100%;
  min-height:20px;
  padding:1px 4px;
  line-height:1.15;
}
.rx-product-cell-stack .rx-row-remove-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  min-width:58px;
  height:18px;
  padding:0 7px;
  border:1px solid #9ca3af;
  border-radius:999px;
  background:#f8fafc;
  color:#374151;
  font-size:10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:none;
}
.rx-product-cell-stack .rx-row-remove-btn:hover {
  border-color:#4b5563;
  background:#eef2f7;
  color:#111827;
}

.rx-action-head,
.rx-action-cell {
  text-align:center !important;
  vertical-align:middle !important;
  white-space:nowrap;
}
.rx-action-cell {
  padding:2px 3px !important;
  background:#fff;
}
.rx-action-cell .rx-row-remove-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  height:22px;
  padding:0 7px;
  border:1px solid #9ca3af;
  border-radius:999px;
  background:#f8fafc;
  color:#374151;
  font-size:10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  white-space:nowrap;
}
.rx-action-cell .rx-row-remove-btn:hover {
  border-color:#4b5563;
  background:#eef2f7;
  color:#111827;
}

.rx-qty-display { min-width: 104px; display:flex; align-items:center; justify-content:center; gap:4px; white-space:nowrap; padding:8px 6px; box-sizing:border-box; }
.rx-qty-number { font-variant-numeric: tabular-nums; font-weight:700; color:#111827; letter-spacing:-0.01em; }
.rx-qty-unit { font-size:11px; color:#6b7280; font-weight:700; flex:0 0 auto; }
.rx-material-table .rx-qty-cell { min-width:118px; }

/* 전체 일지 작성현황 — 공통 읽기 전용 화면 */
#content-journal-overview {
  padding:20px;
}

.journal-overview-shell {
  max-width:1480px;
  margin:0 auto;
  color:var(--mono-text, #18181b);
}

.journal-overview-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:16px;
  padding:4px 2px;
}

.journal-overview-header h1 {
  margin:2px 0 6px;
  font-size:24px;
  line-height:1.25;
  letter-spacing:-0.025em;
}

.journal-overview-header p {
  margin:0;
  color:var(--gray4, #52525b);
  font-size:13px;
  line-height:1.55;
}

.journal-overview-eyebrow {
  color:var(--gray4, #52525b) !important;
  font-size:11px !important;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.journal-overview-readonly-badge {
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid var(--gray2, #e4e4e7);
  border-radius:999px;
  background:var(--white, #fff);
  color:var(--gray4, #52525b);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.journal-overview-layout {
  display:grid;
  grid-template-columns:minmax(560px, 1.35fr) minmax(390px, .9fr);
  gap:16px;
  align-items:start;
}

.journal-overview-list-panel,
.journal-overview-calendar-panel {
  min-width:0;
  border:1px solid var(--gray2, #e4e4e7);
  border-radius:14px;
  background:var(--white, #fff);
  box-shadow:0 2px 10px rgba(24, 24, 27, .04);
}

.journal-overview-list-panel {
  overflow:hidden;
}

.journal-overview-calendar-panel {
  position:sticky;
  top:16px;
  padding:18px;
}

.journal-overview-team + .journal-overview-team {
  border-top:8px solid var(--gray1, #f4f4f5);
}

.journal-overview-team-title {
  margin:0;
  padding:14px 16px 10px;
  font-size:15px;
  line-height:1.4;
}

.journal-overview-table {
  width:100%;
}

.journal-overview-row {
  display:grid;
  grid-template-columns:minmax(160px, 1.45fr) minmax(70px, .65fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(124px, .95fr);
  align-items:center;
  min-height:58px;
  border-top:1px solid var(--gray2, #e4e4e7);
  transition:background-color .15s ease;
}

.journal-overview-row.is-selected {
  background:#f4f4f5;
  box-shadow:inset 3px 0 #444;
}

.journal-overview-row-head {
  min-height:34px;
  border-top:0;
  border-bottom:1px solid var(--gray2, #e4e4e7);
  background:var(--gray1, #f4f4f5);
  color:var(--gray4, #52525b);
  font-size:11px;
  font-weight:800;
}

.journal-overview-row-head span,
.journal-overview-cell {
  min-width:0;
  padding:8px 10px;
}

.journal-overview-cell {
  color:var(--gray4, #52525b);
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
}

.journal-overview-name {
  color:var(--mono-text, #18181b);
  font-size:13px;
  font-weight:800;
}

.journal-overview-action-cell {
  display:flex;
  justify-content:flex-end;
}

.journal-overview-action {
  min-height:44px;
  width:100%;
  max-width:140px;
  padding:8px 10px;
  border:1px solid #444;
  border-radius:8px;
  background:#444;
  color:#fff;
  font-family:inherit;
  font-size:11px;
  font-weight:800;
  line-height:1.25;
  cursor:pointer;
}

.journal-overview-action:disabled {
  border-color:var(--gray2, #e4e4e7);
  background:var(--gray1, #f4f4f5);
  color:var(--gray4, #52525b);
  cursor:not-allowed;
}

.journal-overview-action:hover:not(:disabled) {
  background:#27272a;
}

.journal-overview-action:focus-visible, .journal-overview-month-nav button:focus-visible, .journal-overview-retry:focus-visible, .journal-overview-chooser button:focus-visible {
  outline:3px solid #2563eb;
  outline-offset:2px;
}

#menu-journal-overview:focus-visible {
  outline:3px solid #2563eb;
  outline-offset:-3px;
}

.journal-overview-empty,
.journal-overview-calendar-placeholder,
.journal-overview-state {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:240px;
  padding:28px;
  color:var(--gray4, #52525b);
  font-size:13px;
  line-height:1.7;
  text-align:center;
}

.journal-overview-calendar-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.journal-overview-calendar-team {
  display:block;
  margin-bottom:2px;
  color:var(--gray4, #52525b);
  font-size:11px;
  font-weight:700;
}

.journal-overview-calendar-title {
  margin:0;
  font-size:16px;
  line-height:1.35;
}

.journal-overview-month-nav {
  display:flex;
  align-items:center;
  gap:4px;
  flex:0 0 auto;
}

.journal-overview-month-nav strong {
  min-width:88px;
  text-align:center;
  font-size:13px;
}

.journal-overview-month-nav button {
  width:44px;
  height:44px;
  border:1px solid var(--gray2, #e4e4e7);
  border-radius:8px;
  background:var(--white, #fff);
  color:var(--mono-text, #18181b);
  font-size:22px;
  cursor:pointer;
}

.journal-overview-weekdays {
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  padding:0 2px;
  color:var(--gray4, #52525b);
  font-size:11px;
  font-weight:800;
  text-align:center;
}

.journal-overview-calendar-days {
  grid-template-columns:repeat(7, minmax(0, 1fr));
  width:100%;
  min-width:0;
  min-height:292px;
  max-height:none;
  gap:4px;
  padding:8px 0 10px;
  overflow-y:visible;
  box-sizing:border-box;
}

.journal-overview-calendar-days .calendar-day {
  min-width:0;
  min-height:44px;
  padding-top:7px;
  font-size:14px;
}

.journal-overview-legend {
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--gray2, #e4e4e7);
  color:var(--gray4, #52525b);
  font-size:11px;
}

.journal-overview-legend span {
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.journal-overview-legend b {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:50%;
}

.journal-overview-legend .is-done {
  background:var(--mono-text, #18181b);
  color:#fff;
}

.journal-overview-legend .is-progress {
  border:1px solid var(--gray3, #a1a1aa);
  color:var(--mono-text, #18181b);
}

.journal-overview-legend .is-empty {
  border:1px solid var(--gray2, #e4e4e7);
}

.journal-overview-live {
  min-height:42px;
  padding:12px 2px 0;
  color:var(--gray4, #52525b);
  font-size:12px;
  line-height:1.5;
}

.journal-overview-retry {
  min-height:44px;
  margin-left:8px;
  padding:8px 14px;
  border:1px solid var(--mono-text, #18181b);
  border-radius:8px;
  background:var(--white, #fff);
  color:var(--mono-text, #18181b);
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

.journal-overview-state {
  flex-direction:column;
  gap:10px;
  border:1px solid var(--gray2, #e4e4e7);
  border-radius:14px;
  background:var(--white, #fff);
}

.journal-overview-chooser {
  position:fixed;
  inset:0;
  z-index:10030;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(24, 24, 27, .58);
  overscroll-behavior:contain;
}

.journal-overview-chooser-card {
  width:min(520px, 100%);
  max-height:min(680px, 88vh);
  overflow:auto;
  overscroll-behavior:contain;
  border-radius:14px;
  background:#fff;
  box-shadow:0 24px 70px rgba(0, 0, 0, .24);
}

.journal-overview-chooser-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:20px;
  border-bottom:1px solid #e4e4e7;
}

.journal-overview-chooser-head span {
  color:#52525b;
  font-size:12px;
  font-weight:700;
}

.journal-overview-chooser-head h2 {
  margin:3px 0 0;
  font-size:17px;
}

.journal-overview-chooser-head button {
  width:44px;
  height:44px;
  border:1px solid #e4e4e7;
  border-radius:8px;
  background:#fff;
  font-size:22px;
  cursor:pointer;
}

.journal-overview-chooser-list {
  display:grid;
  gap:8px;
  padding:16px 20px 20px;
}

.journal-overview-chooser-list button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:52px;
  padding:10px 12px;
  border:1px solid #e4e4e7;
  border-radius:8px;
  background:#fff;
  color:#18181b;
  font-family:inherit;
  font-size:13px;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}

.journal-overview-chooser-list small {
  flex:0 0 auto;
  color:#71717a;
  font-size:10px;
}

@media (max-width: 1180px) {
  .journal-overview-layout {
    grid-template-columns:minmax(520px, 1.2fr) minmax(360px, .8fr);
  }
  .journal-overview-row {
    grid-template-columns:minmax(150px, 1.35fr) 68px minmax(78px, .75fr) minmax(78px, .75fr) 122px;
  }
}

@media (max-width: 900px) {
  #content-journal-overview { padding:14px; }
  .journal-overview-layout { grid-template-columns:1fr; }
  .journal-overview-calendar-panel { position:static; }
  .journal-overview-header { align-items:center; }
}

@media (max-width: 680px) {
  .journal-overview-header { align-items:flex-start; flex-direction:column; gap:12px; }
  .journal-overview-row-head { display:none; }
  .journal-overview-row {
    grid-template-columns:1fr 1fr;
    gap:0;
    padding:8px;
  }
  .journal-overview-cell { display:grid; grid-template-columns:76px 1fr; align-items:center; padding:5px 6px; }
  .journal-overview-cell::before { content:attr(data-label); color:var(--gray4, #52525b); font-size:10px; font-weight:800; }
  .journal-overview-name, .journal-overview-action-cell { grid-column:1 / -1; }
  .journal-overview-action-cell { display:grid; }
  .journal-overview-action { max-width:none; }
  .journal-overview-calendar-heading { align-items:flex-start; flex-direction:column; }
  .journal-overview-month-nav { width:100%; justify-content:space-between; }
}
