/* ============== Fonts ============== */
@import url('https://fonts.cdnfonts.com/css/kabel');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600;700&display=swap');

/* ============== Reset & Base ============== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Kabel', 'Futura', 'Century Gothic', 'Arial Rounded MT Bold', -apple-system, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ============== Utility Classes ============== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: #666; }

/* ============== Buttons ============== */
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
  font-size: 1em;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary { background: #f0f0f0; color: #333; }
.btn-secondary:hover { background: #e0e0e0; }

.btn-success { background: #28a745; color: white; }
.btn-success:hover:not(:disabled) { background: #218838; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-large { font-size: 1.3em; padding: 18px 50px; }

/* ============== Spinner ============== */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============== Loading Overlay ============== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-overlay.show { display: flex; }

.loading-content {
  background: white;
  padding: 50px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
}

.loading-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 25px;
}

.loading-content h3 { color: #333; margin-bottom: 10px; }
.loading-content p { color: #666; }

/* ============== Form Elements ============== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.form-group { margin-bottom: 5px; }

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group .hint {
  font-size: 0.85em;
  color: #888;
  font-weight: normal;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1em;
  transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* ============== Upload Area ============== */
.upload-area {
  border: 3px dashed #e0e0e0;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

.upload-area:hover { border-color: #667eea; background: #f5f7ff; }
.upload-area.has-file { border-color: #28a745; background: #f0fff4; border-style: solid; }
.upload-area .icon { font-size: 2.5em; margin-bottom: 10px; }
.upload-area .text { color: #666; }
.upload-area .text strong { color: #667eea; }
.upload-area input[type="file"] { display: none; }

.upload-preview { margin-top: 15px; }
.upload-preview img {
  max-width: 150px;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.upload-preview .filename { margin-top: 8px; font-size: 0.85em; color: #28a745; font-weight: 600; }

.remove-btn {
  margin-top: 10px;
  padding: 6px 14px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  font-family: inherit;
}
.remove-btn:hover { background: #ee5a5a; }

/* ============== Info Box ============== */
.info-box {
  background: #e8f4fd;
  border-left: 4px solid #667eea;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}
.info-box h4 { color: #1a5f9e; margin-bottom: 8px; }
.info-box p { color: #2c7bbf; line-height: 1.5; }

/* ============== Sections ============== */
.section {
  background: white;
  border-radius: 16px;
  padding: 35px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 25px;
}

.section h2 { color: #667eea; margin-bottom: 8px; font-size: 1.5em; }
.section-subtitle { color: #666; margin-bottom: 25px; }

/* ============== Responsive ============== */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .btn-large { font-size: 1.1em; padding: 14px 30px; }
}
