/**
 * Industrial Integrity — Custom CSS Layer
 * Complements Tailwind with design-system specifics
 */

/* === Base === */
body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background-color: #f7f9fb;
  color: #191c1e;
}

/* === Typography === */
.font-display {
  font-family: 'Montserrat', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: 0.25rem;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background-color: #fd761a;
  color: #ffffff;
}
.btn-primary:hover {
  background-color: #9d4300;
}
.btn-secondary {
  background-color: #ffffff;
  color: #1e293b;
  border-color: #c5c6cd;
}
.btn-secondary:hover {
  border-color: #1e293b;
}
.btn-ghost {
  background-color: transparent;
  color: #45474c;
}
.btn-ghost:hover {
  background-color: #eceef0;
}

/* === Cards === */
.card {
  background: #ffffff;
  border: 1px solid #e0e3e5;
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}
.card-hover:hover {
  border-color: #fd761a;
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
}
.badge-verified {
  background-color: #d1fae5;
  color: #065f46;
}
.badge-rating {
  background-color: #1e293b;
  color: #ffffff;
}
.badge-tag {
  background-color: #f2f4f6;
  color: #45474c;
  font-weight: 500;
}

/* === Inputs === */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: #ffffff;
  border: 1px solid #c5c6cd;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #1e293b;
  border-width: 2px;
  padding: calc(0.625rem - 1px) calc(0.875rem - 1px);
}
.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #191c1e;
  margin-bottom: 0.375rem;
}

/* === Checkbox === */
.checkbox {
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid #c5c6cd;
  border-radius: 0.125rem;
  accent-color: #fd761a;
  cursor: pointer;
}

/* === Hero grid pattern === */
.hero-bg {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* === Flash messages === */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.alert-error   { background: #ffdad6; color: #93000a; border: 1px solid #ba1a1a; }
.alert-info    { background: #d8e3fb; color: #111c2d; border: 1px solid #bcc7de; }

/* === Container === */
.container-app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 768px) {
  .container-app { padding: 0 16px; }
}

/* === Leaflet map === */
.leaflet-container {
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif !important;
}

/* === Pagination === */
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #45474c;
  border: 1px solid #e0e3e5;
  background: #ffffff;
}
.page-link.active {
  background: #fd761a;
  color: #ffffff;
  border-color: #fd761a;
}
.page-link:hover:not(.active):not(.disabled) {
  border-color: #1e293b;
  color: #191c1e;
}
.page-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* === Loading spinner === */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #e0e3e5;
  border-top-color: #fd761a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
