
/* PRAWNIKOM PRO — KARTA DZIAŁKI */

.property-reader-frame {
    --pr-navy: #142641;
    --pr-gold: #c6a46a;
    --pr-border: #dce4ee;
    --pr-muted: #64748b;

    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 20px;
    background: #f1f5f9;
    color: var(--pr-navy);
    box-sizing: border-box;
}

.property-reader-frame * {
    box-sizing: border-box;
}

.property-reader-frame [hidden] {
    display: none !important;
}

.property-reader-frame a {
    text-decoration: none !important;
}

.property-reader-frame > main.content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* MENU LOKALNE */

.property-reader-frame .local-parcel-app-sidebar {
    position: sticky;
    top: calc(var(--pp-header-offset, 120px) + 20px);
    width: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--pr-border);
    border-top: 3px solid var(--pr-gold);
    padding: 16px;
}

.local-parcel-sidebar-brand {
    padding: 16px 8px;
    color: #142641;
    font-weight: 700;
    border-bottom: 1px solid #dce4ee;
}

.local-parcel-sidebar-context,
.local-parcel-sidebar-context-actions,
.local-parcel-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
}

.local-parcel-app-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px;
    color: #142641 !important;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

.local-parcel-app-sidebar a:hover {
    background: #f1f5f9;
    border-color: #dce4ee;
}

.local-parcel-app-sidebar svg {
    color: #a88648;
    flex-shrink: 0;
}

/* NAGŁÓWEK */

.local-parcel-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
    color: #64748b;
    font-size: 12px;
}

.local-parcel-workspace-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
    border: 1px solid #dce4ee;
    padding: 14px 20px;
}

.property-reader-frame .easement-fast-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 28px !important;
    margin: 16px 0 !important;
    background: linear-gradient(120deg,#0d192d,#203b5e);
    border-bottom: 3px solid #c6a46a;
    color: #fff;
}

.property-reader-frame .page-head-main {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.property-reader-frame .page-head-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    background: #ffffff0d;
    border: 1px solid #c6a46a;
    color: #e4c78e;
    flex-shrink: 0;
}

.property-reader-frame .page-head-icon svg {
    width: 32px;
    height: 32px;
}

.property-reader-frame .page-head-copy h1 {
    color: #fff !important;
    font-family: Georgia, serif;
    font-size: clamp(26px,3vw,42px);
    margin: 0 0 8px;
}

.property-reader-frame .parcel-full-id {
    color: #e4c78e !important;
    overflow-wrap: anywhere;
}

.property-reader-frame .head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* GŁÓWNA KARTA */

.local-parcel-dashboard-shell {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.local-parcel-card {
    background: #fff;
    border: 1px solid #dce4ee;
    border-top: 3px solid #c6a46a;
    padding: 24px;
    min-width: 0;
}

.local-parcel-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dce4ee;
    font-size: 12px;
    color: #64748b;
}

.local-parcel-hero {
    padding: 20px 0;
    color: #142641;
}

.local-parcel-hero h1,
.local-parcel-hero h2 {
    font-family: Georgia, serif;
    color: #142641;
}

/* PARAMETRY DZIAŁKI */

.local-parcel-metrics {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 12px;
    margin: 18px 0;
}

.local-parcel-metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    min-width: 0;
    min-height: 120px;
    background: #f8fafc;
    border: 1px solid #dce4ee;
    border-top: 3px solid #c6a46a;
    overflow-wrap: anywhere;
}

.local-parcel-metric:nth-child(2) {
    border-top-color: #167d83;
}

.local-parcel-metric:nth-child(3) {
    border-top-color: #2563eb;
}

.local-parcel-metric:nth-child(4) {
    border-top-color: #7653a6;
}

.local-parcel-metric small,
.local-parcel-metric span {
    font-size: 12px;
    color: #64748b;
}

.local-parcel-metric strong,
.local-parcel-metric b {
    color: #142641;
    font-size: clamp(17px,1.7vw,27px);
    font-weight: 700;
}

/* MAPA I DANE EWIDENCYJNE */

.local-parcel-grid {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(260px,340px);
    align-items: start;
    gap: 18px;
    min-width: 0;
}

.local-parcel-grid > details {
    min-width: 0;
}

.local-parcel-map-panel,
.local-parcel-side-panel {
    min-width: 0;
    background: #fff;
    border: 1px solid #dce4ee;
    padding: 18px;
}

.local-parcel-map-shell {
    position: relative;
    width: 100%;
    min-width: 0;
}

.local-parcel-leaflet,
[data-local-parcel-map] {
    position: relative !important;
    width: 100% !important;
    height: 480px !important;
    min-height: 480px !important;
    overflow: hidden;
    background: #e5e9e4;
    border: 1px solid #dce4ee;
    isolation: isolate;
    z-index: 1;
}

.local-parcel-leaflet img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

.local-parcel-leaflet .leaflet-control-zoom a {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    line-height: 32px !important;
    text-align: center;
    color: #142641 !important;
    background: #fff !important;
}

/* ROZWIJANE SEKCJE */

.property-reader-frame details {
    background: #fff;
    border: 1px solid #dce4ee;
    margin-bottom: 12px;
    min-width: 0;
}

.property-reader-frame details > summary {
    padding: 16px 20px;
    background: #f8fafc;
    color: #142641;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.property-reader-frame details[open] > summary {
    border-bottom: 1px solid #dce4ee;
    border-left: 3px solid #c6a46a;
}

/* RAPORTY INFRASTRUKTURY */

.local-parcel-map-objects,
.local-parcel-easement-analysis,
.local-parcel-saved-valuation,
[data-local-infrastructure-report] {
    padding: 20px;
    margin: 16px 0;
    background: #fff;
    border: 1px solid #dce4ee;
    border-left: 3px solid #c6a46a;
    color: #142641;
    overflow-wrap: anywhere;
}

.local-parcel-dashboard-grid,
.local-parcel-report-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
    padding: 18px;
}

.local-parcel-dashboard-grid > *,
.local-parcel-report-grid > * {
    min-width: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #dce4ee;
}

.local-parcel-full-reports {
    margin-top: 20px;
}

.local-parcel-quick-actions,
.local-parcel-source-row,
.local-parcel-sync {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
}

/* DANE TABELARYCZNE */

.property-reader-frame dl {
    margin: 0;
}

.property-reader-frame dt {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 6px;
}

.property-reader-frame dd {
    color: #142641;
    font-weight: 600;
    margin: 0 0 14px;
    overflow-wrap: anywhere;
}

.property-reader-frame table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.property-reader-frame th,
.property-reader-frame td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dce4ee;
    overflow-wrap: anywhere;
}

.property-reader-frame th {
    background: #f1f5f9;
    color: #142641;
}

/* MATERIAŁ DOWODOWY */

.local-parcel-evidence,
.property-reader-frame .parcel-wizard {
    padding: 24px;
    background: #fff;
    border: 1px solid #dce4ee;
}

.property-reader-frame input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.property-reader-frame select,
.property-reader-frame textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #142641;
    font: inherit;
    border-radius: 0;
}

.property-reader-frame label {
    font-size: 13px;
    font-weight: 600;
    color: #142641;
}

.property-reader-frame fieldset {
    padding: 20px;
    border: 1px solid #dce4ee;
    min-width: 0;
}

.local-parcel-footer {
    padding: 20px;
    color: #64748b;
    background: #fff;
    border-top: 1px solid #dce4ee;
    font-size: 12px;
    line-height: 1.7;
}

/* RESPONSYWNOŚĆ */

@media(max-width:1400px) {
    .local-parcel-metrics {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .local-parcel-grid {
        grid-template-columns: minmax(0,1fr);
    }
}

@media(max-width:1000px) {
    .property-reader-frame {
        grid-template-columns: minmax(0,1fr);
        padding: 12px;
    }

    .property-reader-frame .local-parcel-app-sidebar {
        position: static;
    }

    .local-parcel-sidebar-context {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px) {
    .local-parcel-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .local-parcel-dashboard-grid,
    .local-parcel-report-grid {
        grid-template-columns: minmax(0,1fr);
        padding: 10px;
    }

    .local-parcel-card,
    .local-parcel-map-panel,
    .local-parcel-side-panel {
        padding: 12px;
    }

    .local-parcel-metric {
        padding: 12px;
    }

    .local-parcel-leaflet,
    [data-local-parcel-map] {
        height: 340px !important;
        min-height: 340px !important;
    }
}

@media print {
    .local-parcel-app-sidebar,
    .local-parcel-quick-actions,
    .property-reader-frame .head-actions {
        display: none !important;
    }

    .property-reader-frame {
        display: block !important;
        padding: 0;
        background: #fff;
    }
}

