@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fraunces:ital,wght@0,600;0,700;0,800;1,700&display=swap');

/* ============================================
   DALALIFREE — PREMIUM DESIGN SYSTEM v2.0
   ============================================ */

:root {
    --primary: #1e3a8a;
    --primary-mid: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1e1b4b;

    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --bg: #f8faff;
    --bg-card: #ffffff;
    --surface: #f1f5fb;
    --surface-2: #e8eef8;

    --text: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --border: #e2e8f0;
    --border-hover: #bfdbfe;

    --glass: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(30, 58, 138, 0.10);

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12), 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-blue: 0 12px 40px rgba(37, 99, 235, 0.22);
    --shadow-accent: 0 8px 24px rgba(245, 158, 11, 0.25);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* prevents horizontal scroll at root level */
    max-width: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 60% 40% at 10% 5%, rgba(37, 99, 235, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 0%, rgba(245, 158, 11, 0.04) 0%, transparent 55%);
    background-attachment: fixed;
}

/* =================== TYPOGRAPHY =================== */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.4rem;
}

p {
    color: var(--text-muted);
}

/* =================== HEADER & NAV =================== */
header {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 10001;
    /* Must be above the mobile menu overlay (10000) */
    box-shadow: 0 1px 0 rgba(30, 58, 138, 0.06);
}

nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.4rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo span {
    background: linear-gradient(135deg, var(--success), #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.38rem 0.85rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--surface);
}

/* =================== BUTTONS =================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(37, 99, 235, 0.35);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-accent);
}

.btn-accent:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--text);
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid #fca5a5;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* =================== LAYOUT =================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

.flex {
    display: flex;
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* =================== HERO =================== */
.hero-split {
    padding: 3.5rem 2rem 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 88vh;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    color: var(--primary);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-full);
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-mid);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.hero-content h1 {
    font-family: 'Fraunces', serif;
    font-size: 4.5rem;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    letter-spacing: -0.04em;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--primary-mid), #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 460px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 720px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: float 7s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.08));
    border-radius: 36px;
    z-index: -1;
    filter: blur(30px);
}

/* Benefit Scroller */
.benefit-scroller {
    overflow: hidden;
    width: 100%;
    margin-bottom: 1.5rem;
}

.benefit-items {
    display: flex;
    gap: 1rem;
    animation: scroll-x 8s linear infinite;
    width: max-content;
}

.benefit-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.45rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

@keyframes scroll-x {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =================== SECTION HEADINGS =================== */
.section-heading {
    margin-bottom: 3rem;
}

.section-heading .eyebrow {
    display: inline-block;
    color: var(--primary-mid);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-heading h2 {
    font-family: 'Fraunces', serif;
    font-size: 2.6rem;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
}

.section-heading p {
    font-size: 1.05rem;
    margin-top: 0.75rem;
    max-width: 560px;
}

.section-heading.text-center p {
    margin-left: auto;
    margin-right: auto;
}

/* =================== CARDS =================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

/* =================== PROPERTY CARDS =================== */
.property-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.property-card:hover .prop-img-wrap img {
    transform: scale(1.06);
}

.prop-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.prop-img-wrap img,
.property-img,
.p-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.prop-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prop-badge.sale {
    background: rgba(37, 99, 235, 0.85);
}

.prop-badge.rent {
    background: rgba(16, 185, 129, 0.85);
}

.property-content,
.p-content {
    padding: 1.5rem;
}

.property-price,
.p-price {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.property-title,
.p-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.property-location,
.p-loc {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.property-meta,
.p-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--surface);
}

.p-specs {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.prop-spec {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
}

/* =================== STATS / USP SECTION =================== */
.usp-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 50%, #1d4ed8 100%);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.usp-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.usp-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.usp-card:hover {
    background: rgba(255, 255, 255, 0.10);
    transform: translateY(-4px);
}

.usp-icon {
    font-size: 2.8rem;
    margin-bottom: 1.25rem;
    display: block;
}

.usp-card h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.usp-card p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* =================== FORMS =================== */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* =================== BADGES & PILLS =================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-purple {
    background: #ede9fe;
    color: #5b21b6;
}

.pill {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.login-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.75rem;
}

/* =================== TABLES =================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
}

thead {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--surface);
    vertical-align: middle;
    color: var(--text);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background 0.15s;
}

tbody tr:hover {
    background: #fafbff;
}

/* =================== PAGE HERO =================== */
.page-hero {
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    font-family: 'Fraunces', serif;
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.page-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* =================== DASHBOARD / ADMIN =================== */
.dashboard-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
    min-height: calc(100vh - 70px);
}

.admin-sidebar,
.sidebar-menu {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 1.75rem;
    height: fit-content;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
    overflow: hidden;
    /* clip any nav-item overflow so it doesn't widen the page */
    min-width: 0;
    /* allow the grid item to shrink below content size */
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--surface);
    margin-bottom: 1.25rem;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-brand-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

.sidebar-brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-item {
    all: unset;
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding: 0.8rem 1rem !important;
    border-radius: var(--radius) !important;
    cursor: pointer !important;
    transition: var(--transition) !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.menu-item:hover {
    background: var(--surface) !important;
    color: var(--text) !important;
}

.menu-item.active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.menu-item .menu-icon {
    width: 32px;
    height: 32px;
    background: var(--surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.menu-item.active .menu-icon {
    background: var(--primary-light);
}

.menu-item.logout-btn {
    margin-top: 1rem !important;
    border-top: 1px solid var(--border) !important;
    padding-top: 1.25rem !important;
    border-radius: 0 !important;
    color: var(--danger) !important;
}

.menu-item.logout-btn:hover {
    background: #fee2e2 !important;
}

.menu-item.logout-btn .menu-icon {
    background: #fee2e2;
}

.admin-main {
    min-width: 0;
    padding-bottom: 4rem;
}

/* =================== STATS GRID =================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 var(--radius-xl) 0 80px;
    opacity: 0.08;
}

.stat-card:nth-child(1)::before {
    background: var(--primary-mid);
}

.stat-card:nth-child(2)::before {
    background: var(--success);
}

.stat-card:nth-child(3)::before {
    background: var(--accent);
}

.stat-card:nth-child(4)::before {
    background: #7c3aed;
}

.stat-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.blue {
    background: #dbeafe;
}

.stat-icon.green {
    background: #dcfce7;
}

.stat-icon.amber {
    background: #fef3c7;
}

.stat-icon.purple {
    background: #ede9fe;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    font-family: 'Fraunces', serif;
    letter-spacing: -0.03em;
}

.stat-change {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--success);
}

/* =================== SECTION CARD =================== */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--surface);
}

.section-header h2,
.section-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.section-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* =================== TAB CONTENT =================== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================== FILTERS SIDEBAR =================== */
.filters-sidebar {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-sm);
}

.filters-sidebar h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface);
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

/* =================== LISTING CARD (USER DASHBOARD) =================== */
.listing-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    gap: 1.25rem;
    align-items: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.listing-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.listing-img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

/* =================== MODALS =================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =================== ALERTS =================== */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =================== ABOUT PAGE =================== */
.about-hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, transparent 100%);
}

.about-hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.about-hero h1 {
    font-family: 'Fraunces', serif;
    font-size: 3.4rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.about-highlight {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-stat {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.about-stat strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1.5rem;
    font-family: 'Fraunces', serif;
}

.about-stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =================== FOOTER =================== */
footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3.5rem 2rem 2rem;
    margin-top: 4rem;
}

footer .container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

footer .logo {
    color: white;
}

footer .logo span {
    -webkit-text-fill-color: transparent;
}

footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* =================== CUSTOM SELECTS =================== */
.custom-select {
    position: relative;
}

.select-trigger {
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: white;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    transition: var(--transition);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.select-trigger::after {
    content: '▾';
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.select-trigger:hover {
    border-color: var(--primary-mid);
}

.select-options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1.5px solid var(--border-hover);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    overflow: hidden;
    max-height: 220px;
    overflow-y: auto;
}

.select-options.active {
    display: block;
    animation: fadeDown 0.18s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.select-option {
    padding: 0.75rem 1.1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.select-option:hover {
    background: var(--surface);
}

.select-option.selected {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

/* =================== SEARCH TAB =================== */
.search-tab {
    background: white;
    padding: 1.75rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-top: -3.5rem;
    position: relative;
    z-index: 10;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border);
}

.search-field {
    flex: 1;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.search-field label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-field select,
.search-field input {
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

.search-field select:focus,
.search-field input:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =================== BOOKING CARDS =================== */
.booking-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.booking-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface);
}

.booking-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.booking-email {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.booking-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 700;
}

.status-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.status-select:focus {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =================== TABS (ADMIN) =================== */
.tabs-wrapper {
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--surface);
    padding: 5px;
    border-radius: var(--radius-lg);
    width: fit-content;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--text);
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* =================== USER & ADMIN ITEMS =================== */
.user-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.user-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

.user-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.user-left strong {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 700;
}

.user-left span {
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}

.user-right {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* =================== PROPERTY BROWSE LAYOUT =================== */
.browse-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.property-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
}

/* =================== SCROLLBAR =================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 1024px) {
    .hero-split {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 2.5rem;
    }

    .hero-content h1 {
        font-size: 3.2rem;
    }

    .hero-image {
        display: none;
    }

    .usp-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .admin-sidebar,
    .sidebar-menu {
        position: static;
    }

    .sidebar-nav {
        flex-direction: row !important;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .sidebar-brand {
        display: none;
    }

    .menu-item {
        width: auto !important;
        white-space: nowrap;
    }

    .menu-item.logout-btn {
        margin-top: 0 !important;
        border-top: none !important;
        padding-top: 0.8rem !important;
    }

    .browse-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
    }
}

/* -------------------------------------------------------
   CRITICAL: backdrop-filter creates a stacking context,
   making position:fixed children position relative to
   the header element instead of the viewport.
   On mobile we use a solid white header so the fixed
   overlay positions correctly relative to the viewport.
------------------------------------------------------- */
@media (max-width: 768px) {

    /* ── Prevent ANY element from causing horizontal scroll ── */
    *,
    *::before,
    *::after {
        max-width: 100%;
        word-break: break-word;
    }

    /* Exceptions: elements that need to scroll horizontally themselves */
    .trust-strip,
    .sidebar-nav,
    img,
    video,
    iframe,
    pre,
    code,
    table {
        max-width: none;
        /* these handle their own overflow */
        overflow-x: auto;
    }

    /* Force all block containers to stay in-bounds */
    .container,
    .card,
    .search-tab,
    .hero-split,
    nav {
        width: 100%;
        box-sizing: border-box;
    }

    header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #ffffff !important;
        will-change: auto !important;
    }

    nav {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        display: none !important;
    }

    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        left: auto;
        background: #ffffff;
        z-index: 9999;
        padding: 0;
        gap: 0;
        overflow-y: auto;
        animation: drawerIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 40px rgba(15, 23, 42, 0.18);
    }

    /* Dark overlay behind drawer */
    .nav-links.active::before {
        content: '';
        position: fixed;
        inset: 0;
        right: min(320px, 85vw);
        background: rgba(15, 23, 42, 0.45);
        z-index: -1;
    }

    @keyframes drawerIn {
        from {
            transform: translateX(100%);
            opacity: 0.5;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* Drawer header branding */
    .nav-links.active::after {
        content: '🏠 DalaliFree';
        display: block;
        order: -1;
        background: linear-gradient(135deg, #1e3a8a, #2563eb);
        color: #fff;
        font-size: 1.15rem;
        font-weight: 800;
        padding: 1.5rem 1.5rem 1.25rem;
        letter-spacing: -0.02em;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
    }

    .nav-links.active a {
        display: flex !important;
        align-items: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text);
        text-decoration: none;
        border-bottom: 1px solid #f1f5fb;
        transition: background 0.15s, color 0.15s;
        margin: 0 !important;
        gap: 0.75rem;
    }

    .nav-links.active a:hover {
        background: var(--surface);
        color: var(--primary);
    }

    .nav-links.active a.active {
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 700;
        border-bottom-color: var(--primary-light);
    }

    .nav-links.active a.btn-primary {
        margin: 1.25rem 1.5rem 0.5rem !important;
        justify-content: center;
        text-align: center;
        background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark)) !important;
        color: white !important;
        border: none !important;
        border-bottom: none !important;
        padding: 1rem 1.5rem !important;
        border-radius: var(--radius-full) !important;
        font-size: 1rem !important;
        box-shadow: 0 6px 20px rgba(37,99,235,0.3);
    }

    .mobile-menu-toggle {
        display: flex;
    }


    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

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

    /* Hero: compact on mobile */
    .hero-split {
        padding: 2rem 1.25rem 2.5rem;
        gap: 1.5rem;
        min-height: auto;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.85rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Trust strip: horizontal scroll, no wrap */
    .trust-strip {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 1rem 1.25rem;
        gap: 1.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .trust-strip::-webkit-scrollbar {
        display: none;
    }

    .trust-item {
        flex-shrink: 0;
    }

    .trust-sep {
        display: none;
    }

    /* Search tab: NO negative margin on mobile — sits normally below trust strip */
    .search-tab {
        flex-direction: column;
        gap: 0.85rem;
        margin-top: 0;
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 1.5rem;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow);
    }

    .search-field {
        min-width: unset;
        width: 100%;
    }

    .page-hero {
        padding: 2.5rem 0 2rem;
    }

    .page-hero h1 {
        font-size: 1.9rem;
    }

    footer .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .usp-grid {
        grid-template-columns: 1fr;
    }

    .usp-card {
        padding: 1.75rem 1.5rem;
    }

    .benefit-scroller {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 1.9rem;
    }

    .hero-split {
        padding: 1.5rem 1rem 2rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .booking-details {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.82rem;
    }

    th,
    td {
        padding: 0.65rem 0.75rem;
        white-space: nowrap;
    }

    .modal-box {
        padding: 1.5rem;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    .section-card {
        padding: 1.25rem;
    }

    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .search-tab {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
        padding: 1.25rem;
    }

    /* Property list single column on very small screens */
    .property-list-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-header .btn {
        width: 100%;
    }

    .dashboard-container {
        padding: 0.75rem;
    }
}