/* Vanmates partner portal. Mobile-first; colours are tokens (the vanmates.com palette). */

:root {
  --cream: #faf5ed;
  --card: #fffdf8;
  --cream-deep: #efe7d4;
  --red: #b94a3f;
  --red-hover: #a13a30;
  --red-soft: #f7e3df;
  --ink: #2b211a;
  --ink-2: #54463b;
  --muted: #7a6b5c;
  --line: #e4dbc9;
  --ok: #2e6b34;
  --ok-soft: #e3f1e2;
  --warn-soft: #fbf0d9;
  --info: #2f5d8a;
  --info-soft: #e2ecf6;
  --focus: #2f5d8a;
  --shadow: 0 2px 8px rgba(43, 33, 26, 0.06);
  --radius: 10px;
  --gutter: 16px;
  --max-w: 1080px;
  --font: "Plus Jakarta Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
h1 {
  font-size: 1.5rem;
}
h2 {
  font-size: 1.15rem;
}
h3 {
  font-size: 1.05rem;
}
p {
  margin: 0 0 0.75rem;
}
a {
  color: var(--red);
}
a:hover {
  color: var(--red-hover);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
h1:focus {
  outline: none;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------ shell */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
}
.skip-link:focus {
  top: 8px;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
}
.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--red);
}
.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-bars::before {
  top: -6px;
}
.menu-bars::after {
  top: 6px;
}

.main-nav {
  width: 100%;
  display: none;
}
.main-nav.open {
  display: block;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}
.main-nav a,
.main-nav .link-button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.7rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.main-nav a[aria-current="page"] {
  color: var(--red);
  font-weight: 700;
}

.page {
  display: block;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 3rem;
}
.page:focus {
  outline: none;
}
.loading {
  color: var(--muted);
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none !important;
  }
  .main-nav,
  .main-nav.open {
    display: block;
    width: auto;
  }
  .main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }
  .main-nav a,
  .main-nav .link-button {
    border-top: 0;
    padding: 0.5rem 0.25rem;
  }
  .main-nav[hidden] {
    display: none;
  }
}

/* ------------------------------------------------------------ building blocks */

.page-head {
  margin-bottom: 1rem;
}
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.crumb {
  font-size: 0.9rem;
}
.step {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.panel,
.card,
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}
.auth-card {
  max-width: 440px;
  margin: 1.5rem auto;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.card {
  margin: 0;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
}
.card-head h3 {
  margin: 0;
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-link:hover h3 {
  color: var(--red);
}
.sub-card {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.sub-card p {
  margin: 0.15rem 0;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.facts,
.summary {
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.5rem;
}
.facts div,
.summary div {
  display: grid;
  gap: 0.1rem;
}
.facts dt,
.summary dt {
  font-size: 0.85rem;
  color: var(--muted);
}
.facts dd,
.summary dd {
  margin: 0;
}
.summary dd .muted,
.summary dd .small {
  display: block;
}
.summary .total {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
  font-weight: 700;
}

@media (min-width: 600px) {
  .summary div {
    grid-template-columns: minmax(10rem, 1fr) 2fr;
    gap: 1rem;
  }
}

.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chips li {
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.875rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--info-soft);
  color: var(--info);
  white-space: nowrap;
}
.badge-confirmed,
.badge-ready_for_move_in {
  background: var(--info-soft);
  color: var(--info);
}
.badge-checked_in,
.badge-completed {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge-cancelled {
  background: var(--red-soft);
  color: var(--red-hover);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding-bottom: 0.75rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1rem - 6px);
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.timeline p {
  margin: 0;
}
.timeline-status {
  font-weight: 600;
}

.alert {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid transparent;
}
.alert p:last-child {
  margin-bottom: 0;
}
.alert-error {
  background: var(--red-soft);
  border-color: #ebc4bd;
  color: #7d2a22;
}
.alert-ok {
  background: var(--ok-soft);
  border-color: #c2dfc0;
  color: var(--ok);
}
.notice {
  background: var(--warn-soft);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
}
.empty {
  color: var(--muted);
  padding: 1rem 0;
}

.confirmed {
  text-align: center;
}
.booking-id {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.02em;
}
.confirmed .actions {
  justify-content: center;
}

.layout-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .layout-2 {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
  .cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* ------------------------------------------------------------ forms and buttons */

.grid {
  display: grid;
  gap: 0 1rem;
}
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.field {
  margin-bottom: 0.9rem;
  min-width: 0;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.field-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.field-inline label {
  margin: 0;
}
.field-inline select {
  width: auto;
}
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.field-check input {
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--red);
}
.field-check label {
  font-weight: 500;
  margin: 0;
}
.field-check .field-error {
  flex-basis: 100%;
}
.field-check {
  flex-wrap: wrap;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfc3ad;
  border-radius: 8px;
}
textarea {
  min-height: 5rem;
  resize: vertical;
}
[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.field-error {
  color: #9b2f25;
  font-size: 0.85rem;
  margin: 0.3rem 0 0;
}

fieldset.choices {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.choice input {
  width: 1.2rem;
  height: 1.2rem;
  min-height: 0;
  margin: 0.2rem 0 0;
  flex: none;
  accent-color: var(--red);
}
.choice span {
  display: flex;
  flex-direction: column;
}
.choice:has(input:checked) {
  border-color: var(--red);
  background: var(--red-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0.55rem 1.1rem;
  border: 1px solid #cfc3ad;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.btn:hover {
  background: var(--cream-deep);
  color: var(--ink);
}
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: #fff;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.btn-block {
  display: flex;
  width: 100%;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.summary .link-button {
  margin-inline-start: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .actions .btn {
    flex: 1 1 auto;
  }
}
