:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #667166;
  --paper: #fffdf7;
  --mist: #f4f7f2;
  --pine: #173f35;
  --pine-2: #24665a;
  --sky: #6fa9b5;
  --clay: #d66b49;
  --sun: #f2b35b;
  --line: rgba(23, 33, 27, 0.14);
  --shadow: 0 24px 70px rgba(23, 33, 27, 0.16);
  --shadow-soft: 0 14px 42px rgba(23, 33, 27, 0.12);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--mist);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(125deg, rgba(23, 63, 53, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(111, 169, 181, 0.14), transparent 28%),
    var(--mist);
  font-family: var(--font);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
}

.login-visual {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background: #173f35;
}

.login-visual img {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  object-fit: cover;
  transform: scale(1.02);
  animation: slow-zoom 18s ease-in-out infinite alternate;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(90deg, rgba(23, 33, 27, 0.72), rgba(23, 33, 27, 0.1) 58%, rgba(23, 33, 27, 0.34)),
    linear-gradient(0deg, rgba(23, 33, 27, 0.46), transparent 42%);
}

.login-copy {
  position: absolute;
  left: clamp(24px, 7vw, 96px);
  right: clamp(24px, 18vw, 260px);
  bottom: clamp(32px, 11vh, 112px);
  z-index: 2;
  color: #fffdf7;
  animation: fade-up 700ms ease both;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: rgba(255, 253, 247, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-copy h1,
.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.login-copy p,
.hero-copy p {
  max-width: 560px;
  margin: 20px 0 0;
  color: rgba(255, 253, 247, 0.86);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.login-panel-wrap {
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: clamp(24px, 5vw, 64px);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(244, 247, 242, 0.94)),
    var(--paper);
}

.login-panel {
  width: min(100%, 430px);
  margin-inline: auto;
  animation: fade-up 560ms ease 100ms both;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fffdf7;
  background: linear-gradient(135deg, var(--pine), var(--sky));
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.brand-mark strong,
.topbar-brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand-mark span,
.topbar-brand span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.login-panel h2,
.booking-form h2,
.panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.login-panel > p,
.panel-heading p,
.empty-state p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.field label {
  color: rgba(23, 33, 27, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  padding: 12px 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(36, 102, 90, 0.62);
  box-shadow: 0 0 0 4px rgba(111, 169, 181, 0.18);
  transform: translateY(-1px);
}

.password-row {
  position: relative;
}

.password-row input {
  padding-right: 52px;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--clay);
  font-size: 0.9rem;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-button {
  color: #fffdf7;
  background: linear-gradient(135deg, var(--pine), var(--pine-2) 55%, var(--sky));
  box-shadow: 0 16px 32px rgba(23, 63, 53, 0.23);
  padding: 0 18px;
}

.secondary-button {
  color: var(--pine);
  background: rgba(36, 102, 90, 0.1);
  padding: 0 16px;
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.8);
  border: 1px solid rgba(255, 253, 247, 0.4);
  padding: 0 16px;
}

.icon-button {
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid var(--line);
  padding: 0;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.icon-button:active {
  transform: translateY(0);
}

.icon-button svg,
.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.brand-icon svg,
.eyebrow svg,
.section-kicker svg,
.quick-list svg,
.booking-meta svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.quick-list svg,
.booking-meta svg {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(244, 247, 242, 0.86);
  border-bottom: 1px solid rgba(23, 33, 27, 0.09);
  backdrop-filter: blur(18px);
}

.topbar-brand {
  display: flex;
  min-width: 220px;
  align-items: center;
  gap: 12px;
}

.topbar-brand .brand-icon {
  width: 42px;
  height: 42px;
  box-shadow: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 7px;
  background: rgba(255, 253, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fffdf7;
  background: var(--pine);
  border-radius: 50%;
  font-size: 0.76rem;
  font-weight: 900;
}

.hero-band {
  position: relative;
  min-height: clamp(440px, 58vw, 680px);
  overflow: hidden;
  isolation: isolate;
  color: #fffdf7;
  background: var(--pine);
}

.hero-band img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slow-zoom 22s ease-in-out infinite alternate;
}

.hero-band::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(23, 33, 27, 0.78), rgba(23, 33, 27, 0.22) 52%, rgba(23, 33, 27, 0.58)),
    linear-gradient(0deg, rgba(23, 33, 27, 0.76), transparent 44%);
}

.hero-inner {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  min-height: inherit;
  align-items: end;
  margin: 0 auto;
  padding: 76px 0 44px;
}

.hero-copy {
  max-width: 850px;
  animation: fade-up 650ms ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 940px);
  margin-top: clamp(34px, 8vw, 88px);
}

.metric {
  min-height: 112px;
  padding: 18px;
  background: rgba(255, 253, 247, 0.13);
  border: 1px solid rgba(255, 253, 247, 0.2);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

.metric span {
  display: block;
  color: rgba(255, 253, 247, 0.68);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: #fffdf7;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 253, 247, 0.76);
  line-height: 1.4;
}

.main-grid {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: minmax(300px, 0.76fr) minmax(0, 1.24fr);
  gap: 18px;
  margin: 22px auto 56px;
}

.composer-panel,
.calendar-panel,
.timeline-panel,
.travel-panel {
  background: rgba(255, 253, 247, 0.86);
  border: 1px solid rgba(23, 33, 27, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.composer-panel {
  align-self: start;
  padding: clamp(18px, 3vw, 28px);
}

.calendar-panel,
.timeline-panel {
  padding: clamp(16px, 3vw, 24px);
}

.travel-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.travel-panel-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  min-height: 310px;
}

.travel-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.travel-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 42px);
}

.travel-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: 1;
}

.family-row,
.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-row li,
.quick-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--pine);
  background: rgba(36, 102, 90, 0.1);
  border: 1px solid rgba(36, 102, 90, 0.14);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-title {
  min-width: 180px;
  text-align: center;
  text-transform: capitalize;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
  gap: 6px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid {
  gap: 6px;
}

.day-cell {
  min-height: 106px;
  overflow: hidden;
  background: rgba(244, 247, 242, 0.86);
  border: 1px solid rgba(23, 33, 27, 0.08);
  border-radius: var(--radius);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.day-cell:hover {
  background: rgba(255, 253, 247, 0.98);
  border-color: rgba(36, 102, 90, 0.32);
  transform: translateY(-2px);
}

.day-cell.outside {
  opacity: 0.44;
}

.day-cell.today {
  border-color: rgba(214, 107, 73, 0.62);
  box-shadow: inset 0 0 0 1px rgba(214, 107, 73, 0.12);
}

.day-button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 9px 10px 2px;
  text-align: left;
}

.day-number {
  font-size: 0.94rem;
  font-weight: 900;
}

.day-dot {
  width: 8px;
  height: 8px;
  background: var(--clay);
  border-radius: 50%;
}

.day-bookings {
  display: grid;
  gap: 5px;
  padding: 4px 7px 9px;
}

.calendar-booking {
  display: block;
  width: 100%;
  min-height: 28px;
  overflow: hidden;
  color: #fffdf7;
  background: var(--pine);
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-booking.read-only {
  cursor: default;
  opacity: 0.74;
}

.calendar-booking:nth-child(2n) {
  background: var(--clay);
}

.more-bookings {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  padding-inline: 2px;
}

.booking-list {
  display: grid;
  gap: 12px;
}

.booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  background: rgba(244, 247, 242, 0.86);
  border: 1px solid rgba(23, 33, 27, 0.09);
  border-radius: var(--radius);
  animation: fade-up 360ms ease both;
}

.booking-card h3 {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.25;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.booking-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.booking-notes {
  margin: 10px 0 0;
  color: rgba(23, 33, 27, 0.72);
  line-height: 1.55;
}

.booking-actions {
  display: flex;
  gap: 8px;
}

.booking-actions .icon-button {
  width: 38px;
  height: 38px;
  background: rgba(255, 253, 247, 0.94);
}

.delete-button:hover {
  color: #fffdf7;
  background: var(--clay);
}

.empty-state {
  padding: 24px;
  background: rgba(244, 247, 242, 0.9);
  border: 1px dashed rgba(23, 33, 27, 0.18);
  border-radius: var(--radius);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 15px;
  color: #fffdf7;
  background: rgba(23, 63, 53, 0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slow-zoom {
  from {
    transform: scale(1.01);
  }

  to {
    transform: scale(1.07);
  }
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 46vh;
  }

  .login-visual img {
    min-height: 46vh;
  }

  .login-panel-wrap {
    min-height: 54vh;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .travel-panel-inner {
    grid-template-columns: 1fr;
  }

  .travel-panel img {
    max-height: 340px;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .user-pill {
    min-width: 0;
  }

  .hero-inner {
    padding-top: 54px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .calendar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-title {
    min-width: 0;
  }

  .weekday-row,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .calendar-panel {
    overflow-x: visible;
  }

  .day-cell {
    min-height: 78px;
  }

  .day-button {
    min-height: 31px;
    padding: 7px 5px 1px;
  }

  .day-number {
    font-size: 0.8rem;
  }

  .day-bookings {
    gap: 3px;
    padding: 3px 3px 6px;
  }

  .calendar-booking {
    min-height: 22px;
    padding: 4px;
    font-size: 0.58rem;
  }

  .more-bookings {
    font-size: 0.58rem;
  }

  .booking-card {
    grid-template-columns: 1fr;
  }

  .booking-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .login-panel-wrap {
    padding: 22px;
  }

  .login-copy {
    left: 22px;
    right: 22px;
    bottom: 28px;
  }

  .login-copy h1,
  .hero-copy h1 {
    font-size: clamp(2.55rem, 16vw, 4.6rem);
  }

  .hero-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
