/* 관리자 화면과 실제 API 연결에서 새로 생긴 요소: 사이드바 묶음, 불러오기·오류 상태, 사용자·할당·감사 로그·동기화 */

/* ---------- 시작·불러오기 ---------- */
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- 사이드바 관리 묶음 ---------- */
.nav__group { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.dot--warn { background: var(--warning); }
.dot--bad { background: var(--critical); }

/* ---------- 요약 타일·버튼 보강 ---------- */
.stat--warning .stat__label { color: var(--warning-text); }
.stat--warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
button.stat:hover { border-color: var(--primary); }
.btn--md { height: 34px; }
.table td .btn:disabled { box-shadow: none; }

/* ---------- 알림 띠 ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); font-size: 13px; }
.banner > .icon { margin-top: 2px; }
.banner--warning { color: var(--warning-text); background: var(--warning-bg); border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border)); }

/* ---------- 표 공통 ---------- */
.col-status { width: 96px; }
.col-actions { width: 1%; }
.table td.actions { white-space: nowrap; text-align: right; }
.table tr.is-confirm td { background: var(--critical-bg); }
.table .sub { display: block; font-size: 12px; color: var(--muted); }
.confirm-text { font-size: 12px; color: var(--critical-text); margin-right: 6px; }
.cell-detail { max-width: 360px; font-size: 12px; color: var(--text-2); word-break: break-all; }

/* ---------- 사용자 관리 ---------- */
.create-form { padding: 0 20px 20px; }
.create-form__grid { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr 0.8fr; gap: 0 14px; }
.create-form__grid .field { margin-top: 0; }
.create-form__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.secret { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.secret code { flex: 1; font-size: 18px; font-weight: 600; letter-spacing: 0.04em; user-select: all; }
.secret-note { margin: 0; font-size: 12.5px; color: var(--text-2); }

/* ---------- VM 할당 ---------- */
.assign-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.picklist { list-style: none; margin: 0; padding: 6px; max-height: calc(100vh - 300px); min-height: 200px; overflow-y: auto; border-top: 1px solid var(--border); }
.picklist__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 8px 10px; font: inherit; font-size: 13px; text-align: left; color: var(--text);
  background: transparent; border: 0; border-radius: 7px; cursor: pointer;
}
.picklist__item:hover { background: var(--surface-hover); }
.picklist__item.is-active { background: var(--primary-weak); color: var(--primary-text); font-weight: 600; }
.picklist__main { display: flex; flex-direction: column; min-width: 0; }
.picklist__main .muted { font-size: 11.5px; font-weight: 400; }
.picklist__search { padding: 0 12px 12px; }
.picklist__search .search { width: 100%; }
.checklist .table td:first-child, .checklist .table th:first-child { width: 44px; text-align: center; }
.checklist input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.checklist input[type="checkbox"]:disabled { cursor: not-allowed; }
.checklist tr.is-missing td { color: var(--muted); }

/* ---------- 감사 로그 ---------- */
.audit-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.audit-filters .field { margin-top: 0; }
.audit-filters .field__label { font-size: 12px; margin-bottom: 4px; }
.audit-filters .input { height: 34px; }
.audit-filters__actor { width: 180px; }
.audit-filters__kind { width: 220px; }
.audit-filters__date { width: 150px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* ---------- 동기화 ---------- */
.sync-grid { display: grid; grid-template-columns: 420px 1fr; gap: 16px; align-items: start; }
.kv--wide { grid-template-columns: 110px 1fr; }
.run-error { margin-top: 2px; font-size: 12px; color: var(--critical-text); word-break: break-all; }
