/* =============================================
   4.2 Veículos — Global Styles
   ============================================= */

:root {
  --red:        #c0392b;
  --red-dark:   #a93226;
  --red-light:  #e74c3c;
  --gray-900:   #1a1a1a;
  --gray-800:   #2b2b2b;
  --gray-700:   #3a3a3a;
  --gray-600:   #555;
  --gray-400:   #999;
  --gray-200:   #e0e0e0;
  --gray-100:   #f4f4f4;
  --white:      #fff;
  --shadow:     0 2px 12px rgba(0,0,0,.18);
  --radius:     8px;
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-900);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* ---- Header ---- */
.site-header {
  background: var(--gray-800);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.site-logo img {
  height: 48px;
  width: auto;
  border-radius: 4px;
}
.site-logo .logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .03em;
}
.site-logo .logo-text span { color: var(--red); }

.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a {
  color: var(--gray-200);
  font-weight: 500;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.site-nav a:hover, .site-nav a.active {
  color: var(--white);
  border-color: var(--red);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: .4rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .hamburger { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--gray-800);
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--gray-700);
    padding: .5rem 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: .75rem 1.5rem;
    border-bottom: none;
    border-left: 3px solid transparent;
    width: 100%;
  }
  .site-nav a:hover { border-left-color: var(--red); }
}

/* ---- Main Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
main { padding: 2rem 0; }

/* ---- Hero Banner ---- */
.hero {
  background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 60%);
  border-bottom: 1px solid var(--gray-700);
  padding: 3rem 1rem;
  text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: .5rem; }
.hero h1 span { color: var(--red); }
.hero p { color: var(--gray-400); font-size: 1.1rem; }

/* ---- Filter Bar ---- */
.filter-bar {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}
.filter-bar label { font-size: .8rem; color: var(--gray-400); display: block; margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .05em; }
.filter-group { flex: 1 1 160px; min-width: 140px; }
.filter-bar input,
.filter-bar select {
  width: 100%;
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  color: var(--white);
  padding: .55rem .75rem;
  border-radius: 6px;
  transition: border-color var(--transition);
}
.filter-bar input:focus,
.filter-bar select:focus {
  outline: none;
  border-color: var(--red);
}
.filter-bar select option { background: var(--gray-700); }
.btn-filter {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .6rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
  align-self: flex-end;
  white-space: nowrap;
}
.btn-filter:hover { background: var(--red-dark); }
.btn-clear {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid var(--gray-600);
  padding: .6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
  transition: all var(--transition);
  align-self: flex-end;
}
.btn-clear:hover { color: var(--white); border-color: var(--gray-400); }

/* ---- Results Count ---- */
.results-info {
  color: var(--gray-400);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.results-info strong { color: var(--white); }

/* ---- Car Grid ---- */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.car-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  border-color: var(--red);
}
.car-card.destaque { border-color: var(--red); }
.destaque-badge {
  position: absolute;
  top: .6rem; left: .6rem;
  background: var(--red);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.vendido-badge {
  position: absolute;
  top: .6rem; right: .6rem;
  background: rgba(0,0,0,.75);
  color: var(--gray-200);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.car-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--gray-700);
}
.car-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.car-card:hover .car-thumb img { transform: scale(1.04); }
.car-thumb .no-photo {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  gap: .5rem;
  font-size: .9rem;
}
.car-thumb .no-photo svg { opacity: .4; }

.car-body { padding: 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.car-name { font-size: 1.05rem; font-weight: 700; color: var(--white); }
.car-year { font-size: .85rem; color: var(--gray-400); }
.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .2rem;
}
.spec-tag {
  background: var(--gray-700);
  color: var(--gray-200);
  font-size: .75rem;
  padding: .2rem .55rem;
  border-radius: 4px;
}
.car-km { font-size: .85rem; color: var(--gray-400); margin-top: .1rem; }

.car-footer {
  padding: .75rem 1.1rem 1rem;
  border-top: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.car-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--red-light);
}
.car-price.consultar { color: var(--gray-400); font-size: 1rem; font-weight: 600; font-style: italic; }

.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 6px; font-weight: 600; font-size: .9rem; cursor: pointer; border: none; transition: all var(--transition); text-align: center; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; border: 1px solid var(--gray-500, #777); color: var(--gray-200); }
.btn-outline:hover { border-color: var(--white); color: var(--white); }
.btn-green { background: #25d366; color: #fff; }
.btn-green:hover { background: #1ebe5d; }
.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
.btn-lg { padding: .8rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-400);
}
.empty-state svg { margin: 0 auto 1rem; opacity: .3; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: .4rem; color: var(--gray-200); }

/* ---- WhatsApp Floating ---- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
}
.whatsapp-float .wf-toggle {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float .wf-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,211,102,.5);
}
.whatsapp-float .wf-toggle svg { width: 30px; height: 30px; fill: #fff; }

.wf-menu {
  display: none;
  flex-direction: column;
  gap: .4rem;
  align-items: flex-end;
}
.wf-menu.open { display: flex; }
.wf-menu a {
  background: var(--gray-800);
  border: 1px solid #25d366;
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: 24px;
  font-size: .9rem;
  font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
  box-shadow: var(--shadow);
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.wf-menu a:hover { background: #25d366; transform: translateX(-2px); }
.wf-menu a .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #25d366;
  flex-shrink: 0;
}
.wf-menu a:hover .dot { background: #fff; }

/* ---- Section Titles ---- */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

/* ---- Detail Page ---- */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--gray-400);
  font-size: .9rem;
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}
.detail-back:hover { color: var(--white); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* Gallery */
.gallery-main {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray-800);
  cursor: zoom-in;
  position: relative;
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery-main:hover img { transform: scale(1.02); }
.gallery-main .no-photo {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gray-600); gap: .5rem;
}
.gallery-thumbs {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-600) transparent;
}
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--gray-600); border-radius: 2px; }

.gallery-thumb {
  flex-shrink: 0;
  width: 72px; height: 52px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
  opacity: .7;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--red); opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,.6);
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  background: none; border: none;
  color: var(--white); font-size: 2rem;
  cursor: pointer; line-height: 1;
  opacity: .8; transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none; color: var(--white);
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter {
  position: absolute;
  bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: var(--gray-400); font-size: .85rem;
}

/* Specs Card */
.detail-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-card-header {
  background: var(--red);
  padding: 1rem 1.25rem;
}
.detail-card-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}
.detail-card-header .ano { font-size: .9rem; opacity: .85; margin-top: .1rem; }

.spec-list { list-style: none; padding: 0; }
.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem 1.25rem;
  border-bottom: 1px solid var(--gray-700);
  gap: 1rem;
}
.spec-item:last-child { border-bottom: none; }
.spec-label { color: var(--gray-400); font-size: .9rem; }
.spec-value { color: var(--white); font-weight: 600; font-size: .9rem; text-align: right; }
.spec-value.price-big { color: var(--red-light); font-size: 1.3rem; font-weight: 800; }
.spec-value.consultar-big { color: var(--gray-400); font-size: 1rem; font-style: italic; }

.detail-cta { padding: 1.25rem; display: flex; flex-direction: column; gap: .65rem; }
.detail-cta .divider { text-align: center; color: var(--gray-600); font-size: .8rem; margin: .2rem 0; }

/* Opcionais */
.opcionais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}
.opcional-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--gray-200);
  font-size: .9rem;
}
.opcional-item svg { color: var(--red); flex-shrink: 0; }

/* Financing Info */
.financing-box {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.financing-box h3 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: .75rem; }
.financing-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.financing-list li {
  color: var(--gray-200);
  font-size: .9rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.financing-list li::before { content: '✔'; color: var(--red); flex-shrink: 0; font-size: .8rem; }

/* Contact */
.contact-box {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.contact-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.contact-list li { font-size: .9rem; color: var(--gray-200); }

/* ---- Address Bar ---- */
.address-bar {
  background: var(--gray-800);
  border-top: 1px solid var(--gray-700);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--gray-400);
  font-size: .9rem;
}
.address-bar a { color: var(--red-light); }
.address-bar a:hover { color: var(--red); }

/* ---- Footer ---- */
.site-footer {
  background: var(--gray-900);
  border-top: 3px solid var(--red);
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--gray-600);
  font-size: .85rem;
}
.site-footer strong { color: var(--gray-400); }

/* ---- Admin ---- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background: var(--gray-800);
  border-right: 1px solid var(--gray-700);
  padding: 1.5rem 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar .sb-logo {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-700);
  margin-bottom: 1rem;
}
.admin-sidebar .sb-logo img { height: 40px; }
.admin-sidebar .sb-logo .sb-title { font-size: .95rem; font-weight: 700; margin-top: .4rem; color: var(--white); }
.admin-sidebar .sb-title span { color: var(--red); }

.sb-nav { flex: 1; }
.sb-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.25rem;
  color: var(--gray-400);
  font-size: .92rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sb-nav a:hover, .sb-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,.04);
  border-left-color: var(--red);
}
.sb-nav a svg { flex-shrink: 0; opacity: .7; }
.sb-nav a:hover svg, .sb-nav a.active svg { opacity: 1; }

.admin-content { flex: 1; background: var(--gray-900); overflow-y: auto; }
.admin-topbar {
  background: var(--gray-800);
  border-bottom: 1px solid var(--gray-700);
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-topbar h1 { font-size: 1.1rem; font-weight: 700; }
.admin-main { padding: 1.5rem; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
thead th {
  background: var(--gray-700);
  color: var(--gray-200);
  padding: .7rem 1rem;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-700);
  color: var(--gray-200);
  vertical-align: middle;
}
tbody tr:hover { background: rgba(255,255,255,.02); }
tbody tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-green { background: rgba(37,211,102,.15); color: #25d366; }
.badge-red { background: rgba(192,57,43,.2); color: var(--red-light); }
.badge-yellow { background: rgba(243,156,18,.15); color: #f39c12; }

.actions { display: flex; gap: .4rem; align-items: center; }

/* Admin Forms */
.form-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.form-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--gray-700);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .8rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.form-control {
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  color: var(--white);
  padding: .6rem .8rem;
  border-radius: 6px;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--red); }
.form-control::placeholder { color: var(--gray-600); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control option { background: var(--gray-800); }

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .5rem;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  color: var(--gray-200);
  font-size: .88rem;
  padding: .25rem 0;
}
.checkbox-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

/* Photo Upload */
.upload-area {
  border: 2px dashed var(--gray-600);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--gray-900);
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--red); background: rgba(192,57,43,.06); }
.upload-area p { color: var(--gray-400); font-size: .9rem; margin-top: .5rem; }
.upload-area strong { color: var(--white); }
#file-input { display: none; }

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}
.photo-preview-item {
  position: relative;
  width: 100px;
  cursor: grab;
}
.photo-preview-item img {
  width: 100px; height: 72px;
  object-fit: cover;
  border-radius: 5px;
  border: 2px solid transparent;
}
.photo-preview-item.principal img { border-color: var(--red); }
.photo-preview-item .remove-photo {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none; cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.photo-preview-item .set-principal {
  display: block;
  width: 100%;
  text-align: center;
  font-size: .68rem;
  color: var(--gray-400);
  background: none; border: none; cursor: pointer;
  margin-top: .2rem;
  padding: 0;
  transition: color var(--transition);
}
.photo-preview-item .set-principal:hover,
.photo-preview-item.principal .set-principal { color: var(--red-light); }
.photo-preview-item.principal .set-principal::before { content: '★ '; }

/* Existing photos (edit mode) */
.existing-photos { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.existing-photo {
  position: relative;
  width: 100px;
}
.existing-photo img {
  width: 100px; height: 72px;
  object-fit: cover;
  border-radius: 5px;
  border: 2px solid transparent;
}
.existing-photo.principal img { border-color: var(--red); }
.existing-photo .remove-existing {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gray-600);
  color: #fff;
  border: none; cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.existing-photo .set-principal-existing {
  display: block;
  width: 100%;
  text-align: center;
  font-size: .68rem;
  color: var(--gray-400);
  background: none; border: none; cursor: pointer;
  margin-top: .2rem;
  padding: 0;
}
.existing-photo.principal .set-principal-existing { color: var(--red-light); }
.existing-photo.principal .set-principal-existing::before { content: '★ '; }

/* Alert Messages */
.alert {
  padding: .8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.alert-success { background: rgba(37,211,102,.12); border: 1px solid rgba(37,211,102,.3); color: #2ecc71; }
.alert-error { background: rgba(192,57,43,.15); border: 1px solid rgba(192,57,43,.3); color: var(--red-light); }

/* Stats Cards */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.stat-card .stat-label { font-size: .8rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--white); margin-top: .25rem; }
.stat-card .stat-value.red { color: var(--red-light); }

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-900);
  padding: 1rem;
}
.login-box {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.login-box .login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-box .login-logo img { height: 56px; margin: 0 auto .75rem; }
.login-box h1 { font-size: 1.2rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; color: var(--gray-200); }
.login-box h1 span { color: var(--red); }

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    left: -240px;
    top: 0; bottom: 0;
    z-index: 300;
    transition: left var(--transition);
  }
  .admin-sidebar.open { left: 0; }
  .admin-layout { display: block; }
  .admin-content { min-height: 100vh; }
}

/* Utility */
.text-red { color: var(--red-light); }
.text-muted { color: var(--gray-400); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .detail-cta .btn-lg { padding: .7rem 1rem; }
}
