:root {
  --bg: #07110e;
  --bg-2: #0c1814;
  --panel: rgba(18, 32, 27, 0.78);
  --panel-strong: rgba(20, 38, 32, 0.92);
  --line: rgba(134, 190, 160, 0.24);
  --line-strong: rgba(245, 176, 66, 0.5);
  --text: #eef8f3;
  --muted: #a9bdb3;
  --green: #25d366;
  --green-deep: #159447;
  --red: #d3222f;
  --gold: #f5b042;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(21, 148, 71, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(211, 34, 47, 0.13), transparent 32%),
    linear-gradient(180deg, #09140f 0%, #07110e 42%, #0b1512 100%);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 80%);
}

::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #07110e;
}

::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(245, 176, 66, 0.72);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 5vw, 58px) clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.06), transparent 34%),
    rgba(10, 24, 19, 0.72);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-deep), #0c0f0d 48%, var(--red));
}

.brand-shell {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.site-header > *,
.toolbar > *,
.search-panel > * {
  min-width: 0;
}

.brand {
  display: grid;
  place-items: center;
  width: 170px;
  height: 86px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.brand img {
  width: 154px;
  max-height: 76px;
  object-fit: contain;
}

.title-block {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
}

.subline {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.search-box {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
}

.search-box input {
  width: 100%;
  min-height: 60px;
  border: 1px solid rgba(72, 187, 142, 0.42);
  border-radius: 999px;
  padding: 0 20px 0 54px;
  outline: none;
  background: rgba(20, 40, 32, 0.7);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.search-box input::placeholder {
  color: rgba(238, 248, 243, 0.56);
}

.search-box input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 176, 66, 0.15), 0 18px 34px rgba(0, 0, 0, 0.28);
}

.search-icon,
.pin-icon,
.download-icon,
.whatsapp-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 22px;
  color: var(--gold);
  transform: translateY(-50%);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

.pin-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.99-5.52 10.15-7.4 11.78a1 1 0 0 1-1.2 0C9.52 20.15 4 14.99 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.download-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3'/%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}

.whatsapp-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 3.5A11.7 11.7 0 0 0 2.1 17.6L1 23l5.5-1.4A11.7 11.7 0 0 0 20.5 3.5Zm-8.8 16.1c-1.8 0-3.5-.5-5-1.4l-.4-.2-3.2.8.8-3.1-.2-.5a9.7 9.7 0 1 1 8 4.4Zm5.5-7.2c-.3-.2-1.8-.9-2.1-1s-.5-.2-.7.2-.8 1-.9 1.2-.3.2-.6.1a7.9 7.9 0 0 1-2.3-1.4 8.6 8.6 0 0 1-1.6-2c-.2-.3 0-.5.1-.6l.5-.6c.2-.2.2-.4.3-.6.1-.2 0-.4 0-.6s-.7-1.7-1-2.3c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.6.1-.9.4s-1.2 1.2-1.2 2.9 1.3 3.4 1.4 3.6c.2.2 2.5 3.8 6 5.3.8.4 1.5.6 2 .7.8.3 1.6.2 2.2.1.7-.1 1.8-.7 2.1-1.5.3-.7.3-1.4.2-1.5 0-.1-.3-.2-.6-.4Z'/%3E%3C/svg%3E");
}

.header-stats {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.header-stats span,
.filter-tab {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #e8f5ee;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.header-stats span {
  padding: 10px 13px;
}

.header-stats strong {
  color: var(--gold);
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 54px) 34px;
}

.toolbar {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.toolbar h2 {
  margin-bottom: 0;
  color: #fff;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.1;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.filter-tab {
  min-height: 40px;
  padding: 0 18px;
  cursor: pointer;
}

.filter-tab.active {
  border-color: rgba(37, 211, 102, 0.65);
  background: var(--green-deep);
  color: #fff;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}

.agent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 456px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(315deg, rgba(245, 176, 66, 0.07), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.agent-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(315deg, rgba(211, 34, 47, 0.08), transparent 42%),
    var(--panel-strong);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.42);
}

.export-card {
  position: fixed;
  top: 0;
  left: -10000px;
  z-index: -1;
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), #050806 48%, var(--red));
}

.card-topline,
.card-brand,
.card-main,
.address-link,
.phone-list,
.card-actions {
  position: relative;
  z-index: 1;
}

.card-topline {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.area-code,
.card-kind {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 0.76rem;
  font-weight: 800;
}

.area-code {
  border: 1px solid rgba(37, 211, 102, 0.32);
  background: rgba(37, 211, 102, 0.13);
  color: #b9fbc0;
}

.card-kind {
  border: 1px solid rgba(245, 176, 66, 0.38);
  background: rgba(245, 176, 66, 0.14);
  color: #ffdfaa;
}

.card-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 70px;
  margin: 14px 20px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.card-brand img {
  width: 150px;
  max-height: 62px;
  object-fit: contain;
}

.card-main {
  padding: 0 20px;
}

.card-main h3 {
  margin-bottom: 9px;
  color: #ffffff;
  font-size: 1.55rem;
  line-height: 1.13;
}

.agent-place {
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1.25;
}

.agent-person {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.address-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 92px;
  margin: 0 20px 16px;
  border: 1px solid rgba(134, 190, 160, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(5, 12, 10, 0.36);
  color: #d6e9df;
  text-decoration: none;
}

.address-link:hover {
  border-color: rgba(245, 176, 66, 0.52);
}

.address-link .pin-icon {
  margin-top: 2px;
  color: var(--gold);
}

.address-text {
  line-height: 1.46;
  word-break: break-word;
}

.phone-list {
  display: grid;
  gap: 10px;
  margin: auto 20px 18px;
}

.phone-link {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.16);
  color: #c9ffd4;
  font-weight: 800;
  text-decoration: none;
}

.phone-link:hover {
  background: var(--green);
  color: #082413;
}

.phone-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px dashed rgba(245, 176, 66, 0.42);
  border-radius: 999px;
  background: rgba(245, 176, 66, 0.1);
  color: #ffdfaa;
  font-weight: 800;
  text-align: center;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(134, 190, 160, 0.18);
  background: rgba(0, 0, 0, 0.18);
}

.map-card,
.save-card {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.map-card {
  border: 1px solid rgba(93, 176, 255, 0.36);
  background: rgba(93, 176, 255, 0.13);
  color: #d8ecff;
}

.map-card:hover {
  background: #2876a3;
  color: #fff;
}

.save-card {
  border: 1px solid rgba(245, 176, 66, 0.42);
  background: rgba(245, 176, 66, 0.18);
  color: #ffe3b3;
}

.save-card:hover {
  background: var(--gold);
  color: #18251d;
}

.save-card[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.empty-state {
  border: 1px dashed rgba(245, 176, 66, 0.48);
  border-radius: 8px;
  padding: 44px 18px;
  background: rgba(16, 32, 27, 0.72);
  text-align: center;
  backdrop-filter: blur(10px);
}

.empty-state h2 {
  margin-bottom: 8px;
  color: #fff;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 54px) 34px;
  color: rgba(238, 248, 243, 0.58);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 940px) {
  .site-header,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .header-stats {
    justify-content: flex-start;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .filter-tab {
    flex: 1 1 110px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 24px 18px 34px;
  }

  .brand-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    width: 154px;
    height: 76px;
  }

  .agent-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .filter-tab {
    min-width: 0;
    padding: 0 4px;
    font-size: 0.75rem;
  }

  .search-box input {
    min-height: 58px;
    padding-right: 14px;
    padding-left: 50px;
    font-size: 0.92rem;
  }

  .header-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .header-stats span {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 0 7px;
    font-size: 0.72rem;
    text-align: center;
    min-width: 0;
  }

  .filter-tabs {
    width: 100%;
    max-width: 100%;
  }

  .agent-card {
    min-height: 0;
  }

  .card-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }
}
