/* ==========================================
   GLOBAL RESET & BASE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
html {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-y: auto;
}

/* ==========================================
   LOADER OVERLAY STYLES
   ========================================== */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.spinner-ring {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #007bff;
  border-right: 4px solid #00ff88;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-logo {
  position: absolute;
  width: 50px;
  height: 50px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-message {
  color: #ffffff;
  font-size: 16px;
  margin-top: 20px;
  text-align: center;
}

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

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* ==========================================
   APP HEADER STYLES (PURE BLACK BACKGROUND)
   ========================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background-color: #000000 !important;
  border-bottom: 2px solid #d8ae5e;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-name span {
  color: #d8ae5e;
}

/* Gold Return Button with Glow Animation */
.btn-back-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #d8ae5e;
  color: #000000 !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  animation: breatheGlow 2.5s ease-in-out infinite;
}

.btn-back-gold svg {
  transition: transform 0.3s ease;
}

.btn-back-gold:hover {
  background-color: #ffd700;
  color: #000000 !important;
  transform: scale(1.04);
  animation: none;
  box-shadow: 0 0 20px #ffd700, 0 0 35px rgba(216, 174, 94, 0.8);
}

.btn-back-gold:hover svg {
  transform: translateX(-3px);
}


.btn-back-gold-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #d8ae5e;
  color: #ffffff !important;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: breatheGlow 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

.btn-back-gold-icon:hover {
  background-color: #ffd700;
  color: #000000 !important;
  transform: scale(1.08);
  animation: none;
  box-shadow: 0 0 20px #ffd700, 0 0 35px rgba(216, 174, 94, 0.8);
}

.btn-back-gold-icon svg {
  stroke: #ffffff;
  transition: transform 0.3s ease;
}

.btn-back-gold-icon:hover svg {
  stroke: #000000;
  transform: rotate(-5deg) scale(1.05);
}

@keyframes breatheGlow {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(216, 174, 94, 0.5);
  }

  50% {
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.9), 0 0 28px rgba(216, 174, 94, 0.6);
  }
}

@media (max-width: 480px) {
  .btn-back-gold-icon {
    width: 34px;
    height: 34px;
  }

  .btn-back-gold-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* Breathing glow animation */
@keyframes breatheGlow {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(216, 174, 94, 0.5);
  }

  50% {
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.9), 0 0 28px rgba(216, 174, 94, 0.6);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .app-header {
    padding: 10px 14px;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .btn-back-gold {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* ==========================================
   GENERAL BUTTONS & CATALOG GRID
   ========================================== */
.btn-gold {
  background-color: #d8ae5e;
  color: #ffffff;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 10px #d8ae5e;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-gold:hover {
  background-color: #c49b4d;
  box-shadow: 0 0 20px #ffd700;
  transform: scale(1.02);
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.property-card {
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.property-card:hover {
  transform: translateY(-4px);
}

.property-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.property-card-body {
  padding: 20px;
}

/* ==========================================
   GOLD RETURN BUTTON - WHITE TEXT OVERRIDE
   ========================================== */
.btn-back-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #d8ae5e;
  color: #ffffff !important;
  /* Set text color to white for UI/UX consistency */
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  animation: breatheGlow 2.5s ease-in-out infinite;
}

.btn-back-gold svg {
  stroke: #ffffff;
  /* Ensure SVG icon matches white text */
  transition: transform 0.3s ease;
}

.btn-back-gold:hover {
  background-color: #c49b4d;
  color: #ffffff !important;
  transform: scale(1.04);
  animation: none;
  box-shadow: 0 0 20px #ffd700, 0 0 35px rgba(216, 174, 94, 0.8);
}

.btn-back-gold:hover svg {
  transform: translateX(-3px);
}

/* ==========================================
   APP FOOTER STYLES (PURE BLACK & GOLD ACCENT)
   ========================================== */
.app-footer {
  background-color: #000000 !important;
  border-top: 2px solid #d8ae5e;
  padding: 1.5rem 1rem;
  font-size: 14px;
  color: #ffffff;
  width: 100%;
  margin-top: auto;
  box-sizing: border-box;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.8);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1.5rem;
}

.footer-copy {
  font-size: 13px;
  color: #cccccc;
  font-weight: 500;
}

/* Mobile responsive alignment */
@media (max-width: 767px) {
  .footer-content {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
}

/* ==========================================
   SUPER SEARCH BAR & FILTER SECTION
   ========================================== */
.search-container {
  background-color: #0d0d0d;
  border: 1px solid #222222;
  border-radius: 16px;
  padding: 24px;
  margin: 20px auto 35px auto;
  max-width: 1200px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  color: #d8ae5e;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-control {
  background-color: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-control:focus {
  border-color: #d8ae5e;
  box-shadow: 0 0 10px rgba(216, 174, 94, 0.3);
}

/* ==========================================
   PROPERTY CARDS GRID (DARK GOLD THEME)
   ========================================== */
.properties-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 400px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.property-card {
  background-color: #121212;
  border: 1px solid #262626;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-6px);
  border-color: #d8ae5e;
  box-shadow: 0 10px 25px rgba(216, 174, 94, 0.25);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background-color: #000000;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #d8ae5e;
  border: 1px solid #d8ae5e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.card-body-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  gap: 12px;
}

.card-title-text {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a0a0a0;
  font-size: 0.85rem;
}

.card-price-text {
  color: #d8ae5e;
  font-size: 1.3rem;
  font-weight: 800;
}

/* ==========================================
   PAGINATION STYLES
   ========================================== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px auto;
  flex-wrap: wrap;
}

.page-btn {
  background-color: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background-color: #d8ae5e;
  color: #000000;
  border-color: #d8ae5e;
}

.page-btn.active {
  background-color: #d8ae5e;
  color: #000000;
  border-color: #d8ae5e;
  font-weight: 800;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================
   DARK GOLD MODAL
   ========================================== */
.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop-custom.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background-color: #121212;
  border: 1px solid #d8ae5e;
  border-radius: 20px;
  max-width: 850px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-backdrop-custom.active .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #d8ae5e;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #d8ae5e;
  color: #000000;
}

.modal-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-img-col {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background-color: #000;
}

.modal-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info-col {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.empty-state-card {
  text-align: center;
  padding: 60px 20px;
  color: #888888;
  background: #121212;
  border: 1px dashed #333;
  border-radius: 16px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .modal-grid-layout {
    grid-template-columns: 1fr;
  }

  .modal-img-col {
    height: 220px;
  }
}

/* ==========================================
   SUPER SEARCH BAR & FILTER SECTION
   ========================================== */
.search-container {
  background-color: #0d0d0d;
  border: 1px solid #222222;
  border-radius: 16px;
  padding: 24px;
  margin: 20px auto 35px auto;
  max-width: 1200px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  color: #d8ae5e;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-control {
  background-color: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-control:focus {
  border-color: #d8ae5e;
  box-shadow: 0 0 10px rgba(216, 174, 94, 0.3);
}

/* ==========================================
   PROPERTY CARDS GRID (DARK GOLD THEME)
   ========================================== */
.properties-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 400px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.property-card {
  background-color: #121212;
  border: 1px solid #262626;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-6px);
  border-color: #d8ae5e;
  box-shadow: 0 10px 25px rgba(216, 174, 94, 0.25);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background-color: #000000;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #d8ae5e;
  border: 1px solid #d8ae5e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.card-body-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  gap: 12px;
}

.card-title-text {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a0a0a0;
  font-size: 0.85rem;
}

.card-price-text {
  color: #d8ae5e;
  font-size: 1.3rem;
  font-weight: 800;
}

/* ==========================================
   PAGINATION STYLES
   ========================================== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px auto;
  flex-wrap: wrap;
}

.page-btn {
  background-color: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background-color: #d8ae5e;
  color: #000000;
  border-color: #d8ae5e;
}

.page-btn.active {
  background-color: #d8ae5e;
  color: #000000;
  border-color: #d8ae5e;
  font-weight: 800;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================
   DARK GOLD MODAL
   ========================================== */
.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop-custom.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background-color: #121212;
  border: 1px solid #d8ae5e;
  border-radius: 20px;
  max-width: 850px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-backdrop-custom.active .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #d8ae5e;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
  background-color: #d8ae5e;
  color: #000000;
}

.modal-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-img-col {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background-color: #000;
}

.modal-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info-col {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.empty-state-card {
  text-align: center;
  padding: 60px 20px;
  color: #888888;
  background: #121212;
  border: 1px dashed #333;
  border-radius: 16px;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .modal-grid-layout {
    grid-template-columns: 1fr;
  }

  .modal-img-col {
    height: 220px;
  }
}

*/
/* ==========================================================================
   AGENT AREA (register, login, dashboard)
   ========================================================================== */

.agent-page {
  max-width: 640px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.agent-page--wide {
  max-width: 1080px;
}

/* Card (register + login) */
.agent-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2.5rem;
}

.agent-card__header {
  margin-bottom: 2rem;
}

.agent-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.agent-card__subtitle {
  color: #6b7280;
  font-size: 0.95rem;
}

.agent-card__footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.agent-card__footer a {
  color: #d8ae5e;
  font-weight: 600;
  text-decoration: underline;
}

.agent-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.agent-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  list-style: disc inside;
  margin-bottom: 1.5rem;
}

/* Dashboard header */
.agent-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.agent-dashboard-header__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.agent-dashboard-header__subtitle {
  color: #6b7280;
  font-size: 0.95rem;
}

/* Referral card */
.agent-referral {
  background: #fdfbf6;
  border: 1px solid #e8d9b4;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.agent-referral__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.agent-referral__text {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.agent-referral__row {
  display: flex;
  gap: 0.5rem;
}

.agent-referral__input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: monospace;
  color: #0f172a;
}

/* Stats */
.agent-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.agent-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.agent-stat__number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.agent-stat__label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Leads table */
.agent-leads {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem;
}

.agent-leads__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.agent-leads__empty {
  color: #6b7280;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.table th {
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background: #f9fafb;
}

.table td {
  color: #0f172a;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge--new {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge--contacted {
  background: #fef3c7;
  color: #b45309;
}

.badge--in_progress {
  background: #e0e7ff;
  color: #4338ca;
}

.badge--approved {
  background: #dcfce7;
  color: #15803d;
}

.badge--rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.badge--lost {
  background: #f3f4f6;
  color: #4b5563;
}

/* Ghost button */
.btn--ghost {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #4b5563;
}

.btn--ghost:hover {
  background: #f9fafb;
  color: #0f172a;
}

/* Mobile */
@media (max-width: 480px) {
  .agent-card {
    padding: 1.5rem;
  }

  .agent-card__title {
    font-size: 1.5rem;
  }

  .agent-referral__row {
    flex-direction: column;
  }
}

/* ==========================================================================
   AGENT AREA (register, login, dashboard)
   Self-contained styles — includes inputs and buttons so Tailwind's
   preflight reset doesn't wipe them out.
   ========================================================================== */

/* --- Layout ------------------------------------------------------------- */
.agent-page {
    max-width: 640px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.agent-page--wide {
    max-width: 1080px;
}

/* --- Card (register + login) -------------------------------------------- */
.agent-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.agent-card__header {
    margin-bottom: 2rem;
}

.agent-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.agent-card__subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.agent-card__footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.agent-card__footer a {
    color: #d8ae5e;
    font-weight: 600;
    text-decoration: underline;
}

/* --- Form --------------------------------------------------------------- */
.agent-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-field__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    display: block;
}

/* Inputs — override Tailwind preflight reset */
.form-field__input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.4;
    box-shadow: none;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-field__input::placeholder {
    color: #9ca3af;
}

.form-field__input:focus {
    border-color: #d8ae5e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(216, 174, 94, 0.15);
}

/* Checkbox */
.form-field--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.form-field--checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d8ae5e;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-field--checkbox input[type="checkbox"]:hover {
    border-color: #b8943f;
    background: #fdfbf6;
}

.form-field--checkbox input[type="checkbox"]:checked {
    background: #d8ae5e;
    border-color: #d8ae5e;
}

.form-field--checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-field__checkbox-label {
    font-size: 0.75rem;
    color: #4b5563;
    line-height: 1.6;
    cursor: pointer;
}

.form-field__checkbox-label a {
    color: #2563eb;
    text-decoration: underline;
}

/* --- Errors ------------------------------------------------------------- */
.agent-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    list-style: disc inside;
    margin-bottom: 1.5rem;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}

.btn--primary {
    background: #0f172a;
    color: #fff;
}

.btn--primary:hover {
    background: #1e293b;
}

.btn--block {
    width: 100%;
}

.btn--ghost {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #4b5563;
}

.btn--ghost:hover {
    background: #f9fafb;
    color: #0f172a;
}

/* --- Dashboard header --------------------------------------------------- */
.agent-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.agent-dashboard-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.agent-dashboard-header__subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

/* --- Referral card ------------------------------------------------------ */
.agent-referral {
    background: #fdfbf6;
    border: 1px solid #e8d9b4;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.agent-referral__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.agent-referral__text {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.agent-referral__row {
    display: flex;
    gap: 0.5rem;
}

.agent-referral__input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: monospace;
    color: #0f172a;
}

/* --- Stats -------------------------------------------------------------- */
.agent-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.agent-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.agent-stat__number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.agent-stat__label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Leads table -------------------------------------------------------- */
.agent-leads {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.5rem;
}

.agent-leads__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.agent-leads__empty {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem 1rem;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.table th {
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background: #f9fafb;
}

.table td {
    color: #0f172a;
}

/* --- Badges ------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge--new          { background: #eff6ff; color: #1d4ed8; }
.badge--contacted    { background: #fef3c7; color: #b45309; }
.badge--in_progress  { background: #e0e7ff; color: #4338ca; }
.badge--approved     { background: #dcfce7; color: #15803d; }
.badge--rejected     { background: #fee2e2; color: #b91c1c; }
.badge--lost         { background: #f3f4f6; color: #4b5563; }

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 480px) {
    .agent-card {
        padding: 1.5rem;
    }

    .agent-card__title {
        font-size: 1.5rem;
    }

    .agent-referral__row {
        flex-direction: column;
    }
}

/* ==========================================================================
   AGENT — Public UI (banner in search, extra CTA in dashboard)
   ========================================================================== */

/* Dashboard CTA — "Ir al buscador" */
.agent-cta {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.agent-cta .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.agent-cta .btn--primary {
    background: #0f172a;
    color: #fff;
}

.agent-cta .btn--primary:hover {
    background: #1e293b;
}

.agent-cta__hint {
    margin-top: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Search banner — "Bienvenido, agente" */
.agent-welcome {
    background: linear-gradient(135deg, #fdfbf6 0%, #f5efe0 100%);
    border: 1px solid #e8d9b4;
    border-radius: 14px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.agent-welcome__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.agent-welcome__text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.agent-welcome__greeting {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.agent-welcome__subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.agent-welcome__link {
    color: #0f172a;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.agent-welcome__link:hover {
    background: #0f172a;
    color: #fff;
}

@media (max-width: 640px) {
    .agent-welcome__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .agent-welcome__link {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================
   CTA BANNER - Elegant divider with gradient
   ========================================== */
.cta-banner {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border: 1px solid rgba(216, 174, 94, 0.3);
    border-radius: 20px;
    padding: 40px 24px 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(216, 174, 94, 0.6) 50%, 
        transparent 100%);
}

/* Decorative divider with icon */
.cta-banner__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.cta-banner__divider-line {
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(216, 174, 94, 0.5) 100%);
}

.cta-banner__divider-line:last-child {
    background: linear-gradient(90deg, 
        rgba(216, 174, 94, 0.5) 0%, 
        transparent 100%);
}

.cta-banner__divider-icon {
    font-size: 20px;
    filter: grayscale(0.3);
    opacity: 0.9;
}

/* Content */
.cta-banner__content {
    max-width: 640px;
    margin: 0 auto;
}

.cta-banner__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.cta-banner__title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #d8ae5e;
    margin: 12px auto 0;
    border-radius: 2px;
}

.cta-banner__subtitle {
    font-size: 0.95rem;
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Actions */
.cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.cta-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-banner__btn--primary {
    background: #d8ae5e;
    color: #0a0a0a;
    box-shadow: 0 4px 15px rgba(216, 174, 94, 0.3);
}

.cta-banner__btn--primary:hover {
    background: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(216, 174, 94, 0.5);
}

.cta-banner__btn--secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-banner__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #d8ae5e;
    color: #d8ae5e;
    transform: translateY(-2px);
}

.cta-banner__btn-icon {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 640px) {
    .cta-banner {
        padding: 32px 16px 24px 16px;
    }
    
    .cta-banner__title {
        font-size: 1.25rem;
    }
    
    .cta-banner__actions {
        flex-direction: column;
    }
    
    .cta-banner__btn {
        justify-content: center;
        width: 100%;
    }
}

/* ==========================================
   STATUS BADGE (Vendido / Alquilado)
   ========================================== */
.badge-status {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    border: 1px solid;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

