/* ===========================
   개별 컨트롤러 상세 모달
   =========================== */

.reserve-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.reserve-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  pointer-events: none;
}

.reserve-modal-content {
  pointer-events: all;
  width: 480px;
  max-width: 92vw;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 컨트롤러 상세: 내용 높이에 맞게(스크롤 없이) — 너무 작지 않게 최소 높이만 유지, 화면 넘으면 max-height(88vh)로 캡 */
#reserve-modal .reserve-modal-content {
  height: auto;
  min-height: 360px;
}

.reserve-modal.hidden,
.reserve-backdrop.hidden {
  display: none;
}

/* ── 헤더 ── */
.reserve-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 16px 52px;
  background: #4c8ac3;
  flex-shrink: 0;
  cursor: grab;          /* 헤더를 잡고 드래그하면 팝업 이동 */
  user-select: none;
  touch-action: none;
}

.reserve-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.reserve-close-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.reserve-close-btn:hover { color: #fff; }

/* ── 장치명 ── */
.rdc-device-name-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 24px 14px;
}

.rdc-device-name {
  font-size: 22px;
  font-weight: 700;
  color: #111;
}

/* 상단 통합 알람 배지 (에러 발생 시에만 표시) */
.rdc-alarm-badge {
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  border-radius: 7px;
  white-space: nowrap;
}
.rdc-alarm-badge::before {
  content: "\26A0";   /* ⚠ */
  font-size: 13px;
}

/* 타이머·예약 헤더 우측: 작동중 배지 + 수정 버튼 */
.rdc-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* '작동중' 배지 — 설정 버튼과 동일 크기, 작동중 느낌의 초록 + 깜빡이는 라이브 점 */
.rdc-running-badge {
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: #16a34a;
  border-radius: 6px;
  white-space: nowrap;
}
.rdc-running-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  animation: rdc-pulse 1.4s ease-out infinite;
}
@keyframes rdc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65); }
  70%  { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ── 구분선 ── */
.rdc-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0;
}

/* ── 섹션 공통 ── */
.rdc-section {
  padding: 16px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rdc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rdc-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.rdc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1070dd;
  flex-shrink: 0;
}

/* ── 수정 버튼 ── */
.rdc-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: #62748e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rdc-edit-btn:hover { background: #4e5f75; }

/* ── 뷰 모드 ── */
.rdc-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rdc-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.rdc-info-label {
  width: 46px;
  flex-shrink: 0;
  color: #6b7280;
  font-size: 13px;
}

.rdc-info-value-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rdc-info-value {
  color: #111;
  font-size: 14px;
  font-weight: 500;
}

/* 요일 pills */
.rdc-weekday-pills {
  display: flex;
  gap: 5px;
}

.rdc-weekday-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #1070dd;
  color: #fff;
  flex-shrink: 0;
}

.rdc-weekday-pill.inactive {
  background: #e5e7eb;
  color: #9ca3af;
}

/* ── 편집 폼 ── */
.reserve-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.reserve-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.reserve-field input[type="datetime-local"],
.reserve-field select,
.reserve-field input[type="text"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: 'Pretendard', system-ui, -apple-system, sans-serif;
  color: #111;
}

.reserve-field select {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23949ba4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: #fff;
}

/* 요일 선택 버튼 */
.reserve-weekdays {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reserve-weekdays button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d0d5dd;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reserve-weekdays button.active {
  background: #1070dd;
  color: #fff;
  border-color: #1070dd;
}

/* 스위치 */
.reserve-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.reserve-switch input { opacity: 0; width: 0; height: 0; }

.reserve-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #e5e7eb;
  border-radius: 999px;
  transition: 0.2s;
}

.reserve-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}

.reserve-switch input:checked + .reserve-switch-slider { background-color: #1070dd; }
.reserve-switch input:checked + .reserve-switch-slider:before { transform: translateX(20px); }

/* 저장/취소 버튼 */
.reserve-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.rdc-cancel-btn {
  padding: 8px 18px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.rdc-cancel-btn:hover { background: #e5e7eb; }

.reserve-save-btn {
  padding: 8px 18px;
  background: #1070dd;
  color: #fff;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.reserve-save-btn:hover { background: #0d5dc0; }

/* ── 모니터링 테이블 ── */
.rdc-monitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rdc-monitor-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.rdc-monitor-table tr:last-child { border-bottom: none; }

.rdc-monitor-table td {
  padding: 11px 6px;
}

.rdc-monitor-label {
  color: #6b7280;
  font-size: 13px;
  width: 120px;
}

.rdc-monitor-table td:last-child {
  color: #111;
  font-weight: 500;
}

/* 하단 주석 */
.rdc-footer-note {
  font-size: 12px;
  color: #9ca3af;
  margin: 2px 0 0;
}

/* ── 실외기 선택기 (컨트롤러 상세 · 사용 현황 헤더 우측) ── */
.rdc-odu-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rdc-odu-tag {
  font-size: 12px;
  font-weight: 600;
  color: #1070dd;
  background: #eaf3ff;
  border: 1px solid #cfe3ff;
  padding: 3px 11px;
  border-radius: 7px;
  white-space: nowrap;
}

.rdc-odu-arrows {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d8dde5;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.rdc-odu-arrow {
  border: none;
  background: #fff;
  color: #4b5563;
  font-size: 11px;
  line-height: 1;
  padding: 5px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}
.rdc-odu-arrow:hover:not(:disabled) { background: #f1f5fb; color: #1070dd; }
.rdc-odu-arrow:disabled { color: #cbd1da; cursor: default; }
.rdc-odu-arrow + .rdc-odu-arrow { border-left: 1px solid #e3e7ee; }
.rdc-odu-arrow i { pointer-events: none; }

/* 고객센터 안내 (컨트롤러 상세 하단 + 이상감지 팝업) */
.rdc-support-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  font-size: 13px;
  color: #92400e;
  flex-wrap: wrap;
}
.rdc-support-note i {
  color: #d97706;
  font-size: 15px;
}
.rdc-support-tel {
  font-weight: 700;
  color: #b45309;
  text-decoration: none;
  letter-spacing: 0.3px;
  margin-left: auto;
}
.rdc-support-tel:hover {
  text-decoration: underline;
}

/* 이상 기기 목록 팝업 */
.error-list-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.error-list-empty {
  padding: 24px 8px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}
.error-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.error-list-item:hover {
  background: #ffedd5;
}
.error-list-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ed4545;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.error-list-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.error-list-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.error-list-item-reason {
  font-size: 12px;
  color: #991b1b;
}
.error-list-item-arrow {
  color: #9ca3af;
  font-size: 14px;
}

/* 이상감지 카드 클릭 가능 표시 */
.summary-card-error {
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.summary-card-error:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}
.summary-card-error:focus {
  outline: 2px solid #ed4545;
  outline-offset: 2px;
}

/* ===========================
   그룹 예약 모달 공통
   =========================== */

.grp-modal-content {
  overflow-y: hidden;
  position: relative;
}

/* ── 그룹 리스트 적용 중 오버레이 ── */
.grp-applying-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 50;
  border-radius: 10px;
  gap: 12px;
}

.grp-applying-overlay .grp-applying-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.30);
  border-top-color: #fff;
  animation: device-spin 0.8s linear infinite;
}

.grp-applying-overlay .grp-applying-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.grp-applying-overlay .grp-applying-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.03em;
}

.grp-modal-header {
  background: #4c8ac3;
  padding: 16px 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.grp-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.grp-modal-header .reserve-close-btn {
  color: rgba(255,255,255,0.85);
}

.grp-modal-header .reserve-close-btn:hover {
  color: #fff;
}

.grp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1070dd;
  flex-shrink: 0;
  display: inline-block;
}

/* ===========================
   그룹 예약 리스트 모달
   =========================== */

.grp-list-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding-top: 16px;
}

.grp-list-table-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
}

.grp-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.grp-list-table thead tr {
  background: #f3f4f6;
}

.grp-list-table th {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.grp-list-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  font-size: 14px;
  font-weight: 500;
  color: #111;
}

.grp-list-table tr:last-child td { border-bottom: none; }

.grp-col-edit  { text-align: center; width: 70px; }
.grp-col-toggle { text-align: right; width: 120px; }
.grp-col-del   { text-align: center; width: 40px; }

.grp-list-table th.grp-col-edit,
.grp-list-table th.grp-col-toggle { text-align: center; }

.grp-del-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.grp-del-btn:hover { color: #dc2626; background: #fef2f2; }

.grp-edit-btn {
  padding: 5px 12px;
  background: #62748e;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.grp-edit-btn:hover { background: #4e5f75; }

/* ON / OFF 토글 버튼 */
.grp-onoff-toggle {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.grp-on-btn,
.grp-off-btn {
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #fff;
  color: #9ca3af;
  transition: background 0.15s, color 0.15s;
}

.grp-on-btn.active  { background: #1070dd; color: #fff; }
.grp-off-btn.active { background: #dc2626; color: #fff; }

/* 그룹 추가 버튼 */
.grp-add-btn {
  margin: 16px 20px 20px;
  width: calc(100% - 40px);
  padding: 13px;
  background: #1070dd;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.grp-add-btn:hover { background: #0d5dc0; }

/* ===========================
   예약 그룹 설정 폼 (Step 1/2)
   =========================== */

.grp-step {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.grp-form-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 8px;
  display: flex;
  flex-direction: column;
}

.grp-form-row {
  margin-bottom: 22px;
}

.grp-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.grp-form-row-inline {
  display: flex;
  align-items: center;
  gap: 16px;
}

.grp-form-row-inline .grp-form-label {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* 그룹명 입력 */
.grp-name-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.grp-name-wrap input {
  flex: 1;
  height: 42px;
  padding: 0 72px 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
  color: #111;
  outline: none;
}
.grp-name-wrap input:focus { border-color: #1070dd; }

.grp-name-counter {
  position: absolute;
  right: 34px;
  font-size: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.grp-name-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.grp-name-clear:hover { color: #374151; }

/* 요일 선택 pills */
.grp-weekday-pills {
  display: flex;
  gap: 7px;
}

.grp-weekday-pills button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background: #f9fafb;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grp-weekday-pills button.active {
  background: #1070dd;
  color: #fff;
  border-color: #1070dd;
}

/* 예약 시간 */
.grp-time-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  font-family: inherit;
  width: 160px;
  outline: none;
}
.grp-time-input:focus { border-color: #1070dd; }

/* 예약 대상 */
.grp-target-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.grp-target-text {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  flex: 1;
  min-width: 0;
}

.grp-add-device-btn {
  padding: 7px 14px;
  background: #62748e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.grp-add-device-btn:hover { background: #4e5f75; }

/* 주석 */
.grp-notice {
  font-size: 12px;
  color: #9ca3af;
  margin-top: auto;
  padding-top: 8px;
}

/* 등록/삭제 버튼 영역 */
.grp-form-actions {
  display: flex;
  gap: 10px;
  margin: 8px 24px 24px;
  flex-shrink: 0;
}

/* 등록 버튼 */
.grp-submit-btn {
  flex: 1;
  padding: 13px;
  background: #1070dd;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 8px rgba(16,112,221,0.35);
}
.grp-submit-btn:hover { background: #0d5dc0; }

/* 삭제 버튼 */
.grp-delete-btn {
  padding: 13px 18px;
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 8px rgba(220,38,38,0.18);
  white-space: nowrap;
}
.grp-delete-btn:hover { background: #fef2f2; }
.grp-delete-btn.hidden { display: none; }

/* ===========================
   Step 2: 컨트롤러 선택
   =========================== */

.grp-device-select-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 14px;
}

.grp-select-all-row {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 4px;
}

.grp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  user-select: none;
}

.grp-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1070dd;
  cursor: pointer;
  flex-shrink: 0;
}

.grp-device-section { margin-top: 4px; }

.grp-device-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.grp-section-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1;
}

.grp-device-section-body { background: #fafafa; }

.grp-device-item {
  display: flex;
  align-items: center;
  padding: 9px 0 9px 8px;
  border-bottom: 1px solid #f5f5f5;
}

.grp-label-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.grp-disabled-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.grp-device-item-line {
  width: 16px;
  border-bottom: 1.5px solid #d1d5db;
  margin-right: 10px;
  flex-shrink: 0;
}

/* Step 2 하단 버튼 */
.grp-step2-btns {
  display: flex;
  gap: 12px;
  padding: 8px 24px 24px;
  flex-shrink: 0;
}

.grp-prev-btn {
  flex: 1;
  padding: 13px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.grp-prev-btn:hover { background: #e5e7eb; }

.grp-confirm-btn {
  flex: 2;
  padding: 13px;
  background: #1070dd;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.grp-confirm-btn:hover { background: #0d5dc0; }

/* Empty / Loading */
.grp-empty, .grp-loading {
  text-align: center;
  color: #9ca3af;
  padding: 28px;
  font-size: 14px;
}

/* ── 로딩 ── */
.rdc-loading-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
}

.rdc-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e5e7eb;
  border-top-color: #1070dd;
  border-radius: 50%;
  animation: rdc-spin 0.7s linear infinite;
}

@keyframes rdc-spin {
  to { transform: rotate(360deg); }
}

/* ── 스크롤 영역 ── */
.rdc-scroll-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.rdc-schedule-body {
  padding: 16px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rdc-schedule-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rdc-schedule-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.rdc-schedule-value {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 15px;
}

/* 요일 pills */
.rdc-wday-pills {
  display: flex;
  gap: 6px;
  padding-left: 15px;
  flex-wrap: nowrap;
}

.rdc-wday-pill {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #e5e7eb;
  color: #9ca3af;
  flex-shrink: 0;
  user-select: none;
}

.rdc-wday-pill.active {
  background: #1070dd;
  color: #fff;
}

/* placeholder "--:--" */
.rdc-placeholder {
  font-size: 15px;
  font-weight: 500;
  color: #9ca3af;
}

/* 그룹 적용 레이블 */
.rdc-group-label {
  font-size: 14px;
  font-weight: 600;
  color: #1070dd;
}

/* 그룹에서 삭제 버튼 */
.rdc-remove-btn {
  padding: 4px 10px;
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.rdc-remove-btn:hover { background: #fef2f2; }

/* 확인 버튼 */
.rdc-confirm-btn {
  display: block;
  width: calc(100% - 48px);
  margin: 8px 24px 24px;
  padding: 13px;
  background: #1070dd;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 3px 8px rgba(16, 112, 221, 0.35);
  flex-shrink: 0;
}
.rdc-confirm-btn:hover { background: #0d5dc0; }

/* ===========================
   개별 일정제어 팝업
   =========================== */

.indiv-sched-content {
  width: 440px;
}

.indiv-sched-body {
  padding: 0 24px;
  flex: 1;
}

.indiv-sched-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}

.indiv-sched-row--last {
  border-bottom: none;
}

.indiv-sched-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: #1070dd;
  width: 80px;
  flex-shrink: 0;
}

/* 요일 pills */
.indiv-wday-pills {
  display: flex;
  gap: 6px;
  flex: 1;
}

.indiv-wday-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #e5e7eb;
  color: #9ca3af;
  flex-shrink: 0;
  user-select: none;
}

.indiv-wday-pill.active {
  background: #1070dd;
  color: #fff;
}

/* 예약시간 / 타이머 값 */
.indiv-sched-value {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.indiv-placeholder {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

.indiv-group-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  flex: 1;
}

/* 그룹에서 삭제 버튼 */
.indiv-remove-btn {
  padding: 5px 12px;
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  margin-left: auto;
}
.indiv-remove-btn:hover { background: #fef2f2; }

/* 확인 버튼 */
.indiv-sched-confirm-btn {
  display: block;
  width: calc(100% - 48px);
  margin: 20px 24px 24px;
  padding: 15px;
  background: #1070dd;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 3px 8px rgba(16, 112, 221, 0.35);
  flex-shrink: 0;
}
.indiv-sched-confirm-btn:hover { background: #0d5dc0; }

/* ===========================
   타이머 duration 선택
   =========================== */

.tmr-duration-select {
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23949ba4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-color: #fff;
  cursor: pointer;
  min-width: 110px;
}
.tmr-duration-select:focus { border-color: #1070dd; }

.indiv-time-input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  font-family: inherit;
  outline: none;
  background-color: #fff;
  min-width: 110px;
}
.indiv-time-input:focus { border-color: #1070dd; }

/* 예약 사용/해제 ON·OFF 토글 (예약 시간 옆) */
.indiv-res-toggle {
  height: 38px;
  min-width: 56px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}
.indiv-res-toggle.is-on  { background-color: #1070dd; }
.indiv-res-toggle.is-off { background-color: #b0b6be; }
.indiv-res-toggle:hover.is-on  { background-color: #0c5cb8; }
.indiv-res-toggle:hover.is-off { background-color: #9aa1aa; }
