@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* --- 1. 글로벌 테마 및 변수 정의 --- */
:root {
  --font-primary: 'Outfit', 'Noto Sans KR', sans-serif;
  
  /* HSL 컬러 팔레트 (Eflip WorkMate 브랜드 아이덴티티에 맞춘 에메랄드/다크 포레스트 그린 테마) */
  --bg-main: hsl(168, 30%, 6%);
  --bg-card: rgba(12, 24, 21, 0.65);
  --bg-card-hover: rgba(18, 38, 33, 0.8);
  --bg-modal: rgba(8, 20, 16, 0.96);
  --border-color: rgba(16, 185, 129, 0.1);
  --border-color-glow: rgba(16, 185, 129, 0.4);
  
  --primary: hsl(160, 84%, 38%);
  --primary-glow: rgba(16, 185, 129, 0.25);
  --secondary: hsl(172, 80%, 40%);
  
  --text-main: hsl(160, 20%, 98%);
  --text-muted: hsl(160, 10%, 64%);
  --text-dark: hsl(168, 47%, 8%);
  
  --success: hsl(142, 70%, 45%);
  --success-glow: rgba(34, 197, 94, 0.2);
  --warning: hsl(38, 92%, 50%);
  --danger: hsl(0, 84%, 60%);
  --danger-glow: rgba(239, 68, 68, 0.3);
  
  --glow-shadow: 0 0 20px var(--primary-glow);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --blur-amount: blur(12px);
  --transition-speed: 0.3s;
}

/* --- 2. 기본 초기화 --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(at 10% 10%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(20, 184, 166, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
}

input, select, textarea, button {
  font-family: inherit;
  color: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* 스크롤바 디자인 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- 3. 공통 레이아웃 및 뷰 스위칭 --- */
.view-container {
  display: none;
  animation: fadeIn var(--transition-speed) ease-in-out;
}

.view-container.active {
  display: block;
}

/* 대시보드 뷰만 flex-column height:100vh */
#dashboard-view.active {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 4. 로그인 및 회원가입 페이지 스타일 --- */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--card-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-speed);
}

.auth-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.auth-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all var(--transition-speed);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
  background: rgba(0, 0, 0, 0.3);
}

.form-input[readonly] {
  background: rgba(0, 0, 0, 0.4) !important;
  color: var(--text-muted) !important;
  border-color: rgba(16, 185, 129, 0.05) !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* 역할 선택 토글 버튼 */
.role-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.role-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.role-btn.active {
  background: var(--primary);
  color: var(--text-main);
  box-shadow: var(--glow-shadow);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-main);
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 10px;
  box-shadow: var(--glow-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-switch {
  margin-top: 25px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-link {
  color: var(--secondary);
  font-weight: 500;
  text-decoration: none;
  margin-left: 5px;
}

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

/* 데모 계정 퀵 버튼 */
.demo-accounts {
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.demo-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.demo-btn-group {
  display: flex;
  gap: 10px;
}

.btn-demo {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-demo:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 에러 메시지 */
.error-msg {
  background: var(--danger-glow);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-align: left;
  display: none;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* --- 5. 대시보드 레이아웃 --- */
.dashboard-wrapper {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 상단 헤더 */
.dash-header {
  background: rgba(15, 20, 35, 0.6);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.user-role-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  width: fit-content;
  margin-top: 2px;
}

.role-admin-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.role-emp-badge {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* 알림 벨 스타일 */
.notif-container {
  position: relative;
}

.btn-notif {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
}

.btn-notif:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--bg-main);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* 알림 드롭다운 패널 */
.notif-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-modal);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: 16px;
  overflow: hidden;
  z-index: 150;
  display: none;
  flex-direction: column;
  transform-origin: top right;
  animation: dropdownFade var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFade {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.notif-dropdown.active {
  display: flex;
}

.notif-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-mark-all {
  font-size: 0.8rem;
  color: var(--secondary);
}

.btn-mark-all:hover {
  text-decoration: underline;
}

.notif-list {
  overflow-y: auto;
  flex: 1;
  max-height: 380px;
}

.notif-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.1);
  transition: background var(--transition-speed);
}

.notif-item.unread {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid var(--primary);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-msg {
  font-size: 0.85rem;
  color: var(--text-main);
  word-break: break-all;
}

.notif-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* 대시보드 그리드 구조 */
.dash-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 40px;
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
}

/* 모바일/태블릿 반응형 대응 */
@media (max-width: 768px) {
  /* 데스크톱은 100vh 고정 + 내부 스크롤(앱쉘) 구조지만,
     모바일에서는 menu-view-content가 dash-content의 형제 요소라
     dashboard-wrapper의 overflow:hidden에 막혀 스크롤이 전혀 안 되고
     화면 아래가 통째로 잘려 보이지 않는 문제가 있었음.
     → 모바일에서는 고정 높이/내부 스크롤을 풀고 페이지 자체가 스크롤되도록 변경 */
  #dashboard-view.active {
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .dashboard-wrapper {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .dash-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
    height: auto !important;
    overflow: visible !important;
  }
  
  .dash-header {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .dash-header {
    height: auto !important;
    padding: 0 !important;
  }
  
  .header-container {
    height: 56px !important;
    padding: 0 12px !important;
  }
  
  .header-logo span {
    font-size: 1.15rem !important;
    white-space: nowrap !important;
  }
  
  .header-logo svg {
    width: 24px !important;
    height: 24px !important;
  }
  
  .header-right {
    gap: 12px;
  }
  
  /* 모바일에서 프로필의 텍스트 정보 숨김 */
  .user-profile .user-info {
    display: none !important;
  }
  
  .user-profile {
    padding: 6px !important;
    border-color: transparent !important;
    background: transparent !important;
  }
  
  /* 드롭다운 메뉴 내 모바일용 유저 정보 노출 */
  .profile-dropdown .dropdown-user-info.mobile-only {
    display: flex !important;
  }
  
  .notif-container {
    position: static !important;
  }
  
  /* 알림 드롭다운 크기 모바일 대응 */
  .notif-dropdown {
    width: calc(100vw - 32px) !important;
    max-width: 340px !important;
    right: 16px !important;
    left: auto !important;
    top: 75px !important;
  }
  
  /* 프로필 드롭다운 크기 모바일 대응 */
  .profile-dropdown {
    width: 200px;
    top: calc(100% + 6px);
  }

  /* 달력 헤더 구조 모바일 대응 */
  .calendar-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 8px 4px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .calendar-nav {
    justify-content: center;
  }
  
  .calendar-filter {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  
  .calendar-filter select {
    flex: 1;
    max-width: 70%;
  }
  
  .filter-label {
    white-space: nowrap !important; /* 글자 세로 쪼개짐 방지 */
  }
  
  /* 달력 그리드 모바일 최적화 */
  .calendar-grid-card {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .calendar-days {
    grid-auto-rows: 100px !important;
    gap: 0 !important;
    background: transparent !important;
    min-height: 500px !important; /* 모바일 세로 찌그러짐 방지 최하 한계선 */
  }
  
  .calendar-day-cell {
    padding: 2px 2px !important;
    border-radius: 0 !important;
    min-height: 100px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
  }
  
  .calendar-day-cell.today .calendar-day-number {
    background: #10b981 !important;
    color: #0c0f1d !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
  }
  
  .calendar-day-number {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    margin-bottom: 0px !important;
    color: var(--text-muted);
    text-align: center;
    align-self: center !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .btn-quick-write {
    display: none !important;
  }
  
  .btn-quick-write svg {
    width: 8px;
    height: 8px;
  }
  
  .day-tasks-container {
    width: 100% !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .task-pill {
    font-size: 0.6rem !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    line-height: 1.25 !important;
    height: 16px !important;
    margin-top: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }
  
  .more-tasks-count {
    font-size: 0.62rem !important;
    margin-top: 3px !important;
    text-align: center !important;
    color: var(--text-muted) !important;
  }
}

@media (max-width: 480px) {
  .form-select {
    padding: 8px 6px;
    font-size: 0.85rem;
  }
  
  .form-input {
    padding: 10px 12px;
  }
  
  .dash-content {
    padding: 10px;
  }
}

/* --- 6. 사이드바 업무 생성 폼 --- */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-panel {
  background: var(--bg-card);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-main), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 폼 디자인 */
.date-selector-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}

.form-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-speed);
}

.form-select:focus {
  border-color: var(--primary);
}

.form-select option {
  background-color: var(--bg-main);
  color: var(--text-main);
}

.form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  color: var(--text-main);
  outline: none;
  resize: vertical;
  min-height: 100px;
  font-size: 0.95rem;
  transition: border-color var(--transition-speed);
}

.form-textarea:focus {
  border-color: var(--primary);
}

/* --- 7. 인터랙티브 달력 컴포넌트 --- */
.calendar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-nav {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.current-month {
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 120px;
  text-align: center;
}

/* 관리자 필터 셀렉터 */
.calendar-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 그리드 레이아웃 */
.calendar-grid-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
}

.calendar-weekdays div:first-child { color: var(--danger); }
.calendar-weekdays div:last-child { color: var(--secondary); }

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 180px;
  gap: 8px;
}

/* 날짜 셀 스타일 */
.calendar-day-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  height: 180px;
  min-width: 0;
  overflow: hidden;
}

.calendar-day-cell:hover {
  background: var(--bg-card-hover);
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.calendar-day-cell.other-month {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.calendar-day-cell.today {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
}

.calendar-day-number {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.calendar-day-cell.today .calendar-day-number {
  color: var(--primary);
  font-weight: 700;
}

/* 일정 지시자 영역 */
.day-tasks-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  overflow: hidden;
  max-height: 135px;
}

/* 일정 배지 */
.task-pill {
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  border: 1px solid transparent;
}

/* 업무 색상 구분 */
.task-pill.admin-self {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}

.task-pill.assigned {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  border-color: rgba(139, 92, 246, 0.25);
}

.task-pill.emp-self {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.25);
}

/* 남은 업무 개수 표시기 */
.more-tasks-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}

/* --- 8. 재사용 가능한 모달 --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition-speed) ease-in-out;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-modal-close {
  font-size: 1.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.btn-modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 일정 리스트 (모달 내부) */
.modal-task-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 8px;
}

.modal-task-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.modal-task-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 6px;
}

.modal-task-title {
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 4px;
}

.modal-task-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.modal-task-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
}

.modal-task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 100%;
}

.modal-task-assignment {
  display: block;
}

.modal-task-footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-task-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-edit-task {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-speed);
  margin-right: 6px;
}

.btn-edit-task:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-save-task {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  margin-right: 6px;
}

.btn-save-task:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.5);
}

.btn-cancel-task {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-cancel-task:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-delete-task {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
}

.btn-delete-task:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
}

.modal-task-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 0;
  font-size: 0.95rem;
}

/* --- 9. 사원 관리 목록 패널 --- */
.employee-list-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.employee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.85rem;
}

.employee-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emp-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

.employee-row-name {
  font-weight: 600;
}

.employee-row-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.employee-task-count {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--text-muted);
}

/* --- 10. 매일하는 업무 (평일 루틴) 스타일 --- */
.daily-task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.85rem;
  transition: all 0.2s ease-in-out;
}

.daily-task-item:hover {
  border-color: rgba(244, 63, 94, 0.4);
}

.daily-task-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 75%;
}

.daily-task-item-title {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-task-item-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-delete-daily {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all var(--transition-speed);
}

.btn-delete-daily:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
}

/* 캘린더 루틴 일정 배지 */
.task-pill.daily-routine {
  background: rgba(244, 63, 94, 0.12); /* 로즈 핑크 테두리 및 배경 */
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
}

/* 모달 내 루틴 일정 배지 */
.modal-task-badge.role-routine-badge {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* 캘린더 날짜별 퀵 글쓰기 버튼 */
.btn-quick-write {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.calendar-day-cell:hover .btn-quick-write {
  opacity: 1;
}

.btn-quick-write:hover {
  background: var(--primary);
  color: var(--text-main);
  transform: scale(1.1) rotate(-15deg);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* 회원가입 고유 색상 선택기 스타일 */
.color-option {
  border: 2px solid transparent !important;
}
.color-option:has(input:checked) {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px currentColor;
  transform: scale(1.15);
}

/* 캘린더 상단 탭 스타일 */
.calendar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  gap: 4px;
}

.calendar-tab {
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.calendar-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.calendar-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* --- 11. 팀 업무 관리 및 협업 팀 스타일 --- */
#team-manage-box {
  margin-top: 12px;
  padding: 14px;
  background: rgba(12, 24, 21, 0.85) !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.team-manage-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.team-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.team-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-member-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.team-member-name {
  font-size: 0.82rem;
  font-weight: 500;
}

.team-member-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.team-member-badge.leader {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.team-member-badge.pending {
  background: rgba(234, 179, 8, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.team-invite-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.team-invite-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.team-invite-input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.5);
}

.btn-team-action {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-team-action.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-main);
}

.btn-team-action.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-team-action.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  width: 100%;
}

.btn-team-action.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* 알림 내 수락/거절 액션 버튼 스타일 */
.notif-action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-notif-action {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-notif-action.accept {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.btn-notif-action.accept:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.5);
}

.btn-notif-action.decline {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-notif-action.decline:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}

/* --- 진행도 팝업 버튼 (푸터 우측) --- */

/* 팝업 앵커: 상대 위치 컨테이너 */
.progress-popup-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 진행도 토글 버튼 */
.btn-progress-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-progress-toggle:hover,
.btn-progress-toggle.active {
  background: rgba(255,255,255,0.1);
  transform: none;
}

/* 팝업 본체 - 버튼 바로 위에 떠오름 */
.progress-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: rgba(12, 28, 24, 0.97);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 14px 14px 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 20px rgba(16,185,129,0.1);
  z-index: 100;
  backdrop-filter: blur(12px);
  animation: popupFadeIn 0.15s ease;
}

@keyframes popupFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 팝업 헤더: "진행도 조정 / 50%" */
.progress-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* 팝업 내 트랙 */
.progress-popup-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: visible;
  margin-bottom: 4px;
  pointer-events: none;
}

.progress-popup-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 3px;
  transition: width 0.08s linear;
  opacity: 0.9;
}

/* 50% 눈금 */
.progress-popup-midmark {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 14px;
  background: rgba(255,255,255,0.4);
  border-radius: 1px;
}

/* 팝업 내 range input */
.task-progress-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  cursor: ew-resize;
  margin: 0;
  padding: 0;
  display: block;
}

.task-progress-slider::-webkit-slider-runnable-track {
  height: 0;
  background: transparent;
}

.task-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--thumb-color, var(--primary));
  box-shadow: 0 0 8px var(--thumb-color, var(--primary));
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.9);
  transition: transform 0.15s, box-shadow 0.15s;
}

.task-progress-slider::-webkit-slider-thumb:hover,
.task-progress-slider:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 14px var(--thumb-color, var(--primary));
}

.task-progress-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--thumb-color, var(--primary));
  box-shadow: 0 0 8px var(--thumb-color, var(--primary));
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.9);
}

/* 0 / 50 / 100 레이블 */
.progress-popup-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  margin-top: 2px;
  padding: 0 2px;
}

/* 캘린더 pill 진행도 뱃지 */
.pill-progress-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 0 3px;
}

/* 쪽지함 모달 탭 */
.msg-tab {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
}
.msg-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}
.msg-tab.active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ============================================================
   메인 탭 내비게이션 (캐린더 / 메뉴) — 헤더 내부 하단 row
   ============================================================ */
.main-tab-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 40px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-color);
  /* 헤더 안에 있으므로 sticky 불필요 */
}

.main-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.main-tab-btn:hover {
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-main);
  border-color: rgba(16, 185, 129, 0.15);
}

.main-tab-btn.active {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.12);
}

.main-tab-btn svg {
  flex-shrink: 0;
}

/* ============================================================
   관리자 전용 관리 현황
   ============================================================ */
.admin-dashboard-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 7% 0%, rgba(16, 185, 129, 0.08), transparent 30%),
    radial-gradient(circle at 90% 18%, rgba(5, 150, 105, 0.07), transparent 28%);
  animation: fadeIn 0.24s ease;
}

.admin-dashboard-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 40px 56px;
  box-sizing: border-box;
}

.admin-dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.admin-dashboard-eyebrow,
.admin-card-kicker {
  display: block;
  color: #34d399;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 7px;
}

.admin-dashboard-hero h1 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.admin-dashboard-hero p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-dashboard-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.admin-dashboard-company {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.24);
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-dashboard-updated {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.admin-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.admin-dashboard-actions button,
.admin-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.07);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.admin-dashboard-actions button:hover,
.admin-card-link:hover {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.38);
  transform: translateY(-1px);
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-metric-card,
.admin-dashboard-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(17, 38, 34, 0.86), rgba(8, 25, 23, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.admin-metric-card::after,
.admin-dashboard-card::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  right: -52px;
  top: -58px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.06);
  pointer-events: none;
}

.admin-metric-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  box-sizing: border-box;
}

.admin-metric-overdue {
  border-color: rgba(251, 113, 133, 0.17);
}

.admin-metric-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  font-size: 1rem;
  font-weight: 900;
}

.admin-metric-overdue .admin-metric-icon {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.18);
}

.admin-metric-card > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-metric-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-metric-card strong {
  margin: 2px 0 1px;
  color: var(--text-main);
  font-size: 1.55rem;
  line-height: 1.15;
}

.admin-metric-card small,
.admin-dashboard-card small {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.admin-dashboard-card {
  border-radius: 20px;
  padding: 22px;
  box-sizing: border-box;
}

.admin-dashboard-kpi,
.admin-dashboard-approvals {
  grid-column: span 6;
  min-height: 310px;
}

.admin-dashboard-workload {
  grid-column: span 7;
  min-height: 360px;
}

.admin-dashboard-teams {
  grid-column: span 5;
  min-height: 360px;
}

.admin-dashboard-upcoming {
  grid-column: span 12;
}

.admin-dashboard-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-dashboard-card-head h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.admin-card-caption {
  margin: -5px 0 20px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.admin-card-link {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

.admin-count-badge,
.admin-period-badge {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  font-size: 0.68rem;
  font-weight: 800;
}

.admin-kpi-overall {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.055);
  border: 1px solid rgba(16, 185, 129, 0.12);
}

.admin-kpi-overall > div:first-child,
.admin-kpi-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.admin-kpi-overall strong {
  color: #34d399;
  font-size: 1.35rem;
}

.admin-progress-track,
.admin-inline-progress > span {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.admin-progress-track > span,
.admin-inline-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #047857, #34d399);
  transition: width 0.45s ease;
}

.admin-kpi-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-kpi-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-kpi-item strong {
  color: var(--text-main);
  font-size: 0.9rem;
}

.admin-kpi-item small {
  display: block;
  margin-top: 8px;
}

.admin-dashboard-list,
.admin-workload-list,
.admin-upcoming-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-approval-row,
.admin-workload-row,
.admin-team-row,
.admin-upcoming-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.09);
  box-sizing: border-box;
}

.admin-list-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-list-identity > div,
.admin-team-row > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-list-identity strong,
.admin-team-row strong,
.admin-upcoming-copy strong {
  overflow: hidden;
  color: var(--text-main);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-list-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  box-shadow: 0 5px 13px rgba(0, 0, 0, 0.2);
}

.admin-approval-actions {
  display: flex;
  gap: 6px;
}

.admin-approval-actions button {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-approval-actions .approve {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.admin-approval-actions .reject {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.admin-approval-actions button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.admin-inline-progress {
  width: 135px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-inline-progress strong {
  width: 35px;
  color: #6ee7b7;
  font-size: 0.72rem;
  text-align: right;
}

.admin-team-rate {
  flex-shrink: 0;
  color: #34d399;
  font-size: 0.83rem;
  font-weight: 800;
}

.admin-upcoming-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-upcoming-row {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.admin-upcoming-row:hover {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.admin-upcoming-date {
  width: 56px;
  flex: 0 0 56px;
  color: #6ee7b7;
  font-size: 0.7rem;
  font-weight: 800;
}

.admin-upcoming-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-upcoming-progress {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.admin-empty-state {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  border-radius: 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed rgba(148, 163, 184, 0.15);
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .admin-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-kpi,
  .admin-dashboard-approvals,
  .admin-dashboard-workload,
  .admin-dashboard-teams {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .admin-dashboard-view {
    overflow: visible;
  }

  .admin-dashboard-shell {
    padding: 22px 12px 40px;
  }

  .admin-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .admin-dashboard-hero-side {
    align-items: flex-start;
  }

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

  .admin-dashboard-actions button:first-child {
    grid-column: span 2;
  }

  .admin-metric-grid {
    gap: 9px;
  }

  .admin-metric-card {
    min-height: 104px;
    padding: 14px;
    gap: 10px;
  }

  .admin-metric-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .admin-metric-card strong {
    font-size: 1.3rem;
  }

  .admin-dashboard-card {
    padding: 18px 14px;
  }

  .admin-dashboard-kpi,
  .admin-dashboard-approvals,
  .admin-dashboard-workload,
  .admin-dashboard-teams {
    min-height: 0;
  }

  .admin-kpi-split,
  .admin-upcoming-list {
    grid-template-columns: 1fr;
  }

  .admin-inline-progress {
    width: 105px;
  }

  .admin-upcoming-date {
    width: 48px;
    flex-basis: 48px;
  }
}

@media (max-width: 480px) {
  .admin-metric-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-approval-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-approval-actions {
    width: 100%;
  }

  .admin-approval-actions button {
    flex: 1;
  }
}

/* ============================================================
   관리자 대시보드 V2 — 고정 사이드바 + 밝은 2열 업무 보드
   ============================================================ */
body.admin-dashboard-active #dashboard-view.active {
  background: #f4f6f8;
}

body.admin-dashboard-active .dash-header {
  display: none;
}

body.admin-dashboard-active .dashboard-wrapper {
  background: #f4f6f8;
}

body.admin-dashboard-active .admin-dashboard-view {
  width: 100%;
  min-width: 0;
  height: 100%;
  flex: 1;
  overflow: hidden;
  color: #172033;
  background: #f4f6f8;
  animation: none;
}

body.admin-dashboard-active .admin-dashboard-sidebar {
  width: 244px;
  min-width: 244px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 16px;
  box-sizing: border-box;
  color: #fff;
  background: linear-gradient(180deg, #0d624d 0%, #0a5946 100%);
  box-shadow: 3px 0 12px rgba(15, 23, 42, 0.08);
}

.admin-sidebar-brand {
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.admin-sidebar-logo:hover strong {
  color: #a7f3d0;
}

.admin-sidebar-logo svg {
  color: #5ee7b7;
  flex-shrink: 0;
}

.admin-sidebar-logo strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-sidebar-brand > span {
  display: block;
  margin-left: 37px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.69rem;
}

.admin-sidebar-brand p {
  margin: 10px 0 0 37px;
  color: #d1fae5;
  font-size: 0.76rem;
  font-weight: 650;
}

.admin-sidebar-nav {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 0 14px;
  overflow-y: auto;
}

.admin-sidebar-label {
  padding: 0 11px 6px;
  color: rgba(209, 250, 229, 0.5);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.admin-sidebar-label-secondary {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-nav button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.admin-sidebar-nav button svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.admin-sidebar-nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.admin-sidebar-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 3px 0 #6ee7b7;
}

.admin-sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.admin-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 5px 12px;
}

.admin-sidebar-profile > span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #fff;
  background: #10b981;
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-sidebar-profile > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-sidebar-profile strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.73rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-sidebar-profile small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
}

.admin-sidebar-logout {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(254, 202, 202, 0.22);
  border-radius: 8px;
  color: #fee2e2;
  background: rgba(127, 29, 29, 0.24);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-sidebar-logout:hover {
  background: rgba(185, 28, 28, 0.38);
}

body.admin-dashboard-active .admin-dashboard-main {
  min-width: 0;
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background: #f4f6f8;
}

body.admin-dashboard-active .admin-dashboard-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 36px 44px;
  box-sizing: border-box;
}

body.admin-dashboard-active .admin-dashboard-hero {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
}

body.admin-dashboard-active .admin-dashboard-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

body.admin-dashboard-active .admin-dashboard-hero p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

body.admin-dashboard-active .admin-dashboard-hero-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding-top: 3px;
}

body.admin-dashboard-active .admin-dashboard-company,
body.admin-dashboard-active .admin-dashboard-updated {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 0.66rem;
  font-weight: 700;
}

body.admin-dashboard-active .admin-dashboard-company {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

body.admin-dashboard-active .admin-dashboard-updated {
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
}

body.admin-dashboard-active .admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

body.admin-dashboard-active .admin-dashboard-card {
  position: relative;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid #e5e9ef;
  border-radius: 14px;
  color: #172033;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.055);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
}

body.admin-dashboard-active .admin-dashboard-card::after,
body.admin-dashboard-active .admin-metric-card::after {
  content: none;
}

body.admin-dashboard-active .admin-dashboard-summary,
body.admin-dashboard-active .admin-dashboard-kpi,
body.admin-dashboard-active .admin-dashboard-approvals,
body.admin-dashboard-active .admin-dashboard-upcoming,
body.admin-dashboard-active .admin-dashboard-workload,
body.admin-dashboard-active .admin-dashboard-teams {
  grid-column: span 6;
  min-height: 0;
}

body.admin-dashboard-active .admin-dashboard-summary,
body.admin-dashboard-active .admin-dashboard-kpi {
  height: 174px;
}

body.admin-dashboard-active .admin-dashboard-approvals,
body.admin-dashboard-active .admin-dashboard-upcoming {
  height: 250px;
}

body.admin-dashboard-active .admin-dashboard-workload,
body.admin-dashboard-active .admin-dashboard-teams {
  height: 290px;
}

body.admin-dashboard-active .admin-dashboard-card-head {
  position: relative;
  z-index: 1;
  min-height: 25px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.admin-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

body.admin-dashboard-active .admin-card-title-icon {
  flex-shrink: 0;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 800;
}

body.admin-dashboard-active .admin-dashboard-card-head h2 {
  margin: 0;
  color: #172033;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

body.admin-dashboard-active .admin-card-title small {
  color: #94a3b8;
  font-size: 0.62rem;
  white-space: nowrap;
}

body.admin-dashboard-active .admin-card-link {
  min-height: 24px;
  padding: 0 4px;
  border: 0;
  border-radius: 5px;
  color: #64748b;
  background: transparent;
  font-size: 0.63rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

body.admin-dashboard-active .admin-card-link:hover {
  color: #047857;
  background: #ecfdf5;
  transform: none;
}

body.admin-dashboard-active .admin-count-badge,
body.admin-dashboard-active .admin-period-badge {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: #047857;
  background: #d1fae5;
  font-size: 0.62rem;
  font-weight: 800;
}

body.admin-dashboard-active .admin-metric-grid {
  height: 112px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  margin: 0;
}

body.admin-dashboard-active .admin-metric-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 8px 5px;
  border: 0;
  border-right: 1px solid #eef1f5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.admin-dashboard-active .admin-metric-card:last-child {
  border-right: 0;
}

body.admin-dashboard-active .admin-metric-card strong {
  order: 1;
  margin: 0;
  color: #2563eb;
  font-size: 1.34rem;
  line-height: 1.2;
}

body.admin-dashboard-active .admin-metric-card .admin-metric-label {
  order: 2;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 650;
}

body.admin-dashboard-active .admin-metric-card small {
  order: 3;
  overflow: hidden;
  max-width: 100%;
  color: #94a3b8;
  font-size: 0.58rem;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.admin-dashboard-active .admin-metric-members strong { color: #7c3aed; }
body.admin-dashboard-active .admin-metric-today strong { color: #2563eb; }
body.admin-dashboard-active .admin-metric-active strong { color: #d97706; }
body.admin-dashboard-active .admin-metric-overdue strong { color: #e11d48; }

body.admin-dashboard-active .admin-kpi-grid {
  height: 111px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

body.admin-dashboard-active .admin-kpi-overall,
body.admin-dashboard-active .admin-kpi-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  box-sizing: border-box;
}

body.admin-dashboard-active .admin-kpi-overall {
  color: #1d4ed8;
  background: #f2f6fd;
}

body.admin-dashboard-active .admin-kpi-item:nth-child(2) {
  color: #059669;
  background: #f0faf6;
}

body.admin-dashboard-active .admin-kpi-item:nth-child(3) {
  color: #7c3aed;
  background: #f8f5fd;
}

body.admin-dashboard-active .admin-kpi-overall > span,
body.admin-dashboard-active .admin-kpi-item > span {
  color: #64748b;
  font-size: 0.63rem;
}

body.admin-dashboard-active .admin-kpi-overall strong,
body.admin-dashboard-active .admin-kpi-item strong {
  margin: 1px 0;
  color: currentColor;
  font-size: 1.25rem;
  line-height: 1.15;
}

body.admin-dashboard-active .admin-kpi-overall small,
body.admin-dashboard-active .admin-kpi-item small {
  margin: 0;
  color: #94a3b8;
  font-size: 0.57rem;
}

body.admin-dashboard-active .admin-progress-track {
  width: 72%;
  height: 3px;
  margin-top: 6px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.2);
}

body.admin-dashboard-active .admin-progress-track > span,
body.admin-dashboard-active .admin-inline-progress i {
  background: currentColor;
}

body.admin-dashboard-active .admin-dashboard-list,
body.admin-dashboard-active .admin-workload-list,
body.admin-dashboard-active .admin-upcoming-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding-right: 3px;
}

body.admin-dashboard-active .admin-dashboard-approvals .admin-dashboard-list,
body.admin-dashboard-active .admin-dashboard-upcoming .admin-upcoming-list {
  max-height: 190px;
}

body.admin-dashboard-active .admin-dashboard-workload .admin-workload-list,
body.admin-dashboard-active .admin-dashboard-teams .admin-dashboard-list {
  max-height: 232px;
}

body.admin-dashboard-active .admin-approval-row,
body.admin-dashboard-active .admin-workload-row,
body.admin-dashboard-active .admin-team-row,
body.admin-dashboard-active .admin-upcoming-row {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  border-radius: 0;
  color: #172033;
  background: transparent;
  box-sizing: border-box;
}

body.admin-dashboard-active .admin-approval-row:last-child,
body.admin-dashboard-active .admin-workload-row:last-child,
body.admin-dashboard-active .admin-team-row:last-child,
body.admin-dashboard-active .admin-upcoming-row:last-child {
  border-bottom: 0;
}

body.admin-dashboard-active .admin-upcoming-row:hover {
  border-color: #eef1f5;
  border-radius: 7px;
  background: #f8fafc;
  transform: none;
}

body.admin-dashboard-active .admin-list-avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 7px;
  font-size: 0.65rem;
  box-shadow: none;
}

body.admin-dashboard-active .admin-list-identity strong,
body.admin-dashboard-active .admin-team-row strong,
body.admin-dashboard-active .admin-upcoming-copy strong {
  color: #172033;
  font-size: 0.71rem;
  font-weight: 700;
}

body.admin-dashboard-active .admin-list-identity small,
body.admin-dashboard-active .admin-team-row small,
body.admin-dashboard-active .admin-upcoming-copy small {
  color: #94a3b8;
  font-size: 0.59rem;
}

body.admin-dashboard-active .admin-approval-actions button {
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 0.61rem;
}

body.admin-dashboard-active .admin-approval-actions .approve {
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

body.admin-dashboard-active .admin-approval-actions .reject {
  color: #be123c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

body.admin-dashboard-active .admin-inline-progress {
  width: 120px;
  gap: 7px;
}

body.admin-dashboard-active .admin-inline-progress strong {
  width: 34px;
  color: #059669;
  font-size: 0.66rem;
}

body.admin-dashboard-active .admin-inline-progress > span {
  height: 4px;
  background: #edf1f4;
}

body.admin-dashboard-active .admin-team-rate {
  min-width: 43px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #047857;
  background: #ecfdf5;
  font-size: 0.65rem;
  text-align: center;
}

body.admin-dashboard-active .admin-upcoming-date {
  width: 48px;
  flex-basis: 48px;
  color: #2563eb;
  font-size: 0.62rem;
}

body.admin-dashboard-active .admin-upcoming-progress {
  min-width: 37px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #b45309;
  background: #fffbeb;
  font-size: 0.6rem;
  text-align: center;
}

body.admin-dashboard-active .admin-empty-state {
  min-height: 145px;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 0.68rem;
}

@media (max-width: 1024px) {
  body.admin-dashboard-active .admin-dashboard-sidebar {
    width: 210px;
    min-width: 210px;
  }

  body.admin-dashboard-active .admin-dashboard-shell {
    padding: 26px 24px 38px;
  }

  body.admin-dashboard-active .admin-dashboard-summary,
  body.admin-dashboard-active .admin-dashboard-kpi,
  body.admin-dashboard-active .admin-dashboard-approvals,
  body.admin-dashboard-active .admin-dashboard-upcoming,
  body.admin-dashboard-active .admin-dashboard-workload,
  body.admin-dashboard-active .admin-dashboard-teams {
    grid-column: span 12;
    height: auto;
    min-height: 190px;
  }
}

@media (max-width: 768px) {
  body.admin-dashboard-active #dashboard-view.active,
  body.admin-dashboard-active .dashboard-wrapper {
    height: auto !important;
    min-height: 100dvh !important;
  }

  body.admin-dashboard-active .admin-dashboard-view {
    min-height: 100dvh;
    flex-direction: column;
    overflow: visible;
  }

  body.admin-dashboard-active .admin-dashboard-sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 11px 12px 9px;
    box-shadow: 0 2px 9px rgba(15, 23, 42, 0.12);
  }

  .admin-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 9px;
  }

  .admin-sidebar-logo {
    margin: 0;
  }

  .admin-sidebar-logo svg {
    width: 23px;
    height: 23px;
  }

  .admin-sidebar-logo strong {
    font-size: 0.9rem;
  }

  .admin-sidebar-brand > span,
  .admin-sidebar-brand p,
  .admin-sidebar-label,
  .admin-sidebar-footer {
    display: none;
  }

  .admin-sidebar-nav {
    flex-direction: row;
    gap: 5px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .admin-sidebar-nav button {
    width: auto;
    min-width: max-content;
    min-height: 34px;
    padding: 0 10px;
    gap: 6px;
    font-size: 0.68rem;
  }

  .admin-sidebar-nav button svg {
    width: 15px;
    height: 15px;
  }

  .admin-sidebar-nav button.active {
    box-shadow: none;
  }

  body.admin-dashboard-active .admin-dashboard-main {
    height: auto;
    overflow: visible;
  }

  body.admin-dashboard-active .admin-dashboard-shell {
    padding: 19px 12px 34px;
  }

  body.admin-dashboard-active .admin-dashboard-hero {
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  body.admin-dashboard-active .admin-dashboard-hero h1 {
    font-size: 1.28rem;
  }

  body.admin-dashboard-active .admin-dashboard-hero-side {
    padding: 0;
  }

  body.admin-dashboard-active .admin-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.admin-dashboard-active .admin-dashboard-summary,
  body.admin-dashboard-active .admin-dashboard-kpi,
  body.admin-dashboard-active .admin-dashboard-approvals,
  body.admin-dashboard-active .admin-dashboard-upcoming,
  body.admin-dashboard-active .admin-dashboard-workload,
  body.admin-dashboard-active .admin-dashboard-teams {
    grid-column: 1;
    min-height: 0;
    height: auto;
  }

  body.admin-dashboard-active .admin-metric-grid {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-dashboard-active .admin-metric-card {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid #eef1f5;
  }

  body.admin-dashboard-active .admin-metric-card:nth-child(odd) {
    border-right: 1px solid #eef1f5;
  }

  body.admin-dashboard-active .admin-metric-card:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  body.admin-dashboard-active .admin-kpi-grid {
    height: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.admin-dashboard-active .admin-kpi-overall,
  body.admin-dashboard-active .admin-kpi-item {
    min-height: 100px;
  }

  body.admin-dashboard-active .admin-dashboard-list,
  body.admin-dashboard-active .admin-workload-list,
  body.admin-dashboard-active .admin-upcoming-list {
    max-height: none !important;
  }
}

@media (max-width: 430px) {
  body.admin-dashboard-active .admin-card-title small,
  body.admin-dashboard-active .admin-dashboard-updated {
    display: none;
  }

  body.admin-dashboard-active .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  body.admin-dashboard-active .admin-kpi-overall,
  body.admin-dashboard-active .admin-kpi-item {
    min-height: 86px;
  }

  body.admin-dashboard-active .admin-approval-row {
    align-items: center;
    flex-direction: row;
  }

  body.admin-dashboard-active .admin-approval-actions {
    width: auto;
  }

  body.admin-dashboard-active .admin-approval-actions button {
    flex: initial;
  }
}

/* ============================================================
   메뉴 뷰 (문서함 레이아웃)
   ============================================================ */
.menu-view {
  display: flex;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
  /* 캘린더와 동일한 가로 제약: 좌우에 동일한 여백 */
  justify-content: center;
}

/* 캘린더 dash-content와 동일한 가로 폭 제약 */
.menu-inner-wrap {
  display: flex;
  width: 100%;
  max-width: 1800px;
  padding: 0 40px;
  box-sizing: border-box;
  overflow: hidden;
}


/* 좌측 사이드바 */
.doc-sidebar {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border-color);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

.doc-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.3px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
  width: 100%;
  background: none;
  box-sizing: border-box;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-sidebar-header:hover {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
}

.doc-sidebar-header.active {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  color: var(--primary) !important;
}

.doc-sidebar-header svg {
  color: var(--primary);
  flex-shrink: 0;
}

.doc-sidebar-chevron {
  margin-left: auto;
  transition: transform 0.25s ease;
  opacity: 0.6;
  flex-shrink: 0;
}

.doc-sidebar-header.open .doc-sidebar-chevron {
  transform: rotate(180deg);
}

.doc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 8px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
}

.doc-nav.open {
  max-height: 400px;
  opacity: 1;
}

.doc-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  white-space: nowrap;
  box-sizing: border-box;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--border-color);
}

.doc-nav-btn.active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
  font-weight: 600;
}

.doc-nav-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
  width: 15px;
  height: 15px;
  display: block;
}

#routine-nav-list .doc-nav-btn {
  align-items: center;
  gap: 10px;
  line-height: 1;
}

#routine-tab-manage svg {
  transform: translateY(1px);
}

/* ============================================================
   KPI 월간 / 주간 목표
   ============================================================ */
.calendar-goals-banner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.14), transparent 42%),
    rgba(5, 20, 24, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.calendar-goals-heading,
.calendar-goals-content,
.calendar-goals-progress-row,
.goals-page-header,
.goals-section-header,
.goal-item,
.weekly-goal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.calendar-goals-heading h2 {
  margin: 2px 0 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 750;
}

.calendar-goals-eyebrow,
.goals-page-eyebrow,
.goals-section-label {
  display: block;
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.calendar-goals-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 9px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.calendar-goals-add-btn:hover {
  color: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.calendar-goals-content {
  align-items: flex-start;
}

.calendar-goals-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.calendar-goals-list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.calendar-goal-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  font-size: 0.78rem;
}

.calendar-goal-chip.completed {
  color: var(--text-muted);
  text-decoration: line-through;
  border-color: rgba(16, 185, 129, 0.2);
}

.calendar-goal-chip .goal-check-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 50%;
  color: transparent;
  font-size: 0.65rem;
}

.calendar-goal-chip.completed .goal-check-dot {
  color: #052e2b;
  border-color: var(--primary);
  background: var(--primary);
}

.calendar-goals-progress {
  width: 165px;
  flex-shrink: 0;
}

.calendar-goals-progress-row {
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.calendar-goals-progress-row strong {
  color: #6ee7b7;
  font-size: 0.86rem;
}

.goals-view-content {
  gap: 22px;
  width: 100%;
  padding: 0 2px 28px 0;
  box-sizing: border-box;
}

.goals-page-header {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.goals-page-header .doc-panel-title {
  margin-top: 5px;
}

.goals-month-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.2);
}

.goals-month-control button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.goals-month-control button:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.goals-month-control input {
  height: 32px;
  padding: 0 8px;
  border: none;
  color: var(--text-main);
  background: transparent;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color-scheme: dark;
  outline: none;
}

.goals-feedback {
  display: none;
  padding: 10px 13px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.08);
  font-size: 0.8rem;
}

.goals-feedback.error {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.goals-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.022);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.goals-monthly-section {
  border-color: rgba(16, 185, 129, 0.23);
  background:
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.09), transparent 35%),
    rgba(255, 255, 255, 0.022);
}

.goals-section-header {
  align-items: flex-end;
}

.goals-section-header h3 {
  margin: 3px 0 0;
  color: var(--text-main);
  font-size: 1.08rem;
}

.goals-section-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.79rem;
}

.goals-progress-summary {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.goals-progress-summary strong {
  margin-left: 6px;
  color: #6ee7b7;
  font-size: 1.18rem;
}

.goals-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
}

.goals-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, #34d399);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  transition: width 0.35s ease;
}

.goal-add-form {
  display: flex;
  gap: 9px;
}

.goal-add-form input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.22);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.goal-add-form input:focus {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.09);
}

.goal-add-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 106px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 9px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.goal-add-form button:hover {
  background: rgba(16, 185, 129, 0.26);
}

.goal-add-form button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goal-item {
  min-height: 50px;
  padding: 9px 10px 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.13);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.goal-item:hover {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(255, 255, 255, 0.028);
}

.goal-item.completed .goal-item-title {
  color: var(--text-muted);
  text-decoration: line-through;
}

.goal-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.goal-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 50%;
  color: transparent;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
  font-weight: 900;
}

.goal-item.completed .goal-state-icon {
  color: #052e2b;
  border-color: #34d399;
  background: #34d399;
}

.goal-item-title {
  overflow: hidden;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.goal-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.goal-complete-btn,
.goal-delete-btn {
  height: 31px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.goal-complete-btn {
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.08);
}

.goal-item.completed .goal-complete-btn {
  color: var(--text-muted);
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.035);
}

.goal-complete-btn:hover {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.2);
}

.goal-delete-btn {
  width: 31px;
  padding: 0;
  color: #fca5a5;
  border: 1px solid transparent;
  background: transparent;
}

.goal-delete-btn:hover {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.1);
}

.goals-empty-state {
  padding: 18px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.8rem;
}

.weekly-goals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.weekly-goal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.13);
}

.weekly-goal-card.current-week {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.05);
}

.weekly-goal-card-title {
  color: var(--text-main);
  font-size: 0.91rem;
  font-weight: 750;
}

.weekly-goal-card-period {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.weekly-goal-card-progress {
  color: #6ee7b7;
  font-size: 0.8rem;
  font-weight: 800;
}

.weekly-goal-card .goals-progress-track {
  height: 6px;
}

.weekly-goal-card .goal-add-form input {
  height: 38px;
  font-size: 0.78rem;
}

.weekly-goal-card .goal-add-form button {
  min-width: 64px;
  height: 38px;
  padding: 0 11px;
  font-size: 0.74rem;
}

@media (max-width: 1050px) {
  .weekly-goals-grid {
    grid-template-columns: 1fr;
  }
}

/* 우측 메인 콘텐츠 */
.doc-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.doc-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.2s ease;
}

/* 문서함 패널 헤더 */
.doc-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.doc-panel-header > div {
  min-width: 0;
  flex: 1;
}


.doc-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.doc-panel-title svg {
  color: var(--primary);
}

.doc-panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  padding-left: 30px;
}

/* 파일 올리기 버튼 */
.doc-upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(20, 184, 166, 0.18));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  color: #10b981;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

.doc-upload-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(20, 184, 166, 0.28));
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}

/* 드래그 앤 드롭 영역 */
.doc-dropzone {
  border: 2px dashed rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  background: rgba(16, 185, 129, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.doc-dropzone:hover,
.doc-dropzone.dragover {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.06);
}

.doc-dropzone.dragover {
  transform: scale(1.01);
}

/* 파일 테이블 컨테이너 및 테이블 */
.doc-file-container {
  width: 100%;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.doc-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--text-main);
  text-align: left;
}

.doc-list-table th,
.doc-list-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.doc-list-table th {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
}

.doc-list-table tr:last-child td {
  border-bottom: none;
}

.doc-list-table tbody tr {
  transition: background 0.15s ease;
}

.doc-list-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.doc-table-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-table-file-icon {
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.doc-table-file-name-text {
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.doc-table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.doc-table-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.doc-table-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.doc-table-btn.btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}


.doc-file-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: default;
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  position: relative;
  overflow: hidden;
}

.doc-file-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.doc-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.doc-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.doc-file-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-file-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.doc-file-btn {
  flex: 1;
  padding: 7px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.doc-file-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

.doc-file-btn.btn-download {
  border-color: rgba(16, 185, 129, 0.25);
  color: #10b981;
  background: rgba(16, 185, 129, 0.07);
}

.doc-file-btn.btn-download:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
}

.doc-file-btn.btn-delete {
  border-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
  background: rgba(239, 68, 68, 0.05);
}

.doc-file-btn.btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

/* 빈 문서함 안내 메시지 */
.doc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
  text-align: center;
}

.doc-empty-state svg {
  opacity: 0.3;
}

.doc-empty-state p {
  font-size: 0.9rem;
}

/* 업로드 중 오버레이 */
.doc-upload-progress {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(4px);
}

.doc-upload-progress-bar {
  width: 80%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.doc-upload-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* 반응형 */
@media (max-width: 768px) {
  .main-tab-nav {
    padding: 6px 12px !important;
    background: rgba(0, 0, 0, 0.4) !important;
  }

  .main-tab-btn {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  .menu-view {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }

  .menu-inner-wrap {
    flex-direction: column !important;
    padding: 0 12px !important;
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
  }

  .doc-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    background: rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box !important;
  }

  .doc-sidebar-header {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    color: var(--text-main) !important;
    box-sizing: border-box !important;
  }

  .doc-nav {
    display: none !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    margin-top: 4px !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
  }

  .doc-nav.open {
    display: flex !important;
  }

  .doc-nav-btn {
    width: 100% !important;
    height: 40px !important;
    padding: 0 16px !important;
    display: flex;
    align-items: center !important;
    justify-content: flex-start !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    color: var(--text-muted) !important;
  }

  .doc-nav-btn.active {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  .doc-main {
    padding: 16px;
    height: auto !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
  }

  /* 팀 업무 / 주간 업무 정리 내부도 자체 스크롤 대신 페이지 스크롤을 따르도록 */
  #routine-view-content,
  #weekly-report-view-content,
  #goals-view-content {
    height: auto !important;
    overflow-y: visible !important;
  }

  .calendar-goals-banner {
    padding: 15px;
    border-radius: 13px;
  }

  .calendar-goals-content,
  .goals-page-header,
  .goals-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-goals-progress {
    width: 100%;
  }

  .calendar-goals-list {
    width: 100%;
  }

  .goals-month-control {
    align-self: flex-start;
  }

  .goals-section {
    padding: 16px;
  }

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

  .goal-add-form {
    flex-direction: column;
  }

  .goal-add-form button,
  .weekly-goal-card .goal-add-form button {
    width: 100%;
  }

  .weekly-goals-grid {
    grid-template-columns: 1fr;
  }

  .doc-file-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  /* 문서함 테이블 → 모바일 카드형 리스트로 전환 */
  .doc-file-container {
    overflow-x: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .doc-list-table,
  .doc-list-table tbody,
  .doc-list-table tr {
    display: block !important;
    width: 100% !important;
  }

  .doc-list-table thead {
    display: none !important;
  }

  .doc-list-table tr {
    background: rgba(0, 0, 0, 0.18) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 10px 4px !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
  }

  .doc-list-table tr:last-child {
    margin-bottom: 0 !important;
  }

  .doc-list-table td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
    border-bottom: none !important;
    text-align: right !important;
  }

  .doc-list-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
  }

  /* 이름 셀은 라벨 없이 상단에 강조 표시 */
  .doc-list-table td[data-label="이름"] {
    padding-bottom: 10px !important;
    margin-bottom: 4px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  .doc-list-table td[data-label="이름"]::before {
    display: none;
  }

  .doc-table-name-cell {
    width: 100% !important;
  }

  .doc-table-file-name-text {
    max-width: none !important;
    white-space: normal !important;
    word-break: break-all !important;
  }

  .doc-list-table td[data-label="작업"] {
    padding-top: 4px !important;
  }

  .doc-table-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }

  /* 문서함 부제목 여백 축소 */
  .doc-panel-subtitle {
    padding-left: 0 !important;
    margin-top: 4px !important;
    font-size: 0.78rem !important;
  }

  /* 패널 헤더(제목 + 우측 컨트롤)를 좁은 화면에서 가로로 욱여넣지 않고 세로로 쌓기
     → "주간 업무 정리" 제목이 이상하게 줄바꿈되고, 날짜 이동 컨트롤이 화면 밖으로
        잘려나가던 문제 수정 */
  .doc-panel-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .doc-panel-header > div {
    flex: 1 1 100% !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .doc-panel-title {
    font-size: 1.05rem !important;
  }

  .doc-panel-title svg {
    flex-shrink: 0;
  }

  /* 날짜/팀 선택 등 헤더 우측 컨트롤 행: 필요시 줄바꿈, 균등 배치 */
  .doc-panel-header > div[style*="justify-content: flex-end"],
  .doc-panel-header > div[style*="align-items: center"] {
    justify-content: center !important;
  }

  /* 팀 업무: 수행 등록 입력행 세로 스택 */
  .routine-start-row {
    flex-wrap: wrap !important;
  }

  .routine-start-row input {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .routine-start-row button {
    width: 100% !important;
  }

  /* 주간 업무 정리: 미니 캘린더 팝업이 화면 밖으로 잘리지 않도록 폭 제한 */
  #weekly-report-mini-cal-popup {
    width: min(240px, calc(100vw - 48px)) !important;
  }

  /* 모바일 일정 상세 모달 카드 UI 최적화 */
  .modal-task-item {
    padding: 12px !important;
    gap: 8px !important;
  }

  .modal-task-header-meta {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .modal-task-title {
    font-size: 0.95rem !important;
    margin-top: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .modal-task-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    font-size: 0.7rem !important;
  }

  .modal-task-assignment {
    width: 100% !important;
    white-space: normal !important;
    word-break: keep-all !important;
    line-height: 1.4 !important;
  }

  .modal-task-footer-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 4px !important;
  }

  .modal-task-badge {
    font-size: 0.65rem !important;
    padding: 2px 6px !important;
  }

  .btn-task-check {
    margin-left: 0 !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
  }

  .progress-popup {
    left: 0 !important;
    right: auto !important;
  }
}

/* ==================== 17. 주간 업무 정리 스타일 ==================== */
@media (max-width: 768px) {
  .weekly-past-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
}

.weekly-day-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 12px;
}
.weekly-day-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.weekly-day-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekly-task-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 6px;
  gap: 10px;
}

.weekly-task-item > div:first-child {
  flex: 1;
  min-width: 0;
}

.weekly-task-item:last-child {
  margin-bottom: 0;
}

.weekly-task-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: break-word;
}

.weekly-task-title.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.weekly-task-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-all;
  overflow-wrap: break-word;
}

.weekly-task-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.weekly-task-badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.weekly-task-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.weekly-future-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.weekly-future-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.weekly-future-day-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.weekly-future-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weekly-future-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}
