/* RAJSONS Property Intelligence — Custom CSS & Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #020617;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --border-color: #334155;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Crucial visibility & display rules */
.hidden {
  display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5), 0 0 15px -3px rgba(245, 158, 11, 0.1);
}

/* Filter Pills */
.filter-pill {
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: #f8fafc;
  border-color: #475569;
}

.filter-pill.active {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Tenure Badges */
.badge-freehold {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-leasehold {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Plot Card Component */
.plot-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.plot-card:hover {
  border-color: #f59e0b;
  background: #141e33;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

.plot-card.is-freehold {
  border-left: 3px solid #10b981;
}

.plot-card.is-leasehold {
  border-left: 3px solid #f59e0b;
}

/* Chronological Timeline */
.deed-timeline-item {
  position: relative;
  padding-left: 1.75rem;
}

.deed-timeline-item::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 1.5rem;
  bottom: -0.75rem;
  width: 2px;
  background: #334155;
}

.deed-timeline-item:last-child::before {
  display: none;
}

.deed-timeline-dot {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #0f172a;
  border: 2px solid #f59e0b;
}

.deed-timeline-item.is-latest .deed-timeline-dot {
  border-color: #10b981;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Fallback base styles for standard elements & bulletproof overlay */
#loginOverlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(2, 6, 23, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  padding: 1.5rem !important;
}

#loginOverlay.hidden {
  display: none !important;
}

#loginOverlay > div {
  width: 100%;
  max-width: 28rem;
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 1.25rem;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.1);
}

#loginOverlay input {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #fff !important;
}

#loginOverlay input:focus {
  border-color: #f59e0b !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25) !important;
}

#plotModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  padding: 1rem;
}

#plotModal.hidden {
  display: none !important;
}

/* Modal Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn {
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-slideUp {
  animation: slideUp 0.2s ease forwards;
}

/* Print Styles */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  header, #breadcrumbTrail, #loginOverlay, #toastNotification, button {
    display: none !important;
  }
  #plotModal {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .max-w-4xl {
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
  }
  .bg-slate-900, .bg-slate-800 {
    background: #fff !important;
    color: #000 !important;
    border-color: #ccc !important;
  }
  .text-white, .text-slate-100, .text-slate-200, .text-slate-300 {
    color: #000 !important;
  }
  .text-amber-400, .text-emerald-400 {
    color: #333 !important;
  }
}
