/* «Вхід» (/login/) and «Кабінет» (/account/) of E-Car Club (src/account.js, public/js/account.js). Site tokens, .card, .field,
   .seg, .btn, .badge from site.css; .own-head__kicker, .own-empty from owners.css. Phones: one column, tabs scroll sideways. */

/* ---------- sign-in ---------- */
.acc-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(28px, 5vw, 72px); align-items: start; padding-top: clamp(112px, 12vw, 148px); padding-bottom: 96px; }
.acc-auth__intro h1 { margin-top: 8px; font-size: clamp(32px, 4vw, 52px); line-height: 1.1; }
.acc-auth__intro .sec__lead { margin-top: 12px; }
.acc-perks { display: grid; gap: 14px; margin-top: 28px; }
.acc-perks li { display: flex; align-items: flex-start; gap: 14px; }
.acc-perks .i { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.acc-perks b { display: block; }
.acc-perks span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.acc-perks b { color: var(--ink); font-size: 16px; }
.acc-auth__card { display: grid; gap: 16px; }
.acc-auth__t { font-size: 22px; line-height: 1.25; }
.acc-step { display: grid; gap: 16px; }
.acc-muted { color: var(--muted); font-size: 14px; }
.acc-note { margin-top: 6px; color: var(--muted); font-size: 13px; text-align: center; }
.acc-small { justify-self: center; color: var(--graphite); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.acc-small:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.acc-error { margin: 0; }

/* the one tick: a big box, the whole line clickable */
.acc-agree { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 15px; line-height: 1.45; cursor: pointer; }
.acc-agree input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--graphite); cursor: pointer; }
.acc-agree a { text-underline-offset: 3px; }
.acc-agree:has(input:checked) { border-color: var(--graphite); }
.acc-agree.is-invalid { border-color: var(--danger); background: #fdf3f2; }
.acc-ways { display: grid; gap: 12px; transition: opacity 0.2s; }
.acc-ways.is-off .btn { opacity: 0.5; }
.acc-google .i { width: 20px; height: 20px; }

.acc-qr { display: grid; justify-items: center; gap: 8px; margin: 0; }
.acc-qr__img { width: 200px; height: 200px; }
.acc-qr__img svg { display: block; width: 100%; height: 100%; }
.acc-qr figcaption { color: var(--muted); font-size: 14px; }
.acc-wait { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; }
.acc-spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--graphite); border-radius: 50%; animation: acc-spin 0.8s linear infinite; }
@keyframes acc-spin { to { transform: rotate(360deg); } }

/* ---------- the cabinet ---------- */
.acc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: clamp(104px, 11vw, 136px); padding-bottom: 96px; }
.acc-head { display: flex; align-items: center; gap: 18px; }
.acc-head h1 { margin-top: 4px; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; }
.acc-ava { display: grid; flex: none; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--graphite); color: #fff; font-size: 26px; font-weight: 600; }
.acc-ava:empty { background: var(--mist-2); }

.acc-tabs { position: relative; display: flex; gap: 4px; width: max-content; max-width: 100%; padding: 4px; overflow-x: auto; border-radius: 999px; background: var(--mist-2); scrollbar-width: none; }
.acc-tabs::-webkit-scrollbar { display: none; }
.acc-tabs a { flex: none; padding: 9px 18px; border-radius: 999px; color: var(--graphite); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.acc-tabs a:hover { background: rgba(255, 255, 255, 0.6); }
.acc-tabs a[aria-current] { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); font-weight: 600; }

.acc-pane { display: grid; gap: 24px; min-width: 0; }
.acc-loading { color: var(--muted); }
.acc-sec { display: grid; gap: 12px; }
.acc-sec > h2 { font-size: 22px; line-height: 1.25; }
.acc-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.acc-card h2, .acc-card h3 { font-size: 20px; line-height: 1.3; }
.acc-k { color: var(--muted); font-size: 13px; font-weight: 600; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.acc-level, .acc-ref { display: grid; gap: 10px; align-content: start; }
.acc-level { background: var(--ok-bg); border-color: transparent; }
.acc-level .btn { justify-self: start; }
.acc-big { font-size: 34px; font-weight: 700; line-height: 1.1; }
.acc-big span { font-size: 16px; font-weight: 500; }
.acc-bar { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(24, 121, 78, 0.18); }
.acc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.acc-code { padding: 2px 10px; border-radius: 8px; background: var(--mist); font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.04em; white-space: nowrap; }
.acc-copy { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-copy input { flex: 1 1 200px; min-width: 0; height: 38px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--mist); font-size: 14px; }
.acc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.acc-tile { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-md); background: var(--mist); text-decoration: none; }
.acc-tile:hover { background: var(--mist-2); }
.acc-tile b { font-size: 26px; line-height: 1.2; }
.acc-tile span { color: var(--muted); font-size: 14px; }
.acc-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn); }
.acc-empty { display: grid; gap: 14px; justify-items: start; }

.acc-list { display: grid; gap: 10px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-row--wrap { flex-wrap: wrap; justify-content: flex-start; }
.acc-row .badge { flex: none; }
.acc-car { display: grid; gap: 6px; }
.acc-pass { padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.acc-add { display: grid; gap: 14px; max-width: 640px; }
.acc-add .btn { justify-self: start; }
.acc-found { display: grid; gap: 8px; }
.acc-found li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acc-found li:last-child { border-bottom: 0; }

.acc-strip { display: grid; gap: 4px; padding: 20px; border-radius: var(--r-lg); background: var(--ok-bg); }
.acc-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.acc-offers li { display: grid; gap: 8px; align-content: start; }
.acc-offers .btn { justify-self: start; }
.acc-offers select { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 15px; }
.acc-got { padding: 12px; border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.acc-hist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.acc-hist li.is-off { opacity: 0.5; text-decoration: line-through; }
.acc-plus { color: var(--ok); white-space: nowrap; }
.acc-minus { color: var(--danger); white-space: nowrap; }

.acc-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.acc-fav { display: grid; gap: 12px; align-content: start; padding: 0 0 18px; overflow: hidden; }
.acc-fav img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--mist); }
.acc-fav > div { display: grid; gap: 6px; padding-inline: 18px; }
.acc-fav > div:first-child { padding-top: 18px; } /* sold: no photo above */
.acc-fav a { text-decoration: none; }
.acc-fav a:hover { text-decoration: underline; }
.acc-fav .acc-small { justify-self: start; }

.acc-name { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; max-width: 640px; }
.acc-name .field { flex: 1 1 240px; }
.acc-toggle { max-width: 640px; }
.acc-danger { color: var(--danger); }

@media (max-width: 900px) {
  .acc-auth { grid-template-columns: minmax(0, 1fr); }
  .acc-auth__intro .acc-perks { display: none; } /* phones and tablets: straight to the buttons */
}
@media (max-width: 640px) {
  .acc-auth { padding-top: 96px; gap: 20px; }
  .acc-auth__intro .sec__lead { font-size: 15px; }
  .acc-head .acc-ava { width: 52px; height: 52px; font-size: 22px; }
  .acc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-card { padding: 16px; }
  .acc-fav { padding: 0 0 16px; }
  .acc-row:not(.acc-row--wrap) { align-items: flex-start; }
}
