* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #0069ff;
  --blue-light: rgba(0, 105, 255, 0.065);
  --blue-light-hover: rgba(0, 105, 255, 0.14);
  --text-dark: #0a2540;
  --text-body: #1a1a1a;
  --text-gray: #666a73;
  --border: #e6e9ee;
  --red: #f4470b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: var(--text-body);
  min-height: 100vh;
}

/* ---------- top nav ---------- */
.topnav {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: #1f1fff;
  letter-spacing: -1px;
}
.logo-r { color: var(--red); }

.nav-right { display: flex; align-items: center; gap: 18px; }

.nav-tab {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 20px;
}
.nav-tab:hover { color: var(--text-dark); }
.nav-tab.active { background: var(--blue); color: #fff; }

.user-picker { display: flex; align-items: center; gap: 8px; }

#member-select {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
}

.add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.add-btn:hover { filter: brightness(1.1); }

/* ---------- card layout ---------- */
main { display: flex; justify-content: center; padding: 60px 24px; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  width: 100%;
  max-width: 1060px;
  min-height: 620px;
}

/* ---------- left panel ---------- */
.left-panel {
  width: 330px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #1f1fff;
  margin-bottom: 26px;
}

.subtitle {
  color: var(--text-gray);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-body);
  margin-bottom: 22px;
}

.duration {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 24px;
}

.description {
  color: var(--text-body);
  font-size: 15.5px;
  line-height: 1.55;
}

.member-legend { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.member-legend.hidden { display: none; }

.legend-item { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--text-dark); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

.left-footer {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cookie-link { color: var(--blue); font-size: 14px; }

.wipe-btn {
  align-self: flex-start;
  background: none;
  border: 1px solid #f0b4a0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.wipe-btn:hover { background: rgba(244, 71, 11, 0.07); border-color: var(--red); }

/* ---------- welcome modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.overlay.hidden { display: none; }

.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 38px 42px;
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.modal-mark {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #1f1fff;
  margin: 0 auto 18px;
}

.modal-title { font-size: 26px; font-weight: 800; color: var(--text-body); margin-bottom: 8px; }
.modal-sub { color: var(--text-gray); font-size: 15px; margin-bottom: 26px; }

.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.name-btn {
  border: 1px solid rgba(0, 105, 255, 0.5);
  background: #fff;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 4px;
  padding: 13px 0;
  cursor: pointer;
}
.name-btn:hover { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-light); }
.name-btn.current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- right panel ---------- */
.right-panel { flex: 1; padding: 32px 36px; min-width: 0; }

.select-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 24px;
}

.picker { display: flex; gap: 36px; }

.calendar-col { flex: 1; min-width: 360px; }

.month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 22px;
}

.month-label { font-size: 17px; color: var(--text-body); }

.month-nav { display: flex; gap: 6px; }

.nav-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow:hover { background: var(--blue-light); }
.nav-arrow:disabled { color: #c3c6cc; cursor: default; background: none; }

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-body);
  margin-bottom: 10px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 4px;
  justify-items: center;
}

.day {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: none;
  font-size: 15.5px;
  font-weight: 600;
  color: #b2b5bb;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: default;
  font-family: inherit;
}

.day.selectable {
  color: var(--blue);
  background: var(--blue-light);
  font-weight: 700;
  cursor: pointer;
}
.day.selectable:hover { background: var(--blue-light-hover); }

.day.has-availability { background: var(--blue-light-hover); }

.day.selected {
  background: var(--blue);
  color: #fff;
}

.day.today::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- timezone ---------- */
.tz-row { margin-top: 28px; padding: 0 8px; }
.tz-label { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.tz-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-body);
}

/* ---------- slots column ---------- */
.slots-col { width: 230px; flex-shrink: 0; }

.slots-date { font-size: 16px; color: var(--text-body); margin-bottom: 18px; min-height: 20px; }

.slots-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}

.slots-list::-webkit-scrollbar { width: 7px; }
.slots-list::-webkit-scrollbar-thumb { background: #b9bcc2; border-radius: 4px; }

.slots-empty { color: var(--text-gray); font-size: 14.5px; padding-top: 8px; }

.slot-btn {
  border: 1px solid rgba(0, 105, 255, 0.5);
  background: #fff;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 4px;
  padding: 13px 0;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
}
.slot-btn:hover { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

.slot-btn.selected {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* team view slot rows */
.team-slot {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  flex-shrink: 0;
}
.team-slot.popular { border-color: var(--blue); background: var(--blue-light); }
.team-slot-time { font-weight: 700; font-size: 14.5px; color: var(--text-dark); margin-bottom: 6px; }
.team-slot-members { display: flex; flex-wrap: wrap; gap: 5px; }

.member-chip {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 10px;
  padding: 2px 9px;
}

.notice {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.notice.show { opacity: 1; }

@media (max-width: 900px) {
  .card { flex-direction: column; }
  .left-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .picker { flex-direction: column; }
  .slots-col { width: 100%; }
}

.config-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff4e5;
  color: #8a5300;
  border-top: 1px solid #f0c787;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 10px 16px;
  z-index: 50;
}
.config-banner.hidden { display: none; }
