/* Valure Dispatch: soft and airy like the rest of Valure (Theranos-style: white, light type,
   pale tiles, no lines where they aren't needed). Each airline's own colour is --brand,
   set by dispatch.js. Rethink Sans, no shadows, no gradients */
@font-face { font-family: "Rethink Sans"; src: url("/assets/fonts/RethinkSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rethink Sans"; src: url("/assets/fonts/RethinkSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rethink Sans"; src: url("/assets/fonts/RethinkSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --brand: #007aff; --brand-ink: #fff; --brand-text: #007aff;
  --ink: #1d1d1f; --ink-2: #48484a; --muted: #86868b; --faint: #aaaaaa;
  --pale: #f9f9fb; --pale-2: #f3f3f6; --line: #eeeef1;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: "Rethink Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* First paint */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: boot 1.4s ease-in-out infinite; }
@keyframes boot { 50% { opacity: 0.35; } }

/* ---- Layout: the sidebar and the page ---- */
.app { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; width: 272px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 36px 20px 24px; border-right: 1px solid #f2f2f5; overflow-y: auto; }
.org { display: flex; align-items: center; gap: 12px; padding: 0 12px 32px; color: var(--ink); }
.org:hover { text-decoration: none; }
.org__logo { width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--pale-2); object-fit: cover; }
.org__name { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.org__sub { display: block; font-size: 13px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-size: 15px; transition: background-color 0.2s ease; }
.nav:hover { background: var(--pale); color: var(--ink); text-decoration: none; }
.nav[aria-current="page"] { background: var(--pale-2); color: var(--ink); font-weight: 500; }
.nav svg { flex: none; color: var(--muted); }
.nav[aria-current="page"] svg { color: var(--brand); }
.nav-h { margin: 28px 12px 8px; font-size: 12px; color: var(--faint); }
.side__me { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 24px 12px 0; }
.side__me b { display: block; font-size: 14px; font-weight: 500; }
.side__me span { font-size: 12px; color: var(--muted); }
.side__links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 12px 0; font-size: 13px; }
.side__links a, .side__links button { color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.side__links a:hover, .side__links button:hover { color: var(--ink); }
.powered { display: flex; align-items: center; gap: 8px; padding: 20px 12px 0; font-size: 12px; color: var(--faint); }
.powered img { width: 16px; height: auto; }

.main { flex: 1; min-width: 0; padding: 72px clamp(24px, 5vw, 80px) 120px; }
.page { max-width: 1120px; }
.page.in { animation: page-in 0.6s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } }

/* ---- Type and parts ---- */
h1 { margin: 0; font-size: clamp(2.25rem, 4.5vw, 3rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.08; }
h2 { margin: 0 0 20px; font-size: 1.5rem; font-weight: 400; letter-spacing: -0.02em; }
.sub { margin: 12px 0 0; font-size: 1.1875rem; color: var(--muted); }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.t { font-variant-numeric: tabular-nums; }
.sec { margin-bottom: 72px; }
.sec__h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tile { background: var(--pale); border-radius: 28px; padding: 36px; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 980px; background: var(--brand); color: var(--brand-ink); font-size: 16px; cursor: pointer; white-space: nowrap; transition: opacity 0.2s ease, background-color 0.2s ease; }
.pill:hover { opacity: 0.88; text-decoration: none; color: var(--brand-ink); }
.pill.o { background: #fff; color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand); }
.pill.o:hover { background: var(--brand); color: var(--brand-ink); opacity: 1; }
.pill.g { background: var(--pale-2); color: var(--ink); }
.pill.g:hover { background: #ebebef; color: var(--ink); opacity: 1; }
.pill.s { min-height: 36px; padding: 0 16px; font-size: 14px; }
.pill:disabled { opacity: 0.45; cursor: default; }
.pill.done { background: #e8f6ec; color: #1a7f37; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; background: var(--pale-2); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: #e8f6ec; color: #1a7f37; }
.chip.warn { background: #fff4e0; color: #9a5b00; }
.chip.brand { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand-text); }
.link { background: none; border: 0; padding: 0; color: var(--brand-text); cursor: pointer; font-size: 15px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: #c4314b; }

.av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--pale-2); color: var(--muted); font-size: 13px; font-weight: 500; object-fit: cover; }
.av.s { width: 32px; height: 32px; border: 2px solid var(--pale); margin-left: -8px; }
.av.s:first-child { margin-left: 0; }
.av.empty { background: #fff; color: var(--faint); }
.avs { display: flex; }

.bar { display: block; height: 6px; border-radius: 3px; background: #e9e9ee; overflow: hidden; margin-bottom: 6px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width 1s var(--ease); }
.bar.ok i { background: #34c759; }

.rows { background: var(--pale); border-radius: 28px; padding: 8px 0; }
.row { display: grid; align-items: center; gap: 20px; padding: 18px 32px; color: var(--ink); }
a.row:hover { background: var(--pale-2); text-decoration: none; }
.row + .row { border-top: 1px solid var(--line); }
.row b { font-weight: 500; }
.rows:empty::after { content: attr(data-empty); display: block; padding: 28px 32px; color: var(--muted); }

/* ---- Home ---- */
.next { display: flex; flex-direction: column; gap: 6px; min-height: 300px; }
.route { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 22px 0 4px; font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; }
.route svg { color: var(--faint); flex: none; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 20px; font-size: 15px; color: var(--muted); }
.meta b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 28px; }
.count { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.count__n { margin: 0; font-size: clamp(3rem, 6vw, 4rem); font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.count__n span { font-size: 1.5rem; color: var(--muted); letter-spacing: -0.01em; }
.checks { display: flex; flex-direction: column; gap: 14px; }
.checks div { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.checks i { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #e8f6ec; color: #1a7f37; }
.checks i.no { background: var(--pale-2); color: var(--faint); }
.stat { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; }
.stat + .stat { border-top: 1px solid var(--line); }
.stat b { font-size: 1.75rem; font-weight: 400; letter-spacing: -0.02em; }
.empty-next { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; min-height: 260px; }
.empty-next p { margin: 0; font-size: 1.375rem; letter-spacing: -0.015em; }

/* ---- Flights ---- */
.day { margin: 48px 0 16px; font-size: 15px; color: var(--muted); }
.day:first-child { margin-top: 0; }
.roles-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; margin-bottom: 72px; padding: 28px 36px; background: var(--pale); border-radius: 28px; }
.facts span { font-size: 14px; color: var(--muted); }
.facts b { display: block; margin-top: 4px; font-size: 1.25rem; font-weight: 400; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-bottom: 72px; }
.role { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 190px; padding: 28px; }
.role__n { margin: 0; font-size: 1.375rem; font-weight: 400; letter-spacing: -0.015em; }
.role__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.who { display: flex; flex-direction: column; gap: 8px; }
.who div { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.who .av { width: 28px; height: 28px; font-size: 11px; }
.who .x { margin-left: auto; }
.ready-dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; flex: none; }
.brief { white-space: pre-line; margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.back { display: inline-block; margin-bottom: 28px; font-size: 15px; }

/* ---- Forms ---- */
.form { display: grid; gap: 28px; max-width: 760px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.field { display: grid; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field label, .label { font-size: 14px; color: var(--ink-2); }
.field small { font-size: 13px; color: var(--muted); }
.input { width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid #e3e3e8; border-radius: 14px; background: #fff; transition: border-color 0.2s ease; }
.input:hover { border-color: #d2d2d7; }
.input:focus { outline: none; border-color: var(--brand); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.role-edit { display: grid; grid-template-columns: 1fr 120px 44px; gap: 12px; align-items: center; }
.role-list { display: grid; gap: 12px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--pale-2); color: var(--ink); }
.err { margin: 0; color: #c4314b; font-size: 15px; }
.err:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }
.swatch-custom { width: 44px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; }

/* ---- Setup ---- */
.setup { max-width: 880px; margin: 0 auto; padding: 120px 24px 160px; }
.setup__mark { width: 72px; height: auto; display: block; margin-bottom: 40px; }
.setup h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
.steps { display: flex; gap: 8px; margin: 40px 0 56px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--pale-2); }
.steps i.on { background: var(--brand); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px; border: 1px solid transparent; border-radius: 24px; background: var(--pale); text-align: left; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease; }
.pick:hover { background: var(--pale-2); }
.pick[aria-pressed="true"] { background: #fff; border-color: var(--brand); }
.pick b { font-weight: 500; font-size: 1.125rem; }
.pick span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.pick img { width: 56px; height: 56px; border-radius: 14px; background: var(--pale-2); }

/* Sign in / nothing here */
.solo { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 24px; }
.solo img { width: 96px; height: auto; }
.solo h1 { margin-top: 40px; font-size: clamp(2.75rem, 6vw, 4.5rem); }
.solo p { max-width: 30em; margin: 20px 0 0; font-size: 1.1875rem; color: var(--muted); }
.solo .pill { margin-top: 40px; }

/* ---- Loading shapes ---- */
.sk { display: block; border-radius: 8px; background: #efeff3; animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 50% { opacity: 0.55; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 20; transform: translateX(-50%); padding: 12px 22px; border-radius: 980px; background: var(--ink); color: #fff; font-size: 15px; animation: toast 0.4s var(--ease); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---- Phones ---- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { position: static; height: auto; width: 100%; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid #f2f2f5; overflow-x: auto; }
  .org { padding: 0 12px 0 0; }
  .org__sub, .nav-h, .side__me, .side__links, .powered { display: none; }
  .nav, .org__name { white-space: nowrap; }
  .nav svg { display: none; }
  .main { padding: 40px 20px 96px; }
  .grid2, .cols { grid-template-columns: 1fr; }
  .tile { padding: 28px; border-radius: 24px; }
  .row { padding: 16px 20px; gap: 14px; grid-template-columns: auto minmax(0, 1fr) auto !important; }
  .row .hide-m { display: none; }
  .fields { grid-template-columns: 1fr; }
  .setup { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .page.in, .toast, .boot img, .sk { animation: none; }
}
