/* Listing market status + transaction / price history
   Light defaults; dark via html[data-theme="dark"] (admin / super-admin theme toggle). */

.ls-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
    line-height: 1.4;
}
.ls-badge-available { background: #ecfdf5; color: #047857; }
.ls-badge-sold { background: #fef2f2; color: #b91c1c; }
.ls-badge-rented { background: #eff6ff; color: #1d4ed8; }

html[data-theme="dark"] .ls-badge-available {
    background: rgba(16, 185, 129, .16);
    color: #34d399;
}
html[data-theme="dark"] .ls-badge-sold {
    background: rgba(244, 63, 94, .16);
    color: #fb7185;
}
html[data-theme="dark"] .ls-badge-rented {
    background: rgba(91, 157, 255, .16);
    color: #7eb0ff;
}

.ls-badge-lg {
    padding: 6px 14px;
    font-size: 13px;
}

/* Public verified listing badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    background: #eff6ff;
    color: #006aff;
    border: 1px solid #bfdbfe;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
    white-space: nowrap;
    vertical-align: middle;
}
.verified-badge i { font-size: 11px; }
.verified-badge-md {
    padding: 5px 12px;
    font-size: 13px;
}
.verified-badge-md i { font-size: 13px; }
.verified-badge-overlay {
    position: absolute;
    top: 12px;
    /* Sit left of the favorite (36px) + compare stack so "Verified" is never clipped */
    right: 56px;
    left: auto;
    z-index: 20;
    padding: 5px 10px;
    background: #006aff;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 106, 255, .35);
    pointer-events: none;
    max-width: calc(100% - 72px);
    overflow: hidden;
    text-overflow: ellipsis;
}
.verified-badge-overlay i { color: #fff; }
.homes-content .verified-badge,
.pd-title-row .verified-badge { margin-left: 8px; }

/* Admin market status panel (edit page) */
.ls-status-panel {
    --ls-bg: #fff;
    --ls-border: #eaeff5;
    --ls-border-soft: #e2e8f0;
    --ls-text: #1e293b;
    --ls-text-2: #64748b;
    --ls-faint: #94a3b8;
    --ls-muted: #cbd5e1;
    --ls-surface-2: #f8fafc;
    --ls-control-bg: #fff;
    --ls-control-border: #e2e8f0;
    --ls-control-text: #334155;
    --ls-accent: #006aff;
    --ls-accent-bg: #eff6ff;
    --ls-sold: #b91c1c;
    --ls-sold-bg: #fef2f2;
    --ls-sold-ring: #fecaca;
    --ls-rented: #1d4ed8;
    --ls-rented-bg: #eff6ff;
    --ls-rented-ring: #bfdbfe;
    --ls-available: #047857;
    --ls-available-bg: #ecfdf5;
    --ls-dot-border: #fff;
    --ls-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");

    background: var(--ls-bg);
    border: 1px solid var(--ls-border);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 24px;
    transition: background-color .25s ease, border-color .25s ease, color .2s ease;
}

html[data-theme="dark"] .ls-status-panel {
    --ls-bg: var(--d-surface, #1b2536);
    --ls-border: var(--d-border, #30405a);
    --ls-border-soft: var(--d-border-soft, #26334a);
    --ls-text: var(--d-text, #e8eef6);
    --ls-text-2: var(--d-text-2, #9fb0c6);
    --ls-faint: var(--d-faint, #728199);
    --ls-muted: #54627a;
    --ls-surface-2: var(--d-surface-2, #222f44);
    --ls-control-bg: var(--d-surface-3, #2a3850);
    --ls-control-border: var(--d-border, #30405a);
    --ls-control-text: var(--d-text-2, #9fb0c6);
    --ls-accent: var(--d-accent, #5b9dff);
    --ls-accent-bg: rgba(91, 157, 255, .14);
    --ls-sold: #fb7185;
    --ls-sold-bg: rgba(244, 63, 94, .16);
    --ls-sold-ring: rgba(251, 113, 133, .4);
    --ls-rented: #7eb0ff;
    --ls-rented-bg: rgba(91, 157, 255, .16);
    --ls-rented-ring: rgba(126, 176, 255, .4);
    --ls-available: #34d399;
    --ls-available-bg: rgba(16, 185, 129, .16);
    --ls-dot-border: var(--d-surface, #1b2536);
    --ls-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239fb0c6'/%3E%3C/svg%3E");
    color-scheme: dark;
}

.ls-status-panel h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ls-text);
    margin: 0 0 6px;
}
.ls-status-panel .ls-status-hint {
    font-size: 13px;
    color: var(--ls-text-2);
    margin: 0 0 18px;
    line-height: 1.45;
}
.ls-status-current {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ls-status-current .ls-current-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ls-text-2);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ls-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ls-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--ls-control-border);
    background: var(--ls-control-bg);
    color: var(--ls-control-text);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.ls-status-btn:hover:not(:disabled) {
    border-color: var(--ls-accent);
    color: var(--ls-accent);
    background: var(--ls-accent-bg);
}
.ls-status-btn:disabled,
.ls-status-btn.is-current {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}
.ls-status-btn-sold:hover:not(:disabled) {
    border-color: var(--ls-sold);
    color: var(--ls-sold);
    background: var(--ls-sold-bg);
}
.ls-status-btn-rented:hover:not(:disabled) {
    border-color: var(--ls-rented);
    color: var(--ls-rented);
    background: var(--ls-rented-bg);
}
.ls-status-btn-available:hover:not(:disabled) {
    border-color: var(--ls-available);
    color: var(--ls-available);
    background: var(--ls-available-bg);
}

/* Filter chips (admin lists) */
.ls-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.ls-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: background .12s, border-color .12s, color .12s;
}
.ls-filter-chip:hover {
    border-color: #006aff;
    color: #006aff;
}
.ls-filter-chip.is-active {
    background: #006aff;
    border-color: #006aff;
    color: #fff !important;
}
.ls-filter-chip .ls-filter-count {
    font-variant-numeric: tabular-nums;
    opacity: .85;
}

html[data-theme="dark"] .ls-filter-chip {
    color: var(--d-text-2, #9fb0c6);
    background: var(--d-surface-3, #2a3850);
    border-color: var(--d-border, #30405a);
}
html[data-theme="dark"] .ls-filter-chip:hover {
    border-color: var(--d-accent, #5b9dff);
    color: var(--d-accent, #5b9dff);
}
html[data-theme="dark"] .ls-filter-chip.is-active {
    background: var(--d-accent, #5b9dff);
    border-color: var(--d-accent, #5b9dff);
    color: #fff !important;
}

/* Quick status select in table */
.ls-quick-form {
    display: inline-block;
    margin: 0;
}
.ls-quick-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 5px 28px 5px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 10px center;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    min-width: 110px;
}
.ls-quick-select:focus {
    outline: 2px solid #006aff;
    outline-offset: 1px;
}

html[data-theme="dark"] .ls-quick-select {
    border-color: var(--d-border, #30405a);
    background: var(--d-surface-3, #2a3850) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239fb0c6'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--d-text-2, #9fb0c6);
}
html[data-theme="dark"] .ls-quick-select:focus {
    outline-color: var(--d-accent, #5b9dff);
}

/* Transaction / price history timeline
   Tokens come from .ls-status-panel / .ls-public-history ancestors. */
.ls-history {
    margin-top: 8px;
}

.ls-history-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ls-history-header h3,
.ls-history-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ls-text);
    margin: 0;
}
.ls-history-sub {
    font-size: 13px;
    color: var(--ls-text-2);
    margin: 4px 0 0;
}
.ls-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
.ls-timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--ls-border-soft);
}
.ls-timeline-item {
    position: relative;
    padding: 0 0 20px 36px;
}
.ls-timeline-item:last-child {
    padding-bottom: 0;
}
.ls-timeline-dot {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--ls-dot-border);
    box-shadow: 0 0 0 2px var(--ls-border-soft);
    background: var(--ls-faint);
}
.ls-timeline-item.is-sold .ls-timeline-dot {
    background: var(--ls-sold);
    box-shadow: 0 0 0 2px var(--ls-sold-ring);
}
.ls-timeline-item.is-rented .ls-timeline-dot {
    background: var(--ls-rented);
    box-shadow: 0 0 0 2px var(--ls-rented-ring);
}
.ls-timeline-card {
    background: var(--ls-surface-2);
    border: 1px solid var(--ls-border);
    border-radius: 10px;
    padding: 12px 14px;
}
.ls-timeline-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.ls-timeline-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--ls-text-2);
}
.ls-timeline-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ls-text);
    font-variant-numeric: tabular-nums;
}
.ls-timeline-type {
    font-size: 12px;
    color: var(--ls-faint);
    margin-top: 2px;
}
.ls-history-empty {
    text-align: center;
    padding: 28px 16px;
    background: var(--ls-surface-2);
    border: 1px dashed var(--ls-border-soft);
    border-radius: 10px;
    color: var(--ls-faint);
    font-size: 14px;
}
.ls-history-empty i {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--ls-muted);
}

/* Public detail banner for sold/rented */
.ls-market-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.ls-market-banner-sold {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}
.ls-market-banner-rented {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}
.ls-market-banner-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}
.ls-market-banner strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}
.ls-market-banner p {
    margin: 0;
    font-size: 13px;
    opacity: .9;
    line-height: 1.4;
}

html[data-theme="dark"] .ls-market-banner-sold {
    background: rgba(244, 63, 94, .14);
    border-color: rgba(251, 113, 133, .35);
    color: #fda4af;
}
html[data-theme="dark"] .ls-market-banner-rented {
    background: rgba(91, 157, 255, .14);
    border-color: rgba(126, 176, 255, .35);
    color: #bfdbfe;
}

/* Public history section card */
.ls-public-history {
    --ls-bg: #fff;
    --ls-border: #eaeff5;
    --ls-border-soft: #e2e8f0;
    --ls-text: #1e293b;
    --ls-text-2: #64748b;
    --ls-faint: #94a3b8;
    --ls-muted: #cbd5e1;
    --ls-surface-2: #f8fafc;
    --ls-sold: #b91c1c;
    --ls-sold-ring: #fecaca;
    --ls-rented: #1d4ed8;
    --ls-rented-ring: #bfdbfe;
    --ls-dot-border: #fff;

    background: var(--ls-bg);
    border: 1px solid var(--ls-border);
    border-radius: 12px;
    padding: 22px 24px;
    margin: 24px 0;
}

html[data-theme="dark"] .ls-public-history {
    --ls-bg: var(--d-surface, #1b2536);
    --ls-border: var(--d-border, #30405a);
    --ls-border-soft: var(--d-border-soft, #26334a);
    --ls-text: var(--d-text, #e8eef6);
    --ls-text-2: var(--d-text-2, #9fb0c6);
    --ls-faint: var(--d-faint, #728199);
    --ls-muted: #54627a;
    --ls-surface-2: var(--d-surface-2, #222f44);
    --ls-sold: #fb7185;
    --ls-sold-ring: rgba(251, 113, 133, .4);
    --ls-rented: #7eb0ff;
    --ls-rented-ring: rgba(126, 176, 255, .4);
    --ls-dot-border: var(--d-surface, #1b2536);
}

/* Beat admin-main h3 light-text override when panels are still light-themed tokens */
html[data-theme="dark"] .ls-status-panel h3,
html[data-theme="dark"] .ls-history-header h3,
html[data-theme="dark"] .ls-history-header h4 {
    color: var(--ls-text) !important;
}

@media (max-width: 767px) {
    .ls-status-panel { padding: 16px; }
    .ls-status-actions { flex-direction: column; }
    .ls-status-btn { width: 100%; justify-content: center; }
    .ls-public-history { padding: 16px; }
}
