/* 레이아웃: header/footer 고정, main만 스크롤 (하단: bottom-nav 56px + footer 44px) */
:root {
  --layout-header-height: 52px;
  --layout-footer-height: 100px;
  --layout-bottom-nav-height: 56px;
  /* 버튼 색상 규칙: Primary=데이터/상태변경, Secondary=이동/조회, Danger=삭제/로그아웃 */
  --btn-primary-bg: #3b82f6;
  --btn-primary-hover: #2563eb;
  --btn-primary-border: #3b82f6;
  --btn-secondary-bg: #e5e5e5;
  --btn-secondary-hover: #ddd;
  --btn-secondary-border: #ccc;
  --btn-secondary-color: #333;
  --btn-danger-bg: #dc2626;
  --btn-danger-hover: #b91c1c;
  --btn-danger-border: #dc2626;
  --btn-danger-color: #fff;
  /* 헤더 배경 (#3372f0) */
  --header-bg: #3372f0;
  --header-border: #2a61d4;
  --header-text: #fff;
  --header-login-bg: #3372f0;
  --header-login-border: #3372f0;
  --header-login-color: #fff;
  --header-login-hover-bg: #2a61d4;
}
body {
  font-family: sans-serif;
  margin: 0;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  padding-bottom: 84px;
}
body * { box-sizing: border-box; }
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--layout-header-height);
  min-height: var(--layout-header-height);
  z-index: 1001;
  border-bottom: 1px solid var(--header-border);
  padding: 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
  background: var(--header-bg);
  overflow: hidden;
}
header h1 { margin: 0; font-size: 1.2rem; color: var(--header-text); }
header h1 a { color: inherit; text-decoration: none; }
header .header-user { font-size: 0.95rem; color: var(--header-text); }
header .header-user a { color: var(--header-text); }
header .header-user a:hover { opacity: 0.9; }
header .header-user a.header-logout-link { color: #ffcccc; }
header .header-user a.header-logout-link:hover { color: #fff; text-decoration: underline; }
.header-login-btn { display: inline-block; padding: 4px 10px; font-size: 0.9rem; text-decoration: none; border-radius: 6px; cursor: pointer; box-sizing: border-box; background: var(--header-login-bg); color: var(--header-login-color) !important; border: 1px solid var(--header-login-border); }
.header-login-btn:hover { background: var(--header-login-hover-bg); color: var(--header-login-color) !important; }
main {
  position: fixed;
  top: var(--layout-header-height);
  left: 0;
  right: 0;
  bottom: var(--layout-footer-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  min-height: 0;
}
footer {
  position: fixed;
  bottom: var(--layout-bottom-nav-height);
  left: 0;
  right: 0;
  width: 100%;
  height: 44px;
  z-index: 999;
  padding: 8px 8px 0 0;
  border-top: 1px solid #ccc;
  font-size: 0.9rem; color: #666;
  background: #fff;
  text-align: right;
}
footer p { margin: 0; }

/* 하단 고정 네비 (bottom-nav) — footer.php 인라인에서 이동 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  z-index: 1000;
  padding: 6px 4px 0;
}
.bottom-nav-credit {
  margin: 0 20px 4px 0;
  text-align: right;
  font-size: 12px;
  color: #666;
}
.bottom-nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  text-decoration: none;
  color: #666;
  font-size: 12px;
  min-width: 0;
}
.bottom-nav-item:hover { color: #111; }
.bottom-nav-item.bottom-nav-active { color: #1E74FF; }
.bottom-nav-item.bottom-nav-active .bottom-nav-icon { color: #1E74FF; }
.bottom-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #111;
}
.bottom-nav-icon svg { display: block; vertical-align: middle; }
.bottom-nav-label { line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* 선휴무 '다른 조' 경고 박스 (접근 제한 / apply 플래시 공통) */
.access-guard-block,
.holiday-warn-box {
  padding: 2em;
  max-width: 480px;
  margin: 2em auto;
  text-align: center;
  border: 1px solid #d4b106;
  border-radius: 8px;
  background: #fffbe6;
  box-sizing: border-box;
}
.access-guard-block .holiday-warn-title,
.holiday-warn-box .holiday-warn-title {
  margin: 0 0 0.5em 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.access-guard-block .holiday-warn-title .holiday-warn-icon,
.holiday-warn-box .holiday-warn-title .holiday-warn-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b45309'%3E%3Cpath d='M12 2L1 21h22L12 2zm0 4l7.5 13h-15L12 6zm-1 4v4h2v-4h-2zm0 6v2h2v-2h-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.access-guard-block .holiday-warn-desc,
.holiday-warn-box .holiday-warn-desc {
  margin: 0 0 1em 0;
  font-size: 0.95rem;
  color: #333;
}
.access-guard-block .holiday-warn-btn,
.holiday-warn-box .holiday-warn-btn {
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #e5e5e5;
  color: #333;
  font-size: 0.95rem;
}
.access-guard-block .holiday-warn-btn:hover,
.holiday-warn-box .holiday-warn-btn:hover {
  background: #ddd;
}

table { border-collapse: collapse; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], textarea, select { margin-left: 4px; }
input[type="file"] { display: inline-block; min-width: 220px; margin-left: 4px; padding: 4px 8px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; }

/* 허브 메인 전용 (최소 스타일) */
.hub-container { max-width: 520px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.hub-section { margin-bottom: 24px; }
.hub-h2 { margin: 0 0 8px 0; font-size: 1rem; font-weight: bold; }

/* 공지사항 요약 (텍스트 리스트, 한 줄 = [📌] 제목   작성자 · MM.DD) */
.hub-notice-section { margin-bottom: 12px; }
.hub-notice-section .hub-h2 { margin-bottom: 4px; }
.hub-notice-list { margin: 0; padding: 0; }
.hub-notice-line { display: block; text-decoration: none; color: inherit; font-size: 0.9rem; line-height: 1.35; padding: 4px 0; margin: 0; border: none; min-height: 28px; box-sizing: border-box; }
.hub-notice-line:hover { color: #06c; }
.hub-notice-line-title { display: inline-block; vertical-align: bottom; }
.hub-notice-line-meta { font-size: 0.75rem; color: #666; margin-left: 6px; white-space: nowrap; }
.hub-notice-empty { margin: 0 0 4px 0; color: #666; font-size: 0.85rem; line-height: 1.3; }
.hub-notice-more { margin: 2px 0 0 0; font-size: 0.75rem; }
.hub-notice-more a { color: #666; text-decoration: none; padding: 4px 0; display: inline-block; line-height: 1.2; }
.hub-notice-more a:hover { text-decoration: underline; color: #333; }

/* 알림 영역 (A조/B조 박스 세로 배치) */
.hub-notification-section { margin-top: 12px; }
.hub-notification-section .hub-h2 { margin-bottom: 4px; }
.hub-alert-box { border: 1px solid #ddd; padding: 10px 12px; margin-bottom: 12px; border-radius: 6px; }
.hub-alert-box h4 { margin: 0 0 6px 0; font-weight: bold; }
.hub-notification-list { margin: 0; padding: 0; list-style: none; }
.hub-notification-line { font-size: 0.9rem; line-height: 1.4; padding: 4px 0; }
.hub-notification-empty { margin: 0; color: #888; font-size: 0.9rem; }

/* 공지 목록 페이지 (notice_list.php) - 텍스트 리스트, 줄간격 좁게, 메인 버튼 */
.notice-list-section { margin-bottom: 16px; }
.notice-list-h2 { margin: 0 0 10px 0; font-size: 1rem; font-weight: bold; }
.notice-list-block { margin: 0; padding: 0; }
.notice-list-item,
.vote-list-wrap .vote-list-item {
  margin: 0 0 10px 0;
  padding: 14px;
  line-height: 1.25;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: #fff;
}
.notice-list-item-title { display: block; font-weight: bold; font-size: 0.95rem; text-decoration: none; color: inherit; margin-bottom: 2px; }
.notice-list-item-title:hover { color: #06c; text-decoration: underline; }
.notice-list-item-meta { margin: 0; padding: 0; font-size: 0.8rem; color: #666; line-height: 1.2; }
.notice-list-empty {
  margin: 0 0 12px 0;
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
}
.notice-list-footer { margin: 20px 0 0 0; text-align: center; }

/* 공지 보기 - 첨부파일 미리보기 */
.notice-attachment-preview { margin-top: 12px; padding: 12px; border: 1px solid #ddd; border-radius: 6px; background: #f9f9f9; }
.notice-preview-label { margin: 0 0 8px 0; font-size: 0.9rem; font-weight: bold; color: #555; }
.notice-preview-img { max-width: 100%; height: auto; max-height: 70vh; display: block; border-radius: 4px; }
.notice-attachment-preview.notice-attachment-image { margin-top: 8px; }
.notice-attachment-preview.notice-attachment-image .notice-preview-img { width: auto; }
.notice-preview-pdf { width: 100%; height: 70vh; min-height: 400px; border: 1px solid #ccc; border-radius: 4px; }

.emergency-line { padding: 4px 0; line-height: 1.6; }
.btn-main { width: 100%; padding: 14px 0; margin-top: 20px; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 6px; border: 1px solid var(--btn-secondary-border); background: var(--btn-secondary-bg); color: var(--btn-secondary-color); box-sizing: border-box; }
.btn-main:hover { background: var(--btn-secondary-hover); color: var(--btn-secondary-color); }
.simple-list { margin-top: 20px; }
.simple-item { margin-bottom: 16px; }
.simple-title { font-weight: bold; font-size: 17px; }
.simple-line { font-size: 15px; margin-top: 4px; }
.vote-list-actions { margin-top: 6px; }
.vote-list-actions .btn-vote-edit, .vote-list-actions .btn-vote-del { margin-right: 8px; padding: 4px 10px; font-size: 0.9rem; cursor: pointer; }
.btn-main-big { width: 100%; margin: 40px 0; padding: 16px 0; font-size: 18px; font-weight: bold; border: 1px solid var(--btn-secondary-border); background: var(--btn-secondary-bg); color: var(--btn-secondary-color); border-radius: 6px; cursor: pointer; text-align: center; box-sizing: border-box; }
.btn-main-big:hover { background: var(--btn-secondary-hover); color: var(--btn-secondary-color); }

/* 투표 목록 페이지 - 모바일 우선, 정보 전달 속도 우선 */
/* 상단 조 선택 탭 */
.vote-list-tabs { margin: 0 0 6px 0; font-size: 1.05rem; font-weight: bold; }
.vote-list-tabs .vote-list-tab { color: #888; text-decoration: none; padding: 8px 10px; display: inline-block; }
.vote-list-tabs .vote-list-tab:hover { color: #555; }
.vote-list-tabs .vote-list-tab-current { color: #d32f2f; font-weight: bold; border-bottom: 2px solid #d32f2f; pointer-events: none; cursor: default; }
.vote-list-tab-sep { color: #ccc; margin: 0 2px; }
.vote-list-page .vote-list-h2 { margin: 0 0 6px 0; font-size: 0.95rem; font-weight: bold; }
.vote-list-page > p { margin: 0 0 4px 0; }
/* 하단 버튼 + footer 겹침 방지: 버튼을 footer 위에 고정, main에 여유 확보 */
main:has(.vote-list-footer),
main:has(.holiday-list-footer) { padding-bottom: 96px; }
.vote-list-wrap { margin-top: 4px; }
.vote-list-wrap .vote-list { margin-top: 2px; list-style: none; padding: 0; margin: 0; }
.vote-list-wrap .vote-list-item { margin-bottom: 10px; line-height: 1.3; }
/* 투표 제목: [A 휴무투표] + 날짜 */
.vote-list-title-line { margin: 0 0 2px 0; }
.vote-list-title-tag { font-size: 0.9em; color: #666; margin-right: 4px; }
.vote-list-title-date { font-size: 1.1rem; font-weight: bold; color: #111; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote-list-title-date:hover { text-decoration: underline; }
.vote-list-title-date-closed { color: #888; text-decoration: line-through; }
.vote-list-title-date-closed:hover { color: #666; text-decoration: line-through underline; }
/* 상태 문구 (한 줄, bold 금지, 색상만) */
.vote-list-status { font-size: 0.8rem; margin: 0 0 4px 0; font-weight: normal; }
.vote-list-status-scheduled { color: #d32f2f; }
.vote-list-status-open { color: #2e7d32; }
.vote-list-status-closed { color: #d32f2f; }
.vote-list-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.vote-list-meta .vote-list-status { margin: 0; }
.vote-list-delete-form { margin: 0; display: inline; }
.vote-list-delete-btn { padding: 2px 8px; font-size: 12px; line-height: 1.2; height: auto; min-height: unset; cursor: pointer; background: var(--btn-danger-bg); border: 1px solid var(--btn-danger-border); color: var(--btn-danger-color); border-radius: 4px; box-sizing: border-box; }
.vote-list-delete-btn:hover { background: var(--btn-danger-hover); color: var(--btn-danger-color); }
.vote-list-wrap .vote-list-actions { margin-top: 4px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.vote-list-wrap .vote-list-actions form { margin: 0; display: inline; }
.vote-list-wrap .btn-vote-edit, .vote-list-wrap .btn-vote-del { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 26px; padding: 0 8px; font-size: 11px; border-radius: 4px; box-sizing: border-box; }
.vote-list-wrap .btn-vote-edit { background: var(--btn-secondary-bg); border: 1px solid var(--btn-secondary-border); color: var(--btn-secondary-color); text-decoration: none; }
.vote-list-wrap .btn-vote-edit:hover { background: var(--btn-secondary-hover); }
.vote-list-wrap .btn-vote-del { background: var(--btn-danger-bg); border: 1px solid var(--btn-danger-border); color: var(--btn-danger-color); cursor: pointer; }
.vote-list-wrap .btn-vote-del:hover { background: var(--btn-danger-hover); color: var(--btn-danger-color); }
/* 하단 고정: 메인으로(보조) < 투표 등록(관리) 크기 */
/* 하단 고정 버튼 영역 - 두 버튼 완전 동일 크기·무게 */
.vote-list-footer { position: fixed; bottom: var(--layout-footer-height); left: 0; right: 0; display: flex; justify-content: center; align-items: stretch; gap: 10px; padding: 10px 12px; background: #fff; border-top: 1px solid #ddd; box-sizing: border-box; }
.vote-list-footer .btn-vote-main { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 12px 16px; font-size: 14px; font-weight: 500; border-radius: 6px; box-sizing: border-box; background: var(--btn-secondary-bg); border: 1px solid var(--btn-secondary-border); color: var(--btn-secondary-color); text-decoration: none; display: flex; align-items: center; justify-content: center; text-align: center; }
.vote-list-footer .btn-vote-main:hover { background: var(--btn-secondary-hover); }
.vote-list-footer .btn-vote-main:only-child { flex: 1 1 auto; max-width: none; }
.vote-list-footer-form { margin: 0; flex: 1 1 0; min-width: 0; display: flex; }
.vote-list-footer-form .btn-vote-create, .vote-list-footer > .btn-vote-create { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 12px 16px; font-size: 14px; font-weight: 500; border-radius: 6px; box-sizing: border-box; background: var(--btn-primary-bg); border: 1px solid var(--btn-primary-border); color: #fff; cursor: pointer; text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.vote-list-footer-form .btn-vote-create:hover, .vote-list-footer > .btn-vote-create:hover { background: var(--btn-primary-hover); }

/* 투표 상세(view) 본문 버튼 - Primary(저장/투표하기/시작/마감 등) */
.btn-vote-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background: var(--btn-primary-bg);
    border: 1px solid var(--btn-primary-border);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 40px;
}
.btn-vote-submit:hover { background: var(--btn-primary-hover); color: #fff; }
.btn-vote-submit.btn-block { width: 100%; display: flex !important; align-items: center !important; justify-content: center !important; }
.form-container .btn-vote-submit.btn-block { display: flex !important; align-items: center !important; justify-content: center !important; }
.vote-view-btn-row { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.vote-view-btn-row .btn-vote-edit-admin { display: inline-flex; align-items: center; padding: 8px 16px; font-size: 14px; font-weight: 500; background: var(--btn-primary-bg); border: 1px solid var(--btn-primary-border); color: #fff; border-radius: 4px; text-decoration: none; box-sizing: border-box; min-height: 40px; }
.vote-view-btn-row .btn-vote-edit-admin:hover { background: var(--btn-primary-hover); color: #fff; }
.vote-view-btn-row .btn-vote-delete-admin { display: inline-flex; align-items: center; padding: 8px 16px; font-size: 14px; font-weight: 500; background: var(--btn-danger-bg); border: 1px solid var(--btn-danger-border); color: var(--btn-danger-color); border-radius: 4px; cursor: pointer; box-sizing: border-box; min-height: 40px; }
.vote-view-btn-row .btn-vote-delete-admin:hover { background: var(--btn-danger-hover); color: #fff; }
.vote-view-btn-row form { display: inline; margin: 0; }
/* 예약투표 버튼 - 녹색 계열 */
.vote-view-page .vote-footer-admin .btn-reserve { padding: 8px 16px; font-size: 14px; border-radius: 4px; display: inline-flex; align-items: center; background: #28a745 !important; border: 1px solid #28a745 !important; color: #fff !important; cursor: pointer; }
.vote-view-page .vote-footer-admin .btn-reserve:hover { background: #218838 !important; border-color: #1e7e34 !important; color: #fff !important; }
.form-container .radio-group { margin-bottom: 6px; }
.form-container .radio-group .radio-label { font-weight: normal; margin-right: 8px; }
.form-container .radio-group .help-inline { font-size: 0.85rem; color: #666; }
.vote-view-page .vote-view-help { margin: 0 0 8px 0; font-size: 0.9rem; color: #666; }

/* 투표 상세(view) 페이지 - list와 동일 UX/스타일 */
.vote-view-page { margin-bottom: 0; }
.vote-view-page .vote-view-title { margin: 0 0 4px 0; font-size: 1.1rem; font-weight: bold; }
.vote-view-page .vote-list-status { margin: 0 0 8px 0; }
.reserve-notice-strong { font-size: 28px !important; color: #155724 !important; background: #e6f4ea !important; padding: 18px 20px !important; border-radius: 10px !important; text-align: center !important; margin: 20px 0 !important; letter-spacing: 0.5px !important; display: flex !important; flex-direction: column !important; align-items: center !important; }
.reserve-notice-strong .reserve-notice-main { font-weight: 700 !important; display: block !important; word-break: keep-all !important; }
.reserve-notice-strong .reserve-notice-rel { font-weight: 700 !important; }
.reserve-notice-strong .reserve-notice-time { font-weight: 900 !important; }
.reserve-notice-strong .reserve-notice-sub { font-size: 0.9rem !important; margin-top: 7px !important; color: #155724 !important; font-weight: normal !important; display: block !important; }
@media (max-width: 768px) { .reserve-notice-strong { font-size: 22px !important; } .reserve-notice-strong .reserve-notice-main { word-wrap: break-word !important; } }
.vote-view-label { margin: 0 0 4px 0; font-size: 0.9rem; color: #666; }
.vote-view-option { font-weight: normal; }
.vote-view-option-disabled { color: #888; cursor: default; }
.vote-view-option-disabled input:disabled { cursor: default; }
.vote-view-admin-form { margin-top: 8px; }

/* 투표 상세 - 날짜 선택 리스트 (선휴무 목록 스타일 통일) */
.vote-view-page .vote-date-list { margin-top: 6px; }
.vote-view-page .vote-date-list .vote-date-item { margin-bottom: 12px; }
.vote-view-page .vote-date-list .vote-date-item:last-child { margin-bottom: 0; }
.vote-view-page .vote-date-list .vote-date-item:not(:has(.vote-date-option)) .notice-list-item-title:hover { color: inherit; text-decoration: none; }
.vote-view-page .vote-date-option { display: block; cursor: pointer; }
.vote-view-page .vote-date-option.vote-view-option-disabled { cursor: not-allowed; pointer-events: none; color: #888; }
.vote-view-page .vote-date-option.vote-view-option-disabled .notice-list-item-title:hover { color: inherit; text-decoration: none; }
.vote-view-page .vote-date-option input[type="radio"],
.vote-view-page .vote-date-option input[type="checkbox"] { margin-right: 6px; vertical-align: middle; }
.vote-view-page .vote-date-option .notice-list-item-title { display: inline; }
.vote-view-page .vote-date-option .notice-list-item-meta { margin-top: 2px; }
.vote-view-page .vote-date-state.vote-progress-open { color: #2e7d32; }
.vote-view-page .vote-date-state.vote-progress-full { color: #c00; }

.vote-open {
    color: #2e7d32;
    font-weight: 600;
}

/* SCHEDULED 화면 항목 줄 색상 */
.vote-item-line { padding: 10px 0; border-bottom: 1px solid #eee; line-height: 1.5; }
.vote-item-line:last-child { border-bottom: none; }
.vote-item-line.is-open { color: #2e7d32; font-weight: 600; }
.vote-item-line.is-closed { color: #999; }

.vote-progress-section { margin-top: 1.25em; padding-top: 0.5em; }
.vote-progress-section .vote-progress-title { margin: 0 0 0.5em 0; font-size: 1rem; font-weight: bold; }
.vote-progress-section .vote-progress-line { margin: 0 0 0.35em 0; font-size: 0.95rem; line-height: 1.4; }

/* 선휴무 목록 - 탭·하단 버튼 (vote와 동일 UX/스타일) */
.holiday-list-page { margin-bottom: 0; }
.holiday-list-tabs { margin: 0 0 6px 0; font-size: 1.05rem; font-weight: bold; }
.holiday-list-tabs .holiday-list-tab { color: #888; text-decoration: none; padding: 8px 10px; display: inline-block; }
.holiday-list-tabs .holiday-list-tab:hover { color: #555; }
.holiday-list-tabs .holiday-list-tab-current { color: #d32f2f; border-bottom: 2px solid #d32f2f; cursor: default; pointer-events: none; }
.holiday-list-tab-sep { color: #ccc; margin: 0 2px; }
.holiday-list-flash { margin: 0 0 4px 0; }
.holiday-list-header { display: block; margin-bottom: 10px; }
.holiday-list-h2 { margin: 0; font-size: 1rem; font-weight: bold; }
.holiday-list-footer { position: fixed; bottom: var(--layout-footer-height); left: 0; right: 0; display: flex; justify-content: center; align-items: stretch; gap: 10px; padding: 10px 12px; background: #fff; border-top: 1px solid #ddd; box-sizing: border-box; z-index: 999; }
.holiday-list-footer .holiday-list-btn-main { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 12px 16px; font-size: 14px; font-weight: 500; border-radius: 6px; box-sizing: border-box; background: var(--btn-secondary-bg); border: 1px solid var(--btn-secondary-border); color: var(--btn-secondary-color); text-decoration: none; display: flex; align-items: center; justify-content: center; text-align: center; }
.holiday-list-footer .holiday-list-btn-main:hover { background: var(--btn-secondary-hover); }
.holiday-list-footer .holiday-list-btn-apply:not(.schedule-footer-placeholder) { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 12px 16px; font-size: 14px; font-weight: 500; border-radius: 6px; box-sizing: border-box; background: var(--btn-primary-bg); border: 1px solid var(--btn-primary-border); color: #fff; text-decoration: none; display: flex; align-items: center; justify-content: center; text-align: center; }
.holiday-list-footer .holiday-list-btn-apply:not(.schedule-footer-placeholder):hover { background: var(--btn-primary-hover); color: #fff; }
.holiday-list-footer .schedule-footer-placeholder { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 12px 16px; font-size: 14px; font-weight: 500; border-radius: 6px; box-sizing: border-box; background: var(--btn-secondary-bg); border: 1px solid var(--btn-secondary-border); color: var(--btn-secondary-color); display: flex; align-items: center; justify-content: center; text-align: center; opacity: 0.6; pointer-events: none; cursor: default; }
.holiday-list-header .holiday-list-title { margin: 0; }
/* 선휴무 목록 - 소형 버튼 공통 (선택삭제와 동일 크기) */
.holiday-btn-sm { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; font-size: 12px; line-height: 1.2; border-radius: 3px; border: 1px solid; cursor: pointer; text-decoration: none; box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; white-space: nowrap; }
.holiday-btn-sm.holiday-actions-approve { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.holiday-btn-sm.holiday-actions-approve:hover { background: #2563eb; border-color: #2563eb; }
.holiday-btn-sm.holiday-actions-reject,
.holiday-btn-sm.holiday-actions-delete,
.holiday-btn-sm.holiday-btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.holiday-btn-sm.holiday-actions-reject:hover,
.holiday-btn-sm.holiday-actions-delete:hover,
.holiday-btn-sm.holiday-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.holiday-btn-sm.holiday-actions-cancel { background: #6b7280; border-color: #6b7280; color: #fff; }
.holiday-btn-sm.holiday-actions-cancel:hover { background: #4b5563; border-color: #4b5563; }
.holiday-btn-sm.holiday-actions-edit { background: #6b7280; border-color: #6b7280; color: #fff; }
.holiday-btn-sm.holiday-actions-edit:hover { background: #4b5563; border-color: #4b5563; }
.holiday-btn-sm.admin-manage-summary { background: #f1f3f5; border-color: #ccc; color: #333; }
.holiday-btn-sm.admin-manage-summary:hover { background: #e9ecef; }
.admin-manage-summary { list-style: none; -webkit-appearance: none; appearance: none; }
.admin-manage-summary::-webkit-details-marker { display: none; }
.admin-manage-summary::marker { display: none; }
.admin-manage-summary::-moz-list-bullet { display: none; }
/* 선휴무 목록 - 제목 줄: 왼쪽 날짜/이름/상태, 오른쪽 버튼 그룹 */
.holiday-list-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.holiday-list-title-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holiday-actions-row { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.holiday-actions-form-inline { margin: 0; display: inline; }
.holiday-actions-form { margin: 0; }
.admin-manage-menu { display: inline-block; }
.admin-manage-menu-inner { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; padding: 8px; background: #fff; border: 1px solid #ddd; border-radius: 3px; min-width: 80px; }
.admin-manage-menu-inner .holiday-btn-sm { display: flex; width: 100%; }
/* 선휴무 목록 - 검색 (목록/페이지네이션 하단) */
.search-wrapper {
    text-align: center;
    margin: 30px 0;
}
.search-wrapper form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.search-wrapper input[type="text"] {
    width: 220px;
    max-width: 70%;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.search-wrapper button[type="submit"] {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 3px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}
.search-wrapper button[type="submit"]:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}
/* 선휴무 관리(delete_select) - 항목 행: 체크박스+이름+수정버튼 */
.holiday-delete-select-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.holiday-delete-select-item-label { display: flex; align-items: center; flex: 1; min-width: 0; }
.holiday-delete-select-edit-btn { flex-shrink: 0; }
/* 상태 배지 통일 */
.badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.badge-success { background: #e6f9f0; color: #16a34a; }
.badge-danger { background: #fde8e8; color: #dc2626; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-info { background: #e0f2fe; color: #2563eb; }
/* 기존 상태 클래스 → 배지 스타일 매핑 */
.vote-list-status,
.hl-status,
.badge-vote-open {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  display: inline-block;
}
.vote-list-status-scheduled,
.hl-status.hl-status-no { background: #fde8e8; color: #dc2626; }
.vote-list-status-open,
.hl-status.hl-status-ok { background: #e6f9f0; color: #16a34a; }
.vote-list-status-closed { background: #f3f4f6; color: #6b7280; }
.hl-status:not(.hl-status-ok):not(.hl-status-no),
.badge-vote-open { background: #e0f2fe; color: #2563eb; }
.hl-status { margin-left: 2px; }
.holiday-list-actions { margin: 6px 0 0 0; }
.holiday-list-actions form { display: inline; margin-right: 8px; }
.holiday-list-actions .btn-holiday-compact { display: inline-flex; align-items: center; padding: 8px 16px; font-size: 14px; line-height: 1.3; border-radius: 6px; border: 1px solid; cursor: pointer; margin-right: 8px; min-height: 40px; box-sizing: border-box; }
.holiday-list-actions .btn-holiday-approve { background: #3b82f6 !important; border-color: #3b82f6 !important; color: #fff !important; }
.holiday-list-actions .btn-holiday-approve:hover { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
.holiday-list-actions .btn-holiday-reject { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.holiday-list-actions .btn-holiday-reject:hover { background: #b91c1c !important; border-color: #b91c1c !important; color: #fff !important; }
.btn-notice-main { display: inline-block; padding: 10px 20px; font-size: 0.9rem; font-weight: normal; text-decoration: none; color: var(--btn-secondary-color); background: var(--btn-secondary-bg); border: 1px solid var(--btn-secondary-border); border-radius: 6px; cursor: pointer; box-sizing: border-box; }
.btn-notice-main:hover { background: var(--btn-secondary-hover); color: var(--btn-secondary-color); }

.hub-cards { display: table; width: 100%; border-collapse: separate; border-spacing: 12px 0; margin-bottom: 20px; }
.hub-card { display: table-cell; width: 50%; vertical-align: top; border: 1px solid #333; background: #fafafa; }
.hub-card-title { font-weight: bold; text-align: center; padding: 10px; border-bottom: 1px solid #333; background: #eee; }
.hub-card-list { list-style: none; margin: 0; padding: 10px; }
.hub-card-list li { margin: 6px 0; }
.hub-card-list a { display: block; padding: 6px 8px; border: 1px solid #999; background: #fff; text-align: center; text-decoration: none; color: #000; }
.hub-card-list a:hover { background: #f2f2f2; }
.hub-login-wrap { max-width: 360px; width: 100%; margin: 24px auto; }
.hub-login-btn { display: block; width: 100%; padding: 10px; border-radius: 4px; text-align: center; text-decoration: none; color: #000; border: 1px solid #999; background: #fff; box-sizing: border-box; }
.hub-login-btn:hover { background: #f2f2f2; }

/* 관리자 메인 메뉴 */
.admin-menu-list { list-style: none; margin: 0; padding: 0; }
.admin-menu-list li { margin: 6px 0; }
.admin-menu-list a { display: block; padding: 10px 12px; border: 1px solid #999; background: #fff; text-decoration: none; color: #000; }
.admin-menu-list a:hover { background: #f2f2f2; }
.admin-back { margin-top: 20px; font-size: 0.95rem; }
.admin-back a { color: #666; text-decoration: none; }
.admin-back a:hover { text-decoration: underline; }
.log-content { overflow-x: auto; max-height: 70vh; overflow-y: auto; background: #f5f5f5; padding: 12px; font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; }

/* 인원관리·회원 수정 (모바일 대응) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.member-table {
  min-width: 900px;
  border-collapse: collapse;
  table-layout: auto;
}
.member-table th,
.member-table td {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  padding: 8px 10px;
}

/* 회원 목록 테이블 세로 확장형 (member_list 전용, 가로스크롤 제거) */
.member-list-page .table-wrap {
  width: 100%;
  overflow-x: hidden;
  margin-top: 0.25em;
}
.member-list-page .member-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.3;
  border: 1px solid #d1d5db;
}
.member-list-page .member-table th,
.member-list-page .member-table td {
  text-align: center;
  vertical-align: middle;
  padding: 4px 6px;
  font-size: 13px;
  line-height: 1.3;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  word-break: break-all;
}
.member-list-page .member-table th:nth-child(1),
.member-list-page .member-table td:nth-child(1) { width: 8%; }   /* 등급 */
.member-list-page .member-table th:nth-child(2),
.member-list-page .member-table td:nth-child(2) { width: 6%; }   /* 조 */
.member-list-page .member-table th:nth-child(3),
.member-list-page .member-table td:nth-child(3) { width: 14%; }  /* 아이디 */
.member-list-page .member-table th:nth-child(4),
.member-list-page .member-table td:nth-child(4) { width: 24%; word-break: break-word; } /* 이름 */
.member-list-page .member-table th:nth-child(5),
.member-list-page .member-table td:nth-child(5) { width: 8%; }   /* 상태 */
.member-list-page .member-table th:nth-child(6),
.member-list-page .member-table td:nth-child(6) { width: 14%; }  /* 입사일 */
.member-list-page .member-table th:nth-child(7),
.member-list-page .member-table td:nth-child(7) { width: 12%; }  /* 수정 */
.member-list-page .member-table th:nth-child(8),
.member-list-page .member-table td:nth-child(8) { width: 14%; }  /* 삭제 */
.member-list-page .member-table thead th {
  background: #f3f4f6;
  font-weight: 600;
}
.member-list-page .member-list-delete-btn {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: underline;
  padding: 0;
}
.member-list-page .member-list-delete-btn:hover { color: #991b1b; }

.member-list-delete-btn {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
  white-space: nowrap;
}
.member-list-delete-btn:hover { color: #991b1b; }

.member-list-wrap { width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: auto; }
.member-list-table { width: 100%; max-width: 100%; table-layout: auto; }
.member-list-wrap form p { margin: 12px 0; }
.member-list-wrap form label { display: block; margin-bottom: 4px; }
.member-list-wrap form input[type="text"],
.member-list-wrap form input[type="email"],
.member-list-wrap form input[type="date"],
.member-list-wrap form select { width: 100%; max-width: 100%; box-sizing: border-box; padding: 8px 10px; }
.member-list-wrap form button { padding: 10px 16px; }

.required { color: red; margin-left: 4px; }

.form-container { max-width: 480px; width: 100%; margin: 0 auto; padding: 32px 20px; box-sizing: border-box; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.form-container h2 { text-align: center; margin-bottom: 24px; font-size: 1.35rem; font-weight: 600; color: #111; }
.form-container .form-error { color: #c00; margin-bottom: 16px; font-size: 0.9rem; }
.form-container .form-success { color: #0a0; margin-bottom: 16px; font-size: 0.9rem; }
.form-container .form-hint { color: #666; font-size: 0.9rem; margin-bottom: 8px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; color: #374151; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea,
.form-group select { width: 100%; max-width: 100%; min-width: 0; padding: 10px 12px; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #3b82f6; }
.form-group input[type="checkbox"] { margin-right: 8px; }
.form-group input.form-control + input.form-control { margin-top: 6px; }
.form-input-width { width: 100%; max-width: 320px; box-sizing: border-box; }
.form-group .inline-label { display: inline-block; margin-left: 12px; font-weight: normal; }
.form-button { width: 100%; padding: 12px; background: var(--btn-primary-bg); color: #fff; border: 1px solid var(--btn-primary-border); font-size: 16px; font-weight: 500; border-radius: 6px; cursor: pointer; box-sizing: border-box; }
.form-button:hover { background: var(--btn-primary-hover); color: #fff; }
/* 로그인 페이지 전용: 버튼 색상을 헤더 배경과 동일하게 */
.form-container.login-page .form-button { background: var(--header-bg); border-color: var(--header-bg); }
.form-container.login-page .form-button:hover { background: var(--header-border); border-color: var(--header-border); color: #fff; }
.form-footer { text-align: center; margin-top: 20px; font-size: 0.95rem; }
.form-footer a { color: #374151; text-decoration: underline; }
.form-footer a:hover { color: #111; }

/* 회원가입/회원등록 모바일 최적화: label+input 한 줄, 줄간격 최소화 */
.form-container .form-row { display: flex; align-items: center; margin-bottom: 6px; }
.form-container .form-row label { width: 100px; flex-shrink: 0; margin: 0; font-size: 14px; font-weight: 500; color: #374151; }
.form-container .form-row input,
.form-container .form-row select,
.form-container .form-row .form-row-input-wrap input { flex: 1; min-width: 0; height: 34px; font-size: 14px; padding: 4px 6px; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 4px; }
.form-container .form-row input:focus,
.form-container .form-row select:focus,
.form-container .form-row .form-row-input-wrap input:focus { outline: none; border-color: #3b82f6; }
.form-container .form-row.form-row-btn { margin-top: 10px; margin-bottom: 0; }
.form-container .form-row.form-row-btn .form-button { flex: 1; padding: 8px 16px; font-size: 14px; height: auto; min-height: 36px; }
/* 회원가입: 쿠팡앱 아이디 행 – 라벨 한 줄, 보조 문구 입력창 위 */
.form-container .form-row.form-row-login-id { align-items: flex-start; }
.form-container .form-row.form-row-login-id label.form-label-nowrap { white-space: nowrap; }
.form-container .form-row .form-row-input-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.form-container .form-row .form-row-input-wrap input { width: 100%; }
.form-container .form-row .form-helper-inline { display: block; font-size: 12px; line-height: 1.3; color: #777; margin: 0 0 4px 0; }
/* 회원가입: 아이디 입력란 아래 안내 문구 (입력란 폭과 동일 정렬) */
.form-container .form-row.form-row-hint { display: flex; align-items: flex-start; margin-bottom: 6px; margin-top: 0; }
.form-container .form-hint-offset { width: 100px; flex-shrink: 0; }
.form-container .form-field-hint { flex: 1; min-width: 0; margin: 0; margin-top: 5px; font-size: 12px; line-height: 1.35; color: #777; }

.help-text { font-size: 0.85rem; color: #6b7280; margin-bottom: 12px; }

/* 4단계: 인라인 스타일 대체용 유틸 */
.text-error { color: #c00; }
.text-success { color: #0a0; }
.text-muted { color: #888; }
.flash-msg { margin: 0 0 8px 0; }
.flash-msg.flash-error { color: #c00; }
.flash-msg.flash-success { color: #0a0; }
.holiday-list-flash.flash-error { color: #c00; margin: 0 0 8px 0; }
.holiday-list-flash.flash-success { color: #0a0; margin: 0 0 4px 0; }
.form-inline { display: inline; }
.form-inline-ml { display: inline; margin-left: 6px; }
.input-width-160 { width: 160px; box-sizing: border-box; }
.input-width-400 { width: 400px; max-width: 100%; box-sizing: border-box; }
.hr-spacer { margin: 24px 0; }
.holiday-apply-admin-link { margin-top: 16px; }
.btn-admin-link { display: inline-block; padding: 8px 12px; background-color: #4e73df; color: #fff; text-decoration: none; border-radius: 6px; }
.btn-admin-link:hover { color: #fff; opacity: 0.9; }
.btn-holiday-action { font-size: 15px; padding: 5px 12px; line-height: 1.3; border-radius: 4px; margin-right: 6px; margin-top: 4px; }
.holiday-approve-direct-title { margin-top: 1.5em; }
.select-medium { font-size: 16px; padding: 8px 12px; min-width: 180px; }
.select-wide { font-size: 18px; padding: 10px 14px; min-width: 240px; }
.notice-file-hint { margin-left: 8px; color: #666; }
.form-footer-id { margin-bottom: 12px; }
.notice-list-footer-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; }

.card { background: #f5f5f5; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; border: 1px solid #e5e7eb; }
.card label { margin-bottom: 6px; }
.card .holiday-row-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.card .holiday-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card .holiday-row-header label { margin-bottom: 0; }
.card .holiday-date { flex: 1; min-width: 0; max-width: 100%; }
.card .input-cap { width: 72px; }
.btn-sm { padding: 6px 12px; font-size: 0.875rem; }

/* 공통 버튼: Primary=데이터/상태변경, Secondary=이동/조회, Danger=삭제/로그아웃 */
.btn,
.holiday-btn-sm,
.notice-btn,
.btn-notice-main,
.vote-btn,
.vote-list-wrap .btn-vote-edit,
.vote-list-wrap .btn-vote-del {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.btn { cursor: pointer; border: 1px solid; text-align: center; }
.btn-primary { background: var(--btn-primary-bg); color: #fff; border-color: var(--btn-primary-border); }
.btn-primary:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); color: #fff; }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-color); border-color: var(--btn-secondary-border); }
.btn-secondary:hover { background: var(--btn-secondary-hover); color: var(--btn-secondary-color); }
.btn-danger { background: var(--btn-danger-bg); color: var(--btn-danger-color); border-color: var(--btn-danger-border); }
.btn-danger:hover { background: var(--btn-danger-hover); border-color: var(--btn-danger-hover); color: var(--btn-danger-color); }
.btn-outline { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-outline:hover { background: #f3f4f6; }
.btn-block { width: 100%; display: block; }

.vote-create-form { max-width: 480px; }
.vote-create-title { font-weight: 700; margin-bottom: 24px; }

/* 투표 생성 – 후보 항목 compact row (모바일 밀도) */
#holiday_rows .option-row {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
}
#holiday_rows .option-label {
    font-size: 12px;
    min-width: 42px;
    flex-shrink: 0;
}
#holiday_rows .option-date {
    flex: 1;
    min-width: 0;
    height: 36px;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}
#holiday_rows .option-capacity {
    width: 64px;
    height: 36px;
    font-size: 13px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    flex-shrink: 0;
}
#holiday_rows .btn-delete {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--btn-danger-border);
    border-radius: 4px;
    background: var(--btn-danger-bg);
    color: var(--btn-danger-color);
    cursor: pointer;
    flex-shrink: 0;
}
#holiday_rows .btn-delete:hover {
    background: var(--btn-danger-hover);
    color: var(--btn-danger-color);
}
.btn-add-option {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px;
    padding: 0 16px;
    line-height: 1;
    box-sizing: border-box;
}
.btn-add-option.btn-block {
    width: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.form-container .btn-add-option.btn-block {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 투표 생성 - 휴무 달력 */
.vote-calendar { border-collapse: collapse; margin: 12px 0; font-size: 0.9rem; }
.vote-calendar caption { font-weight: bold; margin-bottom: 6px; }
.vote-calendar th, .vote-calendar td { border: 1px solid #ccc; padding: 6px 8px; text-align: center; min-width: 32px; }
.vote-calendar .vote-cal-day { cursor: pointer; background: #fff; }
.vote-calendar .vote-cal-day:hover { background: #e8f4ff; }
.vote-calendar .vote-cal-day.selected { background: #3b82f6; color: #fff; }
.vote-calendar .vote-cal-past { background: #f0f0f0; color: #999; }
#holiday_calendar_wrap { margin: 8px 0; }
#holiday_calendar_wrap table { display: inline-table; margin-right: 16px; vertical-align: top; }
.vote-option-count { margin-bottom: 12px; font-size: 1rem; }

/* 선휴무 신청 - 날짜별 추가 폼 (모바일 우선) */
.holiday-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; }
.holiday-add-row label { margin: 0; }
.holiday-add-row input[type="date"],
.holiday-add-row input[type="text"] { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 4px; min-width: 0; }
.holiday-add-row input[type="text"] { flex: 1; min-width: 100px; }
.holiday-add-row .btn-add { padding: 8px 14px; border: 1px solid var(--btn-primary-border); background: var(--btn-primary-bg); color: #fff; border-radius: 4px; cursor: pointer; font-size: 0.95rem; }
.holiday-add-row .btn-add:hover { background: var(--btn-primary-hover); color: #fff; }
#holiday-list li, #reg-holiday-list li { padding: 6px 0; border-bottom: 1px solid #eee; }
#holiday-list .btn-del, #reg-holiday-list .btn-del, #reg-holiday-list .reg-btn-del { margin-left: 8px; padding: 4px 10px; font-size: 0.85rem; background: var(--btn-danger-bg); border: 1px solid var(--btn-danger-border); color: var(--btn-danger-color); cursor: pointer; border-radius: 4px; }
#holiday-list .btn-del:hover, #reg-holiday-list .btn-del:hover, #reg-holiday-list .reg-btn-del:hover { background: var(--btn-danger-hover); color: var(--btn-danger-color); }

/* 선휴무 신청/승인 - 항목 추가 행 (vote/create와 동일 구조) */
#holiday-rows .option-row, #reg-holiday-rows .option-row { display: flex; gap: 6px; align-items: center; padding: 8px; margin-bottom: 6px; border: 1px solid #e5e7eb; border-radius: 4px; flex-wrap: wrap; }
#holiday-rows .option-label, #reg-holiday-rows .option-label { font-size: 12px; min-width: 42px; flex-shrink: 0; }
#holiday-rows .holiday-date, #reg-holiday-rows .holiday-date { flex: 0 0 auto; min-width: 120px; height: 36px; font-size: 13px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; }
#holiday-rows .holiday-reason, #reg-holiday-rows .holiday-reason { flex: 1; min-width: 100px; height: 36px; font-size: 13px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; }
#holiday-rows .holiday-del-btn, #reg-holiday-rows .holiday-del-btn { padding: 4px 8px; font-size: 12px; border: 1px solid var(--btn-danger-border); border-radius: 4px; background: var(--btn-danger-bg); color: var(--btn-danger-color); cursor: pointer; flex-shrink: 0; }
#holiday-rows .holiday-del-btn:hover, #reg-holiday-rows .holiday-del-btn:hover { background: var(--btn-danger-hover); color: var(--btn-danger-color); }
@media (max-width: 400px) {
    .holiday-add-row { flex-direction: column; align-items: stretch; }
    .holiday-add-row input[type="date"],
    .holiday-add-row input[type="text"] { width: 100%; }
}

/* 모바일 여백 정리 */
@media (max-width: 768px) {
  .container,
  .holiday-list-page,
  .notice-list-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* 모바일 화면 대응 */
@media (max-width: 640px) {
    body { margin: 0 6px; }
    main { padding: 0 2px; }
    .form-container { margin: 16px auto; padding: 20px 12px; max-width: 100%; }
    .member-list-wrap { padding: 0 2px; }
    .btn-block { width: 100%; }
    .btn-add-option.btn-block,
    .btn-vote-submit.btn-block { display: flex !important; align-items: center !important; justify-content: center !important; }
}
@media (max-width: 480px) {
    .vote-create-form .form-group { margin-bottom: 12px; }
    .vote-create-form .help-text { margin-bottom: 6px; font-size: 12px; }
    .vote-create-title { margin-bottom: 16px; }
}

/* 하단 고정 네비: 콘텐츠가 가리지 않도록 main 하단 여백 (nav 56px + 여유) */
main { padding-bottom: 80px; }

/* 투표 목록 반응형: 모바일 4컬럼 / 데스크톱 기존 구조 (PC 기본, 768px 이하에서 모바일만 표시) */
.vote-list-mobile { display: none; }
.vote-list-desktop { display: table; }
@media (max-width: 768px) {
    .vote-list-mobile { display: table; }
    .vote-list-desktop { display: none; }
}
.vote-table { width: 100%; }
.vote-list-mobile .vote-table td:first-child { width: 1%; white-space: nowrap; }
.vote-list-mobile .vote-table a { text-decoration: none; color: inherit; }
.vote-list-mobile .vote-table a:hover { text-decoration: underline; }

/* 일정 페이지 - 엑셀 달력형(주간 2주), holiday/list.php 그레이 톤 통일 */
.schedule-page { margin-bottom: 16px; }
.schedule-flash { margin: 0 0 6px 0; }
.schedule-flash-error { color: #c00; }
.schedule-flash-success { color: #0a0; }
.schedule-week-nav { margin: 8px 0 12px 0; display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.schedule-week-btn { display: inline-block; padding: 5px 12px; font-size: 0.95rem; line-height: 1.3; color: var(--btn-secondary-color); background: var(--btn-secondary-bg); border: 1px solid var(--btn-secondary-border); border-radius: 6px; text-decoration: none; cursor: pointer; box-sizing: border-box; white-space: nowrap; }
.schedule-nav-sep { margin: 0 2px; color: #999; user-select: none; flex-shrink: 0; }
.schedule-nav-secondary-wrap { margin-left: 4px; color: #666; font-size: 0.9rem; flex-shrink: 0; }
.schedule-nav-secondary-wrap .schedule-nav-secondary { padding: 4px 10px; font-size: 0.85rem; opacity: 0.9; }
.schedule-nav-secondary-wrap .schedule-nav-secondary:hover { opacity: 1; }
.schedule-today-title { margin: 0 0 12px 0; padding-left: 80px; text-align: left; font-size: 1rem; font-weight: bold; line-height: 1.35; max-height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; }
.schedule-today-title .schedule-title-event { font-size: 0.9em; font-weight: normal; color: #666; }
.schedule-today-title.schedule-title-holiday { color: #c00; }
.schedule-today-title.schedule-title-holiday .schedule-title-event { color: #c00; }
.schedule-calendar-wrap { display: flex; flex-direction: column; gap: 0; }
.schedule-week-block { margin: 0; margin-bottom: -1px; }
.schedule-week-block:last-child { margin-bottom: 0; }
.schedule-week-title { text-align: center; font-weight: bold; margin: 0 0 8px 0; font-size: 1rem; }
.schedule-table-wrap { overflow: visible; }
.schedule-calendar { border-collapse: collapse; width: 100%; min-width: 560px; table-layout: fixed; border: 1px solid #bbb; }
.schedule-calendar th, .schedule-calendar td { border: 1px solid #bbb; padding: 8px 10px; vertical-align: top; min-width: 80px; }
.schedule-calendar th { font-weight: bold; font-size: 0.85rem; white-space: nowrap; background: #f5f5f5; }
.schedule-cal-sun { color: #eb5757; background: #fef5f5 !important; }
.schedule-cal-sat { color: #2f80ed; background: #f5f5ff !important; }
.schedule-cal-weekday { color: #333; }
.schedule-calendar th.schedule-cal-holiday { color: #c00; }
.schedule-cal-cell { font-size: 0.8rem; line-height: 1.45; background: #fafafa; }
.schedule-cal-cell-has { background: #e8f8e8; }
.schedule-calendar td.today {
  border: 3px solid #ffcc00;
  font-weight: 600;
}
.schedule-calendar td:hover {
  background: #f8fafc;
}
.schedule-cal-count { display: block; font-size: 1em; color: #06c; margin-bottom: 4px; }
.schedule-cal-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-calendar .holiday-name {
  font-size: 13px;
  font-weight: 600;
  color: #2f855a;
}
.schedule-main-btn { display: inline-block; padding: 10px 18px; font-size: 0.9rem; border: 1px solid var(--btn-secondary-border); background: var(--btn-secondary-bg); color: var(--btn-secondary-color); text-decoration: none; cursor: pointer; box-sizing: border-box; border-radius: 6px; }
.schedule-main-btn:hover { background: var(--btn-secondary-hover); color: var(--btn-secondary-color); }
/* 휴무 추가/삭제 페이지 (폼 크기는 add.php 인라인 스타일에서 제어) */
.schedule-add-section, .schedule-del-section { margin-bottom: 20px; padding: 0 12px; }
.schedule-add-section h3, .schedule-del-section h3 { margin: 0 0 8px 0; font-size: 0.95rem; font-weight: bold; }
.schedule-del-section .schedule-del-panel { margin-bottom: 14px; padding: 10px; border: 1px solid #ddd; background: #f9f9f9; font-size: 0.9rem; }
.schedule-del-section .schedule-del-panel label { display: block; margin: 4px 0; }
.schedule-del-section .schedule-del-panel button[type="submit"].btn-del-submit { background: var(--btn-danger-bg); border: 1px solid var(--btn-danger-border); color: var(--btn-danger-color); padding: 6px 12px; border-radius: 4px; cursor: pointer; }
.schedule-del-section .schedule-del-panel button[type="submit"].btn-del-submit:hover { background: var(--btn-danger-hover); color: var(--btn-danger-color); }
.schedule-del-date { margin: 0 0 6px 0; font-weight: bold; }
.schedule-manage-back { margin-top: 16px; }
@media (max-width: 640px) {
    .schedule-calendar { min-width: 560px; }
    .schedule-calendar th, .schedule-calendar td { min-width: 80px; padding: 8px 10px; font-size: 0.8rem; }
    .schedule-week-btn { padding: 6px 14px; font-size: 0.9rem; }
}

/* 회원 수정 페이지 (모바일 운영앱 스타일) */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.member-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  font-weight: 600;
}
.form-container .form-group {
  margin-bottom: 14px;
}
.form-container .form-label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}
.form-container .form-control,
.form-container .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.form-container .form-control:focus,
.form-container .form-input:focus {
  border-color: #2563eb;
  outline: none;
}
.form-container .btn-primary,
.form-container .btn-block {
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  font-size: 14px;
  box-sizing: border-box;
}
.form-container .btn-primary:hover,
.form-container .btn-block:hover {
  background: #1d4ed8;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  margin-top: 20px;
  cursor: pointer;
  font-size: 14px;
}
.btn-danger:hover {
  background: #b91c1c;
  color: #fff;
}
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-color);
  border: 1px solid var(--btn-secondary-border);
  padding: 8px 14px;
  border-radius: 8px;
  margin-top: 20px;
  cursor: pointer;
  font-size: 14px;
}
.btn-secondary:hover {
  background: var(--btn-secondary-hover);
  color: var(--btn-secondary-color);
}
.link-back {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
}
.link-back:hover {
  text-decoration: underline;
}
.flash-success {
  color: #166534;
  margin: 0 0 10px 0;
  font-size: 14px;
}
.flash-error {
  color: #b91c1c;
  margin: 0 0 10px 0;
  font-size: 14px;
}
.member-actions {
  margin-top: 1.5em;
  text-align: right;
}
.form-inline {
  display: inline;
}
.form-note {
  font-size: 13px;
  color: #666;
  margin: 0 0 10px 0;
}
.badge-vote-open { margin-top: 4px; }
