/* ════════════════════════════════════════════
   웃는생각 OS Dashboard - Style Sheet
   ════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      var(--ws-primary);
  --primary-dark: var(--ws-primary-hover);
  --sidebar-bg:   var(--ws-surface);
  --sidebar-text: var(--ws-text-muted);
  --sidebar-active-bg: var(--ws-primary-soft);
  --sidebar-active: var(--ws-primary-active);
  --bg:           var(--ws-bg);
  --card:         var(--ws-surface);
  --border:       var(--ws-border-light);
  --text:         var(--ws-text-strong);
  --text-light:   var(--ws-text-muted);
  --green:        var(--ws-success);
  --orange:       var(--ws-warning);
  --red:          var(--ws-danger);
  --purple:       #6b46c1;
  --radius:       var(--ws-radius-inner);
  --shadow:       var(--ws-shadow-rest);
  --shadow-md:    var(--ws-shadow-hover);
  --sidebar-w:    220px;
  --topbar-h:     56px;
}

body {
  font-family: var(--ws-font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ── 로그인 ── */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #191F28 0%, var(--ws-primary-active) 100%);
}
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 380px;
  box-shadow: var(--shadow-md);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-img {
  /* 로고 이미지: "웃는생각 OS" 제목 글자와 동일한 가로 크기 (22px 굵은 폰트 기준 약 140px) */
  height: 40px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.login-title { font-size: 22px; font-weight: 500; color: var(--text); }
.login-subtitle { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.login-error {
  background: #fff5f5; border: 1px solid #fed7d7;
  color: var(--red); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 13px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.login-form label { font-size: 13px; font-weight: 500; color: var(--text); }
.input-icon { position: relative; }
.input-icon i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 14px;
}
.input-icon input {
  width: 100%; padding: 11px 14px 11px 36px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  transition: border-color .2s;
}
.input-icon input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(49,130,246,.12);
}
.btn-login {
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px; padding: 13px;
  font-size: 15px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .2s;
  margin-top: 4px;
}
.btn-login:hover { background: var(--primary-dark); }
.login-footer { color: rgba(255,255,255,.5); font-size: 12px; }

/* ── 앱 레이아웃 ── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── 사이드바 ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s ease, width .25s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
/* .logo-area 정의는 아래 "사이드바 로고 이미지" 섹션에 있음 */
a.logo-area:hover { opacity: .85; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--ws-primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 15px; font-weight: 500; color: #fff; }
.logo-sub  { font-size: 10px; color: rgba(255,255,255,.4); }

.nav-menu { list-style: none; padding: 8px 0; flex: 1; }

/* ── 사이드바 내부 토글 버튼 ── */
.nav-toggle-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; width: 100%;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.55); font-size: 14px;
  border-radius: 8px; margin: 2px 8px;
  transition: background .15s, color .15s;
  font-family: inherit; box-sizing: border-box;
}
.nav-toggle-btn i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-toggle-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
/* 데스크탑 collapsed 62px: 아이콘만 */
.sidebar.collapsed .nav-toggle-btn { justify-content: center; padding: 10px 0; gap: 0; width: auto; margin: 2px auto; }
.sidebar.collapsed .nav-toggle-btn span { display: none; }
.nav-section-label {
  font-size: 10px; font-weight: 500; letter-spacing: .08em;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: 16px 18px 6px;
}
.nav-item a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  margin: 2px 8px;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-item a i { width: 18px; text-align: center; font-size: 15px; }
.nav-item a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active > a {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 500;
}

.nav-chevron-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-right: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
}

.nav-chevron-btn:hover,
.nav-chevron-btn:focus-visible {
  background: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
}

.fav-pulse {
  animation: favPulse .45s ease;
}

@keyframes favPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* ── 사이드바 아코디언 서브메뉴 ── */
/* nav-link-accordion 은 nav-item a 와 완전히 동일한 방식으로 padding·margin 설정 */
.nav-link-accordion {
  display: flex; align-items: center;
  padding: 10px 0 10px 18px;            /* ← nav-item a (padding:10px 18px) 와 동일한 왼쪽 기준 */
  color: var(--sidebar-text);
  border-radius: 8px;
  margin: 2px 8px;
  gap: 0;
  font-size: 14px;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-link-accordion:hover { background: rgba(255,255,255,.07); color: #fff; }
/* 라벨 링크: .nav-link-accordion .nav-accordion-label → 명시도 (0,2,0) > .nav-item a (0,1,1)
   이 규칙이 .nav-item a 의 padding/margin/background 오염을 완전히 차단 */
.nav-link-accordion .nav-accordion-label {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 0;
  margin: 0;
  background: none;
  border-radius: 0;
  color: inherit; text-decoration: none;
  min-width: 0;
}
.nav-link-accordion .nav-accordion-label i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-link-accordion .nav-accordion-label:hover { background: none; color: #fff; }
/* 아코디언 active: 일반 nav-item active와 동일하게 배경색 + 색상 */
.nav-item-has-children.active > .nav-link-accordion {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
}
.nav-item-has-children.active > .nav-link-accordion .nav-accordion-label { color: var(--sidebar-active); font-weight: 500; }
/* 화살표 — 오른쪽에 독립 클릭 영역 */
.nav-chevron {
  font-size: 11px;
  color: inherit;
  transition: transform .25s ease;
  flex-shrink: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.nav-chevron:hover { color: inherit; background: transparent; }
.nav-item-has-children.open .nav-chevron { transform: rotate(180deg); }
.nav-submenu {
  list-style: none; padding: 0; margin: 0;
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.nav-item-has-children.open .nav-submenu { max-height: 300px; }
.nav-sub-item a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px 8px 44px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 6px;
  margin: 1px 8px;
  font-size: 13px;
  transition: background .15s, color .15s;
}
.nav-sub-item a i { width: 16px; text-align: center; font-size: 13px; }
.nav-sub-item a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-sub-item.active a {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 500;
}
.nav-sub-item a:hover .fav-icon { opacity: 1; }

/* 데스크탑 접힘: 아코디언 아이콘만 표시 */
.sidebar.collapsed .nav-link-accordion { justify-content: center; padding: 10px 0; margin: 2px auto; }
.sidebar.collapsed .nav-link-accordion .nav-accordion-label { justify-content: center; padding: 0; margin: 0; flex: none; width: auto; }
.sidebar.collapsed .nav-accordion-label span,
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .nav-chevron-btn { display: none !important; }
.sidebar.collapsed .nav-submenu { max-height: 0 !important; overflow: hidden; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-footer-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  border-radius: 7px;
  font-size: 13px;
  transition: all .15s;
}
.sidebar-footer-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-footer-link.logout:hover { color: #fc8181; }
.sidebar-footer-link i { width: 16px; }

/* ── 모바일 사이드바 닫기 버튼 (기본: 숨김, 모바일에서만 표시) ── */
.sidebar-close {
  display: none;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.45);
  font-size: 18px;
  padding: 4px 6px; border-radius: 5px;
  margin-left: auto; flex-shrink: 0;
  transition: color .15s, background .15s;
}
.sidebar-close:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* ── 사이드바 접힘 (데스크탑) ── */
.sidebar.collapsed { width: 62px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item a span,
.sidebar.collapsed .fav-icon,
.sidebar.collapsed .sidebar-close,
.sidebar.collapsed .sidebar-footer span { display: none !important; }
.sidebar.collapsed .nav-item a {
  justify-content: center; padding: 10px 0; gap: 0;
}
.sidebar.collapsed .sidebar-footer-link {
  justify-content: center; padding: 9px; gap: 0;
}
.sidebar.collapsed .sidebar-header {
  justify-content: center; padding: 18px 8px;
}
.sidebar.collapsed .logo-area { align-items: center; }

/* ── 메인 영역 ── */
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .25s ease;
}
.main-area.sidebar-collapsed { margin-left: 62px; }

/* ── 탑바 ── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky; top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-light);
  padding: 6px 8px; border-radius: 6px;
  margin-right: 12px; display: flex; align-items: center; justify-content: center;
}
.topbar-title { font-size: 16px; font-weight: 500; color: var(--text); flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  background: var(--ws-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; color: #fff;
}
.user-info-chip { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.user-role { font-size: 11px; color: var(--text-light); }

/* ── 콘텐츠 영역 ── */
.content-area {
  padding: 24px;
  flex: 1;
}

/* ── 알림 ── */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 8px;
  margin-bottom: 16px; font-size: 14px;
}
.alert-success { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; }
.alert-error   { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }
.alert-warning { background: #fffbeb; border: 1px solid #f6e05e; color: #92400e; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; opacity: .6; }
.alert-close:hover { opacity: 1; }

/* ── 카드 ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 500; flex: 1; }
.card-body { padding: 20px; }
.badge-count {
  background: var(--bg); color: var(--text-light);
  font-size: 12px; padding: 3px 10px;
  border-radius: 20px; font-weight: 500;
}

/* ── 대시보드 ── */
.dashboard-greeting { margin-bottom: 24px; }
.dashboard-greeting h2 { font-size: 22px; margin-bottom: 4px; }
.text-muted { color: var(--text-light); font-size: 14px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.summary-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
.summary-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.summary-card.blue  .summary-icon { background: #ebf4ff; color: var(--primary); }
.summary-card.green .summary-icon { background: #f0fff4; color: var(--green); }
.summary-card.orange .summary-icon { background: #fffbeb; color: var(--orange); }
.summary-card.red   .summary-icon { background: #fff5f5; color: var(--red); }
.summary-card.clickable { transition: transform 0.15s, box-shadow 0.15s; cursor: pointer; }
.summary-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.summary-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.summary-value { font-size: 26px; font-weight: 500; line-height: 1; }
.summary-unit  { font-size: 14px; font-weight: 400; margin-left: 2px; }
.summary-sub   { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.section-title { font-size: 15px; font-weight: 500; margin: 20px 0 12px; }

.shortcut-grid {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.shortcut-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 20px;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  font-size: 13px; font-weight: 500;
  transition: transform .15s, box-shadow .15s;
  min-width: 90px;
}
.shortcut-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shortcut-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.shortcut-icon.blue   { background: #ebf4ff; color: var(--primary); }
.shortcut-icon.green  { background: #f0fff4; color: var(--green); }
.shortcut-icon.orange { background: #fffbeb; color: var(--orange); }
.shortcut-icon.gray   { background: #f7fafc; color: var(--text-light); }

.info-card { border-left: 4px solid var(--primary); }
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.command-group-title { font-size: 13px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.command-item { font-size: 13px; padding: 4px 0; color: var(--text-light); }
.command-item code {
  background: var(--bg); color: var(--primary);
  padding: 2px 6px; border-radius: 4px;
  font-family: monospace; font-size: 12px;
  border: 1px solid var(--border);
  margin-right: 4px;
}

/* ── 근태 배너 ── */
.leave-banner {
  background: linear-gradient(135deg, var(--ws-primary) 0%, var(--ws-primary-hover) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap; gap: 12px;
}
.leave-banner-item { display: flex; align-items: center; gap: 12px; font-size: 24px; }
.leave-label { font-size: 12px; opacity: .8; }
.leave-value { font-size: 28px; font-weight: 500; }
.leave-banner-hint { font-size: 13px; opacity: .8; }
.leave-banner-hint code {
  background: rgba(255,255,255,.2); padding: 2px 8px;
  border-radius: 4px; font-family: monospace;
}

/* ── 통계 행 ── */
.stat-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.stat-mini {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px 16px; flex: 1; min-width: 100px;
  box-shadow: var(--shadow);
}
.stat-mini.green  { border-top: 3px solid var(--green); }
.stat-mini.orange { border-top: 3px solid var(--orange); }
.stat-mini.red    { border-top: 3px solid var(--red); }
.stat-mini.blue   { border-top: 3px solid var(--primary); }
.stat-mini.purple { border-top: 3px solid var(--purple); }
.stat-mini-label { font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.stat-mini-value { font-size: 20px; font-weight: 500; }
.total-stat .stat-mini-value { font-size: 16px; }
/* 클릭 가능한 stat 카드 */
.stat-mini.clickable {
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.stat-mini.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.stat-mini.clickable:hover .stat-mini-label { color: var(--text-main); }
.stat-mini.clickable.stat-active {
  box-shadow: 0 0 0 2px var(--primary);
}

/* ── 필터 바 ── */
.filter-bar { padding: 14px 20px; margin-bottom: 16px; }
.filter-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 11px; color: var(--text-light); font-weight: 500; }

/* ── 테이블 ── */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th {
  background: #f8fafc; color: var(--text-light);
  font-size: 12px; font-weight: 500;
  padding: 10px 16px; text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #fafbfd; }
.data-table tbody tr:last-child td { border-bottom: none; }
.row-warning { background: #fffbeb !important; }
.row-inactive { opacity: .5; }

.td-title { max-width: 260px; }
.td-date  { white-space: nowrap; color: var(--text-light); font-size: 13px; }
.td-mono  { font-family: monospace; font-size: 12px; }
.user-id-text { font-size: 13px; color: #444; font-weight: 500; }
.td-right { text-align: right; }
.td-center { text-align: center; }
/* 헤더(th)도 정렬 클래스를 따르게 — '.data-table th{text-align:left}'(특이도 높음)가
   th의 .td-right/.td-center 를 덮어써 헤더와 값 열이 안 맞던 문제 해결 */
.data-table th.td-right  { text-align: right; }
.data-table th.td-center { text-align: center; }
.td-amount { font-weight: 500; font-size: 14px; }
.td-empty  { text-align: center; color: var(--text-light); padding: 40px; }
.rejection-reason { font-size: 12px; color: var(--red); margin-top: 3px; }

/* ── 상태 배지 (Toss-style pill, 토큰 기반) ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: var(--ws-radius-pill);
  font-size: var(--ws-fs-caption); font-weight: 500; line-height: 1.3;
  border: none; white-space: nowrap;
}
.badge-approved   { background: var(--ws-success-soft); color: var(--ws-success); }
.badge-pending    { background: var(--ws-warning-soft); color: var(--ws-warning); }
.badge-rejected   { background: var(--ws-danger-soft);  color: var(--ws-danger); }
.badge-cancelled  { background: var(--ws-bg);           color: var(--ws-text); }
.badge-warning    { background: var(--ws-warning-soft); color: var(--ws-warning); }
.badge-reviewing  { background: var(--ws-info-soft);    color: var(--ws-info); }
.badge-info       { background: var(--ws-info-soft);    color: var(--ws-info); }
.data-table .badge { padding: 3px 10px; }
.badge-default    { background: var(--ws-bg);           color: var(--ws-text); }

/* ── 근태 종류 태그 ── */
.type-tag {
  display: inline-block;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
/* 클릭 가능한 필터 badge */
.quick-filter-badge {
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.quick-filter-badge:hover { opacity: .75; transform: scale(1.07); }
/* 연차 - 보라 */
.type-tag-annual    { background: #f5f3ff; color: #6d28d9; border: 1px solid #c4b5fd; }
/* 반차 - 파랑 */
.type-tag-half      { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
/* 반반차 - 하늘 */
.type-tag-quarter   { background: #f0f9ff; color: #0369a1; border: 1px solid #7dd3fc; }
/* 외근 - 청록 */
.type-tag-outing    { background: #f0fdfa; color: #0f766e; border: 1px solid #5eead4; }
/* 면담 - 주황 */
.type-tag-counsel   { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
/* 내부미팅 - 인디고 */
.type-tag-internal  { background: #eef2ff; color: #4338ca; border: 1px solid #a5b4fc; }
/* 외부미팅 - 핑크 */
.type-tag-external  { background: #fdf2f8; color: #9d174d; border: 1px solid #f9a8d4; }
/* 차단 - 회색 */
.type-tag-blocked   { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
/* 면담패스 - 녹색 */
.type-tag-pass      { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
/* 기타/기본 */
.type-tag-default   { background: var(--bg); color: var(--text); border: 1px solid var(--border); }

.method-tag {
  background: var(--bg); color: var(--text);
  padding: 2px 8px; border-radius: 4px;
  font-size: 12px; border: 1px solid var(--border);
}
.method-tag-link {
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.method-tag-link:hover {
  background: rgba(30,111,217,.08);
  border-color: rgba(30,111,217,.3);
  color: var(--primary);
}

.tax-badge {
  font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 3px;
}
.tax-badge.issued     { background: #f0fff4; color: var(--green); }
.tax-badge.not-issued { background: #fff5f5; color: var(--red); }

/* ── 입금 정보 안내 ── */
.info-title { font-weight: 500; margin-bottom: 10px; }
.info-grid  { display: flex; flex-direction: column; gap: 6px; }
.info-item  { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.green  { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.gray   { background: var(--text-light); }
.dot.blue   { background: var(--primary); }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; border: 1.5px solid transparent;
  text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-warning { background: #fffbeb; color: var(--orange); border-color: #f6ad55; }
.btn-danger  { background: #fff5f5; color: var(--red); border-color: #fed7d7; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; }
.btn-icon {
  color: var(--primary); text-decoration: none;
  font-size: 16px; padding: 4px;
  border-radius: 4px;
  display: inline-flex;
}
.btn-icon:hover { background: #ebf4ff; }

.topbar-btn,
.sidebar-toggle,
.user-chip {
  min-width: 44px;
  min-height: 44px;
}

.search-result-item.active,
.search-result-item:focus-visible {
  background: #eef4ff;
  outline: none;
}

.form-control, .form-control-sm {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: 7px; font-size: 13px; font-family: inherit;
  background: #fff; color: var(--text);
  transition: border-color .2s;
}
.form-control-sm { padding: 6px 10px; font-size: 13px; }
.form-control:focus, .form-control-sm:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,111,217,.1);
}
/* 숫자 입력 스핀 버튼(▲▼) 전체 제거 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group label { font-size: 13px; font-weight: 500; }
.align-bottom { justify-content: flex-end; }

.inline-form .form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.inline-pw { width: 120px; }

/* ── 탭 ── */
.tab-nav { display: flex; gap: 4px; margin-bottom: 16px; }
.tab-btn {
  padding: 8px 18px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--text-light);
  font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: all .15s;
}
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-btn:not(.active):hover { background: var(--bg); color: var(--text); }

/* ── 권한 배지 ── */
.role-badge {
  padding: 2px 8px; border-radius: 4px;
  font-size: 11.5px; font-weight: 500;
}
.role-admin     { background: #fef3c7; color: #92400e; }
.role-manager   { background: #ebf8ff; color: #2b6cb0; }
.role-inventory { background: #f0fff4; color: #276749; }
.role-sales     { background: #faf5ff; color: #6b46c1; }
.role-guest     { background: #f7fafc; color: var(--text-light); }
/* 역할 셀렉트 */
.role-select { font-size: 12px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border); }

/* ── 즐겨찾기 아이콘 ── */
.fav-icon {
  margin-left: auto; font-size: 11px;
  color: var(--sidebar-text); opacity: 0;
  transition: opacity .15s, color .15s;
  cursor: pointer; padding: 2px 4px;
}
.nav-item a:hover .fav-icon { opacity: 1; }
.fav-icon:hover { color: #f6c90e !important; }
.active-fav { opacity: 1 !important; color: #f6c90e !important; }
.nav-link-fav { display: flex; align-items: center; }

/* ── 권한 설정 모달 ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: #fff; border-radius: 12px;
  width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 500; }
.modal-close {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--text-light); line-height: 1;
}
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 24px; border-top: 1px solid var(--border);
}
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th {
  font-size: 12px; color: var(--text-light);
  padding: 8px 12px; border-bottom: 2px solid var(--border);
}
.perm-table td { padding: 5px 12px; border-bottom: 1px solid #f0f4f8; font-size: 14px; }
.perm-table tbody tr:last-child td { border-bottom: none; }
/* 모듈 헤더 행 */
.perm-module-header td {
  background: #f0f4fa;
  font-weight: 500;
  font-size: 13px;
  padding: 7px 12px 6px;
  border-top: 2px solid #dde4ef;
  color: var(--text-primary, #222);
}
.perm-module-header td i { color: var(--primary); margin-right: 6px; }
.perm-module-header td small { font-weight: 400; color: var(--text-light); margin-left: 4px; }
/* 세부 기능 행 */
.perm-feature-row td { padding: 4px 8px; }
.perm-feature-name { padding-left: 22px !important; font-size: 13px; color: #444; }
/* 스크롤 가능 모달 바디 */
#permModal .modal-body { max-height: 55vh; overflow-y: auto; }
.perm-cb { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.perm-note { margin-top: 12px; font-size: 12px; color: var(--text-light); display: flex; gap: 6px; align-items: flex-start; }

/* ── 임시 비밀번호 알림 ── */
.alert-temp-pw {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fffbeb; border: 2px solid #f6c90e;
  border-radius: 10px; padding: 16px 20px;
  margin-bottom: 16px;
}
.alert-temp-pw > i { color: #d97706; font-size: 20px; margin-top: 2px; }
.temp-pw-body { flex: 1; }
.temp-pw-title { font-weight: 500; font-size: 14px; color: #92400e; margin-bottom: 8px; }
.temp-pw-info  { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.temp-pw-info strong { font-size: 17px; color: var(--primary); letter-spacing: 1px; }
.temp-pw-note  { font-size: 12px; color: var(--text-light); }

/* ── 액션 버튼 ── */
.action-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── 페이지 섹션 ── */
.page-section { max-width: 100%; }

/* ── 날짜 input 전체 영역 클릭 ── */
.date-full {
  cursor: pointer;
  position: relative;
}
.date-full::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  opacity: 0;
  cursor: pointer;
}

/* ── 근태 정보 박스 ── */
.att-info-box {
  display: flex; align-items: center; gap: 8px;
  background: #ebf4ff; color: var(--primary);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 14px;
}
.att-info-box strong { font-size: 16px; }

/* ── 연차 일수 카운터 ── */
.att-day-count {
  display: flex; align-items: center; gap: 6px;
  background: #f0fff4; color: var(--green);
  border-radius: 7px; padding: 8px 12px;
  font-size: 13px; margin-top: -6px; margin-bottom: 10px;
}
.att-day-count strong { font-size: 16px; font-weight: 500; }

/* ── 시간대 배지 ── */
.att-time-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fffbeb; color: var(--orange);
  border: 1px solid #f6e05e;
  border-radius: 6px; padding: 5px 10px;
  font-size: 12px; font-weight: 500;
  margin-top: 6px;
}

/* ── 근태: 신청하기 드롭다운 ── */
.att-dropdown { position: relative; }

.att-dropdown-toggle {
  background: rgba(255,255,255,.2);
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.att-dropdown-toggle:hover {
  background: rgba(255,255,255,.3);
  color: #fff;
}

.att-dropdown-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}
.att-dropdown-menu.show { display: block; }

.att-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-size: 13px; color: var(--text);
  cursor: pointer;
  transition: background .12s;
}
.att-dropdown-item:hover { background: var(--bg); }
.att-dropdown-item i { width: 14px; color: var(--primary); }
.att-dropdown-item-danger { color: var(--red) !important; }
.att-dropdown-item-danger i { color: var(--red) !important; }
.att-dropdown-item-danger:hover { background: #fff5f5; }
.att-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── 시간 슬롯 그리드 (면담·내부미팅 모달) ── */
.slot-grid-wrap { margin-top: 4px; }
.slot-grid-label { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.slot-loading     { font-size: 12px; color: var(--text-light); padding: 8px 0; }
.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.slot-chip {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  user-select: none;
  font-family: inherit;
}
.slot-chip.available {
  background: #f0f4ff;
  border-color: #c5d0f7;
  color: #3b5bdb;
}
.slot-chip.available:hover {
  background: #dce4ff;
  border-color: #748ffc;
}
.slot-chip.selected-start,
.slot-chip.selected-end {
  background: #3b5bdb;
  color: #fff;
  border-color: #3b5bdb;
}
.slot-chip.in-range {
  background: #e0e8ff;
  border-color: #748ffc;
  color: #3b5bdb;
}
.slot-chip.booked {
  background: #f1f3f5;
  color: #adb5bd;
  border-color: #dee2e6;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot-chip.blocked {
  background: #fff5f5;
  color: #e03131;
  border-color: #ffc9c9;
  cursor: not-allowed;
}
.slot-selection-info {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #3b5bdb;
  min-height: 18px;
}
.slot-selection-info.hint  { color: var(--text-light); font-weight: 400; }
.slot-selection-info.error { color: var(--red); }

/* ── 근태: 신청 모달 ── */
.att-modal { max-width: 480px; }

.req { color: var(--red); }
.opt-label { font-size: 12px; font-weight: 400; color: var(--text-light); margin-left: 4px; }

/* 라디오 그룹 */
.radio-group {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 6px 0;
}
.radio-option {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; cursor: pointer;
}
.radio-option input[type="radio"] {
  accent-color: var(--primary);
  width: 15px; height: 15px; cursor: pointer;
}

/* 시간 2-컬럼 행 */
.form-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  /* 모바일 기본: 62px 아이콘 전용 사이드바 (항상 표시) */
  :root { --sidebar-w: 62px; }
  .sidebar { width: 62px; }
  .sidebar .logo-text,
  .sidebar .nav-section-label,
  .sidebar .nav-item a span,
  .sidebar .fav-icon,
  .sidebar .sidebar-footer span { display: none !important; }
  .sidebar .nav-item a { justify-content: center; padding: 10px 0; gap: 0; }
  /* 모바일 아코디언: 아이콘 전용 */
  .sidebar .nav-accordion-label span,
  .sidebar .nav-chevron,
  .sidebar .nav-chevron-btn { display: none !important; }
  .sidebar .nav-link-accordion { justify-content: center; padding: 10px 0; margin: 2px auto; }
  .sidebar .nav-link-accordion .nav-accordion-label { justify-content: center; padding: 0; margin: 0; flex: none; width: auto; }
  .sidebar:not(.open) .nav-submenu { max-height: 0 !important; overflow: hidden; }
  .sidebar .sidebar-footer-link { justify-content: center; padding: 9px; gap: 0; }
  .sidebar .sidebar-header { justify-content: center; padding: 18px 8px; }
  .sidebar .logo-area { justify-content: center; }
  .sidebar-close { display: none; }

  /* 모바일 확장: 220px 오버레이 */
  .sidebar.open {
    width: 220px;
    z-index: 200;
    box-shadow: 4px 0 20px rgba(0,0,0,.22);
  }
  .sidebar.open .logo-text { display: flex !important; }
  .sidebar.open .nav-section-label { display: block !important; }
  .sidebar.open .nav-item a span { display: inline !important; }
  .sidebar.open .fav-icon { display: flex !important; }
  .sidebar.open .sidebar-footer span { display: inline !important; }
  .sidebar.open .nav-item a { justify-content: flex-start; padding: 10px 18px; gap: 10px; }
  /* 모바일 열림: 아코디언 정상 표시 */
  .sidebar.open .nav-accordion-label span { display: inline !important; }
  .sidebar.open .nav-chevron { display: inline !important; }
  .sidebar.open .nav-chevron-btn { display: inline-flex !important; }
  .sidebar.open .nav-link-accordion { padding: 10px 0 10px 18px; margin: 2px 8px; }
  .sidebar.open .nav-link-accordion .nav-accordion-label { flex: 1; padding: 0; margin: 0; }
  .sidebar.open .nav-sub-item a span { display: inline !important; }
  .sidebar.open .nav-sub-item .fav-icon { display: flex !important; }
  .sidebar.open .sidebar-footer-link { justify-content: flex-start; padding: 9px 10px; gap: 10px; }
  .sidebar.open .sidebar-header { justify-content: flex-start; padding: 20px 16px; display: flex; align-items: center; }
  .sidebar.open .sidebar-header .logo-area { justify-content: flex-start; gap: 10px; flex: 1; }
  .sidebar.open .sidebar-close { display: flex; align-items: center; }

  .main-area { margin-left: 62px; }
  .main-area.sidebar-collapsed { margin-left: 62px; }

  /* 모바일 62px: 토글 버튼 아이콘만 */
  .sidebar:not(.open) .nav-toggle-btn { justify-content: center; padding: 10px 0; gap: 0; width: auto; margin: 2px auto; }
  .sidebar:not(.open) .nav-toggle-btn span { display: none !important; }
  /* 모바일 220px: 토글 버튼 원래대로 */
  .sidebar.open .nav-toggle-btn { justify-content: flex-start; padding: 10px 18px; gap: 10px; width: 100%; }
  .sidebar.open .nav-toggle-btn span { display: inline !important; }

  .summary-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { gap: 8px; }
  .filter-form { gap: 8px; }
  .login-card { width: 90%; padding: 32px 24px; }

  /* ── 카드형 테이블 ──────────────────────────────────────── */
  .data-table thead { display: none; }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td { display: block; width: 100%; }
  .data-table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .data-table tbody tr:hover { background: #fff; }
  .data-table td {
    display: flex;
    align-items: flex-start;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f4f8;
    min-height: 36px;
    gap: 8px;
    text-align: left;
  }
  .data-table td:last-child { border-bottom: none; }
  .data-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    min-width: 72px;
    flex-shrink: 0;
    padding-top: 3px;
  }
  .data-table td.td-empty { display: block; text-align: center; }
  .data-table td.td-empty::before { content: none; }
  /* td-right/td-center 는 모바일에서 left 정렬로 되돌림 */
  .data-table td.td-right,
  .data-table td.td-center { text-align: left; justify-content: flex-start; }

  /* ── 모바일 모달 (하단 슬라이드업) ─────────────────────── */
  .modal-overlay { align-items: flex-end !important; }
  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 88vh !important;
    margin: 0 !important;
  }

  /* ── 필터 바 세로 스택 ────────────────────────────────── */
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-form .filter-group { width: 100%; }
  .filter-form .filter-group input,
  .filter-form .filter-group select { width: 100%; }
  .filter-form .btn { align-self: flex-start; }

  /* ── 기타 레이아웃 조정 ────────────────────────────────── */
  .content-area { padding: 14px; }
  .shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ── 페이지네이션 ── */
.pagination-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 2px; flex-wrap: wrap; gap: 8px;
}
.pagination-info { font-size: 13px; color: var(--text-light); }
.pagination-btns { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.page-btn {
  min-width: 32px; height: 32px;
  border: 1px solid var(--border); background: #fff;
  border-radius: 6px; cursor: pointer;
  font-size: 13px; color: var(--text);
  transition: all .15s; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.page-btn:hover:not(:disabled) {
  background: var(--bg); border-color: var(--primary); color: var(--primary);
}
.page-btn.active {
  background: var(--primary); border-color: var(--primary);
  color: #fff; font-weight: 500;
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-size-wrap { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); }
.page-size-select {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 6px; font-size: 13px; color: var(--text);
  background: #fff; cursor: pointer; height: 32px;
  font-family: inherit;
}
.page-size-select:focus { outline: none; border-color: var(--primary); }

/* ════════════════════════════════════════════
   OCR-first 지출결의 신청 패널
   ════════════════════════════════════════════ */

.ocr-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  color: var(--text-light);
  user-select: none;
}
.ocr-dropzone:hover,
.ocr-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(30,111,217,.04);
  color: var(--text);
}
.ocr-dropzone-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}
.ocr-dropzone-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* 리뷰 테이블 인라인 입력 */
#ocrReviewTable input.form-control-sm,
#ocrReviewTable select.form-control-sm {
  width: 100%;
  min-width: 70px;
}
#ocrReviewTable td { vertical-align: middle; }

/* OCR 오류 행 강조 */
.ocr-row-error td { background: #fff5f5; }

/* OCR 미리보기 팝업 — 현재 열람 중인 행 하이라이트 */
.ocr-row-preview td {
  background: #eff6ff !important;
}
.ocr-row-preview td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

/* OCR 줌 버튼 */
.ocr-zoom-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  transition: background .12s;
}
.ocr-zoom-btn:hover { background: var(--border); }

/* ── 사이드바 로고 이미지 ── */
.logo-area {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  cursor: pointer;
}
.sidebar-logo-img {
  width: 102px;     /* 고정 너비 102px, 비율 유지 */
  height: auto;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}
.sidebar-logo-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-left: 2px;
  white-space: nowrap;
}
/* 사이드바 접힘 시 로고 숨김 */
.sidebar.collapsed .sidebar-logo-img { display: none; }
.sidebar.collapsed .sidebar-logo-sub  { display: none; }

/* ── 지출결의 탭 ── */
.expense-tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg); border-radius: 10px; }
.expense-tab {
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.expense-tab:hover { background: var(--card-bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.expense-tab.active { background: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(99,102,241,.35); }

/* 지급요청 폼 그리드 */
.pay-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.pay-form-grid-compact {
  grid-template-columns: minmax(260px, 420px) minmax(180px, 240px);
  justify-content: start;
  column-gap: 16px;
  row-gap: 14px;
}
.pay-form-grid-compact .pay-form-full {
  max-width: 676px;
}
@media (max-width: 600px) { .pay-form-grid { grid-template-columns: 1fr; } }
.pay-form-full { grid-column: 1 / -1; }
.pay-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 4px;
}

/* ── 준비중 사이드바 메뉴 ── */
.nav-section-soon { opacity: .55; }
.nav-item-soon {
  opacity: .5;
  pointer-events: none;
}
.nav-link-soon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-light);
  font-size: 14px;
  border-radius: var(--radius);
}
.nav-link-soon i { width: 18px; text-align: center; flex-shrink: 0; }
.nav-link-soon > span:nth-child(2) { flex: 1; }
.badge-soon {
  font-size: 10px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(30,111,217,.1);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}
/* 가안(목업) 사이드바 배지 */
.nav-mock-badge {
  font-size: 9px;
  font-weight: 500;
  color: #d97706;
  background: rgba(217,119,6,.15);
  border: 1px solid rgba(217,119,6,.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}
.sidebar.collapsed .nav-mock-badge { display: none; }

@media (max-width: 768px) {
  .ocr-dropzone { padding: 20px 12px; }
  #ocrReviewTable thead { display: none; }
  #ocrReviewTable td { display: flex; align-items: center; padding: 6px 12px; }
  #ocrReviewTable td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 500; color: var(--text-light);
    min-width: 72px; flex-shrink: 0;
  }
}

/* ── 지급요청 폼: 은행 그리드 (3열) ── */
.pay-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
}
@media (max-width: 600px) { .pay-bank-grid { grid-template-columns: 1fr; } }

/* ── 이체완료 버튼 ── */
.btn-transferred {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-transferred:hover { background: #dbeafe; }

/* ── 메모 표시 ── */
.expense-memo {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 3px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.expense-memo i { margin-top: 2px; flex-shrink: 0; }

/* ── 내 계좌 섹션 ── */
.my-account-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-light);
  flex-wrap: wrap;
}
.my-account-bar strong { color: var(--text); }
.my-account-info { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.my-account-edit-btn { margin-left: 4px; }

.expense-list-header {
  justify-content: flex-start;
}

.expense-list-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.expense-list-title h3 {
  flex: 0 0 auto;
}

.expense-list-title .badge-count {
  margin-left: 0;
}

/* ── 증빙구분 태그 ── */
.proof-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  background: rgba(107,70,193,.1);
  color: #6b46c1;
  white-space: nowrap;
}

/* 지급요청 뱃지 — 실제 지급(이체)이 나가야 하는 건 강조 */
.pay-request-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  background: var(--red);
  color: #fff;
  white-space: nowrap;
  margin-right: 6px;
  vertical-align: middle;
}

/* 일괄 제출 시 미입력 필수 칸 강조 */
.field-missing {
  border-color: var(--red) !important;
  background: rgba(229,62,62,.06) !important;
}

/* ════════════════════════════════════════════
   사이드바 뱃지
   ════════════════════════════════════════════ */
.nav-badge {
  background: var(--red, #e53e3e);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: auto;
  flex-shrink: 0;
}
.sidebar.collapsed .nav-badge { display: none !important; }
@media (max-width: 768px) {
  .sidebar:not(.open) .nav-badge { display: none !important; }
}

/* ════════════════════════════════════════════
   탑바: 통합 검색
   ════════════════════════════════════════════ */
.global-search { position: relative; }
.search-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 24px;
  padding: 5px 8px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.search-toggle:hover { color: var(--primary); background: rgba(30,111,217,.06); }
.search-box {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  z-index: 500;
  padding: 10px 14px;
}
.search-box.open { display: block; }
.search-box-icon {
  position: absolute; left: 24px; top: 22px;
  color: var(--text-light); font-size: 14px;
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 9px 46px 9px 32px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 14px; font-family: inherit;
  background: var(--bg); color: var(--text);
  box-sizing: border-box;
}
.search-box input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,111,217,.1);
}
.search-kbd {
  position: absolute; right: 24px; top: 22px;
  font-size: 10px; font-family: inherit;
  background: var(--bg); color: var(--text-light);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px;
}
.search-results {
  max-height: 320px; overflow-y: auto;
  margin-top: 8px;
}
.search-results:empty { display: none; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px;
  border-radius: 6px;
  text-decoration: none; color: var(--text);
  transition: background .12s;
}
.search-result-item:hover { background: var(--bg); }
.search-result-mod {
  font-size: 10px; font-weight: 500;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(30,111,217,.08); color: var(--primary);
  white-space: nowrap;
}
.search-result-title { flex: 1; font-size: 13px; font-weight: 500; }
.search-result-date  { font-size: 11px; color: var(--text-light); white-space: nowrap; }
.search-result-empty { text-align: center; color: var(--text-light); font-size: 13px; padding: 16px; }

/* ════════════════════════════════════════════
   탑바: 알림 벨
   ════════════════════════════════════════════ */
.notif-wrap { position: relative; }
.notif-bell {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 24px;
  padding: 5px 8px; border-radius: 6px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.notif-bell:hover { color: var(--primary); background: rgba(30,111,217,.06); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--red, #e53e3e);
  border-radius: 50%;
  border: 2px solid var(--card, #fff);
}
.notif-count-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--red, #e53e3e); color: #fff;
  border-radius: 8px;
  font-size: 10px; font-weight: 500;
  line-height: 16px; text-align: center;
  padding: 0 3px; box-sizing: border-box;
  border: 2px solid var(--card, #fff);
  pointer-events: none;
}
.notif-panel {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  z-index: 500;
  overflow: hidden;
}
.notif-panel.open { display: block; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.notif-total {
  background: var(--red, #e53e3e); color: #fff;
  font-size: 11px; font-weight: 500;
  min-width: 20px; text-align: center;
  border-radius: 10px; padding: 2px 6px;
}
.notif-list { list-style: none; padding: 0; margin: 0; max-height: 260px; overflow-y: auto; }
.notif-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f4f8;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); width: 100%;
}
.notif-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.notif-icon.blue   { background: #ebf4ff; color: var(--primary); }
.notif-icon.orange  { background: #fffbeb; color: var(--orange, #d97706); }
.notif-icon.green   { background: #f0fff4; color: var(--green, #38a169); }
.notif-text { flex: 1; font-size: 13px; }
.notif-count { font-weight: 500; color: var(--primary); }
.notif-empty { text-align: center; color: var(--text-light); font-size: 13px; padding: 20px; list-style: none; }

/* ════════════════════════════════════════════
   탑바: 다크모드 토글
   ════════════════════════════════════════════ */
.darkmode-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 24px;
  padding: 5px 8px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.darkmode-toggle:hover { color: var(--orange, #d97706); background: rgba(217,119,6,.06); }

/* ════════════════════════════════════════════
   탑바: 공통 버튼 베이스 (topbar-btn)
   ════════════════════════════════════════════ */
.topbar-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 24px;
  padding: 5px 8px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
  position: relative;
}
.topbar-btn:hover { background: rgba(0,0,0,.05); color: var(--text); }

/* ════════════════════════════════════════════
   탑바: 유저 드롭다운
   ════════════════════════════════════════════ */
.topbar-right { display: flex; align-items: center; gap: 4px; }

.user-menu-wrap { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.user-chip:hover,
.user-menu-wrap.open .user-chip {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,111,217,.1);
}
.user-menu-caret {
  font-size: 10px; color: var(--text-light);
  transition: transform .2s;
}
.user-menu-wrap.open .user-menu-caret { transform: rotate(180deg); }

.user-dropdown {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 500; overflow: hidden;
}
.user-menu-wrap.open .user-dropdown { display: block; }

.user-dropdown-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg);
}
.ud-avatar {
  width: 36px; height: 36px;
  background: var(--ws-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; color: #fff;
  flex-shrink: 0;
}
.ud-name { font-size: 13px; font-weight: 500; color: var(--text); }
.ud-id   { font-size: 11px; color: var(--text-light); margin-top: 1px; }

.user-dropdown-divider { height: 1px; background: var(--border); }

.user-dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px;
  text-decoration: none; color: var(--text);
  font-size: 13px;
  transition: background .12s;
}
.user-dropdown-item:hover { background: var(--bg); }
.user-dropdown-item i {
  font-size: 13px; color: var(--text-light);
  width: 16px; text-align: center;
}
.user-dropdown-logout { color: var(--red, #e53e3e); }
.user-dropdown-logout i { color: var(--red, #e53e3e); }
.user-dropdown-logout:hover { background: rgba(229,62,62,.05); }

/* ════════════════════════════════════════════
   통합 내보내기 버튼
   ════════════════════════════════════════════ */
.btn-export {
  background: #f0fff4; color: var(--green, #38a169);
  border: 1px solid #9ae6b4;
  font-size: 12px; font-weight: 500;
  padding: 6px 14px; border-radius: 7px;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s;
  font-family: inherit; text-decoration: none;
}
.btn-export:hover { background: #c6f6d5; border-color: #68d391; }
.btn-export i { font-size: 13px; }

/* ════════════════════════════════════════════
   다크 모드
   ════════════════════════════════════════════ */
body.dark-mode {
  --primary:      var(--ws-primary);
  --primary-dark: var(--ws-primary-hover);
  --sidebar-bg:   var(--ws-surface);
  --sidebar-text: var(--ws-text-muted);
  --sidebar-active-bg: var(--ws-primary-soft);
  --sidebar-active: var(--ws-primary-active);
  --bg:           var(--ws-bg);
  --card:         var(--ws-surface);
  --border:       var(--ws-border-light);
  --text:         var(--ws-text-strong);
  --text-light:   var(--ws-text-muted);
  --green:        var(--ws-success);
  --orange:       var(--ws-warning);
  --red:          var(--ws-danger);
  --purple:       #a78bfa;
}
body.dark-mode .topbar {
  background: var(--card);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
body.dark-mode .user-avatar {
  background: var(--ws-primary);
}
body.dark-mode .login-body {
  background: linear-gradient(135deg, #0E1322 0%, var(--ws-primary-active) 100%);
}
body.dark-mode .login-card { background: var(--card); }
body.dark-mode .login-error { background: rgba(252,129,129,.1); border-color: rgba(252,129,129,.3); }
body.dark-mode .input-icon input {
  background: var(--bg); color: var(--text); border-color: var(--border);
}
body.dark-mode .btn-login { background: var(--ws-primary); }
body.dark-mode .btn-login:hover { background: var(--ws-primary-hover); }

body.dark-mode .summary-card,
body.dark-mode .stat-mini { background: var(--card); }
body.dark-mode .summary-card.blue .summary-icon  { background: rgba(93,160,245,.12); }
body.dark-mode .summary-card.green .summary-icon { background: rgba(72,187,120,.12); }
body.dark-mode .summary-card.orange .summary-icon { background: rgba(236,201,75,.12); }
body.dark-mode .summary-card.red .summary-icon   { background: rgba(252,129,129,.12); }
body.dark-mode .shortcut-item { background: var(--card); }
body.dark-mode .shortcut-icon.blue  { background: rgba(93,160,245,.12); }
body.dark-mode .shortcut-icon.green { background: rgba(72,187,120,.12); }
body.dark-mode .shortcut-icon.orange{ background: rgba(236,201,75,.12); }

body.dark-mode .data-table th { background: var(--ws-bg-subtle); color: #c8d5e8; letter-spacing:.03em; }
body.dark-mode .data-table td { border-bottom-color: #1e2f47; color: var(--text); }
body.dark-mode .data-table tbody tr:hover { background: #1e2d44; }
body.dark-mode .form-control,
body.dark-mode .form-control-sm {
  background: var(--bg); color: var(--text); border-color: var(--border);
}
body.dark-mode .tab-btn { background: var(--card); color: var(--text-light); border-color: var(--border); }
body.dark-mode .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
body.dark-mode .tab-btn:not(.active):hover { background: var(--bg); color: var(--text); }
body.dark-mode .modal-box { background: var(--card); border: 1px solid var(--border); }
body.dark-mode .card { background: var(--card); border-color: var(--border); }
body.dark-mode .card-header { border-bottom-color: var(--border); color: var(--text); }
body.dark-mode .card-header h3 { color: var(--text); }
body.dark-mode .filter-bar { background: var(--card); border-color: var(--border); }
body.dark-mode label { color: var(--text); }
body.dark-mode .stat-mini-label { color: var(--text-light); }
body.dark-mode .stat-mini-value { color: var(--text); }
body.dark-mode .modal-header { border-bottom-color: var(--border); }
body.dark-mode .modal-footer { border-top-color: var(--border); }
body.dark-mode .perm-module-header td { background: #1a2030; }

body.dark-mode .alert-success { background: rgba(72,187,120,.1); border-color: rgba(72,187,120,.3); color: #48bb78; }
body.dark-mode .alert-error   { background: rgba(252,129,129,.1); border-color: rgba(252,129,129,.3); color: #fc8181; }
body.dark-mode .alert-warning { background: rgba(236,201,75,.1); border-color: rgba(236,201,75,.3); color: #ecc94b; }
body.dark-mode .alert-temp_pw { background: rgba(236,201,75,.08); border-color: rgba(236,201,75,.3); }

body.dark-mode .leave-banner { background: linear-gradient(135deg, var(--ws-primary) 0%, var(--ws-primary-hover) 100%); }
body.dark-mode .att-info-box { background: rgba(93,160,245,.1); }
body.dark-mode .att-day-count { background: rgba(72,187,120,.1); }

body.dark-mode .ocr-dropzone { border-color: var(--border); }
body.dark-mode .ocr-dropzone:hover,
body.dark-mode .ocr-dropzone.drag-over { border-color: var(--primary); background: rgba(49,130,246,.06); }

/* ── 버튼 다크모드 ── */
body.dark-mode .btn-outline {
  background: #1e2d44;
  color: #c8d8f0;
  border-color: #3a4f6e;
}
body.dark-mode .btn-outline:hover {
  background: #253650;
  color: #e8edf5;
  border-color: #4a6080;
}
body.dark-mode .btn-warning {
  background: rgba(251,191,36,.15);
  color: #fbbf24;
  border-color: rgba(251,191,36,.4);
}
body.dark-mode .btn-warning:hover { background: rgba(251,191,36,.22); }
body.dark-mode .btn-danger {
  background: rgba(248,113,113,.15);
  color: #f87171;
  border-color: rgba(248,113,113,.4);
}
body.dark-mode .btn-danger:hover { background: rgba(248,113,113,.22); }
body.dark-mode .btn-icon { color: var(--ws-info); }
body.dark-mode .btn-icon:hover { background: rgba(var(--ws-primary-rgb, 49,130,246),.12); }

/* 인라인 스타일 버튼 (초록 계열) */
body.dark-mode .btn-xs[style*="#f0fdf4"],
body.dark-mode .btn-xs[style*="#16a34a"] { color: #4ade80 !important; }

body.dark-mode .page-btn { background: #1e2d44; color: #c8d8f0; border-color: #3a4f6e; }
body.dark-mode .page-size-select { background: #1e2d44; color: #c8d8f0; border-color: #3a4f6e; }

/* ── 입력 필드 placeholder ── */
body.dark-mode ::placeholder { color: #4a5e7a; }
body.dark-mode ::-webkit-input-placeholder { color: #4a5e7a; }

/* ── select 화살표 다크모드 ── */
body.dark-mode select.form-control-sm option,
body.dark-mode select.form-control option { background: #1e2d44; color: #e8edf5; }

/* ── 텍스트 색상 전반 ── */
body.dark-mode .td-date { color: #94a3b8; }
body.dark-mode .rejection-reason { color: #f87171; }
body.dark-mode .td-amount { color: #e8edf5; }
body.dark-mode th { color: #c8d8f0; }

/* ── 노션 섹션 레이블 등 보조 텍스트 ── */
body.dark-mode .nav-section-label { color: #4a5e7a; }

/* ── stat-mini 호버 강조 ── */
body.dark-mode .stat-mini.stat-active { border-color: var(--primary); background: rgba(49,130,246,.08); }

/* 다크모드 상태 배지 — 라이트 배경 제거하고 진한 색으로 */

body.dark-mode .notif-item { border-bottom-color: #1e2f47; }
body.dark-mode .notif-icon.blue  { background: rgba(93,160,245,.12); }
body.dark-mode .notif-icon.orange { background: rgba(236,201,75,.12); }
body.dark-mode .notif-icon.green  { background: rgba(72,187,120,.12); }
body.dark-mode .topbar-btn:hover { background: rgba(255,255,255,.07); color: var(--text); }
body.dark-mode .user-chip {
  background: var(--bg); border-color: var(--border);
}
body.dark-mode .user-chip:hover,
body.dark-mode .user-menu-wrap.open .user-chip {
  border-color: var(--ws-primary);
  box-shadow: 0 0 0 3px rgba(49,130,246,.15);
}
body.dark-mode .user-dropdown { box-shadow: 0 8px 32px rgba(0,0,0,.35); }
body.dark-mode .user-dropdown-header { background: rgba(255,255,255,.03); }
body.dark-mode .ud-avatar { background: var(--ws-primary); }
body.dark-mode .user-dropdown-item:hover { background: rgba(255,255,255,.05); }
body.dark-mode .user-dropdown-logout:hover { background: rgba(252,129,129,.08); }
body.dark-mode .notif-count-badge { border-color: var(--card); }
body.dark-mode .btn-export { background: rgba(72,187,120,.1); border-color: rgba(72,187,120,.3); color: #48bb78; }
body.dark-mode .btn-history { background: rgba(100,116,139,.15); border-color: rgba(100,116,139,.3); color: #94a3b8; }
body.dark-mode .btn-history:hover { background: rgba(49,130,246,.15); color: var(--ws-primary); border-color: rgba(49,130,246,.3); }
body.dark-mode .history-item:not(.last)::before { background: rgba(255,255,255,.08); }
body.dark-mode .history-detail { background: rgba(255,255,255,.04); border-left-color: rgba(255,255,255,.1); }
body.dark-mode .btn-export:hover { background: rgba(72,187,120,.18); }

/* ── 근태 신청 드롭다운 다크모드 ── */
body.dark-mode .att-dropdown-menu {
  background: #1e2d44;
  border-color: #2e3f5c;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
body.dark-mode .att-dropdown-item {
  color: #c8d8f0;
}
body.dark-mode .att-dropdown-item:hover {
  background: #253650;
  color: #e8edf5;
}
body.dark-mode .att-dropdown-item i {
  color: var(--ws-info);
}
body.dark-mode .att-dropdown-item-danger {
  color: #f87171 !important;
}
body.dark-mode .att-dropdown-item-danger i {
  color: #f87171 !important;
}
body.dark-mode .att-dropdown-item-danger:hover {
  background: rgba(248,113,113,.1);
}
body.dark-mode .att-dropdown-divider {
  background: #2e3f5c;
}

/* ═══ 레코드별 변경 이력 ═══ */
.btn-history {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid #e2e8f0; background: #f7fafc; color: #64748b;
  cursor: pointer; font-size: 12px; transition: all .15s;
}
.btn-history:hover { background: #eff6ff; color: #3b82f6; border-color: #bfdbfe; }

/* 타임라인 */
.history-timeline { position: relative; padding-left: 28px; }
.history-item { position: relative; padding-bottom: 20px; }
.history-item:not(.last)::before {
  content: ''; position: absolute; left: -20px; top: 24px;
  width: 2px; height: calc(100% - 12px); background: #e2e8f0;
}
.history-dot {
  position: absolute; left: -28px; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
}
.history-dot.green  { background: #48bb78; }
.history-dot.red    { background: #fc8181; }
.history-dot.blue   { background: var(--ws-primary); }
.history-dot.orange { background: #ed8936; }
.history-dot.teal   { background: #38b2ac; }
.history-dot.purple { background: #9f7aea; }

.history-content { padding-left: 4px; }
.history-action {
  font-weight: 500; font-size: 13px; color: var(--text); margin-bottom: 2px;
}
.history-meta {
  display: flex; gap: 12px; font-size: 11px; color: var(--text-light); margin-bottom: 2px;
}
.history-meta i { margin-right: 3px; }
.history-detail {
  font-size: 12px; color: var(--text-light); background: var(--bg);
  padding: 4px 8px; border-radius: 4px; margin-top: 4px;
  border-left: 3px solid #e2e8f0;
}

.history-loading, .history-empty {
  text-align: center; padding: 32px 0; color: var(--text-light);
}
.history-empty i { font-size: 32px; margin-bottom: 8px; display: block; opacity: .4; }
.history-empty p { margin: 0; }

body.dark-mode .my-account-bar { background: var(--bg); }
body.dark-mode .search-result-mod { background: rgba(49,130,246,.12); }

/* 다크모드에서 탑바 아이콘: 태양 아이콘으로 교체 */
body.dark-mode #darkModeBtn i { transform: rotate(180deg); transition: transform .3s; }

@media (max-width: 768px) {
  body.dark-mode .data-table tbody tr { background: var(--card); }
  body.dark-mode .data-table tbody tr:hover { background: var(--card); }
  .search-box { width: calc(100vw - 80px); right: -40px; }
  .notif-panel { width: calc(100vw - 40px); right: -20px; }
  .search-kbd { display: none; }
  .user-dropdown { min-width: 200px; right: 0; }
  .user-info-chip { display: none; }
  .user-menu-caret { display: none; }
}

/* ════════════════════════════════════════════
   PWA: 모바일 하단 탭바 (네이티브 앱 느낌)
   ════════════════════════════════════════════ */
.mobile-tabbar { display: none; }
.mobile-att-actions { display: none; }

@media (max-width: 768px) {
  .mobile-tabbar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    z-index: 150;
    padding-bottom: env(safe-area-inset-bottom);   /* iOS 홈 인디케이터 */
    box-shadow: 0 -2px 14px rgba(0,0,0,.1);
  }
  .mtab {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    height: 56px; padding: 6px 0;
    background: none; border: none; cursor: pointer;
    color: var(--text-light); text-decoration: none;
    font-size: 10px; font-weight: 500; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: color .12s;
  }
  .mtab i { font-size: 19px; }
  .mtab.active { color: var(--primary); }
  .mtab.active i { transform: translateY(-1px); }
  .mtab:active { opacity: .6; }

  /* 콘텐츠가 탭바에 가리지 않도록 하단 여백 */
  .content-area { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  /* 모바일 모달 하단 액션도 탭바 위로 */
  .modal-box { margin-bottom: calc(56px + env(safe-area-inset-bottom)) !important; }

  /* 모바일 핵심 화면: 근태 관리 */
  .leave-banner {
    position: sticky;
    top: var(--topbar-h);
    z-index: 20;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .leave-banner-item { font-size: 20px; }
  .leave-value { font-size: 24px; line-height: 1.05; }
  .att-dropdown { display: none; }
  .mobile-att-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
  }
  .mobile-att-action {
    min-height: 66px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    box-shadow: var(--shadow);
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-att-action i { font-size: 19px; color: var(--primary); }
  .mobile-att-action.primary {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
  }
  .mobile-att-action:active { transform: scale(.98); }
  body.dark-mode .mobile-att-action {
    background: var(--card);
    border-color: var(--border);
  }
  body.dark-mode .mobile-att-action.primary {
    background: rgba(96,170,255,.12);
    color: #8fc5ff;
    border-color: rgba(96,170,255,.28);
  }
  .stat-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .stat-row::-webkit-scrollbar { display: none; }
  .stat-mini {
    min-width: 116px;
    padding: 10px 12px;
  }
  .filter-bar {
    padding: 10px 12px;
    margin-bottom: 12px;
  }
  .filter-form .btn,
  .filter-form .btn-export {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .att-modal .modal-body {
    padding: 16px;
    overflow-y: auto;
  }
  .att-modal .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--card);
    z-index: 2;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .att-modal .modal-footer .btn {
    flex: 1;
    min-height: 44px;
  }
  .radio-group {
    gap: 8px;
  }
  .radio-option {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
  }
  .slot-chip {
    min-height: 42px;
    min-width: 58px;
    font-size: 13px;
  }

  /* 모바일 핵심 화면: 명함 저장 */
  .bizcard-card {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: -4px -2px 0 !important;
  }
  .bizcard-card > .card-header {
    padding: 8px 2px 12px;
    border: 0;
  }
  .bizcard-card > .card-body {
    padding: 0 !important;
  }
  .bizcard-guide {
    display: none;
  }
  #bizcardDropzone {
    min-height: 48vh;
    margin-bottom: 14px !important;
    padding: 28px 18px !important;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #eff6ff, #fff);
  }
  #bizcardDropzone .ocr-dropzone-icon {
    font-size: 42px !important;
  }
  #bizcardDropzone > div:first-of-type {
    font-size: 17px;
    font-weight: 500;
  }
  .bizcard-capture-btn {
    width: 100%;
    min-height: 52px;
    font-size: 16px !important;
    border-radius: 10px;
    margin-top: 14px !important;
  }
  .bizcard-result-layout {
    display: block !important;
  }
  .bizcard-preview-panel,
  .bizcard-fields-panel {
    width: 100% !important;
    min-width: 0 !important;
  }
  .bizcard-preview-panel {
    margin-bottom: 14px;
  }
  #bizcardImgBox {
    min-height: 220px !important;
    max-height: 42vh !important;
    touch-action: none;
  }
  .bizcard-field-grid {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }
  .bizcard-field-grid .form-group {
    grid-column: auto !important;
  }
  .bizcard-field-grid input {
    min-height: 44px;
    font-size: 16px;
  }
  #btnRetryOcr {
    min-height: 34px;
  }
  #bcPasteText {
    font-size: 14px !important;
  }
  .bizcard-form-actions {
    position: sticky;
    bottom: calc(56px + env(safe-area-inset-bottom));
    z-index: 25;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 -8px 24px rgba(15,23,42,.12);
  }
  .bizcard-form-actions > .btn,
  .bizcard-form-actions > div,
  .bizcard-form-actions button {
    width: 100%;
  }
  .bizcard-form-actions button {
    min-height: 46px;
    justify-content: center;
  }
  .info-card {
    display: none;
  }
  body.dark-mode #bizcardDropzone {
    background: linear-gradient(180deg, rgba(96,170,255,.12), var(--card));
  }
}

/* 설치된 앱(standalone) 전용 — 주소창 없는 전체화면 보정 */
@media all and (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
  /* 당겨서 새로고침 시 흰 여백 방지 */
  body { overscroll-behavior-y: none; }
}
body.dark-mode .mobile-tabbar {
  background: var(--card);
  border-top-color: var(--border);
  box-shadow: 0 -2px 14px rgba(0,0,0,.35);
}

/* ════════════════════════════════════════════
   오늘의 브리핑 (지능형 요약 카드)
   ════════════════════════════════════════════ */
.briefing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px; overflow: hidden;
  box-shadow: var(--shadow);
}
.briefing-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; font-weight: 500; font-size: 14px;
  background: linear-gradient(135deg, rgba(30,111,217,.1), transparent);
  border-bottom: 1px solid var(--border);
}
.briefing-head > i { color: var(--primary); }
.briefing-date { font-size: 11px; color: var(--text-light); font-weight: 400; }
.briefing-list { list-style: none; margin: 0; padding: 0; }
.briefing-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.briefing-item:last-child { border-bottom: none; }
.briefing-item > i { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }
.briefing-text { flex: 0 1 auto; font-size: 13px; line-height: 1.55; }
.briefing-go {
  font-size: 12px; color: var(--primary); text-decoration: none;
  white-space: nowrap; flex-shrink: 0; font-weight: 500;
  margin-left: 2px;
}
.briefing-go:hover { text-decoration: underline; }
.briefing-item.lv-urgent { border-left-color: var(--red); background: rgba(229,62,62,.04); }
.briefing-item.lv-urgent > i { color: var(--red); }
.briefing-item.lv-warn  { border-left-color: var(--orange); }
.briefing-item.lv-warn  > i { color: var(--orange); }
.briefing-item.lv-info  { border-left-color: var(--primary); }
.briefing-item.lv-info  > i { color: var(--primary); }
.briefing-item.lv-good  { border-left-color: var(--green); }
.briefing-item.lv-good  > i { color: var(--green); }
@media (max-width: 600px) {
  .briefing-item { flex-wrap: wrap; }
  .briefing-go { margin-left: 28px; }
}
.proof-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin: 0 2px;
  border-radius: 9px;
  background: var(--bg-soft, #eef2ff);
  border: 1px solid var(--border, #dbe3ef);
  color: var(--text-light, #64748b);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
}

.proof-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 8px;
  background: var(--card, #fff);
  white-space: nowrap;
}

.proof-action-btn {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
}

.proof-action-btn i {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.proof-action-btn:hover {
  background: rgba(37, 99, 235, .08);
}

.proof-actions .proof-count-badge {
  margin: 0;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
}

.proof-actions .proof-action-used {
  box-shadow: none;
}

.proof-actions .proof-action-used::after {
  display: none;
}

.proof-actions .proof-action-previewed {
  background: #eff6ff;
  color: #1d4ed8;
}

.proof-actions .proof-action-downloaded {
  background: #ecfdf3;
  color: #067647;
}

.expense-tab i,
.tab-btn i {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

#previewViewport {
  overflow: hidden !important;
  user-select: none;
  overscroll-behavior: contain;
}

#previewPan {
  overflow: hidden !important;
  user-select: none;
}

#previewImg {
  width: auto !important;
  height: auto !important;
  max-width: 92% !important;
  max-height: 92% !important;
  object-fit: contain;
  pointer-events: none;
}

#previewFrame {
  overflow: hidden;
  background: #fff;
}

#previewDragLayer {
  touch-action: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.proof-action-used {
  position: relative;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .22);
}

.proof-action-used::after {
  content: attr(data-proof-action-state);
  position: absolute;
  right: -6px;
  top: -8px;
  min-width: 28px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

.proof-action-previewed::after {
  background: #2563eb;
}

.dark-mode .proof-action-used {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, .28);
}

.work-wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px);
}

.work-wait-overlay.show {
  display: flex;
}

.work-wait-card {
  width: min(420px, 100%);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .22);
  padding: 18px;
  color: var(--text-primary);
}

.work-wait-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.work-wait-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(37, 99, 235, .12);
  color: var(--primary);
  flex: 0 0 auto;
}

.work-wait-title {
  font-size: 16px;
  font-weight: 500;
}

.work-wait-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.work-wait-bar {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .22);
  margin: 14px 0 12px;
}

.work-wait-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -38%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: workWaitBar 1.35s ease-in-out infinite;
}

@keyframes workWaitBar {
  0% { left: -38%; }
  100% { left: 100%; }
}

.work-wait-step {
  min-height: 20px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.work-wait-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.work-wait-long {
  display: none;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, .12);
  color: #b45309;
  font-size: 12px;
  line-height: 1.5;
}

.work-wait-overlay.long-wait .work-wait-long {
  display: block;
}

body.dark-mode .work-wait-overlay {
  background: rgba(0, 0, 0, .44);
}

body.dark-mode .work-wait-long {
  color: #fbbf24;
  background: rgba(245, 158, 11, .16);
}

/* ════════════════════════════════════════════
   UI Polish 2026-06-02
   핵심 업무 화면의 표면, 간격, 상태표현을 통일한다.
   ════════════════════════════════════════════ */
:root {
  --primary-soft: rgba(37,99,235,.1);
  --card-bg: var(--card);
  --bg-secondary: #f7fafc;
  --input-bg: #ffffff;
  --border-color: var(--border);
  --text-primary: var(--text);
  --text-secondary: #667085;
}

html { background: var(--bg); }
body {
  color: var(--text);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(37,99,235,.08), rgba(37,99,235,0) 220px),
    #111827;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-header {
  min-height: 92px;
  padding: 18px 16px 16px;
  border-bottom-color: rgba(255,255,255,.08);
}
.sidebar-logo-img {
  max-width: 102px;
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.sidebar-logo-sub {
  margin-top: 8px;
  color: rgba(255,255,255,.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
}
.nav-menu { padding: 10px 0 14px; }
.nav-section-label {
  padding: 18px 18px 7px;
  color: rgba(255,255,255,.42);
  letter-spacing: .08em;
}
.nav-item a,
.nav-toggle-btn,
.nav-link-accordion {
  min-height: 40px;
  border-radius: 8px;
}
.nav-item.active > a,
.nav-item-has-children.active > .nav-link-accordion,
.nav-sub-item.active a {
  position: relative;
  background: rgba(37,99,235,.2);
  color: #8ec5ff;
}
.nav-item.active > a::before,
.nav-item-has-children.active > .nav-link-accordion::before,
.nav-sub-item.active a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #60a5fa;
}

.main-area {
  background:
    radial-gradient(circle at 30% -10%, rgba(37,99,235,.08), transparent 34%),
    linear-gradient(180deg, #f6f8fb 0, var(--bg) 260px);
}
.topbar {
  height: 58px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(220,228,239,.9);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  backdrop-filter: saturate(150%) blur(12px);
}
.topbar-title {
  color: #111827;
  font-size: 17px;
  font-weight: 500;
}
.sidebar-toggle,
.topbar-btn,
.darkmode-toggle {
  border-radius: 8px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.sidebar-toggle:hover,
.topbar-btn:hover {
  background: #eef4ff;
  color: var(--primary);
}
.user-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 5px 8px 5px 5px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.user-chip:hover,
.user-menu-wrap.open .user-chip {
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}
.user-avatar {
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.content-area { padding: 26px; }
.card,
.filter-bar,
.summary-card,
.shortcut-item,
.stat-mini,
.briefing-card,
.reminder-panel {
  border-radius: 8px;
  border: 1px solid rgba(220,228,239,.95);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card-header {
  min-height: 52px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.card-header h3,
.section-title {
  color: #111827;
  font-weight: 500;
}

.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  padding: 4px 0 2px;
}
.dashboard-eyebrow {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
}
.dashboard-hero h2 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 500;
}
.dashboard-hero h2 strong { font-weight: 500; }
.dashboard-hero-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-width: 0;
  margin: 2px 0 6px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  text-align: left;
}
.dashboard-hero-date span {
  display: inline;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 500;
}
.dashboard-hero-date strong {
  display: inline;
  margin-top: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 500;
}
.summary-link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.summary-card {
  min-height: 112px;
  padding: 18px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.summary-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -32px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: currentColor;
  opacity: .05;
}
.summary-card.blue { color: var(--primary); }
.summary-card.green { color: var(--green); }
.summary-card.orange { color: var(--orange); }
.summary-card.red { color: var(--red); }
.summary-card.clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(37,99,235,.28);
  box-shadow: var(--shadow-md);
}
.summary-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}
.summary-body { min-width: 0; color: var(--text); }
.summary-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}
.summary-value {
  color: #111827;
  font-size: 28px;
  font-weight: 500;
}
.summary-sub { color: var(--text-secondary); font-weight: 500; }

.briefing-card { overflow: hidden; }
.briefing-head {
  padding: 13px 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.briefing-item {
  padding: 13px 16px;
  border-left-width: 3px;
}
.briefing-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.briefing-go:hover {
  border-color: rgba(37,99,235,.35);
  background: #f4f8ff;
  text-decoration: none;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 150px));
  gap: 12px;
}
.shortcut-item {
  min-height: 108px;
  justify-content: center;
  padding: 16px 14px;
}
.shortcut-item:hover {
  border-color: rgba(37,99,235,.28);
  box-shadow: var(--shadow-md);
}
.shortcut-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.filter-bar { padding: 16px 18px; }
.filter-group label,
.reminder-form label {
  color: var(--text-secondary);
  font-weight: 500;
}
.form-control,
.form-control-sm,
.filter-form input,
.filter-form select,
.filter-form textarea,
.reminder-form input,
.reminder-form select,
.reminder-form textarea,
.input-icon input {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.form-control:focus,
.form-control-sm:focus,
.filter-form input:focus,
.filter-form select:focus,
.filter-form textarea:focus,
.reminder-form input:focus,
.reminder-form select:focus,
.reminder-form textarea:focus,
.input-icon input:focus {
  outline: none;
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.btn,
.btn-primary,
.btn-outline,
.btn-warning,
.btn-danger,
.btn-export,
.reminder-btn {
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0;
}
.btn-primary,
.reminder-btn {
  background: linear-gradient(180deg, #2f72f4, #2563eb);
  box-shadow: 0 6px 16px rgba(37,99,235,.22);
}
.btn-primary:hover,
.reminder-btn:hover {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}
.btn-outline,
.reminder-btn.secondary {
  background: #fff;
  color: #334155;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.btn-outline:hover,
.reminder-btn.secondary:hover {
  background: #f8fafc;
  border-color: #c7d2e2;
}

.table-wrapper { border-radius: 8px; }
.data-table { font-size: 13px; }
.data-table th {
  background: #f5f8fc;
  color: #475467;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.data-table td {
  padding: 12px 14px;
  border-bottom-color: #edf2f7;
}
.data-table tbody tr:hover { background: #f8fbff; }
.type-tag,
.method-tag,
.badge-count {
  border-radius: 999px;
  font-weight: 500;
}

.alert {
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.modal-box,
.user-dropdown,
.notif-panel,
.search-box {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(15,23,42,.16);
}

body.dark-mode {
  --primary-soft: rgba(96,170,255,.13);
  --card-bg: var(--card);
  --bg-secondary: #111c2f;
  --input-bg: #111c2f;
  --border-color: var(--border);
  --text-primary: var(--text);
  --text-secondary: #a7b3c7;
}
body.dark-mode .main-area {
  background:
    radial-gradient(circle at 30% -10%, rgba(96,170,255,.1), transparent 34%),
    linear-gradient(180deg, #111827 0, var(--bg) 260px);
}
body.dark-mode .topbar {
  background: rgba(23,32,51,.92);
  border-bottom-color: rgba(40,56,79,.9);
}
body.dark-mode .topbar-title,
body.dark-mode .dashboard-hero h2,
body.dark-mode .dashboard-hero-date strong,
body.dark-mode .summary-value,
body.dark-mode .card-header h3,
body.dark-mode .section-title {
  color: #f8fafc;
}
body.dark-mode .card,
body.dark-mode .filter-bar,
body.dark-mode .summary-card,
body.dark-mode .shortcut-item,
body.dark-mode .stat-mini,
body.dark-mode .briefing-card,
body.dark-mode .reminder-panel,
body.dark-mode .dashboard-hero-date,
body.dark-mode .user-chip,
body.dark-mode .briefing-go,
body.dark-mode .btn-outline,
body.dark-mode .reminder-btn.secondary {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .card-header,
body.dark-mode .briefing-head {
  background: linear-gradient(180deg, #1b263a, #172033);
}
body.dark-mode .form-control,
body.dark-mode .form-control-sm,
body.dark-mode .filter-form input,
body.dark-mode .filter-form select,
body.dark-mode .filter-form textarea,
body.dark-mode .reminder-form input,
body.dark-mode .reminder-form select,
body.dark-mode .reminder-form textarea,
body.dark-mode .input-icon input {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--border);
}
body.dark-mode .data-table th { background: var(--ws-bg-subtle); color: #cbd5e1; }
body.dark-mode .data-table tbody tr:hover { background: #1a2940; }
body.dark-mode .briefing-go:hover,
body.dark-mode .btn-outline:hover,
body.dark-mode .reminder-btn.secondary:hover {
  background: #1a2940;
  border-color: #365071;
}

@media (max-width: 768px) {
  .content-area { padding: 16px; }
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .dashboard-hero h2 { font-size: 22px; }
  .dashboard-hero-date {
    width: 100%;
    text-align: left;
  }
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .summary-card { min-height: 100px; }
  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shortcut-item { min-height: 96px; }
  .topbar { padding: 0 14px; }
  .topbar-title { font-size: 16px; }
}

/* ==========================================================================
   UI/UX polish 2026-06-08
   Common visual language for readability, contrast, density, and mobile use.
   ========================================================================== */
:root {
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-strong: #f1f5f9;
  --line: #d7e0ea;
  --line-strong: #b9c7d6;
  --ink: #111827;
  --ink-muted: #475467;
  --ink-soft: #667085;
  --text-main: var(--ink);
  --focus-ring: rgba(37, 99, 235, .18);
  --success-bg: #ecfdf3;
  --success-ink: #067647;
  --warning-bg: #fffaeb;
  --warning-ink: #b54708;
  --danger-bg: #fff1f3;
  --danger-ink: #c01048;
  --info-bg: #eff6ff;
  --info-ink: #1d4ed8;
}

body {
  font-size: 14px;
  line-height: 1.58;
  color: var(--ink);
}

.content-area {
  max-width: 1680px;
  width: 100%;
}

.topbar {
  min-height: 60px;
}

.topbar-title {
  font-size: 18px;
  letter-spacing: 0;
}

.card,
.filter-bar,
.summary-card,
.stat-mini,
.briefing-card,
.shortcut-item {
  border-color: var(--line);
}

.card-header {
  padding: 15px 18px;
}

.card-header h3,
.section-title {
  font-size: 15px;
  letter-spacing: 0;
}

.card-body {
  padding: 18px;
}

.text-muted,
.summary-label,
.summary-sub,
.filter-group label,
.td-date,
.history-meta,
.work-wait-sub,
.work-wait-hint {
  color: var(--ink-muted);
}

.filter-group label,
.pay-form-label,
.form-group label {
  color: #344054;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.form-control,
.form-control-sm,
select.form-control,
select.form-control-sm,
textarea.form-control,
textarea.form-control-sm {
  min-height: 38px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.form-control:hover,
.form-control-sm:hover {
  border-color: var(--line-strong);
}

.form-control:focus,
.form-control-sm:focus,
.input-icon input:focus,
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.btn,
.btn-export,
.tab-btn,
.expense-tab,
.mobile-att-action,
.topbar-btn,
.sidebar-toggle,
.darkmode-toggle,
.notif-bell,
.search-toggle {
  min-height: 36px;
  font-weight: 500;
}

.btn {
  border-radius: 8px;
}

.btn-primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line);
  color: #344054;
}

.btn-outline:hover {
  background: var(--surface-muted);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-bg);
  border-color: #fecdd3;
  color: var(--danger-ink);
}

.btn-warning {
  background: var(--warning-bg);
  border-color: #fedf89;
  color: var(--warning-ink);
}

.btn:focus-visible,
.btn-export:focus-visible,
.tab-btn:focus-visible,
.expense-tab:focus-visible,
.mobile-att-action:focus-visible,
.topbar-btn:focus-visible,
.sidebar-toggle:focus-visible,
.darkmode-toggle:focus-visible,
.notif-bell:focus-visible,
.search-toggle:focus-visible,
.nav-item a:focus-visible,
.nav-link-accordion:focus-visible,
.form-control:focus-visible,
.form-control-sm:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.type-tag,
.method-tag,
.proof-tag,
.tax-badge {
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.summary-card {
  min-height: 116px;
  gap: 16px;
}

.summary-icon,
.shortcut-icon,
.notif-icon {
  border-radius: 8px;
}

.summary-label {
  font-size: 13px;
  font-weight: 500;
}

.summary-value {
  margin-top: 3px;
  font-size: 30px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.summary-unit {
  color: var(--ink-muted);
  font-weight: 500;
}

.briefing-item {
  align-items: flex-start;
}

.briefing-text {
  color: #263548;
  font-size: 13.5px;
}

.stat-row {
  gap: 10px;
}

.stat-mini {
  min-width: 128px;
  padding: 13px 14px;
}

.stat-mini-label {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.stat-mini-value {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.filter-bar {
  padding: 14px 16px;
}

.filter-form {
  gap: 10px;
}

.table-wrapper {
  border-radius: 0 0 8px 8px;
}

.data-table {
  font-size: 13.5px;
}

.data-table th {
  background: #f6f8fb;
  color: #475467;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 12px 14px;
  border-bottom-color: #edf1f6;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.td-title {
  color: var(--ink);
  font-weight: 500;
}

.td-amount {
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.expense-tabs {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.expense-tab {
  border-radius: 6px;
  color: #475467;
}

.expense-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

.ocr-dropzone {
  border-color: #bfd0e4;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, .7), rgba(255, 255, 255, .95));
  border-radius: 8px;
}

.ocr-dropzone:hover,
.ocr-dropzone.drag-over {
  border-color: var(--primary);
  background: #f8fbff;
}

.ocr-dropzone-icon {
  color: var(--primary);
}

.pay-form-grid,
.pay-bank-grid,
.bizcard-field-grid {
  gap: 12px;
}

.pay-form-grid-compact {
  grid-template-columns: minmax(280px, 430px) minmax(180px, 240px);
  column-gap: 18px;
}

.my-account-bar,
.history-detail,
.work-wait-long {
  border: 1px solid var(--line);
}

.modal-box {
  border-radius: 8px;
  border: 1px solid var(--line);
}

.modal-header {
  padding: 16px 20px;
}

.modal-header h3 {
  font-size: 17px;
}

.modal-body {
  padding: 18px 20px;
}

.modal-footer {
  padding: 14px 20px;
}

.work-wait-card {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.work-wait-title {
  color: var(--ink);
}

.bizcard-card .card-header h3 {
  font-size: 16px;
}

#bizcardDropzone {
  border-style: solid;
}

#bizcardImgBox {
  border: 1px solid var(--line);
  background: #f8fafc;
}

.bizcard-form-actions {
  gap: 10px;
}

.mobile-att-action {
  border-color: var(--line);
}

body.dark-mode {
  --surface: #172033;
  --surface-muted: #111827;
  --surface-strong: #202b40;
  --line: #334155;
  --line-strong: #475569;
  --ink: #f8fafc;
  --ink-muted: #cbd5e1;
  --ink-soft: #94a3b8;
  --focus-ring: rgba(96, 170, 255, .24);
  --success-bg: rgba(34, 197, 94, .14);
  --success-ink: #86efac;
  --warning-bg: rgba(245, 158, 11, .16);
  --warning-ink: #fcd34d;
  --danger-bg: rgba(244, 63, 94, .16);
  --danger-ink: #fda4af;
  --info-bg: rgba(96, 170, 255, .14);
  --info-ink: #93c5fd;
}

body.dark-mode .topbar-title,
body.dark-mode .card-header h3,
body.dark-mode .section-title,
body.dark-mode .dashboard-hero h2,
body.dark-mode .summary-value,
body.dark-mode .stat-mini-value,
body.dark-mode .td-title,
body.dark-mode .work-wait-title {
  color: var(--ink);
}

body.dark-mode .filter-group label,
body.dark-mode .pay-form-label,
body.dark-mode .form-group label,
body.dark-mode .briefing-text {
  color: var(--ink-muted);
}

body.dark-mode .form-control,
body.dark-mode .form-control-sm,
body.dark-mode select.form-control,
body.dark-mode select.form-control-sm,
body.dark-mode textarea.form-control,
body.dark-mode textarea.form-control-sm {
  background: #111827;
  color: var(--ink);
  border-color: var(--line);
}

body.dark-mode .btn-outline,
body.dark-mode .briefing-go,
body.dark-mode .expense-tab.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-muted);
}

body.dark-mode .data-table th {
  background: var(--ws-bg-subtle);
  color: var(--ink-muted);
  border-bottom-color: var(--line);
}

body.dark-mode .data-table td {
  border-bottom-color: rgba(51, 65, 85, .7);
}

body.dark-mode .data-table tbody tr:hover {
  background: rgba(96, 170, 255, .08);
}

body.dark-mode .ocr-dropzone {
  background: linear-gradient(180deg, rgba(96, 170, 255, .1), rgba(23, 32, 51, .9));
  border-color: var(--line);
}

body.dark-mode #bizcardImgBox {
  background: #111827;
  border-color: var(--line);
}

body.dark-mode .proof-actions {
  background: var(--surface);
  border-color: var(--line);
}

body.dark-mode .proof-actions .proof-count-badge {
  background: #1f2937;
  color: var(--ink-muted);
  border-color: var(--line);
}

body.dark-mode .proof-actions .proof-action-previewed {
  background: rgba(96, 170, 255, .14);
  color: #93c5fd;
}

body.dark-mode .proof-actions .proof-action-downloaded {
  background: rgba(34, 197, 94, .14);
  color: #86efac;
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .content-area {
    padding: 14px 12px calc(78px + env(safe-area-inset-bottom));
  }

  .topbar {
    height: 56px;
    padding: 0 12px;
  }

  .topbar-title {
    font-size: 16px;
  }

  .card,
  .filter-bar,
  .summary-card,
  .stat-mini,
  .briefing-card {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  }

  .card-header {
    min-height: 48px;
    padding: 12px 14px;
  }

  .card-body {
    padding: 14px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .summary-card {
    min-height: 92px;
    padding: 14px;
  }

  .summary-icon {
    width: 42px;
    height: 42px;
  }

  .summary-value {
    font-size: 25px;
  }

  .briefing-item {
    padding: 12px 14px;
  }

  .filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .filter-group {
    min-width: 0;
  }

  .filter-group.align-bottom {
    grid-column: span 1;
  }

  .filter-form .form-control-sm,
  .filter-form .btn,
  .filter-form .btn-export {
    min-height: 42px;
  }

  .btn,
  .btn-export,
  .tab-btn,
  .expense-tab {
    min-height: 42px;
  }

  .data-table tbody tr {
    border-color: var(--line);
    border-radius: 8px;
  }

  .data-table td {
    min-height: 38px;
    padding: 10px 12px;
  }

  .data-table td::before {
    color: var(--ink-muted);
    font-weight: 500;
  }

  .stat-mini {
    min-width: 132px;
  }

  .mobile-att-action {
    min-height: 72px;
    border-radius: 8px;
    font-size: 13px;
  }

  .mobile-att-action i {
    font-size: 20px;
  }

  #bizcardDropzone {
    min-height: 52vh;
    border-radius: 8px;
  }

  .bizcard-capture-btn {
    min-height: 52px;
  }

  .bizcard-form-actions {
    border-radius: 8px;
  }

  .modal-box {
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 480px) {
  .filter-form {
    grid-template-columns: 1fr;
  }

  .filter-group.align-bottom {
    grid-column: auto;
  }

  .mobile-att-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .briefing-go {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-left: 28px;
  }
}

/* Attendance UX refinement ------------------------------------------------ */
.leave-banner {
  gap: 18px !important;
}

.leave-banner .att-dropdown {
  margin-left: 4px;
}

.leave-banner .att-dropdown-toggle {
  min-height: 48px;
  padding: 0 22px !important;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: #ffffff;
  color: #174ea6;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .22);
  font-size: 16px !important;
  font-weight: 500 !important;
}

.leave-banner .att-dropdown-toggle:hover {
  background: #f8fbff;
  color: #0f3e8a;
  transform: translateY(-1px);
}

.leave-banner .att-dropdown-toggle i:first-child {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leave-banner .att-dropdown-toggle i:last-child {
  opacity: .72;
}

.card-header .badge-count {
  margin-left: auto;
  min-width: 34px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef4fb;
  color: #475467;
  font-size: 12px;
  font-weight: 500;
}

.summary-wrap .team-summary-head {
  padding: 0 2px;
}

.summary-wrap .team-summary-head h3 {
  gap: 8px;
}

.summary-wrap .team-summary-date {
  padding-top: 1px;
}

.summary-card.team-card {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.summary-card.team-card .badge-count {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.ms-wrap.card {
  padding: 0;
  overflow: hidden;
}

.ms-wrap .ms-nav {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.ms-wrap .ms-nav > i,
.ms-wrap .ms-nav-title {
  grid-column: 1;
}

.ms-wrap .ms-nav > i {
  margin-right: 8px;
}

.ms-wrap .ms-nav-title {
  padding-left: 24px;
  font-size: 15px;
  font-weight: 500;
}

.ms-wrap .ms-nav-btn,
.ms-wrap .ms-nav-month {
  grid-column: 2;
}

.ms-wrap .ms-nav-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: #f3f7fb;
  color: #344054;
}

.ms-wrap .ms-nav-btn:hover {
  background: #e7eef7;
}

.ms-wrap .ms-nav button:first-of-type {
  justify-self: start;
  transform: translateX(-46px);
}

.ms-wrap .ms-nav-month {
  justify-self: center;
  min-width: 104px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.ms-wrap .ms-nav button:last-of-type {
  justify-self: end;
  transform: translateX(46px);
}

.ms-wrap #msExcelBtn {
  grid-column: 3;
  justify-self: end;
  margin-left: 0 !important;
}

.ms-wrap .ms-nav-title-group {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ms-wrap .ms-nav-title-group .ms-nav-title {
  padding-left: 0;
}

.ms-wrap .ms-month-control {
  grid-column: 2;
  display: inline-grid;
  grid-template-columns: 34px minmax(104px, auto) 34px;
  align-items: center;
  gap: 8px;
}

.ms-wrap .ms-month-control .ms-nav-btn,
.ms-wrap .ms-month-control .ms-nav-month {
  grid-column: auto;
}

.ms-wrap .ms-month-control .ms-nav-btn {
  transform: none !important;
  justify-self: center !important;
}

.ms-wrap .ms-month-control .ms-nav-month {
  justify-self: center;
}

body.dark-mode .leave-banner .att-dropdown-toggle {
  background: #e8f1ff;
  color: #174ea6;
  border-color: rgba(147, 197, 253, .8);
}

body.dark-mode .ms-wrap .ms-nav {
  background: linear-gradient(180deg, #1b263a, #172033);
}

body.dark-mode .card-header .badge-count,
body.dark-mode .ms-wrap .ms-nav-btn {
  background: #202b40;
  color: #cbd5e1;
  border-color: #334155;
}

body.dark-mode .sidebar .nav-section-label {
  color: #8fa3c1;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .09em;
  opacity: 1;
}

body.dark-mode .sidebar .nav-section-label::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  margin-top: 5px;
  background: rgba(143, 163, 193, .35);
}

body.dark-mode .sidebar .nav-item a,
body.dark-mode .sidebar .nav-accordion-label,
body.dark-mode .sidebar .nav-sub-item a,
body.dark-mode .sidebar .nav-link-soon {
  color: #c4d0e3;
}

body.dark-mode .sidebar .nav-item a:hover,
body.dark-mode .sidebar .nav-accordion-label:hover,
body.dark-mode .sidebar .nav-sub-item a:hover {
  color: #ffffff;
}

body.dark-mode .sidebar .nav-item a i,
body.dark-mode .sidebar .nav-accordion-label i,
body.dark-mode .sidebar .nav-sub-item a i,
body.dark-mode .sidebar .nav-link-soon i {
  color: #9fb3d2;
}

body.dark-mode .dashboard-hero-date {
  background: rgba(30, 41, 59, .72);
  border-color: #334155;
}

/* Deployment UX pass 2026-06-09 ----------------------------------------- */
.filter-panel {
  padding: 0 !important;
  overflow: hidden;
}

.filter-panel > summary {
  list-style: none;
}

.filter-panel > summary::-webkit-details-marker {
  display: none;
}

.filter-panel-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #fbfcfe);
  cursor: pointer;
  user-select: none;
}

.filter-panel-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.filter-panel-head i {
  color: var(--primary);
}

.filter-panel-head small {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
}

.filter-panel .filter-form {
  padding: 14px 16px;
}

.filter-panel:not([open]) .filter-panel-head {
  border-bottom: 0;
}

.table-stage-row {
  background: var(--bg);
  padding: 7px 14px !important;
  border-bottom: 2px solid var(--border) !important;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
}

.table-action-group,
.admin-action-group,
.inline-action-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table-action-group .btn,
.table-action-group .btn-transferred,
.admin-action-group .btn {
  min-height: 30px;
}

.btn-muted-danger {
  background: #f8fafc;
  color: #475467;
  border-color: #cbd5e1;
}

.btn-muted-danger:hover {
  background: #fff1f3;
  color: var(--danger-ink);
  border-color: #fecdd3;
}

.tab-link {
  text-decoration: none;
}

.card-header-note {
  margin-left: auto;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
}

.admin-email-input {
  width: min(190px, 100%);
}

.form-help-text {
  margin-top: 6px;
  color: var(--text-light);
  font-size: 12px;
}

.data-table .td-title {
  line-height: 1.45;
}

.data-table .badge,
.data-table .method-tag,
.data-table .proof-tag {
  vertical-align: middle;
}

.topbar-title {
  margin: 0;
}

@media (max-width: 768px) {
  .data-table td[data-label="내역"] {
    font-size: 14px;
    font-weight: 500;
  }

  .data-table td[data-label="금액"],
  .data-table td[data-label="상태"] {
    font-weight: 500;
  }
}

body.dark-mode .filter-panel-head {
  background: linear-gradient(180deg, #1b263a, #172033);
  border-bottom-color: var(--border);
}

body.dark-mode .filter-panel-head span,
body.dark-mode .table-stage-row {
  color: #e2e8f0;
}

body.dark-mode .filter-panel-head small,
body.dark-mode .card-header-note,
body.dark-mode .form-help-text {
  color: #94a3b8;
}

body.dark-mode .btn-muted-danger {
  background: #172033;
  color: #cbd5e1;
  border-color: #334155;
}

body.dark-mode .btn-muted-danger:hover {
  background: rgba(248, 113, 113, .14);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, .35);
}

@media (max-width: 768px) {
  .filter-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .filter-panel .filter-form {
    padding: 12px;
  }

  .table-action-group,
  .admin-action-group,
  .inline-action-form {
    width: 100%;
  }

  .table-action-group .btn,
  .table-action-group form,
  .table-action-group .btn-transferred,
  .admin-action-group .btn,
  .admin-action-group form {
    flex: 1 1 auto;
  }

  .table-action-group .btn,
  .table-action-group .btn-transferred,
  .admin-action-group .btn {
    justify-content: center;
    width: 100%;
  }

  .card-header-note {
    width: 100%;
    margin-left: 0;
  }
}

.proof-confirm-box {
  max-width: 420px;
}

.proof-confirm-text {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 12px;
}

.proof-confirm-file {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.proof-confirm-file strong {
  color: var(--text);
  font-size: 13px;
}

.proof-confirm-file span {
  color: var(--text-light);
  font-size: 12px;
}

body.dark-mode .search-result-item.active,
body.dark-mode .search-result-item:focus-visible {
  background: #1f3454;
}

body.dark-mode .nav-chevron-btn {
  color: #9fb3d2;
}

/* ════════════════════════════════════════════
   Fintech C안 — 셸 (화이트 사이드바·탑바·탭바) (2026-06-10)
   ════════════════════════════════════════════ */

/* ── 기본 레이아웃 보더 ── */
.sidebar { border-right: 1px solid var(--ws-border-light); }
.sidebar-header { border-bottom: 1px solid var(--ws-border-light); }

/* ── 로고 색상 (흰 배경 위) ── */
.logo-main { color: var(--ws-text-strong); }
.logo-sub, .sidebar-logo-sub { color: var(--ws-text-muted); }

/* ── 네비 링크 기본 색상 (흰 배경 위에서 가독성) ── */
.nav-menu .nav-item a,
.nav-toggle-btn { color: var(--ws-text); border-radius: var(--ws-radius-btn); }

.nav-menu .nav-item a:hover,
.nav-toggle-btn:hover { background: var(--ws-bg-subtle); color: var(--ws-text-strong); }

.nav-item.active > a { background: var(--ws-primary-soft); color: var(--ws-primary-active); font-weight: 500; }
.nav-item.active > a i { color: var(--ws-primary-active); }

.nav-section-label { color: var(--ws-text-muted); }

/* ── 탑바 (흰 배경 토큰 기반) ── */
.topbar { background: var(--ws-surface); border-bottom: 1px solid var(--ws-border-light); box-shadow: none; }
.topbar-title { font-size: var(--ws-fs-title); font-weight: 500; color: var(--ws-text-strong); }

/* ── 모바일 탭바 ── */
.mobile-tabbar { background: var(--ws-surface); border-top: 1px solid var(--ws-border-light); }
.mobile-tabbar .mtab { color: var(--ws-text-muted); }
.mobile-tabbar .mtab.active { color: var(--ws-primary); }

/* ════ 화이트-온-화이트 카운터 오버라이드 ════ */

/* 이전 dark-bg 기준 hover (rgba(255,255,255,…)) 을 토큰으로 교체 */
.nav-toggle-btn { color: var(--ws-text-muted); }
.nav-toggle-btn:hover { background: var(--ws-bg-subtle); color: var(--ws-text-strong); }

/* .sidebar-header 보더: 구 rgba(255,255,255,.06/.08) 대신 토큰 */
.sidebar-header { border-bottom-color: var(--ws-border-light); }

/* nav-item a hover: 구 rgba(255,255,255,.07) */
.nav-item a:hover { background: var(--ws-bg-subtle); color: var(--ws-text-strong); }

/* nav-chevron-btn: 흰 배경 위 텍스트 */
.nav-chevron-btn { color: var(--ws-text-muted); }
.nav-chevron-btn:hover,
.nav-chevron-btn:focus-visible { background: var(--ws-bg-subtle); color: var(--ws-text-strong); }

/* nav-link-accordion (아코디언 행) */
.nav-link-accordion { color: var(--ws-text); }
.nav-link-accordion:hover { background: var(--ws-bg-subtle); color: var(--ws-text-strong); }
.nav-link-accordion .nav-accordion-label:hover { background: none; color: var(--ws-text-strong); }

/* 아코디언 active 상태 */
.nav-item-has-children.active > .nav-link-accordion {
  background: var(--ws-primary-soft);
  color: var(--ws-primary-active);
}
.nav-item-has-children.active > .nav-link-accordion .nav-accordion-label {
  color: var(--ws-primary-active);
}

/* nav-sub-item */
.nav-sub-item a { color: var(--ws-text); }
.nav-sub-item a:hover { background: var(--ws-bg-subtle); color: var(--ws-text-strong); }

/* sidebar-footer 보더 + 링크 색상: 구 rgba(255,255,255,.06/.4/.07) */
.sidebar-footer { border-top-color: var(--ws-border-light); }
.sidebar-footer-link { color: var(--ws-text-muted); }
.sidebar-footer-link:hover { color: var(--ws-text-strong); background: var(--ws-bg-subtle); }

/* sidebar-close (모바일 닫기 버튼) */
.sidebar-close { color: var(--ws-text-muted); }
.sidebar-close:hover { color: var(--ws-text-strong); background: var(--ws-bg-subtle); }

/* sidebar-logo-sub */
.sidebar-logo-sub { color: var(--ws-text-muted); }

/* nav-section-label: 구 rgba(255,255,255,.3/.42) */
.nav-section-label { color: var(--ws-text-muted); }

/* UI Polish 섹션의 dark-bg gradient + border-right 오버라이드 */
.sidebar {
  background: var(--ws-surface);
  border-right: 1px solid var(--ws-border-light);
}

/* UI Polish .sidebar-header border-bottom-color (rgba(255,255,255,.08)) */
.sidebar-header { border-bottom-color: var(--ws-border-light); }

/* UI Polish .nav-item.active background: rgba(37,99,235,.2) + color: #8ec5ff (dark 기준) → 토큰 */
.nav-item.active > a,
.nav-item-has-children.active > .nav-link-accordion,
.nav-sub-item.active a {
  background: var(--ws-primary-soft);
  color: var(--ws-primary-active);
}
/* UI Polish .nav-item.active::before (파란 왼쪽 바) — 흰 배경에서도 OK: 유지하되 토큰 색 */
.nav-item.active > a::before,
.nav-item-has-children.active > .nav-link-accordion::before,
.nav-sub-item.active a::before {
  background: var(--ws-primary);
}

/* fav-icon: 구 var(--sidebar-text) = 이제 --ws-text-muted → 흰 배경 위 OK */
.fav-icon { color: var(--ws-text-muted); }

/* 준비중 메뉴 — nav-link-soon: 기존 var(--text-light) 사용 중 → 흰 배경 위 OK, 추가 보정 없음 */
/* badge-soon, nav-mock-badge — 색상이 primary/orange 계열로 흰 배경 위 문제없음 */

/* nav-badge (카운트 알림 pill) — bg red, color #fff: 흰 배경 위에서도 OK, 유지 */

/* 모바일 .sidebar.open box-shadow — 어둔 그림자: 흰 사이드바여도 OK */

/* UI Polish topbar: background rgba(255,255,255,.92) + backdrop-filter → 토큰으로 교체 */
.topbar {
  background: var(--ws-surface);
  border-bottom: 1px solid var(--ws-border-light);
  box-shadow: none;
  backdrop-filter: none;
}

/* ════ dark-mode 스코프 오버라이드 ════
   토큰이 다크 값을 자동으로 가지므로 대부분 자동. 아래는 기존 일회성 규칙과 충돌 방지. */

/* 다크모드 topbar: UI Polish가 rgba(23,32,51,.92) 설정 → 토큰으로 교체 */
body.dark-mode .topbar {
  background: var(--ws-surface);
  border-bottom: 1px solid var(--ws-border-light);
  box-shadow: none;
  backdrop-filter: none;
}

/* 다크모드 사이드바: UI Polish gradient #111827 + 초기 dark-mode block #0d1120 → 토큰 */
body.dark-mode .sidebar {
  background: var(--ws-surface);
  border-right-color: var(--ws-border-light);
}

/* 다크모드 sidebar-header 보더 */
body.dark-mode .sidebar-header {
  border-bottom-color: var(--ws-border-light);
}

/* 다크모드 sidebar-footer 보더 */
body.dark-mode .sidebar-footer {
  border-top-color: var(--ws-border-light);
}

/* 다크모드 sidebar nav-section-label (UI/UX polish 2026-06-08 규칙과 충돌 방지) */
body.dark-mode .sidebar .nav-section-label { color: var(--ws-text-muted); }
body.dark-mode .sidebar .nav-section-label::after { background: var(--ws-border-light); }

/* 다크모드 sidebar nav links (UI/UX polish 2026-06-08 규칙 오버라이드) */
body.dark-mode .sidebar .nav-item a,
body.dark-mode .sidebar .nav-accordion-label,
body.dark-mode .sidebar .nav-sub-item a,
body.dark-mode .sidebar .nav-link-soon { color: var(--ws-text); }

body.dark-mode .sidebar .nav-item a:hover,
body.dark-mode .sidebar .nav-accordion-label:hover,
body.dark-mode .sidebar .nav-sub-item a:hover { color: var(--ws-text-strong); background: var(--ws-bg-subtle); }

body.dark-mode .sidebar .nav-item a i,
body.dark-mode .sidebar .nav-accordion-label i,
body.dark-mode .sidebar .nav-sub-item a i,
body.dark-mode .sidebar .nav-link-soon i { color: var(--ws-text-muted); }

/* 다크모드 mobile-tabbar */
body.dark-mode .mobile-tabbar {
  background: var(--ws-surface);
  border-top-color: var(--ws-border-light);
  box-shadow: none;
}

body.dark-mode .sidebar .nav-chevron-btn:hover,
body.dark-mode .sidebar .nav-chevron-btn:focus-visible {
  background: var(--ws-bg-subtle);
  color: var(--ws-text-strong);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.my-account-bar .my-account-info {
  flex: 0 1 auto;
}

.my-account-bar .my-account-edit-btn {
  margin-left: 4px !important;
}

.expense-list-header.card-header {
  justify-content: flex-start;
}

.expense-list-header .expense-list-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.expense-list-header .expense-list-title h3 {
  flex: 0 0 auto;
}

.expense-list-header .expense-list-title .badge-count {
  margin-left: 0;
}

@media (max-width: 768px) {
  .leave-banner .att-dropdown {
    margin-left: 0;
    width: 100%;
  }

  .leave-banner .att-dropdown-toggle {
    width: 100%;
    justify-content: center;
  }

  .ms-wrap .ms-nav {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .ms-wrap .ms-nav > i,
  .ms-wrap .ms-nav-title {
    grid-column: 1;
  }

  .ms-wrap .ms-nav-title {
    padding-left: 24px;
  }

  .ms-wrap .ms-nav-btn,
  .ms-wrap .ms-nav-month {
    grid-column: 1 / -1;
  }

  .ms-wrap .ms-nav button:first-of-type {
    justify-self: start;
    transform: none;
  }

  .ms-wrap .ms-nav-month {
    justify-self: center;
  }

  .ms-wrap .ms-nav button:last-of-type {
    justify-self: end;
    transform: none;
  }

  .ms-wrap #msExcelBtn {
    grid-column: 2;
    grid-row: 1;
  }

  .ms-wrap .ms-nav-title-group {
    grid-column: 1;
    grid-row: 1;
  }

  .ms-wrap .ms-month-control {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}

/* ════════════════════════════════════════════
   Fintech C안 — 공용 컴포넌트 (2026-06-10)
   ════════════════════════════════════════════ */
.card, .modal-box, .summary-card, .info-card {
  border-radius: var(--ws-radius-card);
  border: 1px solid var(--ws-border-light);
  box-shadow: var(--ws-shadow-rest);
}
.summary-card.clickable:hover {
  box-shadow: var(--ws-shadow-hover);
  transform: translateY(-1px);
  transition: box-shadow .18s, transform .18s;
}
.btn, .btn-login, .btn-export, .page-btn, .tab-btn {
  border-radius: var(--ws-radius-btn);
  font-weight: 500;
}
.btn-primary { background: var(--ws-primary); }
.btn-primary:hover { background: var(--ws-primary-hover); }
.btn-primary:active { background: var(--ws-primary-active); }
.btn-secondary {
  background: var(--ws-bg); color: var(--ws-text);
  border: 1.5px solid transparent;
}
.btn-secondary:hover { background: var(--ws-border-light); }
.data-table th {
  background: var(--ws-bg-subtle); color: var(--ws-text-muted);
  font-size: var(--ws-fs-caption); font-weight: 500;
  border-bottom: 1px solid var(--ws-border-light);
}
.data-table td { border-bottom: 1px solid var(--ws-border-light); font-size: var(--ws-fs-body); }
.data-table tbody tr:hover { background: var(--ws-bg-subtle); }
.form-control, .form-control-sm, .filter-form input, .filter-form select {
  border-radius: var(--ws-radius-btn);
  border: 1px solid var(--ws-border);
  font-family: var(--ws-font);
}
.form-control:focus, .form-control-sm:focus {
  border-color: var(--ws-primary);
  box-shadow: 0 0 0 3px var(--ws-primary-soft);
}
.modal-overlay { background: rgba(25,31,40,.5); }

@media (max-width: 768px) {
  .topbar-title { font-size: 16px; }
}

/* ════════════════════════════════════════════
   Fintech C안 — 대시보드 (2026-06-10)
   ════════════════════════════════════════════ */
.dashboard-hero h2 { font-size: var(--ws-fs-title); font-weight: 500; color: var(--ws-text-strong); }
.dashboard-eyebrow { display: none; }
.summary-card { background: var(--ws-surface); border: none; }
.summary-value {
  font-size: var(--ws-fs-display); font-weight: 500;
  color: var(--ws-text-strong); letter-spacing: -0.3px;
}
.summary-unit { font-size: var(--ws-fs-caption); color: var(--ws-text-muted); font-weight: 400; }
.summary-label { font-size: var(--ws-fs-caption); color: var(--ws-text-muted); }
.summary-card.orange .summary-value { color: var(--ws-warning); }
.summary-card.red .summary-value { color: var(--ws-danger); }
.briefing-card { border-radius: var(--ws-radius-card); border: 1px solid var(--ws-border-light); background: var(--ws-surface); }
.briefing-item { border-radius: var(--ws-radius-inner); padding: 10px 12px; }
.briefing-item.lv-urgent,
.briefing-item.lv-warn,
.briefing-item.lv-info,
.briefing-item.lv-good { border-left-color: transparent; }
.briefing-item.lv-urgent { background: var(--ws-danger-soft); }
.briefing-item.lv-urgent i, .briefing-item.lv-urgent .briefing-text b { color: var(--ws-danger); }
.briefing-item.lv-warn { background: var(--ws-warning-soft); }
.briefing-item.lv-warn i { color: var(--ws-warning); }
.briefing-item.lv-info { background: var(--ws-info-soft); }
.briefing-item.lv-info i { color: var(--ws-info); }
.shortcut-item { border-radius: var(--ws-radius-card); box-shadow: var(--ws-shadow-rest); }
.shortcut-item:hover { box-shadow: var(--ws-shadow-hover); transform: translateY(-1px); }
/* dark-mode counter-overrides — literal colors in older sections fight the tokens above */
body.dark-mode .dashboard-hero h2 { color: var(--ws-text-strong); }
body.dark-mode .summary-value { color: var(--ws-text-strong); }
body.dark-mode .summary-card.orange .summary-value { color: var(--ws-warning); }
body.dark-mode .summary-card.red .summary-value { color: var(--ws-danger); }
body.dark-mode .summary-card { background: var(--ws-surface); border: none; }
body.dark-mode .briefing-card { background: var(--ws-surface); border-color: var(--ws-border-light); }
body.dark-mode .briefing-head { background: var(--ws-bg-subtle); }
body.dark-mode .briefing-item.lv-urgent .briefing-text b { color: #F5AAAA; }
body.dark-mode .shortcut-item { background: var(--ws-surface); border-color: var(--ws-border-light); }

/* ════════════════════════════════════════════
   Fintech C안 — 업무 화면 공통 (지출·입금·근태) (2026-06-10)
   ════════════════════════════════════════════ */
.stat-mini {
  border-radius: var(--ws-radius-inner); border: 1px solid var(--ws-border-light);
  background: var(--ws-surface); box-shadow: none;
}
.stat-mini.stat-active { border-color: var(--ws-primary); background: var(--ws-primary-soft); }
.stat-mini .stat-num { font-size: 20px; font-weight: 500; color: var(--ws-text-strong); }
.stat-mini.green .stat-num { color: var(--ws-success); }
.stat-mini.orange .stat-num { color: var(--ws-warning); }
.stat-mini.red .stat-num { color: var(--ws-danger); }
.stat-mini.blue .stat-num { color: var(--ws-info); }
.filter-form { background: var(--ws-bg-subtle); border-radius: var(--ws-radius-inner); border: 1px solid var(--ws-border-light); }
.amount-cell, .td-amount { font-weight: 500; color: var(--ws-text-strong); font-variant-numeric: tabular-nums; }
.row-warning { background: var(--ws-warning-soft); }
/* 토큰 유틸리티 (인라인 색상 대체용) */
.text-success { color: var(--ws-success); }
.text-danger  { color: var(--ws-danger); }
.text-warning { color: var(--ws-warning); }
.text-info    { color: var(--ws-info); }
.text-muted-ws { color: var(--ws-text-muted); }
.text-strong-ws { color: var(--ws-text-strong); }
.bg-soft-success { background: var(--ws-success-soft); }
.bg-soft-warning { background: var(--ws-warning-soft); }
.bg-soft-danger  { background: var(--ws-danger-soft); }
.bg-soft-info    { background: var(--ws-info-soft); }
/* dark-mode counter-overrides — 위 섹션 토큰 규칙이 이겨야 하므로 동등 특이도+나중 선언 확보 */
/* L1809: body.dark-mode .stat-mini { background: var(--card) } 무효화 */
/* L3044: body.dark-mode .stat-mini { background: var(--card); border-color: var(--border) } 무효화 */
body.dark-mode .stat-mini { background: var(--ws-surface); border-color: var(--ws-border-light); }
/* L1905: body.dark-mode .stat-mini.stat-active { background: rgba(49,130,246,.08) } 무효화 */
body.dark-mode .stat-mini.stat-active { border-color: var(--ws-primary); background: var(--ws-primary-soft); }
/* L1898: body.dark-mode .td-amount { color: #e8edf5 } 무효화 */
body.dark-mode .td-amount, body.dark-mode .amount-cell { color: var(--ws-text-strong); }
/* L585: .row-warning { background: #fffbeb !important } — !important 제압용 */
body.dark-mode .row-warning { background: var(--ws-warning-soft) !important; }
/* 버튼 소프트 변형 (인라인 style 대체) */
.btn-soft-info    { background: var(--ws-info-soft);    color: var(--ws-info);    border-color: var(--ws-info);    border-style: solid; border-width: 1px; }
.btn-soft-success { background: var(--ws-success-soft); color: var(--ws-success); border-color: var(--ws-success); border-style: solid; border-width: 1px; }
/* stat-mini.green 배경·테두리 (이체완료 칩) */
.stat-mini.green { background: var(--ws-success-soft); border-color: var(--ws-success); }
body.dark-mode .stat-mini.green { background: var(--ws-success-soft); border-color: var(--ws-success); }
/* rejection-box (반송 사유 박스) */
.rejection-box { background: var(--ws-danger-soft); border: 1px solid var(--ws-danger); border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; }
/* soft-purple button variant (메모 버튼) */
.btn-soft-purple { background: rgba(107,70,193,.08); color: var(--purple); border-color: rgba(107,70,193,.3); }
body.dark-mode .btn-soft-purple { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.3); }
/* soft-danger button variant (발행 취소 등 되돌리기) */
.btn-soft-danger  { background: var(--ws-danger-soft);   color: var(--ws-danger);   border-color: var(--ws-danger);   border-style: solid; border-width: 1px; }
/* solid-success button variant (주요 CTA) */
.btn-success { background: var(--ws-success); color: #fff; border-color: var(--ws-success); }
.btn-success:hover { background: #0a5a44; border-color: #0a5a44; }
body.dark-mode .btn-success { color: #0E1322; }
body.dark-mode .btn-soft-danger { background: rgba(240,140,140,.12); border-color: rgba(240,140,140,.35); }
/* 카드 상단 색상 강조선 (card-top-*) */
.card-top-success { border-top: 3px solid var(--ws-success); }
/* 사업자등록증 OCR 드롭존 */
.biz-dropzone { background: linear-gradient(135deg, var(--ws-success-soft), var(--ws-success-soft)); border: 2px dashed var(--ws-success); border-radius: 10px; padding: 16px; margin-bottom: 16px; text-align: center; }
body.dark-mode .biz-dropzone { background: var(--ws-success-soft); border-color: var(--ws-success); }
/* 파일 미리보기 뷰포트 배경 */
.preview-viewport { background: rgba(15,23,42,.05); }
body.dark-mode .preview-viewport { background: rgba(15,23,42,.35); }
/* perm-note 색상 변형 (근태 모달 안내박스) */
.perm-note-success { background: var(--ws-success-soft); border: 1px solid var(--ws-success); border-radius: 6px; color: var(--ws-success-dark, #166534); padding: 8px 12px; }
.perm-note-danger  { background: var(--ws-danger-soft);  border: 1px solid var(--ws-danger);  border-radius: 6px; color: var(--ws-danger-dark,  #c53030); padding: 8px 12px; }
.perm-note-info    { background: var(--ws-info-soft);    border: 1px solid var(--ws-info);    border-radius: 6px; color: var(--ws-info-dark,    #1e40af); padding: 8px 12px; }
body.dark-mode .perm-note-success { background: rgba(22,101,52,.15); border-color: var(--ws-success); color: var(--ws-success); }
body.dark-mode .perm-note-danger  { background: rgba(197,48,48,.15); border-color: var(--ws-danger);  color: var(--ws-danger); }
body.dark-mode .perm-note-info    { background: rgba(30,64,175,.15); border-color: var(--ws-info);    color: var(--ws-info); }

/* ════════════════════════════════════════════
   Fintech C안 — 마감재 (빈 상태·스켈레톤·모션) (2026-06-10)
   ════════════════════════════════════════════ */
.ws-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 16px; color: var(--ws-text-muted); text-align: center;
}
.ws-empty i { font-size: 28px; opacity: .5; }
.ws-empty-title { font-size: var(--ws-fs-body); font-weight: 500; color: var(--ws-text); }
.ws-empty-sub { font-size: var(--ws-fs-caption); }
.ws-skeleton {
  display: inline-block; border-radius: 6px; min-height: 14px;
  background: linear-gradient(90deg, var(--ws-bg) 25%, var(--ws-border-light) 50%, var(--ws-bg) 75%);
  background-size: 200% 100%; animation: ws-shimmer 1.4s infinite;
}
@keyframes ws-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .ws-skeleton { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ════════════════════════════════════════════
   준비중 메뉴 정책 (2026-06-11)
   — 전부 클릭 가능, 재고(nav-ready)는 정상 메뉴와 동일 색
   ════════════════════════════════════════════ */
.nav-item-soon { pointer-events: auto; opacity: .6; }
.nav-item-soon.nav-ready { opacity: 1; }
.nav-item-soon.nav-ready a { color: var(--ws-text); }
.nav-item-soon.nav-ready a:hover { color: var(--ws-text-strong); }

/* ════════════════════════════════════════════
   홈 요약 카드 — 장식 원 제거 + 카드 축소 (2026-06-11 사용자 지시)
   ════════════════════════════════════════════ */
.summary-card::after { content: none; }
.summary-card { min-height: 0; padding: 16px 18px; align-items: center; }
/* 카드 높이 통일 — 그리드 행의 가장 높은 카드에 맞춰 늘림 (2026-06-11) */
.summary-link { display: flex; }
.summary-link .summary-card { flex: 1; }

/* 시범운영 배지 — 실사용 검증 중 모듈 (2026-06-11) */
.nav-beta-badge {
  font-size: 10px; font-weight: 500;
  color: var(--ws-info); background: var(--ws-info-soft);
  border-radius: var(--ws-radius-pill); padding: 1px 7px; white-space: nowrap;
}

/* ===== 2026-06-12 재고 압축+검색바 ===== */
.ws-search-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ws-pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.ws-page {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
}
.ws-page:hover {
  background: var(--bg-secondary, var(--card-bg));
}
.ws-page.active {
  background: var(--primary);
  color: var(--ws-surface);
  border-color: var(--primary);
}
.ws-page-total {
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.row-inactive { opacity: .55; }
.ws-sort-link {
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.ws-sort-link:hover { color: var(--text-primary); }
.ws-sort-link.active { color: var(--primary); font-weight: 500; }
.ws-io-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: -1px;
}
.ws-io-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}
.ws-io-tab:hover { color: var(--text-primary); }

/* ===== 2026-06-12 공통 목록 검색 ===== */
.ws-search-auto {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-search-auto .form-control {
  max-width: 260px;
}
.ws-search-count {
  color: var(--ws-text-muted);
  font-size: var(--ws-fs-caption);
  white-space: nowrap;
}
.ws-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ws-chip {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 400;
}
.ws-chip.active .badge,
.ws-chip:focus .badge {
  outline: 2px solid var(--ws-accent, var(--primary));
  outline-offset: 1px;
}
/* ===== /2026-06-12 공통 목록 검색 ===== */

/* ===== 2026-06-13 공통 업로드 드롭존 ===== */
.ws-dropzone {
  border: 2px dashed var(--ws-border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s;
  text-align: center;
}
.ws-dropzone.drag-over {
  border-color: var(--ws-primary);
  background: var(--ws-primary-soft);
}
.ws-dropzone-hint {
  color: var(--ws-text-muted);
  font-size: var(--ws-fs-caption);
}
.ws-file-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}
.ws-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--ws-border);
  border-radius: 999px;
  font-size: var(--ws-fs-caption);
}
.ws-file-chip-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ws-text-muted);
}
/* ===== /2026-06-13 공통 업로드 드롭존 ===== */

/* ===== 2026-06-13 모바일 조회 모드 ===== */
@media (max-width: 768px) {
  .ws-desktop-only { display: none !important; }
  /* 데이터 표 → 카드형: 표에 .ws-mobile-cards 부착 시 */
  .ws-mobile-cards thead { display: none; }
  .ws-mobile-cards tbody tr { display: block; border: 1px solid var(--ws-border); border-radius: 12px; margin-bottom: 10px; padding: 12px 14px; }
  .ws-mobile-cards tbody td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; }
  .ws-mobile-cards tbody td::before { content: attr(data-label); color: var(--ws-text-muted); font-size: var(--ws-fs-caption); }
  .ws-mobile-cards tbody td:first-child { font-weight: 500; font-size: var(--ws-fs-body); }
  .ws-mobile-cards tbody td:first-child::before { display: none; }
  .ws-mobile-cards tbody td:empty { display: none; }
}

/* ===== 2026-06-13 모바일 버그 수정 ===== */

/* Bug 1: 사이드바 토글 불량 — JS 수정(동일 이벤트 버블링 즉시 닫힘)으로 해결됨.
   CSS 측 보완: .sidebar.open 오버레이 z-index가 탑바(50)보다 높도록 확인. */
@media (max-width: 768px) {
  .sidebar.open { z-index: 200; } /* 이미 설정됨 — 명시적 재선언으로 안정화 */
}

/* Bug 2: 알림 패널 글자 안 보임 — position:absolute + notif-wrap 기준 right:-20px 이
   모바일 뷰포트에서 패널을 부분적으로 벗어나게 만들어 텍스트가 클리핑됨.
   position:fixed 로 변경해 뷰포트에 안전하게 고정하고, 색상 토큰도 명시 지정. */
@media (max-width: 768px) {
  .notif-panel {
    position: fixed;
    top: 56px; /* --topbar-h */
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 600; /* 탑바(50)·사이드바(200) 위 */
  }
  .notif-panel-header {
    color: var(--text); /* 명시적 색상: 다크모드 포함 항상 가독 */
  }
  .notif-empty {
    color: var(--text-light);
  }
  .notif-text {
    color: var(--text);
  }
}
/* ===== /2026-06-13 모바일 버그 수정 ===== */
/* ===== /2026-06-13 모바일 조회 모드 ===== */

/* ===== 2026-06-13 토스트 알림 ===== */
.ws-toast-stack {
  position: fixed;
  top: 72px; /* 탑바(56px) + 여백 16px */
  right: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}
.ws-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--ws-radius-inner);
  box-shadow: var(--ws-shadow-hover);
  font-size: var(--ws-fs-body);
  line-height: 1.45;
  pointer-events: all;
  /* 등장 */
  animation: wsToastIn 240ms ease-out both;
  /* 나감 (.hide 클래스) */
  transition: opacity 300ms ease, transform 300ms ease;
}
.ws-toast.hide {
  opacity: 0;
  transform: translateX(24px);
}
/* 카테고리별 색상 (토큰만 사용) */
.ws-toast-success {
  background: var(--ws-success-soft);
  border: 1px solid var(--ws-success);
  color: var(--ws-success);
}
.ws-toast-error,
.ws-toast-danger {
  background: var(--ws-danger-soft);
  border: 1px solid var(--ws-danger);
  color: var(--ws-danger);
}
.ws-toast-warning {
  background: var(--ws-warning-soft);
  border: 1px solid var(--ws-warning);
  color: var(--ws-warning);
}
.ws-toast-info,
.ws-toast-message {
  background: var(--ws-info-soft);
  border: 1px solid var(--ws-info);
  color: var(--ws-info);
}
/* 기본 (카테고리 없거나 기타) */
.ws-toast {
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  color: var(--ws-text-strong);
}
/* 위 카테고리 규칙이 덮어씀 — 기본은 폴백 */
.ws-toast-msg {
  flex: 1;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.ws-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  color: inherit;
  opacity: 0.6;
  margin-top: -1px;
}
.ws-toast-close:hover { opacity: 1; }

@keyframes wsToastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ws-toast { animation: none; transition: opacity 80ms linear; }
}
/* 모바일: 전체 너비 */
@media (max-width: 480px) {
  .ws-toast-stack {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}
/* ===== /2026-06-13 토스트 알림 ===== */

/* ===== 2026-06-13 발주서 아코디언 ===== */
/* 펼침 행 배경 */
.po-detail-row td {
  background: var(--ws-bg-muted);
  padding: 0;
}
/* 펼침 내용 컨테이너 */
.po-detail-inner {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* 토글 버튼 */
.po-toggle-btn {
  white-space: nowrap;
  font-weight: 500;
}
/* 진행 단계 미니 타임라인 */
.po-flow-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  font-size: var(--ws-fs-caption);
}
.po-flow-mini .step {
  padding: 2px 8px;
  border-radius: var(--ws-radius-sm);
  color: var(--ws-text-muted);
  background: var(--ws-bg-hover);
  font-weight: 400;
  border: 1px solid transparent;
}
.po-flow-mini .step.done {
  color: var(--ws-text-secondary);
  background: var(--ws-bg-hover);
  border-color: var(--ws-border);
  font-weight: 400;
}
.po-flow-mini .step.current {
  color: var(--ws-accent);
  background: var(--ws-accent-subtle, var(--ws-bg-hover));
  border-color: var(--ws-accent);
  font-weight: 500;
}
.po-flow-mini .step.step-cancel {
  color: var(--ws-danger);
  background: var(--ws-bg-hover);
  border-color: var(--ws-danger);
  font-weight: 500;
}
.po-flow-mini .step-arrow {
  color: var(--ws-text-muted);
  font-size: 10px;
  padding: 0 1px;
}
/* 라인별 미니표 */
.po-mini-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ws-fs-caption);
}
.po-mini-lines-table th {
  padding: 4px 8px;
  text-align: left;
  color: var(--ws-text-muted);
  border-bottom: 1px solid var(--ws-border);
  font-weight: 500;
}
.po-mini-lines-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--ws-border);
  font-weight: 400;
}
.po-mini-lines-table tr:last-child td {
  border-bottom: none;
}
/* 메타 정보 줄 */
.po-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-muted);
}
/* 링크 블록 */
.po-detail-link-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.po-detail-link-label {
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-muted);
  font-weight: 500;
}
.po-link-input {
  max-width: 340px;
  font-size: 11px;
  cursor: text;
}
/* 액션 버튼 영역 */
.po-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid var(--ws-border);
}
/* 모바일: 펼침 영역 세로 스택 — 자연스럽게 블록 흐름 */
@media (max-width: 768px) {
  .po-detail-inner {
    padding: 12px 10px;
  }
  .po-flow-mini {
    flex-wrap: wrap;
  }
  .po-link-input {
    max-width: 100%;
  }
}
/* ===== /2026-06-13 발주서 아코디언 ===== */

/* ===== 2026-06-13 G1 다음 할 일 가이드 ===== */
.po-next-action {
  background: var(--ws-info-soft);
  border-radius: var(--ws-radius-inner);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.po-next-action strong {
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}
.po-next-action .hint {
  color: var(--ws-text-muted);
  font-size: var(--ws-fs-caption);
  font-weight: 400;
  margin-bottom: 6px;
}
.btn-next-action {
  border: 1px solid var(--ws-info);
  color: var(--ws-info);
  background: transparent;
  font-weight: 500;
  cursor: pointer;
}
.btn-next-action:hover {
  background: var(--ws-info-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .btn-next-action {
    transition: background 0.15s, color 0.15s;
  }
}
/* ===== /2026-06-13 G1 다음 할 일 가이드 ===== */

/* ===== 2026-06-13 G2 가이드 투어 ===== */
.ws-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 10000;
}
.ws-tour-spot {
  position: absolute;
  border-radius: var(--ws-radius-btn);
  box-shadow: 0 0 0 4px var(--ws-primary), 0 0 0 6px rgba(49,130,246,.25);
  z-index: 10001;
  pointer-events: none;
}
.ws-tour-pop {
  position: absolute;
  z-index: 10002;
  background: var(--ws-surface);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-inner);
  box-shadow: var(--ws-shadow-hover);
  padding: 16px 18px 14px;
  min-width: 240px;
  max-width: 320px;
}
.ws-tour-pop-title {
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-strong);
  margin-bottom: 6px;
}
.ws-tour-pop-body {
  font-size: var(--ws-fs-caption);
  font-weight: 400;
  color: var(--ws-text-muted);
  margin-bottom: 12px;
  line-height: 1.55;
}
.ws-tour-pop-nav {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.ws-tour-btn {
  border-radius: var(--ws-radius-btn);
  border: 1px solid transparent;
  padding: 6px 14px;
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}
.ws-tour-btn-primary {
  background: var(--ws-primary);
  color: var(--ws-surface);
  border-color: var(--ws-primary);
}
.ws-tour-btn-primary:hover {
  background: var(--ws-primary-hover, var(--ws-primary));
}
.ws-tour-btn-outline {
  background: transparent;
  color: var(--ws-text);
  border-color: var(--ws-border);
}
.ws-tour-btn-outline:hover {
  background: var(--ws-bg-subtle);
}
.ws-tour-btn-ghost {
  background: transparent;
  color: var(--ws-text-muted);
  border-color: transparent;
}
.ws-tour-btn-ghost:hover {
  color: var(--ws-text);
}
@media (prefers-reduced-motion: no-preference) {
  .ws-tour-spot {
    transition: top .15s, left .15s, width .15s, height .15s;
  }
  .ws-tour-pop {
    transition: top .15s, left .15s;
  }
}

/* ── 부자재 발주 테스트 단계 안내 배너 ── */
.mo-guide-banner {
  background: var(--ws-info-soft);
  border: 1px solid var(--ws-info);
  border-radius: var(--ws-radius-card);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mo-guide-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mo-guide-banner-step {
  font-size: var(--ws-fs-caption);
  color: var(--ws-info);
  font-weight: 500;
  background: var(--ws-info-soft);
  border: 1px solid var(--ws-info);
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
}
.mo-guide-banner-title {
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-strong);
}
.mo-guide-banner-desc {
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-secondary);
  line-height: 1.55;
}
.mo-guide-banner-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.mo-guide-banner-nav a {
  font-size: var(--ws-fs-caption);
  color: var(--ws-info);
  text-decoration: none;
  border: 1px solid var(--ws-info);
  border-radius: var(--ws-radius-sm);
  padding: 3px 10px;
  font-weight: 500;
  transition: background var(--ws-transition-fast);
}
.mo-guide-banner-nav a:hover {
  background: var(--ws-info-soft);
}
/* ===== /2026-06-13 G2 가이드 투어 ===== */

/* ===== 2026-06-13 유통기한 임박 버킷 알림 ===== */
.ia-expiry-total-badge {
  display: inline-block;
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  color: var(--ws-text-muted);
  background: var(--ws-bg);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-pill);
  padding: 2px 10px;
}
.ia-expiry-unknown-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  color: var(--ws-warning);
  background: var(--ws-warning-soft);
  border-top: 1px solid var(--ws-border-light);
  padding: 10px 20px;
}
.ia-expiry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--ws-border-light);
}
.ia-expiry-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: var(--ws-radius-inner);
  border: 1px solid var(--ws-border);
  background: var(--ws-surface);
  cursor: pointer;
  transition: box-shadow var(--ws-transition-fast),
              transform var(--ws-transition-fast);
  text-align: center;
}
.ia-expiry-chip:hover {
  box-shadow: var(--ws-shadow-hover);
  transform: translateY(-1px);
}
.ia-expiry-chip[aria-expanded="true"] {
  box-shadow: 0 0 0 2px var(--ws-info);
}
.ia-chip-label {
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  color: var(--ws-text-muted);
}
.ia-chip-count {
  font-size: var(--ws-fs-title);
  font-weight: 500;
  color: var(--ws-text-strong);
}
.ia-chip-value {
  font-size: var(--ws-fs-caption);
  font-weight: 400;
  color: var(--ws-text-muted);
}
.ia-chip-danger  { border-top: 3px solid var(--ws-danger);  background: var(--ws-danger-soft); }
.ia-chip-warning { border-top: 3px solid var(--ws-warning); background: var(--ws-warning-soft); }
.ia-chip-caution { border-top: 3px solid var(--ws-info); }
.ia-chip-info    { border-top: 3px solid var(--ws-border); }
.ia-chip-empty   { opacity: .55; }
.ia-chip-danger  .ia-chip-count { color: var(--ws-danger); }
.ia-chip-warning .ia-chip-count { color: var(--ws-warning); }
.ia-expiry-detail {
  border-top: 1px solid var(--ws-border-light);
  padding-bottom: 4px;
}
.ia-expiry-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-strong);
  background: var(--ws-bg-subtle);
}
.ia-expiry-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ws-text-muted);
  font-size: 14px;
  padding: 4px 6px;
  border-radius: var(--ws-radius-btn);
  transition: background var(--ws-transition-fast);
}
.ia-expiry-close:hover { background: var(--ws-bg); }
.ia-dday {
  display: inline-block;
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  border-radius: var(--ws-radius-pill);
  padding: 2px 8px;
}
.ia-dday-expired  { background: var(--ws-danger-soft);  color: var(--ws-danger); }
.ia-dday-imminent { background: var(--ws-warning-soft); color: var(--ws-warning); }
.ia-dday-soon     { background: var(--ws-info-soft);    color: var(--ws-info); }
.ia-dday-watch    { background: var(--ws-bg);           color: var(--ws-text-muted); }
/* ===== /2026-06-13 유통기한 임박 버킷 알림 ===== */

/* ===== 2026-06-13 통합 경영 지휘본부 ===== */
.cc-section {
  margin-bottom: 24px;
}
.cc-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ws-fs-h3);
  font-weight: 500;
  color: var(--ws-text-strong);
  margin-bottom: 16px;
}
.cc-subsection-label {
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  color: var(--ws-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* 오늘 할 일 피드 */
.cc-todo-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.cc-todo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ws-surface);
  border: 1px solid var(--ws-border-light);
  border-radius: var(--ws-radius-inner);
  text-decoration: none;
  color: var(--ws-text-strong);
  transition: background var(--ws-transition-fast), box-shadow var(--ws-transition-fast);
}
.cc-todo-card:hover {
  background: var(--ws-primary-soft);
  box-shadow: var(--ws-shadow-hover);
}
.cc-todo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ws-primary-soft);
  color: var(--ws-primary);
  border-radius: var(--ws-radius-btn);
  font-size: 13px;
  flex-shrink: 0;
}
.cc-todo-body { flex: 1; }
.cc-todo-label {
  font-size: var(--ws-fs-body);
  font-weight: 400;
  color: var(--ws-text-strong);
}
.cc-todo-count {
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  color: var(--ws-primary);
  margin-top: 2px;
}
.cc-todo-arrow {
  color: var(--ws-text-muted);
  font-size: 12px;
}
.cc-todo-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--ws-bg-subtle);
  border-radius: var(--ws-radius-inner);
  color: var(--ws-text-muted);
  font-size: var(--ws-fs-body);
}

/* 경고 스트립 */
.cc-warn-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.cc-warn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--ws-radius-pill);
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--ws-transition-fast);
}
.cc-warn-chip:hover { opacity: 0.85; }
.cc-warn-danger  { background: var(--ws-danger-soft);  color: var(--ws-danger); }
.cc-warn-orange  { background: var(--ws-warning-soft); color: var(--ws-warning); }
.cc-warn-yellow  { background: var(--ws-info-soft);    color: var(--ws-info); }

/* 핵심 지표 카드 그리드 */
.cc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.cc-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--ws-surface);
  border: 1px solid var(--ws-border-light);
  border-radius: var(--ws-radius-inner);
  text-decoration: none;
  transition: box-shadow var(--ws-transition-fast);
}
.cc-kpi-card:hover { box-shadow: var(--ws-shadow-hover); }
.cc-kpi-label {
  font-size: var(--ws-fs-caption);
  font-weight: 400;
  color: var(--ws-text-muted);
}
.cc-kpi-value {
  font-size: var(--ws-fs-h3);
  font-weight: 500;
  color: var(--ws-text-strong);
}
.cc-kpi-sub {
  font-size: var(--ws-fs-caption);
  font-weight: 400;
  color: var(--ws-text-muted);
}
.cc-kpi-warn  { color: var(--ws-warning); }
.cc-kpi-danger { color: var(--ws-danger); }
.cc-na { color: var(--ws-text-muted); font-size: var(--ws-fs-body); }

/* 모바일 — 세로 스택 */
@media (max-width: 640px) {
  .cc-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cc-todo-feed {
    gap: 4px;
  }
}
/* ===== /2026-06-13 통합 경영 지휘본부 ===== */

/* ===== 2026-06-13 완제품 발주 BOM 폭발 흐름 ===== */

/* 경고 배너 */
.po-explosion-warning {
  background: var(--ws-warning-bg);
  color: var(--ws-warning);
  border: 1px solid var(--ws-warning);
  border-radius: var(--ws-radius-card);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: var(--ws-fs-body);
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.po-warning-list {
  margin: 4px 0 0 16px;
  font-weight: 400;
}
.po-warning-list li { margin-bottom: 2px; }

/* 상단 요약 헤더 */
.po-explosion-header {
  background: var(--card-bg);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-card);
  box-shadow: var(--ws-shadow-rest);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.po-explosion-product {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}
.po-product-name {
  font-size: var(--ws-fs-title);
  font-weight: 500;
  color: var(--ws-text-primary);
}
.po-product-sku {
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-muted);
  font-family: var(--ws-font-mono);
}
.po-explosion-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.po-summary-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ws-bg-muted);
  border-radius: var(--ws-radius-sm);
  padding: 8px 14px;
  min-width: 80px;
}
.po-summary-chip--warn  { background: var(--ws-warning-bg); }
.po-summary-chip--accent { background: var(--ws-info-bg); }
.po-summary-label {
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-muted);
  font-weight: 400;
}
.po-summary-value {
  font-size: var(--ws-fs-title);
  font-weight: 500;
  color: var(--ws-text-primary);
}

/* BOM 캐스케이드 래퍼 */
.po-cascade-wrap {
  background: var(--card-bg);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-card);
  box-shadow: var(--ws-shadow-rest);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.po-cascade-label {
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 폭발 테이블 행 스타일 */
.po-line-needs-order {
  background: var(--ws-warning-soft, rgba(251,191,36,0.06));
}
.po-line-needs-order:hover { background: var(--ws-warning-bg); }
.po-line-sufficient { opacity: 0.55; }
.po-line-sufficient:hover { opacity: 0.75; }

/* 부자재명 + SKU + why 캡션 */
.po-mat-name {
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-primary);
}
.po-mat-sku {
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-muted);
  font-family: var(--ws-font-mono);
  margin-bottom: 2px;
}
.po-mat-why {
  font-size: var(--ws-fs-caption);
  color: var(--ws-text-muted);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.4;
}

/* 수량 강조 */
.po-val-warn { color: var(--ws-warning); font-weight: 500; }
.po-val-ok   { color: var(--ws-text-muted); }

/* 발주량 인라인 input */
.ws-input-sm {
  padding: 4px 6px;
  font-size: var(--ws-fs-body);
  width: 80px;
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-sm);
  background: var(--ws-bg-input, var(--ws-bg-muted));
  color: var(--ws-text-primary);
}
.po-qty-input { width: 80px; }

/* 거래처 카드 섹션 */
.po-vendor-section {
  background: var(--card-bg);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-card);
  box-shadow: var(--ws-shadow-rest);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.po-vendor-section-title {
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.po-vendor-count {
  color: var(--ws-accent);
  font-weight: 500;
}
.po-vendor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.po-vendor-card {
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-inner, var(--ws-radius-sm));
  overflow: hidden;
}
.po-vendor-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ws-bg-muted);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 500;
}
.po-vendor-checkbox { accent-color: var(--ws-accent); width: 16px; height: 16px; }
.po-vendor-name {
  flex: 1;
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-text-primary);
}
.po-vendor-amount {
  font-size: var(--ws-fs-body);
  font-weight: 500;
  color: var(--ws-accent);
  font-family: var(--ws-font-mono);
}
.po-vendor-lines {
  width: 100%;
  border-collapse: collapse;
}
.po-vendor-lines td {
  padding: 6px 14px;
  font-size: var(--ws-fs-caption);
  border-bottom: 1px solid var(--ws-border);
  color: var(--ws-text-secondary);
  vertical-align: middle;
}
.po-vendor-lines tr:last-child td { border-bottom: none; }
.po-vline-name { color: var(--ws-text-primary); }
.po-vline-qty, .po-vline-price, .po-vline-amt {
  white-space: nowrap;
  text-align: right;
}

/* 확정 버튼 바 */
.po-confirm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius-card);
  padding: 14px 20px;
  margin-bottom: 24px;
}
.po-confirm-note {
  font-size: var(--ws-fs-body);
  color: var(--ws-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.po-confirm-btn {
  flex-shrink: 0;
}

/* 모바일 — 세로 스택 */
@media (max-width: 640px) {
  .po-explosion-header { flex-direction: column; align-items: flex-start; }
  .po-explosion-summary { flex-wrap: wrap; }
  .po-vendor-cards { grid-template-columns: 1fr; }
  .po-confirm-bar { flex-direction: column; align-items: flex-start; }
}
/* ===== /2026-06-13 완제품 발주 BOM 폭발 흐름 ===== */

/* ===== 2026-06-14 자재 소요 산출 강화 — on_order·urgency ===== */
.po-val-on-order {
  color: var(--ws-warning);
  font-weight: 500;
}
.po-mat-note {
  font-size: var(--ws-fs-caption);
  color: var(--ws-warning);
  font-weight: 400;
  margin-top: 2px;
}
.po-urgency {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--ws-fs-caption);
  font-weight: 500;
}
.po-urgency--긴급 {
  background: var(--ws-danger-bg, #fef2f2);
  color: var(--ws-danger);
}
.po-urgency--임박 {
  background: var(--ws-warning-bg, #fffbeb);
  color: var(--ws-warning);
}
.po-urgency--여유 {
  background: var(--ws-success-bg, #f0fdf4);
  color: var(--ws-success);
}
.po-urgency--발주필요 {
  background: var(--ws-warning-bg, #fffbeb);
  color: var(--ws-warning);
}
.po-urgency--충분 {
  background: var(--ws-success-bg, #f0fdf4);
  color: var(--ws-success);
}

/* ===== 2026-06-14 모바일 앱 타일 홈 ===== */
@media (max-width: 768px) {

  /* 유틸리티: 모바일/데스크톱 가시성 */
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }

  /* ── 모바일 홈 래퍼 ── */
  .mobile-home {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--topbar-h) - 56px - env(safe-area-inset-bottom));
    background: var(--ws-bg);
    padding: 0 0 8px;
  }

  /* ── 모바일 홈 헤더 (회사명 + 사용자) ── */
  .mh-header {
    padding: 20px 16px 14px;
    background: var(--ws-primary);
    color: var(--ws-surface);
  }
  .mh-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .mh-company {
    font-size: 13px;
    font-weight: 500;
    opacity: .85;
    letter-spacing: .02em;
  }
  .mh-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .mh-icon-btn {
    background: none;
    border: none;
    color: var(--ws-surface);
    width: 36px;
    height: 36px;
    border-radius: var(--ws-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }
  .mh-icon-btn:active { opacity: .7; }
  .mh-notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: var(--ws-radius-pill);
    background: var(--ws-danger);
    border: 1.5px solid var(--ws-primary);
    display: none;
  }
  .mh-notif-dot.visible { display: block; }
  .mh-greeting {
    font-size: var(--ws-fs-display);
    font-weight: 500;
    line-height: 1.2;
  }
  .mh-greeting-sub {
    font-size: 13px;
    opacity: .75;
    margin-top: 2px;
  }

  /* ── 경고 배너 (홈 전용 — 슬림) ── */
  .mh-warn-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: var(--ws-warning-soft);
    border-bottom: 1px solid var(--ws-border-light);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mh-warn-bar::-webkit-scrollbar { display: none; }
  .mh-warn-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--ws-radius-pill);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
  }
  .mh-warn-chip--danger {
    background: var(--ws-danger-soft);
    color: var(--ws-danger);
  }
  .mh-warn-chip--orange {
    background: var(--ws-warning-soft);
    color: var(--ws-warning);
  }

  /* ── 타일 그리드 ── */
  .mh-tile-section {
    padding: 14px 12px 0;
  }
  .mh-tile-section-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--ws-text-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 2px;
  }
  .mh-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
  }
  .m-tile {
    position: relative;
    min-height: 96px;
    border-radius: var(--ws-radius-card);
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-decoration: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s, box-shadow .12s;
    box-shadow: var(--ws-shadow-rest);
  }
  .m-tile:active { transform: scale(.97); box-shadow: none; }

  /* 타일 확장 토큰 — hex 리터럴 금지, 여기서만 정의 */
  :root {
    --ws-tile-green-dark:  var(--ws-success);       /* gradient 끝: success 자체 */
    --ws-tile-orange-dark: var(--ws-warning);
    --ws-tile-purple-a:    color-mix(in srgb, var(--ws-primary-active) 60%, var(--ws-text-strong) 40%);
    --ws-tile-purple-b:    color-mix(in srgb, var(--ws-primary-active) 30%, var(--ws-text-strong) 70%);
    --ws-tile-teal-a:      color-mix(in srgb, var(--ws-info) 55%, var(--ws-success) 45%);
    --ws-tile-teal-b:      color-mix(in srgb, var(--ws-info) 30%, var(--ws-success) 70%);
    --ws-tile-rose-a:      color-mix(in srgb, var(--ws-danger) 80%, var(--ws-primary-active) 20%);
    --ws-tile-rose-b:      color-mix(in srgb, var(--ws-danger) 50%, var(--ws-text-strong) 50%);
  }

  /* 타일 색상 팔레트 — 토큰 기반 */
  .m-tile--blue {
    background: linear-gradient(135deg, var(--ws-primary) 0%, var(--ws-primary-active) 100%);
    color: var(--ws-surface);
  }
  .m-tile--green {
    background: linear-gradient(135deg, var(--ws-success) 0%, var(--ws-tile-green-dark) 100%);
    color: var(--ws-surface);
  }
  .m-tile--orange {
    background: linear-gradient(135deg, var(--ws-warning) 0%, var(--ws-tile-orange-dark) 100%);
    color: var(--ws-surface);
  }
  .m-tile--purple {
    background: linear-gradient(135deg, var(--ws-tile-purple-a) 0%, var(--ws-tile-purple-b) 100%);
    color: var(--ws-surface);
  }
  .m-tile--teal {
    background: linear-gradient(135deg, var(--ws-tile-teal-a) 0%, var(--ws-tile-teal-b) 100%);
    color: var(--ws-surface);
  }
  .m-tile--indigo {
    background: linear-gradient(135deg, var(--ws-info) 0%, var(--ws-primary-active) 100%);
    color: var(--ws-surface);
  }
  .m-tile--rose {
    background: linear-gradient(135deg, var(--ws-tile-rose-a) 0%, var(--ws-tile-rose-b) 100%);
    color: var(--ws-surface);
  }
  .m-tile--slate {
    background: linear-gradient(135deg, var(--ws-text-muted) 0%, var(--ws-text) 100%);
    color: var(--ws-surface);
  }
  .m-tile--mock {
    background: var(--ws-bg-subtle);
    color: var(--ws-text-muted);
    border: 1px solid var(--ws-border-light);
    box-shadow: none;
  }

  .m-tile-icon {
    font-size: 28px;
    opacity: .9;
    line-height: 1;
  }
  .m-tile--mock .m-tile-icon { opacity: .5; }

  .m-tile-footer {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }
  .m-tile-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
  }
  .m-tile-badge {
    background: var(--ws-danger);
    color: var(--ws-surface);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: var(--ws-radius-pill);
    min-width: 22px;
    text-align: center;
    line-height: 1.6;
  }
  .m-tile-badge--warn {
    background: var(--ws-warning);
  }
  .m-tile-mock-badge {
    font-size: 9px;
    font-weight: 500;
    opacity: .6;
    padding: 1px 6px;
    border: 1px solid currentColor;
    border-radius: 4px;
  }

  /* 홈 하단 여백 (탭바 보정) */
  .mobile-home { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  /* 탭바 세련화 */
  .mobile-tabbar {
    background: var(--ws-surface);
    border-top: 1px solid var(--ws-border-light);
    box-shadow: 0 -4px 16px rgba(0,0,0,.07);
  }
  .mtab {
    font-size: 10px;
    font-weight: 500;
    color: var(--ws-text-muted);
  }
  .mtab.active {
    color: var(--ws-primary);
  }
  .mtab i { font-size: 20px; }

}
/* ===== /2026-06-14 모바일 앱 타일 홈 ===== */
/* ===== /2026-06-14 자재 소요 산출 강화 ===== */

/* ===== 2026-06-14 datalist 검색형 입력 스타일 ===== */
input[list] {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
  padding-right: 28px;
}
/* ===== /2026-06-14 datalist 검색형 입력 스타일 ===== */

/* ===== 2026-06-14 PC/모바일 보기 전환 FAB ===== */
.ws-viewmode-fab {
  position: fixed;
  bottom: 72px;   /* 모바일 탭바(56px) + 여유 16px */
  right: 16px;
  z-index: 8500;  /* 탭바·토스트 위, 모달 아래 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: var(--ws-radius-pill);
  background: var(--ws-surface);
  color: var(--ws-text-strong);
  font-family: var(--ws-font);
  font-size: var(--ws-fs-caption);
  font-weight: 500;
  box-shadow: var(--ws-shadow-hover), 0 0 0 1px var(--ws-border-light);
  cursor: pointer;
  transition: box-shadow .15s, opacity .15s;
  opacity: .82;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.ws-viewmode-fab:hover,
.ws-viewmode-fab:focus-visible {
  opacity: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,.14), 0 0 0 1px var(--ws-border);
  outline: none;
}
.ws-viewmode-fab i {
  font-size: 14px;
  color: var(--ws-primary);
}

/* force-desktop 모드일 때 탭바가 숨으므로 FAB를 아래로 내림 */
html.force-desktop .ws-viewmode-fab {
  bottom: 16px;
}

/* 다크모드 */
body.dark-mode .ws-viewmode-fab {
  background: var(--ws-surface);
  box-shadow: var(--ws-shadow-hover), 0 0 0 1px var(--ws-border);
}
/* ===== /2026-06-14 PC/모바일 보기 전환 FAB ===== */
