/* SanctionSignal - Sanctions Screening Styles
   Font: Inter (body), DM Sans (headings) - Professional corporate typefaces */

/* ===== Base ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem;
  background: #f4f6fa;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.scf-main {
  flex: 1;
}

/* ===== Navbar ===== */
.navbar {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.navbar-brand {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.navbar .nav-link {
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.navbar .nav-link:hover {
  background: rgba(255,255,255,.08);
}

/* ===== Buttons - Professional styling ===== */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}

.btn-lg {
  font-size: 1rem;
  padding: 0.65rem 1.75rem;
  border-radius: 10px;
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37,99,235,.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  border-color: #1e40af;
  box-shadow: 0 3px 8px rgba(37,99,235,.35);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(37,99,235,.3);
}

.btn-outline-primary {
  border-color: #2563eb;
  color: #2563eb;
}
.btn-outline-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37,99,235,.25);
  transform: translateY(-1px);
}

.btn-outline-light {
  border-color: rgba(255,255,255,.3);
}
.btn-outline-light:hover {
  border-color: #fff;
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-danger {
  border-color: rgba(220,38,38,.4);
}
.btn-outline-danger:hover {
  transform: translateY(-1px);
}

.btn-outline-warning {
  border-color: rgba(217,119,6,.4);
}
.btn-outline-warning:hover {
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border-color: #15803d;
  box-shadow: 0 1px 3px rgba(22,163,74,.25);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(22,163,74,.3);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #b91c1c;
  box-shadow: 0 1px 3px rgba(220,38,38,.2);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(220,38,38,.3);
}

/* ===== Form Controls ===== */
.form-control, .form-select {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  padding: 0.55rem 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-label {
  font-weight: 500;
  font-size: 0.8125rem;
  color: #374151;
  margin-bottom: 0.35rem;
}

.form-text {
  font-size: 0.775rem;
  color: #6b7280;
}

/* ===== Footer ===== */
.scf-footer {
  background: #111318;
  border-top: 1px solid rgba(255,255,255,.06);
}

.scf-footer a.link-light {
  opacity: 0.75;
  transition: opacity 0.15s;
  font-size: 0.8125rem;
}
.scf-footer a.link-light:hover {
  opacity: 1;
}

.scf-ssl-badge {
  opacity: 0.7;
  transition: opacity 0.2s;
}
.scf-ssl-badge:hover {
  opacity: 1;
}

/* ===== Paper container for search/results ===== */
.scf-paper {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  padding: 2rem;
}

.scf-paper-scroll {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.scf-paper-scroll::-webkit-scrollbar {
  width: 5px;
}
.scf-paper-scroll::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}
.scf-paper-scroll::-webkit-scrollbar-thumb {
  background: #c1c7d0;
  border-radius: 4px;
}
.scf-paper-scroll::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ===== Source badges ===== */
.badge-uk { background-color: #1d4ed8; color: #fff; font-weight: 500; letter-spacing: 0.02em; }
.badge-eu { background-color: #ca8a04; color: #fff; font-weight: 500; letter-spacing: 0.02em; }
.badge-us { background-color: #dc2626; color: #fff; font-weight: 500; letter-spacing: 0.02em; }

/* Duplicate result highlight — same name appearing more than once / across
   multiple lists. Dark cyan text draws the reviewer's eye to the repeat. */
.scf-result.scf-dup { border-color: #008b8b; background-color: #f0fbfb; }
.scf-result.scf-dup h5,
.scf-result.scf-dup .scf-dup-text { color: #008b8b !important; }
.scf-dup-tag {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #008b8b;
  border: 1px solid #008b8b;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: .4rem;
  vertical-align: middle;
}
/* Colour-code legend shown above results on the Search / Historical screens. */
.scf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; }
.scf-legend .scf-legend-item { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; color: #475569; }
.scf-legend .scf-legend-swatch { width: .85rem; height: .85rem; border-radius: 3px; display: inline-block; }

/* ===== Hero section ===== */
.scf-hero {
  /* Light appears to shine in from the top-right and fall away to the left —
     a pure CSS gradient, no image. */
  background: radial-gradient(130% 120% at 85% 0%, #38537d 0%, #1e2d49 42%, #0f172a 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.scf-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Soft blue "bloom" from the top-right light source. */
  background: radial-gradient(circle at 88% 4%, rgba(96,165,250,.22) 0%, rgba(96,165,250,.05) 30%, transparent 55%);
  pointer-events: none;
}

.scf-hero > .container {
  position: relative;
  z-index: 1;
}

.scf-hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.025em;
}

.scf-hero .lead {
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ===== Stat cards ===== */
.scf-stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.03), 0 2px 8px rgba(0,0,0,.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.scf-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.scf-stat-card .stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  font-family: 'DM Sans', sans-serif;
}

.scf-flag {
  width: 56px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* Uniform flag sizing so the labels beneath line up regardless of each flag's
   aspect ratio (used on the home-page flags row). */
.scf-flag-wrap {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scf-flag-wrap .scf-flag {
  height: 34px;
  width: auto;
}

.scf-stat-card .stat-label {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

/* ===== Map section (water background, admin-configurable) ===== */
.scf-map-section {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
/* Keep labels/subtitle legible over the light scrim on the water image. */
.scf-map-section .stat-label { color: #334155; font-weight: 500; }
.scf-map-section .text-muted { color: #475569 !important; }

/* ===== Map container ===== */
.scf-map-container {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #64748b;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 6px 22px rgba(0,0,0,.10);
}

#scf-map {
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* Map pin icon - remove leaflet default styling */
.scf-pin-icon {
  background: none !important;
  border: none !important;
}

/* Map country labels */
.scf-map-label {
  background: none !important;
  border: none !important;
  white-space: nowrap;
}
.scf-map-label span {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #334155;
  text-shadow: 1px 1px 2px #fff, -1px -1px 2px #fff, 1px -1px 2px #fff, -1px 1px 2px #fff,
               0 0 4px #fff;
  letter-spacing: 0.02em;
}

/* Map popup */
.scf-map-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  font-family: 'Inter', sans-serif;
}
.scf-map-popup .leaflet-popup-tip {
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

/* ===== Auth pages (Login, Register, etc.) ===== */
.scf-auth-card {
  max-width: 560px;
  margin: 0 auto;
}

.scf-login-wrapper {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  background: linear-gradient(180deg, #f4f6fa 0%, #edf0f7 100%);
}

.scf-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 32px rgba(0,0,0,.08);
  padding: 2.5rem;
}

.scf-login-card .scf-login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

.scf-login-card .scf-login-logo i {
  font-size: 1.5rem;
  color: #fff;
}

.scf-login-card h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.25rem;
}

.scf-login-card .scf-login-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.scf-login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.775rem;
  color: #9ca3af;
}
.scf-login-divider::before,
.scf-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ===== Admin sidebar ===== */
.scf-admin-sidebar {
  width: 220px;
  min-height: calc(100vh - 56px);
  background: #111827;
  position: sticky;
  top: 56px;
}

.scf-admin-sidebar .nav-link {
  color: #9ca3af;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  margin: 2px 8px;
  transition: all 0.15s;
}

.scf-admin-sidebar .nav-link:hover,
.scf-admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.scf-admin-sidebar .nav-link i {
  width: 1.5rem;
}

/* ===== Result cards ===== */
.scf-result {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}

.scf-result:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37,99,235,.06);
}

/* ===== Pricing cards ===== */
.scf-pricing-card {
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 2.25rem 2rem;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
}

.scf-pricing-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 24px rgba(37,99,235,.12);
  transform: translateY(-3px);
}

.scf-pricing-card .price {
  font-size: 2.75rem;
  font-weight: 700;
  color: #1e293b;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.02em;
}

.scf-pricing-card .period {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}

.scf-pricing-card h5 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
}

.scf-pricing-featured {
  border-color: #2563eb;
  box-shadow: 0 2px 12px rgba(37,99,235,.1);
}

.scf-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 1rem;
  border-radius: 20px;
}

.scf-payment-info {
  color: #6b7280;
  font-size: 0.8125rem;
}

.scf-payment-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.65;
}
.scf-payment-logos:hover {
  opacity: 0.9;
}
.scf-payment-logos img {
  height: 24px;
}

/* ===== Alerts ===== */
.alert {
  font-size: 0.875rem;
  border-radius: 10px;
  font-weight: 500;
}

/* ===== Cards general ===== */
.card {
  border-radius: 12px;
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}

/* ===== Tables ===== */
.table {
  font-size: 0.85rem;
}
.table th {
  font-weight: 600;
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

/* ===== Historical Searches list ===== */
.scf-history-item {
  transition: background 0.12s;
}
.scf-history-item:hover {
  background: #f8fafc;
}
.scf-history-active {
  background: #eff6ff !important;
  border-left: 3px solid #2563eb !important;
}

/* ===== How It Works - step numbers ===== */
.scf-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37,99,235,.3);
}

/* ===== Print styles ===== */
@media print {
  header, footer, .scf-footer, .btn, nav { display: none !important; }
  .scf-paper { border: none; box-shadow: none; max-width: 100%; }
  .scf-paper-scroll { max-height: none; overflow: visible; }
  body { background: #fff; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .scf-hero { padding: 3rem 0 2.5rem; }
  .scf-hero h1 { font-size: 2rem; }
  .scf-login-card { padding: 1.75rem; margin: 0 1rem; }
}
