:root {
  --blue: #0090e3;
  --blue-dark: #005aa7;
  --orange: #ff6600;
  --yellow: #ffcc00;
  --green: #1aa64a;
  --green-dark: #087934;
  --red: #df2020;
  --ink: #101828;
  --muted: #667085;
  --line: #d7e2ec;
  --soft: #f3f8fc;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(0, 90, 167, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f7fbff;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.landing {
  min-height: 100vh;
  background: var(--white);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 14px max(18px, env(safe-area-inset-left)) 14px max(18px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
  color: var(--blue-dark);
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--orange));
  border-radius: 8px;
  font-weight: 900;
}

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

.menu-toggle,
.sidebar-backdrop,
.sidebar-head,
.sidebar-close {
  display: none;
}

.menu-toggle,
.sidebar-close {
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 90, 167, 0.08);
}

.menu-toggle svg,
.sidebar-close svg {
  width: 20px;
  height: 20px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  padding: 64px clamp(18px, 5vw, 72px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 72, 132, 0.88), rgba(0, 144, 227, 0.34), rgba(255, 255, 255, 0.08)),
    url("/assets/hero-dashboard.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  background: linear-gradient(0deg, #ffffff, rgba(255, 255, 255, 0));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 10px;
  color: #002b52;
  background: var(--yellow);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 900;
}

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

h1,
h2,
h3 {
  line-height: 0.98;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.hero-copy p {
  max-width: 620px;
  font-size: clamp(1.03rem, 2vw, 1.24rem);
  line-height: 1.55;
}

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

.landing-band {
  padding: 44px clamp(18px, 5vw, 72px) 70px;
  background: var(--white);
}

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

.feature {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0, 90, 167, 0.07);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(0, 144, 227, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.button.orange {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 10px 20px rgba(255, 102, 0, 0.2);
}

.button.ghost {
  color: var(--blue-dark);
  background: var(--white);
  border-color: var(--line);
  box-shadow: none;
}

.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.88rem;
}

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

.app-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  padding: 22px 16px;
  background: #003b6f;
  color: var(--white);
}

.sidebar-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .muted {
  color: rgba(255, 255, 255, 0.74);
}

.nav-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  text-decoration: none;
  font-weight: 800;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-label {
  min-width: 0;
}

.nav-button.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (hover: hover) and (pointer: fine) {
  .nav-button:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

.content {
  padding: 28px max(18px, env(safe-area-inset-left)) calc(56px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-right));
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.page-head > div:first-child {
  display: grid;
  gap: 8px;
}

.page-head p {
  max-width: 820px;
  margin-bottom: 0;
}

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

.notice {
  margin-bottom: 18px;
  padding: 13px 14px;
  color: #553b00;
  background: #fff4c2;
  border: 1px solid #ffe58a;
  border-radius: 8px;
  font-weight: 750;
}

.impersonation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #482000;
  background: #ffe5d1;
  border-bottom: 1px solid #ffc299;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 132px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.stat strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.grid-two > div {
  display: grid;
  gap: 18px;
  align-content: start;
}

.grid-two > .panel,
.grid-two > div > .panel {
  height: 100%;
}

.grid-two > div > .panel + .panel {
  margin-top: 0;
}

.import-page-head {
  margin-bottom: 26px;
}

.import-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.import-card {
  grid-template-rows: auto auto auto auto;
  min-height: 0;
}

.import-card-head {
  display: grid;
  gap: 8px;
}

.import-card-head p {
  max-width: 62ch;
  margin: 0;
}

.import-card-body {
  display: grid;
  align-content: start;
  gap: 14px;
}

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

.import-card .message {
  margin-top: 0;
}

.import-note {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  color: #475467;
  background: #f5f9fd;
  border: 1px solid #d8e5f0;
  border-radius: 10px;
  line-height: 1.5;
}

.import-guidance {
  min-height: 120px;
}

.panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 18px;
}

.panel > h2,
.panel > h3,
.panel > p,
.panel > .button-row,
.panel > .message,
.panel > .muted {
  margin: 0;
}

.panel > h2 {
  margin-bottom: 2px;
}

.panel > .button,
.panel > .button.ghost,
.panel > .button.orange {
  justify-self: start;
}

.calendar-list,
.history-list,
.user-list,
.lead-list {
  display: grid;
  gap: 12px;
}

.calendar-list.grouped {
  gap: 18px;
}

.booking-day-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--yellow);
  border-radius: 10px;
  background: #fffbe6;
}

.booking-day-group.red {
  border-left-color: var(--red);
  background: #fff4f4;
}

.booking-day-group.orange {
  border-left-color: var(--orange);
  background: #fff7ef;
}

.booking-day-group.yellow {
  border-left-color: var(--yellow);
  background: #fffbe6;
}

.booking-day-group.lightgreen {
  border-left-color: #54c779;
  background: #f1fff5;
}

.booking-day-group.darkgreen {
  border-left-color: var(--green-dark);
  background: #eafff1;
}

.booking-day-group.unknown {
  border-left-color: #8ca6bd;
  background: #f5f9fc;
}

.booking-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.booking-day-head > div:first-child,
.booking-day-total {
  display: grid;
  gap: 4px;
}

.booking-day-head strong {
  color: var(--ink);
}

.booking-day-head span,
.booking-day-total span,
.booking-day-total small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.booking-day-total {
  justify-items: end;
  text-align: right;
}

.booking-day-total strong {
  font-size: 1.35rem;
}

.booking-day-items {
  display: grid;
  gap: 10px;
}

.booking {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 140px 140px 110px;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--yellow);
  border-radius: 10px;
  background: #ffffff;
}

.booking.red {
  border-left-color: var(--red);
  background: #fff4f4;
}

.booking.orange {
  border-left-color: var(--orange);
  background: #fff7ef;
}

.booking.yellow {
  border-left-color: var(--yellow);
  background: #fffbe6;
}

.booking.lightgreen {
  border-left-color: #54c779;
  background: #f1fff5;
}

.booking.darkgreen {
  border-left-color: var(--green-dark);
  background: #eafff1;
}

.booking.unknown {
  border-left-color: #8ca6bd;
  background: #f5f9fc;
}

.booking-date {
  color: var(--blue-dark);
  font-weight: 900;
  line-height: 1.2;
  align-self: start;
  padding-top: 4px;
}

.booking-title {
  margin-bottom: 4px;
  font-weight: 900;
}

.booking-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.booking-money {
  text-align: right;
  font-weight: 900;
  align-self: center;
}

.booking {
  cursor: pointer;
}

.booking:focus {
  outline: 3px solid rgba(0, 144, 227, 0.28);
  outline-offset: 2px;
}

.fee-box {
  display: grid;
  gap: 5px;
  align-content: start;
  justify-items: end;
  min-width: 132px;
  min-height: 90px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 850;
}

.fee-box span:first-child {
  color: var(--muted);
  font-size: 0.78rem;
}

.fee-box input {
  width: 118px;
  min-height: 36px;
  text-align: right;
}

.fee-box.red {
  border-color: #f1b1b1;
  background: #fff4f4;
}

.fee-box.orange {
  border-color: #ffc58e;
  background: #fff7ef;
}

.fee-box.yellow {
  border-color: #f1d765;
  background: #fffbe6;
}

.fee-box.lightgreen {
  border-color: #98dfa9;
  background: #f1fff5;
}

.fee-box.darkgreen {
  border-color: #7bc48f;
  background: #eafff1;
}

.fee-box.unknown {
  border-color: #bfd0dc;
  background: #f5f9fc;
}

.metric-box {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: end;
  min-width: 110px;
  min-height: 90px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 850;
}

.metric-box span,
.metric-box small {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-box.red {
  border-color: #f1b1b1;
  background: #fff4f4;
}

.metric-box.orange {
  border-color: #ffc58e;
  background: #fff7ef;
}

.metric-box.yellow {
  border-color: #f1d765;
  background: #fffbe6;
}

.metric-box.lightgreen {
  border-color: #98dfa9;
  background: #f1fff5;
}

.metric-box.darkgreen {
  border-color: #7bc48f;
  background: #eafff1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--blue-dark);
  background: #e4f4ff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 850;
}

.pill input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid rgba(0, 59, 111, 0.35);
  border-radius: 6px;
  background: var(--white);
  box-shadow: none;
}

.pill input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--blue), var(--orange));
  border-color: var(--blue-dark);
}

.pill input[type="checkbox"]:checked::after {
  content: "";
  display: block;
  width: 5px;
  height: 10px;
  margin: 1px 0 0 6px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pill.option {
  color: #6b3a00;
  background: #fff0d6;
}

.forecast-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 2fr) 92px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.panel-title-row h2 {
  margin-bottom: 4px;
}

.panel-title-row .muted {
  margin-bottom: 0;
  font-weight: 800;
}

.filter-active-bar {
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #7a3f00;
  background: #fff2d8;
  border: 1px solid #ffc46f;
  border-radius: 8px;
  font-weight: 900;
}

.forecast-plot {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  overflow-x: auto;
}

.forecast-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 170px;
  margin-top: 6px;
  padding-right: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.forecast-chart {
  display: grid;
  grid-template-columns: repeat(var(--forecast-count), 48px);
  justify-content: start;
  gap: 10px;
  min-height: 235px;
  padding-top: 6px;
}

.forecast-column {
  display: grid;
  grid-template-rows: minmax(170px, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  min-width: 48px;
  text-align: center;
}

.forecast-bar {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(164, 113, 58, 0.12) 1px, transparent 1px) 0 0 / 100% 25%,
    #fff2e5;
  border: 1px solid #ffd0a6;
}

.forecast-bar > span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  min-height: 0;
  background: linear-gradient(180deg, #ff8a22, var(--orange));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.forecast-column strong {
  min-height: 38px;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.2;
}

.forecast-column small {
  color: var(--muted);
  font-weight: 800;
}

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

.travel-event {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.travel-event.selected {
  border-color: rgba(0, 144, 227, 0.42);
  background: #f2f9ff;
}

.travel-event input {
  width: 18px;
  min-height: 18px;
}

.warning-text {
  margin-top: 5px;
  color: #9a4b00;
  font-size: 0.86rem;
  font-weight: 750;
}

.stats-grid.compact {
  margin-top: 18px;
  margin-bottom: 18px;
}

.bar {
  height: 14px;
  overflow: hidden;
  background: #e8f0f7;
  border-radius: 999px;
}

.bar > span {
  display: block;
  height: 100%;
  min-width: 4px;
  background: var(--orange);
}

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

.field {
  display: grid;
  align-content: start;
  gap: 8px;
}

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

label {
  color: #344054;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.25;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #b8c9d9;
  border-radius: 10px;
  outline: none;
}

input[disabled],
select[disabled],
textarea[disabled] {
  color: #344054;
  background: #f8fbff;
}

input[type="file"] {
  padding: 8px 10px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  color: var(--ink);
  background: #eef5fb;
  border: 1px solid #c8d8e7;
  border-radius: 8px;
  font-weight: 800;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 144, 227, 0.14);
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 10px;
}

.legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--muted);
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.swatch.red {
  background: var(--red);
}

.swatch.orange {
  background: var(--orange);
}

.swatch.yellow {
  background: var(--yellow);
}

.swatch.lightgreen {
  background: #54c779;
}

.swatch.darkgreen {
  background: var(--green-dark);
}

.auth-page {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(130deg, rgba(0, 90, 167, 0.96), rgba(0, 144, 227, 0.78)),
    url("/assets/hero-dashboard.png") center / cover no-repeat;
}

.auth-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.message {
  min-height: 22px;
  margin-top: 4px;
  color: var(--blue-dark);
  font-weight: 800;
  line-height: 1.4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.58);
}

.modal-panel {
  width: min(880px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 32, 60, 0.3);
}

.modal-panel textarea {
  min-height: 220px;
}

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

.settings-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.error {
  color: var(--red);
}

.empty {
  padding: 18px;
  color: var(--muted);
  background: var(--soft);
  border: 1px dashed #b7cbe0;
  border-radius: 10px;
}

.user-row,
.lead-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

@media (max-width: 1100px) {
  .stats-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: 12px;
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .hero {
    min-height: 620px;
    align-items: end;
    padding: 36px max(14px, env(safe-area-inset-left)) 34px max(14px, env(safe-area-inset-right));
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .menu-toggle,
  .sidebar-head,
  .sidebar-close {
    display: inline-flex;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 39;
    display: block;
    padding: 0;
    background: rgba(4, 22, 42, 0.42);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: min(82vw, 320px);
    padding: max(14px, env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: rgba(0, 59, 111, 0.985);
    box-shadow: 0 24px 48px rgba(0, 20, 38, 0.28);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
  }

  .nav-button {
    width: 100%;
    min-height: 46px;
    margin-bottom: 8px;
    padding: 11px 12px;
    border-radius: 10px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-icon,
  .nav-icon svg {
    width: 19px;
    height: 19px;
  }

  .nav-label {
    overflow: visible;
    text-align: left;
    white-space: normal;
    font-size: 0.96rem;
    line-height: 1.2;
    color: inherit;
  }

  .stats-grid,
  .feature-grid,
  .form-grid,
  .day-grid {
    grid-template-columns: 1fr;
  }

  .content {
    padding-top: 16px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .app-shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.mobile-nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .page-head,
  .booking-day-head,
  .panel-title-row {
    display: grid;
  }

  .page-head {
    gap: 12px;
    margin-bottom: 16px;
  }

  .page-head h1 {
    margin-bottom: 10px;
    font-size: clamp(2.3rem, 14vw, 3.8rem);
  }

  .page-head p {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .button-row {
    gap: 8px;
  }

  .page-head > .button-row {
    width: 100%;
  }

  .page-head .pill {
    align-self: start;
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    padding: 8px 10px;
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .panel {
    gap: 14px;
    padding: 16px;
  }

  .notice,
  .filter-active-bar {
    margin-bottom: 14px;
    padding: 11px 12px;
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .stat {
    min-height: 0;
    padding: 14px;
  }

  .stat strong {
    margin-top: 10px;
    font-size: clamp(1.9rem, 10vw, 2.5rem);
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .booking {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .booking > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .booking > :nth-child(4),
  .booking > :nth-child(5) {
    grid-column: span 1;
  }

  .booking-date {
    font-size: 0.94rem;
  }

  .booking-title {
    font-size: 1rem;
  }

  .booking-meta {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .fee-box,
  .metric-box {
    min-width: 0;
    justify-items: start;
  }

  .fee-box input {
    width: 100%;
    min-width: 0;
  }

  .forecast-row,
  .travel-event {
    grid-template-columns: 1fr;
  }

  .booking-day-total {
    justify-items: start;
    text-align: left;
  }

  .booking-money {
    text-align: left;
  }

  .forecast-plot {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
  }

  .forecast-scale {
    font-size: 0.72rem;
  }

  .forecast-chart {
    grid-template-columns: repeat(var(--forecast-count), 40px);
    gap: 8px;
  }

  .forecast-column {
    min-width: 40px;
    gap: 6px;
  }

  .forecast-column strong {
    min-height: 28px;
    font-size: 0.72rem;
  }

  .forecast-column small {
    font-size: 0.72rem;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .modal-panel {
    width: 100%;
    max-height: min(100dvh, 100vh);
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .modal-panel textarea {
    min-height: 180px;
  }

  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contact-actions .button {
    width: 100%;
  }

  .settings-account {
    display: grid;
  }

  .settings-account .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand {
    min-width: 0;
  }

  .brand > span:last-child {
    font-size: 0.94rem;
    line-height: 1.15;
  }

  .button {
    min-height: 40px;
    padding: 9px 12px;
  }

  .button.small {
    min-height: 34px;
    padding: 7px 9px;
  }

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

  .booking > :nth-child(3),
  .booking > :nth-child(4),
  .booking > :nth-child(5) {
    grid-column: auto;
  }

  .booking-date {
    margin-bottom: -2px;
  }

  .forecast-plot {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .forecast-chart {
    grid-template-columns: repeat(var(--forecast-count), 34px);
    gap: 6px;
  }

  .forecast-column {
    min-width: 34px;
  }

  .forecast-bar,
  .forecast-scale {
    height: 150px;
  }
}
