:root {
  --bg: #111827;
  --bg2: #1f2937;
  --surface: #1f2937;
  --surface2: #283347;
  --border: #374151;
  --border2: #4b5563;
  --red: #dc2626;
  --red-light: #ef4444;
  --red-pale: rgba(220,38,38,0.12);
  --red-glow: rgba(220,38,38,0.2);
  --text: #f9fafb;
  --text2: #e5e7eb;
  --muted: #9ca3af;
  --muted2: #6b7280;
  --success: #10b981;
  --danger: #ef4444;
  --blue: #3b82f6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-red: 0 0 0 3px rgba(220,38,38,0.2);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red-light); text-decoration: none; }
a:hover { color: #fff; }

/* ── NAV ── */
nav {
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.nav-logo-text { font-size: 1rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; }
.nav-logo-text span { color: var(--red-light); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); font-size: 0.875rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-btn {
  background: var(--red); color: #fff !important;
  padding: 8px 18px; border-radius: 8px;
  font-weight: 600; font-size: 0.875rem !important;
  transition: all 0.2s; border: none;
}
.nav-btn:hover { background: var(--red-light) !important; color: #fff !important; box-shadow: 0 0 16px var(--red-glow); }
.nav-btn-outline {
  border: 1px solid var(--border2); color: var(--text2) !important;
  padding: 7px 16px; border-radius: 8px;
  font-weight: 500; font-size: 0.875rem !important; transition: all 0.2s;
}
.nav-btn-outline:hover { border-color: var(--text2); color: #fff !important; background: rgba(255,255,255,0.05); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none; line-height: 1;
  font-family: inherit;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-light); color: #fff; box-shadow: 0 0 20px var(--red-glow); }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-outline:hover { border-color: var(--text); color: #fff; background: rgba(255,255,255,0.05); }
.btn-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px; width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
}
.form-card h2 { font-size: 1.5rem; margin-bottom: 6px; color: var(--text); font-weight: 800; }
.form-card .subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }

.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; letter-spacing: 0.02em; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"],
select, textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text); font-size: 0.95rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: var(--shadow-red); }
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--bg2); }

.consent-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 13px 14px; margin-bottom: 8px;
  transition: border-color 0.2s;
}
.consent-box:has(input:checked) { border-color: var(--red); background: var(--red-pale); }
.consent-box label {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--text2); font-size: 0.83rem; margin: 0; cursor: pointer; letter-spacing: 0;
}
.consent-box input[type="checkbox"] { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; accent-color: var(--red); }
.form-divider { text-align: center; color: var(--muted2); font-size: 0.85rem; margin: 18px 0; }
.form-footer { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 18px; }
.error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 8px; display: none; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.25); padding: 8px 12px; border-radius: 8px; }
.success-msg { color: var(--success); font-size: 0.85rem; margin-top: 8px; display: none; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.25); padding: 8px 12px; border-radius: 8px; }

/* ── DEAL DETAIL ── */
.deal-detail { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.deal-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
@media (max-width: 900px) { .deal-detail-grid { grid-template-columns: 1fr; } }

.deal-gallery { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.deal-gallery .main-photo { width: 100%; height: 400px; object-fit: cover; }
.deal-gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--bg2); }
.deal-gallery-thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; opacity: 0.55; transition: all 0.2s; }
.deal-gallery-thumbs img:hover, .deal-gallery-thumbs img.active { opacity: 1; border-color: var(--red); }
.deal-gallery-placeholder { width: 100%; height: 400px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: var(--muted2); background: var(--surface); }

.deal-sidebar { display: flex; flex-direction: column; gap: 14px; }
.deal-card-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.deal-asking-price { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: -0.02em; }
.deal-stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.deal-stat-row:last-child { border-bottom: none; }
.deal-stat-label { color: var(--muted); }
.deal-stat-value { font-weight: 600; color: var(--text); }

.lock-overlay { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; text-align: center; margin: 24px 0; }
.lock-icon { font-size: 2.5rem; margin-bottom: 14px; }
.lock-overlay h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); font-weight: 700; }
.lock-overlay p { color: var(--muted); margin-bottom: 24px; font-size: 0.875rem; line-height: 1.6; }

/* ── ACCOUNT ── */
.account-layout { max-width: 860px; margin: 0 auto; padding: 40px 24px; }
.account-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.account-tab { padding: 10px 20px; font-size: 0.875rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.account-tab.active { color: var(--red-light); border-bottom-color: var(--red); font-weight: 600; }
.account-tab:hover { color: var(--text2); }
.account-panel { display: none; }
.account-panel.active { display: block; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; }
.badge-red { background: var(--red-pale); color: var(--red-light); border: 1px solid rgba(220,38,38,0.2); }
.badge-green { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-gray { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text);
  padding: 13px 20px; border-radius: 12px; font-size: 0.875rem;
  transform: translateY(20px); opacity: 0; transition: all 0.3s;
  max-width: 320px; box-shadow: var(--shadow-lg);
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { border-color: var(--success); color: var(--success); }
#toast.error { border-color: var(--danger); color: var(--danger); }

/* ── SPINNER ── */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--red); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; font-size: 1.1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 0 16px; }
  .nav-logo-text { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
