@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --text: #1a202c;
    --muted: #718096;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.16);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1220px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 0;
}

/* ─── HEADER ─────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0.75rem 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.page-home .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.45rem;
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.page-home .brand-mark {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-login {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.45rem 0.65rem;
    border-radius: 0.4rem;
    transition: background 140ms;
}

    .nav-login:hover {
        background: rgba(0,0,0,0.05);
    }

.page-home .nav-login {
    color: white;
}

    .page-home .nav-login:hover {
        background: rgba(255,255,255,0.12);
    }

.btn-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white !important;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.48rem 1.1rem;
    border-radius: 999px;
    transition: background 140ms;
}

    .btn-signup:hover {
        background: var(--primary-dark);
        color: white;
    }

/* ─── HERO BANNER ────────────────────────────── */

.hero-banner {
    position: relative;
    min-height: 510px;
    background-image: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1920&q=72');
    background-size: cover;
    background-position: center 55%;
    display: flex;
    align-items: center;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.22) 44%, rgba(235,235,235,0.55) 80%, var(--bg) 100% );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 100px 1rem 2rem;
}

.hero-headline {
    font-size: clamp(2.1rem, 4.5vw, 3.1rem);
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.07;
    text-shadow: 0 2px 18px rgba(0,0,0,0.38);
    margin: 0;
}

.hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.87);
    text-shadow: 0 1px 8px rgba(0,0,0,0.32);
    margin: 0 0 0.4rem;
}

/* ─── SEARCH CARD ────────────────────────────── */

.search-card {
    width: min(700px, 94vw);
    background: white;
    border-radius: 0.9rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.stab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.8rem 0.5rem;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.91rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    transition: color 140ms, border-color 140ms;
}

    .stab svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .stab.stab-active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 600;
    }

    .stab:hover:not(.stab-active) {
        color: var(--text);
    }

.search-input-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #a0aab8;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.94rem;
    color: var(--text);
    background: transparent;
    min-width: 0;
}

    .search-input::placeholder {
        color: #a8b2c0;
    }

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.62rem 1.45rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 140ms;
    flex-shrink: 0;
}

    .btn-search:hover {
        background: var(--primary-dark);
    }

.location-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem 1rem 0.8rem;
}

.lpill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 140ms, color 140ms;
}

    .lpill svg {
        width: 11px;
        height: 11px;
        flex-shrink: 0;
    }

    .lpill:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

/* ─── RESULTS PAGE ──────────────────────────── */

.results-page {
    padding: 2.8rem 0 4rem;
}

.results-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.results-title {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.results-summary {
    margin: 0 0 1.3rem;
    color: var(--muted);
}

/* ─── RESULTS FILTER BAR ─────────────────────── */

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.9rem;
    padding: 1.1rem 0 1.4rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 130px;
}

.filter-group-query {
    min-width: 200px;
    flex: 1 1 200px;
}

.filter-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.filter-group input,
.filter-group select {
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.55rem 0.7rem;
    outline: none;
    transition: border-color 140ms;
}

    .filter-group input:focus,
    .filter-group select:focus {
        border-color: var(--primary);
    }

.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.filter-reset-link {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    padding: 0.55rem 0.2rem;
    transition: color 140ms;
}

    .filter-reset-link:hover {
        color: var(--text);
        text-decoration: underline;
    }

/* ─── RESULTS "MORE FILTERS" (AMENITIES) ─────── */

.filter-more-toggle-wrap {
    display: flex;
    align-items: center;
}

.filter-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.55rem 0.9rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 140ms, color 140ms;
}

    .filter-more-toggle:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

.filter-more-chevron {
    transition: transform 140ms;
}

.filter-more-toggle[aria-expanded="true"] .filter-more-chevron {
    transform: rotate(180deg);
}

.filter-more-toggle[aria-expanded="true"] {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-amenities-panel {
    flex-basis: 100%;
    padding: 0.9rem 0 0.2rem;
}

.filter-amenities-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.amenity-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.amenity-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 140ms, color 140ms, background 140ms;
}

    .amenity-chip input {
        accent-color: var(--primary);
        margin: 0;
        cursor: pointer;
    }

    .amenity-chip:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .amenity-chip:has(input:checked) {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

/* ─── PAGINATION ─────────────────────────────── */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.3rem;
    height: 2.3rem;
    padding: 0 0.6rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: border-color 140ms, background 140ms, color 140ms;
}

    .page-btn:hover:not(:disabled):not(.page-btn-active) {
        border-color: var(--primary);
        color: var(--primary);
    }

    .page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.page-btn-active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 700;
}

.page-nav {
    font-weight: 600;
    padding: 0 0.85rem;
}

.page-ellipsis {
    color: var(--muted);
    padding: 0 0.15rem;
}

.results-section {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.results-empty {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* ─── LISTINGS SECTION ───────────────────────── */

.listings-section {
    padding: 2.5rem 0 4rem;
    background: var(--bg);
}

.listings-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1.15rem;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

/* ─── PROPERTY CARD ──────────────────────────── */

.lcard {
    display: block;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 180ms, transform 180ms;
    cursor: pointer;
}

    .lcard:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-3px);
    }

.lcard-photo {
    position: relative;
    height: 198px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #d1dbe8;
    background-image: linear-gradient(90deg, #d1dbe8 25%, #e8edf4 50%, #d1dbe8 75%);
    animation: lcard-shimmer 1.4s infinite;
}

    .lcard-photo.lcard-photo-empty {
        animation: none;
        background-image: none;
    }

    .lcard-photo.lcard-photo-loaded {
        animation: none;
    }

@keyframes lcard-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.lbadge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.27rem 0.62rem;
    border-radius: 999px;
}

.lbadge-sale {
    background: var(--primary);
    color: white;
}

.lbadge-sponsored {
    background: #f59e0b;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.67rem;
}

.lcard-ext {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    display: grid;
    place-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 140ms;
}

    .lcard-ext:hover {
        background: white;
    }

    .lcard-ext svg {
        width: 13px;
        height: 13px;
        color: var(--muted);
    }

.lcard-body {
    padding: 0.8rem 0.9rem 0.95rem;
}

.lcard-price {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.lcard-meta {
    font-size: 0.79rem;
    color: var(--muted);
    margin-bottom: 0.28rem;
}

.lcard-addr {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
}

.lcard-city {
    font-size: 0.79rem;
    color: var(--muted);
}

.lcard-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.38rem;
    line-height: 1.3;
}

.lcard-zillow {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--primary);
}

    .lcard-zillow:hover {
        text-decoration: underline;
    }

/* Skeleton placeholders for featured listings while data is loading */
.lcard-skeleton {
    cursor: default;
    pointer-events: none;
}

    .lcard-skeleton:hover {
        box-shadow: var(--shadow-sm);
        transform: none;
    }

    .lcard-skeleton .lcard-photo {
        animation: lcard-shimmer 1.6s infinite;
    }

.skeleton-line {
    height: 0.8rem;
    margin-bottom: 0.35rem;
    border-radius: 0.2rem;
    background-image: linear-gradient(90deg, #d1dbe8 25%, #e8edf4 50%, #d1dbe8 75%);
    background-size: 200% 100%;
    animation: lcard-shimmer 1.6s infinite;
}

.skeleton-price {
    width: 55%;
    height: 1.1rem;
    margin-bottom: 0.45rem;
}

.skeleton-meta {
    width: 45%;
}

.skeleton-addr {
    width: 80%;
}

.skeleton-city {
    width: 65%;
}

/* ─── FOOTER ─────────────────────────────────── */

.site-footer {
    padding: 1.25rem 0 2rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.87rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* ─── RESPONSIVE ─────────────────────────────── */

@media (max-width: 960px) {
    .listings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .hero-banner {
        min-height: auto;
    }

    .hero-content {
        padding-top: 80px;
        padding-bottom: 2rem;
    }

    .hero-headline {
        font-size: 1.85rem;
    }

    .stab svg {
        display: none;
    }

    .stab {
        font-size: 0.82rem;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .site-nav,
    .footer-inner {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
}

.brand img {
    max-height: 90px;
}

/* ─── LISTING CARDS (Results Page) ─────────────────────────────────── */

.results-loading,
.results-error {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.results-error {
    color: #dc2626;
}

.results-count {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.listing-card {
    display: block;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .listing-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

.listing-card-link {
    display: block;
}

.listing-photo {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--border);
}

    .listing-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.listing-save-heart,
.lcard-save-heart {
    position: absolute;
    right: 0.72rem;
    bottom: 0.72rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #64748b;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
    cursor: pointer;
    z-index: 3;
}

    .listing-save-heart:hover,
    .lcard-save-heart:hover {
        background: #ffffff;
        color: #ef4444;
    }

    .listing-save-heart i,
    .lcard-save-heart i {
        font-size: 0.94rem;
    }

    .listing-save-heart.is-saved,
    .lcard-save-heart.is-saved {
        color: #dc2626;
    }

    .listing-save-heart:disabled,
    .lcard-save-heart:disabled {
        opacity: 0.6;
        cursor: wait;
    }

.listing-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.listing-status-active {
    color: #16a34a;
}

.listing-status-pending {
    color: #ea580c;
}

.listing-status-comingsoon {
    color: var(--primary);
}

/* JewishMatch score badge shown on listing cards in search/featured grids */
.jw-score-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    min-width: 2.25rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

    .jw-score-badge i {
        color: #d4af37;
        margin-right: 0.2rem;
    }

.jw-score-exceptional {
    color: #15803d;
}

.jw-score-excellent {
    color: #16a34a;
}

.jw-score-great {
    color: #2563eb;
}

.jw-score-good {
    color: #ca8a04;
}

.jw-score-low {
    color: #dc2626;
}

.listing-info {
    padding: 1rem 1.25rem 1.25rem;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.listing-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

    .listing-specs span {
        white-space: nowrap;
    }

.listing-address {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.listing-type {
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: capitalize;
}

@media (max-width: 768px) {
    .listing-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── PROPERTY DETAILS PAGE ─────────────────────────────────── */

.details-page {
    padding: 1.75rem 0 4rem;
}

.details-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 1.1rem;
    cursor: pointer;
}

.lcard-link {
    display: block;
}

    .details-back:hover {
        color: var(--text);
    }

    .details-back svg {
        width: 1rem;
        height: 1rem;
    }

.details-gallery {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 6px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.details-gallery-empty {
    display: block;
}

.details-gallery-hero {
    cursor: pointer;
    min-height: 460px;
    background-size: cover;
    background-position: center;
    background-color: #d1dbe8;
}

.details-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
}

.details-gallery-cell {
    position: relative;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-color: #d1dbe8;
}

.details-gallery-more-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

    .details-gallery-more-overlay svg {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
    }

.details-gallery-count-pill {
    display: none;
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

    .details-gallery-count-pill svg {
        width: 0.9rem;
        height: 0.9rem;
    }

.details-photo-placeholder {
    height: 460px;
}

.details-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    margin-top: 2rem;
}

.details-header {
    position: relative;
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.details-status-badge {
    position: static;
    display: inline-block;
    margin-bottom: 0.75rem;
    background: var(--bg);
}

.details-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.details-key-facts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--text);
}

.details-key-fact strong {
    font-weight: 800;
}

.details-key-facts-divider {
    color: var(--border);
}

.details-address {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.35rem;
}

.details-citystate {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.details-type {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 0.6rem;
    text-transform: capitalize;
}

.details-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.details-spec {
    text-align: center;
}

.details-spec-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.details-spec-label {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.details-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.details-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.85rem;
}

.details-description {
    font-size: 0.96rem;
    color: var(--text);
    line-height: 1.65;
    white-space: pre-line;
    margin: 0;
}

.details-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .details-features-list li {
        font-size: 0.9rem;
        color: var(--text);
        padding-left: 1.2rem;
        position: relative;
    }

        .details-features-list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.5rem;
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: var(--primary);
        }

.details-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem 1.5rem;
}

.details-info-label {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.details-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.15rem;
}

.details-cta-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 5.5rem;
}

.details-cta-btn {
    display: block;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 140ms, border-color 140ms, opacity 140ms;
}

.details-cta-primary {
    background: var(--primary);
    color: #fff;
}

    .details-cta-primary:hover {
        background: var(--primary-dark);
    }

.details-cta-secondary {
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

    .details-cta-secondary:hover {
        background: #eff6ff;
    }

.details-cta-save {
    background: #eff6ff;
    color: var(--primary);
    border: 1.5px solid #bfdbfe;
}

    .details-cta-save:hover {
        background: #dbeafe;
    }

.details-cta-saved {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

    .details-cta-saved:hover {
        background: var(--primary);
        opacity: 0.9;
    }

.details-cta-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.details-agent-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.details-agent-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.details-agent-contact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.6rem;
}

.details-agent-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

    .details-agent-link:hover {
        text-decoration: underline;
    }

.details-mls {
    font-size: 0.82rem;
    color: var(--muted);
    padding: 0 0.25rem;
}

.details-map-frame {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

    .details-map-frame iframe {
        display: block;
        width: 100%;
        height: 320px;
        border: 0;
    }

#details-map {
    width: 100%;
    height: 320px;
}

.details-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 0.75rem;
    padding: 0 0.25rem;
}

.details-map-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.details-map-legend-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── JEWISHMATCH SCORE ──────────────────────────────── */

.jm-score-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.jm-score-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.1rem;
}

.jm-gauge-svg {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
}

.jm-gauge-track {
    stroke: var(--border);
}

.jm-gauge-arc {
    stroke: var(--primary);
}

.jm-gauge-value {
    font-size: 22px;
    font-weight: 700;
    fill: var(--text);
    font-family: inherit;
}

.jm-score-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.jm-score-subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.jm-amenity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
}

.jm-amenity-tile {
    background: var(--bg);
    border-radius: 0.6rem;
    padding: 0.75rem 0.9rem;
}

.jm-amenity-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.3rem;
}

.jm-amenity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    font-size: 0.9rem;
    line-height: 1;
}

.jm-amenity-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.jm-amenity-distance {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.jm-amenity-name {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .jm-amenity-name a {
        color: var(--primary);
        text-decoration: none;
    }

        .jm-amenity-name a:hover {
            text-decoration: underline;
        }

/* ─── PHOTO LIGHTBOX ─────────────────────────────────── */

.details-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 12, 16, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.details-lightbox-open {
    display: flex;
}

.details-lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    color: #fff;
}

.details-lightbox-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.details-lightbox-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.5rem;
}

.details-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    padding: 3.5rem 4.5rem;
    min-height: 0;
}

.details-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.details-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 140ms;
}

    .details-lightbox-nav:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .details-lightbox-nav svg {
        width: 1.4rem;
        height: 1.4rem;
    }

.details-lightbox-prev {
    left: 1rem;
}

.details-lightbox-next {
    right: 1rem;
}

.details-lightbox-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1.25rem;
    overflow-x: auto;
    max-width: 100%;
}

.details-lightbox-thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 60px;
    border-radius: 0.4rem;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: opacity 140ms, border-color 140ms;
}

    .details-lightbox-thumb:hover {
        opacity: 0.85;
    }

.details-lightbox-thumb-active {
    opacity: 1;
    border-color: #fff;
}

@media (max-width: 900px) {
    .details-body {
        grid-template-columns: 1fr;
    }

    .jm-amenity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .details-cta-card {
        position: static;
    }

    .details-gallery {
        grid-template-columns: 1fr;
    }

    .details-gallery-hero {
        min-height: 280px;
    }

    .details-gallery-grid {
        display: none;
    }

    .details-gallery-count-pill {
        display: flex;
    }

    .details-photo-placeholder {
        height: 280px;
    }

    .details-lightbox-stage {
        padding: 3.5rem 1rem;
    }

    .details-lightbox-nav {
        width: 2.25rem;
        height: 2.25rem;
    }
}

@media (max-width: 640px) {
    .jm-amenity-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── AUTH PAGES ─────────────────────────────── */
body.auth-page {
    margin: 0;
    min-height: 100vh;
    background: #f3f6fa;
    color: #0f172a;
}

.auth-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 42%) 1fr;
}

.auth-rail {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

.auth-rail-top,
.auth-rail-body,
.auth-rail-footer {
    position: relative;
    z-index: 2;
}

.auth-rail-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    text-decoration: none;
}

    .auth-rail-brand img {
        width: auto;
        height: 2.2rem;
    }

    .auth-rail-brand span {
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

.auth-rail-body {
    margin: auto 0;
    max-width: 36ch;
}

.auth-rail-kicker {
    margin: 0 0 0.95rem;
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.auth-rail-body h2 {
    margin: 0;
    color: #f8fafc;
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.12;
}

.auth-rail-body > p {
    margin: 1rem 0 1.2rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
}

.auth-rail-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

    .auth-rail-points li {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        color: #dbeafe;
        font-size: 0.88rem;
        line-height: 1.45;
    }

        .auth-rail-points li::before {
            content: "";
            width: 0.4rem;
            height: 0.4rem;
            margin-top: 0.42rem;
            border-radius: 999px;
            background: #60a5fa;
            flex: 0 0 auto;
        }

.auth-rail-footer p {
    margin: 0 0 0.95rem;
    color: #94a3b8;
    font-size: 0.81rem;
    line-height: 1.55;
}

    .auth-rail-footer p span {
        display: block;
        margin-bottom: 0.16rem;
        color: #cbd5e1;
        font-size: 0.9rem;
        direction: rtl;
    }

.auth-rail-links {
    display: inline-flex;
    gap: 1rem;
}

    .auth-rail-links a {
        color: #94a3b8;
        font-size: 0.78rem;
        text-decoration: none;
    }

    .auth-rail-links a:hover {
        color: #f8fafc;
    }

.auth-rail-mark {
    position: absolute;
    bottom: -2rem;
    right: -1rem;
    color: rgba(148, 163, 184, 0.12);
    font-family: 'Frank Ruhl Libre', 'Arial Hebrew', 'Times New Roman', serif;
    font-size: clamp(7rem, 16vw, 14rem);
    letter-spacing: -0.03em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.auth-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.8rem;
}

.auth-stage-top,
.auth-stage-bottom {
    display: flex;
    justify-content: center;
}

.auth-stage-brand-mobile {
    display: none;
    align-items: center;
    gap: 0.65rem;
}

    .auth-stage-brand-mobile img {
        width: auto;
        height: 1.9rem;
    }

    .auth-stage-brand-mobile span {
        color: #334155;
        font-size: 0.96rem;
        font-weight: 600;
    }

.auth-stage-card-wrap {
    margin: 1.4rem auto;
    width: min(560px, 100%);
}

.auth-page-block {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 1.1rem;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
    padding: 1.7rem;
}

.auth-page-head {
    margin-bottom: 1.35rem;
}

.auth-page-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0f172a;
}

.auth-page-meta {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

    .auth-page-meta a {
        color: #1d4ed8;
        font-weight: 600;
        text-decoration: none;
    }

    .auth-page-meta a:hover {
        text-decoration: underline;
    }

.auth-status {
    border-radius: 0.8rem;
    padding: 0.85rem 0.95rem;
    margin-bottom: 1.15rem;
    border: 1px solid transparent;
}

    .auth-status p {
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.55;
    }

    .auth-status p + p {
        margin-top: 0.2rem;
    }

.auth-status-error {
    background: #fef2f2;
    border-color: #fecaca;
}

    .auth-status-error p {
        color: #b91c1c;
    }

.auth-status-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

    .auth-status-success p {
        color: #166534;
    }

.auth-form-stack {
    display: grid;
    gap: 0.9rem;
}

.auth-form-row {
    display: grid;
    gap: 0.4rem;
}

.auth-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
}

.auth-field-label {
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.auth-field-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 500;
}

    .auth-field-link:hover {
        color: #4338ca;
        text-decoration: underline;
    }

.auth-field-input {
    width: 100%;
    display: block;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.78rem 0.88rem;
    color: #0f172a;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 130ms ease, box-shadow 130ms ease;
}

    .auth-field-input::placeholder {
        color: #94a3b8;
    }

    .auth-field-input:focus {
        border-color: #4f46e5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
    }

    .auth-field-input.is-invalid {
        border-color: #f87171;
    }

    .auth-field-input.is-invalid:focus {
        box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
    }

.auth-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.05rem;
}

    .auth-check-row input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
        accent-color: #4f46e5;
        cursor: pointer;
    }

    .auth-check-row label {
        color: #475569;
        font-size: 0.86rem;
        cursor: pointer;
    }

.auth-page-actions {
    margin-top: 0.15rem;
}

.auth-primary-btn,
.auth-primary-link {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 0.52rem;
    background: linear-gradient(90deg, #4f46e5 0%, #3f35f2 100%);
    color: #fff;
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.84rem 1rem;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

    .auth-primary-btn:hover,
    .auth-primary-link:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
    }

.auth-legal-copy {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
}

    .auth-legal-copy a {
        color: #475569;
        text-decoration: underline;
    }

.auth-return-link {
    margin-top: 0.8rem;
    text-align: center;
}

    .auth-return-link a {
        color: #475569;
        font-size: 0.84rem;
        text-decoration: none;
    }

    .auth-return-link a:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

.auth-stage-bottom {
    gap: 0.45rem;
    color: #64748b;
    font-size: 0.78rem;
}

    .auth-stage-bottom a {
        color: #64748b;
        text-decoration: none;
    }

    .auth-stage-bottom a:hover {
        color: #1d4ed8;
    }

@media (max-width: 980px) {
    .auth-app-shell {
        grid-template-columns: 1fr;
    }

    .auth-rail {
        display: none;
    }

    .auth-stage {
        justify-content: flex-start;
        padding: 1.35rem 1rem;
    }

    .auth-stage-brand-mobile {
        display: inline-flex;
    }

    .auth-stage-card-wrap {
        width: 100%;
        margin: 1rem 0 0.85rem;
    }
}

@media (max-width: 560px) {
    .auth-page-block {
        border-radius: 0.82rem;
        padding: 1.2rem;
    }

    .auth-page-title {
        font-size: 1.68rem;
    }

    .auth-stage-bottom {
        font-size: 0.76rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-primary-btn,
    .auth-primary-link {
        transition: none;
    }
}

/* AUTH REDESIGN OVERRIDES */
body.auth-page {
    background: linear-gradient(180deg, #edf2f8 0%, #f8fafd 100%);
}

.auth-app-shell {
    min-height: calc(100vh - 2rem);
    margin: 1rem;
    border: 1px solid #dce3ee;
    border-radius: 1.1rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    background: #fff;
    grid-template-columns: minmax(460px, 52%) 1fr;
}

.auth-stage {
    background: #fff;
    justify-content: space-between;
    padding: 2.15rem 2.3rem 1.7rem;
}

.auth-stage-top {
    justify-content: space-between;
    align-items: center;
}

.auth-stage-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    text-decoration: none;
    color: #111827;
}

    .auth-stage-brand img {
        height: 1.95rem;
        width: auto;
    }

    .auth-stage-brand span {
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

.auth-stage-brand-mobile {
    display: none;
}

.auth-stage-card-wrap {
    width: min(470px, 100%);
    margin: 1rem auto;
}

.auth-page-block {
    border-radius: 0.9rem;
    border: 1px solid #e1e8f2;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.07);
    padding: 1.35rem;
}

.auth-page-title {
    font-size: 2rem;
    line-height: 1.12;
}

.auth-page-meta {
    color: #7b8797;
}

.auth-page-meta a,
.auth-field-link {
    color: #2563eb;
}

.auth-page-meta a:hover,
.auth-field-link:hover {
    color: #1d4ed8;
}

.auth-field-label {
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}

.auth-field-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.auth-check-row input[type="checkbox"] {
    accent-color: #2563eb;
}

.auth-primary-btn,
.auth-primary-link {
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

.auth-primary-btn:hover,
.auth-primary-link:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.auth-stage-bottom {
    margin-top: 0.5rem;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    background: linear-gradient(160deg, #2563eb 0%, #1d4ed8 45%, #1e40af 100%);
    color: #fff;
}

.auth-showcase-sheen {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 46%),
        radial-gradient(circle at 86% 92%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 56%);
    pointer-events: none;
}

.auth-showcase-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 88px 88px;
    opacity: 0.35;
    pointer-events: none;
}

.auth-showcase-copy,
.auth-showcase-canvas {
    position: relative;
    z-index: 1;
}

.auth-showcase-kicker {
    margin: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.8);
}

.auth-showcase-copy h2 {
    margin: 0;
    max-width: 18ch;
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
}

.auth-showcase-copy > p {
    margin: 0.8rem 0 0;
    max-width: 40ch;
    color: rgba(236, 241, 255, 0.92);
    font-size: 0.92rem;
    line-height: 1.58;
}

.auth-showcase-canvas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.78rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 0.76rem;
    padding: 0.75rem;
    box-shadow: 0 14px 34px rgba(27, 24, 95, 0.28);
    color: #111827;
}

.auth-card h3 {
    margin: 0 0 0.3rem;
    color: #475569;
    font-size: 0.71rem;
    font-weight: 600;
}

.auth-card-metric p {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 700;
    color: #1e40af;
}

.auth-card-metric span,
.auth-card-chart span {
    display: block;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.71rem;
}

.auth-chart-line {
    height: 62px;
    border-radius: 0.5rem;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.22) 0%, rgba(37, 99, 235, 0.06) 100%),
        linear-gradient(130deg, transparent 20%, #2563eb 23%, transparent 28%, transparent 45%, #2563eb 50%, transparent 54%, transparent 70%, #2563eb 73%, transparent 78%);
}

.auth-card-list {
    grid-column: 1 / span 2;
}

.auth-card-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.34rem;
}

.auth-card-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
}

.auth-card-list em {
    font-style: normal;
    color: #1d4ed8;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .auth-app-shell {
        grid-template-columns: 1fr;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-showcase {
        display: none;
    }

    .auth-stage {
        justify-content: flex-start;
        padding: 1.35rem 1rem 1.2rem;
    }

    .auth-stage-brand {
        display: none;
    }

    .auth-stage-brand-mobile {
        display: inline-flex;
        align-items: center;
        gap: 0.62rem;
    }

    .auth-stage-brand-mobile img {
        height: 1.9rem;
        width: auto;
    }

    .auth-stage-brand-mobile span {
        color: #334155;
        font-size: 0.96rem;
        font-weight: 600;
    }

    .auth-stage-card-wrap {
        width: 100%;
        margin: 0.95rem 0 0.8rem;
    }
}

@media (max-width: 560px) {
    .auth-page-title {
        font-size: 1.62rem;
    }
}

/* ─── PROFILE PAGE ───────────────────────────── */
.profile-page {
    padding: 2.25rem 0 3.25rem;
}

.profile-wrap {
    width: min(1200px, calc(100% - 2.5rem));
}

.profile-head h1 {
    margin: 0;
    font-size: 1.9rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.profile-head p {
    margin: 0.5rem 0 1.25rem;
    color: #64748b;
}

.profile-status {
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

    .profile-status p {
        margin: 0;
        font-size: 0.88rem;
    }

.profile-status-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.profile-status-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.profile-status-error p + p {
    margin-top: 0.22rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.1rem;
    align-items: start;
}

.profile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    padding: 1.2rem;
}

    .profile-card h2 {
        margin: 0 0 1rem;
        font-size: 1.15rem;
    }

    .profile-card h3 {
        margin: 1rem 0 0.35rem;
        font-size: 1rem;
    }

.profile-field {
    margin-bottom: 0.86rem;
}

    .profile-field label {
        display: block;
        margin-bottom: 0.32rem;
        font-size: 0.78rem;
        font-weight: 600;
        color: #334155;
    }

    .profile-field input,
    .profile-field select {
        width: 100%;
        border: 1px solid #cbd5e1;
        border-radius: 0.65rem;
        padding: 0.72rem 0.8rem;
        font-size: 0.92rem;
        color: #0f172a;
        background: #fff;
        outline: none;
        transition: border-color 140ms ease, box-shadow 140ms ease;
    }

        .profile-field input:focus,
        .profile-field select:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        }

        .profile-field input[readonly] {
            background: #f8fafc;
            color: #64748b;
        }

.profile-note {
    display: block;
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.76rem;
}

.profile-inline-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.35rem 0 0.95rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.65rem;
    padding: 0.62rem 0.75rem;
}

    .profile-inline-score span {
        font-size: 0.8rem;
        color: #1e3a8a;
    }

    .profile-inline-score strong {
        font-size: 1rem;
        color: #1d4ed8;
    }

.profile-tags-input-wrap {
    display: flex;
    gap: 0.45rem;
}

    .profile-tags-input-wrap input {
        flex: 1;
    }

    .profile-tags-input-wrap button {
        border: none;
        border-radius: 0.6rem;
        padding: 0 0.92rem;
        font-size: 0.82rem;
        font-weight: 600;
        background: #2563eb;
        color: #fff;
        cursor: pointer;
    }

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.profile-tag {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 0.22rem 0.52rem;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    cursor: pointer;
}

    .profile-tag strong {
        font-size: 0.95rem;
        line-height: 1;
        color: #1e3a8a;
    }

.profile-save {
    margin-top: 0.5rem;
    width: 100%;
    border: none;
    border-radius: 0.68rem;
    padding: 0.78rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    cursor: pointer;
}

.profile-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.profile-saved-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

    .profile-saved-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.8rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.75rem;
        padding: 0.75rem;
    }

.profile-saved-photo {
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 0.55rem;
    background: #f1f5f9;
}

.profile-saved-main {
    flex: 1;
    min-width: 0;
}

.profile-saved-main a {
    font-weight: 600;
    color: #0f172a;
}

.profile-saved-main p {
    margin: 0.2rem 0;
    color: #64748b;
    font-size: 0.82rem;
}

.profile-saved-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

    .profile-saved-meta span {
        font-size: 0.76rem;
        color: #334155;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 999px;
        padding: 0.16rem 0.48rem;
    }

.profile-remove {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #b91c1c;
    border-radius: 0.55rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 980px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.leaflet-control-attribution {
    opacity: 0.2;
    font-size: 8px;
}