/* ============================================================
   VidaRent — second-stage components: sign-in form, forms,
   contracts, vehicle page, reminders, toasts, guided tour,
   fuel dial, interior grid.
   ============================================================ */

/* ---------- sign-in ---------- */

.login__form { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.login__form .fl { margin-top: 10px; }
.field--lg { padding: 11px 13px; font-size: 15px; }
.btn--lg { padding: 12px 18px; font-size: 14px; justify-content: center; margin-top: 16px; }

.msg { padding: 10px 14px; font-size: 13px; margin: 6px 0 14px; border: 1px solid var(--g-25); }
.msg--err { border-color: var(--alert); color: var(--alert); background: var(--alert-soft); }

/* ---------- forms ---------- */

.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.form2--inner { gap: 8px; }
.form2 .field, .form3 .field { width: 100%; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline--wrap { flex-wrap: wrap; }
.opt .eq-row { font-size: 13px; }
.field--sm { padding: 4px 8px; font-size: 12.5px; }
.total { border-top: 1px solid var(--g-12); padding-top: 12px; margin-top: 4px; }
.kv--tight { gap: 4px 12px; }
.big { font-size: 18px; }
.savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 14px 0 0; margin-top: 16px; background: linear-gradient(transparent, var(--paper) 40%); }
.lnk { font-size: 12px; color: var(--g-60); text-decoration: none; }
.lnk:hover { color: var(--ink); }
.hint--lock { border: 1px solid var(--alert); color: var(--alert); background: var(--alert-soft); padding: 8px 12px; }
.sub--alert, .alert { color: var(--alert); font-weight: 600; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .form3 { grid-template-columns: 1fr 1fr; } }
.stat[data-goto] { cursor: pointer; }
.stat[data-goto]:hover { border-color: var(--ink); }
.badge--ink { background: var(--paper) !important; color: var(--ink) !important; }
.btn--tut { gap: 6px; }

/* ---------- contract pieces ---------- */

.veh-pick { display: flex; align-items: center; gap: 12px; }
.veh-pick .veh-th { width: 84px; height: 48px; }
.sheetrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--g-12); font-size: 13px; }
.sheetrow:last-child { border-bottom: 0; }
.panel { border: 1px solid var(--g-25); padding: 12px 14px; margin-bottom: 12px; background: var(--g-06); }
.tbl--flat td, .tbl--flat th { padding: 7px 8px; }
.tbl tr.row--on td { background: var(--g-06); }
.eq--cols { columns: 2; column-gap: 24px; }
.eq--cols .eq-row { break-inside: avoid; }
.eq-row--missing span { color: var(--alert); font-weight: 600; }

/* ---------- fuel dial ---------- */

.fuel-wrap { display: flex; justify-content: center; padding: 4px 0; }
.fuel-gauge { display: block; max-width: 100%; height: auto; }
.fuel-gauge--live { cursor: pointer; }
.fuel-gauge--live:hover { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .18)); }

/* ---------- interior grid ---------- */

.int-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px; }
.int-cell { border: 1px solid var(--g-12); padding: 12px; cursor: pointer; }
.int-cell:hover { border-color: var(--g-45); }
.int-cell.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.int-cell__hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.int-cell__hd .pill:last-child { margin-left: auto; }

/* ---------- reminders ---------- */

.rems { display: flex; flex-direction: column; }
.rem { display: flex; align-items: flex-start; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--g-12); }
.rem:last-child { border-bottom: 0; }
.rem .chk { margin-top: 3px; }
.rem__tx { flex: 1; min-width: 0; }
.rem__t { font-size: 13.5px; }
.rem__m { font-size: 11.5px; color: var(--g-60); margin-top: 2px; }
.rem--done .rem__t { text-decoration: line-through; color: var(--g-45); }
.rem--late { box-shadow: inset 3px 0 0 var(--alert); }

/* ---------- toasts ---------- */

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: 380px; }
.toast {
  background: var(--ink); color: var(--paper); padding: 12px 14px; font-size: 13px; line-height: 1.4;
  box-shadow: 0 6px 24px var(--shadow); animation: toast-in .25s ease-out;
}
.toast--out { opacity: 0; transition: opacity .35s; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- guided tour ---------- */

.tour { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: none; }
.tour__ring {
  position: absolute; border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(11, 11, 13, .58), 0 0 0 3px var(--paper), 0 0 0 5px var(--ink);
  transition: left .25s, top .25s, width .25s, height .25s;
}
.tour__tip {
  position: absolute; width: 360px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); padding: 14px 16px; pointer-events: auto;
  box-shadow: 0 10px 30px var(--shadow);
}
.tour__n { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--g-45); font-weight: 700; }
.tour__tx { font-size: 14px; line-height: 1.5; margin: 6px 0 12px; }
.tour__bt { display: flex; gap: 8px; align-items: center; }

/* ---------- help page ---------- */

.help { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help__sec { break-inside: avoid; }
.help__steps { margin: 0; padding: 12px 18px 12px 38px; font-size: 13.5px; line-height: 1.55; }
.help__steps li { margin-bottom: 8px; }
.help__steps li::marker { font-weight: 700; color: var(--g-60); }
@media (max-width: 1100px) { .help { grid-template-columns: 1fr; } }

.msg--ok { border-color: var(--ink); color: var(--ink); background: var(--g-06); font-weight: 600; }
.lnk--btn { background: none; border: 0; padding: 0; margin-top: 14px; cursor: pointer; font-size: 12.5px; color: var(--g-60); text-decoration: underline; align-self: flex-start; }
.lnk--btn:hover { color: var(--ink); }

/* ---------- fleet: status filter ----------
   One row of pills, one per status, each carrying its colour as a dot, the
   written label and the count. The row is sticky, so the filter stays in reach
   while the list scrolls, and it scrolls sideways on a narrow screen rather
   than wrapping or pushing the page wider. */

.fbar {
  position: sticky;
  top: -28px;                      /* the view's own padding, so it pins flush */
  z-index: 5;
  display: flex;
  gap: 8px;
  margin: -28px -28px 16px;
  padding: 28px 28px 14px;
  background: var(--paper);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.fbar::-webkit-scrollbar { display: none; }
.fbar::after {                     /* a hairline that separates it from the list */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--g-12);
}

.fpill {
  --st: var(--ink);
  --st-bg: var(--g-06);
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--g-25);
  border-radius: 999px;
  background: var(--paper);
  color: var(--g-60);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.fpill:hover { border-color: var(--st); color: var(--st); }
.fpill:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fpill__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--st); flex: none;
}
.fpill__n {
  font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--g-45);
  transition: color .18s;
}
.fpill.on {
  background: var(--st-bg);
  border-color: var(--st);
  color: var(--st);
  font-weight: 700;
}
.fpill.on .fpill__n { color: var(--st); }

.fpill--available   { --st: var(--status-available);   --st-bg: var(--status-available-bg); }
.fpill--rented      { --st: var(--status-rented);      --st-bg: var(--status-rented-bg); }
.fpill--pickup_soon { --st: var(--status-pickup-soon); --st-bg: var(--status-pickup-soon-bg); }
.fpill--in_service  { --st: var(--status-service);     --st-bg: var(--status-service-bg); }

/* ---------- fleet cards ----------
   The status colour is the only colour on the card: a 4px edge, a dot in the
   badge and a tinted line saying what happens next. The card itself stays
   paper on ink. */

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.vcard {
  --st: var(--g-45);
  --st-bg: var(--g-06);
  display: flex; flex-direction: column; align-items: stretch;
  border: 1px solid var(--card-line); border-left: 4px solid var(--st);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  background: var(--paper); color: inherit; font: inherit; text-align: left;
  padding: 0; overflow: hidden; cursor: pointer;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.vcard--available   { --st: var(--status-available);   --st-bg: var(--status-available-bg); }
.vcard--rented      { --st: var(--status-rented);      --st-bg: var(--status-rented-bg); }
.vcard--pickup_soon { --st: var(--status-pickup-soon); --st-bg: var(--status-pickup-soon-bg); }
.vcard--in_service  { --st: var(--status-service);     --st-bg: var(--status-service-bg); }

/* the lift is for a mouse; a finger gets no hover state */
@media (hover: hover) and (pointer: fine) {
  .vcard:hover {
    transform: translateY(-2px);
    border-color: var(--g-45); border-left-color: var(--st);
    box-shadow: 0 2px 4px rgba(11, 11, 13, .07), 0 12px 24px rgba(11, 11, 13, .08);
  }
  :root[data-theme="dark"] .vcard:hover { box-shadow: none; border-color: var(--g-45); border-left-color: var(--st); }
}

/* a car photo is a white render, so it keeps a white backdrop; an empty slot
   stays on the page colour */
.vcard__img { aspect-ratio: 16 / 9; background: var(--g-06); overflow: hidden; display: grid; place-items: center; color: var(--g-45); }
.vcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ph-paper); }
.vcard__bd { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; }
.vcard__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vcard__nm { font-weight: 700; font-size: 14.5px; }
.vcard__bd .sub { font-weight: 500; color: var(--g-60); }
.vcard__when {
  display: flex; align-items: center; gap: 6px;
  background: var(--st-bg); color: var(--st);
  border-radius: 6px;
  font-size: 11.5px; font-weight: 700; padding: 4px 8px; margin-top: 3px;
}
.vcard__ft {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 11.5px; font-weight: 500; color: var(--g-60); margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.vcard__ft > * { white-space: nowrap; }
.vcard__ft .fuel i { width: 5px; height: 12px; }
.vcard__ft--pills { justify-content: flex-start; gap: 6px; flex-wrap: wrap; }

/* ---------- status badge ---------- */

.pill--st {
  border-color: var(--st); color: var(--st); background: var(--st-bg);
  font-weight: 700; border-radius: 999px; padding: 3px 9px;
}
.pill--st .dot { background: var(--st); width: 7px; height: 7px; }
.pill--available   { --st: var(--status-available);   --st-bg: var(--status-available-bg); }
.pill--rented      { --st: var(--status-rented);      --st-bg: var(--status-rented-bg); }
.pill--pickup_soon { --st: var(--status-pickup-soon); --st-bg: var(--status-pickup-soon-bg); }
.pill--in_service  { --st: var(--status-service);     --st-bg: var(--status-service-bg); }

/* ---------- document warning chips ---------- */

.dchip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn);
  border-radius: 999px; padding: 2px 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.dchip--out { border-color: var(--alert); background: var(--alert-soft); color: var(--alert); }
/* not an expiry — keep it out of the amber/red vocabulary */
.dchip--mute { border-color: var(--g-25); background: var(--g-06); color: var(--g-60); }
.dchip__n { font-variant-numeric: tabular-nums; }

/* ---------- the bell ---------- */

.btn--bell { position: relative; padding: 5px 9px; }
.btn--bell .badge {
  position: absolute; top: -7px; right: -7px;
  background: var(--alert); color: var(--on-alert);
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 5px; border-radius: 9px; border: 1px solid var(--paper);
}
.lnk--row {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.lnk--row:hover { text-decoration: underline; }
.rem .pill { flex: none; align-self: center; }

.acct-pop__push { border-top: 1px solid var(--g-12); margin-top: 14px; padding-top: 12px; }
.acct-pop__push .hint { margin: 0; font-size: 11.5px; }

/* ---------------- the sync word in the top bar ----------------
   A quiet dot and a few words: what you see is on the server, or not yet. */
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; margin-right: 6px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); opacity: .55; flex: none; }
.sync--saved::before { background: var(--status-available); opacity: 1; }
.sync--saving::before, .sync--pending::before { background: var(--warn); opacity: 1; animation: sync-pulse 1.2s ease-in-out infinite; }
.sync--offline, .sync--error, .sync--rejected, .sync--unauthorized { color: var(--alert); }
.sync--offline::before, .sync--error::before, .sync--rejected::before, .sync--unauthorized::before { background: var(--alert); opacity: 1; }
.sync--idle { display: none; }
@keyframes sync-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }
@media (max-width: 720px) { .sync { font-size: 0; gap: 0; } .sync::before { width: 9px; height: 9px; } }
@media print { .sync { display: none; } }

/* the remember-me line under the password field */
.login__remember { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 13px; color: var(--ink-soft); cursor: pointer; user-select: none; }
.login__remember .chk { flex: none; }
