/* ============================================================
   Atlas Car Rental — Área do cliente (portal autenticado)
   Reusa os tokens de tokens/colors.css. Mobile-first; inputs 16px
   (anti-zoom iOS). Nada de <select> nativo em filtro (Alpine).
   ============================================================ */

.acc-body { background: var(--color-bg-subtle); min-height: 100vh; min-height: 100dvh; }

/* Atalhos do painel — grid próprio (NÃO usar style inline, que vence o media query). */
.acc-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .acc-shortcuts { grid-template-columns: 1fr; } }

/* ---- Shell / layout ---- */
.acc-shell { max-width: 1080px; margin: 0 auto; padding: 0 20px 64px; }
.acc-head { padding: 28px 0 18px; }
.acc-head__eyebrow {
  font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); font-weight: 700; margin: 0 0 6px;
}
.acc-head__title {
  font-family: var(--font-display, var(--font-sans)); font-weight: 800;
  font-size: clamp(26px, 4vw, 36px); color: var(--text-strong); margin: 0; line-height: 1.05;
}
.acc-head__sub { margin: 8px 0 0; color: var(--text-muted); font-size: 15px; }

/* ---- Sub-nav (tabs) ---- */
.acc-nav {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border); margin: 6px 0 26px; -webkit-overflow-scrolling: touch;
}
.acc-nav::-webkit-scrollbar { display: none; }
.acc-nav a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 14px; font-size: 14.5px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.acc-nav a i { width: 17px; height: 17px; }
.acc-nav a:hover { color: var(--text-strong); }
.acc-nav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---- Cards ---- */
.acc-card {
  background: var(--surface-card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(12,17,25,.04); overflow: hidden;
}
.acc-card + .acc-card { margin-top: 16px; }
.acc-card__pad { padding: 20px; }
.acc-section-h {
  display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text-strong);
  font-size: 15px; margin: 0 0 14px;
}
.acc-section-h i { width: 18px; height: 18px; color: var(--brand); }

/* ---- Reservation card ---- */
.acc-res {
  display: grid; grid-template-columns: 132px 1fr; gap: 0; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface-card);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.acc-res + .acc-res { margin-top: 14px; }
.acc-res:hover { box-shadow: 0 8px 24px rgba(12,17,25,.10); transform: translateY(-1px); border-color: var(--border-strong); }
.acc-res__photo { background: var(--gray-100) center/cover no-repeat; min-height: 116px; }
.acc-res__photo--ph { display: grid; place-items: center; color: var(--gray-400); }
.acc-res__photo--ph i { width: 34px; height: 34px; }
.acc-res__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.acc-res__name { font-weight: 700; font-size: 16px; color: var(--text-strong); margin: 0; }
.acc-res__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-muted); font-size: 13.5px; }
.acc-res__meta span { display: inline-flex; align-items: center; gap: 6px; }
.acc-res__meta i { width: 14px; height: 14px; }
.acc-res__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acc-res__code { font-family: var(--font-mono, monospace); font-size: 12.5px; color: var(--text-muted); }

/* ---- Status badge ---- */
.acc-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; letter-spacing: .01em;
}
.acc-badge i { width: 12px; height: 12px; }
.acc-badge--ok    { background: var(--green-50); color: #0f7a4d; }
.acc-badge--wait  { background: var(--amber-50); color: #9a5b14; }
.acc-badge--info  { background: var(--blue-50); color: #1b4aa0; }
.acc-badge--muted { background: var(--gray-100); color: var(--gray-600); }
.acc-badge--live  { background: var(--brand-tint); color: var(--brand-press); }

/* ---- Detail layout ---- */
.acc-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.acc-hero { position: relative; border-radius: 16px; overflow: hidden; background: var(--gray-900); aspect-ratio: 16/9; }
.acc-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc-hero--ph { display: grid; place-items: center; color: var(--gray-500); }
.acc-hero__tag { position: absolute; left: 14px; top: 14px; }

.acc-kv { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.acc-kv:first-of-type { border-top: 0; }
.acc-kv__ic { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; background: var(--racing-50); color: var(--racing-navy); }
.acc-kv__ic i { width: 18px; height: 18px; }
.acc-kv__k { font-size: 12.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.acc-kv__v { font-size: 15px; color: var(--text-strong); font-weight: 600; margin-top: 2px; }
.acc-kv__v small { display: block; font-weight: 500; color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* ---- Pickup code (lockbox) — destaque ---- */
.acc-pickup {
  border: 1.5px solid var(--racing-300); border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, var(--racing-navy), var(--racing-deep)); color: #fff;
}
.acc-pickup__h { display: flex; align-items: center; gap: 9px; padding: 14px 18px; font-weight: 700; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.acc-pickup__h i { width: 18px; height: 18px; color: var(--gold-400); }
.acc-pickup__body { padding: 18px; }
.acc-pickup__code {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.28);
  border-radius: 12px; padding: 14px 16px;
}
.acc-pickup__digits { font-family: var(--font-mono, monospace); font-size: 28px; font-weight: 700; letter-spacing: .14em; }
.acc-pickup__copy {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 0;
  background: rgba(255,255,255,.14); color: #fff; font-weight: 600; font-size: 13px;
  padding: 8px 12px; border-radius: 9px; transition: background .15s;
}
.acc-pickup__copy:hover { background: rgba(255,255,255,.24); }
.acc-pickup__instr { margin: 14px 0 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.86); white-space: pre-line; }
.acc-pickup__locked { padding: 16px 18px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-muted); background: var(--racing-50); border: 1px dashed var(--racing-300); border-radius: 14px; }
.acc-pickup__locked i { width: 18px; height: 18px; color: var(--racing-navy); flex: 0 0 18px; }

/* ---- Price breakdown ---- */
.acc-bd { display: flex; flex-direction: column; gap: 0; }
.acc-bd__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; color: var(--text-body); }
.acc-bd__row span:last-child { font-family: var(--font-mono, monospace); }
.acc-bd__total { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 800; color: var(--text-strong); font-size: 16px; }

/* ---- Auth card ---- */
.acc-auth-wrap { min-height: calc(100vh - 0px); display: grid; place-items: center; padding: 40px 18px 64px; }
.acc-auth { width: 100%; max-width: 440px; }
.acc-auth__card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 12px 40px rgba(12,17,25,.10); overflow: hidden; }
.acc-auth__top { background: linear-gradient(160deg, var(--racing-navy), var(--racing-deep)); padding: 26px 28px 22px; color: #fff; text-align: center; }
.acc-auth__top img { height: 40px; width: auto; margin: 0 auto 12px; display: block; }
/* color:#fff explícito: base.css tem `h1{color:var(--text-strong)}` (seletor de
   elemento) que venceria a herança branca do .acc-auth__top e deixaria o título
   preto sobre o navy. A regra de classe abaixo tem precedência e corrige. */
.acc-auth__title { font-size: 21px; font-weight: 800; margin: 0; color: #fff; }
.acc-auth__sub { margin: 6px 0 0; font-size: 14px; color: rgba(255,255,255,.78); }
.acc-auth__body { padding: 26px 28px 28px; }
.acc-auth__foot { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--text-muted); }
.acc-auth__foot a { color: var(--brand); font-weight: 600; text-decoration: none; }
.acc-auth__foot a:hover { text-decoration: underline; }
.acc-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-muted); font-size: 12.5px; }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.acc-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 1.5px solid var(--border-strong); background: #fff; color: var(--text-strong);
  font-weight: 600; font-size: 15px; padding: 12px; border-radius: 12px; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.acc-google:hover { background: var(--gray-50); border-color: var(--gray-400); }
.acc-google svg { width: 18px; height: 18px; }

/* ---- Forms ---- */
.acc-field { margin-bottom: 16px; }
.acc-field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
.acc-field input[type=text], .acc-field input[type=email], .acc-field input[type=password],
.acc-field input[type=date], .acc-field input[type=tel], .acc-field select, .acc-input {
  width: 100%; font-size: 16px; /* anti-zoom iOS */ padding: 12px 14px; border: 1.5px solid var(--border-strong);
  border-radius: 11px; background: #fff; color: var(--text-strong); transition: border-color .15s, box-shadow .15s;
  font-family: var(--font-sans, inherit);
}
.acc-field input:focus, .acc-input:focus, .acc-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus-ring); }
.acc-field__err { color: var(--danger); font-size: 12.5px; margin-top: 5px; }
.acc-check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--text-body); cursor: pointer; }
.acc-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); }
.acc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- Buttons (reusa atlas-btn, mas full-width util) ---- */
.acc-submit {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; font-weight: 700; font-size: 15.5px;
  padding: 13px 18px; border-radius: 12px; cursor: pointer; transition: background .15s;
}
.acc-submit:hover { background: var(--brand-hover); }
.acc-submit i { width: 18px; height: 18px; }
.acc-link-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 16px; font-size: 13.5px; }
.acc-link-row a { color: var(--brand); text-decoration: none; font-weight: 600; }

/* ---- Banner ---- */
.acc-banner {
  display: flex; align-items: center; gap: 11px; background: var(--amber-50); border: 1px solid #f1d9ad;
  color: #8a5413; border-radius: 12px; padding: 12px 15px; font-size: 14px; margin-bottom: 18px;
}
.acc-banner i { width: 18px; height: 18px; flex: 0 0 18px; }
.acc-banner form { margin-left: auto; }
.acc-banner button { background: none; border: 0; color: #8a5413; font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 13.5px; }

.acc-flash { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.acc-flash i { width: 18px; height: 18px; flex: 0 0 18px; }
.acc-flash--success { background: var(--green-50); color: #0f7a4d; border: 1px solid #bfe6d2; }
.acc-flash--error { background: var(--red-50); color: var(--red-700); border: 1px solid #f3c6cf; }
.acc-flash--info { background: var(--blue-50); color: #1b4aa0; border: 1px solid #c8dafa; }

/* ---- Empty state ---- */
.acc-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.acc-empty i { width: 40px; height: 40px; color: var(--gray-300); margin-bottom: 12px; }
.acc-empty h3 { color: var(--text-strong); font-size: 17px; margin: 0 0 6px; }
.acc-empty p { margin: 0 0 18px; font-size: 14.5px; }

/* ---- Account menu (header) ---- */
.acc-menu { position: relative; }
.acc-menu__btn {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18); color: #fff; padding: 7px 12px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; cursor: pointer;
}
.acc-menu__btn:hover { background: rgba(255,255,255,.18); }
.acc-menu__av { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.acc-menu__pop {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(12,17,25,.18); min-width: 210px; padding: 8px; z-index: 60;
}
.acc-menu__pop a, .acc-menu__pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px;
  border-radius: 9px; color: var(--text-body); text-decoration: none; font-size: 14px; font-weight: 500;
  background: none; border: 0; cursor: pointer;
}
.acc-menu__pop a:hover, .acc-menu__pop button:hover { background: var(--gray-50); color: var(--text-strong); }
.acc-menu__pop i { width: 16px; height: 16px; color: var(--text-muted); }
.acc-menu__pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* ---- Conversation thread ---- */
.acc-thread { display: flex; flex-direction: column; gap: 10px; }
.acc-msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.acc-msg__role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: 3px; }
.acc-msg--visitor { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.acc-msg--assistant, .acc-msg--human { align-self: flex-start; background: var(--gray-100); color: var(--text-strong); border-bottom-left-radius: 4px; }
.acc-msg__at { font-size: 11px; opacity: .6; margin-top: 4px; }

/* ---- Map ---- */
.acc-map { height: 180px; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.acc-map iframe { width: 100%; height: 100%; border: 0; }

/* ---- Modal (cancel) ---- */
.acc-modal-bg { position: fixed; inset: 0; background: rgba(12,17,25,.55); display: grid; place-items: center; padding: 20px; z-index: 100; overscroll-behavior: contain; }
.acc-modal { background: #fff; border-radius: 18px; max-width: 440px; width: 100%; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.acc-modal__h { padding: 20px 22px 0; font-size: 18px; font-weight: 800; color: var(--text-strong); }
.acc-modal__b { padding: 12px 22px 20px; color: var(--text-body); font-size: 14.5px; line-height: 1.55; }
.acc-modal__f { display: flex; gap: 10px; padding: 0 22px 22px; }
.acc-modal__f button { flex: 1; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .acc-grid { grid-template-columns: 1fr; }
  .acc-res { grid-template-columns: 104px 1fr; }
  .acc-res__photo { min-height: 100%; }
}
@media (max-width: 420px) {
  .acc-res { grid-template-columns: 1fr; }
  .acc-res__photo { aspect-ratio: 16/9; min-height: 0; }
  .acc-pickup__digits { font-size: 23px; }
}
[x-cloak] { display: none !important; }
