:root {
  --bg: #070b16;
  --bg-2: #10182d;
  --panel: rgba(13, 20, 40, 0.78);
  --panel-strong: rgba(20, 28, 53, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fbff;
  --muted: #a7b2d1;
  --accent: #7b61ff;
  --accent-2: #38bdf8;
  --success: #2dd4bf;
  --warn: #fb7185;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(123, 97, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(123, 97, 255, 0.28);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
}

.topnav a:hover,
.topnav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.page-shell {
  /* Use the available viewport space while respecting a comfortable max */
  width: calc(100% - 320px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px 0 64px;
  /* offset for the fixed sidebar */
  margin-left: 280px;
  margin-right: 32px;
}

.hero {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(18, 25, 43, 0.92), rgba(12, 17, 32, 0.84));
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(123, 97, 255, 0.15);
  color: #dcd5ff;
  border: 1px solid rgba(123, 97, 255, 0.22);
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: 'Syne', sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
}

.hero p {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  margin-top: 28px;
  align-items: start;
}

.component-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(13, 20, 40, 0.82);
  box-shadow: var(--shadow);
}

.card-preview {
  min-height: 360px;
  padding: 22px;
}

.monthly-preview {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(18, 25, 43, 0.98), rgba(22, 31, 57, 0.98));
}

.calendar-head,
.range-header,
.agenda-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.calendar-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.calendar-head h2,
.range-inputs strong,
.agenda-top h2 {
  margin: 0;
  font-family: 'Syne', sans-serif;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-nav button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.weekday-row,
.day-grid,
.mini-days,
.agenda-mini-grid {
  display: grid;
  gap: 8px;
}

.weekday-row {
  grid-template-columns: repeat(7, 1fr);
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

.day-grid {
  grid-template-columns: repeat(7, 1fr);
  margin-top: 12px;
}

.day-grid span,
.mini-days span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #dce5ff;
}

.day-grid .muted,
.mini-days .muted {
  color: rgba(220, 229, 255, 0.4);
}

.day-grid .event,
.day-grid .selected {
  color: white;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.98), rgba(56, 189, 248, 0.92));
  box-shadow: 0 12px 24px rgba(123, 97, 255, 0.22);
}

.preview-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
}

.pill {
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.22);
}

.range-preview {
  background:
    radial-gradient(circle at bottom left, rgba(45, 212, 191, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(15, 21, 38, 0.98), rgba(21, 28, 52, 0.98));
}

.range-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.range-inputs > div,
.summary-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.range-inputs label,
.summary-card span,
.agenda-time {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.range-months {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 18px;
}

.mini-month {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

.mini-month h3 {
  margin: 0 0 12px;
  font-family: 'Syne', sans-serif;
}

.mini-days {
  grid-template-columns: repeat(7, 1fr);
}

.mini-days span {
  min-height: 34px;
  border-radius: 12px;
  font-size: 13px;
}

.start,
.end,
.range,
.today {
  color: white !important;
}

.start,
.end {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
}

.range {
  background: rgba(123, 97, 255, 0.24) !important;
}

.mini-summary {
  display: grid;
  gap: 12px;
}

.summary-card.active {
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.2), rgba(56, 189, 248, 0.14));
  border-color: rgba(123, 97, 255, 0.28);
}

.agenda-preview {
  background:
    radial-gradient(circle at top left, rgba(123, 97, 255, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(17, 24, 40, 0.98), rgba(10, 14, 28, 0.98));
}

.status-dot {
  padding: 8px 12px;
  border-radius: 999px;
  color: #d5ffee;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.agenda-layout {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 16px;
  margin-top: 18px;
}

.agenda-calendar,
.agenda-list {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.agenda-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.agenda-mini-head span {
  font-family: 'Syne', sans-serif;
  font-size: 44px;
  font-weight: 800;
}

.agenda-mini-grid {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 10px;
}

.agenda-mini-grid span {
  min-height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.agenda-mini-grid .today {
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.96), rgba(56, 189, 248, 0.88));
}

.agenda-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.agenda-item + .agenda-item {
  margin-top: 10px;
}

.agenda-item.accent {
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.16), rgba(56, 189, 248, 0.12));
  border-color: rgba(123, 97, 255, 0.2);
}

.card-body {
  padding: 22px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-family: 'Syne', sans-serif;
  font-size: 24px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
}

.card-actions button {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.code-block {
  display: none;
  overflow: auto;
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #09101f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #d5ddf5;
  font-size: 13px;
  line-height: 1.7;
}

.code-block.open {
  display: block;
}

@media (max-width: 1100px) {
  .components-grid {
    grid-template-columns: 1fr;
  }

  .card-preview {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar,
  .calendar-head,
  .range-header,
  .agenda-top,
  .range-months,
  .agenda-layout,
  .preview-note {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    padding: 18px;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
    margin-left: 0;
  }

  .hero,
  .card-body {
    padding: 20px;
  }

  .card-actions {
    flex-direction: column;
  }
}

/* ---------- SITE SIDEBAR ---------- */
.site-sidebar {
  position: fixed;
  left: 24px;
  top: 24px;
  width: 240px;
  bottom: 40px;
  padding: 20px 16px;
  background: linear-gradient(180deg, rgba(13,20,40,0.96), rgba(10,14,24,0.9));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(2,6,18,0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 15;
}

.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  color: var(--text);
}

.sidebar-brand .brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}

.sidebar-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  transition: 0.18s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

.sidebar-footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
body.light {
      background: #ffffff;
      color: #000000;
      transition: background 0.3s, color 0.3s;
    }

    body.dark {
      background: #0f172a;
      color: #ffffff;
      transition: background 0.3s, color 0.3s;
    }

    .theme-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      background: #e2e8f0;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
      transition: background 0.3s;
    }

    .theme-toggle:hover {
      background: #cbd5e1;
    }

    .theme-toggle i {
      font-size: 20px;
      color: #333;
      transition: color 0.3s;
    }

    body.dark .theme-toggle {
      background: #1e293b;
    }

    body.dark .theme-toggle i {
      color: #facc15; /* yellow for moon */
    }
    /* ====================================
TIMELINE
==================================== */

.timeline-preview{
  background:
  linear-gradient(
  135deg,
  #eef2ff,
  #f8fafc);
}

.timeline-track{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:30px;
}

.timeline-node{
  flex:1;
  padding:16px;
  border-radius:16px;
  background:white;
  text-align:center;
}

.timeline-node.active{
  background:#6366f1;
  color:white;
}

.timeline-node.launch{
  background:#10b981;
  color:white;
}

/* ====================================
AVAILABILITY
==================================== */

.availability-grid{
  display:grid;
  gap:14px;
  margin-top:20px;
}

.member{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:14px;
  background:white;
}

.member span{
  width:12px;
  height:12px;
  border-radius:50%;
}

.online span{
  background:#10b981;
}

.busy span{
  background:#ef4444;
}

.away span{
  background:#f59e0b;
}

/* ====================================
BOOKING
==================================== */

.booking-slots{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:24px;
}

.booking-slots button{
  border:none;
  padding:14px;
  border-radius:14px;
  background:white;
  cursor:pointer;
}

.booking-slots .selected{
  background:#6366f1;
  color:white;
}

/* ====================================
TRAVEL
==================================== */

.travel-route{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:28px;
}

.travel-route div{
  text-align:center;
}

.travel-route i{
  color:#6366f1;
}

/* ====================================
CONTENT
==================================== */

.content-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:24px;
}

.content-item{
  background:white;
  border-radius:14px;
  padding:14px;
  display:flex;
  justify-content:space-between;
}

/* ====================================
HABIT TRACKER
==================================== */

.habit-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:10px;
  margin-top:25px;
}

.habit-grid span{
  width:26px;
  height:26px;
  border-radius:8px;
  background:#e5e7eb;
}

.habit-grid .done{
  background:#10b981;
}
.custom-calendar-preview{
  background:#fff;
  border-radius:24px;
  padding:24px;
  box-shadow:
  0 20px 50px rgba(0,0,0,.08);
}

.calendar-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.calendar-kicker{
  font-size:.75rem;
  font-weight:600;
  text-transform:uppercase;
  color:#6366f1;
}

.calendar-toolbar h2{
  margin-top:6px;
  font-size:1.5rem;
}

.toolbar-actions{
  display:flex;
  gap:10px;
}

.toolbar-actions button{
  width:42px;
  height:42px;
  border:none;
  border-radius:12px;
  cursor:pointer;
  background:#f1f5f9;
}

.calendar-settings{
  display:flex;
  gap:20px;
  margin:20px 0;
  flex-wrap:wrap;
}

.calendar-settings label{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:.9rem;
}

.calendar-settings input{
  border:none;
  background:#f8fafc;
  border-radius:10px;
  padding:8px;
}

.weekday-row{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  margin-bottom:12px;
  text-align:center;
  font-weight:600;
  color:#64748b;
}

.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:10px;
}

.calendar-day{
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  cursor:pointer;
  background:#f8fafc;
  transition:.25s;
}

.calendar-day:hover{
  transform:translateY(-2px);
}

.calendar-day.empty{
  background:transparent;
}

.calendar-day.today{
  border:2px solid var(--accent);
}

.calendar-day.selected{
  background:var(--accent);
  color:white;
}

.calendar-day.event{
  position:relative;
}

.calendar-day.event::after{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--accent);
  position:absolute;
  bottom:8px;
}

:root{
  --accent:#6366f1;
}
/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 48px;
  background: linear-gradient(180deg, rgba(8,10,14,0.98), rgba(6,8,12,0.98));
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 -8px 30px rgba(2,6,18,0.45);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 44px 32px;
  width: 100%;
}
.ft-col h4,
.ft-col h5 {
  margin: 0 0 12px 0;
  color: var(--text);
  font-weight: 700;
}
.ft-col p,
.ft-col ul,
.ft-col li {
  margin: 0;
  color: var(--muted);
}
.ft-col ul { list-style: none; padding: 0; }
.ft-col ul li { margin: 8px 0; }
.ft-col a { color: var(--accent-2); text-decoration: none; transition: color 180ms ease; }
.ft-col a:hover { color: var(--accent); }
.ft-newsletter .newsletter-form { display:flex; gap:8px; margin-top:10px; align-items:center; }
.ft-newsletter input { flex:1; padding:10px 12px; border-radius:10px; border:1px solid rgba(255,255,255,0.04); background: rgba(255,255,255,0.02); color: var(--text); box-shadow: inset 0 2px 8px rgba(0,0,0,0.6); }
.ft-newsletter button { padding:10px 14px; border-radius:10px; border:none; background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#fff; cursor:pointer; box-shadow: 0 8px 18px rgba(59,48,151,0.18); }
.footer-bottom { padding: 16px 0; text-align:center; border-top: 1px solid rgba(255,255,255,0.03); color: var(--muted); font-size: 13px; }

@media (max-width: 992px) {
  .site-sidebar { display: none; }
  .page-shell { margin-left: 0; }
  .footer-top { grid-template-columns: 1fr; padding: 24px; }
  .page-shell { width: calc(100% - 32px); }
}
