:root {
    --member-ink: #172033;
    --member-muted: #68758a;
    --member-line: #e4e9f0;
    --member-soft: #f6f8fb;
    --member-accent: #ec4899;
    --member-accent-dark: #be185d;
    --member-blue: #2563eb;
    --member-success: #15803d;
    --member-warning: #b45309;
}

.member-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226,232,240,.9);
}

.member-nav-links {
    align-items: center;
}

.member-nav-links a,
.nav-logout-button {
    white-space: nowrap;
}

.nav-register-button {
    padding: 9px 15px !important;
    border-radius: 999px;
    background: #172033;
    color: #fff !important;
}

.nav-heart {
    color: var(--member-accent) !important;
}

.member-avatar-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.member-avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #172033, #475569);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.nav-logout-form {
    margin: 0;
}

.nav-logout-button {
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    cursor: pointer;
}

.member-notice,
.member-error {
    margin-top: 16px;
    border-radius: 14px;
}

.member-auth-section,
.member-page {
    min-height: 72vh;
    padding: 52px 0 70px;
    background:
        radial-gradient(circle at 0 0, rgba(236,72,153,.08), transparent 28rem),
        radial-gradient(circle at 100% 10%, rgba(37,99,235,.07), transparent 30rem),
        #f8fafc;
}

.member-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .8fr);
    overflow: hidden;
    border: 1px solid var(--member-line);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15,23,42,.12);
}

.member-auth-story {
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(36px, 7vw, 86px);
    background:
        linear-gradient(135deg, rgba(15,23,42,.96), rgba(30,41,59,.91)),
        url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1600&q=85') center/cover;
    color: #fff;
}

.member-auth-story h1 {
    max-width: 620px;
    margin: 14px 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
}

.member-auth-story > p {
    max-width: 620px;
    color: #dbe4f0;
    font-size: 18px;
    line-height: 1.7;
}

.member-auth-points {
    display: grid;
    gap: 12px;
    margin-top: 36px;
}

.member-auth-points div {
    display: flex;
    align-items: center;
    gap: 13px;
}

.member-auth-points span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.13);
}

.member-auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: clamp(30px, 5vw, 64px);
}

.member-auth-card h2,
.member-page h1,
.member-panel h2 {
    color: var(--member-ink);
}

.member-auth-card h2 {
    margin: 6px 0 4px;
    font-size: 34px;
}

.member-auth-card p {
    color: var(--member-muted);
    line-height: 1.6;
}

.member-kicker {
    display: inline-block;
    color: var(--member-accent-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.member-field {
    display: grid;
    gap: 7px;
}

.member-field > span {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.member-field input,
.member-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #d7dee8;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font: inherit;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.member-field textarea {
    min-height: 120px;
    resize: vertical;
}

.member-field input:focus,
.member-field textarea:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148,163,184,.17);
}

.member-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--member-muted);
    font-size: 13px;
    line-height: 1.5;
}

.member-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 2px;
    accent-color: var(--member-accent-dark);
}

.member-primary-button,
.member-secondary-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 0;
    border-radius: 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.member-primary-button {
    background: linear-gradient(135deg, #172033, #334155);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15,23,42,.18);
}

.member-primary-button:hover {
    transform: translateY(-1px);
}

.member-secondary-button {
    border: 1px solid #d7dee8;
    background: #fff;
    color: #172033;
}

.member-auth-switch {
    text-align: center;
}

.member-auth-switch a,
.member-back-link {
    color: var(--member-accent-dark);
    font-weight: 850;
}

.member-hero,
.member-page-head,
.booking-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.member-hero {
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(135deg, #172033, #334155);
    color: #fff;
}

.member-hero h1,
.member-hero p {
    color: #fff;
}

.member-hero h1 {
    margin: 8px 0;
}

.member-hero-avatar {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    font-size: 34px;
    font-weight: 900;
}

.member-page-head h1,
.booking-detail-head h1 {
    margin: 8px 0;
    font-size: clamp(34px, 5vw, 56px);
}

.member-page-head p,
.booking-detail-head p {
    margin: 0;
    color: var(--member-muted);
}

.member-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.member-stat-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 26px;
    border: 1px solid var(--member-line);
    border-radius: 20px;
    background: #fff;
    color: var(--member-ink);
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.member-stat-card strong {
    font-size: 34px;
}

.member-stat-card > span:last-child {
    color: var(--member-muted);
}

.member-stat-icon {
    font-size: 22px;
    color: var(--member-accent);
}

.member-panel {
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--member-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15,23,42,.05);
}

.member-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.member-panel-head h2 {
    margin: 5px 0 0;
}

.member-booking-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1.4fr) minmax(170px, .8fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--member-line);
    color: var(--member-ink);
    text-decoration: none;
}

.member-booking-row img {
    width: 72px;
    height: 58px;
    border-radius: 11px;
    object-fit: cover;
}

.member-booking-row div {
    display: grid;
    gap: 4px;
}

.member-booking-row span {
    color: var(--member-muted);
    font-size: 13px;
}

.member-status,
.member-payment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.status-confirmed,
.payment-paid {
    background: #dcfce7;
    color: #166534 !important;
}

.status-pending_payment,
.status-payment_submitted,
.payment-unpaid,
.payment-submitted {
    background: #fff7ed;
    color: #9a3412 !important;
}

.status-cancelled,
.status-rejected,
.status-expired {
    background: #fee2e2;
    color: #991b1b !important;
}

.status-new,
.status-contacted {
    background: #e0e7ff;
    color: #3730a3 !important;
}

.member-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 60px 24px;
    text-align: center;
}

.member-empty > span {
    font-size: 44px;
}

.member-property-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.member-property-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--member-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
}

.member-property-image {
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
}

.member-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .22s ease;
}

.member-property-card:hover img {
    transform: scale(1.03);
}

.member-heart-form {
    position: absolute;
    top: 12px;
    right: 12px;
}

.member-heart-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: var(--member-accent);
    font-size: 21px;
    box-shadow: 0 7px 18px rgba(15,23,42,.15);
    cursor: pointer;
}

.member-property-body {
    padding: 18px;
}

.member-property-body > span,
.member-property-body p {
    color: var(--member-muted);
    font-size: 13px;
}

.member-property-body h3 {
    margin: 6px 0;
}

.member-property-body h3 a {
    color: var(--member-ink);
    text-decoration: none;
}

.member-pagination {
    margin-top: 28px;
}

.member-bookings-list {
    display: grid;
    gap: 18px;
}

.member-booking-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--member-line);
    border-radius: 20px;
    background: #fff;
    color: var(--member-ink);
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(15,23,42,.05);
}

.member-booking-card > img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.member-booking-card-body {
    padding: 24px;
}

.member-booking-card-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.member-booking-card-head h2 {
    margin: 6px 0;
}

.member-reference {
    color: var(--member-accent-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
}

.member-booking-facts,
.booking-fact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.member-booking-facts div,
.booking-fact-grid div {
    display: grid;
    gap: 5px;
    padding: 13px;
    border-radius: 12px;
    background: var(--member-soft);
}

.member-booking-facts span,
.booking-fact-grid span {
    color: var(--member-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.booking-detail-grid,
.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr);
    align-items: start;
    gap: 24px;
}

.booking-detail-main,
.checkout-main {
    display: grid;
    gap: 20px;
}

.booking-property-summary,
.checkout-property {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
}

.booking-property-summary img,
.checkout-property img {
    width: 190px;
    height: 135px;
    border-radius: 15px;
    object-fit: cover;
}

.booking-message {
    margin-top: 22px;
    padding: 16px;
    border-radius: 13px;
    background: var(--member-soft);
}

.booking-message span {
    color: var(--member-muted);
    font-size: 12px;
    font-weight: 800;
}

.booking-price-lines {
    display: grid;
    gap: 12px;
}

.booking-price-lines > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--member-line);
}

.booking-price-lines .discount {
    color: var(--member-success);
}

.booking-price-lines .total {
    padding-top: 5px;
    font-weight: 800;
}

.booking-price-lines .grand-total {
    padding-top: 9px;
    border-bottom: 0;
    color: var(--member-ink);
    font-size: 20px;
}

.booking-status-stack {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.bank-card,
.checkout-price-card {
    position: sticky;
    top: 98px;
}

.bank-card h2,
.checkout-price-card h2 {
    margin: 7px 0 12px;
}

.bank-data {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.bank-data div {
    display: grid;
    gap: 3px;
    padding: 12px;
    border-radius: 11px;
    background: var(--member-soft);
}

.bank-data span {
    color: var(--member-muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.bank-data strong {
    overflow-wrap: anywhere;
}

.bank-deadline,
.bank-warning,
.checkout-payment-note {
    padding: 14px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
}

.bank-note {
    color: var(--member-muted);
    font-size: 13px;
    line-height: 1.6;
}

.checkout-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.checkout-full {
    grid-column: 1 / -1;
}

.checkout-property-facts {
    display: flex;
    gap: 10px;
}

.checkout-property-facts span {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--member-soft);
    color: var(--member-muted);
    font-size: 12px;
    font-weight: 800;
}

.checkout-payment-note {
    margin: 18px 0;
}

.checkout-payment-note p {
    margin: 5px 0 0;
    color: inherit;
    font-size: 13px;
}

.checkout-submit {
    width: 100%;
    margin-top: 17px;
}

.checkout-safe-note {
    margin-top: 12px;
    color: var(--member-muted);
    font-size: 12px;
    text-align: center;
}

.property-favorite-form {
    display: inline-flex;
    margin: 0;
}

.property-favorite-button.active {
    border-color: #f9a8d4 !important;
    background: #fdf2f8 !important;
    color: #be185d !important;
}

.booking-member-box {
    display: grid;
    gap: 4px;
    margin: 14px 0;
    padding: 13px;
    border-radius: 12px;
    background: #f8fafc;
}

.booking-member-box strong {
    font-size: 13px;
}

.booking-member-box span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .member-auth-shell,
    .booking-detail-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .member-auth-story {
        min-height: auto;
    }

    .bank-card,
    .checkout-price-card {
        position: static;
    }

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

@media (max-width: 760px) {
    .member-nav .nav-inner {
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .member-nav-links {
        max-width: 70vw;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .member-nav-links .member-avatar-link span:last-child,
    .member-nav-links .nav-heart span,
    .nav-logout-form {
        display: none;
    }

    .member-auth-section,
    .member-page {
        padding: 24px 0 44px;
    }

    .member-auth-shell {
        border-radius: 20px;
    }

    .member-auth-story,
    .member-auth-card {
        padding: 28px 22px;
    }

    .member-auth-story h1 {
        font-size: 38px !important;
    }

    .member-hero,
    .member-page-head,
    .booking-detail-head,
    .member-panel-head,
    .member-booking-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-hero-avatar {
        display: none;
    }

    .member-stat-grid,
    .member-property-grid,
    .booking-fact-grid,
    .checkout-contact-grid {
        grid-template-columns: 1fr;
    }

    .member-stat-card {
        min-height: 120px;
    }

    .member-booking-row {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .member-booking-row > div:nth-of-type(2),
    .member-booking-row > .member-status {
        grid-column: 2;
    }

    .member-booking-row img {
        width: 58px;
        height: 52px;
    }

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

    .member-booking-card > img {
        min-height: 210px;
        aspect-ratio: 16 / 10;
    }

    .member-booking-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .booking-property-summary,
    .checkout-property {
        grid-template-columns: 1fr;
    }

    .booking-property-summary img,
    .checkout-property img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .checkout-full {
        grid-column: auto;
    }

    .booking-status-stack {
        justify-items: start;
    }
}

@media (max-width: 430px) {
    .member-booking-facts {
        grid-template-columns: 1fr;
    }

    .member-panel,
    .member-booking-card-body {
        padding: 18px;
    }
}
