* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f7f6;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.back-link {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: white;
  text-decoration: none;
  font-weight: bold;
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  transition: background 0.3s ease;
}

.back-link:hover {
  background: rgba(255,255,255,0.3);
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.admin-form {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.form-section:last-child {
  border-bottom: none;
}

.form-section h2 {
  color: #1e3c72;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

input[type="text"],
input[type="number"],
select,
input[type="file"] {
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

#imagePreview {
  margin-top: 15px;
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  object-fit: cover;
}

/* Hasar Şeması Stilleri */
.schema-wrap {
  position: relative;
  width: 400px;
  margin: 20px auto;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
}

.schema-wrap img {
  width: 100%;
  display: block;
}

.part {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(0,200,0,0.4);
  border: 2px solid rgba(0,200,0,0.8);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.part:hover {
  transform: scale(1.1);
}

/* Durumlar: Temiz (yeşil), Boyalı (Sarı), Değişen (Kırmızı) */
.part.boyali {
  background: rgba(255, 165, 0, 0.5);
  border-color: rgba(255, 165, 0, 0.9);
}

.part.degisen {
  background: rgba(255, 0, 0, 0.5);
  border-color: rgba(255, 0, 0, 0.9);
}

/* Koordinatlar (Varsayımsal, schema img sine göre) */
.front { top: 10%; left: 45%; }
.rear { bottom: 10%; left: 45%; }
.left { top: 45%; left: 20%; }
.right { top: 45%; right: 20%; }

.help-text {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-bottom: 10px;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

button[type="submit"] {
  background: #1e3c72;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(30, 60, 114, 0.3);
}

button[type="submit"]:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#statusMessage {
  margin-top: 15px;
  font-weight: bold;
  font-size: 1rem;
}

.status-success { color: #28a745; }
.status-error { color: #dc3545; }
.status-loading { color: #1e3c72; }

/* Galeri Seçici Stilleri */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}

.gallery-item {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item.selected {
  border-color: #2a5298;
  box-shadow: 0 4px 10px rgba(42,82,152,0.3);
  transform: scale(1.05);
}
