/* Car Care - Custom Modern Styles */
:root {
  --primary-color: #0284c7;
  --primary-dark: #0369a1;
  --accent-color: #38bdf8;
  --bg-dark: #0f172a;
  --card-bg: #ffffff;
  --border-subtle: #e2e8f0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
}

/* Header & Nav */
.navbar-carcare {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 2px solid #38bdf8;
}

.brand-badge {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* CAR BLUEPRINT CONTAINER */
.blueprint-wrapper {
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  border: 2px solid #334155;
  border-radius: 20px;
  padding: 1.5rem 1rem;
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.4);
  overflow: hidden;
}

.blueprint-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.blueprint-inner {
  position: relative;
  width: 100%;
  max-width: 290px;
  height: 480px;
  margin: 0 auto;
}

.blueprint-inner svg, .blueprint-inner img {
  width: 100%;
  height: 100%;
  display: block;
}

/* TRIGGER BADGES (+ GUMBI ZA FOTOGRAFIRANJE) */
.camera-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Coordinates on the 290x480 blueprint */
.camera-spot.spot-front {
  top: 8%;
  left: 50%;
}

.camera-spot.spot-rear {
  top: 92%;
  left: 50%;
}

.camera-spot.spot-left {
  top: 50%;
  left: 4%;
}

.camera-spot.spot-right {
  top: 50%;
  left: 96%;
}

.camera-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 3px solid #ffffff;
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.camera-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.9);
  background: #38bdf8;
  color: #0f172a;
}

.camera-btn:active {
  transform: scale(0.95);
}

/* Pulsing effect when photo is not yet taken */
.camera-btn.pulse {
  animation: pulse-ring 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(56, 189, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

/* Thumbnail preview inside the button after photo taken */
.camera-btn.has-photo {
  border-color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.8);
  animation: none;
}

.camera-btn img.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.check-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #22c55e;
  color: #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  display: none;
}

.camera-btn.has-photo .check-badge {
  display: flex;
}

.spot-label {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* PIN Verification Modal / Box */
body.pin-locked .container,
body.pin-locked nav {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

body.pin-locked .modal {
  filter: none !important;
  pointer-events: auto !important;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  height: 60px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.pin-key:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pin-key:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  background: transparent;
  transition: all 0.2s;
}

.pin-dot.filled {
  background: #0284c7;
  border-color: #0284c7;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

/* Card Enhancements */
.card-carcare {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-carcare:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.stat-card {
  border-radius: 16px;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

/* Map View */
#inspection-map {
  height: 350px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

/* Photo Gallery in Admin View */
.photo-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #0f172a;
  position: relative;
}

.photo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s;
  cursor: pointer;
}

.photo-card:hover img {
  transform: scale(1.04);
}

.photo-badge-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* Print Specific */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
  }
  .card-carcare {
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
  }
}
