/* JET · Just Express Tags
 * "Streamliner Ticket" design system: golden-age jet travel. Chrome
 * masthead, morning-sky gradient, riveted ticket card with a tear-off
 * boarding-pass stub, cabin-window service picker. Jost (the Futura
 * stand-in), Red Hat Mono for data, Yellowtail for the tagline script.
 */

:root {
  --sky-top: #aacfe8;
  --sky-low: #e9eff2;
  --cream: #f6f4ee;
  --ink: #20323f;
  --ink-soft: #5f7282;
  --chrome-hi: #fdfdfd;
  --chrome-mid: #c7ced4;
  --chrome-low: #98a3ab;
  --blue: #395775;          /* Arbor Blue Earth */
  --blue-deep: #2b4257;
  --red: #cf3f2f;
  --green: #3f9c52;
  --line: #ccd5db;
  --shadow: 0 10px 30px rgba(57, 87, 117, 0.12);
  --sans: "Jost", sans-serif;
  --mono: "Red Hat Mono", monospace;
  --script: "Yellowtail", cursive;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-low) 420px, var(--cream) 720px) fixed;
  min-height: 100vh;
}

/* ---------- Chrome masthead ---------- */

.masthead {
  background: linear-gradient(180deg, var(--chrome-hi) 0%, var(--chrome-mid) 55%, var(--chrome-low) 100%);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 2px 18px rgba(32, 50, 63, 0.18);
}

.masthead-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
}

.wordmark { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.wordmark .wing svg { width: 48px; height: 22px; display: block; }
.wordmark .name {
  font-weight: 700;
  font-size: 25px;
  letter-spacing: 0.4em;
  color: var(--blue);
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.brand-divider { width: 1px; height: 32px; background: rgba(32, 50, 63, 0.25); }
.arbor-logo { height: 38px; width: auto; display: block; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5)); }

.tagline {
  font-family: var(--script);
  font-size: 21px;
  color: var(--red);
  transform: rotate(-2deg);
  margin-left: 4px;
  padding-top: 4px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.masthead-nav { display: flex; gap: 8px; margin-left: auto; }
.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
}
.nav-link.is-active { background: var(--blue); color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }

.masthead-user { display: flex; align-items: center; gap: 12px; }
.user-name { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); letter-spacing: 0.06em; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(32, 50, 63, 0.35);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Test mode banner ---------- */

.test-banner {
  background: repeating-linear-gradient(-45deg, #f3d9a4, #f3d9a4 14px, #efcf8d 14px, #efcf8d 28px);
  color: #6b4a10;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 7px 16px;
  border-bottom: 1px solid #d9b96a;
}
.test-banner code { font-weight: 600; }

/* ---------- Page scaffold ---------- */

.page { max-width: 1180px; margin: 0 auto; padding: 18px 26px 60px; }

@keyframes glide { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; animation: glide 0.7s ease-out both; }
.page-title { font-weight: 600; font-size: 26px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.page-title .thin { font-weight: 300; }
.kbd-note { margin-left: auto; font-size: 12px; color: var(--ink-soft); }

kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--blue);
  white-space: nowrap;
}

.flash {
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 14px;
  font-size: 13.5px;
  border: 1px solid;
  animation: glide 0.4s ease-out both;
}
.flash-notice { background: #ecf4ee; border-color: #bcd8c4; color: #2c5a38; }
.flash-alert  { background: #f9ecec; border-color: #e3bdbc; color: #84302e; }

.hint { font-size: 11.5px; color: var(--ink-soft); }

/* ---------- The ticket ---------- */

.ticket {
  display: grid;
  grid-template-columns: 1fr 290px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(57, 87, 117, 0.16);
  overflow: hidden;
  animation: glide 0.7s ease-out 0.08s both;
  margin: 0;
}

.ticket-main { display: flex; flex-direction: column; min-width: 0; }

.section { padding: 14px 24px 16px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: none; flex: 1; }

.sec-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.step-disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #4c6e92, var(--blue));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 11px;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.25);
  flex: none;
}
.sec-head h2 { font-weight: 600; font-size: 13.5px; letter-spacing: 0.24em; text-transform: uppercase; margin: 0; }
.sec-head .hint { margin-left: auto; }

/* ---------- Inputs ---------- */

input[type="text"], input[type="number"], input[type="search"], select, textarea {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  width: 100%;
}

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.field-row { display: flex; gap: 18px; }
.field { flex: 1; min-width: 0; }
.field-label, .field label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field .note { font-size: 11px; color: var(--ink-soft); margin-top: 5px; }
.w-small { max-width: 120px; }

/* ---------- Recipient picker ---------- */

.recip-grid { display: grid; grid-template-columns: 320px 1fr; gap: 12px; align-items: start; }

.picker { position: relative; }
.picker input[type="search"] {
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--cream);
}

.picker-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.picker-results:empty { display: none; }

.picker-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 13.5px;
  cursor: pointer;
}
.picker-result:last-child { border-bottom: none; }
.picker-result:hover, .picker-result.is-highlighted { background: var(--sky-low); }
.picker-result .abbr { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--red); min-width: 36px; }
.picker-result .geo { margin-left: auto; font-size: 11.5px; color: var(--ink-soft); }

.add-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--red);
  font-weight: 500;
  font-size: 12px;
  text-decoration: none;
  background: none;
  border: none;
  font-family: var(--sans);
  padding: 0;
  cursor: pointer;
}
.add-link::before { content: "+ "; }

.chips { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.chip {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px 999px 999px 8px;
  border-left: 4px solid var(--blue);
  padding: 6px 14px 6px 12px;
  animation: glide 0.25s ease-out;
}
.chip .chip-name { font-weight: 600; font-size: 14px; min-width: 84px; }
.chip .chip-code {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  background: var(--blue);
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
}
.chip .chip-geo { font-size: 11.5px; color: var(--ink-soft); }
.chip .chip-attn { margin-left: auto; display: flex; align-items: baseline; gap: 7px; }
.chip .chip-attn label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--ink-soft); margin: 0; }
.chip .chip-attn input {
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 13.5px;
  padding: 1px 2px;
  width: 170px;
}

.chip-remove {
  background: none;
  border: none;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-soft);
  padding: 2px 4px;
  cursor: pointer;
}
.chip-remove:hover { color: var(--red); }

.chip.is-adhoc { border-left-color: var(--red); flex-wrap: wrap; }
.chip.is-adhoc .adhoc-grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 7px; width: 100%; padding: 4px 0 2px; }
.chip.is-adhoc .adhoc-grid .span-2 { grid-column: span 2; }
.chip.is-adhoc input { background: #fff; }

/* ---------- Cabin-window service picker ---------- */

.windows { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

.cabin { text-align: center; position: relative; }
.cabin input { position: absolute; opacity: 0; }
.cabin label { cursor: pointer; display: block; }

.porthole {
  width: 88px;
  height: 104px;
  margin: 0 auto;
  border-radius: 44px;
  background: linear-gradient(180deg, #b5d4ea 0%, #dcebf4 55%, #f0e6cf 80%, #e8d9b8 100%);
  border: 5px solid #dfe5e9;
  box-shadow: inset 0 0 0 2px #fff, inset 0 4px 10px rgba(32, 50, 63, 0.18), 0 4px 12px rgba(57, 87, 117, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cabin label:hover .porthole { transform: translateY(-3px); }
.cabin input:checked + label .porthole {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px #fff, inset 0 4px 10px rgba(32, 50, 63, 0.18), 0 8px 18px rgba(57, 87, 117, 0.35);
}
.cabin input:focus-visible + label .porthole { outline: 2px solid var(--blue); outline-offset: 2px; }

.porthole .cloud {
  position: absolute;
  top: 17px;
  left: 13px;
  width: 26px;
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 20px 6px 0 -2px rgba(255, 255, 255, 0.7);
}
.service-price { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.service-price:empty::before { content: "—"; color: var(--ink-soft); font-weight: 400; }
.service-eta { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.18em; color: var(--ink-soft); min-height: 11px; }

.cabin .service-name { margin-top: 7px; font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; display: block; }
.cabin .service-key { font-family: var(--mono); font-size: 9px; color: var(--ink-soft); display: block; margin-top: 1px; }
.cabin input:checked + label .service-name { color: var(--blue); }
.cabin.is-unavailable { opacity: 0.4; }
.cabin.is-unavailable label { cursor: not-allowed; }
.cabin.is-unavailable .porthole { background: linear-gradient(180deg, #d7dee2, #c4ccd1); }

/* ---------- Quote results ---------- */

.quote-zone:empty { display: none; }
.quote-zone { margin-top: 14px; }

.quote-errors {
  border: 1px solid #e3bdbc;
  background: #f9ecec;
  color: #84302e;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
}
.quote-errors ul { margin: 4px 0 0; padding-left: 18px; }

.quote-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--mono); }
.quote-table th {
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--line);
  padding: 4px 8px;
  font-weight: 600;
}
.quote-table td { border-bottom: 1px solid var(--sky-low); padding: 5px 8px; }
.quote-table .amount { text-align: right; }
.quote-table tfoot td { border-bottom: none; font-weight: 600; }

/* ---------- The stub (boarding pass) ---------- */

.stub {
  border-left: 2px dashed var(--line);
  position: relative;
  background: linear-gradient(180deg, #f3f5f7, #e7ebee);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.stub::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  bottom: 0;
  width: 12px;
  background: radial-gradient(circle 4px at 6px 16px, #fff 98%, transparent) 0 0 / 12px 32px repeat-y;
  opacity: 0.9;
}

.stub h3 {
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--blue);
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  margin: 0;
}

.stub-line { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 11px; }
.stub-line .k { color: var(--ink-soft); flex: none; }
.stub-line .v { font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stub-total {
  border-top: 2px solid var(--blue);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.stub-total .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--blue); font-weight: 600; }
.stub-total .v { font-weight: 700; font-size: 26px; }

.stub select { border-radius: 999px; font-size: 12.5px; padding: 8px 12px; }

.lamp-row { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-soft); margin: 6px 0 0; }
.lamp {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.lamp-online { background: radial-gradient(circle at 35% 30%, #9fe0a8, var(--green)); box-shadow: 0 0 7px rgba(63, 156, 82, 0.6); }
.lamp-offline { background: radial-gradient(circle at 35% 30%, #e8a39b, var(--red)); box-shadow: 0 0 7px rgba(207, 63, 47, 0.5); }

.btn {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px;
  padding: 11px 10px;
  width: 100%;
}
.btn-quote { background: #fff; border: 2px solid var(--blue); color: var(--blue); }
.btn-quote:disabled { opacity: 0.5; cursor: wait; }
.btn-buy {
  background: linear-gradient(180deg, #e25543, var(--red));
  border: none;
  color: #fff;
  box-shadow: 0 5px 14px rgba(207, 63, 47, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-buy:hover:not(:disabled) { filter: brightness(1.05); }
.btn-buy:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.stub .spacer { flex: 1; }

.barcode {
  height: 34px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 8px,
    var(--ink) 8px 9px, transparent 9px 13px, var(--ink) 13px 15px, transparent 15px 16px);
  opacity: 0.85;
}
.barcode-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.4em; text-align: center; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Shipments table ---------- */

.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.toolbar form { flex: 1; max-width: 340px; }
.toolbar input[type="search"] { border-radius: 999px; padding: 9px 16px; background: #fff; }
.toolbar .count { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-left: auto; }

.ship-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ship-table th {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
  color: #fff;
  background: linear-gradient(180deg, #4c6e92, var(--blue));
  padding: 9px 12px;
  white-space: nowrap;
}

.ship-table td { padding: 9px 12px; border-bottom: 1px solid var(--sky-low); vertical-align: top; }
.ship-table tbody tr:last-child td { border-bottom: none; }
.ship-table tbody tr:hover { background: var(--cream); }

.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }

.status-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.status-printed { background: #ecf4ee; color: #2c5a38; border: 1px solid #bcd8c4; }
.status-purchased, .status-print_queued, .status-pending { background: #e8eef5; color: var(--blue); border: 1px solid #c4d2e0; }
.status-print_failed, .status-error { background: #f9ecec; color: #84302e; border: 1px solid #e3bdbc; }

.row-actions { display: flex; gap: 6px; align-items: center; }

.copy-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 10px;
  color: var(--blue);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.copy-btn:hover { background: var(--sky-low); }
.copy-btn.is-copied { color: #2c5a38; border-color: #bcd8c4; }

.popover { position: relative; display: inline-block; }
.popover summary { list-style: none; cursor: pointer; }
.popover summary::-webkit-details-marker { display: none; }

.popover-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-width: 210px;
  padding: 8px;
}
.popover-menu .menu-title {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 8px;
}
.popover-menu form { margin: 0; }
.popover-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  text-align: left;
  font-family: var(--sans);
  font-size: 13px;
  padding: 7px 8px;
  cursor: pointer;
}
.popover-menu button:hover { background: var(--sky-low); }

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 48px 0;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}
.btn-link { background: none; border: none; color: var(--red); font-family: var(--sans); font-weight: 500; text-decoration: none; cursor: pointer; }

/* ---------- Login ---------- */

.login-wrap { display: grid; place-items: center; min-height: 70vh; }

.login-card {
  background: linear-gradient(180deg, #fff, #f3f5f7);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(57, 87, 117, 0.25);
  text-align: center;
  padding: 44px 56px;
  max-width: 440px;
}
.login-card .wing svg { width: 84px; height: 38px; margin: 0 auto; display: block; }
.login-title {
  font-weight: 700;
  font-size: 44px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 8px 0 0;
  text-indent: 0.4em; /* visually recenters the letterspaced caps */
}
.login-tagline { font-family: var(--script); font-size: 24px; color: var(--red); transform: rotate(-2deg); margin: 2px 0 20px; }
.login-card .arbor-logo { height: 52px; margin: 0 auto 24px; }
.btn-sso {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(180deg, #e25543, var(--red));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  box-shadow: 0 5px 14px rgba(207, 63, 47, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
