* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

a {
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.topbar {
  background: #111827;
  color: #fff;
  padding: 16px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
}

.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(17,24,39,0.06);
  padding: 22px;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn-primary {
  background: #111827;
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
}

.btn-warning:hover {
  background: #d97706;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background: #f3f4f6;
  color: #111827;
  text-align: left;
  font-size: 14px;
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
}

table td {
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

table tr:hover {
  background: #fafafa;
}

.thumb {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

input[type="text"],
input[type="number"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.08);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.image-preview {
  width: 180px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.gallery-item {
  width: 130px;
  text-align: center;
}

.gallery-item img {
  width: 130px;
  height: 95px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  display: block;
  margin-bottom: 8px;
}

.view-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.vehicle-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(17,24,39,0.06);
}

.vehicle-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.vehicle-card-body {
  padding: 18px;
}

.vehicle-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.vehicle-meta {
  color: #4b5563;
  margin-bottom: 8px;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.main-detail-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
}

.meta-list {
  display: grid;
  gap: 12px;
}

.meta-row {
  padding: 14px;
  background: #f9fafb;
  border-radius: 12px;
}

.paste-box {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  color: #64748b;
}

@media (max-width: 768px) {
  .form-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .page-header {
    align-items: flex-start;
  }

  .topbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

@media (max-width: 900px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }
}