:root {
  --void: #0e0a1a;
  --deep: #170f2b;
  --panel: #1e1538;
  --panel-light: #271c47;
  --purple: #6b46c1;
  --lavender: #a78bda;
  --lavender-soft: #c9b6ec;
  --gold: #d4af7a;
  --gold-bright: #e8c896;
  --mist: #ece6f7;
  --mist-dim: #b3a6cc;
  --success: #7fbf8f;
  --warn: #d4a574;
  --danger: #c77b7b;

  --radius: 14px;
  --shadow-glow: 0 0 24px rgba(107, 70, 193, 0.25);
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Inter", -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse at top, var(--deep) 0%, var(--void) 60%);
  color: var(--mist);
  min-height: 100vh;
  display: flex;
}

h1, h2, h3, .brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Sidebar (desktop) ---------- */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--deep) 100%);
  border-right: 1px solid rgba(167, 139, 218, 0.15);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: fixed;
  top: 0; bottom: 0; left: 0;
}

.brand {
  color: var(--gold-bright);
  font-size: 1.4rem;
  margin-bottom: 8px;
  text-shadow: 0 0 18px rgba(212, 175, 122, 0.35);
}
.brand span { color: var(--lavender-soft); font-family: var(--font-body); font-size: 0.7rem; display: block; letter-spacing: 0.15em; text-transform: uppercase; margin-top: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--mist-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: rgba(167, 139, 218, 0.1); color: var(--mist); }
.nav-link.active { background: rgba(107, 70, 193, 0.35); color: var(--gold-bright); box-shadow: inset 0 0 0 1px rgba(212, 175, 122, 0.25); }

/* ---------- Main content ---------- */
.main {
  margin-left: 240px;
  flex: 1;
  padding: 36px 40px 100px;
  width: 100%;
}

.page-title { font-size: 1.7rem; color: var(--mist); margin-bottom: 4px; }
.page-subtitle { color: var(--mist-dim); font-size: 0.9rem; margin-bottom: 28px; }

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid rgba(167, 139, 218, 0.12);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-glow);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card { padding: 20px; }
.stat-number { font-family: var(--font-display); font-size: 2rem; color: var(--gold-bright); }
.stat-label { color: var(--mist-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

/* ---------- Badges / tiers ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; }
.badge-confirmed { background: rgba(127, 191, 143, 0.15); color: var(--success); }
.badge-unconfirmed { background: rgba(212, 165, 116, 0.15); color: var(--warn); }
.badge-unverifiable { background: rgba(199, 123, 123, 0.15); color: var(--danger); }

.btn { border: none; border-radius: 8px; padding: 9px 16px; font-size: 0.82rem; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.btn-outline { background: transparent; border: 1px solid var(--lavender); color: var(--lavender-soft); }
.btn-outline:hover { background: rgba(167, 139, 218, 0.12); }
.btn-gold { background: var(--gold); color: var(--void); }
.btn-gold:hover { background: var(--gold-bright); }
.btn-decline { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-decline:hover { background: rgba(199, 123, 123, 0.12); }
.select-input { background: var(--panel-light); border: 1px solid rgba(167, 139, 218, 0.2); border-radius: 8px; color: var(--mist); padding: 8px 10px; font-size: 0.85rem; margin-right: 8px; width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--mist-dim); }

.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.cal-header h3 { font-family: var(--font-display); color: var(--gold-bright); font-size: 1.1rem; }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 8px; }
.cal-weekdays span { text-align: center; font-size: 0.72rem; color: var(--mist-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { min-height: 84px; background: var(--panel-light); border-radius: 8px; padding: 6px; border: 1px solid transparent; overflow: hidden; }
.cal-today { border-color: var(--gold); }
.cal-daynum { font-size: 0.75rem; color: var(--mist-dim); margin-bottom: 4px; }

.cal-pill { font-size: 0.65rem; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--void); font-weight: 600; }
.cal-pill.dot-booked { background: var(--gold); }
.cal-pill.dot-interested { background: var(--lavender); }
.cal-pill.dot-attended { background: var(--mist-dim); }
.cal-pill.dot-cancelled { background: transparent; border: 1px solid var(--danger); color: var(--danger); text-decoration: line-through; }

.cal-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 0.8rem; color: var(--mist-dim); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot-booked { background: var(--gold); }
.dot-interested { background: var(--lavender); }
.dot-attended { background: var(--mist-dim); }
.dot-cancelled { background: transparent; border: 1px solid var(--danger); }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 10, 26, 0.75);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-box {
  background: var(--panel);
  border: 1px solid rgba(167, 139, 218, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 0 40px rgba(107, 70, 193, 0.35);
}

@media (max-width: 860px) {
  .cal-day { min-height: 60px; }
  .cal-weekdays span { font-size: 0.6rem; }
}


/* ---------- Mobile bottom nav ---------- */
.bottom-nav { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px 16px 90px; }

  .bottom-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--panel);
    border-top: 1px solid rgba(167, 139, 218, 0.15);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    z-index: 50;
  }
  .bottom-nav a {
    color: var(--mist-dim);
    text-decoration: none;
    font-size: 0.68rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .bottom-nav a.active { color: var(--gold-bright); }
}