:root {
  --bg: #070a10;
  --surface: rgba(15, 21, 33, 0.88);
  --surface-strong: #111928;
  --border: rgba(88, 178, 255, 0.16);
  --border-bright: rgba(56, 232, 255, 0.45);
  --text: #e6f0fa;
  --muted: #8ca0b8;
  --cyan: #38e8ff;
  --cyan-dim: rgba(56, 232, 255, 0.14);
  --amber: #ffb84d;
  --amber-dim: rgba(255, 184, 77, 0.16);
  --danger: #ff5d73;
  --danger-dim: rgba(255, 93, 115, 0.14);
  --violet: #a78bfa;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 232, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 232, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(56, 232, 255, 0.14) 0%, rgba(255, 184, 77, 0.05) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bolt { color: var(--cyan); text-shadow: 0 0 12px rgba(56, 232, 255, 0.65); }

.brand-name {
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
}

.badge-freq {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(56, 232, 255, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
}

.telemetry {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.telemetry-item {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 8px;
}

.container {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px 56px;
}

.hero {
  max-width: 780px;
  margin: 14px 0 36px;
}

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero h1 .accent {
  color: var(--cyan);
  text-shadow: 0 0 28px rgba(56, 232, 255, 0.35);
}

.lead {
  color: #b7c8dc;
  font-size: 1.04rem;
  margin-bottom: 20px;
}
.lead strong { color: var(--text); }

.rules-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rule-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #cde0f5;
  background: rgba(17, 25, 40, 0.85);
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 999px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot.violet { background: var(--violet); box-shadow: 0 0 8px var(--violet); }

.booking-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 880px) {
  .booking-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.card-header.compact { margin-bottom: 16px; }
.card-header h2 { font-size: 1.25rem; font-weight: 700; }
.muted { color: var(--muted); font-size: 0.88rem; }

.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-label {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 132px;
  text-align: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, background 0.15s;
}
.icon-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  background: var(--cyan-dim);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-cell {
  aspect-ratio: 1 / 0.95;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(13, 20, 34, 0.85);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
}

.cal-cell.empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.cal-cell.available:hover {
  border-color: var(--cyan);
  background: rgba(56, 232, 255, 0.11);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(56, 232, 255, 0.16);
}

.cal-cell.selected {
  border-color: var(--cyan);
  background: linear-gradient(145deg, rgba(56, 232, 255, 0.28), rgba(56, 232, 255, 0.12));
  box-shadow: 0 0 0 2px rgba(56, 232, 255, 0.35), 0 0 22px rgba(56, 232, 255, 0.25);
  color: #ffffff;
}

.cal-cell.booked {
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 93, 115, 0.10),
    rgba(255, 93, 115, 0.10) 6px,
    rgba(255, 93, 115, 0.04) 6px,
    rgba(255, 93, 115, 0.04) 12px
  );
  border-color: rgba(255, 93, 115, 0.32);
  color: #f497a4;
  cursor: not-allowed;
}

.cal-cell.maintenance {
  background: repeating-linear-gradient(
    -45deg,
    rgba(250, 204, 21, 0.24),
    rgba(250, 204, 21, 0.24) 7px,
    rgba(10, 10, 8, 0.88) 7px,
    rgba(10, 10, 8, 0.88) 14px
  );
  border-color: rgba(250, 204, 21, 0.55);
  color: #fef08a;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  cursor: not-allowed;
}

.cal-cell.past {
  opacity: 0.28;
  cursor: not-allowed;
  background: rgba(13, 20, 34, 0.4);
}

.cal-tag {
  font-size: 0.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.cal-cell.booked .cal-tag { color: var(--danger); }
.cal-cell.maintenance .cal-tag { color: #facc15; font-weight: 700; }
.cal-cell.available .cal-tag { color: var(--cyan); opacity: 0.75; }
.cal-cell.selected .cal-tag { color: #ffffff; }

.calendar-legend {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid var(--border); }
.swatch.avail { background: rgba(56, 232, 255, 0.14); border-color: rgba(56, 232, 255, 0.4); }
.swatch.selected { background: var(--cyan); border-color: var(--cyan); }
.swatch.booked { background: rgba(255, 93, 115, 0.25); border-color: var(--danger); }
.swatch.maintenance {
  background: repeating-linear-gradient(
    -45deg,
    #facc15,
    #facc15 3px,
    #11110e 3px,
    #11110e 6px
  );
  border-color: rgba(250, 204, 21, 0.7);
}
.swatch.past { background: rgba(255, 255, 255, 0.06); }

.selected-date-box {
  background: rgba(56, 232, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.selected-date-box.active {
  border-color: var(--border-bright);
  background: rgba(56, 232, 255, 0.11);
}
.selected-date-box .label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}
.selected-date-box strong { font-size: 1.04rem; }
.selected-window {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--amber);
  margin-top: 2px;
}

.field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #cfe0f4;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b111d;
  color: var(--text);
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 232, 255, 0.16);
}
.field .hint {
  font-size: 0.76rem;
  color: var(--muted);
}

.password-field {
  position: relative;
}
.password-field input {
  padding-inline-end: 48px;
}
.password-field input::-ms-reveal {
  display: none;
}
.password-toggle {
  position: absolute;
  inset-block: 1px;
  inset-inline-end: 1px;
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--cyan);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -3px;
}
.password-toggle[aria-pressed="false"] .password-toggle-slash {
  display: none;
}

.primary-btn {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #04131c;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, filter 0.15s, opacity 0.15s;
}
.primary-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ghost-btn:hover {
  border-color: var(--cyan);
  background: rgba(56, 232, 255, 0.06);
}

.alert {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.alert.error {
  background: var(--danger-dim);
  border: 1px solid rgba(255, 93, 115, 0.4);
  color: #ffb8c2;
}

.hidden { display: none !important; }

.success-badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.success-panel h2 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.link-box {
  margin: 18px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.link-box label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}
.link-row {
  display: flex;
  gap: 8px;
}
.link-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  background: #09101c;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}
.copy-btn {
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  background: var(--cyan-dim);
  color: var(--cyan);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:hover { background: rgba(56, 232, 255, 0.24); }

.email-confirm-box {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #b7f5db;
  font-size: 0.86rem;
  line-height: 1.5;
}
.email-confirm-box strong { color: #ecfdf5; }
.email-confirm-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84em;
  background: rgba(16, 185, 129, 0.18);
  padding: 1px 5px;
  border-radius: 4px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 0.8rem;
}
