/* KOAF EstatePro - Main Stylesheet */
:root {
  --navy: #0a1628;
  --navy-light: #132040;
  --navy-mid: #1e3a5f;
  --gold: #d4a017;
  --gold-light: #e8b84b;
  --gold-dark: #b8860b;
  --emerald: #10b981;
  --emerald-light: #34d399;
  --white: #ffffff;
  --off-white: #f8f9fb;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --red: #ef4444;
  --red-light: #fee2e2;
  --orange: #f97316;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.6;
  font-size: 15px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ===== PUBLIC NAVBAR ===== */
.public-nav {
  background: var(--navy);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 70px; max-width: 1280px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 700; font-size: 1.2rem;
}
.nav-logo .logo-icon { font-size: 1.5rem; }
.nav-logo span:last-child { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,.8); padding: 8px 14px; border-radius: 8px;
  font-size: .9rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(255,255,255,.1); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.btn-nav-login {
  color: var(--gold); border: 1px solid var(--gold); padding: 8px 20px;
  border-radius: 8px; font-weight: 600; font-size: .9rem; transition: var(--transition);
}
.btn-nav-login:hover { background: var(--gold); color: var(--navy); }
.btn-nav-register {
  background: var(--gold); color: var(--navy); padding: 8px 20px;
  border-radius: 8px; font-weight: 700; font-size: .9rem; transition: var(--transition);
}
.btn-nav-register:hover { background: var(--gold-light); transform: translateY(-1px); }
.nav-mobile-toggle { display: none; color: white; font-size: 1.5rem; padding: 8px; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #0d2a4a 100%);
  min-height: 92vh; display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,160,23,.15); border: 1px solid rgba(212,160,23,.4);
  color: var(--gold); padding: 6px 16px; border-radius: 50px; font-size: .85rem; font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem); color: var(--white); line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--gold); }
.hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 60px;
  padding-top: 40px; border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.hero-stat-label { font-size: .85rem; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ===== SEARCH BAR ===== */
.search-section { padding: 40px 0; }
.search-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-lg);
}
.search-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--gray-200); }
.search-tab {
  padding: 10px 24px; border-radius: 8px 8px 0 0; font-weight: 600; font-size: .9rem;
  color: var(--gray-500); cursor: pointer; transition: var(--transition); background: none; border: none;
}
.search-tab.active, .search-tab:hover { color: var(--navy); border-bottom: 2px solid var(--gold); margin-bottom: -2px; }
.search-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.search-field { flex: 1; min-width: 180px; }
.search-field label { display: block; font-size: .8rem; font-weight: 600; color: var(--gray-500); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.search-field input, .search-field select {
  width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--gray-800); background: var(--white); transition: var(--transition);
  font-family: inherit;
}
.search-field input:focus, .search-field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,.15);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  transition: var(--transition); cursor: pointer; border: none; font-family: inherit;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212,160,23,.4); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-mid); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-gold { border: 2px solid var(--gold); color: var(--gold); background: transparent; }
.btn-outline-gold:hover { background: var(--gold); color: var(--navy); }
.btn-emerald { background: var(--emerald); color: var(--white); }
.btn-emerald:hover { background: var(--emerald-light); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { opacity: .85; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-search { background: var(--navy); color: white; padding: 12px 28px; white-space: nowrap; }
.btn-search:hover { background: var(--navy-mid); }

/* ===== SECTION HEADINGS ===== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 52px; }
.section-label {
  display: inline-block; color: var(--gold); font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--navy); margin-bottom: 16px; line-height: 1.2;
}
.section-sub { color: var(--gray-500); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ===== PROPERTY CARDS ===== */
.properties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.property-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--gray-200);
}
.property-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.property-img-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--gray-200); }
.property-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.property-card:hover .property-img-wrap img { transform: scale(1.05); }
.property-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
}
.property-badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 50px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-sale { background: var(--navy); color: white; }
.badge-rent { background: var(--emerald); color: white; }
.badge-land { background: var(--orange); color: white; }
.badge-shortlet { background: var(--blue); color: white; }
.property-featured { position: absolute; top: 12px; right: 12px; background: var(--gold); color: var(--navy); padding: 4px 10px; border-radius: 50px; font-size: .75rem; font-weight: 700; }
.property-save-btn {
  position: absolute; bottom: 12px; right: 12px;
  background: white; border: none; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.property-save-btn:hover { transform: scale(1.1); }
.property-body { padding: 20px; }
.property-id { font-size: .75rem; color: var(--gray-400); margin-bottom: 6px; font-weight: 500; }
.property-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; line-height: 1.3; }
.property-location { font-size: .85rem; color: var(--gray-500); margin-bottom: 14px; display: flex; align-items: center; gap: 4px; }
.property-price { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.property-price span { font-size: .85rem; font-weight: 500; color: var(--gray-400); }
.property-meta { display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.property-meta-item { display: flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--gray-500); }
.property-meta-item strong { color: var(--gray-800); font-weight: 600; }
.property-status { display: inline-block; padding: 2px 10px; border-radius: 50px; font-size: .75rem; font-weight: 600; }
.status-available { background: #d1fae5; color: #065f46; }
.status-reserved { background: #fef3c7; color: #92400e; }
.status-sold { background: #fee2e2; color: #991b1b; }
.status-rented { background: #dbeafe; color: #1e40af; }
.status-under_construction { background: #f3f4f6; color: #374151; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: .75rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-primary { background: #ede9fe; color: #5b21b6; }
.badge-secondary { background: #f3f4f6; color: #374151; }
.badge-dark { background: #1e293b; color: #fff; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 268px; min-height: 100vh; background: var(--navy); position: fixed;
  top: 0; left: 0; z-index: 900; display: flex; flex-direction: column;
  transition: transform .3s ease; box-shadow: 4px 0 20px rgba(0,0,0,.2);
}
.sidebar-header {
  padding: 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; font-size: 1rem; }
.sidebar-logo .logo-icon { font-size: 1.4rem; }
.sidebar-logo span:last-child { color: var(--gold); }
.sidebar-close { color: white; font-size: 1.4rem; display: none; }
.sidebar-user { padding: 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.user-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; flex-shrink: 0;
}
.user-name { color: white; font-weight: 600; font-size: .9rem; }
.user-role { color: var(--gold); font-size: .75rem; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
.nav-section { color: rgba(255,255,255,.35); font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px; padding: 16px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  color: rgba(255,255,255,.7); font-size: .875rem; font-weight: 500; transition: var(--transition); margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: var(--gold); color: var(--navy); font-weight: 700; }
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-logout { color: rgba(255,100,100,.8) !important; }
.nav-logout:hover { background: rgba(255,100,100,.12) !important; color: #ff6b6b !important; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 899; }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: 268px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--white); height: 68px; display: flex; align-items: center;
  padding: 0 28px; border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm); justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle { font-size: 1.3rem; color: var(--gray-500); padding: 6px; cursor: pointer; display: none; }
.page-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-notif { position: relative; cursor: pointer; }
.topbar-notif-icon { font-size: 1.2rem; color: var(--gray-500); transition: var(--transition); }
.notif-badge {
  position: absolute; top: -6px; right: -6px; background: var(--red); color: white;
  font-size: .65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.page-content { padding: 28px; flex: 1; }

/* ===== STATS CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 18px;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.stat-icon-navy { background: rgba(10,22,40,.08); }
.stat-icon-gold { background: rgba(212,160,23,.12); }
.stat-icon-emerald { background: rgba(16,185,129,.1); }
.stat-icon-red { background: rgba(239,68,68,.1); }
.stat-icon-blue { background: rgba(59,130,246,.1); }
.stat-icon-orange { background: rgba(249,115,22,.1); }
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--gray-500); margin-top: 4px; font-weight: 500; }
.stat-change { font-size: .75rem; margin-top: 6px; font-weight: 600; }
.stat-up { color: var(--emerald); }
.stat-down { color: var(--red); }

/* ===== TABLES ===== */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); overflow: hidden; margin-bottom: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--navy); }
.card-body { padding: 24px; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--gray-100); padding: 12px 16px; text-align: left; font-size: .78rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: .875rem; color: var(--gray-700); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--off-white); }
.table-actions { display: flex; gap: 8px; }

/* ===== FORMS ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .83rem; font-weight: 600; color: var(--gray-700); }
.form-label .required { color: var(--red); }
.form-control {
  padding: 11px 16px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit; color: var(--gray-800); background: var(--white);
  transition: var(--transition); width: 100%;
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,.12); }
.form-control.error { border-color: var(--red); }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-hint { font-size: .78rem; color: var(--gray-400); }
.form-error { font-size: .8rem; color: var(--red); font-weight: 500; }
.form-success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; }
.form-alert-error { background: var(--red-light); border: 1px solid #fca5a5; color: #991b1b; padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-mid)); padding: 40px 20px; }
.auth-card { background: white; border-radius: var(--radius-lg); padding: 44px 40px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-icon { font-size: 3rem; display: block; margin-bottom: 8px; }
.auth-logo h1 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--navy); }
.auth-logo h1 span { color: var(--gold); }
.auth-title { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.auth-sub { color: var(--gray-400); font-size: .9rem; margin-bottom: 28px; }
.auth-divider { text-align: center; color: var(--gray-400); font-size: .85rem; margin: 20px 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 45%; height: 1px; background: var(--gray-200); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-footer { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--gray-500); }
.auth-footer a { color: var(--gold); font-weight: 600; }

/* ===== PROPERTY DETAIL ===== */
.property-detail-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 4px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/7; margin-bottom: 32px; }
.gallery-main { background: var(--gray-200); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.gallery-thumb { background: var(--gray-200); overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-thumb:hover img { transform: scale(1.05); }
.property-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.detail-price { font-size: 2.2rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.detail-meta-bar { display: flex; gap: 24px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); margin: 20px 0; }
.detail-meta-item { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.detail-meta-item .icon { font-size: 1.2rem; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); position: sticky; top: 100px; }
.agent-info { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.agent-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; }

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap { background: var(--gray-200); border-radius: 50px; height: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--navy), var(--gold)); }

/* ===== QUICK STATS ROW ===== */
.quick-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.quick-stat { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 14px 20px; flex: 1; min-width: 130px; text-align: center; }
.quick-stat .num { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.quick-stat .label { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }

/* ===== FILTER BAR ===== */
.filter-bar { background: var(--white); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; border: 1px solid var(--gray-200); display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: .75rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }

/* ===== NOTIFICATIONS DROPDOWN ===== */
.notif-dropdown {
  position: absolute; top: calc(100% + 12px); right: -12px; width: 340px;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200); z-index: 200; display: none;
}
.notif-dropdown.show { display: block; }
.notif-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.notif-item { padding: 14px 20px; border-bottom: 1px solid var(--gray-100); }
.notif-item.unread { background: #fffbeb; }
.notif-item-title { font-size: .85rem; font-weight: 600; color: var(--navy); }
.notif-item-msg { font-size: .8rem; color: var(--gray-500); margin-top: 3px; }
.notif-item-time { font-size: .72rem; color: var(--gray-400); margin-top: 4px; }

/* ===== PIPELINE ===== */
.pipeline { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.pipeline-col { min-width: 220px; flex: 1; }
.pipeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pipeline-title { font-size: .85rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.pipeline-count { background: var(--gray-200); color: var(--gray-600); width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.pipeline-card { background: var(--white); border-radius: var(--radius-sm); padding: 14px; border: 1px solid var(--gray-200); margin-bottom: 10px; cursor: pointer; transition: var(--transition); }
.pipeline-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.pipeline-card-name { font-weight: 600; font-size: .875rem; color: var(--navy); }
.pipeline-card-prop { font-size: .78rem; color: var(--gray-500); margin-top: 4px; }
.pipeline-card-date { font-size: .73rem; color: var(--gray-400); margin-top: 6px; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.page-header h1 { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--gray-400); margin-top: 4px; }
.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--gold); }

/* ===== PUBLIC PAGES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.feature-card { background: white; border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); transition: var(--transition); text-align: center; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.feature-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.feature-desc { font-size: .88rem; color: var(--gray-500); line-height: 1.6; }

.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; }
.agent-card { background: white; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); transition: var(--transition); }
.agent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.agent-card-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; margin: 0 auto 16px; }
.agent-card-name { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.agent-card-exp { font-size: .82rem; color: var(--gray-500); margin-bottom: 12px; }
.agent-card-stats { display: flex; justify-content: center; gap: 20px; }
.agent-stat { text-align: center; }
.agent-stat .val { font-size: 1.2rem; font-weight: 800; color: var(--navy); }
.agent-stat .lbl { font-size: .72rem; color: var(--gray-400); }

/* ===== CTA SECTION ===== */
.cta-section { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); padding: 80px 0; text-align: center; }
.cta-section h2 { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: white; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,.7); margin-bottom: 36px; font-size: 1.05rem; }

/* ===== FOOTER ===== */
.public-footer { background: #060e1a; color: rgba(255,255,255,.7); }
.footer-top { padding: 64px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; color: white; font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }
.footer-brand .logo-icon { font-size: 1.4rem; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; transition: var(--transition); }
.footer-social a:hover { background: var(--gold); color: var(--navy); }
.footer-links h4 { color: white; font-size: .9rem; margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links ul li a { font-size: .85rem; transition: var(--transition); }
.footer-links ul li a:hover { color: var(--gold); }
.footer-contact h4 { color: white; font-size: .9rem; margin-bottom: 16px; }
.footer-contact p { font-size: .85rem; margin-bottom: 10px; line-height: 1.5; }
.btn-whatsapp { display: inline-block; background: #25D366; color: white; padding: 10px 20px; border-radius: 8px; font-size: .85rem; font-weight: 600; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding: 20px 0; text-align: center; font-size: .83rem; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: white; border-radius: var(--radius); max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 24px 28px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.modal-close { width: 32px; height: 32px; border-radius: 8px; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; transition: var(--transition); border: none; }
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; }

/* ===== QR PAGE ===== */
.qr-page { min-height: 100vh; background: var(--off-white); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.qr-card { background: white; border-radius: var(--radius-lg); padding: 40px; max-width: 700px; width: 100%; box-shadow: var(--shadow-lg); }
.qr-property-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.qr-img { width: 120px; height: 90px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-200); flex-shrink: 0; }

/* ===== CHART PLACEHOLDER ===== */
.chart-placeholder { background: linear-gradient(135deg, var(--off-white), var(--gray-100)); border-radius: var(--radius-sm); min-height: 200px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: .9rem; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; }
.empty-desc { font-size: .9rem; color: var(--gray-400); max-width: 360px; margin: 0 auto 24px; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid white; box-shadow: 0 0 0 2px var(--gold); }
.timeline-title { font-size: .875rem; font-weight: 600; color: var(--navy); }
.timeline-desc { font-size: .82rem; color: var(--gray-500); margin-top: 3px; }
.timeline-date { font-size: .75rem; color: var(--gray-400); margin-top: 4px; }

/* ===== AI CHAT ===== */
.ai-chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 500; }
.ai-chat-btn { width: 58px; height: 58px; border-radius: 50%; background: var(--gold); color: var(--navy); border: none; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 20px rgba(212,160,23,.5); transition: var(--transition); }
.ai-chat-btn:hover { transform: scale(1.1); }
.ai-chat-box { position: absolute; bottom: 70px; right: 0; width: 340px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200); display: none; }
.ai-chat-box.show { display: block; }
.ai-chat-header { background: var(--navy); color: white; padding: 16px 20px; border-radius: var(--radius) var(--radius) 0 0; display: flex; justify-content: space-between; align-items: center; }
.ai-chat-messages { min-height: 240px; max-height: 320px; overflow-y: auto; padding: 16px; }
.ai-msg { margin-bottom: 12px; }
.ai-msg.user .msg-bubble { background: var(--navy); color: white; margin-left: auto; }
.ai-msg.bot .msg-bubble { background: var(--gray-100); color: var(--gray-800); }
.msg-bubble { display: inline-block; padding: 10px 14px; border-radius: 12px; max-width: 85%; font-size: .85rem; line-height: 1.5; }
.ai-chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--gray-200); }
.ai-chat-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: 8px; font-size: .88rem; font-family: inherit; }
.ai-chat-input input:focus { outline: none; border-color: var(--gold); }
.ai-chat-input button { background: var(--gold); color: var(--navy); border: none; width: 38px; height: 38px; border-radius: 8px; font-size: 1rem; cursor: pointer; }

/* ===== CLOCK IN ===== */
.clock-widget { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: white; border-radius: var(--radius-lg); padding: 36px; text-align: center; }
.clock-time { font-size: 3.5rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.clock-date { color: rgba(255,255,255,.6); font-size: 1rem; margin-bottom: 28px; }
.clock-btns { display: flex; gap: 16px; justify-content: center; }
.btn-clock-in { background: var(--emerald); color: white; padding: 14px 36px; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem; border: none; cursor: pointer; transition: var(--transition); }
.btn-clock-in:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(16,185,129,.4); }
.btn-clock-out { background: var(--red); color: white; padding: 14px 36px; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem; border: none; cursor: pointer; transition: var(--transition); }
.btn-clock-out:hover { transform: translateY(-2px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .property-detail-grid { grid-template-columns: 1fr; }
  .property-detail-gallery { grid-template-columns: 1fr; aspect-ratio: auto; }
  .gallery-thumbs { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; min-height: auto; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-toggle { display: block; }
  .properties-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
  .auth-card { padding: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .pipeline { flex-direction: column; }
  .pipeline-col { min-width: auto; }
}

/* Demo login buttons */
.demo-login-list{display:grid;gap:8px;margin-top:12px}
.demo-login{width:100%;border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-family:inherit;color:#0f172a;transition:.2s}
.demo-login:hover{border-color:#d4af37;background:#fffaf0;transform:translateY(-1px)}
.demo-login span{font-weight:700}.demo-login b{font-size:.8rem;color:#64748b}
