:root {
    --primary-maroon: #800020;
    --primary-maroon-dark: #6b0c1e;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --gray-light: #e5e7eb;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Navigation */
nav {
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-maroon);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.logo {
    color: var(--primary-maroon);
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    letter-spacing: 0.5px;
}

nav div a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav div a:hover {
    color: var(--primary-maroon);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-maroon);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--primary-maroon-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-maroon);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary-maroon);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--primary-maroon);
    color: white;
}

/* Hero Section */
.hero {
    padding: 5rem 5%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-maroon) 0%, var(--primary-maroon-dark) 100%);
    color: white;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search Bar */
.search-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-bar select,
.search-bar input {
    padding: 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
    min-width: 150px;
}

.search-bar button {
    background-color: var(--primary-maroon);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: var(--primary-maroon-dark);
}

/* About Section */
.about {
    padding: 4rem 5%;
    background: white;
}

.about h2 {
    color: var(--primary-maroon);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text h3 {
    color: var(--primary-maroon);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.about-image {
    background: var(--gray-light);
    height: 300px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Map Teaser Section */
.map-teaser {
    padding: 4rem 5%;
    background: var(--bg-color);
}

.map-teaser h2 {
    color: var(--primary-maroon);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.featured-properties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.property-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-image {
    height: 200px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.property-info {
    padding: 1.5rem;
}

.property-info h3 {
    color: var(--primary-maroon);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.property-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-maroon);
    margin-bottom: 0.5rem;
}

.property-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.property-type {
    display: inline-block;
    background: var(--primary-maroon);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    padding: 4rem 5%;
    background: white;
}

.contact h2 {
    color: var(--primary-maroon);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    width: 100%;
    background-color: var(--primary-maroon);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: var(--primary-maroon-dark);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 2rem 5%;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
}

footer a:hover {
    color: var(--primary-maroon);
}

/* ========== MAP PAGE STYLES ========== */
.map-page-container {
    display: flex;
    height: calc(100vh - 70px);
    margin-top: 0;
}

.map-sidebar {
    width: 400px;
    background: var(--white);
    overflow-y: auto;
    border-right: 2px solid var(--primary-maroon);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

.map-fixed-top {
    padding: 1rem;
    background: var(--white);
    border-bottom: 2px solid var(--primary-maroon);
    position: sticky;
    top: 0;
    z-index: 10;
}

.map-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    text-decoration: none;
}

.map-sidebar-logo img {
    max-height: 45px;
}

.map-sidebar-logo-text {
    color: var(--primary-maroon);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.2;
}

.map-search-input {
    position: relative;
    margin-bottom: 1rem;
}

.map-search-input input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.map-search-input input:focus {
    outline: none;
    border-color: var(--primary-maroon);
    box-shadow: 0 0 0 3px rgba(128,0,32,0.1);
}

.map-search-input .icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-maroon);
    font-size: 0.95rem;
}

/* Segmented Switch */
.segmented-switch {
    display: flex;
    position: relative;
    width: 100%;
    background: var(--primary-maroon);
    border-radius: 999px;
    padding: 5px;
    min-height: 44px;
    align-items: center;
    overflow: hidden;
    gap: 0;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 14px rgba(128,0,32,0.25);
    box-sizing: border-box;
}

.segmented-switch input { display: none; }

.segmented-switch label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    height: 100%;
    line-height: normal;
    user-select: none;
    transition: color 0.2s ease;
    padding: 6px 4px;
}

.segmented-switch .segmented-thumb {
    position: absolute;
    top: 5px; left: 5px;
    width: calc(25% - 5px);
    height: calc(100% - 10px);
    background: #fff;
    border-radius: 999px;
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.04);
}

#seg-all:checked ~ .segmented-thumb { transform: translateX(0%); }
#seg-kediaman:checked ~ .segmented-thumb { transform: translateX(100%); }
#seg-tanah:checked ~ .segmented-thumb { transform: translateX(200%); }
#seg-komersial:checked ~ .segmented-thumb { transform: translateX(300%); }

#seg-all:checked ~ label[for="seg-all"],
#seg-kediaman:checked ~ label[for="seg-kediaman"],
#seg-tanah:checked ~ label[for="seg-tanah"],
#seg-komersial:checked ~ label[for="seg-komersial"] { color: var(--primary-maroon); }

/* Property List with State Groups */
.property-list-container {
    padding: 1rem;
    flex: 1;
}

.state-group {
    margin-bottom: 1rem;
}

.state-group-header {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0;
    background: linear-gradient(135deg, #800020 0%, #6b0c1e 100%);
    padding: 11px 14px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(128,0,32,0.15);
    transition: background 0.3s, transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.state-group-header:hover {
    background: linear-gradient(135deg, #6b0c1e 0%, #550917 100%);
    transform: translateY(-1px);
}

.state-group-header::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.3s;
    opacity: 0.9;
}

.state-group.expanded .state-group-header::after {
    transform: rotate(180deg);
}

.state-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flag-icon {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    background: #fff;
}

.flag-icon-rect {
    width: 50px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    background: #fff;
}

.state-name {
    flex: 1;
    font-weight: 700;
    font-size: 0.92rem;
}

.state-group-content {
    padding-top: 0.75rem;
}

/* Property List Item */
.property-list-item {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-bottom: 0.85rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.property-list-item:hover {
    box-shadow: 0 4px 12px rgba(128,0,32,0.12);
    border-color: var(--primary-maroon);
    transform: translateY(-2px);
}

.property-list-item.active {
    border-color: var(--primary-maroon);
    box-shadow: 0 0 0 2px rgba(128,0,32,0.25);
}

.property-list-item-image {
    height: 130px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.property-list-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-list-item-content {
    padding: 0.85rem 1rem;
}

.property-list-item-title {
    font-weight: 700;
    color: var(--primary-maroon);
    margin-bottom: 0.35rem;
    font-size: 0.98rem;
    line-height: 1.3;
}

.property-list-item-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-maroon);
    margin-bottom: 0.35rem;
}

.property-list-item-location {
    color: var(--text-light);
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-list-item-type {
    display: inline-block;
    background: var(--primary-maroon);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.property-list-item-type.type-teres { background: #800020; }
.property-list-item-type.type-semi { background: #9a3412; }
.property-list-item-type.type-apartment { background: #1e40af; }
.property-list-item-type.type-tanah { background: #166534; }
.property-list-item-type.type-komersial { background: #78350f; }

.view-in-map-btn {
    background: var(--primary-maroon);
    color: white;
    padding: 0.5rem 0.85rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    width: 100%;
    margin-top: 0.4rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.view-in-map-btn:hover { background: var(--primary-maroon-dark); }

/* Map Wrapper */
#map-main {
    flex: 1;
    height: 100%;
}

/* Custom Leaflet Marker (Maroon Pin) */
.leaflet-container { font-family: inherit; }

/* Property Details Sidebar */
.property-details-sidebar {
    width: 360px;
    background: var(--white);
    border-left: 2px solid var(--primary-maroon);
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2000;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.property-details-sidebar.open {
    transform: translateX(0);
}

.property-details-content {
    padding: 1.5rem;
    position: relative;
}

.details-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-maroon);
    color: rgb(255, 255, 255);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 5;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.details-close-btn:hover { background: var(--primary-maroon-dark); }

.details-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.details-image-placeholder {
    width: 100%;
    height: 210px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    color: var(--primary-maroon);
}

.details-title {
    color: var(--primary-maroon);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.details-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-maroon);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.details-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.details-info-item {
    background: #f9fafb;
    padding: 0.65rem 0.85rem;
    border-radius: 7px;
    border-left: 3px solid var(--primary-maroon);
}

.details-info-label {
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.details-info-value {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.details-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1.2rem;
    background: #f9fafb;
    padding: 0.9rem;
    border-radius: 7px;
}

.whatsapp-action-btn {
    background: #25D366;
    color: white;
    padding: 0.85rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 700;
    width: 100%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 3px 10px rgba(37,211,102,0.3);
}

.whatsapp-action-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

.directions-btn {
    background: var(--primary-maroon);
    color: white;
    padding: 0.75rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    margin-top: 0.6rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.directions-btn:hover { background: var(--primary-maroon-dark); }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.status-badge.available {
    background: #dcfce7;
    color: #166534;
}
.status-badge.sold {
    background: #fee2e2;
    color: #991b1b;
}
.status-badge.reserved {
    background: #fef3c7;
    color: #92400e;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-badge.available .status-dot { background: #22c55e; }
.status-badge.sold .status-dot { background: #ef4444; }
.status-badge.reserved .status-dot { background: #f59e0b; }

/* Mobile Logo Bar */
.mobile-logo-bar {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--primary-maroon);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-logo-bar a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.mobile-logo-bar img {
    max-height: 35px;
    background: #fff;
    border-radius: 6px;
    padding: 2px;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 2.5rem;
    color: var(--primary-maroon);
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 220px;
}

.popup-card {
    overflow: hidden;
    border-radius: 8px;
}

.popup-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.popup-card-body {
    padding: 0.75rem 0.9rem;
}

.popup-card-title {
    color: var(--primary-maroon);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.popup-card-price {
    font-weight: 800;
    color: var(--primary-maroon);
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.popup-card-location {
    font-size: 0.78rem;
    color: var(--text-light);
    margin: 0 0 0.6rem;
}

.popup-card-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.popup-wa-btn {
    background: #25D366;
    color: #fff !important;
    padding: 0.45rem 0.6rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.popup-wa-btn:hover { background: #128C7E; }

.popup-details-btn {
    background: var(--primary-maroon);
    color: #fff !important;
    padding: 0.45rem 0.6rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.popup-details-btn:hover { background: var(--primary-maroon-dark); }

/* Responsive Map Page */
@media (max-width: 900px) {
    .map-sidebar { width: 340px; }
    .property-details-sidebar { width: 320px; }
}

@media (max-width: 768px) {
    .mobile-logo-bar { display: flex; }
    .map-page-container {
        flex-direction: column;
        margin-top: 53px;
        height: calc(100vh - 53px);
    }
    .map-sidebar {
        width: 100%;
        height: 52vh;
        order: 2;
        border-right: none;
        border-top: 2px solid var(--primary-maroon);
    }
    #map-main {
        height: 48vh;
        order: 1;
    }
    .property-details-sidebar {
        width: 100%;
        top: 0;
        z-index: 2500;
    }
    .segmented-switch label { font-size: 0.72rem; }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    nav div {
        margin-top: 1rem;
    }

    nav div a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar select,
    .search-bar input,
    .search-bar button {
        width: 100%;
    }
}

/* ========== LOGIN PAGE STYLES ========== */
.login-page-body {
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-maroon-dark) 0%, var(--primary-maroon) 55%, #8c1c33 100%);
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255,255,255,0.08) 0%, transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.08) 0%, transparent 55%);
}

.login-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    border-top: 6px solid var(--primary-maroon);
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-maroon-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    margin: 0 auto 0.8rem;
    box-shadow: 0 10px 25px rgba(128,0,32,0.35);
}

.login-title {
    color: var(--primary-maroon);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    margin: 0.35rem 0 0;
}

.login-form { margin-top: 1.5rem; }

.login-field {
    position: relative;
    margin-bottom: 1.25rem;
}

.login-field input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.98rem;
    transition: all 0.25s;
    background: #fafafa;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: var(--primary-maroon);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(128,0,32,0.08);
}

.login-field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-maroon);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.4rem;
    font-size: 0.88rem;
    color: var(--text-light);
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary-maroon);
}

.login-btn {
    width: 100%;
    padding: 0.95rem 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-maroon-dark));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(128,0,32,0.28);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(128,0,32,0.36);
    filter: brightness(1.05);
}

.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-light);
}

.login-back-link {
    color: var(--primary-maroon);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.2s;
}

.login-back-link:hover { opacity: 0.8; }

.alert {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-size: 0.92rem;
    margin-bottom: 1rem;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========== ADMIN LAYOUT STYLES ========== */
.admin-layout {
    margin: 0;
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #5a0917 0%, var(--primary-maroon-dark) 60%, var(--primary-maroon) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.admin-sidebar-brand {
    padding: 1.5rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-logo-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.admin-logo-text h2 {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.admin-logo-text span {
    font-size: 0.7rem;
    opacity: 0.75;
    letter-spacing: 0.6px;
}

.admin-menu {
    flex: 1;
    padding: 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.95rem;
    color: #6b0c1e;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.admin-menu-item i { width: 18px; text-align: center; font-size: 0.95rem; }

.admin-menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #490814;
}

.admin-menu-item.active {
    background: rgba(255,255,255,0.15);
    color: #802626;
    font-weight: 600;
}

.admin-menu-item.active::before {
    content: '';
    position: absolute;
    left: -0.8rem;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: #fff;
    border-radius: 0 3px 3px 0;
}

.menu-badge {
    margin-left: auto;
    background: #f59e0b;
    color: #1f2937;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.admin-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.8rem 0.4rem;
}

.logout-item {
    margin-top: auto;
    background: rgba(255,255,255,0.05);
}
.logout-item:hover { background: rgba(220, 38, 38, 0.25); }

.admin-sidebar-footer {
    padding: 1rem 1.2rem;
    font-size: 0.75rem;
    opacity: 0.6;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-light);
    padding: 0.85rem 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-topbar-left, .admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-menu-toggle {
    display: none;
    background: var(--gray-light);
    border: none;
    width: 38px; height: 38px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
}

.admin-page-title {
    font-size: 1.25rem;
    margin: 0;
    color: var(--primary-maroon-dark);
    font-weight: 700;
}

.topbar-btn-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--primary-maroon);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.topbar-btn-live:hover { background: var(--primary-maroon-dark); }

.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-left: 1rem;
    border-left: 1px solid var(--gray-light);
}

.admin-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-maroon-dark));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 8px rgba(128,0,32,0.2);
}

.admin-profile-info { display: flex; flex-direction: column; line-height: 1.2; }
.admin-welcome { font-size: 0.7rem; color: var(--text-light); }
.admin-profile-info strong { font-size: 0.85rem; color: var(--text-color); }

.admin-content { padding: 1.8rem; flex: 1; }

/* Analytics Cards */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.analytics-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.4rem 1.3rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-maroon);
    transition: transform 0.2s, box-shadow 0.2s;
}
.analytics-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-total    { border-left-color: var(--primary-maroon); }
.card-featured { border-left-color: #f59e0b; }
.card-active   { border-left-color: #10b981; }
.card-inquiries{ border-left-color: #3b82f6; }

.analytics-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.card-total     .analytics-icon { background: rgba(128,0,32,0.1); color: var(--primary-maroon); }
.card-featured  .analytics-icon { background: rgba(245,158,11,0.12); color: #d97706; }
.card-active    .analytics-icon { background: rgba(16,185,129,0.12); color: #059669; }
.card-inquiries .analytics-icon { background: rgba(59,130,246,0.12); color: #2563eb; }

.analytics-data { flex: 1; min-width: 0; }
.analytics-data h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
}
.analytics-data p {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.analytics-trend {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.analytics-trend.up { background: #dcfce7; color: #166534; }
.analytics-trend.neutral { background: #f3f4f6; color: #374151; }

/* Section cards (form / table / leads) */
.admin-grid-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.admin-section-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.section-header {
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--primary-maroon-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.section-header h2 i { color: var(--primary-maroon); }

.admin-form { padding: 1.4rem; }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-span-2 { grid-column: 1 / -1; }

.form-group { margin-bottom: 0; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 7px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-maroon);
    box-shadow: 0 0 0 3px rgba(128,0,32,0.08);
}

.checkbox-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding-top: 0.5rem;
    cursor: pointer;
    font-weight: 500 !important;
}
.checkbox-inline input {
    width: auto;
    accent-color: var(--primary-maroon);
    transform: scale(1.15);
}

.image-preview-wrap {
    margin-top: 0.7rem;
    border: 2px dashed var(--gray-light);
    border-radius: 8px;
    padding: 0.5rem;
    background: #fafafa;
    max-height: 200px;
    overflow: hidden;
}
.image-preview-wrap img {
    max-width: 100%;
    max-height: 180px;
    width: 100%;
    object-fit: contain;
    border-radius: 5px;
    display: block;
}

/* Admin Table */
.table-responsive {
    overflow-x: auto;
    padding: 1.2rem 1.4rem;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-table thead th {
    background: #f8fafc;
    color: var(--primary-maroon-dark);
    font-weight: 700;
    text-align: left;
    padding: 0.8rem 0.7rem;
    border-bottom: 2px solid var(--gray-light);
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.admin-table tbody td {
    padding: 0.75rem 0.7rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.admin-table tbody tr:hover { background: #fafbfc; }

.thumb-img {
    width: 60px; height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--gray-light);
    display: block;
}
.thumb-placeholder {
    width: 60px; height: 45px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.status-available { background: #dcfce7; color: #166534; }
.status-sold      { background: #fee2e2; color: #991b1b; }
.status-reserved  { background: #fef3c7; color: #92400e; }

.feature-toggle {
    display: inline-block;
    color: #d1d5db;
    font-size: 1.15rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.feature-toggle:hover { transform: scale(1.2); }
.feature-toggle .starred { color: #f59e0b !important; }

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
}
.action-delete {
    background: #fee2e2;
    color: #991b1b;
    transition: all 0.2s;
}
.action-delete:hover { background: #fecaca; }

/* Leads Card */
.leads-card { margin-bottom: 1.5rem; }
.leads-list {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.lead-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}
.lead-item:hover { border-color: var(--primary-maroon); background: #fff; }

.lead-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-maroon), var(--primary-maroon-dark));
    color: #fff;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lead-content { flex: 1; min-width: 0; }
.lead-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.lead-head strong { color: var(--primary-maroon-dark); font-size: 0.95rem; }
.lead-date { font-size: 0.75rem; color: var(--text-light); }

.lead-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0.3rem 0 0.5rem;
}
.lead-contacts a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}
.lead-contacts a:hover { color: var(--primary-maroon); }

.lead-message {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-color);
    background: #fff;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-maroon);
}

/* ========== PROPERTY CARD POLISHES (Hover + Badge Overlay) ========== */
.property-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.3s;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}
.property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(128,0,32,0.15);
    z-index: 2;
}

.property-card .property-image,
.property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}
.property-card .property-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.property-card:hover .property-image img {
    transform: scale(1.08);
}

/* Status badge thumbnail overlay */
.property-card .property-image::before,
.property-image.has-badge::before {
    content: '';
}
.status-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.status-overlay.available { background: rgba(22, 101, 52, 0.92); color: #fff; }
.status-overlay.sold      { background: rgba(153, 27, 27, 0.92); color: #fff; }
.status-overlay.reserved  { background: rgba(146, 64, 14, 0.92); color: #fff; }

.featured-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 3px 10px rgba(245,158,11,0.35);
}

.property-card .property-info {
    padding: 1.15rem 1.25rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Featured-properties homepage grid (upgrade) */
.featured-properties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Map sidebar list item polish (same shadow hover + scale) */
.property-list-item {
    background: #fff;
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    margin-bottom: 0.85rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.property-list-item:hover {
    box-shadow: 0 8px 22px rgba(128,0,32,0.12);
    transform: translateY(-2px);
    border-color: var(--primary-maroon);
}

/* Contact section upgrade */
.contact-form form button {
    background: var(--primary-maroon);
    color: white;
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s;
}
.contact-form form button:hover { background: var(--primary-maroon-dark); transform: translateY(-1px); }

/* Responsive Admin */
@media (max-width: 1100px) {
    .admin-grid-sections { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s;
    }
    .admin-sidebar.mobile-open { left: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.25); }
    .admin-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .admin-page-title { font-size: 1rem; }
    .admin-topbar { padding: 0.75rem 1rem; }
    .admin-content { padding: 1.2rem 1rem; }
    .admin-profile-info { display: none; }
    .topbar-btn-live span { display: none; }
    .topbar-btn-live { padding: 0.5rem 0.65rem; }
    .form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .analytics-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .analytics-card { padding: 1rem 0.9rem; }
    .analytics-data h3 { font-size: 1.35rem; }
    .analytics-data p { font-size: 0.75rem; }
    .analytics-icon { width: 40px; height: 40px; font-size: 1rem; }
}

