.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 0;
    flex-wrap: wrap;
    gap: 12px;
}

.user-info {
    background: var(--brand-soft);
    border: 1px solid #c9e4e0;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--brand-deep);
}

.logout-btn,
.btn-add-object,
.carousel-arrow,
.btn-add-photo-row,
.row-action-btn {
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
}

.logout-btn {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.95rem;
    color: var(--brand);
}

.logout-btn:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
}

.page-heading {
    padding: 28px 0 18px;
}

h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 780;
    color: var(--brand-deep);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.top-ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    margin-bottom: 18px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.street-search {
    flex: 1;
}

.street-search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    min-height: 42px;
    padding: 10px 13px;
}

.street-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(20, 95, 104, 0.12);
}

.table-wrapper {
    overflow-x: auto;
    margin: 0 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: start;
}

.results-column {
    min-width: 0;
}

.ad-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 16px;
}

.ad-slot {
    min-height: 220px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--muted);
    padding: 16px;
}

.ad-slot span {
    display: block;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ad-slot strong {
    color: var(--brand-deep);
    font-size: 1rem;
}

.legacy-table {
    display: none;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    min-width: 1200px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 9px 10px;
    vertical-align: middle;
    line-height: 1.3;
}

.data-table th {
    background: var(--brand);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 750;
    text-align: left;
}

.data-table td {
    background-color: var(--surface);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover td,
.highlight-row td {
    background-color: var(--brand-soft) !important;
}

.photos-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photos-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.photo-item {
    position: relative;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.delete-photo-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder-small {
    width: 58px;
    height: 58px;
    background: var(--surface-soft);
    color: var(--muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    border: 1px dashed var(--line-strong);
}

.btn-add-photo-row {
    align-self: flex-start;
    background: var(--gold);
    color: #1f2f35;
    padding: 4px 9px;
    font-size: 0.7rem;
}

.btn-add-photo-row:hover {
    background: var(--gold-hover);
    color: #fff;
}

.btn-add-photo-row:disabled {
    opacity: 0.45;
    cursor: default;
}

.phone-link,
.badge {
    background: var(--surface-warm);
    border: 1px solid #eadfc9;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    display: inline-block;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--text);
}

.phone-link {
    color: var(--brand);
    font-weight: 700;
}

.description-text {
    max-width: 230px;
    white-space: normal;
    word-break: break-word;
    font-size: 0.86rem;
    color: var(--muted);
}

.cards-container {
    display: flex;
    gap: 0;
    flex-direction: column;
    margin: 0;
    padding: 0 0 20px;
}

.object-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 18px 0;
    box-shadow: none;
    transition: background-color 0.18s ease;
}

.object-card:hover {
    background: var(--surface-soft);
}

.highlight-card {
    background-color: var(--brand-soft);
}

.card-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 6px;
    align-items: baseline;
    color: var(--text);
}

.card-label {
    font-weight: 750;
    color: var(--brand-deep);
    min-width: 112px;
}

.mobile-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.mobile-photo-item {
    position: relative;
    width: 68px;
    height: 68px;
}

.mobile-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.listing-media {
    position: relative;
    min-height: 170px;
}

.listing-main-photo,
.listing-photo-empty {
    width: 100%;
    height: 170px;
    border: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-soft), var(--surface-warm));
}

.listing-main-photo {
    display: block;
    cursor: pointer;
    padding: 0;
}

.listing-main-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.listing-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    font-weight: 700;
}

.listing-photo-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 61, 70, 0.84);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 5px 9px;
    font-size: 0.78rem;
    font-weight: 750;
}

.listing-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.listing-thumb {
    width: 58px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.listing-thumb.active {
    border-color: var(--gold);
}

.listing-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.listing-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 4px 2px;
}

.listing-area {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.listing-content h2 {
    color: var(--brand-deep);
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0 0 12px;
}

.listing-title-link {
    color: inherit;
    text-decoration: none;
}

.listing-title-link:hover {
    color: var(--brand);
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.listing-meta span {
    background: var(--brand-soft);
    border: 1px solid #c9e4e0;
    color: var(--brand-deep);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

.listing-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-request {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
    margin-top: auto;
    padding-top: 14px;
}

.listing-contact a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

.listing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.listing-action-btn,
.listing-action-link {
    display: inline-flex;
    align-items: center;
    background: var(--gold);
    color: #1f2f35;
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
    min-height: 40px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 750;
    text-decoration: none;
}

.listing-action-btn:hover,
.listing-action-link:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    color: #fff;
}

.listing-action-btn.secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--brand);
}

.listing-action-btn.secondary:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
}

.listing-action-btn.danger {
    background: var(--surface);
    border-color: #e7b5b5;
    color: var(--danger);
}

.listing-action-btn.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.listing-action-btn:disabled {
    opacity: 0.52;
    cursor: default;
}

.feed-loader {
    display: none;
    margin: 8px 0 14px;
    padding: 0;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.empty-feed {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    padding: 34px 22px;
    text-align: center;
}

.empty-feed-title {
    color: var(--brand-deep);
    font-size: 1.1rem;
    font-weight: 780;
    margin-bottom: 8px;
}

.empty-feed-text {
    color: var(--muted);
    line-height: 1.5;
}

.carousel-track {
    display: none;
    gap: 10px;
    width: max-content;
}

.carousel-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--line);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.empty-carousel {
    color: var(--muted);
    font-size: 0.86rem;
    padding: 8px 0;
}

.btn-add-object {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    background: var(--gold);
    color: #1f2f35;
    padding: 9px 16px;
    font-size: 1rem;
    box-shadow: 0 10px 20px rgba(212, 154, 42, 0.18);
}

.btn-add-object:hover {
    background: var(--gold-hover);
    color: #fff;
}

.info-status {
    display: none;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 24, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.fullscreen-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-sm);
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 38px;
    cursor: pointer;
}

.owner-badge {
    font-size: 0.76rem;
    background: var(--sky);
    color: var(--brand-deep);
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    display: inline-block;
    font-weight: 700;
}

.row-action-btn {
    padding: 4px 8px;
}

.edit-row-btn {
    margin-left: 8px;
    background: var(--gold);
    color: #1f2f35;
}

.delete-row-btn {
    margin-left: 4px;
    background: var(--danger);
    color: #fff;
}

@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .ad-sidebar {
        display: none;
    }

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

    .listing-media,
    .listing-main-photo,
    .listing-photo-empty {
        min-height: 0;
        height: auto;
    }

    .listing-main-photo,
    .listing-photo-empty {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 560px) {
    .user-bar {
        padding-left: 0;
        padding-right: 0;
    }

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

    .street-search {
        width: 100%;
    }

    .cards-container {
        padding-left: 0;
        padding-right: 0;
    }

    h1 {
        font-size: 1.55rem;
    }

}
