/* 관리자 페이지 (player.css 의 색상 변수를 함께 쓴다) */

:root {
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
}

h1 { font-size: 1.25rem; margin: 8px 0 12px; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 0.9rem; }
.bad-text { color: var(--bad); }

/* 상단 메뉴 */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav a {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a.active {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* 카드 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.card p { margin: 4px 0 12px; }
.card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }

/* 버튼 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.block { display: flex; width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button-row form { margin: 0; }
.more { display: block; margin-top: 8px; color: var(--accent); text-decoration: none; }
.notice {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--accent);
}

/* 최근 감지 썸네일 */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  color: #fff;
  text-decoration: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 0.75rem;
}
.thumb .star { position: absolute; top: 4px; right: 6px; color: #facc15; font-style: normal; }

/* 저장공간 막대 */
.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-top: 8px;
}
.meter {
  height: 8px;
  margin: 4px 0 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
.meter div { height: 100%; background: var(--accent); }
.meter.warn div { background: var(--warn); }

/* 이벤트 목록 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.day-picker { margin: 0 0 0 auto; }
.day-picker input {
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.group-title { margin: 16px 0 8px; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.event-thumb {
  flex: 0 0 96px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.event-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.event-info a { color: var(--text); text-decoration: none; }
.event-actions { display: flex; flex-direction: column; gap: 4px; }
.event-actions form { margin: 0; }
.icon {
  width: 40px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}
.icon.on { color: #eab308; border-color: #eab308; }
.icon.danger:hover { border-color: var(--bad); }

ul.plain { margin: 0 0 8px; padding-left: 18px; }
ul.plain li { margin: 4px 0; }
