:root {
  --bg: #f5f6f8;
  --bg-elevated: #ffffff;
  --border: #e2e4e9;
  --text-primary: #1a1d23;
  --text-secondary: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --sidebar-bg: #16181d;
  --sidebar-text: #cbd0dc;
  --sidebar-text-active: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --bg-elevated: #1a1d23;
    --border: #2a2e37;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0ab;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
}

.hidden { display: none !important; }

button { cursor: pointer; font-family: inherit; }

/* 로그인 */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
}
.login-box {
  background: var(--bg-elevated);
  padding: 40px;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.login-box h1 {
  font-size: 20px;
  margin: 0 0 8px;
  text-align: center;
}
.login-box input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
}
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-box button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.loading-card {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 14px;
}
.error-text {
  color: var(--danger);
  font-size: 13px;
  min-height: 16px;
  margin: 0;
}

/* 앱 셸 */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-header {
  padding: 20px 20px 16px;
  font-weight: 700;
  font-size: 16px;
  color: var(--sidebar-text-active);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}
.nav-item {
  text-align: left;
  background: none;
  border: none;
  color: var(--sidebar-text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active { background: var(--accent); color: #fff; }
.sidebar-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}

/* 편집 모드 로그인 */
.editor-active-badge {
  color: var(--sidebar-text-active);
  font-weight: 600;
  margin-bottom: 8px;
}
.editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-link-ghost {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 12px;
  padding: 4px 0;
  text-decoration: underline;
}
.main-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1100px;
}
.site-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin: -12px 0 24px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.site-toolbar-label { color: var(--text-secondary); font-size: 13px; font-weight: 650; }
.site-filter { display: inline-flex; gap: 3px; }
.site-filter button {
  min-height: 34px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
}
.site-filter button:hover { background: rgba(37,99,235,0.07); color: var(--accent); }
.site-filter button.active { background: var(--accent); color: #fff; }
.view { display: none; }
.view.active { display: block; }
.view h2 { margin-top: 0; }
.view-description {
  margin: -12px 0 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.view-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-header-actions .btn-ghost-dark:disabled { opacity: 0.5; cursor: default; }

/* 버튼 */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--sidebar-text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.btn-danger {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  padding: 4px 6px;
  font-size: 13px;
}

/* 카드 / KPI */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 14px; color: var(--text-secondary); }
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; }
.kpi-card .kpi-value small { font-size: 15px; color: var(--text-secondary); }
.kpi-card .kpi-label { font-size: 13px; color: var(--text-secondary); }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dashboard-attention-card .view-header { align-items: flex-start; gap: 16px; }
.dashboard-attention-card .view-description { margin: 2px 0 0; }
.attention-count {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}
.attention-count.clear { background: #dcfce7; color: #166534; }
.training-asset-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}
.attention-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.attention-row {
  width: 100%;
  display: grid;
  grid-template-columns: 100px minmax(120px, 0.6fr) 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text-primary);
  padding: 11px 12px;
  text-align: left;
}
.attention-row:hover { border-color: var(--accent); }
.attention-row > span:last-child { color: var(--text-secondary); font-size: 13px; }
.attention-type { color: #b45309; font-size: 12px; font-weight: 700; }
.breakdown-list { display: flex; flex-direction: column; gap: 8px; }
.breakdown-row { display: flex; justify-content: space-between; font-size: 14px; }
.member-asset-list { display: flex; flex-direction: column; gap: 8px; }
.member-asset-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-align: left;
}
.member-asset-row:hover { border-color: var(--accent); background: rgba(37,99,235,0.03); }
.member-asset-row > span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.member-asset-row strong, .member-asset-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-asset-row small { color: var(--text-secondary); font-size: 12px; }
.member-asset-tags { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-end; gap: 4px; }
.member-asset-tags > em:not(.status-badge) { color: var(--text-secondary); font-size: 11px; font-style: normal; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-row { font-size: 13px; color: var(--text-secondary); }
.history-row strong { color: var(--text-primary); }

/* 필터 */
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.filter-row input, .filter-row select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 13px;
}
.filter-row input { flex: 1; }
.asset-filter-row { flex-wrap: wrap; }
.asset-filter-row input { min-width: 260px; }
.asset-filter-row select { min-width: 118px; }

/* 테이블 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th { color: var(--text-secondary); font-weight: 600; font-size: 12px; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text-primary); }
.data-table th.sortable .sort-arrow { margin-left: 4px; opacity: 0.6; }
.data-table tbody tr:hover { background: rgba(37,99,235,0.05); cursor: pointer; }
.data-table tbody tr:last-child td { border-bottom: none; }
.empty-state { text-align: center; color: var(--text-secondary); padding: 40px 0; }

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--border);
}
.status-badge.in_use { background: #dcfce7; color: #166534; }
.status-badge.in_storage { background: #e0e7ff; color: #3730a3; }
.status-badge.disposed { background: #f3f4f6; color: #6b7280; }
.status-badge.lost { background: #fee2e2; color: #991b1b; }

/* 모달 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 28px;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
}

/* 폼 */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.form-grid input, .form-grid select, .form-grid textarea {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}
.form-grid .form-row { display: flex; gap: 12px; }
.form-grid .form-row > label { flex: 1; }
.assignment-panel {
  margin: 2px 0;
  padding: 15px;
  border: 2px solid rgba(37,99,235,0.35);
  border-radius: 10px;
  background: rgba(37,99,235,0.06);
}
.assignment-panel legend {
  padding: 0 7px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.assignment-panel small { color: var(--text-secondary); line-height: 1.4; }
.assignment-date-field.required { color: var(--accent); font-weight: 700; }
.assignment-date-field.required input { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }
.replacement-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border: 1px solid #f59e0b;
  border-radius: 9px;
  background: #fffbeb;
  color: #78350f;
  font-size: 13px;
  line-height: 1.5;
}
.replacement-notice strong { color: #b45309; }
.save-msg { font-size: 13px; color: var(--success); min-height: 16px; margin: 0; }
.form-error { color: var(--danger); font-size: 13px; line-height: 1.5; margin: 0; }
.form-error:empty { display: none; }
.form-error strong { display: block; margin-bottom: 4px; }
.form-error ul { margin: 0; padding-left: 20px; }
.detail-actions { display: flex; align-items: center; gap: 8px; }

.employee-search { position: relative; display: block; }
.employee-search-input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.employee-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.employee-search-item { padding: 8px 10px; font-size: 13px; cursor: pointer; }
.employee-search-item:hover { background: rgba(37,99,235,0.08); }
.employee-search-dept { color: var(--text-secondary); font-size: 12px; }
.employee-search-empty { padding: 8px 10px; font-size: 13px; color: var(--text-secondary); }

/* 자리배치도 */
.seat-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.seat-summary span {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text-secondary);
  font-size: 12px;
}
.seat-summary strong { color: var(--text-primary); margin-right: 3px; }
.seat-view-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}
.seat-view-toggle button {
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
}
.seat-view-toggle button.active { background: var(--accent); color: #fff; }
.seat-plan-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}
.seat-plan-help {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
}
.seat-plan-scroll { overflow: hidden; background: #f8fafc; }
.seat-plan {
  width: 100%;
  background: #f8fafc;
}
.seat-site-section { padding: 14px; border-bottom: 1px solid var(--border); }
.seat-site-section:last-child { border-bottom: 0; }
.seat-site-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 auto 10px; max-width: 1680px; }
.seat-site-title strong { font-size: 14px; color: #1f2937; }
.seat-site-title span { font-size: 12px; color: #64748b; }
.seat-plan-canvas {
  position: relative;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
}
.seat-plan-canvas.head_office { background: #fff url('floor-plan.webp?v=20260915-1') center / 100% 100% no-repeat; }
.seat-plan-canvas.dohwaseo {
  aspect-ratio: 3901 / 2487;
  background: #fff url('dohwaseo-floor-plan.webp?v=20260915-1') center / 100% 100% no-repeat;
}
.seat-plan-item {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  min-height: 10px;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--seat-source-color, #64748b);
  border-radius: 2px;
  background: rgba(255,255,255,0.88);
  color: #111827;
  line-height: 1;
  transform-origin: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
}
.seat-plan-item > span { font-size: clamp(4px, 0.48vw, 8px); font-weight: 850; letter-spacing: -0.4px; }
.seat-plan-item.occupied { box-shadow: 0 0 0 1.5px var(--accent); }
.seat-plan-item.empty { border-style: dashed; opacity: 0.78; }
.seat-plan-item:hover,
.seat-plan-item:focus-visible {
  z-index: 5;
  outline: 3px solid rgba(37,99,235,0.42);
  background: #fff;
}
.seat-plan-item.filtered-out { pointer-events: none; opacity: 0.09; }
.seat-plan-item.matched { transition: opacity 120ms ease, outline-color 120ms ease; }
.seat-plan-item.selected {
  z-index: 6;
  outline: 3px solid #f59e0b;
  background: #fff7d6;
}
.seat-inspector {
  min-height: 172px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.seat-inspector-empty {
  padding: 28px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}
.seat-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}
.seat-inspector-heading { display: flex; align-items: baseline; gap: 10px; }
.seat-inspector-heading strong { color: var(--text-primary); font-size: 20px; }
.seat-inspector-heading span { color: var(--text-secondary); font-size: 13px; }
.seat-inspector-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.seat-inspector-tabs button {
  padding: 9px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
}
.seat-inspector-tabs button.active { border-bottom-color: var(--accent); color: var(--accent); }
.seat-inspector-tabs button span {
  display: inline-flex;
  min-width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(37,99,235,0.1);
  font-size: 11px;
}
.seat-inspector-content { padding: 16px; }
.seat-member-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: center;
}
.seat-member-card > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.seat-detail-label { color: var(--text-secondary); font-size: 12px; }
.seat-member-name { color: var(--text-primary); font-size: 18px; }
.seat-member-meta { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.seat-member-meta span {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 12px;
}
.seat-member-card.empty p { grid-column: 1 / -1; margin: 0; color: var(--text-secondary); font-size: 13px; }
.seat-asset-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.seat-asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text-primary);
  text-align: left;
}
.seat-asset-row:hover { border-color: var(--accent); background: rgba(37,99,235,0.03); }
.seat-asset-row > span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.seat-asset-row strong, .seat-asset-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-asset-row small { color: var(--text-secondary); font-size: 12px; }
.seat-asset-tags { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-end; gap: 4px; }
.seat-asset-tags em {
  padding: 3px 7px;
  border-radius: 10px;
  background: rgba(37,99,235,0.1);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
}
.seat-asset-tags em.personal { background: rgba(15,118,110,0.1); color: #0f766e; }
.seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.seat-card {
  min-height: 160px;
  padding: 16px;
  text-align: left;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-family: inherit;
}
.seat-card.occupied { border-top-color: var(--accent); }
.seat-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.seat-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.site-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(37,99,235,0.09);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.seat-number { font-size: 20px; font-weight: 750; }
.seat-state { font-size: 11px; color: var(--text-secondary); }
.seat-person {
  margin: 14px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}
.seat-team { margin: -7px 0 10px; color: var(--text-secondary); font-size: 11px; }
.seat-card.empty .seat-person { color: var(--text-secondary); font-weight: 400; }
.seat-monitors { display: flex; flex-wrap: wrap; gap: 5px; }
.seat-monitors span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(37,99,235,0.09);
  color: var(--accent);
  font-size: 11px;
}
.seat-monitors em { font-size: 11px; color: var(--text-secondary); font-style: normal; }
.seat-modal { width: 580px; }
.seat-detail-person {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
}
.seat-detail-person span { color: var(--text-secondary); font-size: 13px; }
.monitor-detail-list { display: flex; flex-direction: column; gap: 8px; }
.monitor-detail-list > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.monitor-detail-list span { color: var(--text-secondary); font-size: 12px; }
.monitor-picker { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.monitor-picker legend { padding: 0 5px; color: var(--text-secondary); font-size: 13px; }
.form-help { margin: 0 0 8px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.monitor-picker > input { width: 100%; margin-bottom: 8px; }
.monitor-options { max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.monitor-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 9px !important;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}
.monitor-option:hover { background: rgba(37,99,235,0.06); }
.monitor-option input { margin: 2px 0 0; }
.monitor-option span { display: flex; flex-direction: column; gap: 2px; color: var(--text-primary); }
.monitor-option small { color: var(--text-secondary); }
.empty-state.compact { padding: 16px 0; }

@media (max-width: 760px) {
  .seat-plan-item { min-width: 4px; min-height: 4px; border-width: 1px; }
  .seat-plan-item > span { font-size: clamp(2px, 0.72vw, 5px); letter-spacing: -0.6px; }
  .seat-member-card { grid-template-columns: 1fr; }
  .seat-member-card .btn-link { justify-self: start; }
  .seat-asset-list { grid-template-columns: 1fr; }
}

/* 모달 안의 보조 버튼 (밝은 배경용) */
.btn-ghost-dark {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  flex-shrink: 0;
}

/* QR 코드 */
.qr-display {
  text-align: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.qr-display img { border-radius: 8px; }
.qr-label-canvas { max-width: 280px; width: 100%; height: auto; }
.qr-display .qr-download-btn { margin-top: 8px; }

/* QR 라벨 인쇄 (52 x 24mm) */
#print-labels-container { display: none; }
@media print {
  body > *:not(#print-labels-container) { display: none !important; }
  #print-labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3mm;
    padding: 10mm;
  }
  .print-label {
    width: 52mm;
    height: 24mm;
    break-inside: avoid;
  }
}
.qr-url {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  word-break: break-all;
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; min-height: auto; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding-bottom: 10px; }
  .nav-item { white-space: nowrap; }
  .sidebar-footer { display: none; }
  .main-content { padding: 22px 16px; max-width: none; }
  .site-toolbar { position: static; width: 100%; margin: 0 0 18px; justify-content: space-between; }
  .site-filter { flex: 1; }
  .site-filter button { flex: 1; padding-inline: 8px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
  .attention-row { grid-template-columns: 1fr; gap: 4px; }
  .view-header { align-items: flex-start; gap: 12px; }
  .view-header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .filter-row { flex-wrap: wrap; }
  .filter-row input { min-width: 100%; }
  .asset-filter-row select { flex: 1 1 calc(50% - 10px); min-width: 130px; }
  .data-table { display: block; overflow-x: auto; }
  .form-grid .form-row { flex-direction: column; }
}
