@import url("./theme.css");

:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
html, body { margin: 0; min-height: 100%; }
body { background: #e9e7e3; }
button, input, textarea, select { font: inherit; }
.bv-app {
  --bv-shell-max: 470px;
  min-height: 100vh;
  min-height: 100dvh;
}
.bv-app button { -webkit-tap-highlight-color: transparent; }
.bv-app .bv-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: var(--bv-shell-max);
  min-width: 0;
  margin: 0 auto;
  background: var(--bv-base);
  overflow: hidden;
}
.bv-app .bv-header { flex: none; background: var(--bv-base); }
.bv-app .bv-wordmark { font-size: 1.9rem; font-weight: 780; letter-spacing: -.063em; line-height: 1; }
.bv-app .bv-wordmark span { color: var(--bv-primary); }
.bv-app[data-bv-theme="garage"] .bv-header .bv-wordmark span { color: #e4f77a; }
.bv-app[data-bv-theme="journal"] .bv-wordmark span { color: #d95c31; }
.bv-app .bv-settings {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--bv-line);
  border-radius: 50%;
  background: var(--bv-surface);
  color: var(--bv-ink);
  cursor: pointer;
}
.bv-app .bv-settings svg { width: 22px; height: 22px; }
.bv-app .bv-main { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior-y: contain; }
.bv-app .bv-nav {
  z-index: 2;
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 3px;
  padding: 5px 6px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--bv-line);
  background: var(--bv-surface);
}
.bv-app .bv-nav [data-tab] {
  appearance: none;
  position: relative;
  min-height: 55px; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 3px; padding: 5px 2px;
  border: 0; border-radius: var(--bv-button-radius);
  background: transparent; color: var(--bv-muted);
  font-size: .8rem; font-weight: 530; line-height: 1.2;
  cursor: pointer;
}
.bv-app .bv-nav svg { width: 22px; height: 22px; }
.bv-app .bv-nav [aria-current="page"] { color: var(--bv-primary); font-weight: 710; }
.bv-app[data-bv-theme="lilac"] .bv-nav [aria-current="page"] { background: var(--bv-primary); color: #fff; }
.bv-app[data-bv-theme="garage"] .bv-nav [aria-current="page"]::before,
.bv-app[data-bv-theme="journal"] .bv-nav [aria-current="page"]::after {
  content: ""; position: absolute; width: 36px; height: 3px; border-radius: 3px; background: var(--bv-primary);
}
.bv-app[data-bv-theme="garage"] .bv-nav [aria-current="page"]::before { top: -5px; }
.bv-app[data-bv-theme="journal"] .bv-nav [aria-current="page"]::after { bottom: 0; background: var(--bv-accent); }
.bv-app button.bv-hero {
  display: block; align-self: stretch; border: 0; padding: 0;
  background: var(--bv-tint); color: var(--bv-ink); text-align: start; cursor: pointer;
}
.bv-app .bv-vehicle-title { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.bv-app .bv-vehicle-title > strong { font-size: clamp(1.8rem, 7.3vw, 2.65rem); line-height: 1.06; letter-spacing: -.058em; overflow-wrap: anywhere; }
.bv-app .bv-vehicle-title > small { font-size: .95rem; line-height: 1.34; }
.bv-app .bv-hero-link { font-size: .83rem; font-weight: 620; }
.bv-app .bv-identity .bv-vehicle-title {
  top: 18px; bottom: auto; inset-inline: 16px; padding: 0; color: inherit; background: transparent;
}
.bv-app .bv-identity { background: radial-gradient(ellipse at 90% 92%,#cda7e8 0,transparent 53%),linear-gradient(135deg,#f7edfd,#e8d6f9); }
.bv-app[data-bv-theme="garage"] button.bv-identity { background: linear-gradient(155deg,#232c96,#3543c2); color: #fff; }
.bv-app[data-bv-theme="journal"] button.bv-identity { background: linear-gradient(130deg,#183e3e,#0a292b); color: #fff; }
.bv-app .bv-hero:focus-visible { outline-offset: -4px; }
.bv-login {
  min-height: 100vh; min-height: 100dvh;
  display: grid; align-content: center; justify-items: center;
  padding: max(20px,env(safe-area-inset-top)) 14px max(24px,env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 90% 0%,#e9d7f6,transparent 60%),#f5f0f7;
}
.bv-login-card {
  position: relative; width: min(100%, 408px); overflow: hidden;
  border: 1px solid #ded1e8; border-radius: 25px;
  background: #fdfafd; padding: 28px 24px 24px; color: #301335;
  box-shadow: 0 16px 52px -31px #3a185450;
}
.bv-login-card .bv-wordmark {
  display: flex; align-items: flex-start; position: relative;
  height: 142px; margin: -28px -24px 22px; padding: 26px 24px;
  border-radius: 0; color: #351641;
  background: radial-gradient(ellipse at 95% 64%,#d1a8ef,transparent 63%),linear-gradient(145deg,#f1e6fb,#deccf4);
}
.bv-login-card .bv-wordmark::after {
  content: ""; position: absolute; right: 30px; top: 11px; width: 93px; height: 122px;
  background: url("./assets/garage-key.png") center / 100% 100% no-repeat;
  clip-path: polygon(65% 0,72% 0,79% 4%,84% 9%,86% 17%,85% 23%,81% 29%,86% 33%,92% 38%,95% 44%,95% 52%,77% 100%,22% 100%,13% 96%,9% 90%,9% 81%,24% 48%,32% 35%,40% 28%,48% 25%,47% 20%,46% 14%,49% 8%,55% 3%);
}
.bv-login-card h1 { margin: 0; max-width: 13ch; font-size: clamp(1.8rem,7.8vw,2.4rem); line-height: 1.08; letter-spacing: -.052em; }
.bv-login-card > p { color: #67576f; margin: 12px 0 20px; }
.bv-login-card > .bv-primary { display: block; width: 100%; }
.bv-login-card details { margin-top: 10px; }
.bv-login-card summary { min-height: 44px; padding: 10px 0; color: var(--bv-primary); font-weight: 620; cursor: pointer; }
.bv-login-card .bv-auth-link { display: inline-block; padding-block: 9px; color: var(--bv-primary); font-size: .9rem; text-underline-offset: 3px; }
.bv-login-card .bv-auth-help { margin-top: 12px; border-top: 1px solid var(--bv-line); padding-top: 15px; font-size: .94rem; }
.bv-login-card .bv-auth-help p { margin: 6px 0 0; line-height: 1.45; }
.bv-app dialog.bv-panel {
  width: min(100%, var(--bv-shell-max)); max-width: 100vw; max-height: calc(96vh - env(safe-area-inset-top));
  max-height: calc(96dvh - env(safe-area-inset-top));
  inset: auto 0 0; margin: 0 auto; padding: 0;
  border: 1px solid var(--bv-line); border-bottom: 0;
  border-radius: 22px 22px 0 0; color: var(--bv-ink); background: var(--bv-base);
}
.bv-app dialog.bv-panel[open] { display: flex; flex-direction: column; }
.bv-app dialog.bv-panel::backdrop { background: rgba(19, 19, 27, .44); }
.bv-app .bv-panel-head {
  display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--bv-line);
}
.bv-app .bv-panel-head :is(h1,h2,h3) { margin: 0; font-size: 1.35rem; letter-spacing: -.04em; }
.bv-app .bv-panel-head button {
  display: grid; place-items: center; min-width: 42px; min-height: 42px; border: 0; border-radius: 50%;
  color: var(--bv-ink); background: var(--bv-tint); font-size: 1.2rem; cursor: pointer;
}
.bv-app .bv-panel-body {
  min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; display: flex; flex-direction: column; gap: 14px;
  padding: 16px 16px max(22px,env(safe-area-inset-bottom));
}
.bv-app .bv-panel-body > * { flex: none; min-width: 0; }
.bv-app .bv-form { display: grid; gap: 13px; }
.bv-app .bv-form :is(h2,h3,p) { margin: 0; }
.bv-app .bv-form > label, .bv-app .bv-form fieldset > label { display: grid; gap: 4px; font-size: .9rem; font-weight: 560; }
.bv-app .bv-form fieldset { min-width: 0; border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.bv-app .bv-form fieldset legend { margin-bottom: 6px; font-weight: 650; }
.bv-app .bv-form :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]) {
  width: 100%; min-width: 0; min-height: 47px; border: 1px solid var(--bv-line); border-radius: var(--bv-button-radius);
  padding: 10px 12px; background: var(--bv-surface); color: var(--bv-ink); font-size: 1rem; font-weight: 450;
}
.bv-app .bv-form :is(input[type="checkbox"],input[type="radio"]) { width: 20px; height: 20px; }
.bv-app .bv-error {
  padding: 9px 12px; border-inline-start: 3px solid #b33e47; border-radius: 5px;
  background: #fff0ee; color: #79272c; font-size: .91rem; overflow-wrap: anywhere;
}
.bv-app .bv-error:empty { display: none; }
.bv-app .bv-placeholder { padding: 22px 16px; color: var(--bv-muted); }
@media (min-width: 621px) {
  .bv-app { background: radial-gradient(ellipse at 65% 10%,#f8f7f2,#e9e7e3); }
  .bv-app .bv-shell { border-inline: 1px solid #c9c5bd; box-shadow: 0 0 65px -22px #25272a33; }
  .bv-app dialog.bv-panel { bottom: 12px; max-height: calc(100dvh - 28px); border: 1px solid var(--bv-line); border-radius: 20px; }
}
@media (max-width: 360px) {
  .bv-app .bv-flow { padding-inline: 12px; gap: 13px; }
  .bv-app .bv-flow > .bv-hero { margin-inline: -12px; }
  .bv-app .bv-metrics > * { padding-inline: 5px; }
  .bv-app .bv-nav [data-tab] { min-height: 49px; font-size: .75rem; }
}
@media (max-height: 700px) {
  .bv-login-card .bv-wordmark { height: 106px; margin-bottom: 16px; }
  .bv-login-card .bv-wordmark::after { width: 67px; height: 87px; top: 8px; }
}

.bv-app [hidden] { display: none !important; }
.bv-app .bv-accent-panel h2, .bv-app .bv-accent-panel p { margin: 0; }
.bv-app .bv-accent-panel h2 { font-size: 1.2rem; line-height: 1.2; margin-bottom: 5px; }
.bv-app .bv-empty { margin: 0; }
.bv-app .bv-chevron { color: var(--bv-muted); font-size: 1.1rem; }
.bv-app .bv-field-grid > button { grid-column: 1 / -1; }
.bv-app .bv-flow > section.bv-panel:first-child { margin-top: 6px; }
.bv-app .bv-flow[data-screen="service"] .bv-meter { position: relative; isolation: isolate; min-height: 166px; }
.bv-app[data-bv-theme="lilac"] .bv-flow[data-screen="service"] .bv-meter {
  padding-right: 92px; background: linear-gradient(100deg,#e2cdf6,#eedffb);
}
.bv-app[data-bv-theme="lilac"] .bv-flow[data-screen="service"] .bv-meter::after {
  content: ""; position: absolute; width: 74px; height: 96px; right: 7px; top: calc(50% - 48px);
  background: url("./assets/garage-key.png") center / 100% 100% no-repeat;
  clip-path: polygon(65% 0,72% 0,79% 4%,84% 9%,86% 17%,85% 23%,81% 29%,86% 33%,92% 38%,95% 44%,95% 52%,77% 100%,22% 100%,13% 96%,9% 90%,9% 81%,24% 48%,32% 35%,40% 28%,48% 25%,47% 20%,46% 14%,49% 8%,55% 3%);
}
.bv-app[data-bv-theme="garage"] .bv-flow[data-screen="service"] .bv-meter { min-height: 187px; }
.bv-app[data-bv-theme="garage"] .bv-flow[data-screen="service"] .bv-meter::after {
  content: ""; width: 100%; height: 8px; margin-top: 10px;
  background: repeating-linear-gradient(90deg,#e6e7ff 0 1px,transparent 1px 12px); opacity: .85;
}
.bv-app[data-bv-theme="journal"] .bv-flow[data-screen="service"] .bv-meter {
  padding-inline-start: calc(39% + 15px); color: var(--bv-ink); background: transparent;
  min-height: 164px; border-radius: 0; border-bottom: 1px solid var(--bv-line);
}
.bv-app[data-bv-theme="journal"] .bv-flow[data-screen="service"] .bv-meter::before {
  content: ""; position: absolute; inset: 6px auto 9px 0; width: 36%;
  background: url("./assets/service-book.png") left center / contain no-repeat;
}
.bv-app[data-bv-theme="journal"] .bv-meter h2 { font-size: 1.55rem; font-weight: 730; line-height: 1.12; overflow-wrap: anywhere; }
.bv-app[data-bv-theme="journal"] .bv-flow[data-screen="service"] .bv-total { font-size: clamp(1.35rem,5.1vw,2rem); }
.bv-app[data-bv-theme="lilac"] .bv-flow[data-screen="expenses"] .bv-meter {
  text-align: center; color: var(--bv-on-highlight); background: var(--bv-highlight);
}
.bv-app[data-bv-theme="garage"] .bv-flow[data-screen="expenses"] .bv-meter {
  min-height: 152px; margin-bottom: 4px; background: var(--bv-surface); color: var(--bv-ink);
  border-bottom: 2px dashed #c5c6ce; box-shadow: 0 7px 10px -8px #1b1c25;
}
.bv-app[data-bv-theme="journal"] .bv-flow[data-screen="expenses"] .bv-meter::after {
  content: ""; width: 36px; height: 4px; border-radius: 3px; background: var(--bv-accent); margin-top: 6px;
}
.bv-app .live-form, .bv-app .live-form fieldset, .bv-app .live-form [data-repair-work] { display: grid; min-width: 0; gap: 12px; }
.bv-app .live-form fieldset { margin: 0; padding: 0; border: 0; }
.bv-app .live-form :is(.card,.field), .bv-app .bv-panel-body .card { display: grid; gap: 6px; min-width: 0; }
.bv-app .bv-panel-body .card { padding: 13px; border-radius: var(--bv-radius); background: var(--bv-surface); }
.bv-app .live-form .field > span { font-size: .9rem; font-weight: 570; }
.bv-app .live-form .field :is(input,select,textarea) {
  width: 100%; min-width: 0; max-width: 100%; padding: 10px 12px; min-height: 46px;
  border: 1px solid var(--bv-line); border-radius: var(--bv-button-radius);
  background: var(--bv-surface); color: var(--bv-ink); font-size: 1rem;
}
.bv-app .bv-panel-body .row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0;
  border-bottom: 1px solid var(--bv-line); padding-block: 10px; overflow-wrap: anywhere;
}
.bv-app .bv-panel-body .row > :last-child { min-width: 0; text-align: end; }
.bv-app .bv-panel-body .primary, .bv-app .bv-panel-body .secondary {
  border: 0; border-radius: var(--bv-button-radius); min-height: 46px; cursor: pointer;
  padding: 11px 13px; font: inherit; font-weight: 660; color: var(--bv-on-primary); background: var(--bv-primary);
}
.bv-app .bv-panel-body .secondary { color: var(--bv-ink); background: var(--bv-tint); }
.bv-app .bv-panel-body :is(.primary,.secondary):disabled { cursor: default; opacity: .55; }
.bv-app .bv-shell { position: relative; }
.bv-app .bv-toast {
  position: absolute; z-index: 3; inset: auto 14px calc(75px + env(safe-area-inset-bottom)) 14px;
  padding: 11px 14px; border-radius: var(--bv-button-radius);
  background: var(--bv-ink); color: var(--bv-base); box-shadow: 0 5px 22px #0002;
}
.bv-app a.bv-secondary { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
@supports not (aspect-ratio: 1 / 1) {
  .bv-app button.bv-hero { height: min(73.33vw,345px); }
  .bv-app[data-bv-theme="garage"] button.bv-hero { height: min(77.95vw,366px); }
  .bv-app[data-bv-theme="journal"] button.bv-hero { height: min(63.85vw,300px); }
}
@media (max-width: 352px) {
  .bv-app[data-bv-theme="lilac"] .bv-flow[data-screen="service"] .bv-meter { padding-right: 70px; }
  .bv-app[data-bv-theme="lilac"] .bv-flow[data-screen="service"] .bv-meter::after { width: 55px; height: 72px; top: calc(50% - 36px); }
}

.bv-app .bv-sandbox-tag {
  margin-inline-start: auto; padding: 3px 9px; border: 1px solid currentColor; border-radius: 24px;
  color: var(--bv-muted); font-size: .72rem; line-height: 1.4; font-weight: 650; white-space: nowrap;
}
.bv-app[data-bv-theme="garage"] .bv-sandbox-tag { color: #e5e6ff; }
.bv-app .bv-car-option { display: flex; gap: 7px; align-items: stretch; }
.bv-app .bv-car-option > .bv-secondary { flex: 1; text-align: start; }
.bv-app .bv-car-option > .bv-inline-link { padding-inline: 6px; }
.bv-app .bv-car-option > :disabled { opacity: .85; }
.bv-app .bv-hero.bv-x1 { background-color: var(--bv-tint); background-repeat: no-repeat; }
.bv-app[data-bv-theme="lilac"] .bv-x1 {
  background-image: url('./assets/lilac-x1.webp'); background-size: cover; background-position: center 65%;
}
.bv-app[data-bv-theme="lilac"] .bv-x1 .bv-vehicle-title { inset: 12px 16px auto; }
.bv-app[data-bv-theme="garage"] .bv-x1 {
  background-color: #2439ad; color: #fff; background-image: url('./assets/garage-x1.webp');
  background-size: auto 100%; background-position: right 8% center;
}
.bv-app[data-bv-theme="garage"] .bv-x1 .bv-vehicle-title { inset: 0 auto 0 16px; width: 47%; justify-content: center; }
.bv-app[data-bv-theme="garage"] .bv-x1 .bv-vehicle-title strong { font-size: clamp(2.7rem,12vw,4.4rem); font-weight: 800; line-height: .94; margin-bottom: 5px; }
.bv-app[data-bv-theme="journal"] .bv-x1 { background-image: url('./assets/journal-x1.webp'); background-size: cover; background-position: center 60%; }

.bv-app .bv-onboard {overflow:hidden;background:var(--bv-surface);border:1px solid var(--bv-line);border-radius:var(--bv-radius);}
.bv-app .bv-onboard-art {height:clamp(118px,23vh,190px);background:var(--bv-tint) url("./assets/garage-key.png") center / auto 78% no-repeat;}
.bv-app[data-bv-theme="journal"] .bv-onboard-art {background-image:url("./assets/service-book.png");}
.bv-app .bv-onboard-body {display:grid;gap:14px;padding:20px;}
.bv-app .bv-onboard-body h2 {margin:0;font-size:1.6rem;line-height:1.08;}
.bv-app .bv-onboard-body p {margin:0;color:var(--bv-muted);line-height:1.5;}
.bv-app .bv-crm-actions {display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;margin-top:6px;}
.bv-app .bv-crm-actions > button {max-width:100%;}
.bv-app [data-workshop-ids] summary {padding:8px 0;color:var(--bv-primary);cursor:pointer;}
.bv-app [data-workshop-ids] .field {margin:10px 0;}
.bv-app .bv-connection-ids {display:grid;gap:12px;margin:0;overflow-wrap:anywhere;}
.bv-app .bv-connection-ids dt {font-size:.86rem;color:var(--bv-muted);}
.bv-app .bv-connection-ids dd {margin:3px 0 0;font-weight:600;}
/* api.book.vin web: sign-in and account controls */
.bv-login-card .live-form { margin-top: 18px; }
.bv-login-card .live-form .bv-primary { width: 100%; }
.bv-login-card button.bv-auth-link { border: 0; background: none; padding-inline: 0; margin-right: 14px; cursor: pointer; font: inherit; font-size: .9rem; text-decoration: underline; }
.bv-app .bv-account { margin: 14px 0 0; color: var(--bv-muted); font-size: .9rem; overflow-wrap: anywhere; }
.bv-app .bv-row-end { white-space: nowrap; }
