:root {
  --ink: #342f3a;
  --muted: #6f6877;
  --line: rgba(52, 47, 58, 0.12);
  --paper: #ffffff;
  --wash: #fff8fb;
  --sky: #7fb9e6;
  --lavender: #d6beea;
  --butter: #f4d77a;
  --matcha: #b7c96a;
  --pink: #f98ba9;
  --tangerine: #ff8f45;
  --coral: #d6beea;
  --teal: #b7c96a;
  --orchid: #ff8f45;
  --yellow: #f4d77a;
  --blue: #7fb9e6;
  --sage: #b7c96a;
  --rose: #f98ba9;
  --aqua: #7fb9e6;
  --shadow: 0 18px 42px rgba(52, 47, 58, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #fffdf8;
  background-image: url("./assets/wellness-background.png");
  background-size: 720px 720px;
  color: var(--ink);
  font-family: Quicksand, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: rgba(255, 253, 248, 0.34);
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(234, 223, 237, 0.8);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  padding: 24px 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(52, 47, 58, 0.12);
}

.crystal-mark {
  width: 25px;
  height: 31px;
  display: block;
  position: relative;
  border: 1.8px solid currentColor;
  clip-path: polygon(50% 0, 86% 20%, 76% 72%, 50% 100%, 24% 72%, 14% 20%);
  background: var(--lavender);
}

.crystal-mark::before,
.crystal-mark::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 5px;
  width: 1.5px;
  background: currentColor;
}

.crystal-mark::before {
  left: 50%;
}

.crystal-mark::after {
  left: 29%;
  transform: rotate(-17deg);
}

.rail nav {
  display: grid;
  gap: 12px;
}

.rail-button,
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #717688;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.rail-button.active,
.rail-button:hover,
.icon-button:hover {
  background: rgba(249, 139, 169, 0.22);
  border-color: rgba(249, 139, 169, 0.48);
  color: #a94462;
}

.icon,
.copy-icon,
.send-icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  position: relative;
}

.grid-icon {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 11px 0 0 currentColor, 0 11px 0 currentColor, 11px 11px 0 currentColor;
}

.poll-icon,
.wallet-icon,
.vibe-icon,
.calendar-icon,
.pin-icon,
.copy-icon,
.send-icon {
  border: 2px solid currentColor;
  border-radius: 5px;
}

.poll-icon::before,
.poll-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
}

.poll-icon::before { top: 5px; }
.poll-icon::after { top: 11px; }

.calendar-icon::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 4px;
  height: 2px;
  background: currentColor;
}

.wallet-icon::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 5px;
  width: 8px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: var(--paper);
}

.vibe-icon::before,
.vibe-icon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: currentColor;
}

.vibe-icon::before {
  width: 7px;
  height: 7px;
  left: 3px;
  top: 4px;
}

.vibe-icon::after {
  width: 11px;
  height: 11px;
  right: 2px;
  bottom: 2px;
}

.pin-icon {
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.copy-icon::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
  left: -6px;
  top: 5px;
  background: inherit;
}

.copy-icon.light {
  color: #ffffff;
}

.send-icon {
  border: 0;
  transform: rotate(25deg);
}

.send-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-top: 10px solid currentColor;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}

.workspace {
  padding: 28px clamp(18px, 3vw, 38px) 42px;
}

.topbar,
.panel-head,
.topbar-actions,
.person-card {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: 0;
  color: #34283c;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
}

.topbar p,
.panel-head p,
.person-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-person-picker {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px 0 13px;
  border: 1px solid rgba(249, 139, 169, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(249, 139, 169, 0.12);
}

.top-person-picker span,
.trip-code-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.top-person-picker select {
  height: 34px;
  min-width: 112px;
  border: 0;
  background: transparent;
  padding-left: 0;
}

.trip-code-field {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 13px;
  border: 1px solid rgba(127, 185, 230, 0.44);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(127, 185, 230, 0.12);
}

.trip-code-field input {
  width: 112px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.sync-status {
  margin: -12px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  border: 1px solid rgba(244, 215, 122, 0.62);
  border-radius: 8px;
  background: rgba(255, 249, 229, 0.5);
  backdrop-filter: blur(10px);
}

.retreat-visual {
  min-height: 188px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(234, 216, 227, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.retreat-panel {
  position: relative;
  margin: 0;
  min-height: 164px;
  border-radius: 8px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.mountain-panel { background-image: url("./assets/retreat-mountain.png"); }
.spa-panel { background-image: url("./assets/retreat-spa.png"); }
.lake-panel { background-image: url("./assets/retreat-lake.png"); }

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 750;
  font-size: 14px;
}

.primary-button {
  color: white;
  background: #362d3f;
  box-shadow: 0 12px 26px rgba(91, 74, 114, 0.18);
}

.ghost-button {
  color: #5c4b63;
  background: rgba(214, 190, 234, 0.32);
  border: 1px solid rgba(214, 190, 234, 0.6);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.module-note {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(214, 190, 234, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.status-note {
  grid-column: 1 / -1;
  margin: 0;
  display: grid;
  gap: 3px;
}

.status-note strong {
  color: var(--ink);
  font-size: 13px;
}

.person-card,
.panel {
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(162, 142, 173, 0.10);
  border-radius: 8px;
}

.person-card {
  gap: 12px;
  padding: 15px;
  position: relative;
  overflow: hidden;
}

.person-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--lavender);
}

.person-card:nth-child(2)::before {
  background: var(--matcha);
}

.person-card:nth-child(3)::before {
  background: var(--tangerine);
}

.person-card.pending {
  border-color: #efd9fd;
  background: rgba(255, 255, 255, 0.5);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid rgba(52, 47, 58, 0.08);
}

.coral {
  background: rgba(214, 190, 234, 0.32);
  color: #8b6aa5;
}

.teal {
  background: rgba(183, 201, 106, 0.24);
  color: #74843a;
}

.orchid {
  background: rgba(255, 143, 69, 0.2);
  color: #c56025;
}

.person-svg {
  width: 32px;
  height: 32px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.person-card h2 {
  font-size: 15px;
  margin-bottom: 3px;
}

.toggle-label {
  margin-left: auto;
}

.toggle-label input {
  position: absolute;
  opacity: 0;
}

.toggle-label span {
  width: 42px;
  height: 24px;
  display: block;
  border-radius: 999px;
  background: #d7dbe4;
  position: relative;
  transition: background 160ms ease;
}

.toggle-label span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
}

.toggle-label input:checked + span {
  background: var(--matcha);
}

.toggle-label input:checked + span::after {
  transform: translateX(18px);
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

.panel {
  padding: 18px;
  overflow: hidden;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: var(--pink);
}

.consensus-panel::before {
  background: var(--sky);
}

.vibe-panel::before {
  background: var(--lavender);
}

.destinations-panel::before {
  background: var(--tangerine);
}

.recommendations-panel::before {
  background: var(--matcha);
}

.consensus-panel {
  background: rgba(247, 251, 255, 0.5);
}

.vibe-panel {
  background: rgba(252, 247, 255, 0.5);
}

.destinations-panel {
  background: rgba(255, 248, 242, 0.5);
}

.recommendations-panel {
  background: rgba(250, 252, 239, 0.5);
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.panel,
.status-strip {
  scroll-margin-top: 24px;
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 17px;
  line-height: 1.15;
  margin-bottom: 4px;
  color: #3a2a4c;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.segmented button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.segmented button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 3px 9px rgba(40, 43, 60, 0.08);
}

.destination-list,
.best-options-grid,
.vibe-list {
  display: grid;
  gap: 10px;
}

.person-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(220, 239, 235, 0.64);
  border-radius: 8px;
  background: rgba(244, 251, 250, 0.5);
}

.person-picker label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 32px 0 11px;
  color: var(--ink);
  font-weight: 700;
}

input[type="checkbox"] {
  accent-color: var(--teal);
}

.score-badge {
  min-width: 54px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 242, 197, 0.5);
  color: #8a6500;
  font-weight: 850;
}

.date-row {
  display: grid;
  grid-template-columns: 82px 1fr 42px auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 750;
}

.date-people,
.date-color-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.date-people i,
.date-color-stack i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.track {
  height: 9px;
  border-radius: 999px;
  background: #edf0f4;
  overflow: hidden;
}

.track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--sky);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.calendar-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.legend-pooja { background: var(--lavender); }
.legend-jaimie { background: var(--matcha); }
.legend-komal { background: var(--tangerine); }

.mini-calendar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calendar-month {
  border: 1px solid rgba(225, 244, 239, 0.68);
  border-radius: 8px;
  padding: 12px;
  background: rgba(248, 255, 253, 0.5);
}

.calendar-month h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

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

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.calendar-empty {
  min-height: 42px;
}

.mini-calendar button {
  min-height: 42px;
  border: 1px solid rgba(236, 226, 239, 0.68);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 750;
  gap: 2px;
}

.mini-calendar button span {
  color: inherit;
}

.mini-calendar button small {
  color: inherit;
  font-size: 9px;
  font-weight: 750;
}

.date-color-stack {
  min-height: 8px;
}

.mini-calendar button.chosen {
  background: rgba(233, 251, 248, 0.5);
  border-color: #aee9dd;
  color: #147f72;
}

.mini-calendar button.overlap {
  box-shadow: inset 0 -3px 0 var(--yellow);
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.vibe-option {
  position: relative;
  min-height: 46px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(240, 223, 234, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.vibe-option.selected {
  border-color: rgba(214, 190, 234, 0.75);
  background: rgba(214, 190, 234, 0.28);
}

.vibe-option small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.vibe-option i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--lavender);
}

.destination-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(232, 226, 239, 0.68);
  border-radius: 8px;
  background: rgba(251, 249, 255, 0.5);
}

.destination-photo {
  height: 86px;
  border-radius: 7px;
  background-image: url("./assets/destination-collage.png");
  background-size: 300% 100%;
  background-position: var(--photo-position, 0% 50%);
}

.destination-card h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.destination-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.destination-vibes {
  margin-top: 3px;
  color: #6d5078;
  font-size: 12px;
  font-weight: 750;
}

.vote-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.fit-score {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 850;
  background: var(--matcha);
  position: relative;
}

.fit-score::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #3a2a4c;
}

.fit-score span {
  position: relative;
  z-index: 1;
  font-size: 14px;
}

.fit-score.no-data {
  width: 112px;
  height: auto;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 244, 218, 0.5);
  color: var(--muted);
  text-align: center;
}

.fit-score.no-data::before {
  display: none;
}

.fit-score.no-data span {
  font-size: 11px;
  line-height: 1.15;
}

.best-card {
  padding: 15px;
  border: 1px solid rgba(234, 223, 237, 0.7);
  border-radius: 8px;
  background: rgba(255, 250, 253, 0.5);
}

.best-card.feature {
  color: white;
  border-color: transparent;
  background: rgba(54, 45, 63, 0.5);
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.best-label {
  display: block;
  margin-bottom: 8px;
  color: #a94462;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.best-card.feature .best-label,
.best-card.feature p {
  color: rgba(255, 255, 255, 0.82);
}

.best-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}

.date-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.date-chip-row span {
  padding: 6px 8px;
  border: 1px solid rgba(127, 185, 230, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.best-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.full-width {
  width: 100%;
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 750;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  .recommendations-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .recommendations-panel .panel-head,
  .recommendations-panel .full-width,
  .recommendations-panel .best-options-grid {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .rail nav {
    display: flex;
    gap: 6px;
  }

  .workspace {
    padding: 20px 14px 30px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .top-person-picker,
  .trip-code-field,
  .topbar-actions .primary-button {
    flex: 1;
  }

  .retreat-visual {
    grid-template-columns: 1fr;
  }

  .status-strip,
  .dashboard-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .recommendations-panel {
    display: block;
  }

  .destination-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .person-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .mini-calendar {
    grid-template-columns: 1fr;
  }

  .destination-photo {
    height: 96px;
  }

  .fit-score {
    grid-column: 1 / -1;
    width: 100%;
    height: 38px;
    border-radius: 8px;
    background: var(--ink);
  }

  .fit-score::before {
    display: none;
  }

  .mini-calendar {
    grid-template-columns: 1fr;
  }
}
