:root {
  --bg: #edf2f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #102038;
  --muted: #6b7a90;
  --line: #dde5f0;
  --primary: #13294b;
  --primary-soft: #e6eefc;
  --accent: #ff8a3d;
  --shadow: 0 24px 60px rgba(16, 32, 56, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 183, 77, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(57, 122, 192, 0.18), transparent 28%),
    linear-gradient(180deg, #f6f8fb 0%, var(--bg) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.topbar {
  margin: 18px 18px 0;
  padding: 18px 22px;
  border-radius: 28px;
  background: rgba(11, 24, 44, 0.96);
  color: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 18px 40px rgba(16, 32, 56, 0.16);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #8cb1ff 100%);
  color: var(--primary);
  font-weight: 800;
  font-size: 28px;
}

.brand-title {
  margin: 0;
  font-size: 28px;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: rgba(232, 241, 255, 0.72);
  font-size: 14px;
}

.top-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  text-align: center;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 48px;
}

.nav-item-active {
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(90,132,255,0.18));
  border-color: rgba(140, 177, 255, 0.35);
}

.nav-item-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.nav-item-desc {
  display: none;
  margin-top: 0;
  color: rgba(232, 241, 255, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

.topbar-note {
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 241, 255, 0.76);
  font-size: 12px;
  line-height: 1.6;
}

.topbar-note p {
  margin: 0;
}

.workspace {
  padding: 18px;
}

.page {
  display: none;
  gap: 24px;
}

.page-active {
  display: grid;
}

.page-hero,
.editor-card,
.profile-card,
.dropdown-card,
.modal-card,
.empty-state {
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 22px 24px;
}

.page-hero h2,
.modal-header h3,
.empty-state h3 {
  margin: 0;
  font-size: 28px;
}

.page-hero p,
.modal-header p,
.empty-state p {
  margin: 8px 0 0;
  max-width: 760px;
  line-height: 1.6;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: #7a879a;
}

.warm-hero {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255,255,255,0.92));
}

.cool-hero {
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.96), rgba(255,255,255,0.92));
}

.toolbar-stack {
  display: grid;
  gap: 18px;
}

.search-row {
  display: grid;
}

.search-field {
  display: grid;
  gap: 10px;
  padding: 0;
}

.search-field span,
.form-block span,
.dropdown-label,
label {
  font-weight: 600;
  color: #506079;
}

.search-field input,
.form-block input,
.form-block textarea,
.profile-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #f8fbff;
  color: var(--text);
}

.search-field input:focus,
.form-block input:focus,
.form-block textarea:focus,
.profile-fields input:focus {
  outline: none;
  border-color: #7ea4ff;
  box-shadow: 0 0 0 4px rgba(126, 164, 255, 0.16);
}

.panel-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.dropdown-card {
  position: relative;
  padding: 10px 14px;
  min-height: 60px;
  overflow: visible;
  background: #f3f6fa;
  border: 1px solid #d9e2ee;
  box-shadow: none;
}

.dropdown-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  padding: 0;
  text-align: center;
}

.dropdown-value {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.dropdown-panel {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(100% - 8px);
  margin-top: 0;
  padding: 18px;
  border: 1px solid rgba(221, 229, 240, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 56px rgba(16, 32, 56, 0.14);
  z-index: 15;
}

.dropdown-section + .dropdown-section {
  margin-top: 18px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chip,
.toggle-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #eef3fb;
  color: #52627a;
}

.chip-active {
  background: var(--primary);
  color: #ffffff;
}

.primary-button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  min-height: 52px;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.ghost-button {
  background: #eef3fb;
  color: #506079;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.danger-button {
  background: #ef4444;
  color: #ffffff;
}

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

.vehicle-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.vehicle-card-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #e1e8f5, #cfd8e8);
}

.vehicle-card-body {
  padding: 16px;
}

.vehicle-card-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px;
}

.vehicle-card-meta,
.vehicle-card-price {
  margin: 4px 0;
  font-size: 14px;
  color: var(--muted);
}

.vehicle-card-model-brand {
  color: #1f3761;
  font-weight: 800;
}

.vehicle-card-price {
  color: #c46b16;
  font-weight: 800;
}

.empty-state {
  padding: 40px;
  text-align: center;
}

.editor-card,
.profile-card {
  padding: 24px;
}

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

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

.full-width {
  grid-column: 1 / -1;
}

.form-hint {
  margin: 0;
  color: #90a0b8;
  font-size: 13px;
}

.upload-box {
  position: relative;
  padding: 20px;
  border: 1px dashed #aac0e6;
  border-radius: 18px;
  background: #f7faff;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box p {
  margin: 0;
  color: var(--muted);
}

.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.thumb-item {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 18px;
  overflow: hidden;
  background: #dbe3f1;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(19, 41, 75, 0.84);
  color: #ffffff;
  font-size: 12px;
}

.thumb-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 22, 40, 0.82);
  color: #ffffff;
}

.form-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.profile-main {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.avatar-editor {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef3fb;
  display: grid;
  place-items: center;
  border: 1px dashed #a4b8d8;
  cursor: pointer;
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-chip {
  border-radius: 999px;
  padding: 10px 14px;
  background: #f2f6fd;
  color: #58708d;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 34, 0.52);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 24px auto;
  padding: 24px;
}

.detail-modal-card,
.edit-modal-card {
  padding-top: 56px;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #eef3fb;
  color: var(--primary);
  font-size: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(0, 1fr);
  gap: 26px;
}

.detail-gallery-main {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 22px;
  background: #dbe4f2;
}

.detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.detail-thumb {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #dde5f2;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumb-active {
  border-color: #7ea4ff;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.detail-title {
  margin: 0;
  font-size: 34px;
}

.detail-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
}

.detail-meta-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-meta-item strong {
  color: #60718b;
}

.detail-note {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f7faff;
  color: #53657d;
  line-height: 1.8;
}

.detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1400px) {
  .garage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .topbar {
    margin: 12px 12px 0;
    padding: 16px 18px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-block,
  .top-nav,
  .topbar-note {
    width: 100%;
  }

  .brand-block {
    justify-content: center;
  }

  .top-nav {
    justify-content: center;
  }

  .topbar-note {
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 960px) {
  .topbar {
    align-items: center;
    gap: 14px;
  }

  .brand-block {
    flex-direction: column;
    text-align: center;
  }

  .workspace {
    padding: 14px;
  }

  .garage-grid,
  .form-grid,
  .panel-row,
  .profile-main,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-header,
  .detail-actions,
  .form-actions {
    flex-direction: column;
  }

  .panel-row {
    gap: 12px;
  }

  .vehicle-card-cover,
  .detail-gallery-main {
    height: 200px;
  }
}
