/* ============================================================
   FlyFleet — customer account page
   Reuses the tokens + brand atoms from main.css. Dark brand nav over a
   clean "paper" workspace for legible forms and booking data.
   ============================================================ */

/* [hidden] must beat the flex/grid display rules below (forms, sections, tiles). */
[hidden] { display: none !important; }

.acc-body { background: var(--paper); color: var(--ink); min-height: 100vh; }

/* ---- nav ---- */
.acc-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px var(--pad);
  background: var(--void); color: var(--on-dark);
  border-bottom: 1px solid var(--rule-dark);
}
.acc-nav .brand__name { color: #fff; }
.acc-nav__right { display: flex; align-items: center; gap: 20px; }
.acc-nav__link {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-dark-2); background: none; border: none; cursor: pointer; padding: 0;
  transition: color .2s ease;
}
.acc-nav__link:hover { color: #fff; }

/* ---- layout ---- */
.acc { max-width: 1120px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--pad) 80px; }
.acc-loading { padding: 80px 0; text-align: center; color: var(--muted); }
.acc-title { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; font-size: clamp(28px, 4vw, 42px); line-height: 1.02; margin: 8px 0 0; text-transform: uppercase; }
.acc-lead { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin: 14px 0 22px; max-width: 46ch; }
.acc-sub { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.acc-muted { color: var(--muted); font-size: 14px; }
.acc-muted a, .bcard__note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mono { font-family: var(--font-mono); }

.acc-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: clamp(20px, 3vw, 30px); box-shadow: 0 1px 2px rgba(16,20,26,.04);
}
.acc-card + .acc-card { margin-top: 20px; }
.acc-h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0 0 16px; }
.acc-h2row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.acc-h2row .acc-h2 { margin: 0; }

/* ---- auth ---- */
.acc-auth { display: flex; justify-content: center; padding-top: 10px; }
.acc-auth__card { width: 100%; max-width: 440px; }
.acc-tabs { display: flex; gap: 6px; background: var(--paper-2); padding: 4px; border-radius: 10px; margin-bottom: 22px; }
.acc-tab {
  flex: 1; padding: 10px; border: none; background: none; cursor: pointer; border-radius: 7px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); transition: background .2s ease, color .2s ease;
}
.acc-tab.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,20,26,.08); }

/* ---- forms ---- */
.acc-form { display: flex; flex-direction: column; gap: 14px; }
.acc-form--tight { gap: 10px; margin-bottom: 18px; }
.acc-field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
/* minmax(0,1fr) lets the two columns split the card evenly; a plain 1fr keeps the
   auto minimum, and inputs' wide intrinsic width then overflows the narrow card. */
.acc-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.acc-field { min-width: 0; }
.acc-field input, .acc-field select {
  font-family: var(--font-body); font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--hairline-2); border-radius: 8px; background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.acc-field input:focus, .acc-field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18,20,25,.08); }
.acc-hint { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--silver); }
.acc-error { color: #b23b3b; font-size: 13.5px; margin: 0; }
.acc-sublabel { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; }
.acc-sublabel span { text-transform: none; letter-spacing: 0; color: var(--silver); font-size: 11.5px; }

/* small / ghost button sizing (builds on main.css .btn) */
.btn--sm { padding: 11px 18px; font-size: 12px; }
.acc-form .btn { align-self: flex-start; }

/* ---- dashboard grid ---- */
.acc-hd { margin-bottom: 26px; }
.acc-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }

/* ---- booking cards ---- */
.acc-bookings { display: flex; flex-direction: column; gap: 16px; }
.bcard { border: 1px solid var(--hairline); border-radius: 10px; padding: 18px; background: var(--surface); }
.bcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bcard__car { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin: 0; }
.bcard__ref { font-size: 11.5px; color: var(--muted); margin: 3px 0 0; }
.bcard__dates { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px 18px; margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.bcard__dates > div, .pcell { display: flex; flex-direction: column; gap: 3px; }
.bcard__dates span, .pcell span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bcard__dates b, .pcell b { font-weight: 600; font-size: 14px; }
.bcard__pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.bcard__pay .pcell:last-child { grid-column: 1 / -1; }
.bcard__note { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.bcard__actions { margin-top: 16px; }

/* journey stepper: Pay fee → Verify → Confirmed */
.bstep { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; padding: 0; }
.bstep__item { display: flex; align-items: flex-start; gap: 8px; position: relative; }
.bstep__item:not(:last-child)::after { content: ""; position: absolute; top: 12px; left: 27px; right: -4px; height: 2px; background: var(--hairline); z-index: 0; }
.bstep__dot { flex: none; width: 26px; height: 26px; border-radius: 100px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; background: var(--paper-2); color: var(--muted); border: 1px solid var(--hairline); position: relative; z-index: 1; }
.bstep__txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; padding-top: 2px; }
.bstep__txt b { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.bstep__txt i { font-family: var(--font-mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-style: normal; margin-top: 3px; }
.bstep__item.is-done .bstep__dot { background: #0a8f5b; color: #fff; border-color: transparent; }
.bstep__item.is-done::after { background: #0a8f5b; }
.bstep__item.is-current .bstep__dot { background: var(--ink); color: #fff; border-color: transparent; box-shadow: 0 0 0 3px rgba(18, 20, 25, .10); }
.bstep__item.is-current .bstep__txt b, .bstep__item.is-current .bstep__txt i { color: var(--ink); }

/* 48-hour hold deadline */
.bhold { margin: 14px 0 0; padding: 11px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.5; background: #fff6ec; color: #9a5a00; border: 1px solid #f4dcc0; }
.bhold time { font-weight: 600; white-space: nowrap; }
.bhold__count { font-weight: 700; }
.bhold__count.is-urgent { color: #b23b3b; }

/* next-step block + single primary action */
.bnext { margin: 16px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--hairline); }
.bnext__text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.bnext__lead { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.bnext .btn { flex: none; white-space: nowrap; }
.bnext--done { background: #e7f7ef; border-color: #c7ecd8; }
.bnext--done .bnext__text { color: #0a6b46; }

/* £50 reservation-fee state explanation (processing-cancelled / refunded) */
.bpaystate { margin: 12px 0 0; padding: 10px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.5; border: 1px solid var(--hairline); }
.bpaystate--info { background: #eef2fb; color: #1a4f9c; border-color: #cfe0fb; }
.bpaystate--warn { background: #fff6ec; color: #9a5a00; border-color: #f4dcc0; }

/* "View full reservation" link on each list card */
.bcard__more { margin: 14px 0 0; font-size: 13px; }
.bcard__more a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---- single-reservation detail page ---- */
.rd { max-width: 720px; margin: 0 auto; }
.rd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.rd-ref { font-size: clamp(24px, 5vw, 34px); margin: 6px 0 2px; }
.rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.rd-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rd-cell span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rd-cell b { font-weight: 600; font-size: 14px; word-break: break-word; }
.rd-h2 { margin: 6px 0 12px; }
.rd-fine { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 12px 0 0; }
.rd-back { margin: 22px 0 0; }
.rd-message .acc-lead { margin: 12px 0 18px; }
@media (max-width: 620px) {
  .rd-grid { grid-template-columns: 1fr; }
  .rd-head { flex-direction: column; }
}

/* brief highlight when a card's action jumps to the verification card */
.acc-flash { animation: accflash 1.6s ease; }
@keyframes accflash { 15% { box-shadow: 0 0 0 3px rgba(18, 20, 25, .18); } 100% { box-shadow: 0 0 0 0 rgba(18, 20, 25, 0); } }

@media (max-width: 620px) {
  .bstep { grid-template-columns: 1fr; gap: 8px; }
  .bstep__item::after { display: none; }
  .bnext { flex-direction: column; align-items: stretch; }
  .bnext .btn { width: 100%; }
}

.pchip { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 100px; font-style: normal; margin-left: 4px; vertical-align: middle; }
.pchip--unpaid { background: #f0f1f4; color: #6a6f7d; }
.pchip--paid, .pchip--released { background: #e7f7ef; color: #0a8f5b; }
.pchip--held { background: #eef0f6; color: #3b3f49; }
.pchip--processing { background: #fff3e0; color: #b26a00; }
.pchip--charged { background: #fdecec; color: #b23b3b; }
/* a refund is neutral/positive, not an error — distinct from 'charged' */
.pchip--refunded { background: #eef2fb; color: #1a5fb4; }

/* lifecycle badge */
.lbadge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border-radius: 100px; white-space: nowrap; }
.lbadge--amber { background: #fff3e0; color: #b26a00; }
.lbadge--blue { background: #e8f0fe; color: #1a5fb4; }
.lbadge--green { background: #e7f7ef; color: #0a8f5b; }
.lbadge--red { background: #fdecec; color: #b23b3b; }
.lbadge--grey { background: #f0f1f4; color: #6a6f7d; }

/* ---- verification ---- */
.vbadge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border-radius: 100px; white-space: nowrap; }
.vbadge--unsubmitted { background: #f0f1f4; color: #6a6f7d; }
.vbadge--pending { background: #fff3e0; color: #b26a00; }
.vbadge--approved { background: #e7f7ef; color: #0a8f5b; }
.vbadge--rejected { background: #fdecec; color: #b23b3b; }

.acc-banner { font-size: 13.5px; line-height: 1.55; padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--hairline); }
.acc-banner--ok { background: #e7f7ef; color: #0a6b46; border-color: #c7ecd8; }
.acc-banner--info { background: #e8f0fe; color: #1a4f9c; border-color: #cfe0fb; }
.acc-banner--warn { background: #fff6ec; color: #9a5a00; border-color: #f4dcc0; }

/* email verification: status chip + prominent banner (with a resend action) */
.acc-emailchip { display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; }
.acc-emailchip--ok { background: #e7f7ef; color: #0a8f5b; }
.acc-emailchip--warn { background: #fff3e0; color: #b26a00; }
.acc-verify-banner { margin: 0 0 22px; }
.acc-verify-banner .acc-banner { margin: 0; }
.acc-verify-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.acc-verify-banner__inner .btn { flex: none; white-space: nowrap; }
@media (max-width: 620px) {
  .acc-verify-banner__inner { flex-direction: column; align-items: flex-start; }
  .acc-verify-banner__inner .btn { width: 100%; }
}

/* account recovery: forgot-password link, change-password block, recovery links */
.acc-forgot { margin: 4px 0 0; font-size: 13px; }
.acc-forgot a, .acc-recovery-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.acc-recovery-links { margin: 18px 0 0; font-size: 13px; }
.acc-sep { border: none; border-top: 1px solid var(--hairline); margin: 22px 0 18px; }
.acc-h3 { font-family: var(--font-display); font-weight: 800; font-size: 15px; margin: 0 0 12px; }

.acc-vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.acc-vgrid > div { display: flex; flex-direction: column; gap: 3px; }
.acc-vgrid span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.acc-vgrid b { font-weight: 600; font-size: 14px; }

.dtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dtile { border: 1px solid var(--hairline-2); border-radius: 9px; padding: 13px; background: var(--surface); display: flex; flex-direction: column; gap: 7px; }
.dtile.is-up { border-color: #c7ecd8; background: #f5fbf8; }
.dtile__hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dtile__hd span { font-weight: 600; font-size: 13px; }
.dtile__req { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: #b26a00; font-style: normal; }
.dtile__opt { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--silver); font-style: normal; }
.dtile__file { font-size: 11px; color: var(--muted); margin: 0; }
.dtile__file a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.dtile__none { font-size: 12px; color: var(--silver); margin: 0; }
.dtile__btn {
  align-self: flex-start; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--hairline-2); border-radius: 7px; padding: 7px 12px;
  transition: border-color .18s ease, background .18s ease;
}
.dtile__btn:hover { border-color: var(--ink); background: var(--paper-2); }

/* ---- toast ---- */
.acc-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 100px;
  font-family: var(--font-mono); font-size: 12.5px; box-shadow: var(--shadow-lg);
}
.acc-toast--err { background: #b23b3b; }

/* ---- Fly Clean requests ---- */
.acc-fc-new { font-size: 13px; font-weight: 600; color: var(--color-accent-strong, #0891a8); white-space: nowrap; }
.acc-fc-new:hover { text-decoration: underline; }
.fccard + .fccard { margin-top: 14px; }
.fccard__hint { font-size: 13px; color: var(--color-muted, #6a6f7d); background: #f0fbfd; border-left: 3px solid #12b5cb; border-radius: 4px; padding: 9px 12px; margin: 10px 0 0; }
.fccard__hint--warn { background: #fdf1ee; border-left-color: #d9765c; }
.fccard .btn { margin-top: 12px; margin-right: 8px; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .acc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .acc-field-row, .bcard__pay, .dtiles, .acc-vgrid { grid-template-columns: 1fr; }
  .bcard__dates { grid-template-columns: 1fr 1fr; }
}
