@charset "UTF-8";

.wage-main-card {
  padding: 28px;
}

.wage-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.calendar-panel,
.editor-panel,
.summary-card,
.history-card,
.default-settings-card {
  min-width: 0;
}

/* 달력 */
.calendar-panel {
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
  padding: 24px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #111827;
}

.calendar-nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.calendar-nav-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-weekdays {
  margin-bottom: 10px;
}

.calendar-weekdays div {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  padding: 6px 0;
}

.calendar-day {
  min-height: 92px;
  border: 1px solid #edf1f5;
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.calendar-day:hover {
  border-color: #cfd8e3;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.calendar-day.is-empty {
  background: #f8fafc;
  border-style: dashed;
  cursor: default;
}

.calendar-day.is-empty:hover {
  transform: none;
  box-shadow: none;
}

.calendar-day.is-today {
  border-color: #cbd5e1;
}

.calendar-day.is-selected {
  border-color: #0f172a;
  background: #f8fafc;
}

.calendar-day.has-data {
  background: linear-gradient(180deg, #fff6fb 0%, #ffe8f3 100%);
  border-color: #f3b6d2;
}

.calendar-day.has-data.is-selected {
  background: linear-gradient(180deg, #ffeef7 0%, #ffdce8 100%);
  border-color: #e88ab7;
}

.calendar-day-num {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  position: relative;
  z-index: 1;
}

.calendar-day-meta {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 28px;
  position: relative;
  z-index: 1;
}

.calendar-day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ec4899;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.22);
  flex-shrink: 0;
}

.calendar-day.has-data::after {
  content: "";
  position: absolute;
  top: -18px;
  right: -18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.08);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  font-size: 13px;
  color: #64748b;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-selected {
  background: #111827;
}

.legend-worked {
  background: #ec4899;
}

.legend-today {
  background: #94a3b8;
}

/* 입력 패널 */
.editor-panel {
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
  padding: 24px;
}

.editor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.editor-date {
  margin: 14px 0 18px;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  line-height: 1.4;
}

.current-apply-box {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  background: #fbfcfe;
}

.current-apply-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.current-apply-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}

.utility-field + .utility-field {
  margin-top: 18px;
}

.utility-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}

.input-with-unit {
  position: relative;
}

.input-with-unit .utility-input {
  padding-right: 58px;
}

.input-unit {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
}

.quick-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.quick-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.field-help {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.utility-check-wrap {
  margin-top: 18px;
}

.utility-check-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
}

.utility-check-label input {
  width: 18px;
  height: 18px;
}

.utility-btn-danger-soft {
  border-color: #f3c7d9;
  background: #fff5f9;
  color: #be185d;
}

.utility-btn-danger-soft:hover {
  background: #ffeaf3;
  border-color: #eca7c5;
  color: #9d174d;
}

.editor-note-box,
.default-note-box {
  margin-top: 18px;
  min-height: 82px;
  display: flex;
  align-items: center;
}

.editor-note-box p,
.default-note-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}

/* 기본값 */
.default-settings-card {
  margin-top: 24px;
  padding: 24px;
}

.default-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* 요약 */
.summary-card {
  margin-top: 24px;
  padding: 24px;
}

.summary-top {
  margin-bottom: 18px;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.summary-desc {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: #64748b;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.summary-item {
  border: 1px solid #edf1f5;
  border-radius: 18px;
  background: #fff;
  padding: 16px 14px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.summary-item-accent {
  background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
  border-color: #f5c2d8;
}

.summary-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.summary-item strong {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #111827;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 내역 */
.history-card {
  margin-top: 24px;
  padding: 24px;
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.history-top h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
}

.history-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.history-table th,
.history-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: center;
  font-size: 14px;
}

.history-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
}

.history-table td {
  color: #334155;
}

.history-table tbody tr:hover {
  background: #fafcff;
}

.empty-row td {
  padding: 22px 12px;
  color: #94a3b8;
}

@media (max-width: 1200px) {
  .wage-layout {
    grid-template-columns: 1fr;
  }

  .default-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .wage-main-card,
  .summary-card,
  .history-card,
  .default-settings-card {
    padding: 20px;
  }

  .calendar-header h2 {
    font-size: 22px;
  }

  .editor-date {
    font-size: 20px;
  }

  .calendar-day {
    min-height: 78px;
    padding: 8px;
  }

  .calendar-day-badge {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .default-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-item strong {
    font-size: 14px;
  }

  .history-top {
    flex-direction: column;
    align-items: stretch;
  }

  .history-btn-row {
    width: 100%;
  }
}