/* ================================================================
   HOMEFUTURE — COMPONENTS
   components.css: Navbar · Hero · Property Card · Filter · Footer
                   Chat · Dashboard · Admin · Modal · Toast · Spinner
   ================================================================ */

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0;
  z-index: var(--z-sticky);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: 64px;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,.04);
}
.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}
.navbar-brand {
  display: flex; align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.navbar-nav {
  display: flex; align-items: center; gap: 2px;
  list-style: none; flex: 1;
}
.navbar-nav .nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 7px 10px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.navbar-nav .nav-link:hover       { color: var(--primary); background: var(--primary-50); }
.navbar-nav .nav-link.active      { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.navbar-nav .nav-link i           { font-size: 14px; }
.navbar-nav .nav-link .nav-caret  { font-size: 10px; opacity: .6; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: var(--z-dropdown);
  animation: scaleIn .15s var(--ease);
  transform-origin: top left;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font-size: var(--size-base);
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.dropdown-item:hover { background: var(--bg); color: var(--primary); }
.dropdown-item i     { width: 18px; text-align: center; color: var(--text-muted); font-size: 14px; }
.dropdown-divider    { border-top: 1px solid var(--border); margin: 4px 0; }

/* Navbar actions */
.navbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.navbar-actions .btn-post {
  background: linear-gradient(135deg, var(--vip), #e05500);
  color: var(--white);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  border: none;
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.navbar-actions .btn-post:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,0,.35);
  color: var(--white);
}

.navbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.navbar-avatar:hover { border-color: var(--primary); }

/* User dropdown */
.user-dropdown { position: relative; }
.user-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: var(--z-dropdown);
  animation: scaleIn .15s var(--ease);
}
.user-dropdown.open .user-dropdown-menu { display: block; }
.user-info-block {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.user-info-name  { font-weight: 700; font-size: var(--size-base); }
.user-info-email { font-size: var(--size-xs); color: var(--text-muted); margin-top: 2px; }

/* Hamburger */
.navbar-toggler {
  display: none;
  background: none; border: none;
  padding: 6px; cursor: pointer;
  color: var(--text);
  font-size: 20px;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0B4FDB 0%, #0D6EFD 55%, #1a7fff 100%);
  position: relative;
  padding: 48px 0 56px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23fff' fill-opacity='0.03'%3E%3Cpath d='M50 50c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10zM10 10c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: var(--size-xs); font-weight: 600;
  padding: 4px 12px; border-radius: var(--radius-pill);
  margin-bottom: 12px; letter-spacing: .5px;
}
.hero-title {
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hero-title span { color: #FFD54F; }
.hero-subtitle   { color: rgba(255,255,255,.8); font-size: var(--size-md); margin-bottom: 28px; }

.hero-stats { display: flex; gap: 28px; margin-bottom: 28px; }
.hero-stat  { color: rgba(255,255,255,.85); font-size: var(--size-sm); }
.hero-stat-value { font-size: var(--size-2xl); font-weight: 800; color: var(--white); display: block; line-height: 1; margin-bottom: 2px; }

/* Search box */
.search-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 20px 20px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  position: relative;
  z-index: 2;
}
.search-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.search-tab-btn {
  padding: 6px 14px;
  font-size: var(--size-sm); font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.search-tab-btn.active, .search-tab-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.search-main-row {
  display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px;
}
.search-input-wrap {
  flex: 1;
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: var(--transition);
  overflow: hidden;
}
.search-input-wrap:focus-within {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: var(--shadow-focus);
}
.search-input-wrap i     { padding: 0 12px; color: var(--text-muted); font-size: 15px; flex-shrink: 0; }
.search-input-wrap input {
  flex: 1; border: none; background: transparent;
  padding: 11px 4px;
  font-size: var(--size-base); font-family: var(--font);
  outline: none; color: var(--text);
}
.search-input-wrap input::placeholder { color: var(--text-light); }
.search-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.search-filters .form-select { flex: 1; min-width: 130px; font-size: var(--size-sm); padding: 8px 32px 8px 10px; }
.search-filters .combobox    { flex: 1; min-width: 130px; }

/* ── COMBOBOX ───────────────────────────────────────────────── */
.combobox { position: relative; }
.combobox-wrap {
  position: relative;
  display: flex; align-items: center;
}
.combobox-input {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: var(--transition);
  cursor: text;
}
.combobox-input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
  background: var(--white);
}
.combobox-input::placeholder { color: var(--text-muted); }
.combobox-input.search-box-style {
  background: var(--bg);
  height: 36px;
  font-size: var(--size-sm);
  padding: 0 32px 0 10px;
  border-color: var(--border);
}
.combobox-arrow {
  position: absolute; right: 10px;
  font-size: 10px; color: var(--text-muted);
  pointer-events: none; transition: var(--transition);
}
.combobox-clear {
  position: absolute; right: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 11px;
  padding: 4px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  line-height: 1; transition: var(--transition);
  width: 20px; height: 20px;
}
.combobox-clear:hover { color: var(--danger); background: var(--danger-light); }
.combobox.has-value .combobox-arrow { display: none; }
.combobox.has-value .combobox-clear { display: flex; }
.combobox-dropdown {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 220px; overflow-y: auto;
  z-index: calc(var(--z-dropdown) + 20);
}
.combobox-dropdown.open { display: block; }
.combobox-option {
  padding: 9px 14px; font-size: 13px;
  cursor: pointer; color: var(--text);
  transition: background .1s;
}
.combobox-option:hover,
.combobox-option.active { background: var(--primary-light); color: var(--primary); }
.combobox-option mark   { background: none; color: var(--primary); font-weight: 700; }
.combobox-empty {
  padding: 14px; font-size: 13px;
  color: var(--text-muted); text-align: center;
}

/* ── SEARCH AUTOCOMPLETE ────────────────────────────────────── */
.search-autocomplete {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px; overflow-y: auto;
  z-index: calc(var(--z-dropdown) + 30);
}
.search-autocomplete.open { display: block; }
.autocomplete-section { }
.autocomplete-section + .autocomplete-section { border-top: 1px solid var(--border-light); }
.autocomplete-section-title {
  padding: 10px 14px 4px;
  font-size: 10px; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: .8px;
  display: flex; align-items: center; gap: 6px;
}
.autocomplete-item {
  padding: 10px 16px;
  font-size: 13px; cursor: pointer;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  transition: background .1s;
  border-bottom: 1px solid var(--border-light);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.ac-active { background: var(--primary-light); color: var(--primary); }
.autocomplete-item i.ac-icon {
  font-size: 12px; color: var(--text-muted);
  width: 16px; flex-shrink: 0; text-align: center;
}
.autocomplete-item:hover i.ac-icon,
.autocomplete-item.ac-active i.ac-icon { color: var(--primary); }
.autocomplete-item mark  { background: none; color: var(--primary); font-weight: 700; }
.autocomplete-item-body  { flex: 1; min-width: 0; }
.autocomplete-item-name  { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-item-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.autocomplete-item-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.autocomplete-badge-type     { background: var(--primary-light); color: var(--primary); }
.autocomplete-badge-location { background: var(--success-light);  color: var(--success); }
.autocomplete-badge-title    { background: var(--warning-light);  color: #856404; }
.autocomplete-empty {
  padding: 20px 14px; font-size: 13px;
  color: var(--text-muted); text-align: center;
}
.autocomplete-loading {
  padding: 12px 14px; font-size: 12px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.search-submit {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: var(--size-base); font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; flex-shrink: 0;
}
.search-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13,110,253,.35);
}

/* ── CATEGORY GRID ─────────────────────────────────────────── */
.category-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none; color: var(--text);
  text-align: center;
}
.category-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.category-icon-wrap {
  width: 52px; height: 52px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--primary);
  transition: var(--transition);
  flex-shrink: 0;
}
.category-item:hover .category-icon-wrap { background: var(--primary); color: var(--white); }
.category-name  { font-size: 12px; font-weight: 600; line-height: 1.3; }
.category-count { font-size: var(--size-xs); color: var(--text-muted); }

/* ── VIP / REGULAR SECTION HEADERS ────────────────────────── */
.vip-section-header {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FFF8E6 0%, #FFF0CC 100%);
  border: 1px solid #F5A623;
  border-radius: var(--radius);
  color: #8A5C00;
  font-weight: 700; font-size: 14px;
  margin-bottom: 4px;
}
.vip-section-header i { color: #F5A623; font-size: 15px; }

.regular-section-header {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-top: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600; font-size: 13px;
  margin-top: 8px;
}

/* ── PROPERTY CARD ─────────────────────────────────────────── */
.property-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition-slow);
  cursor: pointer;
  display: flex; flex-direction: column;
  height: 100%;
  position: relative;
}
.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.property-card.is-vip {
  border: 2px solid #F5A623;
  box-shadow: 0 4px 20px rgba(245,166,35,.3), 0 1px 4px rgba(0,0,0,.06);
  background: linear-gradient(180deg, #FFFDF0 0%, var(--bg-card) 70%);
}
.property-card.is-vip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F5A623 0%, #FFD700 50%, #F5A623 100%);
  z-index: 3;
  border-radius: var(--radius) var(--radius) 0 0;
}
.property-card.is-vip:hover { border-color: #D48800; }
.property-card.is-vip .card-price { color: #B8720A; }
.property-card.is-featured { border-color: rgba(13,110,253,.25); }

/* Card image */
.card-img-wrap {
  position: relative;
  padding-top: 62%;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.card-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.property-card:hover .card-img-wrap img { transform: scale(1.06); }

/* Badges on image */
.card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 2;
}
.card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  font-size: 10px; font-weight: 700;
  border-radius: 6px;
  letter-spacing: .3px;
  backdrop-filter: blur(4px);
}
.card-badge-vip {
  background: linear-gradient(135deg, #F5A623 0%, #FFD700 100%);
  color: #7B4D00;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  box-shadow: 0 2px 8px rgba(245,166,35,.5);
}
.card-badge-hot     { background: rgba(220,53,69,.9);  color: var(--white); }
.card-badge-urgent  { background: rgba(255,193,7,.95); color: #212529; }
.card-badge-new     { background: rgba(25,135,84,.9);  color: var(--white); }

/* Favorite button */
.card-fav {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.9);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer; font-size: 15px;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  z-index: 2;
}
.card-fav:hover           { background: var(--white); color: var(--danger); }
.card-fav.is-saved        { color: var(--danger); background: var(--white); }
.card-fav.is-saved i      { font-weight: 900; }

/* Image count */
.card-img-count {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.55);
  color: var(--white);
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}

/* Card body */
.card-content {
  padding: 14px 14px 12px;
  flex: 1; display: flex; flex-direction: column;
}
.card-price {
  font-size: 18px; font-weight: 800;
  color: var(--danger);
  margin-bottom: 5px;
  display: flex; align-items: baseline; gap: 6px;
}
.card-price .price-unit { font-size: var(--size-sm); font-weight: 500; color: var(--text-muted); }
.card-price.negotiate   { color: var(--text-muted); font-size: var(--size-md); }

.card-title {
  font-size: 13px; font-weight: 600;
  color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 7px;
}
.card-location {
  font-size: var(--size-xs); color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; margin-bottom: 8px;
}
.card-location i { color: var(--primary); font-size: 10px; flex-shrink: 0; }

.card-specs {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px solid var(--border-light);
  margin-top: auto; font-size: var(--size-xs); color: var(--text-muted);
}
.card-spec { display: flex; align-items: center; gap: 4px; }
.card-spec i { font-size: 11px; color: var(--primary-dark); }
.card-time  { margin-left: auto; font-size: var(--size-xs); color: var(--text-light); }

/* Property card — list variant */
.property-card-list {
  flex-direction: row;
  align-items: stretch;
}
.property-card-list .card-img-wrap {
  width: 220px; min-width: 220px; flex-shrink: 0;
  padding-top: 0;
}
.property-card-list .card-img-wrap img { position: relative; height: 100%; }

/* Property card — horizontal (search result) */
.property-card-h {
  flex-direction: row;
  border-radius: var(--radius-md);
}
.property-card-h .card-img-wrap {
  width: 180px; min-width: 180px; padding-top: 0; height: 130px; flex-shrink: 0;
}
.property-card-h .card-img-wrap img { position: relative; height: 100%; }

/* ── PROVINCE CARD ─────────────────────────────────────────── */
.province-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer; display: block;
  text-decoration: none;
}
.province-card img {
  width: 100%; height: 150px; object-fit: cover;
  transition: transform .5s var(--ease);
}
.province-card:hover img { transform: scale(1.08); }
.province-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  padding: 24px 12px 12px;
  color: var(--white);
}
.province-name  { font-size: 14px; font-weight: 700; }
.province-count { font-size: var(--size-xs); opacity: .85; margin-top: 2px; }

/* ── NEWS CARD ─────────────────────────────────────────────── */
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: var(--text);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text); }
.news-card-img { width: 100%; height: 180px; object-fit: cover; }
.news-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.news-category  {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: var(--size-xs); font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px;
}
.news-title { font-size: var(--size-base); font-weight: 700; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-excerpt { font-size: var(--size-sm); color: var(--text-muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.news-meta { font-size: var(--size-xs); color: var(--text-light); display: flex; gap: 12px; margin-top: auto; }

/* ── FILTER OFFCANVAS (mobile-only, hidden by default) ─────── */
.filter-offcanvas-overlay { display: none; }
.filter-offcanvas          { display: none; }

/* ── FILTER SIDEBAR ────────────────────────────────────────── */
.filter-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky; top: 72px;
}
.filter-panel-header {
  padding: 14px 16px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700; font-size: var(--size-md);
  display: flex; align-items: center; gap: 8px;
}
.filter-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}
.filter-section:last-child { border-bottom: none; }
.filter-section-title {
  font-size: var(--size-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); margin-bottom: 10px;
}
.filter-chips   { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  padding: 4px 12px;
  font-size: var(--size-sm); font-weight: 500;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer; transition: var(--transition);
  background: transparent; color: var(--text-muted);
  user-select: none;
}
.filter-chip:hover  { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ── LIST TOPBAR ───────────────────────────────────────────── */
.list-topbar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: var(--gap-md);
  box-shadow: var(--shadow-xs);
}
.list-count  { font-size: var(--size-sm); color: var(--text-muted); flex: 1; }
.list-count strong { color: var(--text); font-weight: 700; }
.view-toggle { display: flex; gap: 4px; }
.view-btn    {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: var(--transition); font-size: 14px;
}
.view-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ── PAGINATION ────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white); color: var(--text);
  font-size: var(--size-sm); font-weight: 500;
  cursor: pointer; transition: var(--transition);
  padding: 0 8px;
}
.page-btn:hover           { border-color: var(--primary); color: var(--primary); }
.page-btn.active          { background: var(--primary); border-color: var(--primary); color: var(--white); font-weight: 700; }
.page-btn.disabled        { opacity: .4; pointer-events: none; }
.page-btn.page-ellipsis   { pointer-events: none; border-color: transparent; background: transparent; }

/* ── PROPERTY DETAIL GALLERY ───────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.gallery-grid-main {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.gallery-grid-main img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.gallery-grid-main:hover img { transform: scale(1.03); }

.gallery-grid-side {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.gallery-grid-side img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.gallery-grid-side:hover img { transform: scale(1.05); }

.gallery-grid-side:nth-child(2) { border-radius: 0 var(--radius) 0 0; }
.gallery-grid-side:last-child    { border-radius: 0 0 var(--radius) 0; }

/* Overlay khi ảnh cuối có nhiều hơn */
.gallery-more-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
  gap: 8px;
  transition: background .2s;
}
.gallery-more-overlay:hover { background: rgba(0,0,0,.65); }

/* Nút xem tất cả (góc dưới phải ảnh chính) */
.gallery-view-all {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,.92); color: var(--text);
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: var(--transition);
  backdrop-filter: blur(4px);
  z-index: 2;
}
.gallery-view-all:hover { background: #fff; transform: translateY(-1px); }

/* Ảnh lẻ / 2 ảnh: dùng layout đơn giản hơn */
.gallery-single {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.gallery-main {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
}

/* Thumbnail strip (hiển thị dưới grid khi > 5 ảnh) */
.gallery-thumbs {
  display: flex; gap: 6px; margin-top: 6px;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin; scroll-snap-type: x mandatory;
}
.gallery-thumb {
  width: 68px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  scroll-snap-align: start;
  opacity: .75;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--primary); opacity: 1; }
.gallery-thumb:hover  { border-color: var(--primary); opacity: 1; }

.gallery-count-badge {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.6); color: var(--white);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 5px;
  backdrop-filter: blur(4px); pointer-events: none;
}

/* Detail info grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.detail-info-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.detail-info-icon {
  width: 36px; height: 36px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 15px;
  flex-shrink: 0;
}
.detail-info-label { font-size: var(--size-xs); color: var(--text-muted); }
.detail-info-value { font-size: var(--size-sm); font-weight: 700; margin-top: 1px; }

/* Price detail block */
.price-block {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: var(--gap-md);
}
.price-block-main    { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1; }
.price-block-per-m2  { font-size: var(--size-sm); opacity: .8; margin-top: 4px; }

/* Contact card */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky; top: 72px;
  box-shadow: var(--shadow-md);
}
.contact-card-header {
  background: var(--primary);
  color: var(--white);
  padding: 12px 16px;
  font-weight: 700; font-size: var(--size-md);
}
.contact-card-body { padding: var(--gap-md); }
.contact-avatar {
  width: 60px; height: 60px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--primary-light);
}
.btn-call {
  width: 100%; padding: 12px;
  background: var(--success); color: var(--white);
  border: none; border-radius: var(--radius-sm);
  font-size: var(--size-md); font-weight: 700;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px;
}
.btn-call:hover { background: #146c43; transform: translateY(-1px); }
.btn-chat-contact {
  width: 100%; padding: 12px;
  background: var(--primary); color: var(--white);
  border: none; border-radius: var(--radius-sm);
  font-size: var(--size-md); font-weight: 700;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-chat-contact:hover { background: var(--primary-hover); transform: translateY(-1px); }
.phone-hidden { cursor: pointer; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: var(--gap-md);
  display: none;
}
.lightbox.show { display: flex; }
.lightbox-img  { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.12); color: var(--white);
  border: none; border-radius: 50%; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); z-index: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.12); color: var(--white);
  border: none; border-radius: 50%; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.lightbox-nav:hover    { background: rgba(255,255,255,.25); }
.lightbox-nav.prev     { left: 16px; }
.lightbox-nav.next     { right: 16px; }
.lightbox-counter      { color: rgba(255,255,255,.6); font-size: 13px; }

/* ── DASHBOARD ─────────────────────────────────────────────── */
.dash-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky; top: 72px;
}
.dash-user-block {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 24px 16px;
  text-align: center;
}
.dash-avatar {
  width: 72px; height: 72px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.35);
  margin: 0 auto 10px;
  display: block;
}
.dash-user-name  { font-weight: 800; font-size: var(--size-lg); }
.dash-user-role  { font-size: var(--size-xs); opacity: .75; margin-top: 4px; }
.dash-nav-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 11px 16px;
  font-size: var(--size-base); font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  background: none; border-left: 3px solid transparent;
}
.dash-nav-link:last-child { border-bottom: none; }
.dash-nav-link:hover   { background: var(--primary-50); color: var(--primary); border-left-color: var(--primary); }
.dash-nav-link.active  { background: var(--primary-light); color: var(--primary); font-weight: 700; border-left-color: var(--primary); }
.dash-nav-link i       { width: 18px; text-align: center; font-size: 15px; }
.dash-nav-link .badge  { margin-left: auto; }

/* Property manage card */
.prop-manage-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.prop-manage-item:hover { box-shadow: var(--shadow-md); }
.prop-manage-img {
  width: 110px; min-width: 110px; height: 82px;
  object-fit: cover; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
}
.status-active    { background: var(--success-light); color: var(--success); }
.status-pending   { background: var(--warning-light); color: #856404; }
.status-expired   { background: var(--bg); color: var(--text-muted); }
.status-rejected  { background: var(--danger-light);  color: var(--danger); }

/* ── ADMIN ─────────────────────────────────────────────────── */
.admin-layout     { display: flex; min-height: 100vh; }
.admin-sidebar    { width: 250px; min-width: 250px; background: #1A2035; min-height: 100vh; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.admin-content    { flex: 1; overflow-x: hidden; background: var(--bg); }
.admin-topbar     { background: var(--white); border-bottom: 1px solid var(--border); padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: var(--z-sticky); }
.admin-body       { padding: 24px; }
.admin-brand      { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; font-size: var(--size-xl); }
.admin-brand i    { color: var(--primary); font-size: 20px; }
.admin-nav-section { padding: 10px 16px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.3); }
.admin-nav-link   {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,.6);
  font-size: 13px; font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  text-decoration: none; cursor: pointer;
  background: none; width: 100%;
}
.admin-nav-link:hover { color: var(--white); background: rgba(255,255,255,.05); }
.admin-nav-link.active { color: var(--white); background: rgba(13,110,253,.2); border-left-color: var(--primary); }
.admin-nav-link i { width: 18px; text-align: center; font-size: 15px; }
.admin-nav-link .badge { margin-left: auto; background: var(--danger); color: var(--white); font-size: 10px; padding: 2px 6px; border-radius: var(--radius-pill); }

/* ── CHAT ──────────────────────────────────────────────────── */
.chat-layout {
  display: flex;
  height: calc(100vh - 130px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.chat-sidebar {
  width: 300px; min-width: 300px;
  border-right: 1px solid var(--border);
  overflow-y: auto; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.chat-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--white);
  z-index: 1;
}
.chat-search-wrap {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px; margin-top: 8px;
}
.chat-search-wrap i { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.chat-search-wrap input {
  flex: 1; border: none; background: transparent;
  padding: 8px 8px; font-size: 13px; outline: none;
  font-family: var(--font);
}
.chat-list     { overflow-y: auto; flex: 1; }
.chat-item     { padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--border-light); display: flex; gap: 10px; align-items: center; transition: var(--transition); }
.chat-item:hover  { background: var(--bg); }
.chat-item.active { background: var(--primary-light); }
.chat-item-av  { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; position: relative; }
.chat-item-av .online-dot { position: absolute; bottom: 1px; right: 1px; width: 10px; height: 10px; background: var(--success); border-radius: 50%; border: 2px solid var(--white); }
.chat-item-body { flex: 1; min-width: 0; }
.chat-item-top  { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.chat-item-name { font-size: 13px; font-weight: 700; }
.chat-item-time { font-size: var(--size-xs); color: var(--text-light); }
.chat-item-preview { font-size: var(--size-sm); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread { background: var(--primary); color: var(--white); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.chat-main     { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-header   { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-shrink: 0; background: var(--white); }
.chat-header-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.chat-input-area { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; background: var(--white); }
.chat-textarea {
  flex: 1; border: 1.5px solid var(--border);
  border-radius: 20px; padding: 9px 16px;
  resize: none; outline: none;
  font-family: var(--font); font-size: 13px;
  max-height: 100px; transition: border-color .2s;
  background: var(--bg);
}
.chat-textarea:focus { border-color: var(--primary); background: var(--white); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  border: none; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-hover); transform: scale(1.05); }

.msg-wrap     { display: flex; flex-direction: column; max-width: 70%; }
.msg-wrap.own { align-self: flex-end; align-items: flex-end; }
.msg-wrap.other { align-self: flex-start; align-items: flex-start; }
.msg-bubble   { padding: 10px 14px; border-radius: 18px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.msg-bubble.own   { background: var(--primary); color: var(--white); border-bottom-right-radius: 4px; }
.msg-bubble.other { background: var(--bg);     color: var(--text);  border-bottom-left-radius: 4px; }
.msg-time     { font-size: 10px; color: var(--text-light); margin-top: 3px; }

/* ── UPLOAD ZONE ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px; text-align: center;
  cursor: pointer; transition: var(--transition);
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone-icon  { font-size: 44px; color: var(--primary); margin-bottom: 10px; opacity: .7; }
.upload-zone-title { font-size: var(--size-md); font-weight: 700; margin-bottom: 4px; }
.upload-zone-hint  { font-size: var(--size-sm); color: var(--text-muted); }

.img-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.img-preview-item { position: relative; width: 96px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--border); flex-shrink: 0; }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; background: rgba(0,0,0,.65); color: var(--white); border: none; border-radius: 50%; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.img-preview-main  { position: absolute; bottom: 3px; left: 3px; background: var(--primary); color: var(--white); font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }

/* ── WIZARD STEPS ──────────────────────────────────────────── */
.wizard-steps {
  display: flex; align-items: center;
  gap: 0; margin-bottom: 28px;
}
.wizard-step     { display: flex; align-items: center; flex: 1; }
.wizard-step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition);
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
}
.wizard-step.done .wizard-step-circle   { background: var(--success); border-color: var(--success); color: var(--white); }
.wizard-step.active .wizard-step-circle { background: var(--primary); border-color: var(--primary); color: var(--white); box-shadow: 0 0 0 4px rgba(13,110,253,.2); }
.wizard-step-line { flex: 1; height: 2px; background: var(--border); transition: var(--transition); }
.wizard-step.done .wizard-step-line { background: var(--success); }
.wizard-step-label { font-size: 11px; font-weight: 600; text-align: center; margin-top: 5px; color: var(--text-muted); white-space: nowrap; }
.wizard-step.active .wizard-step-label { color: var(--primary); }
.wizard-step.done .wizard-step-label   { color: var(--success); }

/* ── PACKAGE CARD ──────────────────────────────────────────── */
.package-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer; transition: var(--transition);
  position: relative;
}
.package-card:hover  { border-color: var(--primary); }
.package-card.active { border-color: var(--primary); background: var(--primary-light); }

/* VIP package card */
.package-card-vip {
  border-color: #F5A623;
  background: linear-gradient(160deg, #FFFDF0 0%, var(--bg-card) 60%);
}
.package-card-vip::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #F5A623, #FFD700, #F5A623);
  border-radius: var(--radius) var(--radius) 0 0;
}
.package-card-vip:hover { border-color: #D48800; }
.package-card-vip.active { border-color: #D48800; background: #FFF8E0; }
.package-vip-badge {
  position: absolute; top: -1px; right: 16px;
  background: linear-gradient(135deg, #F5A623, #FFD700);
  color: #7B4D00;
  font-size: 10px; font-weight: 800; padding: 3px 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  letter-spacing: .4px;
}

.package-recommended-badge {
  position: absolute; top: -1px; right: 16px;
  background: var(--vip); color: var(--white);
  font-size: 10px; font-weight: 700; padding: 3px 10px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-transform: uppercase; letter-spacing: .5px;
}
.package-name  { font-size: var(--size-lg); font-weight: 800; margin-bottom: 6px; }
.package-price { font-size: 24px; font-weight: 800; color: var(--vip); margin-bottom: 4px; }
.package-price.free { color: var(--success); }
.package-desc  { font-size: var(--size-sm); color: var(--text-muted); margin-bottom: 12px; }
.package-features { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.package-feature { display: flex; align-items: center; gap: 8px; font-size: var(--size-sm); }
.package-feature i { color: var(--success); font-size: 13px; flex-shrink: 0; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}
.footer {
  background: #1A2035;
  color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
  font-size: var(--size-sm);
}
.footer-brand-name { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.footer-brand-logo { display: block; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-desc       { line-height: var(--lh-loose); margin-bottom: 16px; }
.footer-heading    { color: var(--white); font-weight: 700; font-size: var(--size-md); margin-bottom: 14px; }
.footer-link {
  display: block; color: rgba(255,255,255,.6);
  margin-bottom: 8px; transition: var(--transition);
  text-decoration: none; font-size: 13px;
}
.footer-link:hover { color: var(--white); padding-left: 4px; }
.footer-social     { display: flex; gap: 8px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: var(--transition);
  text-decoration: none;
}
.social-btn:hover { background: var(--primary); color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 32px; padding-top: 16px;
  font-size: 12px; color: rgba(255,255,255,.35);
  text-align: center;
}

/* ── MOBILE BOTTOM NAV ─────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: var(--z-fixed);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}
.bottom-nav-inner { display: flex; height: 56px; }
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i          { font-size: 20px; display: block; }
.bottom-nav-item.active     { color: var(--primary); }
.bottom-nav-post {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-top: -20px;
  box-shadow: 0 4px 16px rgba(13,110,253,.45);
  flex-shrink: 0;
}

/* ── TOAST NOTIFICATIONS ───────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 72px; right: 16px;
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
@media (min-width: 768px) { .toast-container { bottom: 20px; } }
.toast-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 280px; max-width: 360px;
  border-left: 4px solid;
  animation: slideInRight .3s var(--ease);
  pointer-events: auto;
  font-size: 13px;
}
.toast-item.success { border-color: var(--success); }
.toast-item.error   { border-color: var(--danger);  }
.toast-item.warning { border-color: var(--warning); }
.toast-item.info    { border-color: var(--primary);  }
.toast-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.toast-item.success .toast-icon { color: var(--success); }
.toast-item.error   .toast-icon { color: var(--danger);  }
.toast-item.warning .toast-icon { color: var(--warning); }
.toast-item.info    .toast-icon { color: var(--primary);  }
.toast-msg  { flex: 1; line-height: 1.4; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 0; flex-shrink: 0; }

/* ── LOADING SPINNER ───────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.8);
  z-index: var(--z-spinner);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
  display: none;
  backdrop-filter: blur(2px);
}
.loading-overlay.show { display: flex; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
.spinner-lg { width: 56px; height: 56px; border-width: 4px; }
.loading-text { font-size: var(--size-sm); color: var(--text-muted); font-weight: 500; }

/* Inline spinner */
.spin { animation: spin .7s linear infinite; display: inline-block; }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: var(--z-modal-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  display: none;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 500px; max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn .2s var(--ease);
  position: relative;
}
.modal-header {
  padding: 20px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-title { font-size: var(--size-xl); font-weight: 800; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: none; font-size: 16px;
  cursor: pointer; transition: var(--transition); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body   { padding: 16px 20px 20px; }
.modal-footer { padding: 0 20px 20px; display: flex; gap: 8px; justify-content: flex-end; }

/* ── AUTH PAGES ────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e7f1ff 0%, var(--bg) 60%);
  padding: var(--gap-md);
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 100%; max-width: 440px;
  animation: fadeInUp .4s var(--ease);
}
.auth-logo     { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 4px; text-decoration: none; }
.auth-heading  { font-size: clamp(20px, 3vw, 26px); font-weight: 800; margin: 12px 0 4px; }
.auth-subtext  { font-size: var(--size-sm); color: var(--text-muted); margin-bottom: 24px; }
.auth-divider  { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-muted); font-size: var(--size-sm); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.social-login-btn {
  width: 100%; padding: 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer;
  font-size: var(--size-base); font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition); color: var(--text);
  font-family: var(--font);
}
.social-login-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.password-strength { height: 4px; border-radius: 2px; background: var(--border); margin-top: 6px; overflow: hidden; }
.strength-bar { height: 100%; border-radius: 2px; transition: var(--transition-slow); }
.strength-weak   { width: 25%; background: var(--danger); }
.strength-fair   { width: 50%; background: var(--warning); }
.strength-good   { width: 75%; background: var(--info); }
.strength-strong { width: 100%; background: var(--success); }
