:root {
  --surface: #111315;
  --surface-raised: #1b1f23;
  --panel: #f6f7f8;
  --panel-warm: #f8f8f6;
  --text-primary: #f7f8fa;
  --text-body: #20242a;
  --muted: #68717d;
  --line: #d8dee6;
  --accent: #f5b301;
  --danger: #c7352d;
  --success: #2e7d4f;
  --tenant-accent: #d82027;
  --tenant-secondary: #f5b301;
  --tenant-panel: #f8f8f6;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--surface);
  color: var(--text-body);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 3vw, 36px);
  background: rgba(17, 19, 21, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.brand-cluster,
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
}

.brand-cluster {
  gap: 8px;
}

.brand {
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  background: #24282d;
  color: var(--accent);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  color: #bcc5ce;
  font-size: 12px;
}

.help-doc-link {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid rgba(245, 179, 1, 0.9);
  border-radius: 999px;
  background: #24282d;
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.help-doc-link:hover,
.help-doc-link:focus-visible {
  background: var(--accent);
  color: #111315;
  outline: 0;
}

.topbar-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.context-select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bcc5ce;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.context-select-label select,
.context-button {
  width: auto;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #252a30;
  color: #eef2f6;
  font-size: 12px;
  font-weight: 800;
}

.context-button {
  padding: 8px 12px;
}

.account-menu-wrap {
  position: relative;
}

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #252a30;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.account-avatar::-webkit-details-marker {
  display: none;
}

.account-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text-body);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.account-menu-header {
  display: grid;
  gap: 3px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.account-menu-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.account-menu button {
  min-height: 38px;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-body);
  font-weight: 800;
  text-align: left;
}

.account-menu button:hover {
  background: #eef1f4;
}

.context-pill,
.count-pill,
.shop-badge,
.status,
.context-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #eef2f6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.main-stage {
  min-width: 0;
  background: var(--tenant-page-background, var(--panel));
}

.front-door {
  min-height: calc(100vh - 112px);
  background: var(--panel);
  color: var(--text-body);
}

.landing-hero {
  min-height: min(760px, calc(100vh - 112px));
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 420px);
  gap: clamp(18px, 4vw, 56px);
  align-items: end;
  padding: clamp(22px, 5vw, 72px) clamp(18px, 5vw, 72px) clamp(38px, 6vw, 88px);
  background:
    linear-gradient(90deg, rgba(10, 12, 14, 0.96) 0%, rgba(10, 12, 14, 0.82) 44%, rgba(10, 12, 14, 0.36) 74%, rgba(10, 12, 14, 0.72) 100%),
    url("../assets/garage-service-bay.png") center / cover no-repeat;
  color: var(--text-primary);
}

.landing-page {
  display: grid;
}

.landing-copy {
  max-width: 820px;
}

.landing-copy h1 {
  max-width: 780px;
}

.landing-copy p {
  max-width: 720px;
}

.landing-route-stack {
  display: grid;
  gap: 10px;
  align-self: end;
}

.route-tile {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 86px;
  justify-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-align: left;
  text-decoration: none;
}

.route-tile span {
  color: #f5b301;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.route-tile strong {
  overflow-wrap: anywhere;
}

.landing-offer-band,
.landing-request-band {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 0;
}

.landing-request-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(320px, 1fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: start;
}

.landing-request-copy {
  position: sticky;
  top: 18px;
}

.landing-request-copy h2 {
  color: var(--text-body);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.landing-request-copy p {
  color: var(--muted);
}

.landing-request-panel {
  min-width: 0;
}

.entry-panel {
  max-width: 720px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--tenant-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: 0;
}

p {
  color: inherit;
  line-height: 1.6;
}

.entry-panel p {
  max-width: 620px;
  color: #d8dee6;
  font-size: 18px;
}

.entry-actions,
.panel-title,
.role-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.danger-action,
.quiet-action,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  background: var(--tenant-accent);
  color: white;
}

.secondary-action {
  background: var(--surface-raised);
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
}

.danger-action {
  background: #fff4f3;
  border-color: rgba(199, 53, 45, 0.35);
  color: var(--danger);
}

.quiet-action {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text-primary);
}

.icon-button {
  min-width: 44px;
  padding: 8px 10px;
  background: #252a30;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  font-size: 12px;
}

.full {
  width: 100%;
  justify-content: center;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.entry-grid article,
.shop-preview,
.work-surface,
.auth-card,
.vehicle-card,
.vehicle-content-panel,
.timeline-panel,
.audit-panel,
.queue-panel,
.invite-panel,
.context-card,
.work-card {
  border: 1px solid var(--line);
  background: white;
}

.entry-grid article {
  min-height: 116px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.entry-grid strong,
.entry-grid span {
  display: block;
}

.entry-grid strong {
  margin-bottom: 8px;
  color: white;
}

.entry-grid span {
  color: #c7d0da;
  font-size: 13px;
  line-height: 1.45;
}

.offer-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.offer-grid article {
  min-height: 150px;
  background: white;
  border-color: var(--line);
}

.offer-grid strong {
  color: var(--text-body);
}

.offer-grid span {
  color: var(--muted);
}

.subscription-request-form {
  margin: 0;
}

.request-feature-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
}

.request-feature-fieldset legend {
  padding: 0 6px;
  color: var(--text-body);
  font-weight: 900;
}

.shop-preview {
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: 12px 28px 28px;
  background: rgba(248, 248, 246, 0.86);
  color: var(--text-body);
  border-color: rgba(255, 255, 255, 0.24);
}

.shop-preview h2 {
  font-size: 42px;
}

.shop-preview p {
  color: #49525d;
}

.shop-preview ul,
.audit-panel ul,
.permission-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.shop-badge,
.context-type,
.count-pill,
.status {
  width: fit-content;
  background: #eef1f4;
  border-color: var(--line);
  color: #303741;
}

.status.success {
  color: var(--success);
}

.work-surface,
.dashboard-grid,
.shop-dashboard {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px) 0;
}

.work-surface {
  min-height: calc(100vh - 112px);
  display: block;
  background: transparent;
  border: 0;
}

.work-surface.narrow {
  width: min(780px, calc(100% - 32px));
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h1 {
  color: var(--text-body);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.section-heading p {
  max-width: 720px;
  color: var(--muted);
}

.context-grid,
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.vehicle-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.vehicle-tab {
  min-width: min(260px, 80vw);
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-bottom: 4px solid transparent;
  background: #eef1f4;
  color: var(--text-body);
  text-align: left;
}

.vehicle-tab strong,
.vehicle-tab span {
  overflow-wrap: anywhere;
}

.vehicle-tab span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.vehicle-tab.active {
  border-color: var(--tenant-accent);
  border-bottom-color: var(--tenant-accent);
  background: #fff;
}

.vehicle-content-panel {
  padding: 20px;
  background: white;
}

.car-page-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.car-page-tab {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #eef1f4;
  color: var(--text-body);
  font-weight: 800;
}

.car-page-tab.active {
  background: var(--tenant-accent);
  border-color: var(--tenant-accent);
  color: white;
}

.disabled-tab {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.vehicle-tab-content {
  display: grid;
  gap: 16px;
}

.details-tab-layout {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
}

.vehicle-detail-section {
  min-width: 0;
}

.vin-detail-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.custom-detail-form {
  margin-top: 14px;
}

.context-card,
.vehicle-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.vehicle-card {
  gap: 16px;
}

.vehicle-image {
  width: 100%;
  min-height: 190px;
  margin: 0;
  overflow: hidden;
  background: #e7ebef;
  border: 1px solid var(--line);
}

.vehicle-image img {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.vehicle-image figcaption {
  padding: 8px 10px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.vehicle-image figcaption a {
  color: inherit;
}

.vehicle-image-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.role-row {
  min-height: 36px;
  color: var(--muted);
}

.form-grid,
.form-stack {
  display: grid;
  gap: 14px;
}

.auth-card {
  margin-top: clamp(24px, 5vw, 72px);
  padding: clamp(22px, 4vw, 36px);
  background: white;
}

.auth-card h1 {
  color: var(--text-body);
  font-size: clamp(32px, 5vw, 58px);
}

.auth-card p {
  color: var(--muted);
}

.demo-credentials {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin-top: 18px;
  padding: 14px;
  background: #f2f4f6;
  border: 1px solid var(--line);
}

.demo-credentials span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.demo-login-card {
  min-height: 78px;
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-body);
  text-align: left;
}

.demo-login-card strong,
.demo-login-card span {
  overflow-wrap: anywhere;
}

.demo-login-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.error-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 4px solid var(--danger);
  background: #fff1f0;
  color: #8c201a;
  font-weight: 800;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
}

.form-grid button {
  grid-column: 1 / -1;
}

.vehicle-form .form-actions {
  grid-column: 1 / -1;
}

.shop-profile-form .wide-field,
.shop-profile-form .form-actions {
  grid-column: 1 / -1;
}

.shop-profile-form input[type="color"] {
  min-height: 48px;
  padding: 4px;
}

.logto-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.logto-account-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

label {
  display: grid;
  gap: 8px;
  color: #49525d;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: white;
  color: var(--text-body);
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: white;
  color: var(--text-body);
}

select {
  min-height: 44px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input[type="file"] {
  padding: 9px 10px;
  background: #f8fafb;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.dashboard-title,
.panel-span {
  grid-column: 1 / -1;
}

.panel-title {
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title h2 {
  margin: 0;
}

.vehicle-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.vehicle-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-card dd {
  margin: 4px 0 0;
}

.timeline-panel,
.audit-panel,
.queue-panel,
.invite-panel {
  padding: 20px;
}

.timeline-list,
.work-list {
  display: grid;
  gap: 10px;
}

.timeline-event {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.timeline-event:first-child {
  border-top: 0;
}

.timeline-event time {
  color: var(--muted);
  font-weight: 800;
}

.timeline-event h3,
.work-card h3 {
  margin-bottom: 4px;
}

.timeline-event p,
.work-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.audit-panel {
  align-self: start;
  background: #fbfbfa;
}

.shop-dashboard {
  width: min(1240px, calc(100% - 32px));
}

.shop-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(12, 14, 16, 0.92), rgba(12, 14, 16, 0.74)),
    var(--tenant-hero-image) center / cover no-repeat,
    var(--surface);
  color: var(--text-primary);
}

.shop-header h1 {
  margin-bottom: 8px;
  font-size: clamp(36px, 5vw, 70px);
}

.shop-header p {
  margin: 0;
  color: #ccd4dc;
}

.shop-contact-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.shop-contact-line span,
.shop-contact-line a {
  color: #ccd4dc;
  overflow-wrap: anywhere;
}

.shop-header-actions {
  margin-top: 18px;
}

.role-badge {
  min-width: 220px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  background: var(--tenant-accent);
  color: white;
}

.role-badge span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.role-badge strong {
  font-size: 22px;
}

.service-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.service-strip button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-body);
  font-weight: 800;
  font-size: 12px;
  text-align: left;
}

.service-strip button:hover,
.service-strip button:focus-visible {
  border-color: var(--tenant-accent);
  color: var(--tenant-accent);
}

.shop-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.garage-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.garage-sidebar {
  position: sticky;
  top: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
}

.garage-nav {
  display: grid;
  gap: 6px;
}

.garage-nav button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-body);
  font-weight: 900;
  text-align: left;
}

.garage-nav button:hover,
.garage-nav button:focus-visible,
.garage-nav button.active {
  border-color: var(--tenant-accent);
  background: color-mix(in srgb, var(--tenant-accent) 12%, white);
  color: var(--tenant-accent);
}

.garage-content {
  min-width: 0;
}

.garage-section {
  display: grid;
  gap: 16px;
}

.compact-heading {
  margin-bottom: 0;
}

.compact-heading h2 {
  margin: 0;
  font-size: 28px;
}

.garage-stat-grid,
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.garage-stat-grid article,
.inventory-card,
.staff-panel,
.garage-vehicle-card {
  border: 1px solid var(--line);
  background: white;
}

.garage-stat-grid article,
.inventory-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.garage-stat-grid span,
.inventory-card span,
.inventory-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.garage-stat-grid strong {
  color: var(--text-body);
  font-size: 24px;
}

.garage-dashboard-grid,
.garage-two-column,
.staff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.feature-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.garage-vehicle-list,
.customer-directory-list,
.staff-list {
  display: grid;
  gap: 10px;
}

.garage-vehicle-card,
.customer-row,
.staff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.garage-vehicle-card dl,
.customer-row dl,
.compact-detail-list {
  margin: 0;
}

.garage-vehicle-card dl,
.customer-row dl {
  display: grid;
  gap: 6px;
}

.garage-vehicle-card dt,
.compact-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.garage-vehicle-card dd,
.compact-detail-list dd {
  margin: 0;
  color: var(--text-body);
  font-weight: 800;
}

.inventory-card strong {
  font-size: 18px;
}

.inventory-card small {
  text-transform: none;
}

.staff-panel {
  padding: 18px;
}

.staff-form {
  margin-top: 12px;
}

.staff-list-panel {
  display: grid;
  gap: 12px;
}

.staff-row,
.customer-row {
  border: 1px solid var(--line);
  background: #f8fafb;
}

.staff-row strong,
.staff-row span,
.customer-row strong,
.customer-row span,
.customer-row small {
  overflow-wrap: anywhere;
}

.staff-row div span,
.customer-row div span,
.customer-row div small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.customer-directory-panel {
  margin-bottom: 16px;
}

.seat-meter {
  height: 12px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef2f5;
}

.seat-meter span {
  display: block;
  height: 100%;
  background: var(--tenant-accent);
}

.work-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.work-card-button {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--text-body);
  text-align: left;
}

.work-card-button:hover,
.work-card-button:focus-visible {
  border-color: var(--tenant-accent);
  outline: 2px solid rgba(216, 32, 39, 0.16);
}

.work-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.work-order-panel {
  border: 1px solid var(--line);
  background: white;
  padding: 20px;
}

.work-order-tabs {
  margin-bottom: 18px;
}

.work-order-main {
  border: 0;
  padding: 0;
  background: transparent;
}

.work-details-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 16px;
  align-items: start;
}

.work-status-form {
  margin: 0;
}

.work-obd-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.obd-connection-line {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
}

.obd-connection-line span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #25c76a;
  box-shadow: 0 0 0 4px rgba(37, 199, 106, 0.14);
}

.obd-connection-line strong,
.obd-connection-line small {
  display: block;
  overflow-wrap: anywhere;
}

.obd-connection-line small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.obd-terminal {
  display: grid;
  gap: 4px;
  max-height: 156px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #c8d2dc;
  background: #ffffff;
  color: #111315;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.obd-code-list {
  display: grid;
  gap: 8px;
}

.obd-code-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  background: white;
}

.obd-code-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--tenant-accent);
  background: color-mix(in srgb, var(--tenant-accent) 12%, white);
  color: var(--tenant-accent);
  font-weight: 900;
  text-decoration: none;
}

.obd-code-row strong,
.obd-code-row span {
  display: block;
  overflow-wrap: anywhere;
}

.obd-code-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.obd-actions {
  gap: 8px;
}

.work-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.note-list,
.recommendation-list,
.invoice-lines,
.invite-list {
  display: grid;
  gap: 10px;
}

.note-card,
.recommendation-card,
.invoice-line,
.invite-card,
.invoice-panel {
  border: 1px solid var(--line);
  background: white;
}

.note-card,
.recommendation-card,
.invoice-line,
.invite-card {
  padding: 12px;
}

.note-card {
  display: grid;
  gap: 4px;
}

.note-card span,
.recommendation-card span,
.invoice-line small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.note-card p,
.recommendation-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.recommendation-card,
.invoice-line,
.invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.invite-ledger {
  margin-top: 18px;
}

.invite-card strong,
.invite-card span,
.invite-card small {
  display: block;
  overflow-wrap: anywhere;
}

.invite-card span,
.invite-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invoice-panel {
  padding: 0;
}

.invoice-tab-panel {
  border: 0;
  background: transparent;
}

.invoice-lines-wide {
  gap: 12px;
}

.invoice-lines-wide .invoice-line {
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  padding: 16px;
}

.invoice-lines-wide .invoice-line-edit {
  grid-template-columns: minmax(110px, 0.8fr) minmax(220px, 1.6fr) minmax(80px, 0.45fr) minmax(110px, 0.65fr) minmax(110px, 0.65fr) minmax(92px, 0.45fr) minmax(130px, auto);
}

.invoice-line-edit label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-line-edit input,
.invoice-line-edit select {
  min-height: 38px;
  font-size: 14px;
}

.invoice-line-edit .invoice-line-description {
  min-width: 0;
}

.invoice-line-edit .invoice-include {
  align-content: center;
  grid-template-columns: auto minmax(0, 1fr);
  text-transform: none;
}

.invoice-lines-wide .invoice-line strong {
  font-size: 17px;
}

.invoice-line-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.invoice-form {
  margin-top: 14px;
}

.invoice-form-wide {
  margin-top: 18px;
}

.invoice-form-wide.form-grid {
  grid-template-columns: minmax(120px, 0.8fr) minmax(110px, 0.5fr) minmax(220px, 1.5fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr) minmax(160px, 0.8fr);
}

.invoice-form-wide .wide-field {
  grid-column: auto;
}

.invoice-form-wide button {
  grid-column: 1 / -1;
}

.invoice-total,
.invoice-grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.invoice-total-wide {
  justify-content: flex-end;
}

.invoice-total-wide span {
  margin-right: auto;
}

.invoice-total span,
.invoice-grand-total span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-total strong,
.invoice-grand-total strong {
  font-size: 26px;
}

.invoice-tax-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 18px;
}

.invoice-tax-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
}

.invoice-tax-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-tax-summary dd {
  margin: 0;
  color: var(--text-body);
  font-size: 18px;
  font-weight: 900;
}

.invoice-tax-summary dd strong {
  font-size: 26px;
}

.checkbox-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.inline-form {
  margin-top: 14px;
}

.work-context-panel {
  width: 100%;
  display: grid;
  gap: 16px;
}

.work-context-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  align-items: start;
}

.work-context-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: white;
  padding: 16px;
}

.work-context-card h3 {
  margin: 0 0 12px;
}

.work-history-card {
  display: grid;
  gap: 12px;
}

.work-history-list {
  display: grid;
  gap: 10px;
}

.work-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.work-history-item strong,
.work-history-item small {
  display: block;
}

.work-history-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-extra {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.timeline-extra ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.timeline-extra span {
  color: var(--muted);
}

.timeline-extra small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-detail-action {
  margin-top: 10px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  background: white;
}

.history-card h3 {
  margin-bottom: 4px;
}

.history-card p {
  margin-bottom: 8px;
  color: var(--muted);
}

.report-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.report-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.report-section h3 {
  margin-bottom: 10px;
}

.feedback-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.feedback-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.feedback-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.private-note-card {
  margin-top: 10px;
}

.service-feedback-form {
  margin-top: 14px;
}

.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.invoice-print-shell {
  width: min(980px, calc(100% - 32px));
}

.printable-invoice {
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--line);
  background: white;
  color: #20242a;
}

.printable-invoice header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  border-bottom: 3px solid var(--tenant-accent);
  padding-bottom: 18px;
}

.printable-invoice h1 {
  color: #20242a;
  font-size: 44px;
}

.invoice-number {
  min-width: 190px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px;
  background: #f2f4f6;
}

.invoice-number span,
.invoice-number small {
  color: #68717d;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-number strong {
  font-size: 24px;
}

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.invoice-summary div {
  padding: 10px;
  background: #f8fafb;
  border: 1px solid #d8dee6;
}

.invoice-summary dt {
  color: #68717d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-summary dd {
  margin: 4px 0 0;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
  padding: 10px;
  border-bottom: 1px solid #d8dee6;
  text-align: left;
}

.invoice-table th {
  color: #68717d;
  font-size: 12px;
  text-transform: uppercase;
}

.invoice-notes {
  margin-top: 24px;
}

.success-note {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--success);
  background: #eef7f2;
  color: #245b3c;
  font-weight: 800;
}

.obd-mini {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
  color: var(--muted);
  font-weight: 800;
}

.obd-mini img {
  width: 72px;
  height: 52px;
  object-fit: cover;
}

.obd-connection-card,
.obd-result-panel {
  border: 1px solid var(--line);
  background: white;
}

.obd-connection-card {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.obd-connection-card h1 {
  margin-bottom: 4px;
  color: var(--text-body);
  font-size: clamp(30px, 4vw, 46px);
}

.obd-connection-card p,
.muted-note {
  margin-bottom: 0;
  color: var(--muted);
}

.obd-hero {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.connection-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.connection-steps span {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 8px;
  background: #eef1f4;
  color: var(--text-body);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  background: #d8dee6;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--tenant-accent), var(--tenant-secondary));
  transform-origin: left center;
  animation: obd-progress 7s linear forwards;
}

@keyframes obd-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.obd-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.obd-result-panel {
  padding: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.detail-list div {
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.existing-owner-search {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.user-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.user-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.user-result strong,
.user-result span {
  display: block;
  overflow-wrap: anywhere;
}

.user-result span {
  color: var(--muted);
  font-size: 13px;
}

.profile-card {
  margin-bottom: 28px;
}

.profile-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.profile-note strong {
  color: var(--text-body);
}

.profile-note span {
  color: var(--muted);
  line-height: 1.5;
}

.permission-list {
  padding-left: 18px;
}

.theme-preview {
  min-height: 96px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  background: #101214;
  color: white;
}

.theme-preview span {
  grid-row: 1 / 3;
  width: 18px;
  align-self: stretch;
  background: linear-gradient(180deg, var(--preview-accent), var(--preview-secondary));
}

.theme-preview strong {
  font-size: 20px;
}

.theme-preview em {
  color: #c9d1da;
  font-style: normal;
}

.tenant-screen {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 520px);
  background: #0f1316;
  color: white;
}

.tenant-photo-panel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #151a1f;
}

.tenant-photo-panel img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.04);
}

.tenant-photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 4vw, 46px);
  background: linear-gradient(90deg, rgba(11, 15, 18, 0.82), rgba(11, 15, 18, 0.34) 52%, rgba(11, 15, 18, 0.08));
}

.tenant-logo {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  width: fit-content;
}

.tenant-logo span {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--tenant-accent);
  color: white;
  font-weight: 900;
}

.tenant-logo strong,
.tenant-logo small {
  overflow-wrap: anywhere;
}

.tenant-logo strong {
  align-self: end;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 0.92;
}

.tenant-logo small {
  align-self: start;
  color: #e7edf2;
  font-weight: 800;
  text-transform: uppercase;
}

.tenant-activity-card {
  width: fit-content;
  max-width: min(430px, 100%);
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #20242a;
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 12px;
}

.tenant-activity-card strong,
.tenant-activity-card span {
  overflow-wrap: anywhere;
}

.tenant-control-panel {
  align-self: stretch;
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
  background: #fbfbfa;
  color: #20242a;
  overflow: auto;
}

.tenant-login-panel {
  display: grid;
  align-content: center;
  gap: 14px;
}

.tenant-panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: #1b2228;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-panel-topline div {
  display: flex;
  gap: 8px;
}

.panel-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #eef2f4;
  color: #20242a;
  font-size: 12px;
  font-weight: 900;
}

.panel-icon span[aria-hidden="true"] {
  font-size: 19px;
  line-height: 1;
}

.tenant-role-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tenant-role-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  background: white;
  color: #20242a;
  font-size: 12px;
  font-weight: 800;
}

.tenant-role-tabs button.active {
  background: var(--tenant-accent);
  border-color: var(--tenant-accent);
  color: white;
}

.tenant-login-form {
  display: grid;
  gap: 10px;
}

.tenant-login-form h1 {
  margin-bottom: 2px;
  color: #20242a;
  font-size: 18px;
  line-height: 1.2;
}

.tenant-login-form label {
  gap: 5px;
  font-size: 12px;
}

.tenant-login-form input {
  min-height: 38px;
}

.tenant-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tenant-keypad button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: white;
  color: #20242a;
  font-weight: 900;
}

.tenant-keypad button:last-child {
  grid-column: 2;
}

.tenant-access-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tenant-access-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #4e5963;
  font-size: 11px;
  font-weight: 800;
}

.tenant-route-note {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #68717d;
  font-size: 12px;
  font-weight: 800;
}

.tenant-contact-list {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tenant-contact-list span,
.tenant-contact-list a {
  color: #68717d;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.tenant-manager-shell {
  min-height: calc(100vh - 112px);
  padding: clamp(18px, 3vw, 34px) 0;
  background:
    linear-gradient(180deg, rgba(10, 13, 15, 0.86), rgba(10, 13, 15, 0.78)),
    url("../assets/garage-service-bay.png") center / cover no-repeat;
  color: #20242a;
}

.tenant-manager-frame {
  width: min(90vw, 1480px);
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(251, 251, 250, 0.96);
}

.tenant-manager-header,
.tenant-flow-heading,
.tenant-status-top,
.tenant-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tenant-manager-header {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tenant-manager-header h1 {
  margin-bottom: 8px;
  color: #20242a;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

.tenant-manager-header p,
.tenant-list-heading p,
.tenant-flow-heading p,
.tenant-feature-line {
  margin: 0;
  color: #68717d;
}

.tenant-manager-actions,
.tenant-card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tenant-manager-summary,
.tenant-status-metrics {
  display: grid;
  gap: 10px;
}

.tenant-manager-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.tenant-manager-summary article,
.tenant-status-card,
.tenant-flow-panel {
  border: 1px solid var(--line);
  background: #ffffff;
}

.tenant-manager-summary article {
  min-height: 84px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 14px;
}

.tenant-manager-summary span,
.tenant-status-metrics span {
  color: #68717d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-manager-summary strong {
  font-size: clamp(22px, 3vw, 34px);
}

.tenant-list-heading {
  display: grid;
  gap: 4px;
  margin: 8px 0 14px;
}

.tenant-list-heading h2,
.tenant-flow-heading h2 {
  margin: 0;
  color: #20242a;
}

.tenant-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.tenant-sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.tenant-sort-controls span {
  color: #68717d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-sort-controls button {
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 7px 10px;
  background: white;
  color: #20242a;
  font-size: 12px;
  font-weight: 900;
}

.tenant-sort-controls button.active {
  background: var(--tenant-accent);
  border-color: var(--tenant-accent);
  color: white;
}

.tenant-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: white;
}

.tenant-status-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.tenant-status-table th,
.tenant-status-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tenant-status-table th {
  background: #eef1f4;
  color: #4e5963;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-status-table td {
  color: #20242a;
  font-size: 13px;
}

.tenant-status-table td strong,
.tenant-status-table td span,
.tenant-status-table td small {
  display: block;
  overflow-wrap: anywhere;
}

.tenant-status-table td small,
.tenant-status-table td span {
  color: #68717d;
  font-weight: 800;
}

.tenant-table-actions {
  display: flex;
  gap: 8px;
  min-width: 170px;
}

.tenant-table-actions button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

.tenant-request-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.tenant-request-card,
.tenant-empty-state {
  border: 1px solid var(--line);
  background: white;
}

.tenant-request-card {
  min-height: 330px;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border-left: 5px solid var(--tenant-accent);
}

.tenant-request-card h3 {
  margin-bottom: 0;
  color: #20242a;
  font-size: 24px;
}

.tenant-empty-state {
  display: grid;
  gap: 6px;
  margin-bottom: 26px;
  padding: 18px;
}

.tenant-empty-state strong {
  color: #20242a;
}

.tenant-empty-state span {
  color: #68717d;
}

.tenant-status-card {
  min-height: 340px;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.tenant-status-card h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.tenant-status-route {
  margin: 0;
  color: #4e5963;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.tenant-status-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-status-metrics div {
  min-height: 70px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.tenant-status-metrics strong,
.tenant-status-card strong {
  overflow-wrap: anywhere;
}

.tenant-feature-line {
  font-size: 13px;
  line-height: 1.5;
}

.tenant-card-actions {
  margin-top: auto;
}

.tenant-flow-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
}

.tenant-users-panel {
  display: grid;
  gap: 12px;
}

.tenant-users-table {
  min-width: 860px;
}

.tenant-flow-heading {
  align-items: center;
}

.tenant-edit-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.tenant-edit-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 9px 12px;
  background: #eef1f4;
  color: #20242a;
  font-weight: 900;
}

.tenant-edit-tabs button.active {
  background: var(--tenant-accent);
  border-color: var(--tenant-accent);
  color: white;
}

.shop-feature-status-panel {
  display: grid;
  gap: 14px;
}

.feature-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.feature-status-card {
  min-height: 112px;
  display: grid;
  gap: 10px;
  align-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.feature-status-card.disabled {
  background: #f1f3f5;
}

.feature-status-card span {
  color: #68717d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-status-card strong,
.feature-status-card small {
  display: block;
  overflow-wrap: anywhere;
}

.feature-status-card small {
  color: #68717d;
  font-weight: 800;
}

.assist-panel {
  display: grid;
  gap: 14px;
}

.assist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.assist-card {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.assist-card.disabled {
  background: #f1f3f5;
}

.assist-card-top {
  display: grid;
  gap: 8px;
}

.assist-card-top strong {
  color: #20242a;
  font-size: 19px;
}

.assist-card p {
  margin: 0;
  color: #68717d;
}

.assist-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #343b43;
  line-height: 1.45;
}

.assist-card a {
  color: var(--tenant-accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.assist-action-label {
  align-self: end;
  width: fit-content;
  margin-top: auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: #eef7f2;
  color: #245b3c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-manager-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.tenant-route-tabs {
  display: grid;
  gap: 8px;
}

.tenant-card-button {
  display: grid;
  gap: 4px;
  justify-items: start;
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  border-left: 5px solid transparent;
  padding: 12px;
  background: white;
  color: #20242a;
  text-align: left;
}

.tenant-card-button.active {
  border-left-color: var(--tenant-accent);
  background: #f5f8fa;
}

.tenant-card-button span,
.tenant-card-button em,
.tenant-card-button small {
  color: #68717d;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.tenant-card-button strong,
.tenant-card-button em,
.tenant-card-button small {
  overflow-wrap: anywhere;
}

.tenant-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tenant-metrics article {
  min-height: 72px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.tenant-metrics span {
  color: #68717d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-metrics strong {
  overflow-wrap: anywhere;
}

.request-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.request-review-grid article {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.request-review-grid span {
  color: #68717d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.request-review-grid strong,
.request-review-grid small {
  overflow-wrap: anywhere;
}

.request-review-grid small {
  color: #68717d;
  font-weight: 800;
  line-height: 1.4;
}

.tenant-settings-form,
.tenant-create-form {
  display: grid;
  gap: 12px;
}

.tenant-settings-form fieldset,
.tenant-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: white;
}

.tenant-settings-form legend,
.tenant-create-form h2 {
  grid-column: 1 / -1;
  margin: 0;
  color: #20242a;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.tenant-settings-form label,
.tenant-create-form label {
  font-size: 12px;
}

.tenant-create-form button {
  grid-column: 1 / -1;
}

.form-grid .wide-field,
.tenant-settings-form .wide-field,
.tenant-create-form .wide-field {
  grid-column: 1 / -1;
}

.tenant-settings-form label:first-of-type,
.tenant-settings-form label:nth-of-type(7) {
  grid-column: 1 / -1;
}

.feature-toggle-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.toggle-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
}

.toggle-row span {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.toggle-row small {
  color: #68717d;
  font-weight: 700;
  line-height: 1.35;
}

.tenant-theme-swatch {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--swatch-accent), var(--swatch-secondary));
  color: white;
}

.tenant-theme-swatch span {
  width: 24px;
  height: 24px;
  background: white;
}

.tenant-theme-swatch strong {
  overflow-wrap: anywhere;
}

.statusbar {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px clamp(16px, 3vw, 36px);
  background: #0b0c0d;
  color: #b6bec8;
  font-size: 12px;
}

body.dark-mode {
  --panel: #0d1012;
  --panel-warm: #171a1d;
  --text-body: #edf2f7;
  --muted: #aab4be;
  --line: #343b43;
  background: #08090a;
  color: var(--text-body);
}

body.dark-mode .main-stage {
  background: var(--tenant-page-background, #0d1012);
}

body.dark-mode .front-door {
  background: #0d1012;
}

body.dark-mode .landing-hero {
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.96) 0%, rgba(5, 6, 7, 0.82) 38%, rgba(5, 6, 7, 0.28) 68%, rgba(5, 6, 7, 0.82) 100%),
    url("../assets/garage-service-bay.png") center / cover no-repeat;
}

body.dark-mode .shop-preview,
body.dark-mode .auth-card,
body.dark-mode .context-card,
body.dark-mode .vehicle-card,
body.dark-mode .vehicle-content-panel,
body.dark-mode .timeline-panel,
body.dark-mode .audit-panel,
body.dark-mode .queue-panel,
body.dark-mode .invite-panel,
body.dark-mode .garage-sidebar,
body.dark-mode .garage-stat-grid article,
body.dark-mode .staff-panel,
body.dark-mode .garage-vehicle-card,
body.dark-mode .inventory-card,
body.dark-mode .customer-row,
body.dark-mode .staff-row,
body.dark-mode .work-context-card,
body.dark-mode .work-history-item,
body.dark-mode .work-obd-panel,
body.dark-mode .obd-code-row,
body.dark-mode .work-card,
body.dark-mode .work-order-panel,
body.dark-mode .work-card-button,
body.dark-mode .note-card,
body.dark-mode .recommendation-card,
body.dark-mode .invoice-line,
body.dark-mode .invite-card,
body.dark-mode .invoice-panel,
body.dark-mode .invoice-tax-summary div,
body.dark-mode .history-card,
body.dark-mode .obd-connection-card,
body.dark-mode .obd-result-panel,
body.dark-mode .obd-terminal,
body.dark-mode .form-grid,
body.dark-mode .offer-grid article,
body.dark-mode .demo-login-card,
body.dark-mode .account-menu,
body.dark-mode .tenant-control-panel,
body.dark-mode .tenant-manager-frame,
body.dark-mode .tenant-manager-summary article,
body.dark-mode .tenant-status-card,
body.dark-mode .tenant-request-card,
body.dark-mode .tenant-empty-state,
body.dark-mode .tenant-table-wrap,
body.dark-mode .tenant-sort-controls button,
body.dark-mode .tenant-status-table td,
body.dark-mode .tenant-status-metrics div,
body.dark-mode .tenant-flow-panel,
body.dark-mode .tenant-edit-tabs button,
body.dark-mode .feature-status-card,
body.dark-mode .assist-card,
body.dark-mode .tenant-card-button,
body.dark-mode .tenant-metrics article,
body.dark-mode .request-review-grid article,
body.dark-mode .request-feature-fieldset,
body.dark-mode .tenant-settings-form fieldset,
body.dark-mode .tenant-create-form,
body.dark-mode .toggle-row {
  background: rgba(24, 28, 32, 0.96);
  border-color: var(--line);
  color: var(--text-body);
}

body.dark-mode .section-heading h1,
body.dark-mode .auth-card h1,
body.dark-mode .obd-connection-card h1,
body.dark-mode .profile-note strong,
body.dark-mode .tenant-login-form h1,
body.dark-mode .tenant-panel-topline,
body.dark-mode .tenant-manager-header h1,
body.dark-mode .tenant-list-heading h2,
body.dark-mode .tenant-flow-heading h2,
body.dark-mode .landing-request-copy h2,
body.dark-mode .offer-grid strong,
body.dark-mode .tenant-request-card h3,
body.dark-mode .tenant-empty-state strong,
body.dark-mode .request-feature-fieldset legend,
body.dark-mode .account-menu button,
body.dark-mode .tenant-status-table td,
body.dark-mode .tenant-settings-form legend,
body.dark-mode .tenant-create-form h2 {
  color: var(--text-body);
}

body.dark-mode .section-heading p,
body.dark-mode .auth-card p,
body.dark-mode .shop-preview p,
body.dark-mode .shop-contact-line span,
body.dark-mode .shop-contact-line a,
body.dark-mode .vehicle-tab span,
body.dark-mode .role-row,
body.dark-mode .timeline-event p,
body.dark-mode .work-card p,
body.dark-mode .work-meta,
body.dark-mode .obd-connection-card p,
body.dark-mode .muted-note,
body.dark-mode .detail-list dt,
body.dark-mode .vehicle-card dt,
body.dark-mode .timeline-event time,
body.dark-mode .user-result span,
body.dark-mode .profile-note span,
body.dark-mode .privacy-note,
body.dark-mode label,
body.dark-mode .tenant-manager-header p,
body.dark-mode .tenant-list-heading p,
body.dark-mode .tenant-flow-heading p,
body.dark-mode .tenant-feature-line,
body.dark-mode .tenant-status-route,
body.dark-mode .landing-request-copy p,
body.dark-mode .offer-grid span,
body.dark-mode .tenant-empty-state span,
body.dark-mode .account-menu-header span,
body.dark-mode .tenant-status-table td span,
body.dark-mode .tenant-status-table td small,
body.dark-mode .tenant-sort-controls span,
body.dark-mode .tenant-route-note,
body.dark-mode .tenant-contact-list span,
body.dark-mode .tenant-contact-list a,
body.dark-mode .tenant-manager-summary span,
body.dark-mode .tenant-status-metrics span,
body.dark-mode .request-review-grid span,
body.dark-mode .request-review-grid small,
body.dark-mode .feature-status-card span,
body.dark-mode .feature-status-card small,
body.dark-mode .assist-card p,
body.dark-mode .toggle-row small,
body.dark-mode .tenant-card-button span,
body.dark-mode .tenant-card-button em,
body.dark-mode .tenant-card-button small,
body.dark-mode .tenant-metrics span,
body.dark-mode .tenant-access-links button {
  color: var(--muted);
}

body.dark-mode input,
body.dark-mode input[type="file"],
body.dark-mode select,
body.dark-mode textarea {
  background: #101418;
  border-color: var(--line);
  color: var(--text-body);
}

body.dark-mode .context-select-label select,
body.dark-mode .context-button,
body.dark-mode .account-avatar {
  background: #15191d;
  border-color: var(--line);
  color: var(--text-body);
}

body.dark-mode .tenant-status-table th {
  background: #15191d;
  color: var(--muted);
}

body.dark-mode .account-menu button:hover {
  background: #20262c;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #7f8a96;
}

body.dark-mode .vehicle-tab,
body.dark-mode .car-page-tab,
body.dark-mode .connection-steps span,
body.dark-mode .service-strip button,
body.dark-mode .garage-nav button,
body.dark-mode .seat-meter,
body.dark-mode .demo-credentials,
body.dark-mode .detail-list div,
body.dark-mode .profile-note,
body.dark-mode .obd-mini,
body.dark-mode .user-result,
body.dark-mode .vehicle-image,
body.dark-mode .vehicle-image figcaption,
body.dark-mode .timeline-extra,
body.dark-mode .feedback-card {
  background: #15191d;
  border-color: var(--line);
  color: var(--text-body);
}

body.dark-mode .garage-nav button:hover,
body.dark-mode .garage-nav button:focus-visible,
body.dark-mode .garage-nav button.active {
  background: #15191d;
  border-color: var(--tenant-accent);
  color: var(--tenant-accent);
}

body.dark-mode .panel-icon,
body.dark-mode .tenant-role-tabs button,
body.dark-mode .tenant-keypad button {
  background: #15191d;
  border-color: var(--line);
  color: var(--text-body);
}

body.dark-mode .feature-status-card.disabled {
  background: #11161a;
}

body.dark-mode .assist-card.disabled {
  background: #11161a;
}

body.dark-mode .assist-card-top strong,
body.dark-mode .assist-card ul {
  color: var(--text-body);
}

body.dark-mode .tenant-role-tabs button.active {
  background: var(--tenant-accent);
  border-color: var(--tenant-accent);
  color: white;
}

body.dark-mode .tenant-edit-tabs button.active,
body.dark-mode .vehicle-tab.active,
body.dark-mode .tenant-sort-controls button.active {
  background: #20262c;
  border-color: var(--tenant-accent);
  border-bottom-color: var(--tenant-accent);
}

body.dark-mode .car-page-tab.active {
  background: var(--tenant-accent);
  border-color: var(--tenant-accent);
  color: white;
}

body.dark-mode .theme-preview {
  background: #111315;
}

body.dark-mode .shop-header {
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.94), rgba(8, 9, 10, 0.72)),
    var(--tenant-hero-image) center / cover no-repeat,
    #111315;
}

body.dark-mode .success-note {
  background: #10251a;
  color: #9fe0b9;
}

body.dark-mode .error-note {
  background: #2b1412;
  color: #ffb2ad;
}

body.dark-mode .progress-track {
  background: #252b31;
}

body.dark-mode .printable-invoice {
  background: #fdfdfb;
  color: #20242a;
}

@media (max-width: 900px) {
  .front-door,
  .dashboard-grid,
  .shop-main,
  .garage-workspace,
  .garage-dashboard-grid,
  .garage-two-column,
  .staff-layout,
  .work-details-top-grid,
  .work-context-grid,
  .obd-result-grid,
  .details-tab-layout,
  .invoice-summary,
  .tenant-screen,
  .landing-hero,
  .landing-request-band {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    align-items: end;
    min-height: auto;
  }

  .landing-request-copy {
    position: static;
  }

  .tenant-photo-panel {
    min-height: 360px;
  }

  .tenant-control-panel {
    overflow: visible;
  }

  .tenant-manager-frame {
    width: min(94vw, 1480px);
  }

  .garage-sidebar {
    position: static;
  }

  .garage-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .garage-stat-grid,
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .garage-vehicle-card,
  .staff-row {
    grid-template-columns: 1fr;
  }

  .tenant-manager-header,
  .tenant-flow-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tenant-manager-actions,
  .tenant-card-actions {
    justify-content: flex-start;
  }

  .invoice-form-wide.form-grid {
    grid-template-columns: 1fr;
  }

  .invoice-form-wide .wide-field {
    grid-column: 1 / -1;
  }

  .shop-preview {
    min-height: auto;
  }

  .entry-grid,
  .demo-login-grid,
  .form-grid,
  .tenant-manager-summary,
  .tenant-status-metrics,
  .tenant-metrics,
  .tenant-settings-form fieldset,
  .tenant-create-form,
  .feature-toggle-grid {
    grid-template-columns: 1fr;
  }

  .shop-header,
  .statusbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-badge {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-cluster {
    max-width: 100%;
  }

  .garage-nav,
  .garage-stat-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .topbar-status {
    width: 100%;
    justify-content: flex-start;
  }

  .context-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .front-door {
    min-height: auto;
  }

  .landing-hero {
    padding: 24px 16px 32px;
  }

  .landing-offer-band,
  .landing-request-band {
    width: calc(100% - 24px);
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .entry-panel p {
    font-size: 16px;
  }

  .entry-actions button {
    width: 100%;
  }

  .tenant-manager-shell {
    padding: 12px 0;
  }

  .tenant-manager-frame {
    width: calc(100% - 20px);
    padding: 14px;
  }

  .tenant-manager-actions button,
  .tenant-card-actions button {
    width: 100%;
  }

  .timeline-event,
  .work-card,
  .history-card,
  .recommendation-card,
  .invoice-line,
  .invoice-lines-wide .invoice-line,
  .invoice-lines-wide .invoice-line-edit,
  .work-history-item,
  .invite-card,
  .vehicle-card dl,
  .detail-list,
  .user-result {
    grid-template-columns: 1fr;
  }

  .invoice-line-actions {
    justify-items: start;
  }
}

@media print {
  body {
    background: white;
  }

  .topbar,
  .statusbar,
  .no-print {
    display: none;
  }

  .main-stage,
  .work-surface,
  .invoice-print-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    background: white;
  }

  .printable-invoice {
    border: 0;
    padding: 0;
  }
}
