/* =============================================================
   NEXO IMOB — App Design System
   Mobile-first, light premium theme
   ============================================================= */

/* ─── RESET & FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  /* Brand */
  --primary:   #4F67F0;
  --primary-d: #3B52D4;
  --secondary: #7C3AED;
  --grad:      linear-gradient(135deg, #4F67F0 0%, #7C3AED 100%);

  /* Surfaces */
  --bg:        #F7F9FF;
  --surface:   #FFFFFF;
  --surface-2: #EEF2FF;
  --border:    rgba(99, 102, 241, 0.14);
  --border-2:  rgba(15, 23, 42, 0.08);

  /* Text */
  --t0: #0F172A;
  --t1: #334155;
  --t2: #64748B;
  --t3: #94A3B8;

  /* Status */
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #06B6D4;

  /* Layout */
  --sidebar-w:  248px;
  --topbar-h:   62px;
  --bottomnav-h: 66px;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  18px;

  /* Shadow */
  --shadow-sm: 0 1px 4px rgba(15,23,42,.06), 0 0 1px rgba(15,23,42,.04);
  --shadow:    0 4px 16px rgba(15,23,42,.08), 0 1px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.06);

  /* Transition */
  --ease: cubic-bezier(.4,0,.2,1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--t0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }

img { display: block; max-width: 100%; }

/* ─── UTILITY ────────────────────────────────────────────────── */
.text-muted   { color: var(--t2); }
.text-small   { font-size: 13px; }
.text-center  { text-align: center; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mt-12        { margin-top: 12px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.hidden       { display: none !important; }

/* ─── BUTTON ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all .2s var(--ease);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,103,240,.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79,103,240,.4);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--t1);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-full  { width: 100%; }
.btn-sm    { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg    { padding: 15px 28px; font-size: 16px; }

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── FORM ELEMENTS ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--t0);
  background: var(--surface);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  outline: none;
  -webkit-appearance: none;
}
.form-control::placeholder { color: var(--t3); }
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,103,240,.12);
}
.form-control.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.10);
}

.input-wrap {
  position: relative;
}
.input-wrap .form-control {
  padding-right: 46px;
}
.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  cursor: pointer;
  display: flex;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  padding: 0;
  align-items: center;
  transition: color .2s;
}
.input-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.input-icon:hover { color: var(--t1); }
.input-icon:focus-visible {
  outline: none;
  color: var(--t1);
}
.toggle-pwd .toggle-eye-off { display: none; }
.toggle-pwd.is-visible .toggle-eye { display: none; }
.toggle-pwd.is-visible .toggle-eye-off { display: block; }

.form-hint {
  font-size: 12.5px;
  color: var(--t2);
  margin-top: 5px;
}
.form-error {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 5px;
}

/* Checkbox */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.check-label {
  font-size: 14px;
  color: var(--t1);
  line-height: 1.5;
}
.check-label a { font-weight: 600; }

/* ─── ALERT / FLASH ──────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}
.alert-error   { background: rgba(239,68,68,.08);  color: #B91C1C; border: 1px solid rgba(239,68,68,.2);  }
.alert-success { background: rgba(16,185,129,.08); color: #065F46; border: 1px solid rgba(16,185,129,.2); }
.alert-info    { background: rgba(6,182,212,.08);  color: #0E7490; border: 1px solid rgba(6,182,212,.2);  }


/* ═══════════════════════════════════════════════════════════════
   AUTH LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.auth-wrap {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Brand panel — top strip on mobile */
.auth-brand {
  background: var(--grad);
  padding: 30px 18px 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 110%, rgba(255,255,255,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% -20%, rgba(255,255,255,.10) 0%, transparent 60%);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 42%);
  pointer-events: none;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  position: relative;
}

.auth-logo-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.22);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 2.2;
}

.auth-logo-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.35px;
}

.auth-brand-tagline {
  font-size: 15.5px;
  color: rgba(255,255,255,.82);
  line-height: 1.5;
  position: relative;
  max-width: 320px;
}

.auth-brand-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: min(100%, 360px);
  margin-top: 20px;
  position: relative;
}

.auth-brand-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  font-size: 12.5px;
  color: rgba(255,255,255,.92);
  line-height: 1.35;
  text-align: left;
}

.auth-brand-feat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-brand-feat-icon svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 2.1;
}

/* Form panel */
.auth-form-panel {
  flex: 1;
  margin-top: -34px;
  padding: 30px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 28px rgba(15,23,42,.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  position: relative;
}

.auth-form-panel .form-group {
  margin-bottom: 16px;
}

.auth-form-panel .form-label {
  margin-bottom: 8px;
  font-size: 14px;
}

.auth-form-panel .form-control {
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
}

.auth-form-panel .btn-lg {
  min-height: 52px;
  border-radius: 14px;
}

.auth-form-panel .check-label {
  font-size: 13.5px;
}

.auth-form-panel .form-hint {
  margin-top: 7px;
}

.auth-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--t0);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--t2);
  margin-bottom: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--t3);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-2);
}

.auth-footer-link {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--t2);
}
.auth-footer-link a { font-weight: 600; }

@media (max-width: 360px) {
  .auth-brand {
    padding-left: 14px;
    padding-right: 14px;
  }

  .auth-brand-features {
    grid-template-columns: 1fr;
  }

  .auth-title {
    font-size: 27px;
  }
}

/* Desktop: side-by-side */
@media (min-width: 900px) {
  .auth-wrap {
    flex-direction: row;
  }

  .auth-brand {
    width: 420px;
    min-height: 100vh;
    flex-shrink: 0;
    justify-content: center;
    padding: 60px 48px;
    text-align: left;
    align-items: flex-start;
    border-radius: 0;
  }

  .auth-brand-tagline {
    max-width: 320px;
  }

  .auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: auto;
    margin-top: 36px;
    position: relative;
  }

  .auth-brand-feat {
    gap: 12px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: rgba(255,255,255,.88);
  }
  .auth-brand-feat-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.15);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .auth-brand-feat-icon svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    stroke-width: 2.1;
  }

  .auth-form-panel {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 60px 64px;
    min-height: 100vh;
    overflow-y: auto;
    align-self: center;
  }

  .auth-title { font-size: 30px; }
}


/* ═══════════════════════════════════════════════════════════════
   APP LAYOUT
   ═══════════════════════════════════════════════════════════════ */

/* ─── APP SHELL ──────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  display: none; /* hidden on mobile */
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--grad);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2.2;
}

.sidebar-logo-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--t0);
  letter-spacing: -0.4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--t3);
  padding: 14px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--t1);
  text-decoration: none;
  transition: all .18s var(--ease);
  cursor: pointer;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--t0);
}

.nav-item.active {
  background: rgba(79,103,240,.10);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t0);
  line-height: 1.2;
}

.sidebar-user-plan {
  font-size: 11px;
  color: var(--t2);
}

/* ─── TOPBAR (mobile) ────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

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

.topbar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--grad);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-logo-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2.2;
}

.topbar-logo-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--t0);
  letter-spacing: -0.3px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t1);
  transition: background .18s;
  text-decoration: none;
}
.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.topbar-icon-btn:hover { background: var(--border); }

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* ─── BOTTOM NAV (mobile) ────────────────────────────────────── */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottomnav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--t3);
  font-size: 10px;
  font-weight: 500;
  transition: color .18s;
  cursor: pointer;
  border: none;
  background: transparent;
}

.bn-item.active { color: var(--primary); }
.bn-item:hover  { color: var(--t1); }

.bn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 22px;
  height: 22px;
}
.bn-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.bn-icon .bn-dot {
  position: absolute;
  top: 0;
  right: -2px;
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  border: 1.5px solid var(--surface);
}

/* ─── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding-top: var(--topbar-h);
  padding-bottom: calc(var(--bottomnav-h) + 8px);
  min-width: 0;
}

.page {
  padding: 20px 16px;
  max-width: 960px;
  margin: 0 auto;
}

/* ─── DESKTOP OVERRIDE ───────────────────────────────────────── */
@media (min-width: 900px) {
  .sidebar {
    display: flex;
  }

  .topbar {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  .main-content {
    margin-left: var(--sidebar-w);
    padding-top: 0;
    padding-bottom: 0;
  }

  .page {
    padding: 32px 36px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* ─── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--t0);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.page-header p {
  font-size: 14px;
  color: var(--t2);
  margin-top: 3px;
}

/* ─── GREETING ───────────────────────────────────────────────── */
.greeting-card {
  background: var(--grad);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.greeting-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 90% 110%, rgba(255,255,255,.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 10% -20%, rgba(255,255,255,.10) 0%, transparent 60%);
  pointer-events: none;
}

.greeting-text { position: relative; }
.greeting-hey  { font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.78); }
.greeting-name { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.4px; margin-top: 2px; }
.greeting-sub  { font-size: 12.5px; color: rgba(255,255,255,.72); margin-top: 3px; }

.greeting-emoji {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.greeting-emoji svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  stroke-width: 2;
}

/* ─── KPI GRID ───────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.kpi-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.kpi-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.kpi-icon.blue   { background: rgba(79,103,240,.1);  }
.kpi-icon.purple { background: rgba(124,58,237,.1);  }
.kpi-icon.green  { background: rgba(16,185,129,.1);  }
.kpi-icon.amber  { background: rgba(245,158,11,.1);  }

.kpi-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--t0);
  letter-spacing: -0.8px;
  line-height: 1;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--t2);
  margin-top: 4px;
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 6px;
}
.kpi-delta.up   { background: rgba(16,185,129,.1); color: #059669; }
.kpi-delta.down { background: rgba(239,68,68,.1);  color: #DC2626; }

/* ─── SECTION HEADER ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--t0);
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ─── VISIT / LIST CARDS ─────────────────────────────────────── */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s var(--ease);
}
.list-card:hover { box-shadow: var(--shadow); }

.list-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list-card-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.list-card-info { flex: 1; min-width: 0; }
.list-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--t0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-card-sub  {
  font-size: 12.5px;
  color: var(--t2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-card-meta { flex-shrink: 0; text-align: right; }
.list-card-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
}
.list-card-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.badge-blue   { background: rgba(79,103,240,.1);  color: var(--primary); }
.badge-green  { background: rgba(16,185,129,.1);  color: #059669; }
.badge-amber  { background: rgba(245,158,11,.1);  color: #B45309; }
.badge-purple { background: rgba(124,58,237,.1);  color: var(--secondary); }

/* ─── QUICK ACTIONS ──────────────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.quick-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all .2s var(--ease);
  cursor: pointer;
}
.quick-action:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.qa-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qa-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}
.qa-icon.blue   { background: rgba(79,103,240,.12); }
.qa-icon.purple { background: rgba(124,58,237,.12); }
.qa-icon.green  { background: rgba(16,185,129,.12); }
.qa-icon.cyan   { background: rgba(6,182,212,.12);  }

.qa-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  text-align: center;
}

/* ─── PROGRESS BAR ───────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--surface-2);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--grad);
  transition: width .8s var(--ease);
}

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--t2);
}
.empty-state .empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state .empty-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.9;
}
.empty-state p { font-size: 14px; }

.trial-icon,
.goal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -2px;
}
.trial-icon {
  margin-right: 8px;
}
.goal-icon {
  margin-right: 6px;
}
.trial-icon svg,
.goal-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

/* ─── PLAN BANNER ────────────────────────────────────────────── */
.plan-banner {
  background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.plan-banner-text { font-size: 13.5px; color: #92400E; }
.plan-banner-text strong { font-weight: 700; }

/* ─── DESKTOP GRID ───────────────────────────────────────────── */
@media (min-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .dash-cols {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   PROPERTIES — Cards, Tags, Map, Upload
   ═══════════════════════════════════════════════════════════════ */

/* ─── FILTER / SEARCH BAR ────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap .form-control { padding-left: 40px; }
.search-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  pointer-events: none;
  display: flex;
}
.search-icon svg { width: 17px; height: 17px; stroke-width: 2; }

.filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  margin-bottom: 14px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  color: var(--t1);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all .18s var(--ease);
}
.filter-chip:hover  { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── VIEW TOGGLE ────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 4px;
}
.view-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: none; background: transparent;
  color: var(--t2); cursor: pointer;
  transition: all .18s var(--ease);
}
.view-btn svg { width: 17px; height: 17px; stroke-width: 2; }
.view-btn:hover  { background: var(--surface-2); color: var(--t0); }
.view-btn.active { background: var(--primary); color: #fff; }

/* ─── PROPERTY GRID ──────────────────────────────────────────── */
.prop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 560px) {
  .prop-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .prop-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── PROPERTY CARD (grid) ───────────────────────────────────── */
.prop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .22s var(--ease);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
}
.prop-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.prop-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF2FF 0%, #F0F4FF 100%);
  flex-shrink: 0;
}
.prop-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.prop-card:hover .prop-thumb img { transform: scale(1.04); }

.prop-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.prop-thumb-placeholder svg {
  width: 36px; height: 36px;
  stroke: var(--t3); stroke-width: 1.5;
}

.prop-thumb-badges {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.prop-status-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.1px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.status-available { background: rgba(16,185,129,.85);  color: #fff; }
.status-reserved  { background: rgba(245,158,11,.85);  color: #fff; }
.status-sold      { background: rgba(79,103,240,.85);  color: #fff; }
.status-rented    { background: rgba(124,58,237,.85);  color: #fff; }
.status-inactive  { background: rgba(100,116,139,.75); color: #fff; }

.prop-purpose-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  background: rgba(15,23,42,.55);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Quick actions overlay */
.prop-actions-overlay {
  position: absolute;
  top: 10px; right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity .2s var(--ease);
  pointer-events: none;
}
.prop-card:hover .prop-actions-overlay {
  opacity: 1;
  pointer-events: all;
}
.prop-action-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--t1);
  box-shadow: 0 2px 6px rgba(15,23,42,.15);
  transition: all .15s;
  text-decoration: none;
}
.prop-action-btn svg { width: 14px; height: 14px; stroke-width: 2.2; }
.prop-action-btn:hover { background: #fff; color: var(--primary); transform: scale(1.08); }
.prop-action-btn.danger:hover { color: var(--danger); }

.prop-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.prop-price {
  font-size: 17px; font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}
.prop-price-sub {
  font-size: 11.5px; color: var(--t2);
  margin-bottom: 6px;
}
.prop-title {
  font-size: 14px; font-weight: 600;
  color: var(--t0);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prop-location {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--t2);
  margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prop-location svg { width: 12px; height: 12px; stroke-width: 2.3; flex-shrink: 0; }

.prop-specs {
  display: flex; gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.prop-spec {
  display: flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--t2); font-weight: 500;
}
.prop-spec svg { width: 12px; height: 12px; stroke-width: 2.3; }

.prop-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: auto;
  padding-top: 8px;
}

/* ─── PROPERTY CARD (list view) ──────────────────────────────── */
.prop-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.prop-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .2s var(--ease);
  text-decoration: none;
  position: relative;
}
.prop-list-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.prop-list-thumb {
  width: 90px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF2FF 0%, #F0F4FF 100%);
  display: flex; align-items: center; justify-content: center;
}
.prop-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prop-list-thumb svg { width: 26px; height: 26px; stroke: var(--t3); stroke-width: 1.5; }

@media (min-width: 900px) {
  .prop-list-thumb { width: 130px; }
}

.prop-list-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.prop-list-title {
  font-size: 14.5px; font-weight: 600; color: var(--t0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.prop-list-sub {
  font-size: 12.5px; color: var(--t2);
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prop-list-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.prop-list-meta {
  flex-shrink: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.prop-list-price {
  font-size: 15px; font-weight: 800; color: var(--primary);
  letter-spacing: -0.3px;
}
.prop-list-actions { display: flex; gap: 6px; }
.prop-list-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--t2);
  transition: all .15s;
  text-decoration: none;
}
.prop-list-btn svg { width: 13px; height: 13px; stroke-width: 2.3; }
.prop-list-btn:hover { background: var(--primary); color: #fff; }
.prop-list-btn.danger:hover { background: var(--danger); color: #fff; }

/* ─── TAG PILLS ──────────────────────────────────────────────── */
.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  cursor: default;
}
.tag-blue   { background: rgba(79,103,240,.1);   color: #4F67F0; }
.tag-green  { background: rgba(16,185,129,.1);   color: #059669; }
.tag-purple { background: rgba(124,58,237,.1);   color: #7C3AED; }
.tag-amber  { background: rgba(245,158,11,.1);   color: #B45309; }
.tag-red    { background: rgba(239,68,68,.1);    color: #DC2626; }
.tag-cyan   { background: rgba(6,182,212,.1);    color: #0891B2; }
.tag-pink   { background: rgba(236,72,153,.1);   color: #DB2777; }
.tag-indigo { background: rgba(99,102,241,.1);   color: #4F46E5; }

/* Selectable tag (in form) */
.tag-selectable {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .18s var(--ease);
  user-select: none;
}
.tag-selectable.selected { border-color: currentColor; }
.tag-selectable:hover { opacity: .85; }

/* ─── STATUS QUICK-CHANGE (dropdown) ─────────────────────────── */
.status-select {
  font-size: 12px; font-weight: 700;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 20px;
}
.status-select.status-available { background-color: rgba(16,185,129,.85); color:#fff; }
.status-select.status-reserved  { background-color: rgba(245,158,11,.85); color:#fff; }
.status-select.status-sold      { background-color: rgba(79,103,240,.85); color:#fff; }
.status-select.status-rented    { background-color: rgba(124,58,237,.85); color:#fff; }
.status-select.status-inactive  { background-color: rgba(100,116,139,.75); color:#fff; }

/* ─── MAP CONTAINER ──────────────────────────────────────────── */
.map-view-wrap { display: none; margin-bottom: 24px; }
.map-view-wrap.active { display: block; }

.map-container {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 1;
  position: relative;
}

@media (min-width: 900px) {
  .map-container { height: 560px; }
  .map-with-list {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
  }
  .map-container { height: 600px; }
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.14) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 220px !important;
}
.map-popup-img {
  width: 100%; height: 110px;
  object-fit: cover;
  display: block;
}
.map-popup-img-placeholder {
  width: 100%; height: 110px;
  background: linear-gradient(135deg, #EEF2FF, #F0F4FF);
  display: flex; align-items: center; justify-content: center;
}
.map-popup-img-placeholder svg { width: 28px; height: 28px; stroke: #94A3B8; stroke-width: 1.5; }
.map-popup-body { padding: 12px; }
.map-popup-title { font-size: 13.5px; font-weight: 700; color: #0F172A; margin-bottom: 3px; line-height: 1.3; }
.map-popup-price { font-size: 14px; font-weight: 800; color: #4F67F0; margin-bottom: 8px; }
.leaflet-container .map-popup-link {
  display: block; text-align: center;
  padding: 7px 12px;
  background: linear-gradient(135deg, #4F67F0, #7C3AED);
  color: #fff; border-radius: 8px;
  font-size: 12.5px; font-weight: 700;
  text-decoration: none;
}
.leaflet-container .map-popup-link:visited,
.leaflet-container .map-popup-link:hover,
.leaflet-container .map-popup-link:active {
  color: #fff;
  text-decoration: none;
}
.leaflet-popup-tip-container { display: none !important; }

/* Map sidebar (desktop) */
.map-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-height: 600px;
  overflow-y: auto;
}
.map-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 700; color: var(--t0);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.map-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.map-sidebar-item:hover { background: var(--surface-2); }
.map-sidebar-item:last-child { border-bottom: none; }
.map-sidebar-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.map-sidebar-thumb img { width:100%; height:100%; object-fit:cover; }
.map-sidebar-thumb svg { width: 18px; height: 18px; stroke: var(--t3); stroke-width: 1.5; }
.map-sidebar-info { flex: 1; min-width: 0; }
.map-sidebar-name { font-size: 13px; font-weight: 600; color: var(--t0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-sidebar-price { font-size: 12.5px; color: var(--primary); font-weight: 700; }
.map-no-coords {
  padding: 20px;
  text-align: center;
  color: var(--t2);
  font-size: 13.5px;
}

/* ─── FORM SECTIONS (properties-form) ───────────────────────── */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.form-section-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.form-section-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.form-section-icon svg { width: 16px; height: 16px; stroke-width: 2.2; }
.form-section-icon.blue   { background: rgba(79,103,240,.1);   color: var(--primary); }
.form-section-icon.green  { background: rgba(16,185,129,.1);   color: #059669; }
.form-section-icon.purple { background: rgba(124,58,237,.1);   color: var(--secondary); }
.form-section-icon.amber  { background: rgba(245,158,11,.1);   color: #B45309; }
.form-section-icon.cyan   { background: rgba(6,182,212,.1);    color: #0891B2; }
.form-section-icon.pink   { background: rgba(236,72,153,.1);   color: #DB2777; }
.form-section-title { font-size: 15px; font-weight: 700; color: var(--t0); }
.form-section-body { padding: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 0;
}
@media (min-width: 540px) {
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.form-row .form-group { margin-bottom: 0; }
.form-row + .form-row { margin-top: 16px; }
.form-row + .form-group { margin-top: 16px; }
.form-group + .form-row { margin-top: 0; }

/* ─── IMAGE UPLOAD ZONE ──────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s var(--ease);
  position: relative;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(79,103,240,.04);
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.upload-zone-icon {
  width: 48px; height: 48px;
  background: var(--surface-2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.upload-zone-icon svg { width: 22px; height: 22px; stroke: var(--primary); stroke-width: 2; }
.upload-zone-title { font-size: 14.5px; font-weight: 700; color: var(--t0); margin-bottom: 4px; }
.upload-zone-hint  { font-size: 12.5px; color: var(--t2); }

/* Main photo preview */
.main-photo-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--surface-2);
}
.main-photo-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.main-photo-preview .photo-remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(239,68,68,.9);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.main-photo-preview .photo-remove-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
@media (min-width: 560px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(5, 1fr); } }

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gallery-item-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(239,68,68,.85);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; opacity: 0;
  transition: opacity .15s;
}
.gallery-item:hover .gallery-item-remove { opacity: 1; }
.gallery-item-remove svg { width: 11px; height: 11px; stroke-width: 3; }

/* ─── MAP PICKER (form) ──────────────────────────────────────── */
.map-picker {
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border-2);
  transition: border-color .2s;
  margin-top: 8px;
}
.map-picker:focus-within { border-color: var(--primary); }

/* ─── FEATURES CHECKLIST ─────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 540px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-check {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13.5px; color: var(--t1); font-weight: 500;
  transition: all .18s var(--ease);
  user-select: none;
}
.feature-check input { display: none; }
.feature-check-box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.feature-check-box svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; opacity: 0; }
.feature-check.checked {
  border-color: var(--primary);
  background: rgba(79,103,240,.06);
  color: var(--primary);
}
.feature-check.checked .feature-check-box {
  background: var(--primary); border-color: var(--primary);
}
.feature-check.checked .feature-check-box svg { opacity: 1; }

/* ─── TAGS MANAGER (form) ────────────────────────────────────── */
.tags-wrap {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
}
.tag-selectable {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid rgba(0,0,0,.1);
  cursor: pointer;
  transition: all .18s var(--ease);
  user-select: none;
  opacity: .65;
}
.tag-selectable.selected {
  opacity: 1;
  border-width: 2px;
  border-color: currentColor;
  box-shadow: 0 0 0 3px rgba(79,103,240,.12);
}
.tag-selectable svg { width: 12px; height: 12px; stroke-width: 2.5; }

.add-tag-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border: 1.5px dashed var(--border-2);
  color: var(--t2);
  background: transparent;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.add-tag-btn:hover { border-color: var(--primary); color: var(--primary); }
.add-tag-btn svg { width: 12px; height: 12px; stroke-width: 2.5; }

/* New tag inline form */
.new-tag-form {
  display: none;
  align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.new-tag-form.open { display: flex; }
.new-tag-form .form-control {
  flex: 1; min-width: 150px;
  height: 38px; font-size: 13.5px; padding: 8px 12px;
}
.color-picker { display: flex; gap: 6px; align-items: center; }
.color-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer; transition: transform .15s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--t1); }

/* ─── FORM MAP PICKER ────────────────────────────────────────── */
.cep-row { display: flex; gap: 8px; align-items: flex-end; }
.cep-row .form-group { flex: 1; margin-bottom: 0; }
.cep-btn {
  height: 48px;
  padding: 0 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  color: var(--t1); cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: all .18s; white-space: nowrap;
  flex-shrink: 0;
}
.cep-btn:hover { border-color: var(--primary); color: var(--primary); }
.cep-btn svg { width: 15px; height: 15px; stroke-width: 2.2; }

/* ─── DETAIL PAGE ────────────────────────────────────────────── */
.prop-detail-gallery {
  display: grid;
  gap: 6px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.prop-detail-gallery.one   { grid-template-columns: 1fr; }
.prop-detail-gallery.two   { grid-template-columns: 1fr 1fr; }
.prop-detail-gallery.three { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.prop-detail-gallery.four  { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.prop-detail-gallery.more  { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }

.gallery-main { grid-row: span 2; }
.gallery-cell {
  overflow: hidden; position: relative;
  background: var(--surface-2);
  aspect-ratio: auto;
}
.gallery-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-cell.tall { min-height: 200px; }
.gallery-more-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  cursor: pointer;
}

.prop-detail-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 900px) {
  .prop-detail-cols { grid-template-columns: 1fr 320px; }
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.detail-card-title {
  font-size: 14.5px; font-weight: 700; color: var(--t0);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.detail-card-title svg { width: 16px; height: 16px; stroke-width: 2.2; color: var(--primary); }

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.spec-item { display: flex; flex-direction: column; gap: 2px; }
.spec-label { font-size: 11.5px; color: var(--t2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.spec-value { font-size: 15px; font-weight: 700; color: var(--t0); }

.features-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.feature-tag {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: var(--surface-2);
  border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--t1);
}
.feature-tag svg { width: 13px; height: 13px; stroke-width: 2.2; color: var(--primary); }

.map-detail {
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Lightbox overlay */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,13,28,.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center; justify-content: center;
  flex-direction: column;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: 12px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.lightbox-close svg { width: 20px; height: 20px; stroke-width: 2.2; }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-nav svg { width: 22px; height: 22px; stroke-width: 2.2; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter { color: rgba(255,255,255,.7); font-size: 13px; margin-top: 12px; }
