@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0b1220;
  --surface: #121b2e;
  --surface-2: #1a2540;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f2f5f9;
  --muted: #93a0b8;
  --cyan: #00d4ff;
  --amber: #ffb347;
  --danger: #ff6b6b;
  --success: #4ade80;
  --radius: 14px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

h1, h2, h3, h4, .brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6%;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

nav .brand {
  font-size: 22px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

nav ul { display: flex; align-items: center; gap: 28px; }
nav ul li a { color: var(--text); font-size: 15px; transition: color 0.2s; }
nav ul li a:hover { color: var(--cyan); }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-primary { background: var(--cyan); color: #04121c; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #2a0a0a; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 160px 6% 80px;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 212, 255, 0.12), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(255, 179, 71, 0.08), transparent 45%);
  text-align: center;
}

.hero .eyebrow {
  display: inline-block;
  color: var(--amber);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 179, 71, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  max-width: 780px;
  margin: 0 auto 16px;
  line-height: 1.15;
}

.hero p { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 auto 32px; }

.search-box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.search-box select, .search-box input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  flex: 1;
  min-width: 120px;
}
.search-box button { flex: 0 0 auto; }

/* ---------- Stats ---------- */
.stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 40px 6% 60px;
  flex-wrap: wrap;
}
.stat-box { text-align: center; }
.stat-box h2 { color: var(--cyan); font-size: 30px; }
.stat-box p { color: var(--muted); font-size: 14px; }

/* ---------- Section titles ---------- */
.title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 8px;
}
.subtitle { text-align: center; color: var(--muted); margin-bottom: 40px; font-size: 15px; }

/* ---------- Listing grid & price-tag cards ---------- */
.property-container, .results, .listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding: 0 6% 80px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(0, 212, 255, 0.35); }

.property-card {
  cursor: pointer;
}

.card .img-wrap { position: relative; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card img { width: 100%; height: 190px; object-fit: cover; }

.badge-type {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 18, 32, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.card .body { padding: 18px; }
.card h3 { font-size: 17px; margin-bottom: 4px; }
.card .loc { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

/* Signature element: rent shown as a physical key-tag hanging off the card corner */
.price-tag {
  position: absolute;
  top: -14px;
  right: 16px;
  background: var(--amber);
  color: #2a1a00;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px 8px 18px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.price-tag::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2a1a00;
}

.card .actions { display: flex; gap: 8px; padding: 0 18px 18px; }
.card .actions .btn { flex: 1; text-align: center; font-size: 13px; padding: 9px; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

/* ---------- About ---------- */
.about { padding: 60px 6%; text-align: center; }
.about-box { max-width: 700px; margin: 0 auto; color: var(--muted); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
}
.login-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
}
.login-box .brand { text-align: center; display: block; color: var(--cyan); margin-bottom: 4px; font-size: 22px; }
.login-box h2 { text-align: center; margin-bottom: 24px; font-size: 20px; }
.login-box label { font-size: 13px; color: var(--muted); display: block; margin: 14px 0 6px; }
.login-box input, .login-box select, .login-box textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
}
.login-box textarea { resize: vertical; min-height: 80px; }
.login-box .btn { margin-top: 22px; }
.login-box .switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.login-box .switch a { color: var(--cyan); }
.form-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-top: 14px;
  display: none;
}
.form-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--success);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-top: 14px;
  display: none;
}

/* ---------- Dashboard / Admin shell ---------- */
.dash-shell { padding: 100px 6% 60px; max-width: 1180px; margin: 0 auto; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.dash-header h1 { font-size: 26px; }
.dash-header p { color: var(--muted); font-size: 14px; }

.tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  background: var(--surface);
}
.tab.active { background: var(--cyan); color: #04121c; border-color: var(--cyan); font-weight: 600; }

.panel { display: none; }
.panel.active { display: block; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }

.status-pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-pending { background: rgba(255, 179, 71, 0.15); color: var(--amber); }
.status-approved { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.status-rejected { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

.row-actions { display: flex; gap: 8px; }
.row-actions .btn { padding: 7px 14px; font-size: 12px; }

.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 16px; }
.modal .close-btn { position: absolute; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-header .x { cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }

/* Large modal for property details */
.modal-lg {
  max-width: 800px;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail:hover {
  opacity: 1;
}

.thumbnail.active {
  opacity: 1;
  border-color: var(--cyan);
}

.property-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-section h4 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.price-large {
  font-size: 24px;
  font-weight: 700;
  color: var(--cyan);
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.amenities-list li {
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 13px;
}

.contact-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-actions .btn {
  flex: 1;
  min-width: 100px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  
  .modal-lg {
    max-width: 100%;
  }
}

/* ---------- Footer ---------- */
footer { padding: 30px 6%; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  nav ul { gap: 14px; }
  nav ul li:not(#authArea) a span.label { display: none; }
  .hero { padding-top: 130px; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
