body {
  background-color: #0A1128;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}

/* ---- badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  border-width: 1px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-indigo { background: rgba(99,102,241,.2); color: #a5b4fc; border-color: rgba(99,102,241,.2); }
.badge-blue   { background: rgba(59,130,246,.2); color: #93c5fd; border-color: rgba(59,130,246,.2); }
.badge-amber  { background: rgba(245,158,11,.2); color: #fcd34d; border-color: rgba(245,158,11,.2); }
.badge-red    { background: rgba(239,68,68,.2);  color: #fca5a5; border-color: rgba(239,68,68,.2); }
.badge-neutral{ background: rgba(51,65,85,.5); color: #cbd5e1; border-color: #475569; border-radius: .25rem; }

/* ---- battery slot grid ---- */
.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  border-radius: .5rem;
  border-width: 1px;
  transition: all .2s ease;
}
.slot-full   { background: rgba(99,102,241,.2); border-color: rgba(99,102,241,.5); color: #a5b4fc; }
.slot-charge { background: rgba(59,130,246,.2); border-color: rgba(59,130,246,.5); color: #93c5fd; }
.slot-empty  { background: #0A1128; border-color: #2A3B69; color: #64748b; }

/* ---- scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background-color: #2A3B69; border-radius: 9999px; }

/* ---- form inputs (kept outside Tailwind CDN for consistent focus rings) ---- */
.field-input, .field-select {
  width: 100%;
  background: #0A1128;
  border: 1px solid #2A3B69;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #fff;
}
.field-input:focus, .field-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.4);
}
/* 다크 테마에서 <input type="date">의 기본 캘린더 아이콘이 검게 보여 안 보이는 문제 보정 */
.date-input-dark::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);
  cursor: pointer;
}
.field-error {
  color: #fca5a5;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ---- 알람 우선순위 아이콘 (8단계, 숫자가 낮을수록 중요) ---- */
.priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  color: #fff;
  flex-shrink: 0;
}
.priority-badge svg { width: 15px; height: 15px; }
.priority-badge-1 { background: #DC2626; } /* 1단계: 가장 긴급 */
.priority-badge-2 { background: #EA580C; }
.priority-badge-3 { background: #F59E0B; }
.priority-badge-4 { background: #CA8A04; }
.priority-badge-5 { background: #65A30D; }
.priority-badge-6 { background: #0EA5E9; }
.priority-badge-7 { background: #6366F1; }
.priority-badge-8 { background: #64748B; } /* 8단계: 가장 낮은 중요도 */

/* ---- 설비 상태 아이콘 (PV/배터리팩/e2W 등 온라인·오프라인·충전·이상 등) ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  color: #fff;
  flex-shrink: 0;
}
.status-badge svg { width: 12px; height: 12px; }
.status-badge-green { background: #22C55E; }
.status-badge-red   { background: #EF4444; }
.status-badge-amber { background: #F59E0B; }
.status-badge-blue  { background: #3B82F6; }
.status-badge-slate { background: #64748B; }

/* 한 줄에 여러 개를 촘촘히 배치할 때 쓰는 축소 배지 (예: 배터리 대기/충전/이상) */
.status-badge-sm { width: 15px; height: 15px; }
.status-badge-sm svg { width: 9px; height: 9px; }

