:root {
  --canvas: #0b1622;
  --canvas-soft: #132433;
  --panel: rgba(246, 242, 231, 0.95);
  --panel-strong: #fbf7ee;
  --panel-alt: rgba(22, 37, 52, 0.9);
  --ink: #152535;
  --ink-strong: #0b1824;
  --muted: #627181;
  --line: rgba(21, 37, 53, 0.14);
  --line-strong: rgba(11, 24, 36, 0.22);
  --accent: #bc8b3f;
  --accent-bright: #d6a85c;
  --accent-deep: #6f501d;
  --sky: #14283a;
  --sky-soft: #27435d;
  --mint: #2f7b72;
  --warn: #a35634;
  --shadow: 0 22px 50px rgba(5, 12, 20, 0.28);
  --shadow-soft: 0 10px 24px rgba(8, 18, 28, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(188, 139, 63, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(78, 116, 150, 0.2), transparent 22%),
    linear-gradient(180deg, #102130 0%, var(--canvas) 46%, #08121b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(213, 194, 151, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(213, 194, 151, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1), transparent 16%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 82%);
}

.app-shell {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 14px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.hero--footer {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  margin-top: 14px;
  margin-bottom: 0;
}

.hero.is-dimmed {
  opacity: 0.5;
}

.hero__copy,
.hero__status,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero__copy {
  padding: 18px 20px;
  background:
    radial-gradient(circle at top right, rgba(188, 139, 63, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(250, 246, 237, 0.98), rgba(242, 237, 225, 0.92));
}

.hero__status {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(188, 139, 63, 0.14), transparent 24%),
    linear-gradient(160deg, rgba(18, 34, 49, 0.98), rgba(28, 49, 69, 0.94));
  color: #f6f8fb;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.hero__copy h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: var(--ink-strong);
}

.hero__copy h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.8rem);
  max-width: 10ch;
}

.hero__lede {
  max-width: 56ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.48;
}

.hero--footer .hero__copy {
  padding: 12px 16px;
}

.hero--footer .hero__status {
  padding: 12px;
}

.hero--footer .hero__copy h1 {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  max-width: none;
}

.hero--footer .hero__lede {
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.hero--footer .eyebrow {
  margin-bottom: 4px;
  font-size: 0.64rem;
}

.hero--footer .hero__status {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.status-pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8ef7a8;
  box-shadow: 0 0 0 6px rgba(142, 247, 168, 0.12);
}

.dashboard {
  display: grid;
  gap: 16px;
}

.auth-shell {
  margin-bottom: 14px;
}

.auth-actions {
  align-items: end;
}

.auth-toolbar {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.auth-toolbar p {
  margin: 0;
  color: var(--muted);
}

.card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(251, 247, 238, 0.985), rgba(241, 236, 225, 0.96)),
    radial-gradient(circle at top right, rgba(188, 139, 63, 0.08), transparent 22%);
  border-color: rgba(146, 122, 78, 0.18);
}

.admin-tabs-card {
  padding: 10px;
  position: sticky;
  top: 10px;
  z-index: 5;
  background:
    linear-gradient(180deg, rgba(21, 37, 53, 0.96), rgba(18, 31, 45, 0.94));
  border-color: rgba(188, 139, 63, 0.22);
}

.admin-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab {
  border: 1px solid rgba(214, 168, 92, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 239, 216, 0.82);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.admin-tab.is-active {
  background: linear-gradient(135deg, rgba(188, 139, 63, 0.98), rgba(214, 168, 92, 0.96));
  color: #fff8eb;
  box-shadow: 0 10px 18px rgba(111, 80, 29, 0.22);
}

.summary-card {
  padding-bottom: 14px;
}

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

.summary-tile {
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(237, 233, 223, 0.96));
  border: 1px solid rgba(21, 37, 53, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.summary-tile p {
  margin: 0;
}

.summary-tile__label {
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-tile__value {
  margin-top: 4px;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  justify-content: center;
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(19, 33, 48, 0.9);
  color: #f7efd8;
  border-color: rgba(19, 33, 48, 0.22);
}

.section-toggle__icon {
  font-size: 1rem;
  line-height: 1;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.card.is-collapsed .section-toggle__icon {
  transform: rotate(0deg);
}

.section-body {
  display: grid;
  gap: 0;
}

.card.is-collapsed {
  padding-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid--unavailable {
  align-items: end;
  grid-template-columns: minmax(180px, 0.95fr) auto minmax(260px, 1fr);
}

[data-section="schedule"] .form-grid {
  padding: 14px;
  border: 1px solid rgba(21, 37, 53, 0.09);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(245, 240, 230, 0.88));
  box-shadow: var(--shadow-soft);
}

[data-section="schedule"] .form-grid + .form-grid,
[data-section="schedule"] .calendar-toolbar,
[data-section="schedule"] .calendar-grid,
[data-section="schedule"] .table-wrap {
  margin-top: 14px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.block-type-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
  max-width: 220px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: fit-content;
  padding: 4px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(21, 37, 53, 0.12);
  background: rgba(230, 223, 209, 0.68);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.42);
}

.segmented-option {
  position: relative;
  display: flex;
}

.segmented-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.segmented-option span {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  white-space: nowrap;
}

.segmented-option input:checked + span {
  background: linear-gradient(135deg, rgba(188, 139, 63, 0.92), rgba(214, 168, 92, 0.95));
  color: #fff9ef;
  box-shadow: 0 8px 14px rgba(111, 80, 29, 0.18);
}

.schedule-time-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-with-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.field-with-button .ghost-button {
  white-space: nowrap;
}

.full-width {
  grid-column: 1 / -1;
}

.helper-note {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
  padding: 0;
  display: block;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.inline-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-grid span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(21, 37, 53, 0.12);
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(188, 139, 63, 0.18);
  border-color: rgba(188, 139, 63, 0.52);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.primary-button {
  color: #fff8ee;
  background: linear-gradient(135deg, #9d6b27, var(--accent-bright));
  box-shadow: 0 10px 18px rgba(111, 80, 29, 0.22);
}

.secondary-button {
  color: inherit;
  background: rgba(20, 35, 50, 0.88);
  border: 1px solid rgba(20, 35, 50, 0.12);
  color: #eef3f7;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.secondary-button--file {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(21, 37, 53, 0.08);
  background: rgba(255, 251, 246, 0.72);
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(22, 37, 52, 0.92);
  color: #f5f0e3;
}

.calendar-month-label {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.05rem;
}

.calendar-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sky-soft);
  padding: 4px 0;
}

.calendar-day {
  min-height: 110px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(21, 37, 53, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(238, 233, 222, 0.92));
  box-shadow: var(--shadow-soft);
}

.calendar-day--blocked {
  background:
    linear-gradient(180deg, rgba(250, 240, 233, 0.98), rgba(242, 227, 217, 0.94));
  border-color: rgba(163, 86, 52, 0.24);
}

.calendar-day--empty {
  background: rgba(19, 36, 55, 0.03);
}

.calendar-day__number {
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--sky);
}

.calendar-day__items {
  display: grid;
  gap: 6px;
}

.calendar-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(47, 123, 114, 0.12);
  color: var(--mint);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.calendar-chip--cancelled {
  background: rgba(160, 74, 43, 0.12);
  color: var(--warn);
}

.calendar-chip--pending {
  background: rgba(188, 139, 63, 0.16);
  color: var(--accent-deep);
}

.calendar-more {
  font-size: 0.72rem;
  color: var(--muted);
}

.quickbooks-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.quickbooks-copy p,
.quickbooks-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.simple-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
}

.simple-list li + li {
  margin-top: 6px;
}

.quickbooks-status {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(22, 37, 52, 0.06);
  border: 1px solid rgba(21, 37, 53, 0.08);
}

.quickbooks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-heading--compact {
  margin-bottom: 10px;
}

.section-heading--compact h2 {
  font-size: 1.18rem;
}

.client-deposit-portal {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(22, 37, 52, 0.06);
  border: 1px solid rgba(21, 37, 53, 0.08);
}

.client-deposit-portal__copy {
  color: var(--muted);
}

.client-deposit-portal__packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.client-deposit-package {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 251, 246, 0.88);
  border: 1px solid rgba(21, 37, 53, 0.08);
}

.client-deposit-package__title,
.client-deposit-package__amount,
.client-deposit-package__detail {
  margin: 0;
}

.client-deposit-package__title {
  font-weight: 800;
}

.client-deposit-package__amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink-strong);
}

.client-deposit-package__detail {
  color: var(--muted);
  font-size: 0.92rem;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(21, 37, 53, 0.08);
  vertical-align: top;
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  background: rgba(236, 229, 216, 0.42);
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.customer-summary-row td {
  border-bottom: none;
}

.customer-flight-history-row td {
  padding-top: 0;
  padding-bottom: 14px;
}

.customer-flight-history {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(21, 37, 53, 0.04);
  border: 1px solid rgba(21, 37, 53, 0.08);
}

.customer-flight-history--empty {
  color: var(--muted);
}

.customer-flight-history__label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
}

.customer-flight-history__list {
  display: grid;
  gap: 8px;
}

.customer-flight-history__item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.88);
  border: 1px solid rgba(21, 37, 53, 0.08);
}

.customer-flight-history__primary,
.customer-flight-history__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.customer-flight-history__primary span,
.customer-flight-history__metrics span {
  color: var(--muted);
  font-size: 0.9rem;
}

.customer-flight-history__metrics span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(21, 37, 53, 0.05);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 123, 114, 0.12);
  color: var(--mint);
  font-size: 0.82rem;
  font-weight: 700;
}

.pill--pending {
  background: rgba(188, 139, 63, 0.14);
  color: var(--accent-deep);
}

.danger-pill {
  background: rgba(160, 74, 43, 0.1);
  color: var(--warn);
}

.ghost-button {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(21, 37, 53, 0.12);
  background: rgba(255, 252, 246, 0.94);
  color: var(--ink-strong);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  min-width: 220px;
  max-width: calc(100vw - 24px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(13, 24, 35, 0.96);
  color: #fff8ed;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

  .summary-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-time-fields {
    grid-column: 1 / -1;
  }

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

@media (max-width: 680px) {
  .app-shell {
    width: min(100vw - 12px, 100%);
    padding-top: 8px;
  }

  .hero__copy,
  .hero__status,
  .card {
    padding: 14px;
    border-radius: 20px;
  }

  .hero--footer .hero__status {
    justify-content: stretch;
  }

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

  .admin-tabs-card {
    padding: 8px;
    top: 6px;
  }

  .admin-tabbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-tabbar::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 0.7rem;
  }

  [data-section="schedule"] .form-grid {
    padding: 12px;
  }

  .segmented-control {
    width: 100%;
  }

  .calendar-toolbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .calendar-toolbar .ghost-button {
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .calendar-month-label {
    font-size: 0.92rem;
  }

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

  .calendar-weekday {
    display: block;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    padding: 2px 0;
  }

  .calendar-day {
    min-height: 58px;
    padding: 5px 4px;
    border-radius: 12px;
  }

  .calendar-day__number {
    margin-bottom: 4px;
    font-size: 0.86rem;
  }

  .calendar-day__items {
    gap: 3px;
  }

  .calendar-chip {
    min-height: 6px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    line-height: 0;
  }

  .calendar-day__items .calendar-chip:nth-child(n + 2) {
    display: none;
  }

  .calendar-more {
    font-size: 0.58rem;
    line-height: 1;
  }

  .customer-flight-history {
    padding: 10px;
  }

  .customer-flight-history__item {
    padding: 9px 10px;
  }

  .customer-flight-history__primary,
  .customer-flight-history__metrics {
    gap: 6px;
  }

  .customer-flight-history__primary span,
  .customer-flight-history__metrics span {
    font-size: 0.82rem;
  }

  .form-actions {
    justify-content: stretch;
  }

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