:root {
  --bg: #07131f;
  --bg-soft: rgba(255,255,255,0.04);
  --panel: rgba(12, 30, 48, 0.88);
  --panel-strong: #0f2740;
  --text: #f5f8ff;
  --muted: #b8c5d6;
  --line: rgba(255,255,255,0.12);
  --accent: #7cfc00;
  --accent-2: #c5ff87;
  --danger: #d85858;
  --shadow: 0 24px 60px rgba(0,0,0,0.28);
}

html[data-theme="light"] {
  --bg: #f5f8fb;
  --bg-soft: rgba(8, 23, 38, 0.04);
  --panel: rgba(255,255,255,0.96);
  --panel-strong: #ffffff;
  --text: #0d2032;
  --muted: #5f7286;
  --line: rgba(13,32,50,0.1);
  --accent: #7ccf1c;
  --accent-2: #0f2740;
  --shadow: 0 18px 40px rgba(12,30,48,0.1);
}

html[data-theme="auto"] { color-scheme: dark light; }
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    --bg: #f5f8fb;
    --bg-soft: rgba(8, 23, 38, 0.04);
    --panel: rgba(255,255,255,0.96);
    --panel-strong: #ffffff;
    --text: #0d2032;
    --muted: #5f7286;
    --line: rgba(13,32,50,0.1);
    --accent: #7ccf1c;
    --accent-2: #0f2740;
    --shadow: 0 18px 40px rgba(12,30,48,0.1);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top right, rgba(124,252,0,0.08), transparent 35%), var(--bg);
  color: var(--text);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}
.brand img {
  height: 54px;
  width: auto;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.22));
}
.site-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav-link {
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 999px;
  transition: .25s ease;
}
.nav-link:hover, .nav-link.is-active {
  color: var(--text);
  background: var(--bg-soft);
}

.theme-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.theme-chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  transition: .25s ease;
}
.theme-chip.is-active,
.theme-chip:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.flash { padding: 12px 0; border-bottom: 1px solid var(--line); }
.flash-success { background: rgba(124,252,0,0.12); }
.flash-error { background: rgba(216,88,88,0.14); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
}
.hero-home .hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(124,252,0,0.18), transparent 26%),
    linear-gradient(135deg, rgba(15,39,64,0.9), rgba(6,18,28,0.95)),
    url('../uploads/mercedes-c200-style/01.webp') center/cover no-repeat;
  opacity: 0.92;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  gap: 28px;
  align-items: stretch;
}
.hero-copy, .hero-showcase, .panel, .finance-card, .vehicle-card, .trust-item, .map-card, .contact-card, .auth-card, .admin-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-copy {
  padding: 44px;
}
.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.04;
  margin: 16px 0;
}
.hero-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 62ch;
}
.hero-actions, .contact-actions, .form-actions, .admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.hero-points {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: var(--accent-2);
  font-weight: 600;
}
.badge-inline {
  display: inline-flex;
  padding: 10px 14px;
  background: rgba(124,252,0,0.12);
  border: 1px solid rgba(124,252,0,0.22);
  border-radius: 999px;
}

.hero-showcase { padding: 18px; }
.hero-slider {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .55s ease, transform .55s ease;
  transform: scale(1.03);
}
.slide.is-active {
  opacity: 1;
  transform: scale(1);
  position: relative;
}
.slide img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}
.slide-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  background: linear-gradient(180deg, rgba(7,19,31,0.1), rgba(7,19,31,0.9));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 20px;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(7,19,31,0.68);
  color: white;
  cursor: pointer;
  z-index: 2;
  font-size: 28px;
}
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.slider-dots button {
  width: 11px; height: 11px;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.slider-dots button.is-active { background: var(--accent); }

.trust-strip {
  margin-top: -20px;
  padding-bottom: 20px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.trust-item {
  padding: 22px;
}
.trust-item strong { display: block; margin-bottom: 8px; font-size: 1.05rem; }
.trust-item span { color: var(--muted); line-height: 1.65; }

.section { padding: 78px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(124,252,0,0.03), transparent); }
.section-heading { max-width: 760px; margin-bottom: 28px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(1.8rem, 3vw, 3rem); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.3fr .9fr .9fr;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 24px;
  margin-bottom: 28px;
}
.filter-bar input,
.filter-bar select,
.contact-form input,
.contact-form textarea,
.contact-form select,
.vehicle-form input,
.vehicle-form textarea,
.vehicle-form select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-strong) 86%, transparent);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}
.filter-bar input:focus,
.filter-bar select:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus,
.vehicle-form input:focus,
.vehicle-form textarea:focus,
.vehicle-form select:focus {
  border-color: color-mix(in srgb, var(--accent) 70%, white 10%);
  box-shadow: 0 0 0 4px rgba(124,252,0,.12);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 22px;
}
.hidden { display: none !important; }

.vehicle-card {
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.vehicle-card:hover { transform: translateY(-6px); }
.vehicle-media {
  position: relative;
  overflow: hidden;
}
.vehicle-media img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.vehicle-card:hover .vehicle-media img { transform: scale(1.04); }
.vehicle-status {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.status-dostupno { background: rgba(124,252,0,.92); color: #07131f; }
.status-rezervisano { background: rgba(255,180,0,.92); color: #07131f; }
.status-prodato { background: rgba(216,88,88,.92); color: white; }
.status-standard { background: rgba(255,255,255,.15); color: white; }
.vehicle-body { padding: 22px; }
.vehicle-header-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}
.vehicle-header-line h3 { margin: 8px 0 0; font-size: 1.22rem; }
.price-block { text-align: right; }
.price-current { font-size: 1.2rem; font-weight: 800; }
.price-old {
  display: block;
  color: var(--muted);
  text-decoration: line-through;
  font-size: .92rem;
  margin-top: 6px;
}
.vehicle-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 14px;
}
.vehicle-specs span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: .9rem;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.badge-pill {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: .77rem;
  font-weight: 700;
  background: rgba(124,252,0,.12);
  border: 1px solid rgba(124,252,0,.2);
  color: color-mix(in srgb, var(--accent) 86%, white 6%);
}
.card-text, .muted, .footer-copy, .contact-list, .tip-card span, .detail-text p {
  color: var(--muted);
  line-height: 1.75;
}

.finance-grid, .contact-grid, .two-col-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}
.finance-card {
  padding: 26px;
}
.finance-card h3 { margin-top: 0; }
.finance-card ul { padding-left: 18px; color: var(--muted); line-height: 1.75; }
.contact-grid { grid-template-columns: .95fr 1.05fr; }
.contact-card, .map-card { padding: 28px; }
.map-card iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .25s ease;
}
.button-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 74%, white 18%));
  color: #07131f;
}
.button-primary:hover { transform: translateY(-2px); }
.button-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--line);
}
.button-secondary:hover { border-color: rgba(124,252,0,.35); color: var(--accent); }
.button-danger {
  background: rgba(216,88,88,.14);
  color: #ffb9b9;
  border-color: rgba(216,88,88,.2);
}
.button-small { min-height: 40px; padding: 0 14px; font-size: .92rem; }

.detail-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
}
.detail-gallery, .detail-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.main-preview img {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.thumb-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
}
.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}
.thumb.is-active { border-color: var(--accent); }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.detail-topline, .detail-price, .detail-spec-grid, .status-grid, .upload-grid, .contact-list { display: flex; }
.detail-topline, .detail-price { justify-content: space-between; align-items: center; gap: 12px; }
.detail-panel h1 { margin: 10px 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); }
.detail-spec-grid {
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}
.detail-spec-grid > div {
  width: calc(50% - 6px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 16px;
}
.detail-spec-grid span { display: block; color: var(--muted); margin-bottom: 8px; font-size: .9rem; }
.badge-row-large { margin: 16px 0 18px; }
.sticky-contact {
  position: sticky;
  bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 96%, transparent));
}

.panel { padding: 28px; }
.panel-soft {
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 20px;
}
.form-layout, .admin-layout { display: grid; gap: 22px; }
.vehicle-form .form-grid,
.contact-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
}
.vehicle-form .full,
.contact-form .full { grid-column: 1 / -1; }
.upload-grid {
  gap: 18px;
  align-items: start;
  margin: 22px 0;
}
.upload-grid > * { flex: 1 1 0; }
.status-grid {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.checkbox {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--bg-soft);
}
.checkbox input { width: auto; accent-color: var(--accent); }

.upload-dropzone {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 180px;
  text-align: center;
  border: 2px dashed rgba(124,252,0,.25);
  border-radius: 22px;
  background: rgba(124,252,0,.05);
  padding: 24px;
  cursor: pointer;
}
.upload-dropzone input {
  display: none !important;
}
.upload-dropzone.is-dragging {
  background: rgba(124,252,0,.12);
  border-color: var(--accent);
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
.preview-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
}
.preview-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.preview-card span {
  display: block;
  padding: 10px 12px;
  font-size: .88rem;
  color: var(--muted);
}

.admin-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
}
.admin-tips { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.tip-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.tip-card strong { display: block; margin-bottom: 8px; }
.admin-table {
  overflow: auto;
}
.admin-table table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th, .admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table td span { display: block; color: var(--muted); font-size: .92rem; margin-top: 6px; }
.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.actions-cell form { margin: 0; }

.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 36px 0;
}
.auth-card {
  width: min(560px, calc(100% - 32px));
  padding: 36px;
}
.auth-brand { margin-bottom: 22px; display: inline-block; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 26px;
}
.footer-logo { height: 56px; width: auto; }
.footer-links {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.footer-links a:hover { color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 56px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }

@media (max-width: 1080px) {
  .hero-grid, .detail-layout, .contact-grid, .footer-grid, .finance-grid, .two-col-grid {
    grid-template-columns: 1fr;
  }
  .vehicle-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .trust-grid, .admin-tips { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .nav-wrap { grid-template-columns: 1fr; padding: 14px 0; }
  .site-nav { justify-content: flex-start; overflow: auto; }
  .theme-switcher { justify-content: flex-start; }
  .hero-copy, .panel, .finance-card, .contact-card, .map-card, .detail-gallery, .detail-panel { padding: 20px; }
  .filter-bar, .vehicle-form .form-grid, .contact-form .form-grid, .detail-spec-grid, .thumb-grid, .vehicle-grid { grid-template-columns: 1fr; }
  .thumb-grid { grid-template-columns: repeat(2,1fr); }
  .detail-spec-grid > div { width: 100%; }
  .admin-heading { flex-direction: column; align-items: start; }
  .preview-grid { grid-template-columns: 1fr; }
  .slide img { min-height: 340px; }
}


.cover-pick{display:flex;align-items:center;gap:.45rem;font-size:.9rem;color:var(--muted);margin-top:.4rem}
.cover-pick input{accent-color:var(--accent)}
.preview-card{cursor:pointer}
.preview-card.is-existing{border-style:solid}


.gallery-admin-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:8px; }
.preview-card { position:relative; }
.preview-card .drag-handle {
  position:absolute;
  top:10px;
  left:10px;
  width:34px;
  height:34px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(7,19,31,.72);
  color:#fff;
  z-index:2;
  font-size:1rem;
  cursor:grab;
  border:1px solid rgba(255,255,255,.15);
}
.preview-card .preview-remove {
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border:0;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(180,32,32,.92);
  color:#fff;
  z-index:2;
  font-size:1.2rem;
  line-height:1;
  cursor:pointer;
  box-shadow:var(--shadow);
}
.preview-card.is-dragging { opacity:.45; transform:scale(.98); }
.preview-card .cover-pick { padding: 0 12px 12px; }
.preview-card .cover-pick input { margin-right:6px; }
