:root {
  color-scheme: light;
  --bg: #fef7ff;
  --surface: #ffffff;
  --surface-2: #f7f2fa;
  --text: #1d1b20;
  --muted: #49454f;
  --line: #eaddff;
  --primary: #6442d6;
  --primary-2: #5232a4;
  --accent: #21005d;
  --success: #15803d;
  --danger: #b91c1c;
  --shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

h1,
h2,
h3,
.brand strong {
  font-family: Roboto, Inter, sans-serif;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  background: #10202d;
  color: #e8f3f3;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand strong {
  font-size: 19px;
  line-height: 1.15;
}

.brand span {
  color: #a7bac6;
  font-size: 13px;
  line-height: 1.35;
}

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

.nav button,
.link-button {
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.nav button.active,
.nav button:hover,
.link-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.main {
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 0;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.4fr);
  gap: 18px;
  align-items: start;
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
}

.form-grid {
  display: grid;
  gap: 13px;
}

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

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  min-height: 42px;
}

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

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

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

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

.btn {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 40px;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-2);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
}

.btn.danger {
  background: #fee2e2;
  color: var(--danger);
}

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

.landing {
  display: grid;
  gap: 18px;
}

.landing-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #10202d;
  box-shadow: var(--shadow);
}

.landing-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 24, 35, 0.88), rgba(12, 24, 35, 0.58), rgba(12, 24, 35, 0.16));
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 16px;
  max-width: 680px;
  min-height: 430px;
  padding: 46px;
  color: #fff;
}

.landing-kicker {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  padding: 6px 10px;
  color: #d7f7f2;
  font-size: 13px;
  font-weight: 700;
}

.landing-hero h2 {
  margin: 0;
  max-width: 620px;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

.landing-hero p {
  margin: 0;
  max-width: 610px;
  color: #d9e7ec;
  font-size: 18px;
  line-height: 1.5;
}

.landing-hero .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

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

.landing-stats div,
.landing-sections article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.landing-stats div {
  padding: 16px;
}

.landing-stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-2);
  font-size: 23px;
}

.landing-stats span {
  color: var(--muted);
  line-height: 1.4;
}

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

.landing-sections article {
  padding: 18px;
}

.landing-sections h3 {
  margin: 0 0 8px;
}

.landing-sections p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.metric {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.metric strong {
  font-size: 18px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-time {
  color: var(--primary-2);
  font-weight: 700;
}

.timeline-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.route-map {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 8px;
}

.route-point {
  padding: 7px 9px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}

.arrow {
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  padding: 14px;
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  color: var(--muted);
  line-height: 1.45;
}

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

.list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.list-table th,
.list-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.list-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 7px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
}

.status.paid {
  background: #dcfce7;
  color: var(--success);
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.public-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
}

.public-header {
  margin-bottom: 18px;
}

.public-header h1 {
  margin: 0 0 8px;
}

.notice {
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

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

  .sidebar {
    position: static;
  }

  .grid,
  .edit-grid,
  .row,
  .landing-stats,
  .landing-sections {
    grid-template-columns: 1fr;
  }

  .landing-hero,
  .landing-hero-content {
    min-height: 520px;
  }

  .landing-hero-content {
    padding: 28px;
  }

  .landing-hero h2 {
    font-size: 32px;
  }

  .landing-hero::after {
    background: linear-gradient(180deg, rgba(12, 24, 35, 0.86), rgba(12, 24, 35, 0.62));
  }

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

@media print {
  .sidebar,
  .actions,
  .booking-form,
  .nav {
    display: none !important;
  }

  .app-shell,
  .grid {
    display: block;
  }

  .main,
  .public-page {
    padding: 0;
  }

  .panel,
  .card {
    box-shadow: none;
  }
}

/* Material 3 application shell */
.app-frame {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 10px 42px;
  border-bottom: 1px solid rgba(234, 221, 255, 0.7);
  background: rgba(254, 247, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(22px);
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 245px;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15);
}

.app-header .brand div {
  display: grid;
  gap: 1px;
}

.app-header .brand strong {
  font-size: 20px;
}

.app-header .brand span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.app-header .nav {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: center;
  gap: 4px;
}

.app-header .nav button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.app-header .nav button:hover,
.app-header .nav button.active {
  background: #eaddff;
  color: var(--accent);
}

.header-action {
  flex: 0 0 auto;
  border-radius: 999px;
  min-height: 48px;
  padding-inline: 24px;
}

.main {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 38px 42px 72px;
}

.app-footer {
  padding: 26px 42px;
  border-top: 1px solid #cac4d0;
  background: #faf8fc;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.topbar {
  padding: 6px 0 12px;
}

.topbar h1 {
  font-size: 38px;
  font-weight: 500;
}

.topbar p {
  max-width: 900px;
  font-size: 16px;
}

.panel,
.card {
  border-color: rgba(234, 221, 255, 0.85);
  background: var(--surface);
}

.panel {
  padding: 24px;
}

.btn {
  border-radius: 999px;
  min-height: 46px;
  padding: 10px 20px;
  font-weight: 700;
}

.btn.secondary,
.btn.ghost {
  border: 1px solid #cac4d0;
  background: transparent;
  color: var(--primary);
}

.btn.compact {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 13px;
}

.btn.danger {
  border-color: #f4c7c7;
  background: #fff4f4;
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  border-color: #cac4d0;
  border-radius: 12px;
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(100, 66, 214, 0.13);
}

.landing {
  gap: 34px;
}

.landing-intro {
  display: grid;
  width: 100%;
  min-width: 0;
  justify-items: center;
  padding: 52px 16px 12px;
  text-align: center;
}

.landing-intro h1 {
  width: 100%;
  max-width: 950px;
  margin: 22px 0 0;
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 400;
  line-height: 1.05;
}

.landing-intro p {
  max-width: 730px;
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.landing-kicker {
  border: 0;
  border-radius: 999px;
  background: #eaddff;
  color: var(--accent);
}

.landing-hero {
  min-height: 520px;
  border: 8px solid #fff;
  border-radius: 40px;
  background: linear-gradient(135deg, #eaddff, #d0bcff);
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.12);
}

.landing-hero::after {
  display: none;
}

.landing-hero img {
  object-position: center;
}

.landing-product-preview {
  position: absolute;
  right: 30px;
  bottom: 28px;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 260px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.landing-product-preview span,
.landing-product-preview small {
  color: var(--muted);
}

.landing-product-preview strong {
  color: var(--accent);
  font-size: 20px;
}

.landing-stats div,
.landing-sections article {
  border-color: rgba(234, 221, 255, 0.8);
  background: #f7f2fa;
  box-shadow: none;
}

.landing-stats div {
  padding: 24px;
  border-radius: 20px;
}

.landing-sections article {
  padding: 28px;
  border-radius: 24px;
}

.landing-sections h3 {
  font-size: 24px;
  font-weight: 500;
}

.route-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.route-provider,
.coordinate-badge,
.catalog-type,
.eyebrow {
  width: fit-content;
  border-radius: 999px;
  background: #eaddff;
  color: var(--accent);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.route-warning,
.coordinate-badge.missing {
  color: #9a3412;
  background: #fff7ed;
}

.route-live-map {
  width: 100%;
  height: 360px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f3edf7;
}

.route-geocoding {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.route-geocoding strong {
  color: var(--text);
}

.map-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #6442d6;
  box-shadow: 0 3px 10px rgb(44 35 69 / 28%);
  color: #fff;
  cursor: pointer;
  font: 700 12px/1 Inter, sans-serif;
}

.map-marker-meeting {
  background: #006c4c;
}

.maplibregl-popup-content {
  border-radius: 8px;
  color: var(--text);
  font: 13px/1.4 Inter, sans-serif;
}

.map-unavailable {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
}

.route-map {
  border-radius: 16px;
  background: #f7f2fa;
}

.catalog-workspace {
  display: grid;
  gap: 18px;
}

.catalog-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: #f7f2fa;
}

.catalog-toolbar h2 {
  margin: 8px 0 6px;
  font-size: 32px;
  font-weight: 500;
}

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

.catalog-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.catalog-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.catalog-tabs button span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #f3edf7;
  font-size: 12px;
}

.catalog-tabs button.active {
  background: var(--primary);
  color: #fff;
}

.catalog-list {
  display: grid;
  gap: 10px;
}

.catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.catalog-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.catalog-item-main {
  display: grid;
  gap: 5px;
}

.catalog-item h3,
.catalog-item p {
  margin: 0;
}

.catalog-item h3 {
  font-size: 20px;
}

.catalog-item p,
.catalog-item small {
  color: var(--muted);
}

.catalog-item-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.catalog-editor {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 2px solid #eaddff;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.catalog-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.catalog-editor-head h3 {
  margin: 8px 0 0;
  font-size: 25px;
}

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

@media (max-width: 1050px) {
  .app-header {
    flex-wrap: wrap;
    padding: 12px 24px;
  }

  .app-header .nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .app-header .nav::-webkit-scrollbar {
    display: none;
  }

  .header-action {
    margin-left: auto;
  }

  .main {
    padding: 28px 24px 60px;
  }

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

@media (max-width: 700px) {
  .app-header {
    gap: 10px;
    padding: 10px 14px;
  }

  .app-header .brand {
    flex: 1;
    min-width: 0;
  }

  .app-header .brand div {
    min-width: 0;
  }

  .app-header .brand strong {
    white-space: nowrap;
  }

  .app-header .brand span:last-child,
  .header-action {
    display: none;
  }

  .main {
    padding: 22px 14px 48px;
  }

  .landing-intro {
    padding-top: 28px;
  }

  .landing-intro h1 {
    font-size: 42px;
    overflow-wrap: break-word;
  }

  .landing,
  .landing-intro,
  .landing-hero {
    max-width: 100%;
  }

  .landing-intro p {
    font-size: 17px;
  }

  .landing-hero {
    min-height: 430px;
    border-width: 5px;
    border-radius: 28px;
  }

  .landing-product-preview {
    right: 16px;
    bottom: 16px;
    left: 16px;
    min-width: 0;
  }

  .catalog-toolbar,
  .catalog-item,
  .catalog-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-item-side {
    justify-items: start;
  }

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

  .route-live-map {
    height: 300px;
  }
}
