/* 바로슝 for Business 관리자도구 — Claude Design 목업(확정 아트보드 1c/1e/2a~2d/3a/3b/4a~4d)
   정합 스타일. 목업 원본은 docs/design/admin-console-mockup/index.html에 보관되어 있으며,
   아래 값들은 그 아트보드의 인라인 스타일을 그대로 옮긴 것이다 — 임의로 "정리"하지 말 것.
   토큰은 앱과 동일한 Signal Ink 팔레트(docs/design/design-tokens.md). */
:root {
  --primary: #4338ca;
  --on-primary: #ffffff;
  --primary-container: #e0defb;
  --on-primary-container: #1d1466;
  --secondary: #57534e;
  --on-secondary: #ffffff;
  --secondary-container: #e7e5e0;
  --on-secondary-container: #292524;
  --tertiary: #16a34a;
  --tertiary-container: #dcfce7;
  --on-tertiary-container: #052e12;
  --error: #dc2626;
  --error-container: #fee2e2;
  --on-error-container: #7f1d1d;
  --background: #faf9f7;
  --on-background: #1c1917;
  --surface: #ffffff;
  --on-surface: #1c1917;
  --surface-variant: #f0eeea;
  --on-surface-variant: #57534e;
  --outline: #d6d3ce;
  --outline-soft: #e7e5e0;

  --radius-pill: 999px;
  --radius-small: 8px;
  --radius-card: 18px;
  --radius-inner: 14px;
  --radius-medium: 16px;
  --radius-large: 24px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 28px;
  --space-xxl: 32px;

  --sidebar-gradient: linear-gradient(175deg, #4338ca 0%, #3a31ad 55%, #2f2891 100%);
  --mobile-header-gradient: linear-gradient(140deg, #4338ca, #332caa);
  --card-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  margin: 0;
  background: var(--background);
  color: var(--on-background);
}

h1,
h2,
h3 {
  margin: 0;
}

/* ── 부트 게이트 ─────────────────────────────────────────────────────────
   Firebase 세션 복원이 끝나기 전엔 로그인/대시보드 어느 쪽도 그리지 않는다. */
.boot-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: var(--background);
}

.boot-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.9;
}

.boot-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--outline);
  border-top-color: var(--primary);
  border-radius: var(--radius-pill);
  animation: boot-spin 0.7s linear infinite;
}

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

/* ── 로그인 ─────────────────────────────────────────────────────────── */
.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 4px 12px rgba(67, 56, 202, 0.24));
}

.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--on-background);
}

.brand-sub {
  margin: var(--space-xs) 0 var(--space-xxl);
  font-size: 14px;
  color: var(--on-surface-variant);
}

.login-card label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.field-error {
  color: var(--error);
  font-size: 13px;
  text-align: left;
  margin: var(--space-sm) 0 0;
}

/* ── 앱 셸 ──────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar-scrim {
  display: none;
}

.sidebar {
  width: 232px;
  flex: none;
  background: var(--sidebar-gradient);
  padding: var(--space-lg) 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}

.sidebar-brand-text {
  flex: 1;
  min-width: 0;
}

/* 드로어 닫기 버튼 — 데스크톱에선 사이드바가 고정이라 숨긴다 */
.sidebar-close-btn {
  display: none;
}

.sidebar-brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}

.sidebar-brand-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.sidebar-brand-sub {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.nav-group-label {
  margin: var(--space-md) 0 6px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.45);
}

.nav-group-label:first-child {
  margin-top: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: #fff;
  color: var(--on-primary-container);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.nav-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 3px;
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

.nav-link.active .nav-count {
  color: var(--on-surface-variant);
}

.nav-count-alert,
.nav-link.active .nav-count-alert {
  display: inline-block;
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 1px 7px;
}

.sidebar-footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-inner);
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.sidebar-company {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.sidebar-identity {
  margin: 2px 0 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-logout-btn {
  width: 100%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 7px 0;
  cursor: pointer;
}

.sidebar-logout-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.view-root {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.view {
  display: none;
}

.view.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ── 페이지 헤더 (eyebrow + 제목 + 검색 + 주 액션) ─────────────────────── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--outline);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.page-header-text {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
}

.page-header h1 {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.title-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface-variant);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  width: 220px;
  padding: 9px 14px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface-variant);
  color: var(--on-surface);
}

.view-body {
  padding: 24px var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  flex: 1;
  min-width: 0;
}

/* ── 패널(카드) ────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.panel-pad {
  padding: 18px;
}

.panel-flush {
  padding: 0;
}

.panel h2 {
  font-size: 16px;
  font-weight: 700;
}

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head-row h2 {
  font-size: 15px;
  font-weight: 700;
}

.panel-head-pad {
  padding: 16px 20px 12px;
  margin-bottom: 0;
}

.panel-head-tight {
  gap: 8px;
  justify-content: flex-start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-header-row h2 {
  margin-bottom: 0;
}

.hint {
  font-size: 12.5px;
  color: var(--on-surface-variant);
  line-height: 1.55;
  margin: 6px 0 0;
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--radius-pill);
}

.dot-danger {
  background: var(--error);
}

/* ── 폼 ───────────────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs);
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-small);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-variant);
  color: var(--on-surface);
}

textarea {
  border-radius: var(--radius-large);
  padding: 13px 15px;
  line-height: 1.7;
  resize: vertical;
}

input:disabled {
  opacity: 0.5;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--space-md) 0 var(--space-xs);
}

.label-row label {
  margin: 0;
}

.char-count {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.field-row {
  display: flex;
  gap: 12px;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.field-col {
  flex: 1;
  min-width: 180px;
}

.field-col label {
  margin-top: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin: var(--space-md) 0 0;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 14px;
  font-weight: 400;
  margin: 0 var(--space-lg) var(--space-sm) 0;
}

/* 세그먼티드 컨트롤 (게시 방식) */
.segmented {
  display: flex;
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.segmented-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 9px 0;
  cursor: pointer;
}

.segmented-btn.active {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

/* ── 버튼 ─────────────────────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: var(--space-md);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: #362eb0;
}

.btn-secondary {
  background: var(--surface);
  color: var(--on-surface-variant);
  border: 1px solid var(--outline);
}

.btn-secondary:hover {
  background: var(--surface-variant);
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
  margin-top: 0;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn-hero:disabled,
.pill-btn:disabled,
.bulk-btn:disabled,
.approve-btn:disabled,
.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 주 액션 — 목업의 인디고 pill + 그림자 */
.btn-hero {
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(67, 56, 202, 0.32);
}

.btn-hero:hover {
  background: #362eb0;
}

.pill-btn {
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-secondary-container);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 14px;
  cursor: pointer;
}

.pill-btn:hover {
  background: var(--surface-variant);
}

.white-pill-btn {
  border: none;
  background: #fff;
  color: var(--on-error-container);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 6px 13px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.approve-btn {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 5px 12px;
  cursor: pointer;
}

.approve-btn:hover {
  filter: brightness(0.95);
}

.delete-btn {
  background: transparent;
  border: 1px solid var(--outline);
  color: var(--error);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 4px 12px;
  cursor: pointer;
}

.delete-btn:hover {
  background: var(--error-container);
}

.danger-outline-btn {
  width: 100%;
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--error);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 10px 0;
  cursor: pointer;
}

.danger-outline-btn:hover {
  background: var(--error-container);
}

.danger-outline-btn-inline {
  width: auto;
  border-color: var(--error);
  padding: 10px 20px;
  margin-top: var(--space-md);
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.round-icon-btn {
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--outline);
  background: var(--surface);
  border-radius: var(--radius-pill);
  color: var(--on-surface-variant);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--outline);
  background: var(--surface);
  border-radius: var(--radius-small);
  color: var(--on-surface-variant);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status {
  font-size: 13px;
  margin: var(--space-sm) 0 0;
  min-height: 18px;
}

.status-inset {
  padding: 0 20px 12px;
  margin: 0;
}

.status.error {
  color: var(--error);
}

.status.success {
  color: var(--tertiary);
}

/* ── 칩 / 배지 ────────────────────────────────────────────────────── */
.filter-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-row-spacer {
  flex: 1;
}

.sort-label {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

.chip.active {
  border-color: transparent;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 700;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge-active {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}

.badge-scheduled {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.badge-expired {
  background: var(--error-container);
  color: var(--on-error-container);
}

.badge-neutral {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.badge-tag {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.badge-tag-teal,
.badge-category {
  background: #ccfbf1;
  color: #134e4a;
}

.badge-category-safety {
  background: var(--error-container);
  color: var(--on-error-container);
}

.badge-category-personnel {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.count-pill {
  display: inline-block;
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

/* ── 대시보드 ─────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.stat-card-hero {
  background: linear-gradient(160deg, #4338ca, #3d34b8);
  border: none;
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.28);
}

.stat-card-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-variant);
}

.stat-card-hero .stat-card-label {
  color: rgba(255, 255, 255, 0.75);
}

.stat-card-value {
  margin: 6px 0 0;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
}

.stat-card-hero .stat-card-value {
  color: #fff;
}

.stat-card-value .unit {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--on-surface-variant);
  margin-left: 2px;
}

.stat-card-hero .stat-card-value .unit {
  color: rgba(255, 255, 255, 0.85);
}

.stat-card-danger .stat-card-value {
  color: var(--error);
}

.stat-card-link {
  display: inline-block;
  margin-top: 10px;
}

.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin-top: 12px;
}

.sparkline span {
  flex: 1;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  min-height: 2px;
}

.sparkline span.today {
  background: #fff;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.dashboard-list-head {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--outline-soft);
  flex-wrap: wrap;
}

.dashboard-list-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-inner);
  padding: 11px 12px;
  margin-bottom: var(--space-sm);
}

.mini-row:last-child {
  margin-bottom: 0;
}

.mini-row-main {
  flex: 1;
  min-width: 0;
}

.mini-row-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.mini-row-meta {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--on-surface-variant);
  line-height: 1.5;
}

.mini-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
}

.mini-usage {
  display: inline-block;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.mini-primary-btn {
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 5px 12px;
  cursor: pointer;
}

.dashed-tile {
  border: 1px dashed var(--outline);
  border-radius: var(--radius-inner);
  padding: 12px;
  text-align: center;
  margin-top: var(--space-sm);
}

/* ── 표 ───────────────────────────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.content-table thead tr {
  background: var(--background);
}

.content-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--on-surface-variant);
  padding: 9px 8px;
  border-bottom: 1px solid var(--outline-soft);
  white-space: nowrap;
}

.content-table th:first-child {
  padding-left: 20px;
}

.content-table th.col-status,
.content-table th:last-child {
  padding-right: 20px;
}

.content-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--outline-soft);
  vertical-align: middle;
}

.content-table td:first-child {
  padding-left: 20px;
}

.content-table td:last-child {
  padding-right: 20px;
}

.content-table tbody tr:last-child td {
  border-bottom: none;
}

.content-table tr.row-selected {
  background: #f7f6fe;
}

.content-table .nowrap {
  white-space: nowrap;
  color: var(--on-surface-variant);
}

.content-table .reach {
  white-space: nowrap;
  font-weight: 700;
}

.content-table .reach-empty {
  white-space: nowrap;
  color: var(--on-surface-variant);
}

.col-check {
  width: 36px;
}

.cell-title {
  margin: 0;
  font-weight: 600;
}

.cell-subtitle {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--on-surface-variant);
}

.content-title-link {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  display: block;
  width: 100%;
}

.content-title-link:hover .cell-title {
  color: var(--primary);
  text-decoration: underline;
}

.table-footnote {
  margin: 0;
  font-size: 12px;
  color: var(--on-surface-variant);
}

.cell-person {
  display: flex;
  align-items: center;
  gap: 9px;
}

.empty-cell {
  padding: 24px 20px;
  color: var(--on-surface-variant);
  font-size: 13px;
}

/* ── 문의함 — 행 클릭 시 전문 펼침(employees.js 기기목록 펼침과 같은 패턴) ── */
.inquiry-row:hover {
  background: var(--surface-variant);
}

.inquiry-preview-cell {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--on-surface-variant);
}

.inquiry-detail-row td {
  background: var(--surface-variant);
}

.inquiry-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.inquiry-message {
  margin: 0;
  white-space: pre-wrap;
  word-break: keep-all;
  color: var(--on-surface);
}

/* ── 다중선택 벌크 바 ──────────────────────────────────────────────── */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #e6e4fc, #e0defb);
  padding: 10px 20px;
  border-bottom: 1px solid var(--outline);
  flex-wrap: wrap;
}

.bulk-bar-count {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--on-primary-container);
}

.bulk-bar-spacer {
  flex: 1;
}

.bulk-bar-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bulk-btn {
  border: none;
  background: #fff;
  color: var(--on-primary-container);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 5px 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(29, 20, 102, 0.14);
}

.bulk-btn-danger {
  background: var(--error-container);
  color: var(--on-error-container);
  box-shadow: none;
}

/* ── 상세 드로어 ──────────────────────────────────────────────────── */
.content-layout {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.content-main {
  flex: 1;
  min-width: 0;
}

.content-drawer {
  width: 348px;
  flex: none;
  background: var(--surface);
  border-left: 1px solid var(--outline);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.content-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.drawer-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.35;
}

.drawer-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid var(--outline-soft);
  border-bottom: 1px solid var(--outline-soft);
  padding: 12px 0;
  margin: 0;
}

.drawer-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.drawer-meta dt {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.drawer-meta dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
}

.drawer-meta dd.accent {
  font-weight: 700;
  color: var(--primary);
}

.drawer-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.drawer-progress-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-variant);
}

.drawer-progress-value {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.drawer-progress-value .unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-variant);
}

.progress-track {
  height: 6px;
  background: var(--outline-soft);
  border-radius: var(--radius-pill);
  margin-top: 6px;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4338ca, #6d5fe0);
  border-radius: var(--radius-pill);
}

.drawer-progress-caption {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--on-surface-variant);
}

.drawer-body-box {
  background: var(--background);
  border: 1px solid var(--outline);
  border-radius: var(--radius-medium);
  padding: 14px;
}

.drawer-body-box p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.drawer-actions-row {
  display: flex;
  gap: var(--space-sm);
}

.drawer-action-primary,
.drawer-action-secondary {
  flex: 1;
  margin-top: 0;
  font-size: 13px;
  padding: 11px 0;
}

/* ── 템플릿 라이브러리 ────────────────────────────────────────────── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--card-shadow);
}

.template-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.template-card-usage {
  font-size: 11px;
  font-weight: 700;
  color: var(--on-surface-variant);
}

.template-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.template-card-body {
  margin: 0;
  font-size: 12.5px;
  color: var(--on-surface-variant);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-card-date {
  margin: 0;
  font-size: 11px;
  color: var(--on-surface-variant);
}

.template-card-actions {
  display: flex;
  gap: 6px;
}

.template-primary-btn {
  flex: 1;
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 8px 0;
  cursor: pointer;
}

.template-secondary-btn {
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-variant);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 8px 12px;
  cursor: pointer;
}

.template-add-tile {
  border: 1px dashed var(--outline);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 190px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-family: inherit;
}

.template-add-tile-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
}

.template-add-tile-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--on-surface-variant);
  text-align: center;
  line-height: 1.5;
}

/* ── 직원 ─────────────────────────────────────────────────────────── */
.pending-strip {
  background: linear-gradient(180deg, #fef1f1, #fee2e2);
  padding: 13px 20px;
  border-bottom: 1px solid var(--outline);
  display: flex;
  align-items: center;
  gap: 9px;
}

.pending-strip h2 {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--on-error-container);
}

.pending-grid {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-inner);
  padding: 11px 12px;
  background: var(--surface);
}

.person-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.person-avatar-teal {
  background: #ccfbf1;
  color: #134e4a;
}

.person-avatar-neutral {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.person-main {
  flex: 1;
  min-width: 0;
}

.person-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.person-meta {
  margin: 0;
  font-size: 11px;
  color: var(--on-surface-variant);
}

.person-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

/* ── 설정 ─────────────────────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
  max-width: 940px;
}

.settings-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.settings-submit {
  margin-top: 18px;
  padding: 11px 22px;
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.3);
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--outline-soft);
  padding-bottom: 9px;
}

.kv-row-last {
  border-bottom: none;
  padding-bottom: 0;
}

.kv-key {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 600;
}

.kv-val {
  font-size: 13.5px;
  font-weight: 600;
}

.danger-panel {
  border-color: var(--error);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
}

.danger-title {
  color: var(--on-error-container);
}

.mobile-logout-btn,
.mobile-alert-banner {
  display: none;
}

/* 접근 비밀번호 카드는 데스크톱에선 일반 폼, 모바일에선 셰브론 행(접힘) */
.disclosure-head {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  font-family: inherit;
  cursor: default;
}

.disclosure-head .panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.disclosure-head .hint {
  display: block;
}

.disclosure-chevron {
  display: none;
}

/* ── 모달 ─────────────────────────────────────────────────────────── */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.42);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 52px 20px;
  overflow-y: auto;
  z-index: 20;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-large);
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.32), 0 4px 12px rgba(28, 25, 23, 0.16);
  overflow: hidden;
  padding: var(--space-lg);
}

.compose-modal {
  max-width: 860px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.compose-modal .modal-header {
  padding: var(--space-lg) 24px var(--space-md);
  border-bottom: 1px solid var(--outline-soft);
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--primary-container);
  color: var(--on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
}

.modal-header-text {
  flex: 1;
  min-width: 0;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.modal-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--on-surface-variant);
}

.modal-subtitle strong {
  color: var(--primary);
}

.compose-body {
  display: flex;
  min-height: 0;
}

.compose-form {
  flex: 1;
  min-width: 0;
  padding: var(--space-lg) 24px;
}

.template-start-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--background);
  border: 1px solid var(--outline);
  border-radius: var(--radius-inner);
  padding: 11px 12px;
}

.template-start-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-variant);
}

.template-start-box .chip {
  font-size: 12px;
  padding: 6px 12px;
}

.template-start-box .chip.active {
  background: var(--primary);
  color: var(--on-primary);
}

.template-start-link {
  margin-left: auto;
}

.compose-preview {
  width: 300px;
  flex: none;
  background: var(--background);
  border-left: 1px solid var(--outline-soft);
  padding: var(--space-lg);
}

.compose-preview-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--on-surface-variant);
}

.preview-phone {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.08);
}

.preview-phone-header {
  background: var(--mobile-header-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.preview-phone-icon {
  width: 24px;
  height: 24px;
  flex: none;
  object-fit: contain;
}

.preview-phone-body {
  padding: 12px;
}

.preview-card {
  border: 1px solid var(--outline);
  border-radius: var(--radius-medium);
  padding: 12px;
}

.preview-card + .preview-card {
  margin-top: var(--space-sm);
}

.preview-card-faded {
  opacity: 0.55;
  border-color: var(--outline-soft);
}

.preview-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preview-card-time {
  font-size: 10.5px;
  color: var(--on-surface-variant);
}

.preview-card-title {
  margin: 7px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.preview-card-faded .preview-card-title {
  margin: 0;
  font-size: 13px;
}

.preview-card-body {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--on-surface-variant);
  line-height: 1.6;
}

.preview-card-meta {
  margin: 9px 0 0;
  font-size: 10.5px;
  color: var(--on-surface-variant);
}

.preview-card-faded .preview-card-meta {
  margin: 4px 0 0;
  font-size: 11.5px;
}

.audience-box {
  background: var(--primary-container);
  border-radius: var(--radius-inner);
  padding: 12px;
  margin-top: 14px;
}

.audience-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-primary-container);
}

.audience-value {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--on-primary-container);
  line-height: 1;
}

.audience-value span {
  font-size: 12.5px;
  font-weight: 600;
}

.audience-caption {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--on-primary-container);
  opacity: 0.75;
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-md) 24px;
  border-top: 1px solid var(--outline-soft);
  background: var(--surface);
}

.modal-footer-inline {
  padding: var(--space-md) 0 0;
  border-top: none;
  justify-content: flex-end;
}

.modal-footer .hint {
  flex: 1;
  margin: 0;
}

.compose-modal > .status {
  padding: 0 24px var(--space-md);
  margin: 0;
}

/* 헤더/툴바 버튼은 절대 두 줄로 깨지지 않는다 (실제로 "+ 새\n공지"로 깨졌던 회귀) */
.btn,
.btn-hero,
.pill-btn,
.white-pill-btn,
.bulk-btn,
.approve-btn,
.delete-btn,
.template-primary-btn,
.template-secondary-btn,
.mobile-tab {
  white-space: nowrap;
}

/* ── 모바일 전용 요소 (데스크톱에선 숨김) ──────────────────────────── */
.mobile-topbar,
.mobile-tabbar,
.mobile-cta,
.card-list {
  display: none;
}

/* ══════════════════════════════════════════════════════════════════
   모바일 (≤767px) — 목업 1e / 3b / 4a~4d
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .mobile-topbar {
    display: block;
    background: var(--mobile-header-gradient);
    color: #fff;
    padding: 14px 16px;
  }

  .mobile-topbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-icon-btn {
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
  }

  .mobile-topbar-icon {
    width: 30px;
    height: 30px;
    flex: none;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
  }

  .mobile-topbar-text {
    flex: 1;
    min-width: 0;
  }

  .mobile-topbar-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
  }

  .mobile-topbar-sub {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .metric-strip {
    display: flex;
    gap: 8px;
    margin-top: 14px;
  }

  .metric-tile {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 9px 11px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  }

  .metric-tile-label {
    margin: 0;
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
  }

  .metric-tile-value {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1.1;
  }

  .metric-tile-value span {
    font-size: 11px;
    font-weight: 600;
  }

  .mobile-search-row {
    margin-top: 10px;
  }

  .mobile-search-input {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 9px 14px;
    font-size: 13px;
  }

  .mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }

  .mobile-tabbar {
    display: flex;
    gap: 6px;
    background: var(--surface);
    border-bottom: 1px solid var(--outline);
    padding: 10px 16px;
    overflow-x: auto;
  }

  .mobile-tab {
    border: none;
    background: transparent;
    color: var(--on-surface-variant);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    cursor: pointer;
  }

  .mobile-tab.active {
    background: var(--primary-container);
    color: var(--on-primary-container);
    font-weight: 700;
  }

  /* 사이드바는 오프캔버스 드로어로 */
  .sidebar-scrim[data-open] {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.4);
    z-index: 15;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 78%;
    max-width: 300px;
    z-index: 16;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar[data-open] {
    transform: translateX(0);
  }

  /* 페이지 헤더는 모바일 헤더가 대체 */
  .page-header {
    display: none;
  }

  .view-body {
    padding: 16px;
    gap: 12px;
  }

  /* 필터 칩은 한 줄 가로 스크롤, 정렬 컨트롤은 숨긴다(목업 4a엔 없음) */
  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .chip-group {
    flex-wrap: nowrap;
  }

  .filter-row-spacer,
  .sort-label,
  #content-sort-btn {
    display: none;
  }

  /* 표 → 카드 리스트 */
  .table-scroll {
    display: none;
  }

  .card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }

  .panel-flush .card-list {
    padding: 0;
  }

  .panel {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }

  .list-card {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-medium);
    padding: 14px;
    text-align: left;
    font-family: inherit;
    width: 100%;
  }

  /* 커서/탭 어포던스는 실제로 클릭 핸들러가 있는 <button>일 때만 —
     슈퍼관리자 목록 카드(div)는 탭해도 아무 일이 없어 오해를 준다. */
  button.list-card {
    cursor: pointer;
  }

  .list-card-muted {
    background: var(--background);
  }

  .list-card-muted .list-card-title {
    color: var(--on-surface-variant);
  }

  .list-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .list-card-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
  }

  .list-card-body {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: var(--on-surface-variant);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .list-card-meta {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .list-card-meta span {
    font-size: 11.5px;
    color: var(--on-surface-variant);
  }

  .list-card-meta strong {
    color: var(--on-background);
  }

  .list-card-meta strong.accent {
    color: var(--primary);
  }

  .list-card-progress {
    height: 5px;
    background: var(--outline-soft);
    border-radius: var(--radius-pill);
    margin-top: 10px;
    overflow: hidden;
  }

  .list-card-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #4338ca, #6d5fe0);
    border-radius: var(--radius-pill);
  }

  .list-card-progress-caption {
    margin: 5px 0 0;
    font-size: 11px;
    color: var(--on-surface-variant);
  }

  .list-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  /* 대시보드 — 지표는 헤더의 3분할 스트립이 대신하므로 카드 그리드는 숨긴다(목업 1e) */
  .stat-grid {
    display: none;
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  #dashboard-list-panel .dashboard-list-head h2 {
    font-size: 15px;
  }

  .dashboard-list-head {
    padding: 14px 0 10px;
    border-bottom: none;
  }

  .panel-pad,
  .card {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-medium);
  }

  .panel-head-pad {
    padding: 0 0 10px;
  }

  /* 직원 */
  .pending-strip {
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    padding: 13px 14px;
  }

  .pending-grid {
    grid-template-columns: 1fr;
    padding: 14px;
    background: var(--error-container);
    border-radius: 0 0 var(--radius-medium) var(--radius-medium);
  }

  #employee-pending-card {
    border: none;
  }

  .person-actions .approve-btn,
  .person-actions .delete-btn {
    padding: 8px 14px;
    font-size: 12.5px;
  }

  /* 공지관리 드로어 → 화면 아래로 스택 */
  .content-layout {
    flex-direction: column;
  }

  .content-drawer {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--outline);
  }

  /* 모바일 대기 배너 (목업 1e) */
  .mobile-alert-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--error-container);
    border-radius: var(--radius-medium);
    padding: 13px 14px;
  }

  .mobile-alert-banner p {
    flex: 1;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--on-error-container);
  }

  /* 모바일 대시보드에선 처리대기/템플릿 카드가 배너·탭바로 대체된다(목업 1e) */
  #dashboard-pending-card,
  #dashboard-template-card {
    display: none;
  }

  /* 설정 */
  .settings-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  /* 접근 비밀번호 — 셰브론 행으로 접고, 탭하면 펼친다(목업 4d) */
  .disclosure-head {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }

  .disclosure-main {
    flex: 1;
    min-width: 0;
  }

  .disclosure-head .panel-head-row {
    margin-bottom: 4px;
  }

  .disclosure-chevron {
    display: block;
    font-size: 18px;
    color: var(--on-surface-variant);
    font-weight: 700;
    transition: transform 0.15s ease;
  }

  #access-password-panel.expanded .disclosure-chevron {
    transform: rotate(90deg);
  }

  #access-password-panel #access-password-form {
    display: none;
  }

  #access-password-panel.expanded #access-password-form {
    display: block;
  }

  /* 목업 4d는 모바일에서 "새 비밀번호 확인" 필드를 생략하지만 그대로 두기로 했다 —
     required 입력을 숨기면 폼 검증이 통과되지 않고(포커스 불가 오류), 비밀번호
     변경에서 확인 입력을 없애는 것은 안전성 측면에서도 바람직하지 않다. */

  .danger-outline-btn-inline {
    width: 100%;
    padding: 13px 0;
  }

  .settings-col {
    gap: 12px;
  }

  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="datetime-local"],
  select,
  textarea {
    padding: 13px;
    font-size: 15px;
  }

  .settings-submit {
    width: 100%;
    padding: 14px 0;
  }

  .mobile-logout-btn {
    display: block;
    width: 100%;
    border: 1px solid var(--outline);
    background: var(--surface);
    color: var(--on-surface-variant);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    padding: 13px 0;
    cursor: pointer;
  }

  /* 템플릿 */
  .template-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .template-card {
    border-radius: var(--radius-medium);
    padding: 14px;
  }

  .template-add-tile {
    display: none;
  }

  .template-primary-btn,
  .template-secondary-btn {
    font-size: 13.5px;
    padding: 12px 0;
  }

  .template-secondary-btn {
    padding: 12px 16px;
  }

  /* ── 터치 타깃 — 모바일 상호작용 컨트롤은 최소 44px ────────────────────
     개별 padding을 손보는 대신 한 블록으로 묶어, 앞으로 버튼을 추가해도
     자동으로 적용되게 한다(실기기에서 22~34px짜리가 다수 발견됐다). */
  .delete-btn,
  .approve-btn,
  .pill-btn,
  .white-pill-btn,
  .bulk-btn,
  .mobile-tab,
  .template-primary-btn,
  .template-secondary-btn,
  .segmented-btn,
  .chip,
  .nav-link,
  .sidebar-logout-btn,
  .link-btn {
    min-height: 44px;
  }

  /* 드로어 메뉴 항목은 세로 중앙 정렬을 유지한 채 높이만 키운다 */
  .nav-link,
  .sidebar-logout-btn {
    display: flex;
    align-items: center;
  }

  .sidebar-logout-btn {
    justify-content: center;
  }

  .mobile-icon-btn,
  .round-icon-btn,
  .icon-btn,
  .sidebar-close-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  /* 입력 폰트 16px 미만이면 iOS Safari가 포커스 시 화면을 자동 확대한다 */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="datetime-local"],
  select,
  textarea,
  .mobile-search-input {
    font-size: 16px;
  }

  /* 드로어 닫기 버튼 — 모바일에서만 노출(반투명 사각, 헤더 아이콘 버튼과 동일 톤) */
  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
  }

  /* 홈 인디케이터/제스처 바 영역 회피 */
  .sidebar {
    padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
  }

  .modal-footer {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  /* 가로 스크롤 행이 페이지 제스처/세로 스크롤로 새지 않게 */
  .filter-row,
  .chip-group,
  .mobile-tabbar,
  .template-start-box {
    overscroll-behavior-x: contain;
  }

  /* 하단 고정 CTA (페이드 그라디언트) — 마지막 카드가 버튼에 가리지 않도록
     리스트 쪽에 CTA 높이만큼 여유를 준다. */
  .mobile-cta {
    display: block;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(250, 249, 247, 0), var(--background) 40%);
    padding: 12px 0 calc(18px + env(safe-area-inset-bottom));
    margin-top: auto;
    z-index: 5;
  }

  /* CTA 실제 높이(버튼 ~48px + 위아래 패딩 ~30px) + safe-area 만큼 비워야
     목록 끝까지 스크롤했을 때 마지막 카드가 가리지 않는다. */
  #view-content .card-list,
  #view-templates .template-grid,
  #dashboard-list-panel .card-list {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .mobile-cta-btn {
    width: 100%;
    border: none;
    background: var(--primary);
    color: var(--on-primary);
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    padding: 15px 0;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(67, 56, 202, 0.35);
  }

  .mobile-cta-btn-dashed {
    border: 1px dashed var(--primary);
    background: var(--surface);
    color: var(--primary);
    font-size: 14.5px;
    padding: 14px 0;
    box-shadow: none;
  }

  /* 모달 → 전체화면 시트. align-items: stretch로 두면 모달 높이가 화면 높이에 고정돼(flex 교차축
     stretch는 컨테이너 높이로 확정된다) 본문이 길어질 때 아래가 overflow:hidden에 잘리고 스크림도
     스크롤할 게 없어진다(실기기 제보) — flex-start + 아래 min-height로 "최소 화면 높이, 넘치면 늘어남". */
  .modal-scrim {
    padding: 0;
    align-items: flex-start;
  }

  .modal,
  .compose-modal {
    max-width: none;
    border-radius: 0;
    /* 데스크톱의 overflow:hidden(둥근 모서리 클리핑용)이 남으면 모달 자체가 sticky 기준 컨테이너가 돼
       하단 .modal-footer(게시하기)가 화면 하단에 붙지 않고 본문 끝까지 밀려난다. */
    overflow: visible;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .compose-modal .modal-header {
    background: var(--mobile-header-gradient);
    color: #fff;
    border-bottom: none;
    padding: 14px 16px;
    align-items: center;
  }

  .compose-modal .modal-header h2 {
    font-size: 15px;
  }

  .compose-modal .modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
  }

  .compose-modal .modal-subtitle strong {
    color: #fff;
  }

  .compose-modal .modal-icon-badge {
    display: none;
  }

  .compose-modal .round-icon-btn {
    order: -1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    color: #fff;
  }

  .compose-body {
    flex-direction: column;
    flex: 1;
  }

  .compose-form {
    padding: 16px;
  }

  .compose-preview,
  #compose-template-box .template-start-label,
  #compose-template-box .template-start-link,
  #compose-expiry-hint {
    display: none;
  }

  .template-start-box {
    background: transparent;
    border: none;
    padding: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .field-row .field-col:first-child {
    display: none; /* 모바일에선 예약 시각 필드 숨김(목업 3b) */
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    padding: 12px 16px 18px;
  }

  .modal-footer .hint,
  #compose-cancel-btn {
    display: none;
  }

  .modal-footer .btn-hero {
    width: 100%;
    padding: 16px 0;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(67, 56, 202, 0.35);
  }

  .modal-footer-inline .pill-btn,
  .modal-footer-inline .btn-hero {
    display: block;
  }
}

/* 비밀번호 표시/숨김 토글 — input 안쪽 우측에 절대 배치(아이콘 폰트 없이 유니코드 글리프) */
.pw-toggle-wrap {
  position: relative;
  display: block;
}

.pw-toggle-wrap input[type="password"],
.pw-toggle-wrap input[type="text"] {
  padding-right: 40px;
}

.pw-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  color: var(--on-surface-variant);
}
