@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@300;500;700&family=Alegreya+Sans:wght@300;400;600&display=swap");

:root {
  --mc-green: #2f6b2f;
  --mc-orange: #f28c28;
  --mc-cream: #f7f2e8;
  --mc-forest: #0d1f12;
  --mc-bark: #3a2b20;
  --mc-dark: #0a0f0c;
  --mc-card: rgba(20, 34, 22, 0.75);
  --mc-card-border: rgba(47, 107, 47, 0.25);
  --mc-glow: rgba(242, 140, 40, 0.35);
  --mc-text: #d4ddd6;
  --mc-text-dim: rgba(212, 221, 214, 0.55);
  --mc-input-bg: rgba(10, 20, 12, 0.6);
  --mc-input-border: rgba(47, 107, 47, 0.35);

  /* Demand level colors */
  --demand-peak: rgba(231, 76, 60, 0.25);
  --demand-peak-border: rgba(231, 76, 60, 0.5);
  --demand-high: rgba(243, 156, 18, 0.2);
  --demand-high-border: rgba(243, 156, 18, 0.45);
  --demand-moderate: rgba(46, 204, 113, 0.15);
  --demand-moderate-border: rgba(46, 204, 113, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Alegreya Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--mc-dark);
  color: var(--mc-text);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Unbounded", "Trebuchet MS", sans-serif;
  margin: 0 0 0.5rem 0;
  color: var(--mc-cream);
}

/* ── Hero with rotating Sasquatch images ── */
.hero {
  position: relative;
  min-height: 280px;
  padding: 2.5rem 8vw;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.hero__slide.active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 15, 12, 0.92), rgba(13, 31, 18, 0.82)),
    radial-gradient(circle at 20% 20%, var(--mc-glow), transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero__content h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  background: linear-gradient(135deg, var(--mc-cream), var(--mc-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__content p {
  color: var(--mc-text-dim);
  margin: 0.5rem 0 1rem;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(242, 140, 40, 0.15);
  border: 1px solid rgba(242, 140, 40, 0.4);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--mc-orange);
  margin-bottom: 0.75rem;
}

.hero__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--mc-text-dim);
  flex-wrap: wrap;
}

/* ── Layout ── */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 2rem;
  padding: 2rem 8vw 3rem;
}

/* ── Glass cards ── */
.calendar-card {
  background: var(--mc-card);
  border: 1px solid var(--mc-card-border);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.calendar-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ── Buttons ── */
.btn {
  background: linear-gradient(135deg, var(--mc-orange), #e67b1a);
  color: #1a0e04;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--mc-glow);
  transition: transform 0.15s, box-shadow 0.15s;
  font-size: 0.85rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px var(--mc-glow);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--mc-text);
  border: 1px solid var(--mc-card-border);
  box-shadow: none;
}

.btn--ghost:hover {
  border-color: var(--mc-orange);
  color: var(--mc-orange);
  box-shadow: none;
}

/* ── Side panels ── */
.panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel__section {
  background: var(--mc-card);
  border: 1px solid var(--mc-card-border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

/* ── Image gallery strip ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 0 8vw 3rem;
}

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--mc-card-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
  transform: scale(1.04);
  box-shadow: 0 16px 40px var(--mc-glow);
}

/* ── Form inputs ── */
.label {
  display: block;
  font-weight: 600;
  margin: 0.75rem 0 0.3rem;
  color: var(--mc-text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

textarea,
input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="password"],
input[type="color"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--mc-input-border);
  background: var(--mc-input-bg);
  color: var(--mc-text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--mc-orange);
}

input[type="color"] {
  height: 40px;
  padding: 4px;
  cursor: pointer;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  font-weight: 600;
  color: var(--mc-text);
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

.note-block {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(242, 140, 40, 0.08);
  border: 1px solid rgba(242, 140, 40, 0.2);
  border-radius: 12px;
  font-style: italic;
  color: var(--mc-orange);
}

.form-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.2em;
  margin-top: 0.5rem;
}

/* ── Legends & lists ── */
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0;
  font-size: 0.88rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.demand-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.demand-dot--peak { background: rgba(231, 76, 60, 0.7); }
.demand-dot--high { background: rgba(243, 156, 18, 0.6); }
.demand-dot--moderate { background: rgba(46, 204, 113, 0.5); }
.demand-dot--low { background: rgba(52, 152, 219, 0.5); }
.demand-dot--minimal { background: rgba(44, 62, 80, 0.4); }

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(47, 107, 47, 0.2);
}

.muted {
  color: var(--mc-text-dim);
  font-style: italic;
}

.hidden {
  display: none !important;
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: linear-gradient(160deg, rgba(20, 34, 22, 0.95), rgba(10, 15, 12, 0.98));
  border: 1px solid var(--mc-card-border);
  padding: 1.75rem;
  border-radius: 20px;
  width: min(440px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px var(--mc-glow);
}

.modal__content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* ── Login page ── */
.login-page {
  background:
    radial-gradient(circle at 30% 30%, rgba(47, 107, 47, 0.15), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(242, 140, 40, 0.1), transparent 50%),
    var(--mc-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--mc-card);
  border: 1px solid var(--mc-card-border);
  backdrop-filter: blur(16px);
  padding: 2.5rem;
  border-radius: 24px;
  width: min(380px, 90vw);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--mc-glow);
}

.login-card h1 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.login-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mc-orange);
  margin-bottom: 1rem;
  display: block;
}

.login-card .btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem;
}

/* ── FullCalendar dark overrides ── */
.fc {
  --fc-border-color: rgba(47, 107, 47, 0.2);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(20, 34, 22, 0.4);
  --fc-list-event-hover-bg-color: rgba(242, 140, 40, 0.1);
  --fc-today-bg-color: rgba(242, 140, 40, 0.08);
  --fc-highlight-color: rgba(47, 107, 47, 0.15);
  --fc-non-business-color: rgba(0, 0, 0, 0.15);
}

.fc .fc-toolbar-title {
  font-family: "Unbounded", sans-serif;
  font-size: 1.1rem;
  color: var(--mc-cream);
}

.fc .fc-button {
  background: var(--mc-input-bg);
  border: 1px solid var(--mc-input-border);
  color: var(--mc-text);
  font-size: 0.8rem;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.fc .fc-button:hover {
  background: rgba(47, 107, 47, 0.2);
  border-color: var(--mc-green);
}

.fc .fc-button-active {
  background: var(--mc-green) !important;
  border-color: var(--mc-green) !important;
  color: var(--mc-cream) !important;
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
  color: var(--mc-text-dim);
  font-size: 0.8rem;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  color: var(--mc-orange);
  font-weight: 700;
}

.fc .fc-event {
  border-radius: 6px;
  font-size: 0.78rem;
  padding: 1px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fc .fc-daygrid-day-frame {
  min-height: 80px;
  position: relative;
}

/* ── Demand-level day cell highlighting ── */
.fc .fc-daygrid-day.demand-peak {
  background: var(--demand-peak) !important;
  box-shadow: inset 0 0 0 2px var(--demand-peak-border);
}

.fc .fc-daygrid-day.demand-high {
  background: var(--demand-high) !important;
  box-shadow: inset 0 0 0 2px var(--demand-high-border);
}

.fc .fc-daygrid-day.demand-moderate {
  background: var(--demand-moderate) !important;
  box-shadow: inset 0 0 0 2px var(--demand-moderate-border);
}

.fc .fc-daygrid-day.demand-low {
  background: rgba(52, 152, 219, 0.12) !important;
  box-shadow: inset 0 0 0 2px rgba(52, 152, 219, 0.25);
}

.fc .fc-daygrid-day.demand-minimal {
  background: rgba(44, 62, 80, 0.1) !important;
  box-shadow: inset 0 0 0 2px rgba(44, 62, 80, 0.2);
}

/* ── Holiday label inside day cell ── */
.holiday-label {
  position: absolute;
  bottom: 2px;
  left: 4px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #e74c3c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
  pointer-events: none;
}

/* ── Demand score badge (custom market data) ── */
.demand-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(242, 140, 40, 0.25);
  color: var(--mc-orange);
  border: 1px solid rgba(242, 140, 40, 0.4);
  border-radius: 6px;
  padding: 1px 4px;
  line-height: 1.2;
  pointer-events: none;
}

/* ── Holiday background event ── */
.holiday-bg {
  opacity: 0.3;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 2rem 6vw;
    min-height: 220px;
  }
}
