/* 기본 설정 및 초기화 */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  -webkit-tap-highlight-color: transparent; 
}

body { 
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; 
  background: #f8fafc; 
  color: #1e293b; 
  line-height: 1.5; 
}

/* 배경 오버레이 (사이드바 및 모달 오픈 시 배경 블러) */
.overlay { 
  display:none; 
  position:fixed; 
  inset:0; 
  background:rgba(15, 23, 42, 0.4); 
  z-index:100; 
  backdrop-filter: blur(4px); 
}
.overlay.show { 
  display:block; 
}

/* 사이드바 디자인 */
.sidebar {
  position:fixed; 
  top:0; 
  left:-280px; 
  width:280px; 
  height:100%;
  background:#0f172a; 
  color:#fff; 
  transition: transform 0.3s ease; 
  z-index:200; 
  padding-top:60px;
}
.sidebar.open { 
  transform: translateX(280px); 
}

/* 사이드바 헤더 (조장 모드 상태 표시) */
.sidebar-header { 
  padding:24px 20px; 
  font-size:1.1rem; 
  font-weight:900; 
  border-bottom:1px solid rgba(255,255,255,0.1); 
  color: #94a3b8;
}

.sidebar ul { 
  list-style:none; 
}
.sidebar ul li { 
  padding:16px 24px; 
  cursor:pointer; 
  border-bottom:1px solid rgba(255,255,255,0.05); 
  font-weight: 600;
  transition: 0.2s;
}
.sidebar ul li:active {
  background: rgba(255,255,255,0.1);
}
.sidebar ul li small {
  display: block;
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 2px;
}

/* 상단바 (Topbar) */
.topbar {
  position:fixed; 
  top:0; 
  left:0; 
  right:0; 
  height:60px;
  background:#0f172a; 
  color:#fff; 
  display:flex; 
  align-items:center;
  padding:0 20px; 
  z-index:50; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.hamburger { background:none; border:none; color:#fff; font-size:1.8rem; cursor:pointer; margin-right:16px; }

/* ★ 상단바 타이틀 내부 정보 스타일 (배너 대체) ★ */
.topbar-title { 
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
}
.t-icon { font-size: 1.2rem; }
.t-dept { font-weight: 900; letter-spacing: -0.5px; }
.t-date { font-size: 0.85rem; font-weight: 700; color: #94a3b8; margin-left: 2px; }

/* 메인 영역 레이아웃 (배너가 없어졌으므로 상단 여백 조절) */
.main { 
  margin-top:60px; 
  padding:20px; 
  max-width:600px; 
  margin-left:auto; 
  margin-right:auto; 
}

/* 요일 필터 버튼 (다채로운 색상) */
.day-btns { 
  display:flex; 
  gap:8px; 
  margin-bottom: 20px; 
  overflow-x: auto; 
  padding-bottom: 5px; 
  scrollbar-width: none;
}
.day-btns::-webkit-scrollbar { display: none; }
.day-btn {
  flex: 1; 
  min-width:55px; 
  padding:12px 0; 
  border:none;
  background:#fff; 
  border-radius:14px; 
  font-size:0.95rem; 
  font-weight:800;
  color:#64748b; 
  cursor:pointer; 
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* 요일별 액티브 포인트 컬러 */
.day-btn.active.all { background: #1e293b; color: #fff; transform: translateY(-3px); }
.day-btn.active.mon { background: #3b82f6; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4); }
.day-btn.active.tue { background: #10b981; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4); }
.day-btn.active.wed { background: #8b5cf6; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4); }
.day-btn.active.thu { background: #f43f5e; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(244, 63, 94, 0.4); }
.day-btn.active.fri { background: #f59e0b; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4); }

/* 일정/주의사항 추가 버튼 영역 (조장 로그인 시만 노출) */
.action-btns { 
  display:flex; 
  gap:10px; 
  margin-bottom: 20px; 
}
.btn-schedule, .btn-notice {
  flex:1; 
  padding:15px; 
  border:none; 
  border-radius:18px; 
  font-weight:900; 
  cursor:pointer; 
  color:#fff;
  font-size: 0.95rem;
  transition: transform 0.2s;
}
.btn-schedule { background: #3b82f6; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2); }
.btn-notice { background: #f59e0b; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }
.btn-schedule:active, .btn-notice:active { transform: scale(0.97); }

/* 섹션 타이틀 (볼드체 강조) */
.section-title { 
  font-size:1.05rem; 
  font-weight:900; 
  padding:10px 4px; 
  margin-top: 10px; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}
.section-title.blue { color: #3b82f6; }
.section-title.yellow { color: #f59e0b; }

/* 카드 디자인 */
.item-card {
  background:#fff; 
  border-radius:18px; 
  padding:16px 20px; 
  margin-bottom:10px;
  display:flex; 
  justify-content:space-between; 
  align-items:flex-start; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
  transition: 0.3s;
}
.item-card.schedule-card { border-left: 6px solid #3b82f6; }
.item-card.notice-card { border-left: 6px solid #f59e0b; }

/* 실시간 시간이 지났을 때 빨간색 취소선 스타일 */
.item-card.expired { 
  opacity: 0.4 !important; 
}
.item-card.expired .info-body, 
.item-card.expired .info-time, 
.item-card.expired .info-content { 
  text-decoration: line-through !important; 
  text-decoration-color: #ef4444 !important; 
  text-decoration-thickness: 3px !important; 
  color: #94a3b8 !important;
}

.item-info { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  gap: 2px;
  overflow: hidden;
}

/* 요일 디자인: 아주 작게(10px), 연한 회색 */
.info-day { 
  font-size: 10px !important; 
  font-weight: 800 !important; 
  color: #adb5bd !important; 
  display: block;
}

.info-body { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  font-weight: 800; 
  font-size: 1.05rem; 
  color: #1e293b; 
  overflow: hidden;
}
.info-time { 
  color: #475569; 
  background: #f1f5f9; 
  padding: 3px 10px; 
  border-radius: 8px; 
  font-size: 0.85rem; 
  white-space: nowrap;
}
.info-content {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 관리자용 버튼 그룹 (수정/삭제 나란히 배치) */
.admin-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: 10px;
}

/* 수정 버튼 (✏️) 디자인 */
.btn-edit {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
  transition: 0.2s;
}
.btn-edit:hover { opacity: 1; transform: scale(1.1); }

/* 삭제 버튼 (✕) 디자인 */
.btn-del { 
  background:none; 
  border:none; 
  color:#cbd5e1; 
  font-size:1.2rem; 
  cursor:pointer; 
  padding: 4px; 
  transition: 0.2s;
}
.btn-del:hover { color:#ef4444; transform: scale(1.1); }

.empty-msg { 
  text-align:center; 
  color:#94a3b8; 
  padding:30px 0; 
  font-size:.95rem; 
  font-weight: 900; 
}

/* 모달 (조장 로그인 및 입력창) 공통 디자인 */
.modal-bg {
  display:none; 
  position:fixed; 
  inset:0; 
  background:rgba(15, 23, 42, 0.6); 
  z-index:300; 
  align-items:center; 
  justify-content:center; 
  backdrop-filter: blur(8px);
}
.modal-bg.show { 
  display:flex; 
}
.modal {
  background:#fff; 
  border-radius:28px; 
  padding:30px; 
  width:90%; 
  max-width:400px; 
  display:flex; 
  flex-direction:column; 
  gap:20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal h3 { 
  font-size:1.3rem; 
  color:#0f172a; 
  font-weight: 900; 
  text-align: center; 
}
.modal label { 
  display:flex; 
  flex-direction:column; 
  gap:8px; 
  font-size:0.9rem; 
  font-weight:800; 
  color:#475569; 
}
.modal select, .modal textarea, .modal input { 
  padding:14px; 
  border:2px solid #f1f5f9; 
  border-radius:16px; 
  font-size:1rem; 
  font-weight: 700; 
  background:#f8fafc; 
  font-family: inherit;
  transition: border 0.2s;
}
.modal select:focus, .modal textarea:focus, .modal input:focus {
  outline: none;
  border-color: #3b82f6;
}

.modal-btns { 
  display:flex; 
  gap:12px; 
  margin-top:10px; 
}
.btn-cancel { flex:1; padding:16px; border:none; background:#f1f5f9; color:#64748b; border-radius:16px; font-weight:800; cursor:pointer; }
.btn-save { flex:2; padding:16px; border:none; background:#0f172a; color:#fff; border-radius:16px; font-weight:900; cursor:pointer; }

/* 로그인 모달 전용 스타일 */
.login-modal input {
  text-align: center;
  letter-spacing: 5px;
}