:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #121212;
  --surface-2: #1b1a17;
  --line: #34302a;
  --gold: #d8a640;
  --gold-soft: #f3d48b;
  --ink: #f5efe2;
  --muted: #b8ad9a;
  --green: #4dbb86;
  --red: #e26d5c;
  --blue: #58a6c8;
  --violet: #a78bfa;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(216, 166, 64, 0.18), transparent 30rem),
    linear-gradient(135deg, #050505 0%, #11110f 48%, #0b1517 100%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 166, 64, 0.24), transparent 25rem),
    radial-gradient(circle at 100% 100%, rgba(88, 166, 200, 0.1), transparent 24rem),
    linear-gradient(145deg, #030303, #11100d 58%, #071315);
}

.login-card {
  width: min(100%, 26rem);
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
  border: 1px solid rgba(216, 166, 64, 0.38);
  border-radius: 0.85rem;
  background:
    linear-gradient(145deg, rgba(216, 166, 64, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(9, 9, 9, 0.94);
  box-shadow: var(--shadow);
}

.login-card img {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border: 1px solid rgba(216, 166, 64, 0.5);
  border-radius: 50%;
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1 {
  font-size: 2rem;
}

.login-card p:not(.eyebrow),
.login-card label {
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 0.4rem;
}

.login-card input {
  min-height: 3rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  padding: 0 0.8rem;
}

.login-card .primary-button {
  min-height: 3rem;
  justify-content: center;
}

.login-error {
  color: #ff9388;
  font-weight: 700;
}

body[data-role="guest"] .icon-add-button,
body[data-role="guest"] .task-form,
body[data-role="guest"] .schedule-actions,
body[data-role="guest"] .budget-actions,
body[data-role="guest"] .person-actions,
body[data-role="guest"] .participant-decision,
body[data-role="guest"] .task-actions {
  display: none !important;
}

body[data-role="guest"] .readiness-pill:not([data-readiness-type="pass"]):not([data-readiness-type="weight"]),
body[data-role="guest"] .packing-item {
  cursor: default;
  pointer-events: none;
}

body[data-role="guest"] .readiness-pill[data-readiness-type="pass"],
body[data-role="guest"] .readiness-pill[data-readiness-type="weight"] {
  cursor: pointer;
  pointer-events: auto;
}

body[data-role="guest"] .weight-pill {
  cursor: pointer;
  pointer-events: auto;
}

body[data-role="guest"] .task-row {
  cursor: default;
}

body[data-role="guest"] .panel::after {
  content: none;
}

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

.side-panel {
  border-right: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.88);
  padding: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.35rem;
}

.brand-lockup img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(216, 166, 64, 0.5);
}

.brand-lockup h1,
.topbar h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand-lockup p,
.trip-brief span,
.metric small,
.section-heading span,
.compact-list small {
  color: var(--muted);
}

.eyebrow,
.label {
  margin: 0 0 0.25rem;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-tabs {
  display: grid;
  gap: 0.45rem;
}

.menu-toggle {
  display: none;
}

.tab-button,
.menu-toggle,
.day-button,
.toggle-button,
.primary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.45rem;
  min-height: 2.45rem;
}

.tab-button {
  text-align: left;
  padding: 0.7rem 0.8rem;
}

.tab-button.active,
.day-button.active {
  background: linear-gradient(135deg, rgba(216, 166, 64, 0.24), rgba(88, 166, 200, 0.12));
  border-color: rgba(216, 166, 64, 0.7);
}

.trip-brief {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}

.dashboard {
  padding: 1.4rem;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-access {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-access > span {
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.6rem;
  border: 1px solid rgba(216, 166, 64, 0.22);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(216, 166, 64, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-login-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(19rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid rgba(216, 166, 64, 0.32);
  border-radius: 0.65rem;
  background: rgba(10, 10, 9, 0.97);
  box-shadow: var(--shadow);
}

.admin-login-panel label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-login-panel input {
  min-height: 2.6rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  padding: 0 0.7rem;
}

.admin-login-panel .primary-button {
  justify-content: center;
  min-height: 2.55rem;
}

.day-selector {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.metric,
.panel,
.person-card,
.booking-card {
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.86);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.metric {
  padding: 1rem;
  min-height: 8rem;
  display: grid;
  align-content: space-between;
}

.mobile-countdown-card {
  display: none;
}

.mobile-summary-grid {
  display: none;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.1;
}

.metric strong#countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  font-size: 1rem;
}

.countdown-unit {
  display: grid;
  gap: 0.15rem;
}

.countdown-unit b {
  font-size: 1.45rem;
  line-height: 1;
}

.countdown-unit em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
  gap: 0.9rem;
}

.panel {
  padding: 1rem;
}

.hero-panel {
  min-height: 23rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 1rem;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(216, 166, 64, 0.16), rgba(18, 18, 18, 0.92)),
    var(--surface);
}

.hero-panel h3 {
  font-size: 2.2rem;
  max-width: 35rem;
}

.hero-panel p:not(.eyebrow) {
  max-width: 39rem;
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(216, 166, 64, 0.45);
}

.mission-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.mission-tags span {
  border: 1px solid rgba(216, 166, 64, 0.28);
  border-radius: 999px;
  background: rgba(216, 166, 64, 0.08);
  color: var(--gold-soft);
}

.mission-tags span {
  min-height: 1.8rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.compact-list,
.task-list,
.budget-list {
  display: grid;
  gap: 0.65rem;
}

.compact-row,
.task-row,
.budget-row {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 0.45rem;
  padding: 0.75rem;
}

.compact-row {
  display: grid;
  gap: 0.25rem;
}

.flight-tracker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.flight-tracker-panel {
  border-color: rgba(216, 166, 64, 0.34);
  background:
    linear-gradient(145deg, rgba(216, 166, 64, 0.12), rgba(88, 166, 200, 0.055)),
    rgba(14, 14, 13, 0.94);
}

.flight-tracker div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(216, 166, 64, 0.22);
  border-radius: 0.5rem;
  background: rgba(216, 166, 64, 0.07);
}

.flight-tracker span {
  color: var(--muted);
  font-size: 0.8rem;
}

.flight-tracker strong {
  color: var(--gold-soft);
  font-size: 1.06rem;
}

.flight-tracker p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.flight-source-link {
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  min-height: 2rem;
  align-items: center;
  padding: 0 0.65rem;
  border: 1px solid rgba(216, 166, 64, 0.28);
  border-radius: 999px;
  background: rgba(216, 166, 64, 0.08);
  color: var(--gold-soft);
  text-decoration: none;
  font-size: 0.86rem;
}

.weather-panel {
  border-color: rgba(88, 166, 200, 0.28);
  background:
    linear-gradient(145deg, rgba(88, 166, 200, 0.11), rgba(216, 166, 64, 0.055)),
    rgba(14, 14, 13, 0.94);
}

.weather-now {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.weather-now div,
.weather-day {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(88, 166, 200, 0.24);
  border-radius: 0.5rem;
  background: rgba(88, 166, 200, 0.06);
}

.weather-now span,
.weather-day span {
  color: var(--muted);
  font-size: 0.8rem;
}

.weather-now strong,
.weather-day strong {
  color: var(--gold-soft);
  font-size: 1.06rem;
}

.weather-now small,
.weather-day small {
  color: var(--muted);
  line-height: 1.35;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.65rem 0;
}

.planning-status-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.planning-status-item {
  display: grid;
  gap: 0.25rem;
  min-height: 4rem;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.035);
}

.planning-status-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.planning-status-item strong {
  font-size: 0.95rem;
}

.planning-status-item.ready {
  border-color: rgba(77, 187, 134, 0.42);
  background: rgba(77, 187, 134, 0.1);
}

.planning-status-item.open {
  border-color: rgba(216, 166, 64, 0.42);
  background: rgba(216, 166, 64, 0.08);
}

.planning-status-item.missing {
  border-color: rgba(226, 109, 92, 0.32);
  background: rgba(226, 109, 92, 0.07);
}

.faq-panel {
  overflow: hidden;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.faq-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 13rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  background:
    linear-gradient(145deg, rgba(216, 166, 64, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
}

.faq-card.priority {
  border-color: rgba(216, 166, 64, 0.38);
  background:
    linear-gradient(145deg, rgba(216, 166, 64, 0.18), rgba(88, 166, 200, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.faq-card span {
  width: fit-content;
  min-height: 1.55rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(216, 166, 64, 0.12);
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.faq-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.faq-card p,
.faq-card li {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.faq-card p,
.faq-card ul {
  margin: 0;
}

.faq-card ul {
  display: grid;
  gap: 0.45rem;
  padding-left: 1rem;
}

.faq-card a {
  width: fit-content;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  margin-top: 0.15rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(216, 166, 64, 0.28);
  border-radius: 999px;
  background: rgba(216, 166, 64, 0.08);
  color: var(--gold-soft);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.packing-list {
  display: grid;
  gap: 0.5rem;
}

.packing-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  min-height: 3.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(216, 166, 64, 0.18);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  text-align: left;
}

.packing-check {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(216, 166, 64, 0.45);
  border-radius: 50%;
  color: #08110c;
  background: rgba(216, 166, 64, 0.08);
  font-weight: 900;
}

.packing-item strong,
.packing-item small {
  display: block;
}

.packing-item strong {
  font-size: 0.92rem;
}

.packing-item small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.packing-item.done {
  border-color: rgba(77, 187, 134, 0.42);
  background: rgba(77, 187, 134, 0.1);
}

.packing-item.done .packing-check {
  border-color: rgba(77, 187, 134, 0.7);
  background: var(--green);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #07110c;
  background: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

.status-chip.warning {
  background: var(--gold-soft);
  color: #211707;
}

.status-chip.open {
  background: var(--blue);
  color: #061116;
}

.status-chip.risk {
  background: var(--red);
  color: #1a0805;
}

.day-selector {
  margin-bottom: 0.9rem;
}

.day-button {
  padding: 0.55rem 0.9rem;
}

.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.icon-add-button {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(216, 166, 64, 0.62);
  border-radius: 50%;
  background: rgba(216, 166, 64, 0.12);
  color: var(--gold-soft);
  font-size: 1.35rem;
  line-height: 1;
}

.schedule-form.collapsed,
.budget-form.collapsed,
.people-form.collapsed,
#taskForm.collapsed {
  display: none;
}

.timeline {
  display: grid;
  gap: 0.7rem;
}

.time-card {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0.5rem;
  background: rgba(18, 18, 18, 0.88);
}

.time-card strong {
  color: var(--gold-soft);
}

.time-card a,
.booking-card a {
  color: var(--gold-soft);
  text-decoration: none;
}

.time-card p,
.booking-card p,
.person-card p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.schedule-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.schedule-actions .toggle-button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
}

.budget-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.budget-actions .toggle-button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
}

.budget-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(13rem, 2fr) 7rem 7rem auto;
  gap: 0.75rem;
  align-items: center;
}

.bar-track {
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  border-radius: inherit;
}

.people-grid,
.booking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.person-card,
.booking-card {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.participant-decision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.participant-decision button {
  min-height: 2.65rem;
  justify-content: center;
}

.person-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.readiness-pill {
  min-height: 3.2rem;
  display: grid;
  align-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.35rem;
  border: 1px solid rgba(226, 109, 92, 0.32);
  border-radius: 0.55rem;
  background: rgba(226, 109, 92, 0.08);
  color: var(--ink);
  text-align: center;
}

.readiness-pill span {
  font-size: 0.78rem;
  color: var(--muted);
}

.readiness-pill strong {
  color: #ff9388;
  font-size: 0.78rem;
}

.readiness-pill.done {
  border-color: rgba(77, 187, 134, 0.42);
  background: rgba(77, 187, 134, 0.11);
}

.readiness-pill.done strong {
  color: #89e0b4;
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.person-actions .toggle-button {
  min-height: 2rem;
}

.person-top,
.booking-top,
.task-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.toggle-button {
  padding: 0.45rem 0.65rem;
  color: var(--muted);
}

.toggle-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.primary-button {
  padding: 0.45rem 0.75rem;
  background: linear-gradient(135deg, rgba(216, 166, 64, 0.34), rgba(88, 166, 200, 0.14));
  border-color: rgba(216, 166, 64, 0.75);
}

.toggle-button.done {
  background: rgba(77, 187, 134, 0.16);
  border-color: rgba(77, 187, 134, 0.65);
  color: var(--ink);
}

.task-row {
  align-items: center;
  cursor: grab;
  touch-action: pan-y;
  position: relative;
  overflow: hidden;
}

.task-row.dragging {
  border-color: rgba(216, 166, 64, 0.9);
  background: rgba(216, 166, 64, 0.12);
  opacity: 0.72;
  cursor: grabbing;
}

.task-row.done-task {
  opacity: 0.72;
}

.task-row.done-task .task-content strong {
  text-decoration: line-through;
  text-decoration-color: rgba(243, 212, 139, 0.55);
}

.task-content {
  flex: 1;
  min-width: 12rem;
}

.is-dragging-task {
  user-select: none;
}

.task-actions,
.task-actions button {
  cursor: default;
}

.task-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.task-detail {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.task-link {
  display: inline-flex;
  margin-top: 0.45rem;
  color: var(--gold-soft);
  text-decoration: none;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(13rem, 1.5fr) minmax(10rem, 0.9fr) minmax(12rem, 1.2fr) minmax(8rem, 0.7fr) auto;
  gap: 0.7rem;
  align-items: end;
  margin-bottom: 0.9rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.035);
}

.task-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.task-form input,
.task-form select {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  padding: 0.45rem 0.65rem;
}

.task-form-actions,
.task-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.schedule-form {
  grid-template-columns: minmax(7rem, 0.7fr) minmax(12rem, 1.4fr) minmax(12rem, 1.3fr) minmax(10rem, 1fr) auto;
}

.budget-form {
  grid-template-columns: minmax(12rem, 1.4fr) minmax(9rem, 0.8fr) minmax(9rem, 0.8fr) auto;
}

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

  .side-panel {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-layout,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel img {
    max-width: 15rem;
  }

  .metric-grid,
  .people-grid,
  .booking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    background:
      linear-gradient(180deg, rgba(216, 166, 64, 0.14), transparent 13rem),
      linear-gradient(180deg, #0c0b0a 0%, #050605 100%);
  }

  .dashboard,
  .side-panel {
    padding: 0.9rem;
  }

  .side-panel {
    background:
      linear-gradient(180deg, rgba(216, 166, 64, 0.13), rgba(9, 9, 9, 0.96) 72%),
      rgba(9, 9, 9, 0.96);
    border-bottom-color: rgba(216, 166, 64, 0.28);
    padding-top: 2.85rem;
  }

  .brand-lockup {
    grid-template-columns: 4.25rem 1fr;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
  }

  .brand-lockup img {
    width: 4.25rem;
    height: 4.25rem;
    box-shadow: 0 0 0 0.25rem rgba(216, 166, 64, 0.1), 0 1rem 2.4rem rgba(0, 0, 0, 0.44);
  }

  .brand-lockup h1 {
    font-size: 1.72rem;
    line-height: 1;
  }

  .brand-lockup p:not(.eyebrow) {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
  }

  .trip-brief {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    font-size: 0.92rem;
  }

  .topbar,
  .section-heading,
  .person-top,
  .booking-top,
  .task-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-tabs {
    display: none;
    gap: 0.45rem;
    margin: 0.45rem 0 0;
    padding: 0.35rem;
    border: 1px solid rgba(216, 166, 64, 0.24);
    border-radius: 0.8rem;
    background: rgba(0, 0, 0, 0.42);
    box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.22);
  }

  .nav-tabs.open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab-button {
    min-height: 2.3rem;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.045);
  }

  .tab-button.active {
    box-shadow: inset 0 0 0 1px rgba(243, 212, 139, 0.28), 0 0.6rem 1.6rem rgba(0, 0, 0, 0.25);
  }

  .menu-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    min-height: 3rem;
    padding: 0.68rem 0.85rem;
    border-color: rgba(216, 166, 64, 0.62);
    border-radius: 0.9rem;
    background:
      linear-gradient(135deg, rgba(216, 166, 64, 0.24), rgba(255, 255, 255, 0.055)),
      rgba(12, 12, 11, 0.9);
    box-shadow: inset 0 0 0 1px rgba(243, 212, 139, 0.08), 0 0.9rem 1.9rem rgba(0, 0, 0, 0.26);
  }

  .menu-toggle::after {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--gold-soft);
    border-bottom: 2px solid var(--gold-soft);
    transform: rotate(45deg) translateY(-0.15rem);
  }

  .menu-toggle[aria-expanded="true"]::after {
    transform: rotate(225deg) translate(-0.1rem, -0.05rem);
  }

  .menu-toggle span:first-child {
    color: var(--muted);
  }

  .menu-toggle span:last-child {
    color: var(--ink);
    font-weight: 700;
    margin-left: auto;
    margin-right: 0.8rem;
  }

  .topbar {
    margin-top: 0;
    margin-bottom: 0.7rem;
  }

  .admin-access {
    width: 100%;
    justify-content: space-between;
  }

  .admin-login-panel {
    left: 0;
    right: auto;
    width: 100%;
  }

  .topbar h2 {
    font-size: 1.35rem;
  }

  #overview.active {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  #overview .overview-layout {
    order: -1;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0;
  }

  #overview .metric-grid {
    display: none;
  }

  .mobile-countdown-card {
    display: grid;
    min-height: auto;
    margin-bottom: 0.6rem;
  }

  .mobile-countdown-card strong {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
    margin-top: 0.55rem;
  }

  .mobile-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.8rem;
  }

  .mobile-summary-grid .metric {
    min-height: 5.35rem;
  }

  .mobile-summary-grid .metric strong {
    font-size: 1.05rem;
  }

  .mobile-summary-grid .metric small {
    font-size: 0.7rem;
  }

  .people-grid,
  .booking-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-card {
    min-height: auto;
    padding: 0.9rem;
  }

  .faq-card h3 {
    font-size: 1rem;
  }

  .faq-card p,
  .faq-card li {
    font-size: 0.88rem;
  }

  .metric {
    min-height: 6.1rem;
    padding: 0.82rem;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
      rgba(16, 16, 15, 0.9);
    border-color: rgba(216, 166, 64, 0.22);
    box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.24);
  }

  .metric strong {
    font-size: 1.28rem;
  }

  .metric strong#countdown {
    gap: 0.25rem;
  }

  .countdown-unit b {
    font-size: 1.05rem;
  }

  .countdown-unit em {
    font-size: 0.64rem;
  }

  .hero-panel {
    min-height: auto;
    padding: 1.05rem;
    gap: 0.85rem;
    background:
      linear-gradient(150deg, rgba(216, 166, 64, 0.26), rgba(18, 18, 18, 0.9) 42%, rgba(4, 10, 11, 0.95)),
      var(--surface);
    border-color: rgba(216, 166, 64, 0.34);
    box-shadow: 0 1.4rem 3.4rem rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(243, 212, 139, 0.08);
  }

  .hero-panel h3 {
    font-size: 1.62rem;
    line-height: 1.08;
    max-width: 17rem;
  }

  .hero-panel p:not(.eyebrow) {
    line-height: 1.5;
  }

  .hero-panel img {
    max-width: 8.6rem;
    justify-self: center;
    box-shadow: 0 0 0 0.35rem rgba(216, 166, 64, 0.08), 0 1rem 2.4rem rgba(0, 0, 0, 0.34);
  }

  .mission-tags {
    margin-top: 0.8rem;
    gap: 0.35rem;
  }

  .mission-tags span {
    min-height: 1.55rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }

  .flight-tracker-panel {
    background:
      linear-gradient(145deg, rgba(88, 166, 200, 0.08), rgba(216, 166, 64, 0.08)),
      rgba(13, 13, 12, 0.92);
  }

  .flight-tracker {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .flight-tracker div {
    min-height: 3.25rem;
    border-radius: 0.6rem;
  }

  .flight-tracker p {
    font-size: 0.9rem;
  }

  .weather-now,
  .weather-forecast {
    grid-template-columns: 1fr;
  }

  .planning-status-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .planning-status-item {
    min-height: 3.5rem;
    padding: 0.62rem;
    border-radius: 0.6rem;
  }

  .time-card,
  .budget-row,
  .task-form {
    grid-template-columns: 1fr;
  }

  .schedule-actions {
    justify-content: flex-start;
  }

  .budget-actions {
    justify-content: flex-start;
  }

  .day-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-button {
    padding: 0.5rem 0.6rem;
  }

  .panel,
  .person-card,
  .booking-card,
  .compact-row,
  .task-row,
  .budget-row,
  .time-card {
    border-radius: 0.65rem;
    background: rgba(19, 19, 18, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.2);
  }

  .next-panel {
    background: rgba(13, 13, 12, 0.9);
  }

  .compact-row,
  .task-row,
  .budget-row,
  .time-card {
    padding: 0.85rem;
  }

  .task-content {
    min-width: 0;
  }

  #tasks .panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #tasks .section-heading {
    margin-bottom: 0.75rem;
    padding: 0.15rem 0.05rem 0;
  }

  #tasks .section-heading h3 {
    font-size: 1.15rem;
  }

  #tasks .section-heading span {
    font-size: 0.86rem;
  }

  .task-list {
    gap: 0.7rem;
  }

  .task-row {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.9rem;
    border-color: rgba(216, 166, 64, 0.16);
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
      rgba(14, 14, 13, 0.94);
  }

  .task-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.9rem;
    bottom: 0.9rem;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-soft), rgba(216, 166, 64, 0.18));
  }

  .task-content strong {
    display: block;
    padding-left: 0.15rem;
    font-size: 1.03rem;
    line-height: 1.2;
  }

  .task-meta {
    margin-top: 0.32rem;
    gap: 0.38rem;
  }

  .task-meta > span:first-child {
    color: var(--muted);
  }

  .task-meta .status-chip {
    min-height: 1.45rem;
    padding: 0 0.5rem;
    font-size: 0.72rem;
  }

  .task-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    padding-top: 0.15rem;
  }

  .task-actions .toggle-button {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 0.35rem;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.18);
    color: var(--muted);
    font-size: 0.9rem;
  }

  .task-actions .toggle-button.done {
    color: var(--ink);
    border-color: rgba(77, 187, 134, 0.5);
    background: rgba(77, 187, 134, 0.14);
  }

  .task-detail {
    margin-top: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .task-link {
    margin-top: 0.6rem;
    min-height: 2rem;
    align-items: center;
    padding: 0 0.65rem;
    border: 1px solid rgba(216, 166, 64, 0.28);
    border-radius: 999px;
    background: rgba(216, 166, 64, 0.08);
    font-size: 0.86rem;
  }

  .task-form {
    padding: 0.85rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.045);
  }

  .task-form input,
  .task-form select {
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.34);
  }

  .primary-button,
  .toggle-button,
  .day-button {
    border-radius: 0.55rem;
  }

  .status-chip {
    min-height: 1.55rem;
  }
}
