@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) {
  .dash-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
  }
  
  .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;
}

/* ============================================================
   메뉴 뷰 (문서함 레이아웃)
   ============================================================ */
.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;
  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;
}

.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;
}

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

.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;
  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;
}

.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;
}

/* 우측 메인 콘텐츠 */
.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;
    height: auto;
    overflow: visible;
  }

  .doc-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 8px 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
  }

  .doc-sidebar-header {
    display: none !important;
  }

  .doc-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding-left: 0 !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
  }

  .doc-nav-btn {
    width: auto !important;
    height: 36px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
  }

  .doc-main {
    padding: 16px;
  }

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

  /* 모바일 일정 상세 모달 카드 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;
  }
}

