/* ================================================================
   팀 근태관리 — styles.css v4.0
   Design: Apple HIG × Glassmorphism × Pretendard + Dark Mode + Responsive
================================================================ */
/* 다크모드: data-theme="dark" 속성으로 제어 (수동 토글) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  /* ── Brand (Indigo) ── */
  --brand:        #5b5cf6;
  --brand-dark:   #4338ca;
  --brand-mid:    #818cf8;
  --brand-light:  #eef2ff;
  --brand-xlight: #f5f3ff;

  /* ── Glassmorphism ── */
  --glass-bg:     rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.55);
  --glass-shadow: 0 8px 32px rgba(99,102,241,.10), 0 2px 8px rgba(0,0,0,.06);
  --glass-blur:   blur(18px) saturate(180%);

  /* ── Semantic ── */
  --success:   #34c759;
  --success-l: #dcfce7;
  --danger:    #ff3b30;
  --danger-l:  #fee2e2;
  --warning:   #ff9500;
  --warning-l: #fef3c7;
  --info:      #007aff;
  --info-l:    #dbeafe;

  /* ── Surface / BG ── */
  --bg:        #f2f2f7;          /* iOS system gray 6 */
  --bg2:       #e9e9ef;
  --surface:   #ffffff;
  --surf2:     #f9f9fb;
  --surf-glass:rgba(255,255,255,0.80);

  /* ── Border ── */
  --border:    rgba(60,60,67,.18);
  --border2:   rgba(60,60,67,.10);

  /* ── Text (SF-style hierarchy) ── */
  --tx:   #1c1c1e;
  --tx2:  #3a3a3c;
  --tx3:  #636366;
  --tx4:  #aeaeb2;

  /* ── Radius (Apple-esque) ── */
  --r1:  8px;
  --r2:  12px;
  --r3:  16px;
  --r4:  22px;
  --r5:  30px;

  /* ── Shadow (layered) ── */
  --sh0: 0 1px 2px rgba(0,0,0,.04);
  --sh1: 0 2px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
  --sh2: 0 6px 20px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05);
  --sh3: 0 16px 48px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --sh-brand: 0 4px 16px rgba(91,92,246,.30);
  --sh-danger: 0 4px 16px rgba(255,59,48,.28);

  /* ── Animation ── */
  --ease: cubic-bezier(.25,.46,.45,.94);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* ================================================================
   DARK MODE — [data-theme="dark"] (수동 토글)
================================================================ */
[data-theme="dark"] {
  --brand:        #818cf8;
  --brand-dark:   #6366f1;
  --brand-mid:    #a5b4fc;
  --brand-light:  rgba(99,102,241,.18);
  --brand-xlight: rgba(99,102,241,.10);

  --glass-bg:     rgba(28,28,35,0.80);
  --glass-border: rgba(255,255,255,0.10);
  --glass-shadow: 0 8px 32px rgba(0,0,0,.40), 0 2px 8px rgba(0,0,0,.25);

  --success:   #30d158;
  --success-l: rgba(48,209,88,.15);
  --danger:    #ff453a;
  --danger-l:  rgba(255,69,58,.15);
  --warning:   #ffd60a;
  --warning-l: rgba(255,214,10,.15);
  --info:      #0a84ff;
  --info-l:    rgba(10,132,255,.15);

  --bg:        #1c1c1e;
  --bg2:       #2c2c2e;
  --surface:   #2c2c2e;
  --surf2:     #3a3a3c;
  --surf-glass:rgba(44,44,46,0.85);

  --border:    rgba(255,255,255,.12);
  --border2:   rgba(255,255,255,.07);

  --tx:   #f2f2f7;
  --tx2:  #e5e5ea;
  --tx3:  #98989d;
  --tx4:  #636366;

  --sh0: 0 1px 2px rgba(0,0,0,.15);
  --sh1: 0 2px 8px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.15);
  --sh2: 0 6px 20px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.20);
  --sh3: 0 16px 48px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.25);
  --sh-brand: 0 4px 16px rgba(99,102,241,.35);
}

[data-theme="dark"] html,
[data-theme="dark"] body,
:root[data-theme="dark"],
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: var(--bg) !important;
  color: var(--tx) !important;
}

html[data-theme="dark"] .app-header {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #4f46e5 100%) !important;
}

html[data-theme="dark"] .tab-bar,
html[data-theme="dark"] .ctrl-bar,
html[data-theme="dark"] .summary-bar,
html[data-theme="dark"] .cal-legend {
  background: rgba(44,44,46,0.95) !important;
}

html[data-theme="dark"] .content-area { background: var(--bg); }

html[data-theme="dark"] .att-table th {
  background: rgba(44,44,46,.98) !important;
  color: var(--tx3);
}
html[data-theme="dark"] .att-table td { color: var(--tx2); }
html[data-theme="dark"] .att-table tr:hover td { background: rgba(99,102,241,.06) !important; }
html[data-theme="dark"] .att-table tr.today-row td { background: rgba(99,102,241,.12) !important; }
html[data-theme="dark"] .att-table tr.today-row:hover td { background: rgba(99,102,241,.16) !important; }
html[data-theme="dark"] .att-table tr.sun-row td { background: rgba(255,69,58,.05); color: rgba(255,130,120,.6) !important; }
html[data-theme="dark"] .att-table tr.sat-row td { background: rgba(10,132,255,.04); color: rgba(100,160,255,.6) !important; }
html[data-theme="dark"] .att-table tr.holiday-row td { background: rgba(255,69,58,.08); }
html[data-theme="dark"] .att-table tr.group-leave-row td { background: rgba(255,214,10,.06); }
html[data-theme="dark"] .att-table tr.completed-row td { background: rgba(48,209,88,.06); }
html[data-theme="dark"] .att-table tr.holiday-work-row td { background: rgba(255,149,0,.22) !important; border-left: 3px solid #f97316; }

html[data-theme="dark"] .att-unified-layout { background: var(--bg); }
html[data-theme="dark"] .att-left-panel {
  background: rgba(44,44,46,.92) !important;
  border-color: rgba(255,255,255,.10) !important;
}
html[data-theme="dark"] .att-right-panel {
  background: rgba(44,44,46,.88) !important;
  border-color: rgba(255,255,255,.10) !important;
}

html[data-theme="dark"] .side-member-card {
  background: rgba(58,58,60,.80) !important;
  border-color: rgba(255,255,255,.10) !important;
}
html[data-theme="dark"] .side-member-card:hover {
  border-color: rgba(129,140,248,.35) !important;
}
html[data-theme="dark"] .side-member-card.active {
  background: rgba(99,102,241,.18) !important;
  border-color: rgba(129,140,248,.50) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15), var(--sh1) !important;
}

html[data-theme="dark"] .month-card,
html[data-theme="dark"] .member-row-card {
  background: rgba(44,44,46,.88) !important;
  border-color: rgba(255,255,255,.10) !important;
}
html[data-theme="dark"] .member-stat-card {
  background: rgba(44,44,46,.88) !important;
  border-color: rgba(255,255,255,.10) !important;
}

html[data-theme="dark"] .ctrl-select {
  background: rgba(58,58,60,.90) !important;
  color: var(--tx) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .form-input {
  background: rgba(58,58,60,.90) !important;
  color: var(--tx) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .form-input:focus {
  background: rgba(72,72,74,1) !important;
}

html[data-theme="dark"] .type-select { color: var(--tx) !important; }
html[data-theme="dark"] .type-select.type-normal   { color: #6ee7b7 !important; background: rgba(52,199,89,.18) !important; }
html[data-theme="dark"] .type-select.type-annual   { color: #fcd34d !important; background: rgba(245,158,11,.18) !important; }
html[data-theme="dark"] .type-select.type-halfam   { color: #93c5fd !important; background: rgba(59,130,246,.18) !important; }
html[data-theme="dark"] .type-select.type-halfpm   { color: #c4b5fd !important; background: rgba(139,92,246,.18) !important; }
html[data-theme="dark"] .type-select.type-vacation { color: #7dd3fc !important; background: rgba(14,165,233,.15) !important; }
html[data-theme="dark"] .type-select.type-comp     { color: #d8b4fe !important; background: rgba(168,85,247,.15) !important; }
html[data-theme="dark"] .type-badge.type-nonwork   { color: var(--tx4) !important; background: rgba(255,255,255,.06) !important; }

html[data-theme="dark"] .time-sel-h,
html[data-theme="dark"] .time-sel-m,
html[data-theme="dark"] .num-input,
html[data-theme="dark"] .memo-input { color: var(--tx2) !important; }
html[data-theme="dark"] .time-sel-h:focus,
html[data-theme="dark"] .time-sel-m:focus { background: rgba(72,72,74,1) !important; }
html[data-theme="dark"] .time-input:focus,
html[data-theme="dark"] .num-input:focus,
html[data-theme="dark"] .memo-input:focus { background: rgba(72,72,74,1) !important; }

html[data-theme="dark"] .overview-table th {
  background: rgba(44,44,46,.98) !important;
}
html[data-theme="dark"] .name-th {
  background: rgba(99,102,241,.15) !important;
  color: var(--brand) !important;
}
html[data-theme="dark"] .name-td {
  background: rgba(99,102,241,.10) !important;
}
html[data-theme="dark"] .overview-table tr:hover td { background: rgba(99,102,241,.05) !important; }

html[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.65); }
html[data-theme="dark"] .modal-box {
  background: rgba(36,36,40,.97) !important;
  border-color: rgba(255,255,255,.12) !important;
}
html[data-theme="dark"] .modal-warn {
  background: rgba(255,214,10,.08) !important;
  border-left-color: var(--warning) !important;
}

html[data-theme="dark"] .btn-outline {
  background: rgba(58,58,60,.85) !important;
  border-color: var(--border) !important;
  color: var(--tx2) !important;
}
html[data-theme="dark"] .btn-outline:hover {
  background: rgba(99,102,241,.18) !important;
  color: var(--brand) !important;
  border-color: rgba(129,140,248,.40) !important;
}
html[data-theme="dark"] .btn-icon {
  background: rgba(58,58,60,.85) !important;
  border-color: var(--border) !important;
  color: var(--tx3) !important;
}
html[data-theme="dark"] .btn-icon:hover {
  background: rgba(99,102,241,.20) !important;
  color: var(--brand) !important;
  border-color: rgba(129,140,248,.35) !important;
}

html[data-theme="dark"] .summary-item {
  background: rgba(58,58,60,.80) !important;
  border-color: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] .summary-bar { background: rgba(44,44,46,0.95) !important; }

html[data-theme="dark"] .view-toggle { background: rgba(0,0,0,.35) !important; }
html[data-theme="dark"] .view-toggle-btn.active {
  background: rgba(58,58,60,1) !important;
  color: var(--brand) !important;
}
html[data-theme="dark"] .view-toggle-btn:not(.active) { color: var(--tx3) !important; }

html[data-theme="dark"] .cal-day.cal-today {
  background: linear-gradient(135deg, #4338ca 0%, #5b5cf6 100%) !important;
}
html[data-theme="dark"] .cal-legend { background: rgba(44,44,46,0.95) !important; }
html[data-theme="dark"] .month-card { background: rgba(44,44,46,.85) !important; }

html[data-theme="dark"] .panel-label {
  background: rgba(36,36,40,.95);
  color: var(--tx3);
}
html[data-theme="dark"] .member-card-strip {
  background: rgba(44,44,46,0.95) !important;
}
html[data-theme="dark"] .section-label { color: var(--tx3); }
html[data-theme="dark"] .overview-table-wrap {
  border-color: var(--border) !important;
}
html[data-theme="dark"] .comp-accrual-section {
  background: rgba(44,44,46,.85) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .comp-accrual-header {
  background: rgba(58,58,60,.90) !important;
}
html[data-theme="dark"] .comp-accrual-table th {
  background: rgba(44,44,46,.95) !important;
  color: var(--tx3) !important;
}
html[data-theme="dark"] .comp-accrual-table td {
  color: var(--tx2) !important;
  border-color: var(--border2) !important;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.30); }

html, body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--tx);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.2px;
}

#root, #app-shell { display: flex; flex-direction: column; height: 100vh; }

/* ===================================================================
   HEADER — Vibrancy Bar
=================================================================== */
.app-header {
  height: 54px;
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 50%, #7c3aed 100%);
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  gap: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.12), var(--sh2);
}
.app-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.4) 0%, transparent 50%);
  pointer-events: none;
}
.app-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,.15);
}
.logo-wrap {
  display: flex; align-items: center; gap: 10px; z-index: 1;
}
.logo-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.20);
  backdrop-filter: blur(8px);
  border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
  border: 1px solid rgba(255,255,255,.30);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.title {
  font-size: 16px; font-weight: 700;
  color: white; letter-spacing: -.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.header-right { margin-left: auto; z-index: 1; display: flex; align-items: center; gap: 8px; }

.save-indicator {
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--r5);
  color: white; transition: all .3s var(--ease);
  min-width: 4px; backdrop-filter: blur(4px);
}
.save-indicator.saving { background: rgba(255,255,255,.22); }
.save-indicator.saved  { background: rgba(52,199,89,.50); }
.save-indicator.error  { background: rgba(255,59,48,.50); }

/* ===================================================================
   TAB BAR — Segmented style
=================================================================== */
.tab-bar {
  background: var(--surf-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 16px;
  flex-shrink: 0;
  gap: 0;
  box-shadow: 0 1px 0 var(--border2);
}
.tab-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px; height: 42px;
  border: none; background: transparent;
  font-size: 14px; font-weight: 500;
  color: var(--tx3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .2s var(--ease);
  white-space: nowrap;
  border-radius: var(--r1) var(--r1) 0 0;
  position: relative;
}
.tab-btn:hover { color: var(--brand); background: rgba(91,92,246,.05); }
.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 700;
  background: rgba(91,92,246,.06);
}
.tab-btn.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 16px; right: 16px;
  height: 2px; background: var(--brand);
  border-radius: 1px 1px 0 0;
}
.tab-icon { font-size: 13px; }

/* ===================================================================
   CTRL BAR
=================================================================== */
.ctrl-bar {
  background: var(--surf-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 8px 18px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  flex-shrink: 0;
  min-height: 48px;
}
.ctrl-group { display: flex; align-items: center; gap: 6px; }
.ctrl-label {
  font-size: 12px; color: var(--tx3); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; letter-spacing: .1px;
}
.ctrl-select {
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 6px 12px;
  font-size: 14px; font-weight: 500;
  color: var(--tx2);
  background: var(--surf-glass);
  backdrop-filter: blur(8px);
  cursor: pointer; outline: none;
  transition: border-color .15s, box-shadow .15s;
  max-width: 160px;
  box-shadow: var(--sh0);
}
.ctrl-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,92,246,.18); }
.ctrl-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.ctrl-spacer { flex: 1; }
.month-display {
  font-size: 15px; color: var(--tx2); min-width: 84px;
  text-align: center; white-space: nowrap; font-weight: 600;
}
.month-display strong { color: var(--brand); }

/* ===================================================================
   BUTTONS — Apple-style
=================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r2);
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all .18s var(--ease);
  white-space: nowrap;
  letter-spacing: -.1px; line-height: 1;
  font-family: inherit;
  position: relative; overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.btn:hover::before { background: rgba(255,255,255,.12); }
.btn i { font-size: 13px; }
.btn:active { transform: scale(.97) !important; }

.btn-primary {
  background: linear-gradient(135deg, #5b5cf6 0%, #6d28d9 100%);
  color: white;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(91,92,246,.40);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #34c759 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(52,199,89,.30);
}
.btn-success:hover {
  box-shadow: 0 6px 20px rgba(52,199,89,.40);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ff3b30 0%, #dc2626 100%);
  color: white;
  box-shadow: var(--sh-danger);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,59,48,.38); }

.btn-outline {
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(8px);
  color: var(--tx2);
  border: 1px solid var(--border);
  box-shadow: var(--sh0);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: rgba(91,92,246,.35);
  color: var(--brand);
  box-shadow: var(--sh1);
}

.btn-danger-outline {
  background: rgba(255,255,255,.70);
  color: var(--danger);
  border: 1px solid rgba(255,59,48,.30);
}
.btn-danger-outline:hover { background: var(--danger-l); border-color: var(--danger); }

.btn-icon {
  width: 32px; height: 32px; padding: 0;
  justify-content: center;
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--tx3);
  border-radius: var(--r2);
  box-shadow: var(--sh0);
}
.btn-icon:hover {
  background: var(--brand-light);
  color: var(--brand);
  border-color: rgba(91,92,246,.30);
  box-shadow: var(--sh1);
}

.btn-sm { padding: 5px 11px; font-size: 13px; }

/* ===================================================================
   CONTENT AREA
=================================================================== */
.content-area {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* ===================================================================
   LOADING / ERROR
=================================================================== */
.loading-screen, .error-screen {
  display: flex; flex-direction: column; height: 100vh;
}
.loading-body, .error-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 15px; color: var(--tx3); font-weight: 500; }

.error-icon { font-size: 42px; margin-bottom: 4px; }
.error-title { font-size: 18px; font-weight: 700; color: var(--tx); }
.error-msg { font-size: 14px; color: var(--tx3); }

/* ===================================================================
   EMPTY STATE
=================================================================== */
.empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 40px;
}
.empty-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--brand-light) 0%, rgba(109,40,217,.10) 100%);
  color: var(--brand);
  border-radius: var(--r4);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 6px;
  box-shadow: var(--sh1);
}
.empty-title { font-size: 18px; font-weight: 700; color: var(--tx2); }
.empty-desc  { font-size: 14px; color: var(--tx3); margin-bottom: 10px; }

/* ===================================================================
   SUMMARY BAR — Glass pill
=================================================================== */
.individual-layout { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

.summary-bar {
  background: var(--surf-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 8px 18px;
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 1px 0 var(--border2);
}
.summary-bar::-webkit-scrollbar { display: none; }

.summary-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.80);
  border-radius: var(--r3);
  flex-shrink: 0;
  min-width: 96px;
  box-shadow: var(--sh0);
  transition: box-shadow .18s, transform .18s;
}
.summary-item:hover { box-shadow: var(--sh1); transform: translateY(-1px); }

.summary-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.summary-label { font-size: 11px; color: var(--tx3); margin-bottom: 2px; white-space: nowrap; font-weight: 600; letter-spacing: .2px; }
.summary-value { font-size: 15px; font-weight: 800; color: var(--tx); line-height: 1; }
.summary-value.ot-pos { color: var(--danger); }
.summary-value.ot-neg { color: var(--info); }
.summary-value.ot-zero { color: var(--tx4); }
.summary-unit { font-size: 11px; font-weight: 600; color: var(--tx3); margin-left: 2px; }
.summary-sep { width: 1px; height: 30px; background: var(--border); flex-shrink: 0; margin: 0 2px; }

/* ===================================================================
   ATTENDANCE TABLE
=================================================================== */
.att-table-wrap { flex: 1; overflow: auto; }

.att-table {
  border-collapse: collapse; width: 100%; min-width: 820px;
}
.att-table thead { position: sticky; top: 0; z-index: 10; }
.att-table th {
  background: rgba(244,246,251,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--border);
  border-right: 1px solid var(--border2);
  padding: 0 8px; height: 34px;
  font-size: 11px; font-weight: 700;
  color: var(--tx3); text-align: center;
  letter-spacing: .5px; text-transform: uppercase;
}
.att-table th:first-child { text-align: left; padding-left: 16px; }

.att-table td {
  border-bottom: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  height: 34px; padding: 0 4px;
  text-align: center; font-size: 14px;
  transition: background .12s;
  vertical-align: middle;
  line-height: 34px;
}
.att-table td:first-child { text-align: left; padding-left: 16px; }

/* 행 테마 */
.att-table tr:hover td { background: rgba(91,92,246,.04) !important; }
.att-table tr.sun-row td       { background: rgba(255,59,48,.03); color: #d1d5db; }
.att-table tr.sat-row td       { background: rgba(0,122,255,.03); color: #d1d5db; }
.att-table tr.holiday-row td   { background: rgba(255,59,48,.05); }
.att-table tr.group-leave-row td { background: rgba(255,149,0,.06); }
/* 주말/공휴일 실제 출근(정상 타입) 강조 */
.att-table tr.holiday-work-row td { background: rgba(255,149,0,.18) !important; border-left: 3px solid #f97316; }
.att-table tr.holiday-work-row td:first-child { border-left: 3px solid #f97316; }
.att-table tr.completed-row td { background: rgba(52,199,89,.05); }
.att-table tr.today-row td     { background: rgba(91,92,246,.06) !important; }
.att-table tr.today-row:hover td { background: rgba(91,92,246,.09) !important; }

/* 컬럼 너비 */
.col-date  { width: 82px; min-width: 82px; }
.col-day   { width: 28px; }
.col-type  { width: 84px; overflow: visible; padding: 0 3px; }
.col-time  { width: 70px; }
.col-break { width: 54px; }
.col-work  { width: 72px; }
.col-memo  { width: 60px; min-width: 60px; max-width: 60px; }
.col-done  { width: 38px; }

/* 날짜 */
.date-num { font-size: 13px; font-weight: 600; color: var(--tx2); font-variant-numeric: tabular-nums; }
.today-badge {
  font-size: 9px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand) 0%, #6d28d9 100%);
  color: white;
  padding: 1px 5px; border-radius: var(--r5);
  margin-left: 3px; vertical-align: middle;
  letter-spacing: -.1px;
  box-shadow: 0 1px 4px rgba(91,92,246,.35);
}
.group-badge {
  font-size: 9px; font-weight: 700;
  background: rgba(245,158,11,.15); color: #92400e;
  padding: 1px 5px; border-radius: var(--r5);
  margin-left: 3px; vertical-align: middle;
  border: 1px solid rgba(245,158,11,.25);
}

/* 근태구분 — 컴팩트 배지형 */
.type-select {
  width: 100%; border: none; background: transparent;
  font-size: 12px; text-align: center;
  outline: none; cursor: pointer;
  font-family: inherit;
  padding: 3px 2px;
  height: auto;
  line-height: 1.2;
  border-radius: var(--r1);
  font-weight: 700;
  transition: all .15s;
  vertical-align: middle;
  display: block;
  box-sizing: border-box;
  appearance: none; -webkit-appearance: none;
  -moz-appearance: none;
}
.type-select:focus { box-shadow: 0 0 0 2px rgba(91,92,246,.30); outline: none; }
.type-select.type-normal   { color: #065f46; background: rgba(52,199,89,.12); }
.type-select.type-annual   { color: #92400e; background: rgba(245,158,11,.14); }
.type-select.type-halfam   { color: #1e40af; background: rgba(59,130,246,.13); }
.type-select.type-halfpm   { color: #5b21b6; background: rgba(109,40,217,.13); }
.type-select.type-vacation { color: #0c4a6e; background: rgba(14,165,233,.12); }
.type-select.type-comp     { color: #6b21a8; background: rgba(168,85,247,.12); }
.type-badge {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 26px;
  padding: 0 4px; border-radius: var(--r1);
  font-size: 12px; font-weight: 700;
  box-sizing: border-box;
  line-height: 1;
}
.type-nonwork { color: var(--tx3); background: rgba(0,0,0,.04); font-size: 12px; }

/* 인풋 스타일 */
.time-input, .num-input, .memo-input {
  width: 100%; border: none; background: transparent;
  text-align: center; font-size: 13px; padding: 2px 2px;
  outline: none; font-family: inherit; color: var(--tx2);
  border-radius: var(--r1); transition: all .12s;
}
/* 출퇴근 시/분 select 쌍 */
.time-pair {
  display: flex; align-items: center; justify-content: center; gap: 0;
}
.time-colon {
  font-size: 14px; color: var(--tx3); padding: 0 1px; line-height: 1;
  user-select: none;
}
.time-sel-h, .time-sel-m {
  border: none; background: transparent;
  font-size: 13px; padding: 2px 0;
  outline: none; font-family: inherit; color: var(--tx2);
  border-radius: var(--r1); cursor: pointer;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  text-align: center;
}
.time-sel-h { width: 30px; }
.time-sel-m { width: 28px; }
.time-sel-h:focus, .time-sel-m:focus {
  background: white; box-shadow: 0 0 0 2px rgba(91,92,246,.28);
}
.time-sel-h:disabled, .time-sel-m:disabled { opacity: .35; cursor: default; }
.memo-input { text-align: left; padding-left: 4px; font-size: 13px; color: var(--tx3); }
.time-input:focus, .num-input:focus, .memo-input:focus {
  background: white; box-shadow: 0 0 0 2px rgba(91,92,246,.28);
}
.time-input:disabled, .num-input:disabled, .memo-input:disabled { opacity: .35; }
/* 분 단위 래퍼 */
.num-wrap {
  display: flex; align-items: center; justify-content: center; gap: 1px;
}
.num-wrap .num-input { width: 36px; flex-shrink: 0; }
.num-unit { font-size: 12px; color: var(--tx3); flex-shrink: 0; }

/* 완료 체크박스 */
.done-check {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--success); vertical-align: middle;
  display: block; margin: auto;
}

/* 근무시간 셀 */
.wh-cell { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.wh-normal { color: var(--tx2); }
.wh-over   { color: var(--danger); }
.wh-under  { color: var(--warning); }
.wh-zero, .wh-annual { color: var(--tx4); font-weight: 500; font-size: 13px; }
.ot-pos  { color: var(--danger); font-weight: 700; }
.ot-neg  { color: var(--info); }
.ot-zero { color: var(--tx4); }

/* ===================================================================
   OVERVIEW
=================================================================== */
.overview-layout { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

/* 멤버 카드 스트립 */
.member-card-strip {
  padding: 12px 18px;
  display: flex; gap: 10px; flex-wrap: nowrap; overflow-x: auto;
  flex-shrink: 0; scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: var(--surf-glass);
  backdrop-filter: blur(16px);
}
.member-card-strip::-webkit-scrollbar { display: none; }

.member-stat-card {
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,.70);
  border-radius: var(--r3);
  padding: 13px 15px;
  min-width: 164px; max-width: 184px;
  flex-shrink: 0;
  box-shadow: var(--sh1);
  transition: all .22s var(--ease);
  cursor: pointer;
}
.member-stat-card.active { border-color: rgba(91,92,246,.50) !important; box-shadow: 0 0 0 3px rgba(91,92,246,.15), var(--sh1) !important; }
.member-stat-card:hover {
  box-shadow: var(--sh2);
  transform: translateY(-2px);
  border-color: rgba(91,92,246,.35);
}

.mcard-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mcard-info .mcard-name { font-size: 15px; font-weight: 700; }
.mcard-info .mcard-dept { font-size: 12px; color: var(--tx3); margin-top: 2px; }

.mcard-stats { display: flex; flex-direction: column; gap: 5px; }
.mcard-row   { display: flex; justify-content: space-between; align-items: center; }
.mcard-lbl   { font-size: 12px; color: var(--tx3); }
.mcard-val   { font-size: 14px; font-weight: 700; }

.mcard-progress-wrap {
  height: 4px; background: var(--border2);
  border-radius: var(--r5); margin-top: 10px; overflow: hidden;
}
.mcard-progress-bar { height: 100%; border-radius: var(--r5); transition: width .4s var(--ease); }
.mcard-pct { font-size: 12px; color: var(--tx3); text-align: right; margin-top: 3px; }

/* 일별 현황 테이블 */
.overview-table-area { flex: 1; overflow: hidden; display: flex; flex-direction: column; padding: 12px 18px 14px; }
.section-label {
  font-size: 11px; font-weight: 700; color: var(--tx3);
  letter-spacing: .6px; text-transform: uppercase;
  margin-bottom: 8px; margin-top: 0; display: flex; align-items: center; gap: 5px;
}
.overview-table-wrap {
  flex: 1; overflow: auto;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  box-shadow: var(--sh0);
}

.overview-table {
  border-collapse: collapse; font-size: 13px; min-width: max-content; width: 100%;
}
.overview-table th {
  background: rgba(244,246,251,.95);
  backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: 11px; color: var(--tx3);
  padding: 7px 7px; text-align: center; white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
  border-right: 1px solid var(--border2);
  position: sticky; top: 0; z-index: 10;
}
.overview-table td {
  border-bottom: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  padding: 5px 7px; text-align: center; white-space: nowrap;
}
.overview-table tr:hover td { background: rgba(91,92,246,.04) !important; }
.overview-table tr:hover .name-td { background: var(--brand-xlight) !important; }

.name-th {
  position: sticky; left: 0; z-index: 20;
  background: rgba(238,242,255,.95) !important;
  color: var(--brand); min-width: 95px; text-align: left !important; padding-left: 10px !important;
}
.name-td {
  position: sticky; left: 0; z-index: 5;
  background: rgba(238,242,255,.90);
  font-weight: 700; font-size: 14px; min-width: 95px;
  display: flex; align-items: center; gap: 6px;
}
.sum-th { background: rgba(235,236,255,.95) !important; color: var(--brand) !important; min-width: 56px; }
.sum-td { font-weight: 700; min-width: 56px; }

.ov-th-wknd { color: var(--tx4) !important; background: rgba(248,250,252,.95) !important; }
.ov-th-sun  { color: #ff3b30 !important; }
.ov-th-sat  { color: #007aff !important; }
.ov-th-hol  { background: rgba(255,59,48,.06) !important; color: #dc2626 !important; }
.ov-th-cmp  { background: rgba(255,149,0,.06) !important; color: #92400e !important; }
.ov-off     { background: rgba(248,249,251,.8) !important; color: #d1d5db; }
.ov-empty   { color: #d1d5db; font-size: 18px; font-weight: 300; }
.ov-done    { background: rgba(52,199,89,.05) !important; }
.ov-badge   { padding: 2px 6px; border-radius: var(--r5); font-size: 12px; font-weight: 700; display: inline-block; }
.ov-normal  { color: var(--tx3); }
.ov-annual  { background: rgba(245,158,11,.15); color: #92400e; }
.ov-halfam  { background: rgba(59,130,246,.13); color: #1e40af; }
.ov-halfpm  { background: rgba(109,40,217,.12); color: #5b21b6; }
.today-dot {
  display: inline-block; width: 5px; height: 5px;
  background: var(--brand); border-radius: 50%;
  vertical-align: middle; margin-right: 1px;
}

/* ===================================================================
   CALENDAR
=================================================================== */
.calendar-layout { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.cal-legend {
  padding: 8px 18px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--surf-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--tx3); }
.legend-dot  { width: 10px; height: 10px; border-radius: 4px; flex-shrink: 0; }

.calendar-scroll { flex: 1; overflow: auto; padding: 14px 18px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.month-card {
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--r3);
  padding: 12px;
  box-shadow: var(--sh1);
  transition: box-shadow .22s, transform .22s;
}
.month-card:hover { box-shadow: var(--sh2); transform: translateY(-1px); }

.month-hdr {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.month-title { font-weight: 800; font-size: 17px; color: var(--brand); }
.month-wd {
  font-size: 11px;
  background: var(--brand-xlight); color: var(--brand);
  padding: 2px 8px; border-radius: var(--r5); font-weight: 700;
}

.cal-wd-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; font-weight: 700;
  color: var(--tx3); margin-bottom: 4px; gap: 1px;
  letter-spacing: .3px;
}
.cal-wd-sun { color: #ff3b30; }
.cal-wd-sat { color: #007aff; }

.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: flex-start; justify-content: center;
  font-size: 13px; border-radius: 8px; position: relative;
  transition: all .15s var(--ease); flex-direction: column;
  padding: 2px 2px 2px 3px; min-height: 32px;
}
.cal-day-num {
  font-size: 12px; font-weight: 600; line-height: 1.4;
  align-self: center;
}
/* 팀원 근태 배지 영역 */
.cal-att-list {
  display: flex; flex-direction: column; gap: 1px; width: 100%; margin-top: 1px;
}
.cal-att-badge {
  font-size: 9px; font-weight: 700; line-height: 1.3;
  padding: 0 3px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
/* 더보기 버튼 */
.cal-more-btn {
  font-size: 9px; font-weight: 700; color: var(--brand);
  cursor: pointer; padding: 1px 4px; border-radius: 4px;
  background: var(--brand-light); line-height: 1.4;
  white-space: nowrap; display: inline-block; margin-top: 1px;
  transition: all .12s;
}
.cal-more-btn:hover { background: var(--brand); color: white; }
/* 접힌 배지 영역 */
.cal-att-hidden {
  flex-direction: column; gap: 1px; width: 100%; margin-top: 1px;
}
.cal-day.cal-sun  { color: #ff3b30; }
.cal-day.cal-sat  { color: #007aff; }
.cal-day.cal-today {
  background: linear-gradient(135deg, #5b5cf6 0%, #6d28d9 100%) !important;
  color: white !important; font-weight: 800;
  box-shadow: 0 3px 10px rgba(91,92,246,.50);
}
.cal-day.cal-holiday    { background: rgba(255,59,48,.10); color: #dc2626 !important; font-weight: 700; }
.cal-day.cal-company    { background: rgba(255,149,0,.12); color: #854d0e !important; font-weight: 700; border: 1px solid rgba(245,158,11,.30); }
.cal-day.cal-substitute { background: rgba(109,40,217,.10); color: #6d28d9 !important; font-weight: 700; border: 1px solid rgba(167,139,250,.30); }
.cal-day[title] { cursor: default; }
.cal-day[title]:hover { transform: scale(1.18); z-index: 5; }
.cal-day[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: 115%; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,46,.90); color: white; font-size: 12px;
  padding: 5px 10px; border-radius: 8px; white-space: nowrap;
  z-index: 100; pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  backdrop-filter: blur(4px);
}

.month-evs { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.month-ev  {
  font-size: 11px; padding: 2px 6px; border-radius: 5px;
  display: flex; align-items: center; gap: 4px; font-weight: 600;
}
.ev-hol { background: rgba(255,59,48,.10); color: #dc2626; }
.ev-hol::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #ff3b30; flex-shrink: 0; }
.ev-cmp { background: rgba(255,149,0,.10); color: #854d0e; border-left: 2px solid #f59e0b; }
.ev-cmp::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; }
.ev-sub { background: rgba(109,40,217,.08); color: #6d28d9; border-left: 2px solid #a78bfa; }
.ev-sub::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #8b5cf6; flex-shrink: 0; }

/* ===================================================================
   MEMBERS
=================================================================== */
.members-layout { flex: 1; overflow: auto; padding: 18px; }
.members-list { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }

.member-row-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--r3);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--sh1);
  transition: all .20s var(--ease);
}
.member-row-card:hover {
  box-shadow: var(--sh2);
  border-color: rgba(91,92,246,.30);
  transform: translateX(2px);
}

.mr-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.mr-info { min-width: 0; }
.mr-name { font-size: 16px; font-weight: 700; color: var(--tx); }
.mr-dept { font-size: 13px; color: var(--tx3); margin-top: 2px; }

.mr-times { display: flex; gap: 6px; flex-shrink: 0; }
.time-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: var(--r2);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border2);
  font-size: 13px; font-weight: 600; color: var(--tx2);
  font-variant-numeric: tabular-nums;
  box-shadow: var(--sh0);
}
.time-chip i { color: var(--tx4); font-size: 12px; }

.mr-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===================================================================
   AVATAR
=================================================================== */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white;
  flex-shrink: 0; letter-spacing: -.5px;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

/* ===================================================================
   MODAL — Glassmorphism card
=================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,20,.50);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r4);
  padding: 0;
  min-width: 360px; max-width: 480px; width: 94%;
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.08);
  animation: slideUp .22s var(--ease-spring);
  overflow: hidden;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 28px 0;
  margin-bottom: 0;
}
.modal-icon-wrap {
  width: 44px; height: 44px; border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.modal-sub   { font-size: 14px; color: var(--tx3); margin-top: 2px; }
.modal-warn  {
  font-size: 14px; color: var(--tx3);
  margin: 14px 0 0; padding: 10px 14px;
  background: rgba(255,149,0,.08);
  border-radius: var(--r2);
  border-left: 3px solid var(--warning);
}

.modal-body { padding: 20px 28px 12px; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--tx3); margin-bottom: 6px; letter-spacing: .3px; text-transform: uppercase;
}
.req { color: var(--danger); }
.form-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 10px 14px; font-size: 15px;
  font-family: inherit; color: var(--tx);
  outline: none; transition: border-color .15s, box-shadow .15s;
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(8px);
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,92,246,.18);
  background: white;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 20px 28px 28px;
  border-top: 1px solid var(--border2);
  margin-top: 8px;
}
/* 모달 내 버튼 최소 크기 보장 (Apple HIG 44pt) */
.modal-footer .btn,
.modal-footer .btn-outline,
.modal-footer .btn-primary,
.modal-footer .btn-danger {
  min-width: 120px;
  min-height: 44px;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--r2);
  justify-content: center;
}

/* ===================================================================
   통합 근태 현황 레이아웃 (좌우 분할)
=================================================================== */
.att-unified-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
  padding: 14px;
  gap: 14px;
  background: var(--bg);
}

/* panel-label 공통 */
.panel-label {
  font-size: 11px; font-weight: 700; color: var(--tx3);
  letter-spacing: .6px; text-transform: uppercase;
  display: flex; align-items: center; gap: 5px;
  padding: 10px 14px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border2);
}

/* 왼쪽: 팀원 카드 리스트 */
.att-left-panel {
  width: 288px;
  flex-shrink: 0;
  border-radius: var(--r3);
  border: 1px solid rgba(255,255,255,.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--sh1);
}
.side-card-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}

/* 팀원 카드 */
.side-member-card {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.70);
  border-radius: var(--r3);
  padding: 11px 13px;
  cursor: pointer;
  transition: all .18s var(--ease);
  box-shadow: var(--sh0);
}
.side-member-card:hover {
  border-color: rgba(91,92,246,.30);
  box-shadow: var(--sh1);
  transform: translateX(2px);
}
.side-member-card.dragging {
  opacity: 0.4;
  transform: scale(0.97);
  border-style: dashed;
}
.side-member-card.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 2px rgba(99,102,241,.20);
}
.side-member-card.active {
  border-color: rgba(91,92,246,.50);
  background: rgba(238,242,255,.85);
  box-shadow: 0 0 0 3px rgba(91,92,246,.12), var(--sh1);
}
.smc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.smc-info .smc-name { font-size: 15px; font-weight: 700; color: var(--tx); }
.smc-info .smc-dept { font-size: 12px; color: var(--tx3); margin-top: 1px; }
.smc-stats { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.smc-row { display: flex; justify-content: space-between; }
.smc-lbl { font-size: 12px; color: var(--tx3); }
.smc-val { font-size: 13px; font-weight: 700; color: var(--tx); }
.smc-val.ot-pos { color: var(--danger); }
.smc-val.ot-neg { color: var(--info); }
.smc-val.ot-zero { color: var(--tx4); }
.smc-footer { }
.smc-progress-bg {
  height: 4px; background: rgba(0,0,0,.06);
  border-radius: var(--r5); overflow: hidden; margin-bottom: 3px;
}
.smc-progress-bar { height: 100%; border-radius: var(--r5); transition: width .4s var(--ease); }
.smc-pct { font-size: 12px; color: var(--tx3); }

/* 오른쪽: 상세 패널 */
.att-right-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r3);
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--sh1);
}

/* ===================================================================
   SCROLLBAR — minimal
=================================================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: var(--r5); }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.25); }

/* ===================================================================
   보상휴가 적립 섹션
=================================================================== */
.comp-accrual-section {
  margin: 12px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(8px);
}
.comp-accrual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(245,243,255,.80);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.comp-accrual-empty {
  padding: 16px;
  color: var(--tx3);
  font-size: 14px;
  text-align: center;
}
.comp-accrual-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.comp-accrual-table th {
  padding: 7px 10px;
  text-align: left;
  font-weight: 700;
  color: var(--tx3);
  background: rgba(244,246,251,.90);
  border-bottom: 1px solid var(--border);
  font-size: 12px; letter-spacing: .3px;
}
.comp-accrual-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border2);
  color: var(--tx);
}
.comp-accrual-table tfoot td {
  background: rgba(244,246,251,.80);
  border-top: 1px solid var(--border);
  border-bottom: none;
  font-weight: 700;
}

/* ── 워크캘린더 뷰 토글 버튼 ─────────────────────────────────── */
.view-toggle {
  display: flex; gap: 2px;
  background: rgba(0,0,0,.06);
  border-radius: var(--r2); padding: 2px;
}
.view-toggle-btn {
  padding: 5px 12px; font-size: 13px; font-weight: 600;
  border: none; border-radius: calc(var(--r2) - 2px);
  background: transparent; color: var(--tx2);
  cursor: pointer; transition: all .18s var(--ease); white-space: nowrap;
}
.view-toggle-btn.active {
  background: white; color: var(--brand);
  box-shadow: 0 1px 5px rgba(0,0,0,.12);
}
.view-toggle-btn:not(.active):hover { background: rgba(255,255,255,.50); color: var(--brand); }

/* ── 월별 뷰 ─────────────────────────────────────────────────── */
.calendar-grid-month {
  display: flex; flex-direction: column;
  max-width: 900px; margin: 0 auto;
}
.month-card-lg {
  box-shadow: var(--sh2);
}
.cal-days-lg {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-day-lg {
  aspect-ratio: unset !important;
  min-height: 90px;
  align-items: flex-start !important;
  padding: 6px 6px 4px !important;
}
.cal-day-lg .cal-day-num {
  font-size: 14px !important;
  margin-bottom: 4px;
}
.cal-day-lg .cal-att-badge {
  font-size: 11px !important;
  padding: 1px 5px !important;
}

/* ================================================================
   RESPONSIVE LAYOUT — Mobile / Tablet
================================================================ */

/* ── 태블릿 (≤1024px) ── */
@media (max-width: 1024px) {
  /* 근태 통합 레이아웃: 왼쪽 패널 축소 */
  .att-unified-layout { padding: 10px; gap: 10px; }
  .att-left-panel { width: 240px; }

  /* 캘린더 6열 → 4열 */
  .calendar-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }

  /* overview 카드 스트립 */
  .member-card-strip { padding: 10px 14px; }
  .member-stat-card { min-width: 150px; max-width: 170px; }

  /* 탭 버튼 패딩 축소 */
  .tab-btn { padding: 0 12px; font-size: 13px; }
}

/* ── 모바일 (≤768px) ── */
@media (max-width: 768px) {
  html, body { height: 100%; overflow: auto; }
  #root, #app-shell { height: auto; min-height: 100vh; overflow: visible; }

  /* 헤더 */
  .app-header { height: 50px; padding: 0 14px; gap: 8px; }
  .title { font-size: 14px; }
  .logo-icon { width: 28px; height: 28px; font-size: 14px; }

  /* 탭 바 */
  .tab-bar { padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 0 10px; font-size: 12px; height: 38px; white-space: nowrap; flex-shrink: 0; }
  .tab-icon { display: none; }

  /* 컨트롤 바 */
  .ctrl-bar { padding: 6px 12px; gap: 6px; min-height: 42px; }
  .ctrl-sep { display: none; }

  /* 근태 입력 — 좌우 패널 → 세로 스택 */
  .att-unified-layout {
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    height: auto;
    overflow: visible;
  }
  .att-left-panel {
    width: 100%;
    max-height: 200px;
    flex-shrink: 0;
  }
  .side-card-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 8px;
  }
  .side-member-card {
    min-width: 160px;
    flex-shrink: 0;
  }
  .smc-stats, .smc-footer { display: none; }
  .att-right-panel {
    flex: unset;
    min-height: 60vh;
  }

  /* 요약 바 */
  .summary-bar { padding: 6px 10px; gap: 4px; }
  .summary-item { padding: 5px 10px; min-width: 80px; }
  .summary-label { font-size: 10px; }
  .summary-value { font-size: 13px; }

  /* 근태 테이블 */
  .att-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .att-table { min-width: 700px; }

  /* 개요 탭 */
  .overview-layout { height: auto; overflow: visible; }
  .member-card-strip {
    padding: 8px 12px;
    gap: 8px;
  }
  .member-stat-card { min-width: 140px; max-width: 160px; padding: 10px 12px; }
  .mcard-stats { display: none; }
  .overview-table-area { padding: 8px 12px 10px; }

  /* 캘린더 */
  .calendar-scroll { padding: 10px 12px; }
  .calendar-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cal-legend { padding: 6px 12px; gap: 10px; flex-wrap: wrap; }

  /* 팀원 관리 */
  .members-layout { padding: 12px; }
  .members-list { max-width: 100%; }
  .member-row-card { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .mr-times { display: none; }

  /* 모달 */
  .modal-box { min-width: unset; max-width: 100%; width: 96%; margin: 0 2%; border-radius: var(--r3); }
  .modal-header { padding: 20px 20px 0; }
  .modal-body { padding: 16px 20px 8px; }
  .modal-footer { padding: 16px 20px 20px; }
  .modal-footer .btn,
  .modal-footer .btn-outline,
  .modal-footer .btn-primary,
  .modal-footer .btn-danger { min-width: 0; flex: 1; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* 월별 캘린더 뷰 */
  .calendar-grid-month { max-width: 100%; }
  .cal-day-lg { min-height: 60px; }
}

/* ── 소형 모바일 (≤480px) ── */
@media (max-width: 480px) {
  .calendar-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .att-table { min-width: 640px; }
}



/* ===================================================================
   팀 선택 페이지
   =================================================================== */
.team-select-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.ts-header {
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
  padding: 48px 24px 36px;
  text-align: center;
  color: white;
}
.ts-logo {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.18);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.28);
}
.ts-title {
  font-size: 24px; font-weight: 800;
  letter-spacing: -.5px; margin-bottom: 6px;
}
.ts-sub {
  font-size: 14px; opacity: .78; font-weight: 400;
}
.ts-body {
  flex: 1; padding: 28px 20px 16px;
  max-width: 680px; width: 100%; margin: 0 auto;
  box-sizing: border-box;
}
.ts-grid {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px;
}
.ts-loading, .ts-empty {
  text-align: center; padding: 40px 20px;
  color: var(--tx3); font-size: 14px;
}
.ts-empty i { font-size: 32px; margin-bottom: 12px; display: block; opacity: .4; }
.ts-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow .18s, transform .18s;
  position: relative;
}
.ts-card:hover {
  box-shadow: var(--shadow2);
  transform: translateY(-1px);
}
.ts-card-icon {
  width: 44px; height: 44px; border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; flex-shrink: 0;
}
.ts-card-info { flex: 1; min-width: 0; }
.ts-card-name { font-size: 16px; font-weight: 700; color: var(--tx); }
.ts-card-desc { font-size: 13px; color: var(--tx3); margin-top: 2px; }
.ts-card-actions {
  display: flex; gap: 4px; align-items: center; flex-shrink: 0;
}
.ts-edit-btn, .ts-del-btn {
  width: 30px; height: 30px;
  border: none; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
  transition: background .15s, color .15s;
  background: transparent; color: var(--tx3);
}
.ts-edit-btn:hover { background: rgba(91,92,246,.10); color: var(--brand); }
.ts-del-btn:hover  { background: rgba(255,59,48,.10);  color: var(--danger); }
.ts-card-arrow {
  color: var(--tx4); font-size: 13px; flex-shrink: 0; margin-left: 4px;
}
.ts-actions { text-align: center; padding-top: 4px; }
.ts-add-btn {
  min-width: 140px;
}
.ts-footer {
  padding: 12px 20px 20px;
  display: flex; justify-content: center;
}
.ts-dark-btn {
  width: 36px; height: 36px;
  background: var(--surf2); border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--tx3); font-size: 15px;
  transition: background .15s;
}
.ts-dark-btn:hover { background: var(--bg2); }

/* 헤더 뒤로가기 버튼 */
.back-btn {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  color: white;
  width: 30px; height: 30px;
  border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
  margin-right: 2px; flex-shrink: 0;
  transition: background .15s;
}
.back-btn:hover { background: rgba(255,255,255,.32); }

/* 컬러 칩 선택 */
.color-chip.selected {
  border-color: var(--tx) !important;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
  transform: scale(1.15);
}

/* 다크모드 팀 선택 */
html[data-theme="dark"] .ts-card {
  background: var(--surface);
  border-color: var(--border);
}
html[data-theme="dark"] .ts-header {
  background: linear-gradient(135deg, #3730a3 0%, #5b21b6 55%, #6d28d9 100%);
}

/* 팀 카드 - 팀원 수 표시 */
.ts-card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 3px; flex-wrap: wrap;
}
.ts-member-count {
  font-size: 12px; font-weight: 600;
  color: var(--tx3);
  display: flex; align-items: center; gap: 4px;
}
.ts-member-count i { font-size: 11px; opacity: .7; }
.ts-card-desc {
  font-size: 12px; color: var(--tx4);
}

/* ===================================================================
   워크캘린더 일정 관리 모달
   =================================================================== */
.cal-ev-list {
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  margin-bottom: 16px;
  max-height: 260px;
  overflow-y: auto;
}
.cal-ev-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border2);
  font-size: 13px;
}
.cal-ev-row:last-child { border-bottom: none; }
.cal-ev-row:hover { background: var(--surf2); }
.cal-ev-date { font-weight: 600; color: var(--tx2); min-width: 90px; font-variant-numeric: tabular-nums; }
.cal-ev-type {
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: var(--r5);
  flex-shrink: 0;
}
.cal-ev-type.ev-company  { background: #fef9c3; color: #854d0e; }
.cal-ev-type.ev-hol      { background: #fee2e2; color: #991b1b; }
.cal-ev-type.ev-sub      { background: #f3e8ff; color: #6b21a8; }
.cal-ev-name { flex: 1; color: var(--tx2); }
.cal-ev-del {
  width: 24px; height: 24px; border: none; background: transparent;
  color: var(--tx4); border-radius: var(--r1); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  flex-shrink: 0; transition: background .12s, color .12s;
}
.cal-ev-del:hover { background: rgba(255,59,48,.10); color: var(--danger); }
.cal-ev-empty {
  padding: 24px; text-align: center;
  color: var(--tx4); font-size: 13px;
}
.cal-ev-add-form {
  padding-top: 4px;
}

/* ── PIN 모달 ── */
.pin-modal .modal-sub { font-size:13px; color:var(--tx3); margin-top:2px; }
.pin-input-wrap { display:flex; flex-direction:column; gap:8px; }
.pin-input { font-size:18px; letter-spacing:4px; text-align:center; }
.pin-error { font-size:12px; color:var(--danger); margin-top:4px; padding:6px 8px; background:rgba(239,68,68,.07); border-radius:6px; }

/* ── 팀 선택 footer 관리자 버튼 ── */
.ts-footer { display:flex; gap:8px; justify-content:flex-end; padding:16px 24px; }
.ts-admin-btn { color:var(--tx3); }
.ts-admin-btn:hover { background:rgba(239,68,68,.08); color:#ef4444; }

/* ── 관리자 페이지 ── */
.admin-page { min-height:100vh; background:var(--bg1); display:flex; flex-direction:column; }
.admin-header {
  display:flex; align-items:center; gap:12px;
  padding:16px 20px; border-bottom:1px solid var(--border);
  background:var(--bg2); position:sticky; top:0; z-index:10;
}
.admin-back-btn { color:var(--tx2); }
.admin-header-info { flex:1; }
.admin-title { font-size:16px; font-weight:700; color:var(--tx1); display:flex; align-items:center; gap:6px; }
.admin-title i { color:#ef4444; }
.admin-sub { font-size:12px; color:var(--tx3); margin-top:1px; }
.admin-logout-btn { font-size:12px; }
.admin-body { padding:20px; display:flex; flex-direction:column; gap:20px; max-width:600px; width:100%; margin:0 auto; }
.admin-section {
  background:var(--bg2); border:1px solid var(--border);
  border-radius:12px; padding:20px; display:flex; flex-direction:column; gap:12px;
}
.admin-section-title { font-size:14px; font-weight:700; color:var(--tx1); display:flex; align-items:center; gap:7px; }
.admin-section-title i { color:#5b5cf6; }
.admin-section-desc { font-size:12px; color:var(--tx3); line-height:1.5; margin:0; }

/* PIN 행 */
.admin-pin-row {
  display:flex; flex-direction:column; gap:8px;
  padding:12px 0; border-bottom:1px solid var(--border);
}
.admin-pin-row:last-child { border-bottom:none; padding-bottom:0; }
.admin-pin-team { display:flex; align-items:center; gap:8px; }
.admin-pin-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.admin-pin-name { font-size:14px; font-weight:600; color:var(--tx1); }
.admin-pin-status { font-size:11px; padding:2px 7px; border-radius:10px; margin-left:auto; display:flex; align-items:center; gap:4px; }
.admin-pin-status.locked { background:rgba(239,68,68,.1); color:#ef4444; }
.admin-pin-status.unlocked { background:rgba(16,185,129,.1); color:#10b981; }
.admin-pin-controls { display:flex; gap:8px; }
.admin-pin-input { flex:1; font-size:14px; }

/* 비밀번호 변경 폼 */
.admin-pw-form { display:flex; flex-direction:column; gap:8px; }
.admin-pw-form .btn { align-self:flex-end; }

/* ── 관리자 팀 관리 행 ── */
.admin-section-title-row { display:flex; align-items:center; justify-content:space-between; }
.admin-team-row {
  display:flex; flex-direction:column; gap:8px;
  padding:12px 0; border-bottom:1px solid var(--border);
}
.admin-team-row:last-child { border-bottom:none; padding-bottom:0; }
.admin-team-top { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.admin-team-count { font-size:11px; color:var(--tx3); display:flex; align-items:center; gap:3px; }
.admin-team-btns { margin-left:auto; display:flex; gap:6px; }
.btn-danger { background:rgba(239,68,68,.1); color:#ef4444; border:1px solid rgba(239,68,68,.2); }
.btn-danger:hover { background:rgba(239,68,68,.18); }
/* ts-actions 제거로 인한 ts-body 패딩 조정 */
.ts-body { padding-bottom: 8px; }

/* ── 관리자 팀 PIN 행 ── */
.admin-team-pin-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.admin-team-pin-row .admin-pin-input { flex:1; min-width:120px; max-width:200px; }
.admin-team-name { font-size:14px; font-weight:600; color:var(--tx1); }

/* ── 관리자 팀원 행 ── */
.admin-member-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 0; border-bottom:1px solid var(--border); gap:8px; flex-wrap:wrap;
}
.admin-member-row:last-child { border-bottom:none; padding-bottom:0; }
.admin-member-info { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.admin-member-avatar {
  width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:14px; font-weight:700; flex-shrink:0;
}
.admin-member-name { font-size:13px; font-weight:600; color:var(--tx1); }
.admin-member-dept { font-size:11px; color:var(--tx3); margin-top:2px; }
.admin-member-btns { display:flex; gap:6px; flex-shrink:0; }
.admin-team-sel { max-width:260px; margin-bottom:10px; }
