.nhz-calendar-page {
  margin: 12px 0 22px;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
}

.nhz-calendar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(92, 79, 56, 0.55);
  border-bottom: 1px solid rgba(255, 241, 188, 0.18);
}

.nhz-calendar-nav .calendar-nav-btn {
  appearance: none;
  border: 1px solid rgba(255, 241, 188, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: #fff6cf;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.nhz-calendar-nav .calendar-nav-btn:hover,
.nhz-calendar-nav .calendar-nav-btn:focus-visible {
  outline: none;
  filter: brightness(1.08);
}

.nhz-calendar-nav .calendar-nav-range {
  min-width: min(100%, 300px);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff2a9;
  letter-spacing: 0.35px;
}

#calendarApp {
  padding: 16px;
}

.nhz-calendar-page--embedded #calendarApp {
  padding: 10px;
}

.nhz-calendar-page .calendar-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px;
  background: linear-gradient(180deg, rgba(92, 79, 56, 0.98), rgba(64, 56, 41, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  border-radius: 12px;
}

.nhz-calendar-page .title-wrap {
  text-align: center;
  margin-bottom: 16px;
  padding-top: 2px;
}

.nhz-calendar-page .foundation {
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #fff7e6;
  margin-bottom: 6px;
}

.nhz-calendar-page .calendar-title {
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: 2px;
  font-weight: 800;
  color: #fff2a9;
  text-transform: uppercase;
}

.nhz-calendar-page .calendar-grid {
  border: 1px solid rgba(255, 241, 188, 0.28);
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border-radius: 8px;
}

.nhz-calendar-page .grid-header,
.nhz-calendar-page .event-row {
  display: grid;
  grid-template-columns: 240px 1fr;
}

.nhz-calendar-page .grid-header {
  min-height: 52px;
  border-bottom: 1px solid rgba(255, 241, 188, 0.28);
  background: rgba(255, 255, 255, 0.02);
}

.nhz-calendar-page .calendar-week-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 700;
  color: #fff8df;
  border-right: 1px solid rgba(255, 241, 188, 0.28);
  text-align: center;
  line-height: 1.12;
}

.nhz-calendar-page .days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff2b9;
  letter-spacing: 0.8px;
  padding: 0 6px;
}

.nhz-calendar-page .days-header span {
  position: relative;
}

.nhz-calendar-page .days-header span.is-today {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 242, 169, 0.4);
}

.nhz-calendar-page .days-header span:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -9px;
  top: 0;
  color: rgba(255, 241, 188, 0.75);
  font-weight: 300;
}

.nhz-calendar-page .event-row {
  border-bottom: 1px solid rgba(255, 241, 188, 0.28);
  min-height: 0;
}

.nhz-calendar-page .event-row:last-child {
  border-bottom: none;
}

.nhz-calendar-page .event-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-right: 1px solid rgba(255, 241, 188, 0.28);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.12;
  color: #fff7e2;
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
}

.nhz-calendar-page .event-track {
  position: relative;
  padding: 3px 6px;
  min-height: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0%,
      rgba(255, 255, 255, 0.03) 14.285%,
      transparent 14.285%,
      transparent 28.571%,
      rgba(255, 255, 255, 0.03) 28.571%,
      rgba(255, 255, 255, 0.03) 42.857%,
      transparent 42.857%,
      transparent 57.142%,
      rgba(255, 255, 255, 0.03) 57.142%,
      rgba(255, 255, 255, 0.03) 71.428%,
      transparent 71.428%,
      transparent 85.714%,
      rgba(255, 255, 255, 0.03) 85.714%,
      rgba(255, 255, 255, 0.03) 100%
    );
}

.nhz-calendar-page .bar {
  position: absolute;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  border-radius: 999px;
  background: #f6df86;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: box-shadow 0.15s ease, filter 0.15s ease;
  border: none;
  color: #1f1a10;
  font-weight: 700;
  padding: 1px 8px;
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  line-height: 1.02;
}

.nhz-calendar-page .bar-title {
  display: block;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nhz-calendar-page .bar-title--solo {
  font-size: 9px;
}

.nhz-calendar-page .bar-dates {
  display: block;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nhz-calendar-page .bar:hover,
.nhz-calendar-page .bar:focus-visible {
  outline: none;
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 242, 169, 0.55),
    0 0 10px rgba(255, 242, 169, 0.38),
    0 0 22px rgba(246, 223, 134, 0.24),
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.nhz-calendar-page .bar.is-selected {
  filter: brightness(1.1);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(0, 0, 0, 0.42),
    0 0 14px rgba(255, 242, 169, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.38);
  z-index: 2;
}

.nhz-calendar-page .detail-meta {
  font-size: 13px;
  color: #e8dca8;
  margin: 0 0 10px 0;
}

.nhz-calendar-page .calendar-detail-open-btn {
  margin-top: 4px;
}

.nhz-calendar-page .detail-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 241, 188, 0.28);
  background: rgba(0, 0, 0, 0.22);
  display: none;
  border-radius: 8px;
}

.nhz-calendar-page .detail-panel.visible {
  display: block;
}

.nhz-calendar-page .detail-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff3b2;
  margin: 0 0 6px 0;
  text-transform: uppercase;
}

.nhz-calendar-page .detail-subtitle {
  font-size: 13px;
  color: #e8dca8;
  margin: 0 0 12px 0;
  letter-spacing: 0.25px;
}

.nhz-calendar-page .detail-description {
  font-size: 14px;
  line-height: 1.45;
  color: #fff9df;
  margin: 0 0 10px 0;
}

.nhz-calendar-page .detail-list {
  margin: 0;
  padding-left: 16px;
  color: #fff5d0;
  font-size: 13px;
}

.nhz-calendar-page .detail-list li {
  margin-bottom: 4px;
}

.nhz-calendar-page .detail-link {
  margin-top: 10px;
}

.nhz-calendar-page .detail-link a {
  color: #fff2a9;
  font-weight: 700;
}

.nhz-calendar-page .calendar-empty {
  padding: 18px;
  text-align: center;
  color: #e8dca8;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .nhz-calendar-page .grid-header,
  .nhz-calendar-page .event-row {
    grid-template-columns: 240px 1fr;
  }

  .nhz-calendar-page .days-header {
    font-size: 15px;
  }

  .nhz-calendar-page .event-label {
    font-size: 14px;
  }
}

@media (max-width: 760px) {
  #calendarApp {
    padding: 8px;
  }

  .nhz-calendar-page .calendar-shell {
    padding: 12px;
  }

  .nhz-calendar-page .grid-header,
  .nhz-calendar-page .event-row {
    grid-template-columns: 1fr;
  }

  .nhz-calendar-page .calendar-week-label,
  .nhz-calendar-page .event-label {
    border-right: none;
    border-bottom: 1px solid rgba(255, 241, 188, 0.28);
  }

  .nhz-calendar-page .days-header {
    grid-template-columns: repeat(7, 1fr);
    font-size: 10px;
    padding: 8px 4px 10px;
  }

  .nhz-calendar-page .days-header span:not(:last-child)::after {
    right: -4px;
  }

  .nhz-calendar-page .event-track {
    min-height: 48px;
  }

  .nhz-calendar-page .bar {
    min-height: 24px;
    max-height: 26px;
  }

  .nhz-calendar-page .bar-title {
    font-size: 8px;
  }

  .nhz-calendar-page .bar-dates {
    font-size: 7px;
  }
}

#panel-calendar .table-wrap table {
  min-width: 0;
  width: 100%;
}
#panel-calendar .calendar-entry-row.is-selected td {
  background: rgba(56, 189, 248, 0.12);
}
.admin-calendar-preview-wrap {
  margin-top: 14px;
  border: 1px solid rgba(74, 175, 255, 0.18);
  border-radius: 12px;
  overflow: auto;
  background: #000;
  max-height: min(70vh, 720px);
}
