@font-face {
  font-family: Manrope;
  src: url("../assets/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

.pilot {
  --bg: #f4f6f1;
  --paper: #fff;
  --ink: #192720;
  --muted: #4f6056;
  --line: #d8e2d9;
  --brand: #173f30;
  --brand-hover: #225840;
  --soft: #e8f1e9;
  --warn: #765115;
  --error: #9b302c;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.55 Manrope, "Segoe UI", sans-serif;
  color-scheme: light;
}

.pilot *, .pilot *::before, .pilot *::after { box-sizing: border-box; }
.pilot [hidden] { display: none !important; }
.pilot a { color: var(--brand); text-underline-offset: .24em; }
.pilot a:hover { color: var(--brand-hover); }
.pilot a:focus-visible, .pilot button:focus-visible, .pilot input:focus-visible, .pilot select:focus-visible, .pilot textarea:focus-visible, .pilot summary:focus-visible {
  outline: 3px solid #387558;
  outline-offset: 3px;
}
.pilot h1, .pilot h2, .pilot h3, .pilot p { margin: 0; }
.pilot h1 { font-size: clamp(1.85rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -.04em; }
.pilot h2 { font-size: 1.28rem; letter-spacing: -.025em; line-height: 1.23; }
.pilot h3 { font-size: 1.03rem; line-height: 1.3; }
.pilot ul, .pilot ol { margin: 0; padding: 0; }
.pilot small, .pilot-muted { color: var(--muted); }
.pilot small { font-size: .85rem; }
.pilot-shell { width: min(83rem, calc(100% - 3rem)); margin-inline: auto; }
.pilot-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.pilot-header-inner, .pilot-account, .pilot-brand { display: flex; align-items: center; gap: .8rem; }
.pilot-header-inner { min-height: 4.8rem; justify-content: space-between; }
.pilot-account { flex-wrap: wrap; justify-content: end; gap: .4rem .95rem; font-size: .9rem; }
.pilot-account a { white-space: nowrap; }
.pilot .pilot-brand { color: var(--ink); font-size: 1.75rem; letter-spacing: -.075em; font-weight: 800; text-decoration: none; }
.pilot-period { color: #477251; }
.pilot-main { padding-block: 2rem 2.5rem; }
.pilot-footer { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; border-top: 1px solid var(--line); padding-block: 1.25rem 2rem; font-size: .92rem; }
.pilot-welcome { display: grid; gap: 1rem; padding: clamp(1.6rem, 5vw, 3.25rem); max-width: 48rem; background: var(--paper); border: 1px solid var(--line); border-radius: 1.25rem; }
.pilot-welcome .pilot-actions { margin-top: .4rem; }
.pilot-headline { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 1rem; margin-block-end: 1.35rem; }
.pilot-headline p { margin-top: .4rem; }
.pilot-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.pilot-notice { margin-block-end: 1rem !important; padding: .75rem 1rem; border-radius: .65rem; background: var(--soft); overflow-wrap: anywhere; }
.pilot-notice[data-error="true"] { background: #f7e8e6; color: var(--error); }

.pilot-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  max-width: 100%;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  color: var(--brand);
  background: var(--paper);
  text-decoration: none;
  text-align: center;
  font: inherit;
  font-size: .93rem;
  font-weight: 750;
  cursor: pointer;
}
.pilot-button:hover { border-color: var(--brand-hover); background: var(--soft); }
.pilot .pilot-button.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.pilot .pilot-button.primary:hover { background: var(--brand-hover); }
.pilot-button.danger { color: var(--error); }
.pilot-button:disabled { opacity: .55; cursor: wait; }

.pilot-tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.3rem; padding-bottom: .55rem; }
.pilot-tabs button { min-height: 2.75rem; padding: .45rem .75rem; border: 0; border-radius: .6rem; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.pilot-tabs button:hover, .pilot-tabs button[aria-current="page"] { background: var(--soft); color: var(--brand); }
.pilot-grid { display: grid; grid-template-columns: minmax(14rem, .82fr) minmax(0, 1.65fr); gap: 1rem; align-items: start; }
.pilot-grid > * { min-width: 0; }
.pilot-stack { display: grid; gap: .85rem; }
.pilot-stack > * { min-width: 0; }
.pilot-card { padding: clamp(.95rem, 2.4vw, 1.45rem); background: var(--paper); border: 1px solid var(--line); border-radius: .95rem; }
.pilot-card > h2 + *, .pilot-card > h3 + *, .pilot-card > header + * { margin-top: .75rem; }
.pilot-policy { max-width: 50rem; display: grid; gap: 1rem; }
.pilot-policy h2 { margin-top: .5rem; }
.pilot-email .pilot-main { padding-block: clamp(1.5rem, 8vh, 5rem); }
.pilot-email .pilot-welcome { max-width: 34rem; margin-inline: auto; }
.pilot-email .pilot-welcome:focus { outline: none; }
.pilot-email input { max-width: 26rem; }

.pilot-form { display: grid; gap: .85rem; }
.pilot-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.pilot-field { display: grid; min-width: 0; gap: .3rem; font-size: .9rem; font-weight: 700; }
.pilot-field input, .pilot-field textarea, .pilot-field select {
  min-width: 0;
  width: 100%;
  min-height: 2.75rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  padding: .56rem .67rem;
  border: 1px solid #b7c9bb;
  border-radius: .55rem;
  background: #fff;
}
.pilot-field select { appearance: none; padding-right: 2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%234f6056' stroke-width='1.7' stroke-linecap='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right .65rem center; }
.pilot-field textarea { min-height: 5rem; resize: vertical; }
.pilot-form .pilot-button[type="submit"] { justify-self: start; }
.pilot-form .full { grid-column: 1 / -1; }
.pilot-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.pilot-inline > .pilot-field { flex: 1 1 12rem; }
.pilot-inline > .pilot-button { flex: 0 0 auto; }

.pilot-trip-list { display: grid; gap: .5rem; }
.pilot-trip {
  display: grid; width: 100%; gap: .24rem;
  background: var(--paper); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: .65rem; padding: .78rem .85rem; overflow-wrap: anywhere;
}
.pilot-trip:hover, .pilot-trip[aria-current="true"] { border-color: #668874; background: var(--soft); }
.pilot-row { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; align-items: center; }
.pilot-tag { display: inline-block; flex-shrink: 0; width: fit-content; border-radius: .4rem; font-size: .88rem; font-weight: 760; padding: .18rem .44rem; background: var(--soft); color: var(--brand); }
.pilot-tag[data-status="cancelado"], .pilot-tag[data-status="pendiente"] { background: #f7ece0; color: var(--warn); }
.pilot-tag[data-status="en_transito"] { background: #e6edf8; color: #25486a; }
.pilot-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; margin: 0; }
.pilot-data > div { min-width: 0; overflow-wrap: anywhere; }
.pilot-data dt { color: var(--muted); font-size: .87rem; }
.pilot-data dd { margin: .15rem 0 0; font-weight: 660; }
.pilot-data .pilot-total { border-top: 1px solid var(--line); padding-top: .5rem; grid-column: 1 / -1; }
.pilot-data .pilot-total dd { font-size: 1.28rem; font-weight: 800; }
.pilot-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.pilot-metrics strong { display: block; font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 800; }
.pilot-metrics span { color: var(--muted); }
.pilot-company-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.pilot-company-metrics dt { color: var(--muted); font-size: .9rem; }
.pilot-company-metrics dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.pilot-stats-filter > div { min-width: 0; }
.pilot-stats-filter .pilot-field { min-width: min(12rem, 100%); }
.pilot .pilot-progress { display: grid; gap: .65rem; margin-block-end: 1rem; list-style: none; }
.pilot-progress progress {
  display: block;
  width: 100%;
  height: .48rem;
  border: 0;
  border-radius: .5rem;
  background: var(--soft);
  accent-color: var(--brand);
}
.pilot-progress progress::-webkit-progress-bar { background: var(--soft); border-radius: .5rem; }
.pilot-progress progress::-webkit-progress-value { background: var(--brand); border-radius: .5rem; }
.pilot-progress progress::-moz-progress-bar { background: var(--brand); border-radius: .5rem; }
.pilot-review { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pilot-entries { display: grid; gap: .55rem; list-style: none; }
.pilot-entry { display: grid; gap: .28rem; padding: .72rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.pilot-entry:last-child { border-bottom: 0; }
.pilot-entry p { white-space: pre-wrap; }
.pilot-photo { display: block; max-width: min(100%, 26rem); max-height: 20rem; object-fit: contain; border-radius: .6rem; }
.pilot details summary { cursor: pointer; font-weight: 750; color: var(--brand); }
.pilot details[open] summary { margin-block-end: .7rem; }
.pilot-linkbar { display: flex; justify-content: end; padding: .65rem max(1rem, calc((100% - 74rem) / 2)); background: #153c2e; }
.pilot-linkbar a { display: inline-block; padding: .3rem .15rem; color: #fff; text-decoration-thickness: .08em; text-underline-offset: .25em; font-weight: 700; font-size: .9rem; }
.pilot-linkbar a:focus-visible { outline: 2px solid #fff; outline-offset: .25rem; }

@media (max-width: 780px) {
  .pilot-shell { width: min(100% - 1.6rem, 83rem); }
  .pilot-grid { grid-template-columns: minmax(0, 1fr); }
  .pilot-grid[data-detail="true"] .pilot-trip-sidebar { display: none; }
  .pilot-main { padding-top: 1.3rem; }
  .pilot-metrics { grid-template-columns: minmax(0, 1fr); }
  .pilot-company-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .pilot-fields, .pilot-data { grid-template-columns: minmax(0, 1fr); }
  .pilot-account { gap: .15rem .55rem; }
}
@media (max-width: 390px) {
  .welcome-bar .brand { gap: .55rem; font-size: 1.4rem; }
  .welcome-bar .demo-badge { max-width: 5.5rem; padding: .3rem .5rem; line-height: 1.2; white-space: normal; }
  .welcome-bar .demo-badge svg { display: none; }
}

.pilot-portal:not(.pilot-signed-in) .pilot-shell { max-width: 76rem; }
.pilot-portal:not(.pilot-signed-in) .pilot-account { display: none; }
.pilot-portal .pilot-footer { justify-content: space-between; color: var(--muted); }
.pilot-public-nav { display: flex; align-items: center; gap: clamp(.7rem, 2.5vw, 1.8rem); }
.pilot-public-nav a { font-size: .94rem; font-weight: 750; text-decoration: none; }
.pilot-public-nav a:not(.pilot-button):hover { text-decoration: underline; }
.pilot-portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(21rem, 1fr);
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
.pilot-intro {
  isolation: isolate;
  position: relative;
  min-height: clamp(27rem, 38vw, 32rem);
  overflow: hidden;
  padding: clamp(1.85rem, 5vw, 4rem);
  border-radius: 1.25rem;
  background: #103a2a;
  color: #fff;
}
.pilot-intro-photo {
  position: absolute;
  z-index: -2;
  inset: 22% 0 0;
  width: 100%;
  height: 78%;
  object-fit: cover;
  object-position: 81% center;
}
.pilot-intro::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #103a2a 14%, #103a2a 27%, rgba(16, 58, 42, .93) 39%, rgba(16, 58, 42, .55) 62%, rgba(16, 58, 42, .08) 100%);
  content: "";
}
.pilot-intro h1 {
  max-width: 11ch;
  font-size: clamp(2.65rem, 5.1vw, 4.65rem);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.075em;
}
.pilot-intro h1 span { display: block; color: #def478; }
.pilot-intro p {
  max-width: 36ch;
  margin-top: 1rem;
  color: #f0f7f0;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 600;
}
.pilot-portal:not(.pilot-signed-in) .pilot-welcome {
  align-content: center;
  max-width: none;
  height: 100%;
  padding: clamp(1.25rem, 3.1vw, 2.85rem);
  box-shadow: 0 .4rem 1.5rem rgba(16, 58, 42, .045);
}
.pilot-portal-layout .pilot-welcome h2 { font-size: clamp(1.65rem, 2.45vw, 2.2rem); font-weight: 800; }
.pilot-portal-layout .pilot-welcome > p { color: var(--muted); overflow-wrap: anywhere; }
.pilot-portal-layout form[data-action^="acceso."] { margin-top: .35rem; }
.pilot-portal-layout form[data-action^="acceso."] .pilot-fields { grid-template-columns: minmax(0, 1fr); }
.pilot-portal-layout form[data-action^="acceso."] .pilot-button.primary {
  justify-self: stretch;
  min-height: 2.95rem;
  font-size: 1rem;
}
.pilot-portal-layout .pilot-actions button[data-auth-mode] { min-height: 2.75rem; }
.pilot-overview { margin-top: clamp(1.75rem, 4vw, 3rem); scroll-margin-top: 1rem; }
.pilot-overview > h2 { margin-bottom: 1.15rem; font-size: clamp(1.25rem, 2vw, 1.65rem); font-weight: 800; }
.pilot-overview-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
}
.pilot-overview-list li { padding-inline-start: 1rem; border-inline-start: 3px solid #a9c475; }
.pilot-overview-list p { margin-top: .3rem; color: var(--muted); }
.pilot-signed-in :is(.pilot-intro, .pilot-public-nav, .pilot-overview) { display: none; }
.pilot-signed-in .pilot-portal-layout { display: block; }

@media (max-width: 780px) {
  .pilot-portal-layout { grid-template-columns: minmax(0, 1fr); }
  .pilot-intro { min-height: 23rem; }
  .pilot-intro h1 { font-size: clamp(2.75rem, 8vw, 4rem); }
  .pilot-overview-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 475px) {
  .pilot-portal:not(.pilot-signed-in) .pilot-header-inner { min-height: 4rem; }
  .pilot-portal:not(.pilot-signed-in) .pilot-brand { font-size: 1.45rem; gap: .55rem; }
  .pilot-public-nav a[href="#como-funciona"] { display: none; }
  .pilot-intro { min-height: 19.5rem; padding: 1.45rem; }
  .pilot-intro-photo { object-position: right center; }
  .pilot-intro h1 { font-size: clamp(2.45rem, 10vw, 3.2rem); }
  .pilot-intro p { max-width: 28ch; margin-top: .65rem; }
}
