.production-edging-panel-stack,
.production-edging-panel,
.production-edging-workspace {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.production-edging-panel,
.production-edging-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.production-edging-workspace {
  display: grid;
  gap: 14px;
}

.production-edging-mode {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: start;
  padding: 3px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--field-bg);
}

.production-edging-mode.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.production-edging-mode button,
.production-edging-queue-tabs button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.production-edging-mode button {
  min-width: 138px;
  padding: 9px 16px;
  border-radius: 9px;
}

.production-edging-mode button.is-active,
.production-edging-queue-tabs button.is-active {
  color: var(--chip-active-text);
  background: var(--chip-active-bg);
}

.production-edging-employee {
  display: grid;
  gap: 14px;
}

.production-edging-shift-card,
.production-edging-report-card,
.production-edging-unloading-card {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--surface-card);
  overflow: hidden;
}

.production-edging-queue {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.production-edging-status-scope {
  padding: 3px 6px 5px;
  border-bottom: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.production-edging-workspace-intro {
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

.production-edging-shift-card,
.production-edging-report-card,
.production-edging-unloading-card {
  padding: 16px;
}

.production-edging-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.production-edging-section-head > div:first-child {
  display: grid;
  gap: 3px;
}

.production-edging-section-head > div:first-child > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.production-edging-section-head > div:first-child > strong {
  font-size: 18px;
}

.production-edging-shift-count,
.production-edging-report-saved {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
  font-size: 12px;
  font-weight: 900;
}

.production-edging-attendance-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--field-bg);
}

.production-edging-attendance-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.production-edging-attendance-table th,
.production-edging-attendance-table td {
  height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--stroke);
  text-align: left;
  white-space: nowrap;
}

.production-edging-attendance-table th {
  height: 36px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.production-edging-attendance-table tr:last-child td {
  border-bottom: 0;
}

.production-edging-attendance-table th:first-child,
.production-edging-attendance-table td:first-child {
  width: 32%;
}

.production-edging-attendance-table td:nth-child(2),
.production-edging-attendance-table td:nth-child(3) {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.production-edging-attendance-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 850;
}

.production-edging-attendance-status.is-active {
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
}

.production-edging-attendance-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.production-edging-attendance-action,
.production-edging-correct-button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.production-edging-attendance-action.is-arrival {
  border-color: var(--accent);
  color: var(--status-ok-text);
  background: var(--status-ok-bg);
}

.production-edging-attendance-action.is-leave {
  color: var(--status-wait-text);
  background: var(--status-wait-bg);
}

.production-edging-correct-button,
.production-edging-saved-row > button,
.production-edging-unloading-row > button {
  border: 1px solid var(--stroke);
  color: var(--muted);
  background: transparent;
}

.production-edging-attendance-no-action {
  color: var(--muted);
}

.production-edging-attendance-history {
  margin-top: 12px;
}

.production-edging-attendance-history summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.production-edging-attendance-history .production-edging-attendance-table-wrap {
  margin-top: 8px;
}

.production-edging-attendance-table.is-history {
  min-width: 520px;
}

.production-edging-report-input input {
  min-width: 0;
  border: 1px solid var(--stroke);
  color: var(--text);
  background: var(--field-bg);
  font: inherit;
  outline: none;
}

.production-edging-report-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.production-edging-report-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: var(--primary-button-text);
  background: var(--primary-button-bg);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.production-edging-report-actions button:disabled {
  opacity: .45;
  cursor: default;
}

.production-edging-empty-line,
.production-edging-readonly-note {
  color: var(--muted);
  font-size: 13px;
}

.production-edging-queue .production-edging-section-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
}

.production-edging-queue-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: var(--field-bg);
}

.production-edging-queue-tabs button {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.production-edging-work-table {
  overflow: visible;
}

.production-edging-work-table th:nth-child(4),
.production-edging-work-table td:nth-child(4),
.production-edging-edge-row > :nth-child(4) {
  white-space: nowrap;
}

.production-edging-task-row {
  cursor: pointer;
}

.production-edging-task-row:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .62);
  outline-offset: -2px;
}

.production-edging-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 18px;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.production-edging-task-row.is-expanded .production-edging-chevron {
  transform: rotate(90deg);
}

.production-edging-material-title small {
  flex: 0 0 auto;
  color: var(--status-work-text);
  font-size: 10px;
  font-weight: 900;
}

.production-edging-edge-row > :nth-child(2) {
  padding-left: 18px;
}

.production-edging-edge-row.status-completed {
  border-color: rgba(52, 211, 153, .28);
}

.production-edging-edge-row.status-in_progress {
  border-color: rgba(245, 158, 11, .36);
}

.production-edging-edge-editor {
  max-width: 560px;
}

.production-edging-empty {
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

.production-edging-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.production-edging-report-field {
  display: grid;
  gap: 6px;
}

.production-edging-report-field > span:first-child {
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.production-edging-report-input {
  position: relative;
  display: block;
}

.production-edging-report-input input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 11px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
}

.production-edging-report-input b {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--muted);
  font-size: 12px;
  transform: translateY(-50%);
  pointer-events: none;
}

.production-edging-report-other {
  margin-top: 12px;
  border-top: 1px solid var(--stroke);
}

.production-edging-report-other summary {
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.production-edging-report-other .production-edging-report-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.production-edging-report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}

.production-edging-report-actions span {
  color: var(--muted);
  font-size: 12px;
}

.production-edging-saved-list,
.production-edging-unloading-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.production-edging-saved-row,
.production-edging-unloading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--surface-soft);
}

.production-edging-saved-row > div {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.production-edging-saved-row > div > strong {
  font-size: 12px;
}

.production-edging-saved-row > div > span {
  color: var(--muted);
  font-size: 11px;
}

.production-edging-saved-row > button,
.production-edging-unloading-row > button {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.production-edging-add-unloading {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  background: var(--field-bg);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.production-edging-add-unloading:disabled {
  opacity: .45;
  cursor: default;
}

.production-edging-unloading-row > span:first-child {
  flex: 0 0 42px;
  color: var(--muted);
  font-size: 11px;
}

.production-edging-unloading-row > strong {
  flex: 0 0 90px;
}

.production-edging-unloading-row > span:nth-child(3) {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 12px;
}

.production-edging-attendance-dialog {
  display: grid;
  gap: 14px;
  max-width: 620px;
}

.production-edging-attendance-dialog > label,
.production-edging-attendance-dialog fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-edging-attendance-dialog > label > input {
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  background: var(--field-bg);
  font: inherit;
}

.production-edging-participant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.production-edging-participant {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  background: var(--field-bg);
}

.production-edging-participant input {
  width: 18px;
  height: 18px;
}

.production-edging-dialog-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
}

.production-edging-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  border: 1px solid var(--stroke-strong);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.production-edging-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--stroke);
}

.production-edging-dialog header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-edging-dialog header h3 {
  margin: 3px 0 0;
  font-size: 20px;
}

.production-edging-dialog header button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 25px;
  cursor: pointer;
}

.production-edging-dialog-summary {
  padding: 10px 18px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.production-edging-detail-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.production-edging-detail-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 150px 70px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--stroke);
}

.production-edging-detail-row:last-child {
  border-bottom: 0;
}

.production-edging-detail-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-edging-detail-row > div b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-edging-detail-row > div span,
.production-edging-detail-row > span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .production-edging-report-grid,
  .production-edging-report-other .production-edging-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  .production-edging-mode,
  .production-edging-section-head,
  .production-edging-report-actions {
    width: 100%;
  }

  .production-edging-mode button {
    min-width: 0;
  }

  .production-edging-section-head,
  .production-edging-report-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .production-edging-queue-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .production-edging-report-grid,
  .production-edging-report-other .production-edging-report-grid {
    grid-template-columns: 1fr;
  }

  .production-edging-report-actions button {
    width: 100%;
  }

  .production-edging-add-unloading {
    width: 100%;
  }

  .production-edging-unloading-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .production-edging-unloading-row > span:nth-child(3) {
    flex-basis: calc(100% - 150px);
  }

  .production-edging-participant-grid {
    grid-template-columns: 1fr;
  }

  .production-edging-detail-row {
    grid-template-columns: 48px minmax(0, 1fr) 58px;
  }

  .production-edging-detail-row > span {
    grid-column: 2;
  }
}
