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

:root {
  --sage:       #7A9E7E;
  --sage-dark:  #3D5E41;
  --sage-light: #C8DDCA;
  --sand:       #F2EDE4;
  --sand-mid:   #E5DDD0;
  --sand-dark:  #C4B8A8;
  --clay:       #B5714A;
  --charcoal:   #2C2926;
  --muted:      #7A746E;
  --white:      #FAF8F5;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'DM Sans', sans-serif;
}

body { font-family: var(--font-sans); background: var(--white); color: var(--charcoal); }

/* NAV */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; height: 60px; background: var(--white); border-bottom: 1px solid var(--sand-mid); position: sticky; top: 0; z-index: 100; }
.logo { font-family: var(--font-serif); font-size: 1.4rem; text-decoration: none; color: var(--charcoal); }
.logo span { color: var(--sage); font-style: italic; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-size: 0.875rem; color: var(--muted); text-decoration: none; cursor: pointer; }
.nav-links a:hover { color: var(--charcoal); }
.btn-nav { background: var(--sage); color: white !important; padding: 0.45rem 1.1rem; border-radius: 100px; font-size: 0.8125rem !important; font-weight: 500; }
.btn-nav:hover { background: var(--sage-dark) !important; }



/* HERO */
.hero { background: linear-gradient(145deg, #3D5E41, #7A9E7E, #C8DDCA); padding: 4rem 2rem 3rem; text-align: center; }
.hero-tag { display: inline-block; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); border-radius: 100px; padding: 0.3rem 1rem; font-size: 0.75rem; letter-spacing: 0.08em; margin-bottom: 1.25rem; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 3rem); color: white; line-height: 1.2; margin-bottom: 0.75rem; }
.hero h1 em { font-style: italic; color: #d4edd8; }
.hero p { color: rgba(255,255,255,0.8); max-width: 480px; margin: 0 auto 2rem; line-height: 1.7; }
.search-bar { display: flex; align-items: center; background: white; border-radius: 100px; max-width: 520px; margin: 0 auto; padding: 0.4rem 0.4rem 0.4rem 1.25rem; gap: 0.5rem; }
.search-bar input { flex: 1; border: none; outline: none; font-family: var(--font-sans); font-size: 0.9375rem; color: var(--charcoal); background: transparent; }
.search-bar input::placeholder { color: var(--muted); }
.search-bar button { background: var(--clay); color: white; border: none; border-radius: 100px; padding: 0.6rem 1.25rem; font-family: var(--font-sans); font-size: 0.875rem; cursor: pointer; }
.search-bar button:hover { background: #9a5c38; }
.hero-tags { margin-top: 1.25rem; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.hero-tags span { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.2); border-radius: 100px; padding: 0.25rem 0.8rem; font-size: 0.8125rem; cursor: pointer; }
.hero-tags span:hover { background: rgba(255,255,255,0.25); }

/* FILTERS */
.filters-bar { background: var(--sand); border-bottom: 1px solid var(--sand-mid); padding: 0.75rem 2rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.filters-bar select { border: 1px solid var(--sand-dark); background: white; border-radius: 8px; padding: 0.4rem 0.75rem; font-family: var(--font-sans); font-size: 0.8125rem; color: var(--charcoal); cursor: pointer; outline: none; }
.result-count { margin-left: auto; font-size: 0.8125rem; color: var(--muted); }
.result-count strong { color: var(--charcoal); }

/* LISTINGS */
.listings { padding: 2rem; max-width: 1200px; margin: 0 auto; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.loading-msg { color: var(--muted); padding: 2rem; }

/* CARD */
.card { background: white; border: 1px solid var(--sand-mid); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; color: inherit; display: block; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.09); }
.card-img { height: 190px; background-size: cover; background-position: center; position: relative; }
.card-badges { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.4rem; }
.badge { border-radius: 100px; padding: 0.2rem 0.6rem; font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; }
.badge-type { background: var(--charcoal); color: white; }
.badge-featured { background: var(--clay); color: white; }
.card-body { padding: 1.1rem; }
.card-location { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.35rem; }
.card-title { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 0.4rem; line-height: 1.3; }
.card-desc { font-size: 0.8125rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--sand-mid); }
.card-price { font-family: var(--font-serif); font-size: 1.2rem; }
.card-price small { font-family: var(--font-sans); font-size: 0.6875rem; color: var(--muted); display: block; }
.card-rating { font-size: 0.8125rem; color: var(--muted); }
.card-rating strong { color: var(--charcoal); }

/* DETAIL */
.detail-hero-img { width: 100%; height: 380px; background-size: cover; background-position: center; }
.detail-body { max-width: 1100px; margin: 0 auto; padding: 2rem; display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: start; }
.detail-location { font-size: 0.8125rem; color: var(--sage-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; font-weight: 500; }
.detail-title { font-family: var(--font-serif); font-size: 2rem; line-height: 1.2; margin-bottom: 0.5rem; }
.detail-meta { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.25rem; }
.detail-desc { font-size: 0.9375rem; line-height: 1.8; color: var(--muted); }
.detail-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--sand-mid); }
.detail-section h3 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 0.75rem; }
.amenities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.amenity { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.amenity::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex-shrink: 0; }
.dates-list { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.date-chip { background: var(--sand); border: 1px solid var(--sand-mid); border-radius: 8px; padding: 0.5rem 0.875rem; font-size: 0.875rem; }

/* SIDEBAR */
.sidebar-card { background: white; border: 1px solid var(--sand-mid); border-radius: 16px; overflow: hidden; position: sticky; top: 75px; }
.sidebar-header { background: var(--sand); padding: 1.25rem; border-bottom: 1px solid var(--sand-mid); }
.sidebar-price { font-family: var(--font-serif); font-size: 1.875rem; }
.sidebar-price small { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--muted); }
.sidebar-body { padding: 1.25rem; }
.btn-enquire { width: 100%; background: var(--sage); color: white; border: none; border-radius: 10px; padding: 0.85rem; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.btn-enquire:hover { background: var(--sage-dark); }
.sidebar-note { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 0.75rem; line-height: 1.5; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(44,41,38,0.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: white; border-radius: 18px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--sand-mid); display: flex; justify-content: space-between; align-items: flex-start; }
.modal-header h2 { font-family: var(--font-serif); font-size: 1.3rem; }
.modal-header p { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }
.modal-close { background: var(--sand); border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 0.875rem; color: var(--muted); flex-shrink: 0; }
.modal-close:hover { background: var(--sand-mid); }
form { padding: 1.25rem 1.5rem; }
form label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.35rem; margin-top: 0.75rem; }
form input, form select, form textarea { width: 100%; border: 1px solid var(--sand-dark); border-radius: 8px; padding: 0.55rem 0.8rem; font-family: var(--font-sans); font-size: 0.875rem; color: var(--charcoal); background: white; outline: none; }
form input:focus, form select:focus, form textarea:focus { border-color: var(--sage); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-submit { width: 100%; margin-top: 1rem; background: var(--clay); color: white; border: none; border-radius: 10px; padding: 0.85rem; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.btn-submit:hover { background: #9a5c38; }
.form-note { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }
.success-msg { padding: 2.5rem; text-align: center; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--sage-light); display: flex; align-items: center; justify-content: center; font-size: 1.375rem; margin: 0 auto 1rem; }
.success-msg h3 { font-family: var(--font-serif); font-size: 1.375rem; margin-bottom: 0.5rem; }
.success-msg p { color: var(--muted); margin-bottom: 1.25rem; }
.success-msg button { background: var(--sage); color: white; border: none; border-radius: 10px; padding: 0.65rem 1.5rem; font-family: var(--font-sans); font-size: 0.875rem; cursor: pointer; }

/* ADMIN */
.admin-body { background: #F5F3EF; }
.admin-layout { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--charcoal); padding: 1.5rem 0; }
.admin-logo { font-family: var(--font-serif); font-size: 1.1rem; color: white; padding: 0 1.25rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 0.5rem; }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav-item { padding: 0.6rem 1.25rem; font-size: 0.875rem; color: rgba(255,255,255,0.55); cursor: pointer; text-decoration: none; border-left: 2px solid transparent; transition: all 0.2s; display: flex; align-items: center; gap: 0.4rem; }
.admin-nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.admin-nav-item.active { color: white; border-left-color: var(--sage); background: rgba(122,158,126,0.12); }
.badge { background: var(--clay); color: white; border-radius: 100px; padding: 1px 7px; font-size: 0.6875rem; }
.admin-main { padding: 2rem; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-title { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 1.5rem; }
.tab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.tab-header .admin-title { margin-bottom: 0; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.stat-card { background: white; border: 1px solid var(--sand-mid); border-radius: 12px; padding: 1.25rem; }
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.stat-num { font-family: var(--font-serif); font-size: 1.75rem; }
.admin-card { background: white; border: 1px solid var(--sand-mid); border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; padding: 1.25rem; }
.admin-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th { text-align: left; padding: 0.6rem 0.75rem; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; background: var(--sand); border-bottom: 1px solid var(--sand-mid); font-weight: 500; }
tbody td { padding: 0.75rem; border-bottom: 1px solid var(--sand-mid); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #faf8f5; }
.status { border-radius: 100px; padding: 0.2rem 0.65rem; font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; display: inline-block; }
.status-NEW { background: #e3f0fb; color: #1565C0; }
.status-HOT { background: #fff3e0; color: #e65100; }
.status-REPLIED { background: var(--sand); color: var(--muted); }
.status-CLOSED { background: #f5f5f5; color: #9e9e9e; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-inactive { background: #ffebee; color: #c62828; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.admin-card label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.3rem; margin-top: 0.75rem; }
.admin-card input, .admin-card select, .admin-card textarea { width: 100%; border: 1px solid var(--sand-dark); border-radius: 8px; padding: 0.5rem 0.75rem; font-family: var(--font-sans); font-size: 0.875rem; color: var(--charcoal); background: white; outline: none; }
.admin-card input:focus, .admin-card select:focus, .admin-card textarea:focus { border-color: var(--sage); }
.btn-add { background: var(--sage); color: white; border: none; border-radius: 8px; padding: 0.55rem 1.1rem; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.btn-add:hover { background: var(--sage-dark); }
.btn-save { background: var(--sage); color: white; border: none; border-radius: 8px; padding: 0.55rem 1.25rem; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.btn-cancel { background: transparent; border: 1px solid var(--sand-dark); border-radius: 8px; padding: 0.55rem 1.1rem; font-family: var(--font-sans); font-size: 0.875rem; cursor: pointer; color: var(--muted); }
.btn-delete { color: #c62828; font-size: 0.8125rem; cursor: pointer; background: none; border: none; margin-left: 0.5rem; }
.btn-edit { color: var(--sage-dark); font-size: 0.8125rem; cursor: pointer; background: none; border: none; font-weight: 500; }

@media (max-width: 700px) {
  .detail-body { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--sand-mid);
  margin-top: 3rem;
  background: var(--white);
}