/* ===================================================
   팀장 대시보드 스타일  — LOTTE PD WIKI
   =================================================== */

/* ===== CSS 변수 ===== */
:root {
  --red:          #e8192c;
  --red-dark:     #b8101f;
  --red-light:    #ffeaec;
  --blue:         #1a56e8;
  --blue-light:   #e8f0fe;
  --green:        #16a34a;
  --green-light:  #dcfce7;
  --orange:       #ea580c;
  --orange-light: #fff7ed;
  --yellow:       #ca8a04;
  --purple:       #7c3aed;
  --purple-light: #f5f3ff;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --white:     #ffffff;
  --shadow:    0 2px 8px rgba(0,0,0,.10);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.14);
  --radius:    10px;
  --radius-sm: 6px;
  --radius-xs: 4px;
}

/* ===== 리셋 & 베이스 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
}
/* 로그인 전: 본문 숨김 */
body.login-required .db-header,
body.login-required .db-main,
body.login-required .db-footer,
body.login-required #dbTooltip {
  visibility: hidden;
  pointer-events: none;
}
body.login-required.logged-in .db-header,
body.login-required.logged-in .db-main,
body.login-required.logged-in .db-footer,
body.login-required.logged-in #dbTooltip {
  visibility: visible;
  pointer-events: auto;
}
.hidden { display: none !important; }

/* =====================================================
   로그인 오버레이
   ===================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0f0c1a 0%, #1a1a2e 40%, #2d0a12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: loginFadeIn .35s ease;
}
.login-overlay.hidden {
  display: none !important;
}

@keyframes loginFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes loginCardUp {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 카드 */
.login-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.50), 0 0 0 1px rgba(255,255,255,.06);
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 400px;
  animation: loginCardUp .4s cubic-bezier(.22,1,.36,1);
}

/* 로고 영역 */
.login-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}
.login-logo {
  height: 28px;
  opacity: .9;
}
.login-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.login-brand-main {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--gray-800);
  letter-spacing: -.02em;
}
.login-brand-sub {
  font-size: .72rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* 구분선 */
.login-divider {
  height: 1.5px;
  background: linear-gradient(90deg, var(--red) 0%, transparent 100%);
  margin: 20px 0 24px;
  border-radius: 99px;
  opacity: .5;
}

/* 폼 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 5px;
}
.login-label i { color: var(--red); font-size: .72rem; }
.login-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.login-input:focus {
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(232,25,44,.10);
}
.login-input::placeholder { color: var(--gray-300); }

/* 비밀번호 래퍼 */
.login-pw-wrap {
  position: relative;
}
.login-pw-wrap .login-input {
  padding-right: 44px;
}
.login-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: .9rem;
  padding: 4px;
  transition: color .15s;
}
.login-pw-toggle:hover { color: var(--gray-700); }

/* 에러 메시지 */
.login-error {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--red-light);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: .8rem;
  color: #b91c1c;
  font-weight: 600;
  animation: loginFadeIn .2s ease;
}
.login-error i { font-size: .82rem; flex-shrink: 0; color: var(--red); }

/* 로그인 버튼 */
.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .18s ease;
  box-shadow: 0 4px 16px rgba(232,25,44,.30);
  margin-top: 4px;
}
.login-btn:hover {
  background: linear-gradient(135deg, #900c18 0%, var(--red-dark) 100%);
  box-shadow: 0 6px 20px rgba(232,25,44,.40);
  transform: translateY(-1px);
}
.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(232,25,44,.25);
}
.login-btn.loading {
  opacity: .75;
  pointer-events: none;
}

/* 하단 안내 */
.login-notice {
  margin-top: 20px;
  text-align: center;
  font-size: .72rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.login-notice i { color: var(--gray-300); font-size: .68rem; }

/* ===== 로그아웃 버튼 ===== */
.db-btn-logout {
  background: rgba(255,255,255,.10);
  border: 1.5px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
}
.db-btn-logout:hover {
  background: rgba(232,25,44,.35);
  border-color: rgba(255,255,255,.45);
  color: var(--white);
}

/* ===== 반응형 (로그인 카드) ===== */
@media (max-width: 480px) {
  .login-card {
    padding: 28px 22px 24px;
    border-radius: 16px;
  }
  .login-brand-main { font-size: 1rem; }
}

/* ===== HEADER ===== */
.db-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #b8101f 60%, var(--red-dark) 100%);
  color: var(--white);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(232,25,44,.35);
}
.db-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  gap: 16px;
}
.db-header-left  { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.db-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.db-logo { height: 26px; filter: brightness(0) invert(1); opacity: .9; flex-shrink: 0; }
.db-header-divider { width: 1px; height: 32px; background: rgba(255,255,255,.3); flex-shrink: 0; }
.db-header-texts { min-width: 0; }
.db-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-accent { color: #ffd700; }
.db-sub { font-size: .7rem; opacity: .72; display: block; margin-top: 2px; white-space: nowrap; }

/* 주간 선택기 */
.db-week-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  border-radius: 24px;
  padding: 4px 10px;
  white-space: nowrap;
}
.db-week-btn {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: .9rem;
  padding: 3px 6px;
  border-radius: 50%;
  transition: background .15s;
  line-height: 1;
}
.db-week-btn:hover { background: rgba(255,255,255,.25); }
.db-week-label {
  font-size: .82rem;
  font-weight: 600;
  min-width: 140px;
  text-align: center;
}

/* 버튼 */
.db-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.db-btn-outline {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.4);
  color: var(--white);
}
.db-btn-outline:hover { background: rgba(255,255,255,.28); }
.db-btn-ghost {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.85);
}
.db-btn-ghost:hover { background: rgba(255,255,255,.18); }

/* ===== MAIN ===== */
.db-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 팀 탭 ===== */
.db-team-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.db-team-tabs::-webkit-scrollbar { height: 0; }
.db-team-tab {
  flex: 1;
  min-width: 80px;
  padding: 9px 14px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-500);
  transition: all .15s;
  white-space: nowrap;
}
.db-team-tab:hover { background: var(--gray-100); color: var(--gray-800); }
.db-team-tab.active { background: var(--red); color: var(--white); box-shadow: 0 2px 8px rgba(232,25,44,.30); }

/* ===== 요약 카드 바 ===== */
.db-summary-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.db-summary-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--gray-200);
  transition: box-shadow .15s, transform .15s;
}
.db-summary-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.db-summary-card > i { font-size: 1.4rem; color: var(--gray-400); flex-shrink: 0; }
.db-summary-card.warn   { border-left-color: var(--orange); }
.db-summary-card.warn > i { color: var(--orange); }
.db-summary-card.danger { border-left-color: var(--red); }
.db-summary-card.danger > i { color: var(--red); }
.db-summary-card.info   { border-left-color: var(--blue); }
.db-summary-card.info > i  { color: var(--blue); }
.db-summary-card.success { border-left-color: var(--green); }
.db-summary-card.success > i { color: var(--green); }
.db-summary-label { font-size: .68rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.db-summary-val { font-size: 1.25rem; font-weight: 800; color: var(--gray-800); margin-top: 3px; line-height: 1.2; }

/* ===== 로딩 / 빈 상태 ===== */
.db-loading {
  text-align: center;
  padding: 64px 20px;
  color: var(--gray-400);
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.db-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.db-empty i { font-size: 3rem; margin-bottom: 16px; display: block; opacity: .5; }
.db-empty p { font-size: .95rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-600); }
.db-empty span { font-size: .82rem; }

/* ===== 섹션 공통 ===== */
.db-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.db-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1.5px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 8px;
  background: var(--gray-50);
}
.db-section-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 7px;
}
.db-section-desc { font-size: .74rem; color: var(--gray-400); }
.db-section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.db-search {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: .8rem;
  font-family: inherit;
  outline: none;
  width: 160px;
  transition: border-color .15s;
  background: var(--white);
}
.db-search:focus { border-color: var(--red); }
.db-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: .8rem;
  font-family: inherit;
  outline: none;
  background: var(--white);
  cursor: pointer;
}

/* ===== 팀원별 테이블 ===== */
.db-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
  min-width: 860px;
}
.db-table th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: .68rem;
  font-weight: 700;
  padding: 9px 10px;
  text-align: center;
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
  letter-spacing: .02em;
}
.db-table th:first-child { text-align: left; padding-left: 16px; }
.db-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
  vertical-align: middle;
}
.db-table td:first-child { text-align: left; padding-left: 16px; }
.db-table tr:last-child td { border-bottom: none; }
.db-table tbody tr:hover td { background: #f8faff; }
.db-table tr.row-risk52 td { background: #fff5f5; }
.db-table tr.row-conflict td { background: #fffbeb; }

/* 이름 셀 */
.db-member-name {
  font-weight: 700;
  color: var(--gray-800);
  font-size: .85rem;
}
.db-flex-badge {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: .64rem;
  font-weight: 600;
  margin-top: 2px;
}

/* 요일 셀 */
.db-day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 54px;
}
.db-day-times {
  font-size: .68rem;
  color: var(--gray-500);
  line-height: 1.5;
}
.db-day-mins {
  font-size: .68rem;
  font-weight: 700;
  color: var(--green);
}
.db-day-mins.warn   { color: var(--orange); }
.db-day-mins.danger { color: var(--red); }
.db-day-rest { color: var(--gray-300); font-size: .8rem; }

/* 방송 칩 */
.db-bcast-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin-bottom: 2px;
}
.db-bcast-chip {
  background: var(--blue-light);
  color: #1d4ed8;
  border-radius: var(--radius-xs);
  padding: 1px 5px;
  font-size: .62rem;
  font-weight: 700;
  white-space: nowrap;
}
.db-bcast-chip.am    { background: var(--orange-light); color: var(--orange); }
.db-bcast-chip.night { background: var(--purple-light); color: var(--purple); }
.db-bcast-chip.conflict { background: #fee2e2; color: #dc2626; outline: 1px solid #fca5a5; }

/* 총 근무 셀 */
.db-total-mins {
  font-size: .88rem;
  font-weight: 800;
  color: var(--gray-700);
  white-space: nowrap;
}
.db-total-mins.ok     { color: var(--green); }
.db-total-mins.warn   { color: var(--orange); }
.db-total-mins.danger { color: var(--red); }

/* 초과 셀 */
.db-overtime { font-size: .8rem; font-weight: 700; color: var(--gray-400); }
.db-overtime.active { color: var(--orange); }
.db-overtime.danger { color: var(--red); }

/* 상태 배지 */
.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.db-status-badge.submitted { background: var(--green-light);  color: var(--green); }
.db-status-badge.conflict  { background: var(--orange-light); color: var(--orange); }
.db-status-badge.risk52    { background: var(--red-light);    color: var(--red); }
.db-status-badge.none      { background: var(--gray-100);     color: var(--gray-400); }

/* ===== 일별 타임라인 ===== */
.db-timeline-wrap {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.db-timeline-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 680px;
}
.db-timeline-day-label {
  width: 56px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 10px;
}
.db-timeline-day-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gray-700);
}
.db-timeline-day-date {
  font-size: .64rem;
  color: var(--gray-400);
  margin-top: 1px;
}
.db-timeline-day-name.sat { color: var(--blue); }
.db-timeline-day-name.sun { color: var(--red); }

/* 타임라인 바 영역 */
.db-timeline-bar-area {
  flex: 1;
  position: relative;
  height: 56px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  min-width: 0;
}

/* 시간 눈금 */
.db-timeline-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gray-200);
}
.db-timeline-tick-label {
  position: absolute;
  bottom: 2px;
  font-size: .58rem;
  color: var(--gray-400);
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1;
}

/* 개인 근무 블록 */
.db-tl-block {
  position: absolute;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .15s, transform .15s;
  min-width: 3px;
  z-index: 2;
}
.db-tl-block:hover {
  filter: brightness(1.15);
  z-index: 10;
}
.db-tl-block .db-tl-name {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 3px;
}
/* 2차 출근(야간) 타임라인 블록 */
.db-tl-block-night {
  border: 2px solid rgba(255,255,255,.5);
  background: #7c3aed !important;
  opacity: .78 !important;
  z-index: 3;
}

/* 방송 마커 */
.db-tl-bcast {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255,255,255,.65);
  border-radius: 2px;
  z-index: 5;
  pointer-events: none;
}
.db-tl-bcast.conflict-bcast {
  background: #ff3b3b;
  width: 4px;
  box-shadow: 0 0 5px rgba(255,59,59,.8);
}

/* ===== 근무 시간 현황 바 ===== */
.db-risk-list {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.db-risk-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.db-risk-name {
  width: 72px;
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-risk-bar-wrap {
  flex: 1;
  height: 22px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.db-risk-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: .66rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  min-width: 4px;
}
.db-risk-bar.ok     { background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%); }
.db-risk-bar.warn   { background: linear-gradient(90deg, #ea580c 0%, #fb923c 100%); }
.db-risk-bar.danger { background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%); }

/* 40h 기준선 */
.db-risk-bar-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(40 / 52 * 100%);
  width: 2px;
  background: rgba(0,0,0,.18);
  border-radius: 1px;
  z-index: 2;
}
.db-risk-val {
  width: 72px;
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.db-risk-val.ok     { color: var(--green); }
.db-risk-val.warn   { color: var(--orange); }
.db-risk-val.danger { color: var(--red); }

/* 범례 */
.db-risk-legend {
  display: flex;
  gap: 16px;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--gray-100);
  justify-content: flex-end;
  flex-wrap: wrap;
}
.db-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  color: var(--gray-500);
}
.db-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== TOOLTIP ===== */
.db-tooltip {
  position: fixed;
  background: var(--gray-800);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .76rem;
  line-height: 1.65;
  pointer-events: none;
  z-index: 9999;
  max-width: 260px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.08);
}

/* ===== FOOTER ===== */
.db-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.45);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: .72rem;
  flex-wrap: wrap;
  text-align: center;
}
.db-footer-div { opacity: .25; }

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
  .db-summary-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .db-summary-bar { grid-template-columns: repeat(2, 1fr); }
  .db-main { padding: 14px 14px 48px; gap: 12px; }
}
@media (max-width: 720px) {
  .db-header { height: auto; padding: 10px 14px; }
  .db-header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .db-header-right { width: 100%; flex-wrap: wrap; gap: 6px; }
  .db-header-left  { gap: 8px; }
  .db-logo { height: 20px; }
  .db-title { font-size: 1rem; }
  .db-sub { display: none; }
  .db-week-label { min-width: 0; font-size: .75rem; }
  .db-summary-bar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .db-summary-card { padding: 10px 12px; gap: 8px; }
  .db-summary-card > i { font-size: 1.1rem; }
  .db-summary-val { font-size: 1.1rem; }
  .db-main { padding: 10px 10px 40px; }
  .db-section-header { padding: 10px 12px; }
  .db-risk-list { padding: 12px 12px; }
  .db-timeline-wrap { padding: 12px 12px; }
}
@media (max-width: 480px) {
  .db-summary-bar { grid-template-columns: 1fr 1fr; }
  .db-team-tab { font-size: .75rem; padding: 8px 8px; min-width: 64px; }
  .db-btn { font-size: .72rem; padding: 5px 9px; }
  .db-week-label { min-width: 0; }
}

/* ===== 백업 & 복원 섹션 ===== */
.db-backup-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.db-backup-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 18px;
  flex-wrap: wrap;
  transition: box-shadow .15s;
}
.db-backup-card:hover { box-shadow: var(--shadow-md); }
.db-backup-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.db-backup-info { flex: 1; min-width: 180px; }
.db-backup-title { font-size: .88rem; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.db-backup-desc  { font-size: .76rem; color: var(--gray-500); line-height: 1.6; }
.db-backup-desc code {
  background: var(--gray-200); border-radius: 4px;
  padding: 1px 5px; font-size: .72rem; font-family: 'Consolas', monospace; color: var(--gray-700);
}
.db-backup-warn { color: var(--orange); font-size: .73rem; display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; }

/* 백업/복원 버튼 */
.db-btn-backup         { background: var(--green);  color: var(--white); border: none; flex-shrink: 0; }
.db-btn-backup:hover   { background: #15803d; }
.db-btn-backup-outline { background: var(--white); color: var(--blue); border: 1.5px solid var(--blue); flex-shrink: 0; }
.db-btn-backup-outline:hover { background: var(--blue-light); }
.db-btn-restore        { background: var(--orange); color: var(--white); border: none; flex-shrink: 0; cursor: pointer; }
.db-btn-restore:hover  { background: #c2410c; }

/* 복원 진행 상태 */
.db-restore-status {
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  animation: loginFadeIn .2s ease;
}
.db-restore-status.success { background: var(--green-light);  color: var(--green);  border: 1px solid #86efac; }
.db-restore-status.warn    { background: var(--orange-light); color: var(--orange); border: 1px solid #fdba74; }
.db-restore-status.error   { background: var(--red-light);    color: var(--red);    border: 1px solid #fca5a5; }

/* ===== 복원 확인 모달 ===== */
.db-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: loginFadeIn .2s ease;
}
.db-confirm-box {
  background: var(--white); border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 24px;
  max-width: 380px; width: 100%;
  text-align: center;
  animation: loginCardUp .3s cubic-bezier(.22,1,.36,1);
}
.db-confirm-icon  { font-size: 2.4rem; color: var(--orange); margin-bottom: 12px; }
.db-confirm-title { font-size: 1rem; font-weight: 800; color: var(--gray-800); margin-bottom: 10px; }
.db-confirm-msg   { font-size: .82rem; color: var(--gray-600); line-height: 1.75; white-space: pre-line; margin-bottom: 20px; }
.db-confirm-btns  { display: flex; gap: 10px; }
.db-btn-confirm-ok     { flex:1; background:var(--orange); color:var(--white); border:none; padding:10px; font-size:.88rem; justify-content:center; }
.db-btn-confirm-ok:hover { background: #c2410c; }
.db-btn-confirm-cancel { flex:1; background:var(--gray-100); color:var(--gray-700); border:1.5px solid var(--gray-200); padding:10px; font-size:.88rem; justify-content:center; }
.db-btn-confirm-cancel:hover { background: var(--gray-200); }

/* ===== 대시보드 토스트 ===== */
.db-toast-msg {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--gray-800); color: var(--white);
  padding: 11px 22px; border-radius: 99px;
  font-size: .85rem; font-weight: 600;
  z-index: 9998; box-shadow: var(--shadow-lg);
  white-space: nowrap; animation: loginFadeIn .2s ease;
}
.db-toast-msg.success { background: var(--green); }
.db-toast-msg.warn    { background: var(--orange); }
.db-toast-msg.error   { background: var(--red); }

@media (max-width: 600px) {
  .db-backup-card { gap: 10px; }
  .db-btn-backup, .db-btn-backup-outline, .db-btn-restore {
    width: 100%; justify-content: center;
  }
}

/* ===== 대시보드 주간 캘린더 픽커 ===== */
.db-week-picker-panel {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  padding: 14px 12px 10px;
  width: 240px;
  font-family: inherit;
  user-select: none;
}
.db-week-label-clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 3px 8px;
  transition: background .15s;
}
.db-week-label-clickable:hover {
  background: rgba(255,255,255,.22);
}

/* wpp-* 공용 스타일 (대시보드용) */
.db-week-picker-panel .wpp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; gap: 4px;
}
.db-week-picker-panel .wpp-title {
  font-size: .88rem; font-weight: 700; color: #1f2937; flex: 1; text-align: center;
}
.db-week-picker-panel .wpp-nav {
  background: none; border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 4px 9px; cursor: pointer; color: #6b7280;
  font-size: .78rem; transition: all .12s; font-family: inherit; line-height: 1;
}
.db-week-picker-panel .wpp-nav:hover {
  background: #f1f5f9; border-color: #94a3b8; color: #1f2937;
}
.db-week-picker-panel .wpp-daynames {
  display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 3px;
}
.db-week-picker-panel .wpp-daynames span {
  font-size: .68rem; font-weight: 700; color: #9ca3af; padding: 3px 0;
}
.db-week-picker-panel .wpp-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.db-week-picker-panel .wpp-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 500; color: #374151;
  border-radius: 7px; cursor: pointer; transition: all .12s;
  border: 1.5px solid transparent; min-height: 28px;
}
.db-week-picker-panel .wpp-cell:hover:not(.empty) {
  background: #f1f5f9; border-color: #cbd5e1;
}
.db-week-picker-panel .wpp-cell.mon {
  font-weight: 700; color: #1d4ed8;
}
.db-week-picker-panel .wpp-cell.selected-week {
  background: #1d4ed8; color: #fff !important; border-color: #1d4ed8; font-weight: 700;
}
.db-week-picker-panel .wpp-cell.selected-week:hover {
  background: #1e40af; border-color: #1e40af;
}
.db-week-picker-panel .wpp-cell.empty {
  cursor: default; pointer-events: none;
}

/* ===== 삭제 버튼 ===== */
.db-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1.5px solid #fecaca;
  background: #fff5f5;
  color: #dc2626;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.db-btn-delete:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* ===== 반차/반반차/공휴일 배지 (대시보드 테이블용) ===== */
.db-leave-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 3px;
  line-height: 1.3;
  white-space: nowrap;
}
.db-leave-badge.holiday        { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.db-leave-badge.half-am        { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.db-leave-badge.half-pm        { background: #e0e7ff; color: #4338ca; border: 1px solid #a5b4fc; }
.db-leave-badge.halfhalf-am    { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.db-leave-badge.halfhalf-pm    { background: #f0fdf4; color: #166534; border: 1px solid #6ee7b7; }
/* ★ 2차 출근 배지 */
.db-leave-badge.second-shift   { background: #f5f3ff; color: #6d28d9; border: 1px solid #c4b5fd; }

/* ★ 대시보드 테이블 — 2차 출근 시간 표시 */
.db-day-ss-time {
  font-size: .64rem;
  color: #7c3aed;
  margin-top: 2px;
  line-height: 1.3;
  font-weight: 600;
}

/* ★ 2차 출근: 1차/2차 출퇴근 2줄 분리 표시 */
.db-day-times-split {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .65rem;
  line-height: 1.4;
  margin-top: 2px;
}
.db-day-shift-row {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  color: var(--gray-600);
}
.db-shift-label {
  font-size: .58rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.3;
  flex-shrink: 0;
}
.db-shift-label.day   { background: #fef9c3; color: #92400e; }
.db-shift-label.night { background: #f5f3ff; color: #5b21b6; }
