
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f5f7;
    color: #222;
}

/* Top navigation */
.top-bar {
    height: 75px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: relative;
    z-index: 1200;
    overflow: visible;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.language-control {
    flex: 0 0 auto;
}

.language-select {
    min-width: 66px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 24px;
    background: #fff;
    color: #333;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.language-select:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.logo {
    font-size: 27px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-size: 35px;
}

/* Search */
.search-box {
    display: flex;
    width: 430px;
    background: #f4f5f7;
    border-radius: 30px;
    overflow: hidden;
    padding: 5px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 14px;
}

.search-box button {
    background: #222;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 22px;
    cursor: pointer;
}

.search-box button.search-clear-button {
    min-width: 38px;
    padding: 8px 10px;
    background: transparent;
    color: #68737c;
    font-size: 20px;
}

.search-box button.search-clear-button:hover {
    background: #e8edf0;
}

.search-clear-button[hidden] {
    display: none;
}

.favorites-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 24px;
    background: #ffffff;
    color: #333333;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}

.favorites-view-button:hover,
.favorites-view-button.active {
    border-color: #e53935;
    color: #c62828;
}

.favorites-view-heart {
    color: #e53935;
    font-size: 20px;
    line-height: 1;
}

.favorites-count {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 12px;
    background: #f4f5f7;
    font-size: 12px;
    text-align: center;
}

/* Map area */
.map-container {
    height: calc(100vh - 75px);
    position: relative;
    background: #e8edf0;
}

/* Category circles */
.category-menu {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
    z-index: 5;
}

.category {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #222;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: 0.2s;
}

.category span {
    font-size: 25px;
}

.category span.category-label {
    font-size: 14px;
}

html[lang="ku"] .category .category-label,
html[lang="ku"] .category-menu .sub-menu button {
    font-family: "Noto Sans Arabic", Arial, sans-serif;
    direction: rtl;
    text-align: center;
}

.category:hover {
    transform: translateY(-4px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.18);
}

/* Temporary map message */
.map-message {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #68737c;
    font-size: 20px;
    text-align: center;
}

.map-results-message {
    position: absolute;
    top: 52%;
    left: 50%;
    z-index: 600;
    max-width: min(90%, 460px);
    padding: 14px 20px;
    transform: translate(-50%, -50%);
    border: 1px solid #e8edf0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: #68737c;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    pointer-events: none;
}

.map-results-message[hidden] {
    display: none;
}

/* Mobile design */
@media (max-width: 600px) {

    html,
    body {
        height: 100%;
    }

    body {
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .top-bar {
        flex: 0 0 auto;
        height: auto;
        padding: 8px 12px 10px;
        flex-direction: column;
        gap: 8px;
    }

    .logo {
        align-self: center;
    }

    .search-box {
        width: 100%;
        min-height: 40px;
        padding: 3px;
    }

    .search-box input {
        min-width: 0;
        padding: 8px 11px;
    }

    .search-box button {
        padding: 8px 14px;
    }

    .top-bar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }

    .language-select {
        min-width: 58px;
        min-height: 40px;
        padding: 7px 8px;
        font-size: 12px;
    }

    .top-bar-actions .favorites-view-button {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        min-height: 40px;
        padding: 7px 10px;
    }

    .property-auth-buttons {
        gap: 6px;
    }

    .property-auth-buttons .auth-circle {
        height: 38px;
        padding: 0 9px;
        font-size: 12px;
        white-space: nowrap;
    }

    .profile-menu {
        right: 0;
        min-width: min(240px, calc(100vw - 30px));
    }

    .map-container {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }

    .category-menu {
        top: 15px;
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        justify-content: space-between;
        gap: clamp(2px, 1vw, 6px);
        overflow: visible;
    }

    .category-menu > .category-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .category {
        width: min(68px, 100%);
        height: auto;
        aspect-ratio: 1;
        font-size: clamp(10px, 2.75vw, 11px);
    }

    .category span {
        font-size: 20px;
    }

    .category span.category-label {
        font-size: inherit;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .leaflet-top.leaflet-left {
        top: auto;
        bottom: clamp(8px, 14vh, 100px);
    }
}

@media (max-width: 600px) and (orientation: landscape) {
    .leaflet-top.leaflet-left {
        bottom: 0;
    }
}

/* Interactive Map */

.map-container {
    overflow: hidden;
    background: #e8edf0;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Keep category circles above the map */

.category-menu {
    z-index: 500;
}

.category {
    position: relative;
    z-index: 500;
}

/* Category dropdown circles */

.category-menu {
    align-items: flex-start;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.sub-menu {
    display: none;
    justify-content: center;
    gap: 8px;
}

.sub-menu button {
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 50%;
    background: white;
    color: #222;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: 0.2s;
}

.sub-menu button:hover {
    transform: translateY(-3px);
    background: #f4f4f4;
}

/* Full Property Details Page */

.property-details {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #ffffff;
    overflow-y: auto;
    padding: 35px 20px;
}

html[lang="ku"] #property-details {
    direction: rtl;
    text-align: right;
    font-family: "Noto Sans Arabic", Arial, sans-serif;
}

html[lang="ku"] #property-details button {
    font-family: inherit;
}

html[lang="ku"] #property-details .details-location-label::after {
    content: ": ";
}

html:not([lang="ku"]) #property-details .details-location-label {
    display: none;
}

.my-properties-dashboard {
    position: fixed;
    inset: 0;
    z-index: 1900;
    overflow-y: auto;
    padding: 42px 24px;
    background: #f4f5f7;
}

.admin-dashboard {
    position: fixed;
    inset: 0;
    z-index: 1900;
    overflow-y: auto;
    padding: 42px 24px;
    background: #f4f5f7;
}

.admin-dashboard-content {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.admin-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-dashboard-header h1 {
    margin: 3px 0 6px;
    font-size: 30px;
}

.admin-dashboard-header p:not(.dashboard-eyebrow) {
    color: #68737c;
}

.admin-security-notice {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid #f2d399;
    border-radius: 12px;
    background: #fff8e8;
    color: #684b12;
    line-height: 1.55;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
}

.admin-dashboard-message {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid #d8e3f3;
    border-radius: 10px;
    background: #f2f7ff;
    color: #31577f;
    line-height: 1.5;
}

.admin-dashboard-message.is-error {
    border-color: #f0c8c8;
    background: #fff1f0;
    color: #9f2525;
}

.admin-dashboard-sections[hidden] {
    display: none;
}

.admin-dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 18px;
}

.admin-status-section {
    min-height: 180px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.admin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-section-heading h2 {
    font-size: 20px;
}

.admin-status-pill {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.admin-status-pill.status-pending {
    background: #fff4d8;
    color: #8a5a00;
}

.admin-status-pill.status-approved {
    background: #e2f5e9;
    color: #237342;
}

.admin-status-pill.status-rejected,
.my-property-status.status-rejected {
    background: #fde8e7;
    color: #a12d27;
}

.admin-status-section > p {
    color: #68737c;
    line-height: 1.55;
}

.admin-property-list {
    display: grid;
    gap: 12px;
}

.admin-list-message {
    padding: 18px 12px;
    border-radius: 10px;
    background: #f7f8fa;
    color: #68737c;
    text-align: center;
}

.admin-list-message[hidden] {
    display: none;
}

.admin-property-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 15px;
    padding: 12px;
    border: 1px solid #e5e8eb;
    border-radius: 12px;
    background: #fff;
}

.admin-property-photo {
    display: grid;
    min-height: 130px;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: #f0f2f4;
    color: #68737c;
    font-size: 13px;
    text-align: center;
}

.admin-property-photo img {
    width: 100%;
    height: 100%;
    min-height: 130px;
    object-fit: cover;
}

.admin-property-card-body {
    min-width: 0;
}

.admin-property-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.admin-property-card-top h3 {
    margin: 2px 0 9px;
    overflow-wrap: anywhere;
}

.admin-property-date,
.admin-property-owner {
    margin: 0 0 8px;
    color: #68737c;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.admin-property-card .dashboard-edit-button {
    margin-top: 5px;
}

.admin-review-actions {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #f2d399;
    border-radius: 12px;
    background: #fff8e8;
}

.admin-review-actions[hidden] {
    display: none;
}

.admin-review-actions h3 {
    margin: 0 0 8px;
}

.admin-review-actions p,
.admin-review-actions small {
    color: #684b12;
    line-height: 1.5;
}

.admin-review-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.admin-approve-button,
.admin-reject-button {
    min-height: 42px;
    padding: 10px 15px;
    border: 0;
    border-radius: 9px;
    font-weight: 700;
}

.details-coordinates,
.details-status {
    margin: 5px 0;
    color: #68737c;
    font-size: 13px;
}

.details-status {
    font-weight: 700;
    text-transform: capitalize;
}

.admin-approve-button {
    background: #237342;
    color: #fff;
    cursor: pointer;
}

.admin-approve-button:hover:not(:disabled) {
    background: #185b32;
}

.admin-reject-button {
    border: 1px solid #d9dee3;
    background: #f3f4f6;
    color: #68737c;
    cursor: not-allowed;
}

.my-properties-content {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.my-properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.my-properties-header h1 {
    margin: 3px 0 6px;
    font-size: 30px;
}

.my-properties-header p:not(.dashboard-eyebrow) {
    color: #68737c;
}

.dashboard-eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-back-button,
.dashboard-edit-button,
.dashboard-delete-button {
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid #d9dee3;
    border-radius: 9px;
    background: #fff;
    color: #333;
    font-weight: 600;
    cursor: pointer;
}

.dashboard-back-button:hover,
.dashboard-edit-button:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.my-properties-message {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: #fff;
    color: #68737c;
    text-align: center;
}

.my-properties-message[hidden] {
    display: none;
}

.my-properties-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
    gap: 18px;
}

.my-property-card {
    overflow: hidden;
    border: 1px solid #e5e8eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.my-property-photo {
    position: relative;
    display: grid;
    min-height: 190px;
    place-items: center;
    overflow: hidden;
    background: #e8edf0;
    color: #68737c;
}

.my-property-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-property-card-body {
    padding: 17px;
}

.my-property-card-top,
.my-property-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.my-property-card h2 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.my-property-price {
    margin: 0 0 6px;
    color: #1d4ed8;
    font-size: 18px;
    font-weight: 700;
}

.my-property-location,
.my-property-meta {
    margin: 0 0 8px;
    color: #68737c;
    line-height: 1.45;
}

.my-property-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 20px;
    background: #eef0f2;
    color: #555;
    font-size: 12px;
    font-weight: 700;
}

.my-property-status.status-pending {
    background: #fff4d8;
    color: #8a5a00;
}

.my-property-status.status-approved {
    background: #e2f5e9;
    color: #237342;
}

.my-property-card-actions {
    justify-content: flex-start;
    margin-top: 16px;
}

.dashboard-delete-button {
    border-color: #f0c8c8;
    color: #b42318;
}

.dashboard-delete-button:hover {
    background: #fff1f0;
}

.dashboard-edit-button:disabled,
.dashboard-delete-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.edit-photos-note {
    color: #68737c;
    font-size: 13px;
    line-height: 1.5;
}

.details-content {
    max-width: 1000px;
    margin: 0 auto;
}

.close-details {
    position: fixed;
    top: 20px;
    right: 25px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #eeeeee;
    font-size: 22px;
    cursor: pointer;
    z-index: 2001;
}

.photo-gallery {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
    gap: 12px;
    margin: 25px 0;
}

.property-popup-photo-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.property-popup-actions {
    display: flex;
    gap: 8px;
}

.property-popup-actions .view-details-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
}

.property-popup-actions .property-favorite-button {
    min-width: 78px;
    padding: 7px 9px;
    font-size: 13px;
}

.property-favorite-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #d9dee3;
    border-radius: 9px;
    background: #ffffff;
    color: #333333;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.property-favorite-button:hover,
.property-favorite-button.is-favorite {
    border-color: #e53935;
    color: #c62828;
}

.property-favorite-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.property-favorite-heart {
    color: #e53935;
    font-size: 20px;
    line-height: 1;
}

.main-photo {
    position: relative;
    overflow: hidden;
    height: 380px;
    background: #e8edf0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #68737c;
}

#details-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #e8edf0;
}

.gallery-message {
    padding: 20px;
    text-align: center;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(34, 34, 34, 0.72);
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

.gallery-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 14px;
    background: rgba(34, 34, 34, 0.72);
    color: white;
    font-size: 13px;
}

.extra-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 110px;
    align-content: start;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.gallery-thumbnail {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #e8edf0;
    color: #68737c;
    cursor: pointer;
}

.gallery-thumbnail.active {
    border-color: #2563eb;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnail-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.gallery-status {
    min-height: 1.3em;
    color: #68737c;
    font-size: 14px;
}

.details-content h1 {
    font-size: 30px;
    margin-bottom: 20px;
}

.details-content h3 {
    margin: 20px 0 10px;
}

.details-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin: 24px 0;
}

.details-heading-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.details-favorite-button {
    width: 100%;
}

.details-heading-copy h2 {
    font-size: 28px;
    margin: 5px 0 8px;
}

.details-eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.details-price-card {
    min-width: 175px;
    padding: 15px 18px;
    border: 1px solid #e8edf0;
    border-radius: 12px;
    background: #f8fafc;
}

.details-price-card > span {
    color: #68737c;
    font-size: 13px;
}

#details-price {
    margin: 5px 0 0;
    color: #222;
    font-size: 22px;
    overflow-wrap: anywhere;
}

#details-location,
#details-description {
    color: #666;
    line-height: 1.7;
}

.details-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.details-info p {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 54px;
    padding: 13px 15px;
    border: 1px solid #e8edf0;
    border-radius: 10px;
    background: #ffffff;
}

.details-info p[hidden] {
    display: none;
}

.details-info p span {
    color: #68737c;
    font-size: 13px;
}

.details-info p strong {
    color: #222;
    font-size: 15px;
}

.details-description-section {
    padding: 2px 0 18px;
}

.seller-contact {
    margin-top: 18px;
    padding: 20px;
    border-radius: 12px;
    background: #f4f5f7;
}

.seller-contact h3 {
    margin: 0 0 8px;
}

.seller-contact p {
    color: #68737c;
    line-height: 1.6;
}

#add-property-form label.property-phone-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 2px;
    font-weight: 500;
    cursor: pointer;
}

#add-property-form .property-phone-consent input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: #2563eb;
}

html[lang="ku"] #add-property-form input.property-phone-input {
    direction: ltr;
    text-align: left;
}

.seller-phone-number {
    direction: ltr;
    text-align: right;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.seller-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.seller-contact-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.seller-contact-button[hidden] {
    display: none;
}

.seller-call-button {
    background: #2563eb;
}

.seller-whatsapp-button {
    background: #168c4b;
}

.seller-contact-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile layout */

@media (max-width: 600px) {

    .my-properties-dashboard {
        padding: 26px 15px;
    }

    .admin-dashboard {
        padding: 26px 15px;
    }

    .my-properties-header,
    .admin-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-header-actions {
        width: 100%;
    }

    .admin-header-actions > button {
        flex: 1;
    }

    .admin-property-card {
        grid-template-columns: 1fr;
    }

    .admin-property-photo,
    .admin-property-photo img {
        min-height: 180px;
        max-height: 220px;
    }

    .dashboard-back-button {
        width: 100%;
    }

    .my-property-card-top {
        align-items: flex-start;
    }

    .property-details {
        padding: 70px 15px 25px;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .main-photo {
        height: 230px;
    }

    .extra-photos {
        grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
        grid-auto-rows: 80px;
        max-height: 180px;
    }

    .details-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details-heading {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .details-price-card {
        min-width: 0;
    }

    .details-heading-side {
        width: 100%;
    }

    .favorites-view-button {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .top-bar-actions .favorites-view-button {
        flex: 0 0 66px;
        gap: 4px;
        padding: 7px 5px;
    }

    .top-bar-actions .favorites-view-button > span:nth-child(2) {
        display: none;
    }

    .details-info {
        grid-template-columns: 1fr;
    }
}

/* List Your Property Button */
.add-property-btn {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #ffffff;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 1000;
}

.add-property-icon {
    width: 48px;
    height: 48px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 400;
}

.add-property-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 3px;
}

.add-property-text strong {
    font-size: 15px;
    color: #222222;
}

.add-property-text small {
    font-size: 12px;
    color: #777777;
}

html[lang="ku"] .add-property-text {
    direction: rtl;
    text-align: right;
}

html[lang="ku"] .add-property-text strong,
html[lang="ku"] .add-property-text small {
    font-family: "Noto Sans Arabic", Arial, sans-serif;
}

@media (max-width: 600px) {
    .add-property-btn {
        max-width: calc(100% - 24px);
        bottom: 38px;
        padding: 5px 11px;
        gap: 8px;
        border-radius: 50px;
    }

    .add-property-icon {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        font-size: 25px;
    }

    .add-property-text {
        min-width: 0;
    }

    .add-property-text strong {
        font-size: 13px;
    }

    .add-property-text small {
        font-size: 10px;
    }
}

/* Account controls in the top navigation */

.property-auth-buttons {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    z-index: 1201;
}

.auth-circle {
    width: auto;
    height: 42px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: none;
}

.sign-in-circle {
    background: #2563eb;
}

.join-circle {
    background: #16a34a;
}

.profile-circle {
    background: #222222;
}

/* ==============================
   XANU REGISTRATION WINDOW
============================== */

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    padding: 20px;
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-height: 85vh;
overflow-y: auto;
box-sizing: border-box;
    max-width: 480px;
    background: #ffffff;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.auth-modal-content h2 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #222222;
    text-align: center;
}

.auth-modal-content > p {
    margin-bottom: 25px;
    color: #777777;
    text-align: center;
}

.close-modal-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #777777;
    cursor: pointer;
}

#register-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#register-form label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

#register-form input {
    padding: 13px;
    border: 1px solid #dddddd;
    border-radius: 9px;
    font-size: 14px;
    outline: none;
    margin-bottom: 8px;
}

#register-form input:focus {
    border-color: #2563eb;
}

.register-submit-btn {
    margin-top: 10px;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.register-submit-btn:hover {
    background: #1d4ed8;
}

.auth-switch {
    margin-top: 22px;
    font-size: 14px;
    text-align: center;
    color: #666666;
}

.auth-switch button {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
}

/* Xanu - Login Form Layout Fix */
#login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#login-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#login-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #ddd;
    border-radius: 9px;
    font-size: 14px;
    margin-bottom: 8px;
}

#login-form input:focus {
    border-color: #2563eb;
    outline: none;
}

/* Xanu - Profile Dropdown Menu */

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    min-width: min(210px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 1250;
}

html[dir="rtl"] .profile-menu {
    right: auto;
    left: 0;
}

html[lang="ku"] #profile-btn,
html[lang="ku"] #profile-menu,
html[lang="ku"] #favorites-view-button {
    direction: rtl;
    text-align: right;
    font-family: "Noto Sans Arabic", Arial, sans-serif;
}

html[lang="ku"] #profile-menu button {
    font-family: inherit;
    text-align: right;
}

html[lang="ku"] #favorites-count {
    direction: ltr;
    unicode-bidi: isolate;
}

.profile-menu.is-open {
    display: block;
}

.profile-menu-heading {
    padding: 10px 12px 4px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.profile-menu button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #333;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.profile-menu button:hover {
    background: #f2f2f2;
    color: #e53935;
}

/* Xanu - Profile User Name */

.profile-user-name {
    padding: 7px 0 10px;
    color: #68737c;
    font-size: 12px;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    word-break: break-word;
}

/* Xanu - Add Property Form Layout */

#add-property-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#add-property-form label {
    display: block;
    font-weight: 600;
    margin-top: 5px;
}

#add-property-form label[hidden] {
    display: none;
}

#add-property-form input,
#add-property-form select,
#add-property-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

#add-property-form textarea {
    min-height: 100px;
    resize: vertical;
}

.property-location-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.use-current-location-button {
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.use-current-location-button:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.property-location-status {
    margin: 0;
    color: #68737c;
    font-size: 13px;
    line-height: 1.45;
}

.property-location-status:empty {
    display: none;
}

#add-property-form input[type="file"] {
    padding: 8px;
}

html[lang="ku"] #add-property-modal .auth-modal-content {
    font-family: "Noto Sans Arabic", Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

html[lang="ku"] #add-property-form input,
html[lang="ku"] #add-property-form select,
html[lang="ku"] #add-property-form textarea {
    direction: rtl;
    text-align: right;
    font-family: "Noto Sans Arabic", Arial, sans-serif;
}

html[lang="ku"] #add-property-form input.property-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

#add-property-form .property-photo-picker-label {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    min-height: 42px;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
}

html:not([lang="ku"]) #add-property-form .property-photo-picker-label,
html:not([lang="ku"]) .property-photo-selection-message {
    display: none;
}

#add-property-form .property-photo-picker-label[hidden],
.property-photo-selection-message[hidden] {
    display: none;
}

.property-photo-picker-label:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

html[lang="ku"] #add-property-form input.property-photo-input:focus-visible + .property-photo-picker-label {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

html[lang="ku"] #add-property-form input.property-photo-input:disabled + .property-photo-picker-label {
    cursor: not-allowed;
    opacity: 0.6;
}

.property-photo-selection-message {
    color: #68737c;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.property-photo-selection-message:empty {
    display: none;
}

/* Project navigation remains styled before the gallery stylesheet loads. */
[hidden]#favorites-view-button, [hidden]#projects-button,
[hidden]#details-favorite-button, [hidden]#project-property-edit { display: none !important; }
#projects-button svg { flex: 0 0 auto; }
html[lang=ku] #projects-button { font-family: "Noto Sans Arabic", Arial, sans-serif; }
@media (max-width: 640px) {
    #projects-button span { display: block; font-size: 9px; line-height: 1.15; }
    #projects-button { inline-size: auto; min-inline-size: 42px; padding-inline: 5px; gap: 2px; flex-direction: column; }
}

.property-map-pin {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;
    background: #FF0000;
    color: white;
    font: bold 19px Arial, sans-serif;
    box-shadow: 0 3px 8px #0005;
    transform: rotate(-45deg);
}

.property-map-pin > span {
    transform: rotate(45deg);
}

.property-map-chooser {
    display: grid;
    gap: 8px;
}

.property-map-chooser button {
    padding: 8px;
    text-align: start;
    cursor: pointer;
}

