:root {
  --bg: #0a0e17;
  --bg-2: #0d1220;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --gold: #f5b942;
  --text: #e8ebf3;
  --text-muted: #8b93a7;
  --danger: #ff6b6b;
  --success: #34d399;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3, .brand-text, .stat-value {
  font-family: 'Sora', 'Inter', sans-serif;
}

.text-accent { color: var(--accent-2); }
.text-muted { color: var(--text-muted) !important; }

/* Background glow */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}
.bg-glow-1 {
  width: 500px; height: 500px;
  top: -150px; left: -100px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
}
.bg-glow-2 {
  width: 600px; height: 600px;
  top: 200px; right: -200px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
}

/* Navbar */
.app-navbar {
  background: rgba(10, 14, 23, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
  padding: 0.9rem 0;
}
.app-brand { display: flex; align-items: center; gap: 0.5rem; }
.brand-mark { font-size: 1.4rem; }
.brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.zone-badge {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.45rem 0.9rem;
}
.btn-refresh {
  background: linear-gradient(135deg, var(--accent), #5a3fd9);
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-refresh:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.35);
}

/* Hero */
.hero { position: relative; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}
.hero-title {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 620px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(10px);
  transition: transform 0.15s ease;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card-accent {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.1));
  border-color: rgba(124, 92, 255, 0.35);
}
.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Filter bar */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
}
.filter-bar .form-select,
.filter-bar .form-control,
.input-group-text {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--surface-border);
  color: var(--text);
}
.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.2);
  color: var(--text);
}
.filter-bar .form-select option { background: var(--bg-2); color: var(--text); }
.input-group-search .input-group-text { border-right: none; }
.input-group-search .form-control { border-left: none; }

/* Status tabs */
.status-tabs {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.35rem;
  display: inline-flex;
  gap: 0.25rem;
  width: fit-content;
}
.status-tabs .nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  transition: all 0.15s ease;
}
.status-tabs .nav-link:hover { color: var(--text); }
.status-tabs .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5a3fd9);
}
.tab-count {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
}
.status-tabs .nav-link.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Day groups */
.day-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--surface-border);
}
.day-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  text-transform: capitalize;
}
.day-count {
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent-2);
  border: 1px solid rgba(124, 92, 255, 0.3);
  font-weight: 600;
  padding: 0.35rem 0.7rem;
}

/* Prospect card */
.prospect-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.prospect-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.prospect-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.prospect-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(34, 211, 238, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  overflow: hidden;
}
.prospect-logo img { width: 100%; height: 100%; object-fit: contain; }
.prospect-name {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.category-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: capitalize;
  padding: 0.25rem 0.6rem;
}
.prospect-address {
  line-height: 1.4;
}
.prospect-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.flag-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.25);
}
.flag-badge.flag-nosite {
  background: rgba(245, 185, 66, 0.12);
  color: var(--gold);
  border-color: rgba(245, 185, 66, 0.3);
}
.prospect-contacts {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.prospect-contacts a { color: var(--text-muted); text-decoration: none; }
.prospect-contacts a:hover { color: var(--accent-2); }
.prospect-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.5rem;
}
.btn-contact {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}
.btn-contact:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.btn-contact-primary {
  background: linear-gradient(135deg, var(--accent), #5a3fd9);
  border: none;
  color: #fff;
}
.btn-contact-primary:hover { color: #fff; box-shadow: 0 6px 16px rgba(124, 92, 255, 0.35); }

/* Validation */
.prospect-card.is-validated {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.06), var(--surface));
}
.prospect-validation { margin-top: -0.2rem; }
.validated-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  width: fit-content;
}
.btn-validate {
  flex: 1 1 100%;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  text-align: center;
  transition: all 0.15s ease;
}
.btn-validate:hover { background: rgba(52, 211, 153, 0.2); color: var(--success); }
.btn-unvalidate {
  flex: 1 1 100%;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  border: 1px solid rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.08);
  color: var(--danger);
  text-align: center;
  transition: all 0.15s ease;
}
.btn-unvalidate:hover { background: rgba(255, 107, 107, 0.18); color: var(--danger); }

.btn-details-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, 0.3);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.12));
  color: var(--accent-2);
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-details-icon svg { width: 14px; height: 14px; }
.btn-details-icon:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.5);
  transform: translateY(-2px) scale(1.1) rotate(-4deg);
}
.btn-details-icon:active {
  transform: translateY(0) scale(0.94);
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.3);
}
.btn-details-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.35);
}

/* Details modal */
.details-modal-content {
  background: var(--bg-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  color: var(--text);
}
.details-modal-content .modal-header,
.details-modal-content .modal-footer {
  border-color: var(--surface-border);
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.modal-logo { width: 52px; height: 52px; font-size: 1.5rem; }
.modal-section { margin-bottom: 1.25rem; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.modal-description {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}
#modalContacts { font-size: 0.9rem; }
#modalActions { gap: 0.5rem; }

.empty-state, #loadingState { color: var(--text-muted); }
.empty-icon { font-size: 3rem; }

.app-footer {
  border-top: 1px solid var(--surface-border);
}

@media (max-width: 767px) {
  .hero { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}
