* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1867C0;
    --secondary-color: #48A9A6;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --light-bg: #F5F6F9;
    --dark-text: #1e293b;
    --text-muted: #64748b;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --dashboard-topbar-height: 88px;
    --map-hub-detail-width: 60vw;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.0625rem;
    --leading-tight: 1.25;
    --leading-normal: 1.55;
    --leading-relaxed: 1.65;
    --tracking-tight: -0.02em;
    --tracking-normal: -0.011em;
    --tracking-wide: 0.04em;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 400;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: #0f172a;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: inherit;
}

button {
    font-weight: 500;
}

label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
}

::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.dashboard-shell {
    display: block;
    height: 100vh;
    overflow: hidden;
}

.dashboard-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.dashboard-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.topbar-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
}

.topbar-nav-link:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.topbar-nav-link.is-active {
    background: #e8f2ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.topbar-left h1 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: #0f172a;
}

.topbar-search {
    display: flex;
    gap: 10px;
    min-width: min(640px, 68vw);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
}

.profile-menu-wrap {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f9fd;
    border: 1px solid #e6ebf4;
    border-radius: 12px;
    padding: 6px 12px 6px 6px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    max-width: 220px;
}

.profile-trigger:hover,
.profile-trigger[aria-expanded="true"] {
    border-color: #c7d2e8;
    background: #f0f4fb;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4f46e5, #6366f1);
    color: #fff;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 14px;
}

.profile-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
    text-align: left;
}

.profile-trigger-email {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-trigger-role {
    font-size: 11px;
    color: #64748b;
}

.profile-chevron {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 2px;
    flex-shrink: 0;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    padding: 8px 0;
    z-index: 1200;
}

.profile-dropdown-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 14px 12px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.profile-dropdown-identity:hover,
.profile-dropdown-identity:focus-visible {
    background: #f8fafc;
    outline: none;
}

.profile-dropdown-identity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4f46e5, #6366f1);
    color: #fff;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.profile-dropdown-identity-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-dropdown-email {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}

.profile-dropdown-role {
    font-size: 11px;
    color: #64748b;
}

.profile-dropdown-sep {
    border: none;
    border-top: 1px solid #eef2f7;
    margin: 6px 0;
}

.profile-dropdown-item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 14px;
    text-align: left;
    font: inherit;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.profile-dropdown-item:hover,
.profile-dropdown-item:focus-visible {
    background: #f8fafc;
    color: #1e293b;
    outline: none;
}

.profile-dropdown-logout {
    color: #dc2626;
}

.profile-dropdown-logout:hover,
.profile-dropdown-logout:focus-visible {
    background: #fef2f2;
    color: #b91c1c;
}

.settings-content {
    overflow: auto;
    background: var(--light-bg);
}

.settings-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.settings-hero {
    background: linear-gradient(135deg, #1867C0 0%, #48A9A6 100%);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.settings-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 45%);
    pointer-events: none;
}

.settings-hero-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 14px;
    padding: 24px 20px;
    max-width: 280px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.settings-hero-avatar,
.settings-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto;
    background: linear-gradient(145deg, #4f46e5, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: 28px;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.settings-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 24px;
    margin: 0;
    flex-shrink: 0;
}

.settings-hero-name {
    margin: 14px 0 4px;
    font-size: 18px;
    color: #1e293b;
}

.settings-hero-role {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.settings-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

.settings-hero-stat strong {
    display: block;
    font-size: 20px;
    color: var(--primary-color);
    line-height: 1.2;
}

.settings-hero-stat span {
    font-size: 12px;
    color: #64748b;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.settings-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.settings-card-title {
    margin: 0 0 14px;
    font-size: 16px;
    color: #1e293b;
}

.settings-card-desc {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
}

.settings-avatar-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.settings-meta-line {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.45;
}

.settings-meta-line span.text-muted {
    display: inline-block;
    min-width: 72px;
}

.settings-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.settings-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}

.settings-toggle-row:last-of-type {
    border-bottom: none;
}

.settings-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
}

.settings-session-card,
.settings-admin-tools {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

.settings-session-card h5,
.settings-admin-tools h5 {
    margin: 0 0 8px;
    font-size: 14px;
}

.settings-session-card p {
    margin: 0 0 12px;
}

.settings-about {
    grid-column: 1 / -1;
}

.profile-dropdown-subscription {
    padding: 10px 14px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

.profile-dropdown-subscription-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.profile-dropdown-plan-usage {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.profile-dropdown-usage-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #475569;
}

.profile-dropdown-subscription-meta {
    margin: 0;
    font-size: 11px;
    color: #64748b;
}

.admin-ops-user-views-panel {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e8edf3;
}

.admin-ops-user-views-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-ops-user-views-header h5 {
    margin: 0;
    font-size: 14px;
}

.admin-ops-users-table td,
.admin-ops-users-table th {
    white-space: nowrap;
}

.admin-ops-users-table td:nth-child(2),
.admin-ops-users-table th:nth-child(2) {
    white-space: normal;
}

.settings-plan-usage {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 14px 0;
}

.settings-plan-usage-row {
    display: grid;
    gap: 4px;
}

.settings-plan-usage-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
}

.settings-plan-usage-bar {
    height: 6px;
    border-radius: 999px;
    background: #e8edf3;
    overflow: hidden;
}

.settings-plan-usage-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary-color);
    max-width: 100%;
}

.settings-plan-usage-bar.is-full > span {
    background: #c2410c;
}

.settings-plan-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.settings-plan-feature {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.settings-plan-feature.is-on {
    background: #eef4ff;
    color: var(--primary-color);
}

.settings-plan-reset {
    margin-top: 4px;
}

.plan-limit-notice {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #fcd9b8;
    background: #fff8f0;
    margin: 0;
}

.plan-limit-notice-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #9a3412;
}

.plan-limit-notice p {
    margin: 0 0 6px;
    font-size: 13px;
    color: #7c2d12;
}

.plan-limit-notice-hint {
    font-size: 12px;
    color: #9a3412;
}

.settings-version {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    color: #334155;
    letter-spacing: 0.02em;
}

.admin-ops-content {
    overflow: auto;
    background: var(--light-bg);
}

.admin-ops-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.admin-ops-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-ops-header h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.admin-ops-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.admin-ops-stat-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    border-top: 3px solid #1867C0;
}

.admin-ops-stat-card--olx {
    border-top-color: #0f766e;
}

.admin-ops-stat-card h4 {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.admin-ops-stat-value {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}

.admin-ops-stat-sub {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: #64748b;
}

.admin-ops-invites {
    margin-bottom: 28px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
}

.admin-ops-invite-generate {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.admin-ops-invite-note {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.admin-ops-last-code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 14px;
    color: #166534;
}

.admin-ops-last-code code.invite-code {
    font-size: 18px;
    letter-spacing: 3px;
}

.admin-ops-invites-table code.invite-code {
    user-select: all;
}

.admin-ops-rcn {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e8edf5;
}

.admin-ops-rcn-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-ops-rcn-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 14px 0;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e8edf5;
    border-radius: 12px;
}

.admin-ops-rcn-standard-fields {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-ops-rcn-hint {
    margin: -6px 0 12px;
    line-height: 1.45;
}

.admin-ops-rcn-setting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.admin-ops-rcn-num {
    width: 4.5rem;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.admin-ops-rcn-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-ops-rcn-search {
    flex: 1 1 220px;
    max-width: 360px;
}

.admin-ops-rcn-table-wrap {
    max-height: 420px;
    overflow: auto;
}

.rcn-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rcn-status--ok { background: #dcfce7; color: #166534; }
.rcn-status--running { background: #dbeafe; color: #1d4ed8; }
.rcn-status--err { background: #fee2e2; color: #991b1b; }
.rcn-status--warn { background: #fef3c7; color: #92400e; }
.rcn-status--idle { background: #f1f5f9; color: #64748b; }

.rcn-row-error {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #b91c1c;
}

.place-picker {
    position: relative;
}

.place-picker-label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.place-picker-input {
    width: 100%;
}

.place-suggestions {
    position: absolute;
    z-index: 1200;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 240px;
    overflow: auto;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.place-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.place-suggestion-item:hover,
.place-suggestion-item.is-active {
    background: #eff6ff;
}

.place-suggestion-title {
    font-weight: 600;
    font-size: var(--text-sm);
    color: #0f172a;
    letter-spacing: var(--tracking-normal);
}

.place-suggestion-meta {
    margin-top: 2px;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.place-selected-pill {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: var(--text-xs);
    font-weight: 600;
}

.place-selected-pill button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.place-radius-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alerts-place-picker,
.alerts-court-picker {
    grid-column: 1 / -1;
}

.court-picker .place-suggestion-meta {
    display: none;
}
.alerts-filters-panel .place-radius-row {
    margin-bottom: 10px;
}

.admin-ops-scrapers h3 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.admin-ops-scraper-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-ops-scraper-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-ops-scraper-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-ops-scraper-head h4 {
    margin: 0;
    font-size: 1rem;
}

.admin-ops-scraper-option {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-ops-scraper-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-ops-scraper-option-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

@media (max-width: 768px) {
    .admin-ops-stats-grid,
    .admin-ops-scraper-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .settings-page {
        padding: 16px;
    }

    .settings-avatar-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .settings-meta-line span.text-muted {
        min-width: 0;
        display: block;
    }
}

/* Breadcrumb (tryb szczegółów) */
.topbar-breadcrumb-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.breadcrumb-sep {
    color: #b0bcd4;
    font-size: 16px;
}

.breadcrumb-title {
    font-size: 15px;
    font-weight: 600;
    color: #22314d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

.dashboard-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.main-content {
    max-width: 100%;
}

/* ===== ADMIN PANEL ===== */
.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 960px;
}

.admin-cards-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.admin-cards-row .admin-card {
    flex: 1;
    min-width: 240px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #f7f9fd;
}

.admin-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #22314d;
}

.admin-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-card-desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.alerts-panel {
    max-width: 1200px;
}

.alerts-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.alerts-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
}

.alerts-list-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.alerts-list-item:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.alerts-list-item.is-active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.alerts-list-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.alerts-list-item-meta {
    font-size: 12px;
    color: #64748b;
}

.alerts-list-item-badge {
    align-self: flex-start;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.alerts-list-item-badge.is-on {
    background: #dcfce7;
    color: #166534;
}

.alerts-list-item-badge.is-off {
    background: #fee2e2;
    color: #991b1b;
}

.alerts-filters-panel {
    margin-top: 4px;
}

.alerts-name-input {
    max-width: 420px;
}

.alerts-enabled-toggle,
.alerts-channel-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.alerts-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.btn-danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

.btn-danger:hover {
    background: #fee2e2;
}

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

.olx-offers-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.filters-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0 8px;
}

.filters-panel .court-picker {
    grid-column: span 2;
}

.filters-panel .court-picker + .place-selected-pill {
    grid-column: span 2;
    margin-top: -2px;
}

.filters-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.dashboard-content.map-hub-content {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.map-hub-layout {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
    flex: 1;
    min-height: 0;
    height: 100%;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-hub-content.map-hub-drawer-open .map-hub-layout {
    /* lista (ukryta) = szerokość szuflady; mapa = reszta ekranu */
    grid-template-columns: var(--map-hub-detail-width) minmax(0, 1fr);
}

.map-hub-content.map-hub-drawer-open .map-hub-list-panel {
    overflow: hidden;
    visibility: hidden;
    border-right: none;
    min-width: 0;
    padding: 0;
    pointer-events: none;
}

.map-hub-content.map-hub-drawer-open .map-hub-map-panel {
    width: auto;
    max-width: none;
}

.map-hub-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--border-color);
    background: #fff;
}

.map-hub-list-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.map-hub-list-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.map-hub-list-status {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.map-hub-list-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.listing-sort-menu {
    position: relative;
    flex-shrink: 0;
}

.listing-sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.listing-sort-trigger:hover {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.listing-sort-trigger:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 103, 192, 0.12);
}

.listing-sort-trigger[aria-expanded="true"] {
    border-color: #cbd5e1;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.listing-sort-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.listing-sort-trigger[aria-expanded="true"] .listing-sort-trigger-icon {
    color: var(--primary-color);
}

.listing-sort-chevron {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #94a3b8;
    margin-left: 1px;
    transition: transform 0.15s ease;
}

.listing-sort-trigger[aria-expanded="true"] .listing-sort-chevron {
    transform: rotate(180deg);
    border-top-color: #64748b;
}

.listing-sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 120;
    min-width: 15.5rem;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.listing-sort-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: var(--text-sm);
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.listing-sort-option:hover,
.listing-sort-option:focus-visible {
    outline: none;
    background: #f1f5f9;
    color: #0f172a;
}

.listing-sort-option.is-active {
    color: var(--primary-color);
    background: #eff6ff;
    font-weight: 600;
}

.controls .listing-sort-trigger {
    padding: 8px 12px 8px 10px;
    font-size: var(--text-sm);
}

.map-hub-list-toolbar .map-hub-favorites-quick {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    box-shadow: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.map-hub-list-toolbar .map-hub-favorites-quick:hover {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.map-hub-favorites-quick.is-active {
    color: #b45309;
    border-color: #fbbf24;
    background: #fffbeb;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.16);
}

.map-hub-list-header h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.map-hub-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.map-hub-list-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    min-height: 140px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.map-hub-list-state-text {
    line-height: 1.4;
}

.map-hub-list-loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: map-hub-list-spin 0.7s linear infinite;
}

@keyframes map-hub-list-spin {
    to { transform: rotate(360deg); }
}

.map-hub-list-item {
    display: flex;
    gap: 12px;
    align-items: stretch;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 42px 10px 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 0;
}

.map-hub-list-item-thumb {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}

.map-hub-list-item-thumb--placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.map-hub-list-item-thumb--pending {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-size: 200% 100%;
    animation: map-hub-thumb-shimmer 1.2s ease-in-out infinite;
}

@keyframes map-hub-thumb-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.map-hub-list-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.map-hub-list-item:hover {
    border-color: #93c5fd;
}

.map-hub-list-item.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
    background: #f8fafc;
}

.map-hub-list-item-title {
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-normal);
    color: #0f172a;
    line-height: 1.4;
}

.map-hub-list-item-meta {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
}

.map-hub-list-item-price {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: #0f172a;
}

.map-hub-archived-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #fef3c7;
    color: #92400e;
    vertical-align: middle;
}

.map-hub-ended-badge {
    background: #fee2e2;
    color: #991b1b;
}

.map-hub-share-badge {
    background: #dbeafe;
    color: #1e40af;
}

.map-hub-list-item-meta {
    line-height: 1.4;
}

.map-hub-list-item-price {
    line-height: 1.3;
    margin-top: 2px;
}

.map-hub-list-item-location {
    margin-top: 0;
}

.map-hub-map-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    background: #f8fafc;
    position: relative;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-hub-map-stage {
    position: relative;
    flex: 1 1 0;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

.map-hub-map-stage .leaflet-container {
    z-index: 1;
}

/* RCN: pane nad markerPane (600), pod tooltipPane */
.leaflet-pane.leaflet-rcn-pane path.leaflet-interactive {
    stroke-width: 3px;
    stroke-opacity: 1;
}

.map-hub-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.map-hub-filters-bar .search-input {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
}

.map-overview-filters,
.map-hub-map-style-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.map-hub-map-style.is-active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
}

.map-overview-filter.is-active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
}

.map-hub-rcn-toggle.is-active {
    background: #c2410c;
    border-color: #9a3412;
    color: #fff;
}

.map-hub-rcn-status {
    flex: 1 1 100%;
    min-width: 200px;
}

.map-hub-rcn-status.is-visible {
    display: block;
    padding: 6px 10px;
    margin-top: 4px;
    border-radius: 6px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.map-hub-rcn-status.is-visible.error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.map-overview-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #64748b;
    padding: 6px 12px;
    flex-shrink: 0;
}

.map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.map-legend-dot--komornik {
    background: #2563eb;
}

.map-legend-dot--olx {
    background: #16a34a;
}

.map-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.map-legend-swatch--rcn-priced {
    background: rgba(249, 115, 22, 0.45);
    border-color: #c2410c;
}

.map-legend-swatch--rcn-noprice {
    background: rgba(148, 163, 184, 0.4);
    border-color: #64748b;
}

.rcn-map-popup h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.rcn-map-popup-meta {
    font-size: 0.85rem;
    line-height: 1.45;
}

.listings-map-container {
    flex: 1 1 0;
    min-height: 280px;
    border: none;
    border-radius: 0;
}

#listingsMap.leaflet-container {
    height: 100%;
    width: 100%;
    min-height: 400px;
}

.topbar-subtitle {
    margin: 2px 0 0;
}

.map-hub-drawer-backdrop {
    position: fixed;
    top: var(--dashboard-topbar-height);
    left: var(--map-hub-detail-width, 60vw);
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.28s ease;
}

.map-hub-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.map-hub-detail-drawer {
    position: fixed;
    top: var(--dashboard-topbar-height);
    left: 0;
    bottom: 0;
    width: var(--map-hub-detail-width, 60vw);
    max-width: var(--map-hub-detail-width, 60vw);
    background: #fff;
    z-index: 1110;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    transform: translate3d(-100%, 0, 0);
    pointer-events: none;
    visibility: hidden;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, visibility 0s linear 0.3s;
}

.map-hub-detail-drawer.is-open {
    transform: translate3d(0, 0, 0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, visibility 0s;
}

.map-hub-detail-drawer.is-fullscreen {
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 12000;
    box-shadow: none;
    transform: translate3d(0, 0, 0);
}

.map-hub-drawer-fullscreen-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

body.map-hub-drawer-fullscreen-open {
    overflow: hidden;
}

.map-hub-drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: #fff;
}

.map-hub-drawer-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #475569;
}

.map-hub-drawer-close:hover {
    background: #f1f5f9;
}

.map-hub-drawer-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-hub-drawer-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    width: 100%;
    min-width: 0;
}

.map-hub-drawer-body #detailsContent {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

.map-hub-drawer-body .detail-card {
    border: none;
    box-shadow: none;
    margin: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.map-hub-drawer-body #detailsContent .detail-card {
    max-width: none;
    width: 100%;
}

.map-hub-drawer-body #detailsContent .detail-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.map-hub-drawer-body #detailsContent .rcn-summary-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.map-hub-drawer-body #detailsContent .offer-opinion-header,
.map-hub-drawer-body #detailsContent .offer-opinion-actions,
.map-hub-drawer-body #detailsContent .rcn-filter-row {
    flex-wrap: wrap;
}

.map-hub-drawer-body #detailsContent .auction-map-section,
.map-hub-drawer-body #detailsContent .auction-gallery-section,
.map-hub-drawer-body #detailsContent .detail-analytics-stack,
.map-hub-drawer-body #detailsContent .detail-collapsible,
.map-hub-drawer-body #detailsContent .detail-section,
.map-hub-drawer-body #detailsContent .description-section {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.map-hub-drawer-body #detailsContent .rcn-table-wrap {
    width: 100%;
    max-width: none;
}

.map-hub-drawer-body #detailsContent .rcn-transactions-table {
    width: 100%;
}

.map-hub-drawer-body #detailsContent .auction-map-container {
    width: 100%;
    max-width: none;
    height: min(42vh, 480px);
}

.map-hub-drawer-body #auctionMap.leaflet-container,
.map-hub-drawer-body #olxAuctionMap.leaflet-container {
    width: 100%;
    height: min(42vh, 480px);
}

.listing-map-marker-icon {
    background: transparent;
    border: none;
}

.listing-map-marker-icon span {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.listing-map-popup {
    min-width: 200px;
    max-width: 280px;
    line-height: 1.4;
}

.listing-map-popup h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.listing-map-popup-meta {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 8px;
}

.listing-map-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.map-hub-side-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.map-hub-side-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.map-hub-side-tab:hover {
    color: var(--primary-color);
}

.map-hub-side-tab.is-active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #fff;
}

.map-hub-side-tab-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.map-hub-side-tab-panel.is-active {
    display: flex;
}

.map-hub-nieruchomosci-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.map-hub-nieruchomosci-pane,
.map-hub-okazje-pane,
.map-hub-okazje-detail-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.map-hub-nieruchomosci-filters-pane {
    display: none;
    flex-direction: column;
    position: absolute;
    inset: 0;
    z-index: 5;
    background: #fff;
    overflow: hidden;
}

.map-hub-nieruchomosci-filters-pane.is-open {
    display: flex;
}

.map-hub-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-hub-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.map-hub-filters-drawer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: #fff;
}

.map-hub-filters-drawer-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #334155;
}

.map-hub-nieruchomosci-filters-pane .map-hub-filters-panel {
    flex: 1;
    min-height: 0;
}

.map-hub-content--okazje-tab .map-hub-layout {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
}

.map-hub-map-panel--okazje .map-hub-filters-bar .map-hub-rcn-toggle,
.map-hub-map-panel--okazje .map-hub-filters-bar #mapOverviewRefreshBtn {
    display: none;
}

.map-legend-dot--okazje {
    background: #9333ea;
}

.map-hub-map-panel [hidden],
.map-hub-list-panel [hidden] {
    display: none !important;
}

.map-hub-okazje-map-placeholder.is-visible {
    display: flex;
}

.map-hub-okazje-map-placeholder {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.map-hub-okazje-map-placeholder-inner {
    max-width: 420px;
    text-align: center;
}

.map-hub-okazje-map-detail {
    text-align: left;
    max-width: 520px;
}

.map-hub-okazje-intro {
    padding: 10px 12px 0;
    flex-shrink: 0;
}

.map-hub-okazje-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.map-hub-okazje-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.map-hub-okazje-status {
    padding: 6px 12px 0;
    flex-shrink: 0;
}

.map-hub-okazje-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
}

.map-hub-okazje-item {
    margin-bottom: 8px;
}

.map-hub-okazje-item-btn {
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.map-hub-okazje-item-btn:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.map-hub-okazje-item-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.map-hub-okazje-item-meta {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 2px;
}

.map-hub-okazje-item-price {
    font-weight: 600;
    color: #1d4ed8;
    font-size: 0.86rem;
    margin: 4px 0;
}

.map-hub-okazje-item-summary {
    font-size: 0.82rem;
    color: #475569;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.map-hub-okazje-item-footer {
    margin-top: 6px;
}

.map-hub-okazje-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.map-hub-okazje-detail {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 16px;
}

.map-hub-okazje-detail-card {
    margin-top: 8px;
}

.map-hub-okazje-detail-title {
    font-size: 1.05rem;
    margin: 0 0 8px;
}

.map-hub-okazje-only-available {
    font-size: 0.82rem;
    align-self: center;
}

.map-hub-filters-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 28%);
}

.mf-panel {
    position: relative;
}

.mf-sections {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 10px 6px;
}

.mf-section {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.mf-section[open] {
    border-color: #d7e5f7;
}

.mf-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.mf-section-head::-webkit-details-marker {
    display: none;
}

.mf-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #334155;
}

.mf-section-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.mf-section[open] .mf-section-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.mf-section-body {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mf-label,
.mf-range-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.mf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mf-control {
    width: 100%;
    margin: 0 !important;
    border-radius: 10px !important;
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    font-size: var(--text-sm) !important;
    font-weight: 500;
}

.mf-control:focus {
    border-color: var(--primary-color) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(24, 103, 192, 0.12) !important;
}

.mf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mf-chips--wrap {
    margin-bottom: 2px;
}

.mf-chip {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.mf-chip:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.mf-chip.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #1867C0, #2f8fd6);
    box-shadow: 0 4px 12px rgba(24, 103, 192, 0.28);
}

.mf-chip--komornik.is-active {
    background: linear-gradient(135deg, #b45309, #d97706);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}

.mf-chip--olx.is-active {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.28);
}

.mf-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e8edf5;
    cursor: pointer;
}

.mf-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mf-toggle-track {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.mf-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s;
}

.mf-toggle input:checked + .mf-toggle-track {
    background: var(--primary-color);
}

.mf-toggle input:checked + .mf-toggle-track::after {
    transform: translateX(16px);
}

.mf-toggle-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
}

.mf-range-block + .mf-range-block {
    margin-top: 2px;
}

.mf-range-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.mf-range-grid--date {
    grid-template-columns: 1fr auto 1fr;
}

.mf-range-sep {
    color: #94a3b8;
    font-size: 0.85rem;
}

.mf-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mf-footer {
    flex-shrink: 0;
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 24%);
    border-top: 1px solid #eef2f7;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.04);
}

.mf-apply-btn {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.mf-reset-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.mf-reset-btn:hover {
    background: #f8fafc;
    color: #334155;
}

.map-hub-alerts-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.map-hub-alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 12px 8px;
    flex-shrink: 0;
}

.map-hub-alerts-header p {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.map-hub-alerts-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.map-hub-alerts-full-btn {
    flex-shrink: 0;
    margin: 8px 12px 12px;
    width: calc(100% - 24px);
}

.map-hub-filters-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-hub-filters-actions .btn {
    width: 100%;
}

#parcelFinderView {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* pf-view jest bezpośrednim dzieckiem dashboard-main, zastępuje dashboard-content */
.pf-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
}

/* ── Szukacz działek – layout ───────────────────────────────────────── */

.pf-primary-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.pf-primary-slot > .pf-col--list {
    flex: 1;
    min-height: 0;
}

.pf-maps-area {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.pf-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.pf-details-drawer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    pointer-events: none;
}

.pf-view.is-details-open .pf-details-drawer {
    transform: translateX(0);
    pointer-events: auto;
}

.pf-details-header {
    flex-shrink: 0;
    padding: 10px 10px 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.pf-details-header .btn-back {
    margin-bottom: 10px;
}

.pf-header {
    flex-shrink: 0;
    padding: 10px 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.pf-header h2 {
    margin: 0 0 4px;
    font-size: 15px;
}

.pf-status {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
}

.pf-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

.pf-details-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}

.pf-col--map {
    padding: 8px;
    overflow: hidden;
}

.pf-map-label {
    flex-shrink: 0;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.pf-map-canvas {
    flex: 1;
    min-height: 180px;
    width: 100%;
}

.pf-map-controls {
    flex-shrink: 0;
    margin-top: 8px;
}

.parcel-finder-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
}

.parcel-finder-filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.parcel-finder-filters-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.parcel-finder-list-status {
    margin: 0;
    padding: 10px 10px 0;
    flex-shrink: 0;
}

.parcel-finder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.parcel-finder-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    background: #fff;
}

.parcel-finder-item.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.parcel-finder-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.parcel-finder-item-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.parcel-finder-offer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.5rem 0 0.75rem;
}

.olx-offer-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.olx-offer-top-actions {
    margin: 0.5rem 0 1rem;
}

.parcel-finder-col {
    min-width: 0;
    min-height: 0;
}

.parcel-finder-map-col,
.parcel-finder-satellite-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    overflow: hidden;
}

.parcel-finder-map-canvas {
    flex: 1;
    min-height: 180px;
    width: 100%;
}

.parcel-finder-map-controls {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
    max-height: 42%;
    overflow-y: auto;
}

.parcel-finder-map-controls .parcel-finder-review-box {
    margin-bottom: 12px;
}

.parcel-finder-map-controls .parcel-finder-street-search {
    margin-top: 0;
}

.parcel-finder-street-search {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.parcel-finder-street-search .search-input {
    margin-bottom: 0;
}

.parcel-finder-number-search {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    margin-bottom: 8px;
}

.parcel-finder-number-search .search-input {
    margin-bottom: 0;
}

.parcel-finder-number-search .btn {
    font-size: 12px;
    padding: 6px 8px;
    white-space: nowrap;
}

#parcelFinderNumberStatus {
    margin-bottom: 8px;
}

.parcel-finder-area-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.parcel-finder-area-filter .btn {
    font-size: 12px;
    padding: 6px 8px;
}

.parcel-finder-area-filter .search-input {
    margin-bottom: 0;
}

#parcelFinderAreaStatus {
    margin-bottom: 8px;
}

#parcelFinderClickStatus {
    margin-bottom: 0.35rem;
}

#parcelFinderClickStatus.is-highlight {
    color: #b45309;
    font-weight: 600;
}

.parcel-finder-selection-panel {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid #ca8a04;
    border-radius: 8px;
    background: #fffbeb;
}

.parcel-finder-selection-details {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.parcel-finder-selection-details strong {
    display: inline-block;
    min-width: 11rem;
}

#parcelFinderStreetStatus {
    margin-bottom: 8px;
}

#parcelFinderAuctionDetails {
    max-width: 100%;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0 10px 10px;
}

.parcel-finder-pick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.parcel-finder-selection-item {
    padding: 8px 0;
    border-bottom: 1px solid #fde68a;
}

.parcel-finder-selection-item:last-child {
    border-bottom: none;
}

#parcelFinderPickBtn.is-active {
    background: #ca8a04;
    border-color: #a16207;
    color: #fff;
}

#parcelFinderMap.parcel-finder-map--pick,
#parcelFinderSatelliteMap.parcel-finder-map--pick {
    cursor: crosshair;
}

#parcelFinderMap.leaflet-container,
#parcelFinderSatelliteMap.leaflet-container {
    height: 100%;
    min-height: 180px;
}

@media (max-width: 1200px) {
    .map-hub-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(200px, 32vh) 1fr;
    }

    .map-hub-list-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.olx-offer-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.olx-offer-card.is-favorite {
    border-color: #fbbf24;
    box-shadow: inset 0 0 0 1px #fde68a;
}

.olx-offer-card-top {
    position: relative;
}

.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}

.favorite-btn--labeled {
    width: auto;
    min-width: 32px;
    height: 34px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

.favorite-btn-label {
    font-size: 12px;
    line-height: 1;
}

.favorite-btn:hover {
    transform: scale(1.03);
    color: #d97706;
    border-color: #fbbf24;
    background: #fffbeb;
}

.favorite-btn.is-active {
    color: #d97706;
    border-color: #fbbf24;
    background: #fffbeb;
}

.map-hub-drawer-favorite {
    flex-shrink: 0;
}

.map-hub-list-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.olx-offer-card-top .favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.map-hub-list-item.is-favorite {
    border-color: #fbbf24;
    background: #fffbeb;
}


.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.detail-title-row h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.olx-offer-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #f1f5f9;
}

.olx-offer-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.olx-offer-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.olx-offer-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.olx-offer-meta {
    font-size: 12px;
    color: #64748b;
}

.offer-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f2ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
}

.offer-badge--developer {
    display: inline-block;
    margin: 0.35rem 0 0.75rem;
    padding: 0.35rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.listing-review-hint {
    margin: 0 0 0.65rem;
    line-height: 1.45;
}

.listing-review-skip-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.listing-review-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    line-height: 1.4;
    padding: 0.35rem 0;
}

.listing-review-radio input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.listing-review-toggle,
.developer-offer-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.listing-review-toggle input,
.developer-offer-toggle input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.listing-review-panel .listing-review-status.error,
.developer-offer-panel .developer-offer-status.error {
    color: #b91c1c;
}

.parcel-finder-map-controls > .parcel-finder-review-box:first-child,
.parcel-finder-review-box,
.parcel-finder-developer-offer-box {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
}

.parcel-finder-review-box .listing-review-panel,
.parcel-finder-developer-offer-box .developer-offer-panel {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.parcel-finder-review-box .listing-review-panel h4,
.parcel-finder-developer-offer-box .developer-offer-panel h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}


.offer-source-badge--komornik {
    background: #ecfdf3;
    color: #166534;
}

.olx-offer-body .btn-small-view {
    margin-top: auto;
    width: fit-content;
}

#scraperControlStatus.enabled {
    background: #dcfce7;
    color: #16a34a;
}

#scraperControlStatus.disabled {
    background: #fee2e2;
    color: #dc2626;
}

/* Panel szczegółów ogłoszenia */
#detailsContent .detail-card,
#detailsContent .detail-card--listing {
    background: #f8fafc;
    border-radius: 0;
    border: none;
    padding: 0;
    max-width: none;
    min-width: 0;
}

#detailsContent .detail-hero {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

#detailsContent .detail-hero-gallery.auction-gallery-section {
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #0f172a;
}

#detailsContent .detail-hero-gallery .detail-gallery-status,
#detailsContent .detail-hero-gallery #imageVerificationStatus {
    position: absolute;
    z-index: 3;
    left: 16px;
    top: 16px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
}

#detailsContent .detail-hero-gallery {
    position: relative;
}

#detailsContent .detail-hero-body {
    padding: 20px 24px 24px;
}

#detailsContent .detail-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

#detailsContent .detail-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#detailsContent .detail-source-badge--komornik {
    background: #dbeafe;
    color: #1d4ed8;
}

#detailsContent .detail-source-badge--olx {
    background: #dcfce7;
    color: #15803d;
}

#detailsContent .detail-badge--archived {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #fef3c7;
    color: #92400e;
}

.olx-lifecycle-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.olx-lifecycle-banner {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.olx-lifecycle-banner--archived {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.olx-lifecycle-note {
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.btn-linkish {
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.olx-history-list,
.olx-changes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.olx-history-link {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.olx-history-meta,
.olx-change-when {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
    color: #64748b;
}

.detail-muted {
    margin: 0 0 10px;
    font-size: 0.88rem;
    color: #64748b;
}

#detailsContent .detail-hero-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    letter-spacing: -0.02em;
}

#detailsContent .detail-hero-title-row {
    margin-bottom: 8px;
}

#detailsContent .detail-hero-subtitle,
#detailsContent .detail-hero-location {
    margin: 0 0 16px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.45;
}

#detailsContent .detail-hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
}

#detailsContent .detail-metric {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

#detailsContent .detail-metric--highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}

#detailsContent .detail-metric--highlight .detail-metric-value {
    color: #1d4ed8;
}

#detailsContent .detail-metric-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}

#detailsContent .detail-metric-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

#detailsContent .detail-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 24px 8px;
}

#detailsContent .detail-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#detailsContent .detail-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

#detailsContent .detail-panel-title,
#detailsContent .detail-section > h4,
#detailsContent .listing-parcel-section-header .detail-panel-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
}

#detailsContent .detail-panel-body {
    padding: 16px 18px 18px;
}

#detailsContent .detail-panel--prose .detail-prose {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    white-space: pre-wrap;
}

#detailsContent .detail-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

#detailsContent .detail-subsection-title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

#detailsContent .detail-cta {
    margin: 0;
    padding: 16px 24px 24px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

#detailsContent .detail-cta .btn-detail-external {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 600;
}

.map-hub-drawer-body #detailsContent .detail-hero-gallery .auction-gallery-frame {
    min-height: 280px;
    border-radius: 0;
    box-shadow: none;
}

.map-hub-drawer-body #detailsContent .detail-hero-gallery .auction-gallery-image-wrap,
.map-hub-drawer-body #detailsContent .detail-hero-gallery .auction-gallery-image {
    min-height: 280px;
}

.map-hub-drawer-body #detailsContent .detail-body {
    padding-left: 20px;
    padding-right: 20px;
}

.map-hub-drawer-body #detailsContent .detail-hero-body {
    padding-left: 20px;
    padding-right: 20px;
}

#olxDetailsContent .detail-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    width: 100%;
    max-width: 100%;
}

#olxDetailsContent .detail-card h3 {
    font-size: 24px;
    color: #22314d;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

#olxDetailsContent .auction-map-section,
#olxDetailsContent .auction-gallery-section,
#olxDetailsContent .detail-section,
#olxDetailsContent .description-section {
    margin-bottom: 18px;
}

#olxDetailsContent .auction-map-container {
    width: 100%;
    height: 520px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #b7d4c3;
    background: #e8f2ec;
}

#olxDetailsContent .auction-map-container.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6f66;
    font-size: 14px;
    padding: 24px;
    text-align: center;
}

#detailsContent .detail-card h3 {
    font-size: 22px;
    color: #22314d;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

#detailsContent .detail-card--listing h3 {
    border: none;
    padding: 0;
    margin: 0;
}

#detailsContent .auction-map-section {
    padding: 20px;
    background: linear-gradient(180deg, #f8fffb 0%, #eef8f4 100%);
    border: 1px solid #cfe8d8;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(26, 74, 43, 0.08);
}

#detailsContent .auction-map-section h4 {
    margin-bottom: 12px;
    color: #1f4d33;
}

#detailsContent #auctionMapStatus {
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 13px;
}

#detailsContent .auction-map-container {
    width: 100%;
    height: 420px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #b7d4c3;
    background: #e8f2ec;
}

#detailsContent .auction-map-container.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6f66;
    font-size: 14px;
    padding: 24px;
    text-align: center;
}

#detailsContent .rcn-transactions-section {
    padding: 20px;
    background: linear-gradient(180deg, #fffaf5 0%, #fff4e8 100%);
    border: 1px solid #f0d4b3;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(120, 72, 20, 0.08);
}

#detailsContent .rcn-transactions-section h4 {
    margin-bottom: 12px;
    color: #7c4a12;
}

#detailsContent .rcn-fetch-actions {
    margin-bottom: 12px;
}

#detailsContent #rcnTransactionsStatus {
    margin-bottom: 14px;
    color: #4b5563;
    font-size: 13px;
}

#detailsContent .rcn-disclosure-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.45;
}

#detailsContent .rcn-disclosure-alert strong {
    font-size: 15px;
}

#detailsContent .rcn-filters-panel {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #f0d4b3;
    border-radius: 10px;
}

#detailsContent .rcn-filters-panel h5 {
    margin: 0 0 10px;
    color: #7c4a12;
    font-size: 14px;
}

#detailsContent .rcn-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 10px;
}

#detailsContent .rcn-filter-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

#detailsContent .rcn-filter-row input[type="number"] {
    width: 72px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

#detailsContent .rcn-quick-valuation {
    margin-bottom: 16px;
}

#detailsContent .rcn-quick-valuation h5 {
    margin: 0 0 10px;
    color: #7c4a12;
    font-size: 14px;
}

#detailsContent .rcn-flag-warn {
    color: #b45309;
    font-size: 12px;
    white-space: nowrap;
}

#detailsContent .rcn-summary-card.rcn-highlight-m2 strong {
    color: #15803d;
    font-size: 18px;
}

#detailsContent .rcn-group-grid {
    margin-bottom: 16px;
}

#detailsContent .rcn-group-grid h5 {
    margin: 0 0 10px;
    color: #7c4a12;
    font-size: 14px;
}

#detailsContent .rcn-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

#detailsContent .rcn-yearly-grid,
#detailsContent .rcn-group-grid {
    margin-bottom: 16px;
}

#detailsContent .rcn-yearly-grid h5,
#detailsContent .rcn-group-grid h5 {
    margin: 0 0 10px;
    color: #7c4a12;
    font-size: 14px;
}

#detailsContent .rcn-subtable {
    font-size: 12px;
}

#detailsContent .rcn-summary-card {
    background: #fff;
    border: 1px solid #f0d4b3;
    border-radius: 10px;
    padding: 12px 14px;
}

#detailsContent .rcn-summary-card span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

#detailsContent .rcn-summary-card strong {
    font-size: 16px;
    color: #7c2d12;
}

#detailsContent .rcn-market-hero {
    background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
    border: 1px solid #f0d4b3;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

#detailsContent .rcn-market-hero-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #7c2d12;
}

#detailsContent .rcn-market-hero-sub {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

#detailsContent .rcn-market-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 14px 0 10px;
}

#detailsContent .rcn-market-hero-stat {
    background: #fff;
    border: 1px solid #f3e8d8;
    border-radius: 10px;
    padding: 10px 12px;
}

#detailsContent .rcn-market-hero-stat--primary {
    border-color: #f59e0b;
    background: #fffbeb;
}

#detailsContent .rcn-market-hero-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9a3412;
    margin-bottom: 4px;
}

#detailsContent .rcn-market-hero-stat strong {
    font-size: 17px;
    color: #7c2d12;
}

#detailsContent .rcn-compare-block {
    margin-bottom: 16px;
}

#detailsContent .rcn-compare-block h5 {
    margin: 0 0 6px;
    font-size: 14px;
}

#detailsContent .rcn-table-wrap {
    overflow-x: auto;
}

#detailsContent .rcn-transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

#detailsContent .rcn-transactions-table th,
#detailsContent .rcn-transactions-table td {
    border: 1px solid #f0d4b3;
    padding: 8px 10px;
    text-align: left;
}

#detailsContent .rcn-transactions-table th {
    background: #fff7ed;
    color: #7c4a12;
}

#detailsContent .rcn-transactions-table tr.rcn-row-top td {
    background: #ecfdf5;
}

#detailsContent .rcn-table-note {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

#detailsContent .rcn-bundle-note,
.rcn-map-popup .rcn-bundle-note {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #b45309;
}

/* —— Opinia inwestycyjna —— */
#detailsContent .detail-row-kw {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#detailsContent .kw-service-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

#detailsContent .kw-service-status-pending {
    background: #f1f5f9;
    color: #64748b;
}

#detailsContent .kw-service-status-ok {
    background: #dcfce7;
    color: #166534;
}

#detailsContent .kw-service-status-warn {
    background: #fef9c3;
    color: #854d0e;
}

#detailsContent .kw-service-status-missing {
    background: #fee2e2;
    color: #991b1b;
}

#detailsContent .kw-service-status-error {
    background: #f1f5f9;
    color: #475569;
}

.detail-analytics-stack,
.detail-analytics-tabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.detail-analytics-tabs {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.detail-analytics-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.detail-analytics-tab {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 14px;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.detail-analytics-tab:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.55);
}

.detail-analytics-tab.is-active {
    color: #0f172a;
    border-bottom-color: #2563eb;
    background: #fff;
}

.detail-analytics-tabpanels {
    min-height: 0;
}

.detail-analytics-panel {
    padding: 14px 16px 16px;
}

.detail-analytics-panel--rcn .rcn-transactions-section {
    padding: 0;
    background: transparent;
    border: none;
}

.detail-analytics-panel--ai {
    background: #fff;
}

#detailsContent .detail-analytics-stack .detail-collapsible {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.detail-collapsible {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.detail-collapsible-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.detail-collapsible--opinion .detail-collapsible-toggle {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.detail-collapsible--rcn .detail-collapsible-toggle {
    background: #f8fafc;
}

.detail-collapsible--ai .detail-collapsible-toggle {
    background: #f8fafc;
}

.detail-collapsible-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.detail-collapsible-chevron {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}

.detail-collapsible:not(.is-collapsed) .detail-collapsible-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.detail-collapsible-panel {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-color);
}

.detail-collapsible.is-collapsed .detail-collapsible-panel {
    display: none;
}

.detail-collapsible-panel.rcn-transactions-section {
    padding: 16px;
    background: #fff;
    border: none;
}

#detailsContent .detail-collapsible-panel.offer-opinion-section {
    padding: 16px;
    background: #f8fafc;
    border: none;
    border-radius: 0;
}

#detailsContent .detail-collapsible-panel--ai {
    background: #fff;
}

.map-hub-drawer-body .detail-analytics-stack {
    margin-top: 16px;
}

#detailsContent .offer-opinion-section {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

#detailsContent .offer-opinion-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#detailsContent .offer-opinion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#detailsContent .offer-ai-status.offer-ai-loading {
    color: #475569;
    font-weight: 500;
}

#detailsContent .offer-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

#detailsContent .offer-ai-badge-label {
    font-weight: 600;
    color: #334155;
}

#detailsContent .offer-ai-badge-meta {
    color: #64748b;
    font-size: 11px;
}

#detailsContent .offer-ai-badge-meta::before {
    content: '·';
    margin-right: 8px;
    color: #cbd5e1;
}

#detailsContent .offer-ai-compare {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px;
}

#detailsContent .offer-ai-narrative {
    margin: 16px 0;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#detailsContent .offer-ai-narrative h5 {
    margin: 0 0 10px;
    font-size: 15px;
}

#detailsContent .offer-ai-narrative-body {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
}

#detailsContent .offer-ai-narrative-body p {
    margin: 0 0 0.75em;
}

#detailsContent .offer-ai-md-h {
    margin: 1.25em 0 0.5em;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

#detailsContent .offer-ai-md-h:first-child {
    margin-top: 0;
}

#detailsContent .offer-ai-md-ul {
    margin: 0.35em 0 0.75em 1.25em;
    padding: 0;
}

#detailsContent .offer-ai-md-ul li {
    margin-bottom: 0.35em;
}

#detailsContent .offer-ai-content {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

#detailsContent .offer-opinion-header h4 {
    margin: 0;
}

#detailsContent .offer-opinion-status {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
}

#detailsContent .offer-upload-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#detailsContent .offer-upload-label {
    cursor: pointer;
    margin: 0;
    position: relative;
    display: inline-flex;
}

#detailsContent .offer-upload-input,
#detailsContent .offer-submission-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#detailsContent .offer-upload-msg {
    font-size: 12px;
    color: #64748b;
    flex: 1 1 100%;
}

#detailsContent .offer-upload-msg.ok {
    color: #166534;
}

#detailsContent .offer-upload-msg.err {
    color: #991b1b;
}

#detailsContent .offer-upload-files {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    flex: 1 1 100%;
    font-size: 12px;
}

#detailsContent .offer-upload-files li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
}

#detailsContent .offer-opinion-data-panel h5 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #334155;
}

#detailsContent .offer-opinion-data-intro {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.5;
}

#detailsContent .offer-data-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

#detailsContent .offer-data-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

#detailsContent .offer-data-row.offer-data-ok {
    border-color: #e2e8f0;
    background: #fff;
}

#detailsContent .offer-data-row.offer-data-missing {
    border-color: #e2e8f0;
    background: #fafafa;
}

#detailsContent .offer-data-row.offer-data-pending {
    border-color: #e2e8f0;
    background: #fafafa;
}

#detailsContent .offer-data-icon {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: #94a3b8;
}

#detailsContent .offer-data-ok .offer-data-icon { background: #64748b; }
#detailsContent .offer-data-missing .offer-data-icon { background: #cbd5e1; }
#detailsContent .offer-data-pending .offer-data-icon { background: #94a3b8; }

#detailsContent .offer-data-text strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
}

#detailsContent .offer-data-status {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-left: 6px;
}

#detailsContent .offer-data-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

#detailsContent .offer-missing-extra {
    margin: 12px 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: #991b1b;
}

#detailsContent .offer-opinion-content {
    margin-top: 16px;
}

#detailsContent .offer-opinion-result {
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

#detailsContent .offer-opinion-scores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

#detailsContent .offer-verdict-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
}

#detailsContent .offer-verdict-badge.verdict-attractive {
    border-color: #cbd5e1;
    color: #0f172a;
}

#detailsContent .offer-verdict-badge.verdict-risky {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #78350f;
}

#detailsContent .offer-verdict-badge.verdict-reject {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

#detailsContent .offer-verdict-badge.neutral {
    border-color: #e2e8f0;
    color: #475569;
}

#detailsContent .offer-score-pill {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

#detailsContent .offer-confidence-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

#detailsContent .offer-confidence-badge.conf-high { background: #f8fafc; color: #334155; border: 1px solid #e2e8f0; }
#detailsContent .offer-confidence-badge.conf-medium { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
#detailsContent .offer-confidence-badge.conf-low { background: #fffbeb; color: #78350f; border: 1px solid #fde68a; }

#detailsContent .offer-opinion-summary {
    font-size: 14px;
    line-height: 1.55;
    color: #334155;
    margin: 0 0 16px;
}

#detailsContent .offer-opinion-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

#detailsContent .offer-analysis-card {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}

#detailsContent .offer-analysis-card h5 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #475569;
}

#detailsContent .offer-opinion-block {
    margin-top: 12px;
}

#detailsContent .offer-opinion-block h5 {
    margin: 0 0 6px;
    font-size: 14px;
}

#detailsContent .offer-opinion-block ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #334155;
}

#detailsContent .btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

#detailsContent .auction-gallery-section:not(.detail-hero-gallery),
#olxDetailsContent .auction-gallery-section {
    padding: 20px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(26, 43, 74, 0.08);
}

#detailsContent .auction-gallery-section #imageVerificationStatus,
#olxDetailsContent .auction-gallery-section #olxImageStatus {
    margin-bottom: 14px;
    color: #4b5563;
    font-size: 13px;
}

#detailsContent .auction-gallery,
#olxDetailsContent .auction-gallery {
    display: grid;
    gap: 16px;
}

#detailsContent .auction-gallery-frame,
#olxDetailsContent .auction-gallery-frame {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
    min-height: 520px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
}

#detailsContent .auction-gallery-image-wrap,
#olxDetailsContent .auction-gallery-image-wrap {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 40%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.92));
}

#detailsContent .auction-gallery-image,
#olxDetailsContent .auction-gallery-image {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: contain;
    display: block;
}

#detailsContent .auction-gallery-nav,
#olxDetailsContent .auction-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
    z-index: 2;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

#detailsContent .auction-gallery-nav:hover,
#olxDetailsContent .auction-gallery-nav:hover {
    transform: translateY(-50%) scale(1.05);
    background: #fff;
}

#detailsContent .auction-gallery-nav:disabled,
#olxDetailsContent .auction-gallery-nav:disabled {
    opacity: 0.45;
    cursor: default;
}

#detailsContent .auction-gallery-nav--prev,
#olxDetailsContent .auction-gallery-nav--prev {
    left: 18px;
}

#detailsContent .auction-gallery-nav--next,
#olxDetailsContent .auction-gallery-nav--next {
    right: 18px;
}

#detailsContent .auction-gallery-counter,
#detailsContent .auction-gallery-hash,
#olxDetailsContent .auction-gallery-counter,
#olxDetailsContent .auction-gallery-hash {
    position: absolute;
    left: 20px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

#detailsContent .auction-gallery-counter,
#olxDetailsContent .auction-gallery-counter {
    top: 18px;
}

#detailsContent .auction-gallery-hash,
#olxDetailsContent .auction-gallery-hash {
    bottom: 18px;
    max-width: calc(100% - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#detailsContent .auction-gallery-thumbs,
#olxDetailsContent .auction-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

#detailsContent .auction-gallery-thumb,
#olxDetailsContent .auction-gallery-thumb {
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#detailsContent .auction-gallery-thumb:hover,
#olxDetailsContent .auction-gallery-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

#detailsContent .auction-gallery-thumb.is-active,
#olxDetailsContent .auction-gallery-thumb.is-active {
    border-color: var(--primary-color);
}

#detailsContent .auction-gallery-thumb img,
#olxDetailsContent .auction-gallery-thumb img {
    width: 100%;
    height: 86px;
    object-fit: cover;
    display: block;
}

#parcelFinderAuctionDetails .parcel-finder-gallery-section {
    padding: 12px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
    border: 1px solid #dbe5f2;
    border-radius: 12px;
}

#parcelFinderAuctionDetails #parcelFinderImageStatus {
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 12px;
}

#parcelFinderAuctionDetails .auction-gallery {
    display: grid;
    gap: 10px;
}

#parcelFinderAuctionDetails .auction-gallery-frame,
#parcelFinderAuctionDetails .auction-gallery-frame--compact {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    min-height: 200px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

#parcelFinderAuctionDetails .auction-gallery-image-wrap,
#parcelFinderAuctionDetails .auction-gallery-image {
    min-height: 200px;
}

#parcelFinderAuctionDetails .auction-gallery-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.9));
}

#parcelFinderAuctionDetails .auction-gallery-image {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    display: block;
}

#parcelFinderAuctionDetails .auction-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
}

#parcelFinderAuctionDetails .auction-gallery-nav--prev { left: 8px; }
#parcelFinderAuctionDetails .auction-gallery-nav--next { right: 8px; }
#parcelFinderAuctionDetails .auction-gallery-nav:disabled { opacity: 0.45; cursor: default; }

#parcelFinderAuctionDetails .auction-gallery-counter,
#parcelFinderAuctionDetails .auction-gallery-hash {
    position: absolute;
    left: 10px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
}

#parcelFinderAuctionDetails .auction-gallery-counter { top: 8px; }
#parcelFinderAuctionDetails .auction-gallery-hash { bottom: 8px; }

#parcelFinderAuctionDetails .auction-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

#parcelFinderAuctionDetails .auction-gallery-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

#parcelFinderAuctionDetails .auction-gallery-thumb.is-active {
    border-color: var(--primary-color);
}

#parcelFinderAuctionDetails .auction-gallery-thumb img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    display: block;
}

#detailsContent .detail-spec-grid,
#detailsContent .detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
}

#detailsContent .detail-spec-grid--compact {
    grid-template-columns: 1fr;
}

#detailsContent .detail-spec,
#detailsContent .detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    min-width: 0;
}

#detailsContent .detail-spec-grid .detail-spec:nth-last-child(-n+2),
#detailsContent .detail-grid .detail-row:nth-last-child(-n+2) {
    border-bottom: none;
}

#detailsContent .detail-spec-label,
#detailsContent .detail-row strong {
    color: #94a3b8;
    font-weight: 600;
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

#detailsContent .detail-spec-value {
    color: #0f172a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    word-break: break-word;
}

#detailsContent .detail-panel .description-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

#detailsContent .description-section h4 {
    margin: 0;
}

#detailsContent .detail-analytics-stack {
    margin: 0;
}

#detailsContent .button-group {
    margin-top: 0;
}

@media (max-width: 640px) {
    #detailsContent .detail-spec-grid,
    #detailsContent .detail-grid {
        grid-template-columns: 1fr;
    }

    #detailsContent .detail-spec,
    #detailsContent .detail-row {
        border-bottom: 1px solid #f1f5f9;
    }

    #detailsContent .detail-spec:last-child,
    #detailsContent .detail-row:last-child {
        border-bottom: none;
    }
}

@media (max-width: 900px) {
    #detailsContent .auction-gallery-frame,
    #detailsContent .auction-gallery-image-wrap,
    #detailsContent .auction-gallery-image,
    #olxDetailsContent .auction-gallery-frame,
    #olxDetailsContent .auction-gallery-image-wrap,
    #olxDetailsContent .auction-gallery-image {
        min-height: 360px;
    }

    #detailsContent .auction-gallery-nav,
    #olxDetailsContent .auction-gallery-nav {
        width: 46px;
        height: 46px;
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    #detailsContent .auction-gallery-frame,
    #detailsContent .auction-gallery-image-wrap,
    #detailsContent .auction-gallery-image,
    #olxDetailsContent .auction-gallery-frame,
    #olxDetailsContent .auction-gallery-image-wrap,
    #olxDetailsContent .auction-gallery-image {
        min-height: 280px;
    }

    #detailsContent .auction-gallery-thumbs,
    #olxDetailsContent .auction-gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    }

    #detailsContent .auction-gallery-thumb img,
    #olxDetailsContent .auction-gallery-thumb img {
        height: 64px;
    }

    #detailsContent .auction-gallery-counter,
    #detailsContent .auction-gallery-hash,
    #olxDetailsContent .auction-gallery-counter,
    #olxDetailsContent .auction-gallery-hash {
        left: 12px;
        right: 12px;
        max-width: calc(100% - 24px);
    }
}

/* —— Strona logowania / rejestracji —— */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-brand {
    background: linear-gradient(145deg, #0f4c81 0%, #1867c0 45%, #48a9a6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.auth-brand-inner {
    max-width: 420px;
}

.auth-brand-kicker {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 12px;
}

.auth-brand-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.auth-brand-text {
    font-size: 16px;
    line-height: 1.55;
    opacity: 0.92;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--light-bg);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 76, 129, 0.12);
    padding: 32px 28px 28px;
    border: 1px solid rgba(24, 103, 192, 0.08);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #eef2f7;
    border-radius: 10px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #5c6b7a;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.auth-tab.is-active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-panel {
    display: none;
}

.auth-panel.is-active {
    display: block;
}

.auth-heading {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: #0f172a;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    font-weight: 500;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label,
.auth-invite-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-top: 4px;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 103, 192, 0.15);
}

.auth-input-invite {
    margin-bottom: 16px;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.auth-submit {
    margin-top: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-google-slot {
    min-height: 44px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-google-slot > div {
    width: 100% !important;
}

.auth-google-hint {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-bottom: 8px;
}

.auth-error {
    color: var(--danger-color);
    min-height: 20px;
    font-size: 13px;
    margin-top: 4px;
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }
    .auth-brand {
        display: none;
    }
    .auth-main {
        min-height: 100vh;
    }
}

/* legacy aliases */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== HEADER ========== */
header.header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.header-content .subtitle {
    color: #666;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 14px;
}

.health-status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    animation: pulse 2s infinite;
}

.health-status.connected .dot {
    background-color: var(--success-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1565B8;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: #6C757D;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-ai {
    background: #0f172a;
    color: #fff;
    border: 1px solid #0f172a;
    box-shadow: none;
}

.btn-ai:hover:not(:disabled) {
    background: #1e293b;
    border-color: #1e293b;
    box-shadow: none;
}

.btn-ai:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== SECTIONS ========== */
.stats-section,
.search-section,
.auctions-section,
.chart-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.stats-section h2,
.search-section h2,
.auctions-section h2,
.chart-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 15px;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ========== SEARCH & FILTERS ========== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: var(--text-sm);
    font-weight: 500;
    background: #fff;
    color: var(--dark-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 103, 192, 0.12);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    align-items: center;
}

.filter-select,
.filter-input,
.limit-select {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: var(--text-sm);
    font-weight: 500;
    background: #fff;
    color: var(--dark-text);
}

.filter-select:focus,
.filter-input:focus,
.limit-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 103, 192, 0.12);
}

/* ========== CONTROLS & PAGINATION ========== */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
}

#pageInfo {
    min-width: 80px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

/* ========== TABLE ========== */
.table-responsive {
    overflow-x: auto;
}

.auctions-table {
    width: 100%;
    border-collapse: collapse;
}

.auctions-table thead {
    background-color: var(--light-bg);
}

.auctions-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

.auctions-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.auctions-table tbody tr {
    transition: background-color 0.2s ease;
}

.auctions-table tbody tr:hover {
    background-color: var(--light-bg);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.completed {
    background-color: #cfe2ff;
    color: #084298;
}

.status-badge.upcoming {
    background-color: #fff3cd;
    color: #664d03;
}

.text-center {
    text-align: center;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-small-view {
    padding: 6px 12px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small-view:hover {
    background-color: #1565B8;
}

/* ========== CHARTS ========== */
.chart-section {
    display: grid;
    grid-template-columns: 1fr;
}

.chart-placeholder {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 8px;
    position: relative;
}

canvas {
    max-height: 300px;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--dark-text);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dashboard-topbar {
        position: static;
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-search {
        min-width: 100%;
    }

    .topbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .dashboard-content {
        padding: 14px;
    }

    header.header {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }

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

    .auctions-table {
        font-size: 13px;
    }

    .auctions-table th,
    .auctions-table td {
        padding: 10px;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}

/* ========== UTILITIES ========== */
.text-muted {
    color: #6c757d;
}

.font-small {
    font-size: 12px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c3e6cb;
}

/* ========== AUTH SWITCH LINK ========== */
/* —— MPZP w szczegółach —— */
.mpzp-intro {
    font-size: 13px;
    color: #5c6b7a;
    margin: 0 0 12px;
    line-height: 1.45;
}
.mpzp-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}
.mpzp-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
}
.mpzp-card--primary {
    border-color: rgba(24, 103, 192, 0.25);
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
}
.mpzp-card--warn {
    border-color: rgba(230, 126, 34, 0.35);
    background: #fffaf5;
}
.mpzp-card h5 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mpzp-symbol {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.1;
}
.mpzp-label {
    margin: 6px 0 0;
    font-size: 15px;
    color: #374151;
}
.mpzp-meta {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 0;
}
.mpzp-list {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.5;
}
.mpzp-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 11px;
    background: #e8f4ea;
    color: #1b6b2a;
    border-radius: 4px;
}
.mpzp-reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding: 8px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}
.mpzp-reg-row:last-child {
    border-bottom: none;
}
.mpzp-reg-label {
    font-weight: 600;
    color: #374151;
}
.mpzp-reg-value {
    color: #111827;
    text-align: right;
}
.mpzp-auction-hint,
.mpzp-comment {
    font-size: 13px;
    color: #5c6b7a;
    margin: 0;
}
@media (max-width: 640px) {
    .mpzp-reg-row {
        grid-template-columns: 1fr;
    }
    .mpzp-reg-value {
        text-align: left;
    }
}

.auth-switch,
.auth-switch-legacy {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #666;
}
.auth-switch a { color: var(--primary-color); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ========== ADMIN PANEL ========== */
.admin-panel {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
    overflow: hidden;
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    background: var(--light-bg);
}

.admin-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.admin-tab:hover  { color: var(--primary-color); }
.admin-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); background: white; }

.admin-tab-content { padding: 20px; }

.admin-control-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #f9fbff;
    gap: 10px;
    flex-wrap: wrap;
}

.scraper-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
}

.scraper-status-badge.enabled {
    background: #e6f6ea;
    color: #1f7a3f;
}

.scraper-status-badge.disabled {
    background: #fdecea;
    color: #b23a2b;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-section-header h3 { margin: 0; font-size: 16px; }

/* ========== INVITE CODE ========== */
code.invite-code {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    background: #f0f4ff;
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #c5d0f5;
}

/* ========== AUCTION HISTORY ========== */
.history-section h4 { margin-top: 0; margin-bottom: 12px; }

.history-count {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-entry {
    border-left: 3px solid var(--primary-color, #4a6fa5);
    padding: 8px 12px;
    background: #f8f9ff;
    border-radius: 0 6px 6px 0;
}

.history-entry-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}

.history-changes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-change-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    flex-wrap: wrap;
}

.history-field-label {
    font-weight: 600;
    color: #444;
    min-width: 140px;
}

.history-old-value {
    color: #c0392b;
    text-decoration: line-through;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-arrow {
    color: #888;
    flex-shrink: 0;
}

.history-new-value {
    color: #1f7a3f;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#detailsContent .listing-parcel-section-header {
    width: 100%;
}

.listing-parcel-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0;
    width: 100%;
}

.listing-parcel-section-header h4 {
    margin: 0;
}

.listing-parcel-edit-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.listing-parcel-edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.listing-parcel-edit-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
}

.listing-parcel-edit-label input {
    font-weight: 400;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.listing-parcel-edit-actions {
    margin-top: 4px;
}

.listing-parcel-edit-status {
    margin-top: 8px;
}

.detail-row-section-title {
    margin-top: 6px;
}

.detail-row-indented {
    padding-left: 12px;
}

@media (max-width: 720px) {
    .listing-parcel-edit-row {
        grid-template-columns: 1fr;
    }
}

/* Inbox notifications */
.inbox-menu-wrap {
    position: relative;
}

.inbox-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.inbox-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.inbox-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 92vw);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 1200;
    overflow: hidden;
}

.inbox-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.inbox-dropdown-list {
    max-height: 320px;
    overflow: auto;
    padding: 8px;
}

.inbox-dropdown-footer {
    width: 100%;
    border-radius: 0;
    border-top: 1px solid #f1f5f9;
}

.inbox-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.inbox-item:hover {
    background: #f8fafc;
}

.inbox-item.is-unread {
    background: #fffbeb;
}

.inbox-item-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    font-size: 12px;
}

.inbox-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.inbox-item-message {
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.inbox-item-message--compact {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.settings-inbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.settings-inbox-sep {
    margin: 16px 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

/* Offer data submissions */
#detailsContent .offer-submission-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#detailsContent .offer-submission-block.is-expanded {
    flex-direction: column;
    align-items: stretch;
}

#detailsContent .offer-submission-btn.is-pending {
    width: 100%;
    opacity: 0.85;
}

#detailsContent .offer-submission-pending-msg {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
}

#detailsContent .offer-submission-parcel-input {
    flex: 1 1 160px;
    min-width: 120px;
}

#detailsContent .offer-submission-msg {
    font-size: 12px;
    color: #64748b;
    flex: 1 1 100%;
}

#detailsContent .offer-submission-msg.err {
    color: #991b1b;
}

#detailsContent .offer-submission-login-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
}

#detailsContent .detail-contribution-intro {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}

#detailsContent .detail-contribution-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

#detailsContent .detail-contribution-block {
    margin-top: 14px;
}

#detailsContent .detail-contribution-block--secondary {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

#detailsContent .detail-contribution-block-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

#detailsContent .detail-contribution-inline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#detailsContent .detail-contribution-inline-head .detail-contribution-block-title {
    margin: 0;
    flex: 1;
    min-width: 0;
}

#detailsContent .detail-contribution-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#detailsContent .detail-contribution-availability {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

#detailsContent .detail-contribution-availability.is-yes {
    color: #166534;
}

#detailsContent .detail-contribution-availability.is-no {
    color: #94a3b8;
}

#detailsContent .detail-contribution-expand-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

#detailsContent .detail-contribution-expand-icon {
    display: block;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
}

#detailsContent .detail-contribution-expand-btn:hover,
#detailsContent .detail-contribution-expand-btn.is-active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

#detailsContent .detail-contribution-expand-panel {
    margin-top: 10px;
    padding: 12px 12px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

#detailsContent .detail-contribution-expand-panel[hidden] {
    display: none !important;
}

#detailsContent .kw-upload-instructions {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
}

#detailsContent .kw-upload-instructions summary {
    cursor: pointer;
    color: var(--accent, #2563eb);
    font-weight: 500;
}

#detailsContent .kw-upload-instructions-list {
    margin: 0.5rem 0 0 1.1rem;
    padding: 0;
}

#detailsContent .kw-upload-instructions-list li {
    margin-bottom: 0.35rem;
}

#detailsContent .offer-submission-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

#detailsContent .detail-contribution-wrapper[hidden] {
    display: none !important;
}

#detailsContent .data-contribution-ok-msg {
    margin: 0;
    font-size: 13px;
    color: #166534;
}

#detailsContent .prelim-analysis-intro {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}

#detailsContent .prelim-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

#detailsContent .prelim-facts-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

#detailsContent .prelim-fact {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

#detailsContent .prelim-fact--ok {
    border-color: #e2e8f0;
    background: #fff;
}

#detailsContent .prelim-fact-icon {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: #64748b;
}

#detailsContent .prelim-fact-body strong {
    display: block;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 2px;
}

#detailsContent .prelim-fact-detail {
    display: block;
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
}

#detailsContent .prelim-empty {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

#detailsContent .prelim-missing-block,
#detailsContent .prelim-pending-block {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
}

#detailsContent .prelim-missing-block {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

#detailsContent .prelim-pending-block {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

#detailsContent .prelim-missing-block h6,
#detailsContent .prelim-pending-block h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

#detailsContent .prelim-missing-list {
    margin: 0;
    padding-left: 1.1em;
    font-size: 12px;
    line-height: 1.55;
    color: #475569;
}

#detailsContent .prelim-missing-list li {
    margin-bottom: 6px;
}

#detailsContent .prelim-extra-missing {
    margin-top: 14px;
}

#detailsContent .basic-analysis-intro {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
}

#detailsContent .basic-analysis-block {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

#detailsContent .basic-analysis-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#detailsContent .basic-analysis-block--spread {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin-top: 4px;
}

#detailsContent .basic-analysis-block--proscons {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
}

#detailsContent .basic-proscons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    #detailsContent .basic-proscons-grid {
        grid-template-columns: 1fr;
    }
}

#detailsContent .basic-proscons-col h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}

#detailsContent .basic-proscons-col--pros h6 {
    color: #334155;
}

#detailsContent .basic-proscons-col--cons h6 {
    color: #334155;
}

#detailsContent .basic-proscons-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.45;
}

#detailsContent .basic-proscons-col--pros .basic-proscons-list li {
    color: #334155;
}

#detailsContent .basic-proscons-col--cons .basic-proscons-list li {
    color: #475569;
}

#detailsContent .basic-proscons-col--pros {
    border-left: 2px solid #cbd5e1;
    padding-left: 12px;
}

#detailsContent .basic-proscons-col--cons {
    border-left: 2px solid #e2e8f0;
    padding-left: 12px;
}

#detailsContent .basic-analysis-heading {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

#detailsContent .basic-analysis-grid {
    display: grid;
    gap: 6px;
}

#detailsContent .basic-analysis-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    line-height: 1.45;
}

#detailsContent .basic-analysis-label {
    color: #64748b;
    flex: 0 0 48%;
}

#detailsContent .basic-analysis-value {
    color: #1e293b;
    text-align: right;
    flex: 1 1 auto;
}

#detailsContent .basic-analysis-highlight {
    color: #15803d;
    font-weight: 600;
}

#detailsContent .basic-analysis-muted {
    color: #94a3b8;
    font-size: 12px;
}

#detailsContent .basic-analysis-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

#detailsContent .basic-analysis-note--share-warning {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

#detailsContent .basic-analysis-block--share .basic-analysis-heading {
    color: #1e40af;
}

#detailsContent .basic-analysis-rcn-table-wrap {
    overflow-x: auto;
    margin-bottom: 12px;
}

#detailsContent .basic-analysis-rcn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

#detailsContent .basic-analysis-rcn-table th,
#detailsContent .basic-analysis-rcn-table td {
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
    text-align: right;
    vertical-align: middle;
}

#detailsContent .basic-analysis-rcn-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    text-align: center;
}

#detailsContent .basic-analysis-rcn-table td:first-child,
#detailsContent .basic-analysis-rcn-table th:first-child {
    text-align: left;
    min-width: 140px;
}

#detailsContent .basic-analysis-rcn-table td.basic-analysis-rcn-unit {
    text-align: left;
    color: #64748b;
    white-space: nowrap;
}

#detailsContent .basic-analysis-grid--offer-price {
    margin-top: 8px;
}

#detailsContent .basic-analysis-rcn-market {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#detailsContent .basic-analysis-rcn-table-block {
    margin-bottom: 4px;
}

#detailsContent .basic-analysis-rcn-table-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

#detailsContent .basic-analysis-rcn-exclusions {
    text-align: left;
    font-size: 11px;
    line-height: 1.35;
    max-width: 180px;
}

#detailsContent .rcn-reliability {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

#detailsContent .rcn-reliability--high { background: #f1f5f9; color: #334155; }
#detailsContent .rcn-reliability--medium { background: #f8fafc; color: #475569; }
#detailsContent .rcn-reliability--low { background: #fffbeb; color: #78350f; }
#detailsContent .rcn-reliability--none { background: #f1f5f9; color: #64748b; }

#detailsContent .basic-analysis-rcn-compare {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

#detailsContent .basic-analysis-rcn-compare--ok {
    border-color: #e2e8f0;
    background: #f8fafc;
}

#detailsContent .basic-analysis-rcn-compare--warn {
    border-color: #e2e8f0;
    background: #fafafa;
}

#detailsContent .basic-analysis-rcn-compare-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

#detailsContent .basic-analysis-rcn-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 16px;
    margin-bottom: 10px;
}

#detailsContent .basic-analysis-rcn-compare-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#detailsContent .basic-analysis-rcn-compare-metric-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

#detailsContent .basic-analysis-rcn-compare-metric-value {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

#detailsContent .basic-analysis-rcn-compare-metric-sub {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

#detailsContent .basic-analysis-rcn-compare-diff--below {
    color: #0f172a;
}

#detailsContent .basic-analysis-rcn-compare-diff--above {
    color: #78350f;
}

#detailsContent .basic-analysis-rcn-compare-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
}

#detailsContent .basic-analysis-rcn-debug-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    margin-top: 4px;
}

#detailsContent .basic-analysis-rcn-debug {
    margin-top: 8px;
    font-size: 11px;
}

#detailsContent .basic-analysis-rcn-debug pre {
    max-height: 200px;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    padding: 8px;
    border-radius: 6px;
    font-size: 10px;
}

.basic-analysis-host {
    min-height: 0;
}

.basic-analysis-rcn-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.basic-analysis-rcn-period-tabs {
    display: inline-flex;
    padding: 3px;
    background: #e2e8f0;
    border-radius: 9px;
    gap: 2px;
}

.basic-analysis-rcn-period-tab {
    border: none;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.basic-analysis-rcn-period-tab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.basic-analysis-rcn-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.basic-analysis-rcn-quality-btn.is-active {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0c4a6e;
}

.basic-analysis-rcn-quality-badge {
    margin-left: 6px;
    font-size: 11px;
    color: #b45309;
}

.basic-analysis-rcn-period-panels {
    position: relative;
    min-height: 120px;
}

.basic-analysis-rcn-period-panel {
    display: none;
    animation: basicRcnPanelIn 0.22s ease;
}

.basic-analysis-rcn-period-panel.is-active {
    display: block;
}

@keyframes basicRcnPanelIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.basic-analysis-rcn-quality-wrap.is-hidden,
#detailsContent .basic-analysis-rcn-quality-wrap.is-hidden,
.basic-analysis-rcn-market.is-rcn-quality-hidden .basic-analysis-rcn-quality-wrap,
.basic-analysis-rcn-market.is-rcn-quality-hidden .basic-analysis-rcn-col-exclusions {
    display: none !important;
}

.basic-analysis-rcn-meta {
    margin-top: 10px;
    font-size: 12px;
}

#detailsContent .detail-collapsible--basic .detail-collapsible-toggle {
    background: #f8fafc;
}

#detailsContent .basic-analysis-pending {
    padding: 16px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

#detailsContent .basic-analysis-pending-text {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

#detailsContent .basic-analysis-rcn-quality-wrap {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#detailsContent .basic-analysis-rcn-quality {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    color: #334155;
}

#detailsContent .basic-analysis-rcn-quality-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
}

#detailsContent .basic-analysis-rcn-quality-line {
    line-height: 1.5;
}

#detailsContent .basic-analysis-rcn-quality-warn {
    margin-top: 4px;
    color: #b45309;
    font-weight: 500;
    line-height: 1.4;
}

#detailsContent .basic-legal-summary {
    margin-bottom: 10px;
}

#detailsContent .basic-legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

#detailsContent .basic-legal-badge--ok {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

#detailsContent .basic-legal-badge--warn {
    background: #fffbeb;
    color: #78350f;
    border: 1px solid #fde68a;
}

#detailsContent .basic-legal-badge--unknown {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

#detailsContent .basic-score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 10px;
}

#detailsContent .basic-score-table th,
#detailsContent .basic-score-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

#detailsContent .basic-score-points {
    text-align: right;
    font-weight: 600;
    color: #1e293b;
}

#detailsContent .basic-score-total {
    margin: 0;
    font-size: 15px;
    color: #334155;
}

#detailsContent .basic-missing-block {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#detailsContent .basic-missing-block h6 {
    margin: 0 0 8px;
    font-size: 13px;
}

#detailsContent .basic-analysis-error {
    color: #991b1b;
    font-size: 13px;
}

#detailsContent .basic-analysis-block--mpzp {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
}

#detailsContent .basic-mpzp-params-table {
    margin-bottom: 12px;
}

#detailsContent .basic-mpzp-signals {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    gap: 6px;
}

#detailsContent .basic-mpzp-signal {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 8px;
}

#detailsContent .basic-mpzp-signal--ok {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

#detailsContent .basic-mpzp-signal--warn {
    background: #fffbeb;
    color: #78350f;
    border: 1px solid #fde68a;
}

#detailsContent .basic-mpzp-metrics {
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) {
    #detailsContent .basic-mpzp-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
}

#detailsContent .basic-mpzp-metric {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

#detailsContent .basic-mpzp-metric h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

#detailsContent .basic-mpzp-uses {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

#detailsContent .basic-mpzp-restrictions {
    margin: 0 0 12px 1.1em;
    font-size: 12px;
    color: #b45309;
}

#detailsContent .basic-mpzp-link {
    margin: 10px 0 0;
    font-size: 12px;
}

.admin-ops-submissions-card {
    margin-bottom: 20px;
}

.admin-ops-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.admin-submission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.link-btn:hover {
    text-decoration: underline;
}

.admin-submission-kind-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #334155;
    vertical-align: middle;
}

/* Location score */
#detailsContent .basic-analysis-block--location {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
}

#detailsContent .basic-analysis-block--location .loc-score-intro {
    margin: 0 0 10px;
    font-size: 13px;
    color: #64748b;
}

#detailsContent .basic-analysis-block--location .offer-opinion-actions {
    margin-bottom: 8px;
}

#detailsContent .basic-analysis-block--location .loc-score-hero {
    background: #fff;
}


#detailsContent .loc-score-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#detailsContent .loc-score-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

#detailsContent .loc-score-hero-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#detailsContent .loc-score-hero-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

#detailsContent .loc-score-hero-label {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

#detailsContent .loc-score-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #475569;
    align-self: flex-end;
    text-align: right;
}

#detailsContent .loc-score-subscores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

#detailsContent .loc-score-subrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
}

#detailsContent .loc-score-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

#detailsContent .loc-score-badge--good {
    background: #f1f5f9;
    color: #334155;
}

#detailsContent .loc-score-badge--warn {
    background: #fffbeb;
    color: #78350f;
}

#detailsContent .loc-score-badge--bad {
    background: #fef2f2;
    color: #991b1b;
}

#detailsContent .loc-score-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

#detailsContent .loc-score-detail-block {
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

#detailsContent .loc-score-detail-block h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

#detailsContent .loc-score-facts {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

#detailsContent .loc-score-highlights ul,
#detailsContent .loc-score-warnings ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.5;
}

#detailsContent .loc-score-highlights h6,
#detailsContent .loc-score-warnings h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}

#detailsContent .loc-score-warn-item {
    color: #475569;
}

#detailsContent .loc-score-muted {
    color: #94a3b8;
    font-size: 12px;
}

#detailsContent .loc-score-disclaimer {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* —— Status indicators (analytics UI) —— */
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.35em;
}

.status-dot--ok { background: #64748b; }
.status-dot--warn { background: #d97706; }
.status-dot--muted { background: #cbd5e1; }

#detailsContent .basic-legal-badge {
    gap: 8px;
}

.rcn-flag {
    display: inline-block;
    font-size: 11px;
    line-height: 1.35;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.rcn-flag--warn {
    background: #fffbeb;
    color: #78350f;
    border-color: #fde68a;
}

#detailsContent .basic-analysis-rcn-quality-badge {
    font-size: 11px;
    font-weight: 500;
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 4px;
}

#detailsContent .basic-analysis-rcn-quality-warn {
    color: #78350f;
    font-weight: 500;
}

.ai-rec {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    vertical-align: baseline;
}

.ai-rec--yes {
    background: #f1f5f9;
    color: #334155;
}

.ai-rec--caution {
    background: #fffbeb;
    color: #78350f;
}

.ai-rec--no {
    background: #fef2f2;
    color: #991b1b;
}

#detailsContent .offer-ai-md-h {
    color: #0f172a;
    letter-spacing: -0.01em;
}

#detailsContent .offer-ai-result {
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

#detailsContent .basic-analysis-olx-market {
    margin-top: 8px;
}

#detailsContent .basic-analysis-olx-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 12px 0;
    font-size: 13px;
    color: #475569;
}

#detailsContent .basic-analysis-olx-disclaimer {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

#detailsContent .basic-analysis-olx-compare {
    margin-top: 0;
}

#detailsContent .basic-photo-analysis {
    font-size: 13px;
    line-height: 1.55;
    color: #334155;
}

#detailsContent .basic-photo-summary {
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#detailsContent .basic-photo-desc-list {
    margin: 0 0 10px;
    padding-left: 18px;
}

#detailsContent .basic-photo-desc-item {
    margin-bottom: 8px;
}

/* Okazje inwestycyjne */
.okazje-page { max-width: 1100px; margin: 0 auto; padding: 16px; }
.okazje-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.okazje-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.okazje-card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: #64748b; }
.okazje-card-price { font-size: 1.05rem; }
.okazje-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.okazje-checkbox-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.okazje-unlock-box { margin-top: 16px; padding: 16px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; }
.okazje-unlock-warning { color: #92400e; margin: 8px 0; }
.okazje-private-box { margin-top: 16px; padding: 16px; background: #ecfdf5; border: 1px solid #6ee7b7; border-radius: 8px; }
.okazje-success { color: #047857; }
.okazje-error { color: #b91c1c; }
.okazje-pagination { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.admin-leads-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.admin-lead-editor, .admin-lead-unlocks-panel, .admin-lead-notifications-panel {
    margin-top: 16px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc;
}
.admin-lead-form { display: flex; flex-direction: column; gap: 16px; }
.admin-lead-form-section { border: 1px solid #e8edf5; border-radius: 8px; padding: 12px; background: #fff; }
.admin-lead-form-section--private { border-color: #fde68a; background: #fffbeb; }
.admin-lead-form-section--admin-only { border-color: #c7d2fe; background: #eef2ff; }
.admin-lead-form-section h6 { margin: 0 0 10px; font-size: 0.92rem; }
.admin-lead-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.admin-lead-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-lead-field--wide { grid-column: 1 / -1; }
.admin-lead-label { font-size: 0.82rem; font-weight: 600; color: #475569; }
.admin-lead-textarea { resize: vertical; min-height: 72px; }
.admin-lead-privacy-note { margin: 0 0 10px; }
.admin-lead-form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-unlock-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.admin-lead-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-lead-title-cell { font-weight: 600; }
.admin-lead-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.admin-lead-status--draft { background: #f1f5f9; color: #475569; }
.admin-lead-status--published { background: #dcfce7; color: #166534; }
.admin-lead-status--archived { background: #fee2e2; color: #991b1b; }
.admin-lead-status--sold_out { background: #fef3c7; color: #92400e; }
.admin-lead-status--reserved { background: #e0e7ff; color: #3730a3; }

#detailsContent .basic-photo-desc-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

