.garage-workspace {
  padding: 40px 0 72px;
  background: #f4f7f8;
}

.garage-workspace > .container {
  max-width: 1320px;
}

.garage-hero,
.garage-stats,
.garage-layout,
.garage-form,
.garage-main,
.vehicle-card-grid,
.vehicle-timeline {
  display: grid;
  gap: 20px;
}

.garage-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid #cfe0ee;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #edf6fd);
  box-shadow: 0 14px 34px rgba(31, 41, 51, .07);
}

html[data-theme] .garage-workspace .garage-hero {
  min-height: 0 !important;
  padding: 28px !important;
}

.garage-hero h1 {
  margin: 0;
  color: #17212b;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.08;
}

.garage-hero-copy > p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: #5f6b7a;
  font-size: .96rem;
  line-height: 1.6;
}

.garage-hero-actions,
.vehicle-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.garage-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  width: min(100%, 390px);
}

.garage-hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.garage-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.garage-stats div,
.garage-panel,
.vehicle-card,
.timeline-entry {
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(31, 41, 51, .06);
}

.garage-stats div {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
}

.garage-stats div::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #1479d4;
  content: "";
}

.garage-stats span {
  display: block;
  color: #667085;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.garage-stats strong {
  display: block;
  margin-top: 8px;
  color: #17212b;
  font-size: 1.8rem;
  line-height: 1;
}

.garage-layout {
  grid-template-columns: 380px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.garage-panel {
  padding: 24px;
}

.garage-editor {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.garage-main {
  min-width: 0;
  align-content: start;
}

.garage-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.garage-form-grid > div {
  min-width: 0;
}

.garage-form label,
.garage-log-form label,
.garage-toolbar label > span {
  display: block;
  margin: 0 0 7px;
  color: #17212b;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.25;
}

.garage-form .form-control,
.garage-log-form .form-control,
.garage-toolbar .form-control {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #fff;
}

.garage-form .form-control:focus,
.garage-log-form .form-control:focus,
.garage-toolbar .form-control:focus {
  border-color: #1479d4;
  box-shadow: 0 0 0 3px rgba(20, 121, 212, .13);
}

.garage-form textarea,
.garage-log-form textarea {
  min-height: 112px;
  resize: vertical;
}

.garage-form .btn,
.garage-log-form .btn {
  justify-self: start;
}

.garage-image-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #dce4e9;
  border-radius: 10px;
}

.garage-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, .45fr) minmax(160px, .45fr);
  gap: 14px;
  align-items: end;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #e1e7ec;
  border-radius: 10px;
  background: #f8fafb;
}

.garage-search {
  position: relative;
  margin: 0;
}

.garage-search i {
  position: absolute;
  z-index: 1;
  left: 14px;
  bottom: 15px;
  color: #667085;
}

.garage-search .form-control {
  padding-left: 40px;
}

.garage-toolbar label {
  margin: 0;
}

.garage-results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 12px;
  margin: 8px 0 10px;
}

.garage-results-row p {
  margin: 0;
  color: #5f6b7a;
  font-weight: 700;
}

.garage-clear-filters,
.vehicle-remove {
  border: 0;
  background: transparent;
}

.garage-clear-filters {
  padding: 7px 0;
  color: #1268b4;
  font-weight: 800;
}

.vehicle-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.vehicle-card {
  min-width: 0;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(31, 41, 51, .1);
}

.vehicle-card.is-selected {
  border-color: #1479d4;
  box-shadow: 0 0 0 3px rgba(20, 121, 212, .12);
}

.vehicle-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #dfe6ea;
  cursor: pointer;
}

.vehicle-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.vehicle-card-image:hover img {
  transform: scale(1.025);
}

.vehicle-category,
.vehicle-selected-label {
  position: absolute;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}

.vehicle-category {
  left: 12px;
  color: #17212b !important;
  background: rgba(255, 255, 255, .92);
}

.vehicle-selected-label {
  right: 12px;
  color: #fff !important;
  background: #1479d4;
}

.vehicle-card-body {
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
}

.vehicle-card h3 {
  overflow-wrap: anywhere;
  margin: 0;
  color: #17212b;
  font-size: 1.4rem;
  line-height: 1.15;
}

.vehicle-card-heading > span,
.vehicle-card span {
  color: #667085;
}

.vehicle-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.vehicle-facts span {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 8px;
  color: #475467;
  font-size: .86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.vehicle-facts i {
  flex: 0 0 17px;
  margin-top: 3px;
  color: #1479d4;
}

.vehicle-facts .is-danger { color: #b42318; }
.vehicle-facts .is-warning { color: #946100; }
.vehicle-facts .is-good { color: #027a48; }

.vehicle-card-actions {
  align-items: center;
  padding-top: 2px;
}

.vehicle-card-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vehicle-remove {
  width: 40px;
  height: 40px;
  margin-left: auto;
  color: #b42318;
  border-radius: 8px;
}

.vehicle-remove:hover,
.vehicle-remove:focus {
  background: #fff0ef;
}

.garage-empty-state {
  grid-column: 1 / -1;
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed #bfcbd4;
  border-radius: 12px;
  background: #f8fafb;
}

.garage-empty-state h3 {
  margin: 14px 0 6px;
  color: #17212b;
}

.garage-empty-state p {
  max-width: 520px;
  margin: 0 auto 18px;
  color: #667085;
}

.garage-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: #1479d4;
  border-radius: 50%;
  background: #e9f4fe;
  font-size: 1.4rem;
}

.garage-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6ebef;
  overflow-x: auto;
}

.garage-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  color: #4b5563;
  border: 1px solid #dce4e9;
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.garage-tab.is-active,
.garage-tab:hover {
  color: #1268b4;
  border-color: #1479d4;
  background: #eef7ff;
}

.garage-log-form {
  display: grid;
  gap: 18px;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.timeline-entry > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #1268b4;
  border-radius: 50%;
  background: #eaf5ff;
}

.timeline-entry strong,
.timeline-entry em {
  display: block;
}

.timeline-entry strong { color: #17212b; }

.timeline-entry em {
  margin-top: 3px;
  color: #667085;
  font-size: .9rem;
  font-style: normal;
  font-weight: 700;
}

.timeline-entry p {
  overflow-wrap: anywhere;
  margin: 7px 0 0;
  color: #475467;
}

@media (max-width: 1199px) {
  .garage-layout { grid-template-columns: 330px minmax(0, 1fr); }
  .vehicle-card-grid { grid-template-columns: 1fr; }
  .garage-toolbar { grid-template-columns: 1fr 1fr; }
  .garage-search { grid-column: 1 / -1; }
}

@media (max-width: 991px) {
  .garage-workspace { padding-top: 30px; }
  .garage-hero,
  .garage-layout { grid-template-columns: 1fr; }
  .garage-hero { align-items: start; }
  .garage-editor { position: static; order: 2; }
  .garage-editor { max-height: none; overflow: visible; }
  .garage-main { order: 1; }
}

@media (max-width: 767px) {
  .garage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garage-panel { padding: 18px; }
  .garage-toolbar { grid-template-columns: 1fr; }
  .garage-search { grid-column: auto; }
  html[data-theme] .garage-workspace .garage-hero { padding: 22px !important; }
  .garage-hero-actions { grid-template-columns: 1fr 1fr; width: 100%; }
}

@media (max-width: 575px) {
  .garage-workspace { padding: 24px 0 56px; }
  html[data-theme] .garage-workspace .garage-hero { padding: 20px 16px !important; }
  .garage-hero { gap: 20px; margin-bottom: 16px; border-radius: 10px; }
  .garage-hero h1 { font-size: 1.8rem; }
  .garage-hero-copy > p:last-child { font-size: .86rem; }
  .garage-hero-actions { grid-template-columns: 1fr; gap: 8px; }
  .garage-hero-actions .btn { width: 100%; min-height: 44px; }
  .garage-stats { gap: 10px; }
  .garage-stats div { padding: 16px; }
  .garage-stats strong { font-size: 1.75rem; }
  .garage-form-grid,
  .vehicle-facts { grid-template-columns: 1fr; }
  .garage-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .garage-tab { min-width: 0; padding: 10px 6px; font-size: .78rem; }
  .vehicle-card-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 42px; }
  .vehicle-remove { min-width: 44px; min-height: 44px; }
  .garage-browser .portal-panel-header { align-items: center; gap: 12px; }
  #browserAddVehicleBtn { min-height: 42px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .vehicle-card,
  .vehicle-card-image img { transition: none; }
}
.garage-public-settings{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,280px);gap:28px;align-items:end;margin-bottom:22px}.garage-public-settings h2{margin-bottom:8px}.garage-public-settings p:not(.portal-eyebrow){max-width:720px;margin-bottom:16px}.garage-public-settings textarea{margin-top:6px;min-height:76px}.garage-public-settings>div:last-child{display:grid;gap:12px;min-width:210px;padding:16px;border:1px solid #dce4e9;border-radius:10px;background:#f8fafc}.garage-public-settings>div:last-child label{display:flex;align-items:flex-start;gap:9px;margin:0;font-weight:800;line-height:1.4}.garage-public-settings>div:last-child input{margin-top:4px}@media(max-width:767px){.garage-public-settings{grid-template-columns:1fr}.garage-public-settings>div:last-child{min-width:0}}
.vehicle-visibility-option{display:flex!important;align-items:flex-start;gap:12px;padding:14px;color:#17212b;border:1px solid #c7d2dc;border-radius:10px;background:#f8fafc;cursor:pointer}.vehicle-visibility-option input{flex:0 0 auto;margin-top:4px;accent-color:#1479d4}.vehicle-visibility-option span{display:grid;gap:3px}.vehicle-visibility-option strong{color:#17212b}.vehicle-visibility-option small{color:#536273;font-weight:500;line-height:1.4}.vehicle-visibility-badge{display:inline-flex!important;align-items:center;gap:6px;width:max-content;margin-top:6px;padding:4px 8px;border-radius:999px;background:#eef1f5;color:#475467;font-size:.75rem;font-weight:700}.vehicle-visibility-badge.is-public{background:#e8f7ee;color:#18723b}
.garage-field-hint{display:block;margin:-4px 0 10px;color:#667085;line-height:1.4}
