@font-face {
  font-family: 'Source Han Sans K';
  src: url('/Fonts/어도비본고딕B.otf') format('opentype');
}

:root {
  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --accent-color: #FFD700;
  --accent-hover: #ffc800;
  --primary-btn: #333333;
  --primary-btn-text: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --status-on: #2e7d32;
  --status-off: #d32f2f;
  --sat-color: #1976d2;
  --sun-color: #d32f2f;
}

body.dark-mode {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #aaaaaa;
  --accent-color: #FFD700;
  --accent-hover: #ffc800;
  --primary-btn: #FFD700;
  --primary-btn-text: #121212;
  --border-color: #333333;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --sat-color: #64b5f6;
  --sun-color: #e57373;
}

* { box-sizing: border-box; }

body {
  font-family: 'Source Han Sans K', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

.dashboard-header {
  width: 100%;
  max-width: 1600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 5px;
}

.header-right {
  display: flex;       /* 자식들을 가로로 배치 */
  align-items: center; /* 자식들을 수직 중앙에 정렬 */
  gap: 0;              /* 간격은 이미 버튼 margin으로 잡혀있으므로 0 */
  height: 100%;        /* 헤더 높이에 맞춤 */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

#serverIndicator {
  width: 12px; height: 12px; border-radius: 50%;
  background-color: var(--status-off);
  display: inline-block; transition: all 0.3s;
}
#serverIndicator.online {
  background-color: var(--status-on);
  box-shadow: 0 0 8px var(--status-on);
}

#serverIndicator.offline {
  background-color: var(--status-off);
  box-shadow: none;
}

#darkModeContainer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

#darkModeSelect {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.main-container {
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}

.status-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr 0.8fr;
  gap: 8px;
  align-items: stretch;
}

.toggle-card {
  display: flex;
}

#toggleButton {
  padding: 15px 0;
  width: 100%;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  color: white;
}

#toggleButton.toggle-off {
  background-color: var(--status-off);
}

#toggleButton.toggle-on {
  background-color: var(--status-on);
}

#toggleButton:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.status-info-group {
  display: flex;
  gap: 10px;
}

.info-card {
  flex: 1;
  background-color: var(--card-bg);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.info-card .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.info-card .value {
  font-size: 20px;
  font-weight: bold;
}

#statusValue {
  color: var(--status-off);
}

#broadcastStatusValue {
  color: var(--text-secondary);
}

.admin-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.segmented-control {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: transparent;
  padding: 0;
}

.segment-btn {
  flex: 1;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.2s;
}

#adminStatusButton {
  width: 100%;
  background: transparent;
  border: 1px solid var(--status-off);
  color: var(--status-off);
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

#adminStatusButton.active {
  background: var(--status-off);
  color: white;
}

#washModeButton {
  width: 100%; 
  height: 100%;
  padding: 15px 0;
  font-size: 16px; 
  font-weight: bold;
  border: none; 
  border-radius: 12px; 
  cursor: pointer;
  transition: all 0.3s; 
  box-shadow: var(--shadow-sm);
  background-color: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#washModeButton.active {
  background-color: #2196F3;
  color: white;
  border-color: #2196F3;
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

#washModeButton:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

@media (max-width: 768px) {
  .status-section {
    grid-template-columns: 1fr 1fr;
  }
}

.schedule-card .card-header {
  padding-bottom: 15px; /* 헤더 내부 아래쪽 여백 추가 */
  margin-bottom: 10px;  /* 헤더와 표 사이 바깥 여백 추가 */
  border-bottom: 1px solid var(--border-color); /* 구분선 명확하게 */
}

.schedule-card {
  padding: 0;
  overflow: hidden;
}

.card-header {
  display: flex; justify-content: space-between; align-items: center;
}

.card-header h2, .card-header h3 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-wrapper {
  overflow-x: auto;
}

#weeklyPlanTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

#weeklyPlanTable th, #weeklyPlanTable td {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-size: 14px;
}

.date-row td {
  border-bottom: 1px solid var(--border-color) !important;
}

#weeklyPlanTable th:last-child, #weeklyPlanTable td:last-child {
  border-right: none;
}

#weeklyPlanTable tr:last-child td {
  border-bottom: none;
}

#weeklyPlanTable th {
  background-color: var(--bg-color);
  font-weight: bold;
  color: var(--text-secondary);
}

#weeklyPlanTable .sticky-col {
  position: sticky;
  left: 0;
  background-color: var(--bg-color);
  z-index: 1;
}

#weeklyPlanTable th#sat, #weeklyPlanTable td:nth-last-child(2) {
  color: var(--sat-color);
}

#weeklyPlanTable th#sun, #weeklyPlanTable td:last-child {
  color: var(--sun-color);
}

.holiday {
  color: var(--sun-color) !important;
  font-weight: bold;
}

.status-x {
  color: var(--status-off)
  !important; font-weight: bold;
}


.weekly-today-top, 
.weekly-today-mid, 
.weekly-today-bottom {
  background-color: rgba(255, 215, 0, 0.15) !important;
  font-weight: bold !important;
  border-left: 3px solid var(--accent-color) !important;
  border-right: 3px solid var(--accent-color) !important;
}

.weekly-today-top {
  border-top: 3px solid var(--accent-color) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.weekly-today-mid {
  border-top: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.weekly-today-bottom {
  border-top: none !important;
  border-bottom: 3px solid var(--accent-color) !important;
}

body.dark-mode .weekly-today-top, 
body.dark-mode .weekly-today-mid, 
body.dark-mode .weekly-today-bottom {
  background-color: rgba(255, 215, 0, 0.1) !important;
  border-left-color: var(--accent-color) !important;
  border-right-color: var(--accent-color) !important;
}

body.dark-mode .weekly-today-top {
  border-top-color: var(--accent-color) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

body.dark-mode .weekly-today-mid {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

body.dark-mode .weekly-today-bottom {
  border-bottom-color: var(--accent-color) !important;
}

.input-group {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}
.input-group.full-width { margin-top: 0; margin-bottom: 15px; }

input[type="text"], textarea {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus, textarea:focus {
  border-color: var(--accent-color);
}

.action-btn {
  padding: 0 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s;
  white-space: nowrap; /* 버튼 줄바꿈 방지 */
}
.action-btn.primary {
  background-color: var(--accent-color);
  border: none;
  color: #121212;
}

.action-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

#bgmList {
  padding: 0 15px 5px 15px;
  margin: 0;
  list-style: none;
}

#bgmList li {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#bgmList button {
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  cursor: pointer;
  color: var(--text-primary);
  margin-left: 5px;
  white-space: nowrap;
}

#bgmList button:hover {
  background-color: var(--accent-color);
  color: #121212;
  border-color: var(--accent-color);
}

.main-content-card {
  padding: 0;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.tabs {
  display: flex;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.tab-button.active {
  background-color: var(--card-bg);
  color: var(--text-primary);
  border-bottom-color: var(--accent-color);
}

.tab-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  height: 100%;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.list-view {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.list-view li {
  background-color: var(--bg-color);
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s;
}

.list-view li:hover {
  background-color:rgba(0,0,0,0.05);
} 

body.dark-mode .list-view li:hover {
  background-color: rgba(255,255,255,0.05);
}

.list-view li.playing {
    background-color: rgba(255, 215, 0, 0.15) !important;
    border: 1px solid #FFD700;
    color: #FFD700;
    font-weight: bold;
}

body.dark-mode .list-view li.playing {
    background-color: rgba(255, 215, 0, 0.1) !important;
}

.list-view li.playing .play-button {
    background-color: #FFD700;
    color: #121212;
    border: none;
}

.song-text-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  cursor: grab;
  padding: 5px 0;
  margin-right: 10px;
  height: 100%;
}

.song-text-wrapper:active {
  cursor: grabbing;
}

.notice-text { 
  padding: 5px; 
  padding-left: 10px;
  user-select: text; 
  cursor: auto;
  flex: 1;
  min-width: 0; 
  margin-right: 10px; 
  font-size: 15px; 
  font-weight: 500; 
}

.song-text { 
  padding: 5px 10px; 
  user-select: text; 
  cursor: text;  
  flex: 0 1 auto;
  margin-right: 0;
  font-size: 15px; 
  font-weight: 500; 
}

.button-group { 
  display: flex; 
  gap: 5px; 
  flex-shrink: 0; 
}

.button-container .button-group:first-child {
  margin-bottom: 5px;
}

.button-group button, .small-btn {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  cursor: pointer;
  color: var(--text-primary);
  white-space: nowrap; 
}

.button-group button:hover, .small-btn:hover {
  background-color: var(--accent-color);
  color: #121212;
  border-color: var(--accent-color);
}

.yumakase-button, .play-button { 
  min-width: 80px; 
  text-align: center;
  justify-content: center;
}

.footer-actions {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 15px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.text-btn:hover {
  color: var(--accent-color);
}

.footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-secondary);
  font-size: 12px;
}
.footer .credits {
  margin-top: 5px;
  opacity: 0.7;
}

.popup, .modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.popup-content, .modal-content {
  background-color: var(--card-bg);
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%; max-width: 800px;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.modal-content {
  max-width: 400px;
  padding: 30px;
  text-align: center;
  margin-top: 20vh;
}

.popup-content h2 {
  margin: 0;
  padding: 20px;
  background: var(--bg-color);
  font-size: 18px;
  border-bottom: 1px solid var(--border-color);
}

.popup .close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 10;
}

.popup .close:hover {
  background-color: rgba(0,0,0,0.1);
  color: var(--text-primary);
}

body.dark-mode .popup .close:hover {
  background-color: rgba(255,255,255,0.1);
}

.popup-toolbar, .history-controls {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--card-bg);
  flex-wrap: wrap; gap: 10px;
}

.table-scroll-container {
  overflow: auto; flex: 1; padding: 20px;
}

.popup table {
  width: 100%;
  border-collapse: collapse;
}

.popup th, .popup td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.popup th {
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

#downloadHistoryButton {
  font-size: 14px;
  padding: 8px 15px;
  border-radius: 6px;
  background-color: var(--accent-color);
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #121212;
  transition: all 0.2s;
  white-space: nowrap;
}

#downloadHistoryButton:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.small-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  cursor: pointer;
  color: var(--text-primary);
  white-space: nowrap;
}

.small-btn.primary {
  background: var(--accent-color);
  border: none;
  color: #121212;
}

.small-btn.success {
  background: #2e7d32;
  color: white;
  border: none;
}

#monthlyPlanHeader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 15px;
  background-color: var(--card-bg);
}

#monthlyPlanHeader h2 {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 20px;
}

#monthlyCalendarContainer {
  padding: 20px;
  overflow-x: auto;
}

#monthlyCalendarTable { 
  width: 100%; 
  min-width: 600px; 
  border-collapse: collapse; 
  table-layout: fixed;
}

#monthlyCalendarTable th, #monthlyCalendarTable td {
  border: 1px solid var(--border-color); 
  padding: 5px; 
  vertical-align: top;
  word-break: break-all;
}

#monthlyCalendarTable th { 
  background: var(--bg-color); 
  text-align: center; 
  padding: 10px; 
  font-weight: bold; 
  width: 14.28%;
}
#monthlyCalendarTable td {
  height: 100px;
}

#monthlyCalendarTable .day-header {
  font-weight: bold;
  margin-bottom: 5px;
  display: block;
}

#monthlyCalendarTable .day-sat {
  color: var(--sat-color);
}

#monthlyCalendarTable .day-sun {
  color: var(--sun-color);
}

#monthlyCalendarTable .day-today { 
  background-color: rgba(255, 215, 0, 0.15);
  border: 2px solid var(--accent-color) !important; 
}

body.dark-mode #monthlyCalendarTable .day-today {
  background-color: rgba(255, 215, 0, 0.1);
}

#monthlyCalendarTable .day-other-month {
  background-color: #f9f9f9;
  opacity: 0.5;
  color: #ccc;
  pointer-events: none;
}

body.dark-mode #monthlyCalendarTable .day-other-month {
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0.4;
  color: #666;
}

.plan-item {
  background: var(--bg-color);
  padding: 2px 5px;
  margin-top: 2px;
  border-radius: 4px;
  font-size: 12px;
  display: block;
}

.round-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.round-icon-btn:hover {
  background-color: var(--border-color);
}

.icon-btn { 
  border: none;
  background: transparent;
  color: var(--text-secondary); 
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px; 
}

.icon-btn:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  
  body, html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .main-container, .card { 
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .table-wrapper {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
  }
  
  #weeklyPlanTable {
    width: max-content !important;
    min-width: 600px; 
  }

  .input-group, 
  .input-group.full-width {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin: 10px 0 !important;
  }
  
  input[type="text"], textarea {
    width: 100% !important;
    margin: 0 !important;
  }

  .action-btn, 
  .input-group button {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 0 !important;
  }

  .list-view li, 
  #bgmList li {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 15px !important;
    height: auto !important;
    gap: 10px !important;
  }
  
  .song-text, 
  .notice-text,
  #bgmList li > span {
    display: block !important;
    width: 100% !important;
    margin-bottom: 5px !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
  }

  .button-container,
  #bgmList .button-group {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 5px !important;
    margin-top: 0 !important;
  }
  
  .button-container {
     flex-direction: column !important;
  }

  .button-group, .button-container .button-group {
    display: flex !important;
    width: 100% !important;
    gap: 5px !important;
  }
  
  .button-group button, .small-btn {
    flex: 1 !important;
    padding: 10px 0 !important;
    text-align: center;
  }
}

/* =========================================
   [NEW] 광폭 레이아웃 & 사이드바 스타일 (2026-02-03)
   ========================================= */

/* 1. 메인 컨테이너: 가로 배치 (Flex) 및 최대 폭 1600px */
.main-container.wide-layout {
  max-width: 1600px;
  width: 95%;
  display: flex;
  flex-direction: row; /* 가로 배치 */
  gap: 20px;
  align-items: flex-start; /* 상단 정렬 */
  padding: 5px 20px 20px 20px;
}

/* 2. 카드 공통: 여백을 넉넉하게 */
.card {
  padding: 25px; /* 내부 여백 증대 */
  margin-bottom: 0; /* flex gap을 쓰므로 마진 제거 */
}

/* 3. 좌측 사이드바 설정 */
.sidebar {
  width: 380px; /* 사이드바 고정 폭 */
  flex-shrink: 0; /* 줄어들지 않음 */
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky; /* 스크롤 시 따라옴 */
  top: 20px;
}

/* 사이드바 내부: 제어 패널 */
.control-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.status-info-group.vertical-group {
  flex-direction: column; /* 정보창 세로 배치 */
  width: 100%;
}

.info-card {
  width: 100%;
  padding: 15px; /* 내부 여백 증대 */
}

.info-card .value {
  font-size: 24px; /* 글자 크기 키움 */
}

/* 사이드바 내부: 3일 일정표 */
.table-wrapper.mini-table {
  overflow: hidden; /* 모서리 둥글게 유지 */
}

#threeDayTable {
  width: 100%;
  border-collapse: collapse; /* ✅ 중요: 표의 선이 끊기지 않고 연결되게 함 */
}

#threeDayTable th, #threeDayTable td {
  padding: 12px 5px; /* 셀 높이 조금 더 확보 */
  font-size: 14px;
  text-align: center;
  vertical-align: middle; /* 수직 중앙 정렬 */
  word-break: keep-all;
  border: 1px solid var(--border-color); /* ✅ 중요: 회색 격자 선 복구 */
}

.highlight-day {
  background-color: rgba(255, 215, 0, 0.15); /* 배경색 */
  color: var(--accent-color);
  font-weight: bold;
  /* 기본적으로 회색 선을 깔아두고 아래에서 덮어씌움 */
  border: 1px solid var(--border-color); 
}

/* 1. 모든 '오늘' 칸(헤더+내용)의 [좌/우] 테두리를 진하게 */
#threeDayTable .highlight-day {
  border-left: 2px solid var(--accent-color) !important;
  border-right: 2px solid var(--accent-color) !important;
}

/* 2. 헤더(맨 위칸): [위쪽] 테두리를 진하게 (뚜껑) */
#threeDayTable thead th.highlight-day {
  border-top: 2px solid var(--accent-color) !important;
  /* 아래쪽 선은 내부 격자랑 이어져야 하므로 건드리지 않음 */
}

/* 3. 본문의 마지막 행(맨 아래칸): [아래쪽] 테두리를 진하게 (바닥) */
#threeDayTable tbody tr:last-child td.highlight-day {
  border-bottom: 2px solid var(--accent-color) !important;
}

/* 4. 우측 메인 콘텐츠 영역 */
.content-area {
  flex: 1; /* 남은 공간 모두 차지 */
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* Flexbox 넘침 방지 */
}

/* BGM, 공지사항, 신청곡 리스트 여유 있게 */
.list-view li {
  padding: 12px 15px; /* 리스트 항목 높이 키움 */
  margin-bottom: 8px;
}

.song-text, .notice-text {
  font-size: 16px; /* 텍스트 크기 약간 키움 */
  line-height: 1.5;
}

/* 5. 반응형 처리 (화면이 작아지면 다시 세로로) */
@media (max-width: 1200px) {
  .sidebar {
    width: 300px; /* 기존 380px -> 300px로 축소 */
  }
  
  .main-container.wide-layout {
    padding: 10px; /* 좌우 여백을 조금 줄임 */
    gap: 15px;
  }
}

@media (max-width: 900px) {
  .main-container.wide-layout {
    flex-direction: column; /* 세로 배치 */
    max-width: 100%; /* 화면 꽉 차게 */
    width: 100%;
    padding: 10px; /* 모바일에서는 여백 최소화 */
    gap: 15px;
  }

  .sidebar {
    width: 100%; /* 사이드바 가로 꽉 차게 */
    position: static; /* 스티키 해제 */
    order: -1; /* (선택사항) 사이드바를 위로 올리고 싶으면 -1, 아래는 1 */
  }

  .content-area {
    width: 100%;
    min-width: 0;
  }

  /* 모바일에서 카드 좌우 여백 제거하여 꽉 차게 */
  .card {
    border-radius: 12px;
    padding: 15px; /* 내부 패딩 약간 축소 */
  }
  
  /* 버튼들이 너무 작아지지 않게 조정 */
  .button-group button, .small-btn {
    padding: 8px 0;
    flex: 1; /* 버튼들을 균등 분할 */
  }
}

/* [신규] 3일 일정표 헤더 내부 칸 나누기 스타일 */

/* 1. th 태그의 기본 패딩 제거 (내부 div가 꽉 차게 하기 위함) */
#threeDayTable thead th {
  padding: 0 !important; /* 기존 패딩 무시 */
  vertical-align: top;
}

/* 2. '구분' 칸은 예외적으로 수직 중앙 정렬 */
#threeDayTable thead th:first-child {
  vertical-align: middle;
  padding: 0 5px !important;
}

/* 3. 위쪽 칸 (요일) 스타일: 아래쪽에 선 긋기 */
.th-split-top {
  padding: 12px 0; /* 상하 여백 */
  border-bottom: 1px solid var(--border-color); /* ✅ 여기가 핵심: 가로 구분선 */
  font-weight: bold;
  font-size: 14px;
}

/* 4. 아래쪽 칸 (날짜) 스타일 */
.th-split-bottom {
  padding: 12px 0; /* 상하 여백 */
  font-size: 15px;
  font-weight: bold;
}

/* =========================================
   [NEW] 로그인 오버레이 & 블러 효과
   ========================================= */

/* 1. 블러 효과가 적용될 메인 래퍼 */
#app-wrapper {
  transition: filter 0.5s ease;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 이 클래스가 붙으면 화면이 흐려지고 클릭 불가능해짐 */
#app-wrapper.blurred {
  filter: blur(8px);       /* 흐림 강도 */
  pointer-events: none;    /* 클릭 방지 */
  user-select: none;       /* 드래그 방지 */
}

/* 2. 로그인 오버레이 (화면 중앙 고정) */
.login-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; /* Flexbox로 중앙 정렬 */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* 모든 것 위에 표시 */
  background-color: rgba(0, 0, 0, 0.4); /* 배경 살짝 어둡게 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}

/* 로그인 창이 활성화되면 보임 */
.login-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 3. 로그인 박스 디자인 */
.login-box {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  text-align: center;
  width: 320px;
  border: 1px solid var(--border-color);
  transform: translateY(20px);
  transition: transform 0.5s;
}

.login-overlay.active .login-box {
  transform: translateY(0);
}

.login-box h2 { margin: 0 0 10px 0; color: var(--text-primary); }
.login-box p { color: var(--text-secondary); margin-bottom: 25px; font-size: 14px; }

.login-input-group {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}

.login-input-group input {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-primary);
  font-size: 15px;
}

#overlayLoginBtn {
  width: 100%;
  padding: 12px;
  background-color: var(--accent-color);
  color: #121212;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: filter 0.2s;
}

#overlayLoginBtn:hover { filter: brightness(0.9); }

/* [신규] 로그인 옵션 (자동 로그인 체크박스) 스타일 */
.login-options {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
  padding-left: 5px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--text-secondary);
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

/* 체크되었을 때 스타일 */
.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* 체크 표시 아이콘 */
.checkmark:after {
  content: "";
  display: none;
  width: 5px;
  height: 9px;
  border: solid #121212; /* 체크 색상은 검정 */
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.custom-checkbox input:checked ~ .checkmsark:after {
  display: block;
}

.custom-checkbox:hover .label-text {
  color: var(--text-primary);
}

/* 1. 기본 상태: 크기와 레이아웃을 미리 고정 */
#headerLogoutBtn {
  width: 32px; 
  height: 32px;
  border-radius: 50%;
  
  /* 아이콘 수직/수평 중앙 정렬 */
  display: flex; 
  justify-content: center; 
  align-items: center;
  
  /* 부드러운 전환 효과 */
  transition: background-color 0.2s, color 0.2s;
}

/* 2. 호버 상태: 오직 '색상'만 변경 (크기는 건드리지 않음) */
#headerLogoutBtn:hover {
  color: var(--status-off); /* 빨간색 텍스트 */
  background-color: rgba(255, 0, 0, 0.1); /* 연한 빨간 배경 */
}