/* app.css: portal/admin/utility styles (store.css holds the storefront). */
/* ---------- Portal: needs attention ---------- */
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: #f7f7f5; }
.todo b { display: block; font-size: 15px; } .todo p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.todo-dot { width: 10px; height: 10px; border-radius: 50%; background: #0a84ff; }
.todo-urgent .todo-dot { background: #e5484d; } .todo-warn .todo-dot { background: #8e6cf0; }
@media (max-width: 640px) { .todo li { grid-template-columns: auto 1fr; } .todo li .btn-ghost { grid-column: 2; justify-self: start; } }
/* ---------- Admin: search ---------- */
.pn-search { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 0 12px; height: 40px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e2e2df; color: var(--muted); }
.pn-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 14px var(--sans); color: var(--ink); }
.pn-search:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
/* ---------- 404 ---------- */
.nf .nf-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 28px 0 22px; }
/* ---------- Portal/admin on phones: grid children must be allowed to shrink ---------- */
.portal > * { min-width: 0; }
.portal-nav nav { max-width: 100%; }
.panel.flush { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel.flush .tbl { min-width: 560px; }
@media (min-width: 900px) { .panel.flush .tbl { min-width: 0; } }
/* ---------- Admin bar (admin pages use admin/_layout, not the storefront chrome) ---------- */
.adminbar { background: #1d1d1f; color: #f4f4f2; position: sticky; top: 0; z-index: 40; }
.adminbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.adminbar-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; white-space: nowrap; }
.adminbar-brand b { font-weight: 600; font-size: 16px; } .adminbar-brand span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.12); color: #d6d6d3; }
.adminbar-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: #a5a5a2; }
.adminbar-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: #fff; font: 14px var(--sans); }
.adminbar-search input::placeholder { color: #8d8d8a; }
.adminbar-search:focus-within { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.adminbar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.adminbar-actions a { display: flex; align-items: center; gap: 6px; color: #d6d6d3; text-decoration: none; } .adminbar-actions a:hover { color: #fff; }
.adminbar-me { color: #8d8d8a; }
.adminbar-actions button { border: 0; background: rgba(255,255,255,.1); color: #f4f4f2; height: 32px; padding: 0 12px; border-radius: 999px; font: 13px var(--sans); cursor: pointer; }
body.is-admin main.wrap { padding-top: 28px; }
@media (max-width: 760px) {
  .adminbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .adminbar-search { order: 3; flex-basis: 100%; max-width: none; }
  .adminbar-actions span, .adminbar-me { display: none; }
}
/* ---------- Portal: projects ---------- */
.link-code { font: 600 40px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; margin: 4px 0 10px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }
.inline-form input { flex: 1; min-width: 220px; }
/* ---------- View as dealer banner ---------- */
.viewas-bar { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; padding: 10px 12px 10px 16px; border-radius: 14px; background: #1d1d1f; color: #f4f4f2; font: 14px var(--sans); }
.viewas-bar span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewas-bar button { border: 0; border-radius: 999px; height: 34px; padding: 0 16px; background: #fff; color: #1d1d1f; font: 600 13px var(--sans); cursor: pointer; }
.lic-update { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #eef4ff; line-height: 1.45; font-size: 13px; color: #0a5bd3; }
/* ---------- Docs + support ---------- */
.docs .lede, .support-page h1 { max-width: 760px; }
.docs-group { font-size: 22px; margin: 44px 0 14px; }
.docs-grid, .support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.docs-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); color: var(--ink); text-decoration: none; }
.docs-card:hover { box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 30px rgba(0,0,0,.09); }
.docs-card span { color: var(--muted); flex: none; }
.docs-ask { margin-top: 36px; }
.doc .overline a { color: inherit; }
.doc-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 28px; }
.doc-toc { position: sticky; top: 24px; display: grid; gap: 8px; font-size: 14px; }
.doc-toc b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.doc-toc a { color: var(--muted); text-decoration: none; } .doc-toc a:hover { color: var(--ink); }
.doc-body { max-width: 760px; font-size: 16px; line-height: 1.65; }
.doc-body h2 { font-size: 24px; margin: 40px 0 10px; scroll-margin-top: 20px; } .doc-body h3 { font-size: 18px; margin: 26px 0 8px; scroll-margin-top: 20px; } .doc-body h4 { font-size: 16px; margin: 18px 0 6px; }
.doc-body li { margin: 4px 0; }
.doc-body code { font: 14px ui-monospace, "SF Mono", Menlo, monospace; background: #f1f1ee; padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.doc-body pre { background: #1d1d1f; color: #f4f4f2; padding: 16px 18px; border-radius: 14px; overflow-x: auto; }
.doc-body pre code { background: none; padding: 0; color: inherit; }
.doc-table { overflow-x: auto; margin: 14px 0; } .doc-table table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.doc-table th, .doc-table td { text-align: left; padding: 9px 12px; vertical-align: top; } .doc-table tr:nth-child(odd) td { background: #f7f7f5; } .doc-table th { font-weight: 600; }
.support-grid { margin: 26px 0 40px; }
.support-card { display: grid; gap: 8px; align-content: start; text-align: left; padding: 22px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.support-card b { font-size: 18px; } .support-card span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.support-list { display: grid; gap: 10px; padding-left: 20px; max-width: 760px; } .support-list li { line-height: 1.55; }
@media (max-width: 860px) { .doc-wrap { grid-template-columns: 1fr; gap: 16px; } .doc-toc { position: static; } }
.doc-h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; max-width: 900px; }
.doc .lede { max-width: 760px; }
/* ---------- Toggle switches (no native checkboxes) ---------- */
.prefs { display: grid; gap: 10px; max-width: 640px; margin-bottom: 36px; }
.form .switch-row, .switch-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #e8e8e5; cursor: pointer; font-weight: 400 !important; }
.switch-row span { display: grid; gap: 2px; } .switch-row b { font-weight: 600; color: var(--ink); } .switch-row small { color: var(--muted); font-size: 13px; }
.switch-row input.switch { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row i { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: #d4d4d1; transition: background .2s; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-row input.switch:checked + i { background: #1d1d1f; }
.switch-row input.switch:checked + i::after { transform: translateX(18px); }
.switch-row input.switch:focus-visible + i { outline: 2px solid #0a84ff; outline-offset: 2px; }
/* ---------- Print (receipts) ---------- */
.print-only { display: none; }
@media print {
  .topline, .site-header, .footer, .portal-nav, .fx-chat, .no-print, .flash-stack, .viewas-bar, [data-copy-btn] { display: none !important; }
  .print-only { display: block; }
  body, main.wrap { background: #fff !important; }
  .portal { display: block !important; }
  .panel { box-shadow: none !important; border: 1px solid #ddd; }
  a { color: inherit; text-decoration: none; }
}
.receipt-from { font-size: 13px; color: #555; margin: -4px 0 18px; }
.staff-note { padding: 10px 12px; border-radius: 12px; background: #f3effc; font-size: 14px; line-height: 1.5; }
.doc-suggest { padding: 12px 16px; border-radius: 14px; background: #eef4ff; font-size: 14px; }
.doc-suggest ul { margin: 6px 0 0; padding-left: 18px; } .doc-suggest a { color: #0a5bd3; }
/* ---------- Product page: release notes ---------- */
.relnotes { max-width: 820px; margin: 96px auto 0; }
.relnotes h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 18px; }
.relnotes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.relnotes-list li { padding: 16px 18px; border-radius: 16px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05); }
.rn-head { display: flex; align-items: baseline; gap: 12px; } .rn-head b { font-size: 17px; } .rn-head span { color: var(--muted); font-size: 13px; }
.relnotes-list p { margin: 6px 0 0; color: #4a4a4f; font-size: 15px; line-height: 1.55; }
.lic-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 0 14px; height: 44px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e2e2df; color: var(--muted); }
.lic-filter input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: 15px var(--sans); color: var(--ink); }
.lic-filter:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.panel.lic[hidden] { display: none; }
.order-sum { margin: 0 0 12px; font-size: 14px; color: var(--muted); } .order-sum b { color: var(--ink); }
form.filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.hb-mine { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #eef4ff; font-size: 14px; color: #1d1d1f; text-align: center; }
.hb-mine a { color: #0a5bd3; font-weight: 500; }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.portal-head h1 { margin-right: auto; }
.portal-head .btn-ghost { display: inline-flex; align-items: center; gap: 6px; }
.lic-update svg { vertical-align: -2px; margin-right: 4px; }
.lic-update a { font-weight: 500; }
@media (max-width: 560px) {
  .dl .lic-head { flex-wrap: wrap; }
  .dl .lic-head > div { flex: 1; min-width: 0; }
  .dl .lic-head .btn-primary { margin-left: 0; width: 100%; justify-content: center; }
}
.panel.flush .tbl.fit { min-width: 0; }
@media (max-width: 640px) {
  .tbl.fit th, .tbl.fit td { padding-left: 8px; padding-right: 8px; }
  .tbl.fit th:first-child, .tbl.fit td:first-child { padding-left: 16px; }
  .tbl.fit th:last-child, .tbl.fit td:last-child { padding-right: 16px; }
}
.acct-links.split { justify-content: space-between; gap: 10px 20px; }
.nowrap { white-space: nowrap; }
/* Button rows wrap whole buttons, never the words inside them; labels center when a button stretches full width. */
.row-actions { flex-wrap: wrap; }
.row-actions > button, .row-actions > a { white-space: nowrap; }
.btn-ghost, .btn-primary { justify-content: center; }
.promo .btn-ghost { height: 38px; }
@media (max-width: 640px) {
  .promo input { flex: 1; width: auto; min-width: 0; }
  /* iOS zooms the page when a field under 16px gets focus. */
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { font-size: 16px !important; }
}
/* Checkboxes in forms render as toggle switches (no native checkbox visuals). The real input stays for form mechanics. */
.form label.check { align-items: center; }
.form label.check input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; position: relative; flex: none;
  width: 40px; height: 24px; margin: 0; border-radius: 999px; background: #d2d2d0; cursor: pointer;
  transition: background-color .2s ease;
}
.form label.check input[type="checkbox"]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s ease;
}
.form label.check input[type="checkbox"]:checked { background: #1d1d1f; }
.form label.check input[type="checkbox"]:checked::before { transform: translateX(16px); }
.form label.check input[type="checkbox"]:focus-visible { outline: 2px solid #0a5bd3; outline-offset: 2px; }
.legal-note { margin-top: 6px; font-size: 13px; } .legal-note a { color: inherit; text-decoration: underline; }
/* ---------- /drivers catalog ---------- */
.catalog { max-width: 1240px; margin: 0 auto; padding: 56px 24px 96px; font-family: var(--sans); }
.cat-head h1 { font: 600 clamp(34px, 5vw, 52px)/1.05 var(--display, var(--sans)); letter-spacing: -.02em; margin: 6px 0 10px; color: var(--ink); }
.cat-sub { margin: 0; color: #5f646d; font-size: 16px; max-width: 640px; }
.cat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; margin-top: 36px; align-items: start; }
.cat-side { position: sticky; top: 96px; }
.cat-toggle { display: none; }
.cat-group + .cat-group { margin-top: 26px; }
.cat-group h2 { margin: 0 0 8px; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #6e6e73; }
.cat-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-group a, .cat-off { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 15px; color: #1d1d1f; text-decoration: none; }
.cat-group a:hover { background: #f1f1ee; }
.cat-group a.on { background: #1d1d1f; color: #fff; }
.cat-group a span, .cat-off span { font-size: 13px; color: #6e6e73; }
.cat-group a.on span { color: rgba(255, 255, 255, .7); }
.cat-off { color: #8a8a8e; cursor: default; }
.cat-off span { padding: 2px 8px; border-radius: 999px; background: #f1f1ee; font-size: 12px; }
.cat-request { display: block; margin-top: 28px; padding: 14px; border-radius: 14px; background: #f4f4f2; font-size: 14px; color: #4a4a4a; text-decoration: none; line-height: 1.45; }
.cat-request b { color: var(--ink); }
.cat-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cat-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; background: #f4f4f2; color: #6e6e73; }
.cat-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 15px var(--sans); color: var(--ink); outline: none; }
.cat-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6e6e73; }
.cat-sort select { height: 46px; padding: 0 14px; border: 0; border-radius: 999px; background: #f4f4f2; font: 15px var(--sans); color: var(--ink); cursor: pointer; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.cat-chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #eef4ff; color: #0a5bd3; font-size: 14px; text-decoration: none; }
.cat-chips .chip-clear { font-size: 14px; color: #5f646d; }
.cat-grid { margin-top: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-empty { margin-top: 32px; padding: 32px; border-radius: 20px; background: #f4f4f2; }
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .catalog { padding-top: 36px; }
  .cat-layout { grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
  .cat-side { position: static; }
  .cat-filters { border-radius: 16px; background: #f4f4f2; padding: 4px 6px; }
  .cat-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; border: 0; background: none; font: 600 16px var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
  .cat-toggle b { padding: 1px 8px; border-radius: 999px; background: #1d1d1f; color: #fff; font-size: 12px; }
  .cat-body { display: none; padding: 4px 6px 12px; }
  .cat-filters.is-open .cat-body { display: block; }
  .cat-group a:hover { background: #ebebe8; }
}
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } .cat-sort span { display: none; } }
/* Card art titles scale with the card so long names never run into the platform label. */
.card-art { container-type: inline-size; }
.card-logo { padding-bottom: 14px; }
.card-logo strong { font-size: clamp(16px, 6.4cqi, 25px); line-height: 1.12; }
.footer nav a { white-space: nowrap; }
@media (max-width: 560px) { .cat-grid .card-art { aspect-ratio: 1.85; } .cat-grid .card-art small { display: block; } }
.hero-free .hb-add { text-decoration: none; } .hero-free .hb-trust { margin-top: 12px; }
a.bd-add { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.see-all { display: inline-flex; margin-top: 36px; }
.fx-note a { color: inherit; text-decoration: underline; }

.card-art small { color: #5f646d; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.team-invite { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.team-invite input { flex: 1; min-width: 220px; height: 46px; padding: 0 16px; border: 0; border-radius: 999px; background: #f4f4f2; font: 15px var(--sans); }
.team-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.team-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #f7f7f5; }
.team-list li div { display: grid; gap: 2px; min-width: 0; }
.team-list li .muted { font-size: 13px; overflow-wrap: anywhere; }
