/* ============================================================
   Quincus brand system (login surface)
   Tokens sourced from the quincus-brand skill: Manrope type,
   navy / lavender palette on paper, lavender card top-border,
   Etihad gold as co-brand accent.
   ============================================================ */
:root {
  /* surfaces */
  --navy: #093359;
  --navy-deep: #061F38;
  --navy-mid: #0E3F6C;
  --paper: #FAFAF8;        /* near-white, barely warm */
  --paper-alt: #F3F4F6;    /* cool light neutral for subtle fills */
  --card: #FFFFFF;

  /* text on light — navy is the workhorse; secondary is a cool grey */
  --ink: #0F2A43;
  --ink-70: #6B7280;       /* secondary text */
  --ink-55: #9AA1AC;       /* muted */

  /* accents */
  /* Brand tokens — defined once, used everywhere. No indigo/purple anywhere. */
  --primary: #093359;   /* Etihad navy — links, buttons, focus, active nav */
  --accent: #C99933;    /* Etihad gold — accent ONLY (Lowest tag, highlights) */
  /* legacy names retargeted to navy so gold never leaks into borders/fills */
  --lavender: var(--primary);
  --lavender-soft: var(--primary);
  --lavender-deep: var(--primary);
  --green: #4F9277;
  --amber: #C79A4E;
  --red: #C0554F;
  /* earned-label chip tints (offer cards). Green stays reserved for status,
     amber for warnings; teal enters here as the time-fact label accent. */
  --gold-tint: #F6EEDC; --gold-ink: #8A6A1F;   /* CHEAPEST */
  --navy-tint: #E4EAF2;                          /* FASTEST (text = --primary) */
  --teal: #1F6B5E; --teal-tint: #E2F0EE;         /* EARLIEST */

  /* co-brand */
  --etihad-gold: #E8BA5D;
  --etihad-gold-deep: #C99933;

  /* rules */
  --rule-dark: #E8E6E1;
  --rule-dark-strong: #D4D2CD;

  --error: var(--red);
  --error-bg: #fbe9e9;
  --radius: 8px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(9, 31, 56, 0.05), 0 4px 14px rgba(9, 31, 56, 0.05);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-feature-settings: 'ss01', 'cv11';
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(201, 153, 51, 0.08), transparent 60%),
    var(--paper);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* ---- Card ---- */
.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius);
  border-top: 2px solid var(--lavender); /* Quincus signature */
  box-shadow: var(--shadow);
  padding: 38px 40px 24px;
}

.logo { text-align: center; margin-bottom: 24px; }
.logo img { height: 46px; width: auto; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--lavender-deep);
  margin-bottom: 10px;
}

.card h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0 0 6px;
}

.card .subtitle {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0 0 24px;
}

/* ---- Form-level error ---- */
.form-error {
  display: none;
  background: var(--error-bg);
  color: #a5342f;
  font-size: 13px;
  border-left: 3px solid var(--error);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 18px;
}
.form-error.show { display: block; }

.field { margin-bottom: 16px; }

/* ---- Floating-label input ---- */
.input-wrap { position: relative; }

.input-wrap input {
  width: 100%;
  height: 56px;
  padding: 22px 14px 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule-dark-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-wrap.has-toggle input { padding-right: 66px; }
.input-wrap input:hover { border-color: rgba(9, 31, 56, 0.34); }
.input-wrap input:focus {
  outline: none;
  border-color: var(--lavender-deep);
  box-shadow: inset 0 0 0 1px var(--lavender-deep);
}

.input-wrap label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--ink-55);
  pointer-events: none;
  transition: transform 0.12s ease, font-size 0.12s ease, color 0.12s ease;
}
.input-wrap input:focus + label,
.input-wrap input:not(:placeholder-shown) + label {
  transform: translateY(-142%);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.input-wrap input:focus + label { color: var(--lavender-deep); }

.input-wrap input.invalid { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.input-wrap input.invalid + label { color: var(--error); }

.show-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lavender-deep);
  cursor: pointer;
  border-radius: 6px;
}
.show-toggle:hover { background: rgba(9, 51, 89, 0.08); }

.field-error {
  display: none;
  color: #a5342f;
  font-size: 12px;
  margin: 6px 2px 0;
}
.field-error.show { display: block; }

.forgot-row { margin: 6px 0 22px; }

/* ---- Buttons ---- */
.btn {
  width: 100%;
  height: 52px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: var(--navy-mid); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(9, 51, 89, 0.4); outline-offset: 2px; }

.link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--lavender-deep);
  cursor: pointer;
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ---- Co-brand footer lockup ---- */
.cobrand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-dark);
}
.cobrand img { height: 15px; width: auto; opacity: 0.9; }
.cobrand .sep { width: 1px; height: 14px; background: var(--rule-dark-strong); }
.cobrand .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-55);
}

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 31, 56, 0.5);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-overlay.show { display: flex; }

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--radius);
  border-top: 2px solid var(--lavender);
  box-shadow: var(--shadow);
  padding: 28px;
}
.modal .eyebrow { margin-bottom: 8px; }
.modal h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; }
.modal p { font-size: 14px; color: var(--ink-70); margin: 0 0 18px; line-height: 1.55; }
.modal .field { margin-bottom: 0; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 20px; }
.modal .btn-row .btn { flex: 1; }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule-dark-strong);
}
.btn-secondary:hover { background: var(--paper-alt); }

.modal-success {
  display: none;
  background: #eaf6ef;
  color: #217a4b;
  border-left: 3px solid var(--green);
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  line-height: 1.55;
}
.modal-success.show { display: block; }

/* ---- Home placeholder ---- */
.home-wrap {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--radius);
  border-top: 2px solid var(--lavender);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
}
.home-wrap .logo { margin-bottom: 20px; }
.home-wrap .eyebrow { text-align: center; }
.home-wrap h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 8px; }
.home-wrap p { color: var(--ink-70); font-size: 15px; line-height: 1.55; margin: 0 0 22px; }

/* stage D (LN-8) — the booking modal's rate lineage: every hop, snapshot never lookup */
.bk-lineage { display: flex; flex-direction: column; gap: 4px; }
.bk-hop { display: flex; gap: 10px; font-size: 13px; align-items: baseline; }
.bk-hop-name { min-width: 64px; font-weight: 600; text-transform: capitalize; }
.bk-hop-ref { min-width: 110px; }
.bk-hop-line { color: #667085; }

/* BR-21: the not-proceeding path — expands in place on the offer card */
.offer-decline { margin-left: 12px; font-size: var(--fs-small); }
.offer-declined { font-size: var(--fs-small); color: var(--ink-soft); }
.offer-declineform { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px;
  display: flex; flex-direction: column; gap: 8px; }
.offer-declineform .dq-l { font-size: var(--fs-small); color: var(--ink-soft); display: flex;
  align-items: center; gap: 8px; justify-content: space-between; }
.offer-declineform select, .offer-declineform .dq-note { font-family: inherit; font-size: var(--fs-body);
  padding: 6px 10px; border: 1px solid var(--rule-strong, #c9ccd1); border-radius: 8px; background: #fff; }
.offer-declineform .dq-acts { display: flex; align-items: center; gap: 12px; }
.offer-declineform .dq-err { font-size: var(--fs-small); color: #b3261e; }
