.document-card {
    overflow: hidden;
    background: #0d1420;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.documents .document-card .document-preview {
    position: relative;
    display: block;
    padding: 0;
    background: #080d15;
    border: 0;
    border-radius: 0;
}

.display-document {
    width: 100%;
    min-height: 180px;
    display: grid;
    place-content: center;
    gap: 5px;
    background: #080d15;
    border: 0;
    border-radius: 0;
    color: #dce6ff;
}

.display-document small {
    color: var(--muted);
    font-weight: 500;
}

.hide-preview {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(11, 17, 27, .92);
    backdrop-filter: blur(8px);
}

.document-preview img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    background: #080d15;
}

.document-file {
    min-height: 180px;
    display: grid;
    place-items: center;
    background: #080d15;
}

.document-file span {
    padding: 12px 16px;
    border-radius: 10px;
    background: #2b3852;
    color: #dce6ff;
    font-weight: 800;
}

.document-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 15px;
}

.documents .document-card .document-details a {
    display: inline;
    flex: none;
    padding: 0;
    background: none;
    border: 0;
    color: var(--blue);
    font-size: .88rem;
    text-decoration: none;
}

.documents .document-card .document-details a:hover {
    text-decoration: underline;
}

.chart-section,
.booking-status-section,
.period-section {
    margin-top: 28px;
}

.booking-status-section {
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.open-bookings {
    color: #ffd776;
    font-size: .9rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.status-stat {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0d1420;
}

a.status-stat {
    color: inherit;
    text-decoration: none;
}

a.status-stat:hover {
    filter: brightness(1.15);
}

.status-stat strong,
.status-stat span {
    display: block;
}

.status-stat strong {
    font-size: 1.45rem;
}

.status-stat span {
    color: var(--muted);
    font-size: .82rem;
}

.status-pending { border-color: #6b5522; }
.status-accepted { border-color: #285794; }
.status-completed { border-color: #276946; }
.status-declined,
.status-cancelled { border-color: #71303e; }

.chart-section {
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.section-heading,
.chart-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
}

.chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-users,
.chart-bar.users {
    background: var(--blue);
}

.legend-bookings,
.chart-bar.bookings {
    background: #56d6a0;
}

.activity-chart {
    height: 260px;
    margin-top: 24px;
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(14, minmax(34px, 1fr));
    gap: 8px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.chart-column {
    min-width: 34px;
    display: grid;
    grid-template-rows: 1fr 28px;
    gap: 8px;
    text-align: center;
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4px;
    min-height: 190px;
}

.chart-bar {
    width: min(14px, 42%);
    min-height: 2px;
    border-radius: 5px 5px 2px 2px;
    transition: filter .15s ease;
}

.chart-bar:hover {
    filter: brightness(1.25);
}

.chart-column small {
    white-space: nowrap;
    font-size: .68rem;
}

.toolbar button:disabled {
    cursor: wait;
    opacity: .65;
}

.supply-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) minmax(250px, 1.15fr) auto;
    align-items: end;
    gap: 14px;
}

.supply-filters select {
    min-width: 170px;
    font: inherit;
    color: #fff;
    background: #0b111b;
    border: 1px solid #354159;
    border-radius: 9px;
    padding: 10px 12px;
}

.supply-filter-toggles {
    display: grid;
    gap: 8px;
    align-self: end;
    min-height: 44px;
    padding: 2px 0;
}

.supply-filter-check {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: fit-content;
    margin: 0;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
}

.supply-filter-check input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--blue);
}

.supply-filter-check:has(input:disabled) {
    opacity: .55;
}

.supply-apply {
    align-self: end;
}

.supply-summary div {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
}

.supply-summary strong,
.supply-summary span {
    display: block;
}

.supply-summary strong {
    font-size: 2rem;
}

.supply-summary span {
    color: var(--muted);
}

.supply-section {
    margin-top: 28px;
}

.supply-section .section-heading {
    margin-bottom: 14px;
}

.supply-section .section-heading > small {
    max-width: 520px;
    text-align: right;
}

.supply-bar {
    width: 130px;
    height: 9px;
    overflow: hidden;
    border-radius: 99px;
    background: #0b111b;
}

.supply-bar span {
    display: block;
    min-width: 2px;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

.user-link,
.back-link {
    color: inherit;
    text-decoration: none;
}

.user-link:hover strong,
.back-link:hover {
    color: var(--blue);
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--muted);
}

.detail-header,
.detail-header > div,
.timeline article > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.detail-header > div {
    display: block;
}

.detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.detail-summary article,
.detail-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.detail-summary article {
    padding: 18px;
}

.detail-summary span,
.detail-summary strong,
.detail-summary small {
    display: block;
}

.detail-summary span {
    color: var(--muted);
    font-size: .8rem;
}

.detail-summary strong {
    margin: 4px 0;
    font-size: 1.15rem;
}

.detail-grid,
.detail-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-card {
    padding: 22px;
}

.detail-section {
    margin-top: 18px;
}

.access-card input {
    width: 100%;
    margin: 8px 0 10px;
}

.professional-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.professional-grid dl {
    grid-template-columns: 125px 1fr;
}

.timeline {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.timeline article {
    padding: 14px;
    background: #0d1420;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.timeline p {
    margin: 8px 0 0;
}

.timeline blockquote {
    margin-bottom: 4px;
}

.timeline.compact article {
    display: grid;
    gap: 4px;
}

.booking-filters {
    flex-wrap: wrap;
}

.booking-filters input {
    flex: 1 1 320px;
}

.booking-filters select {
    min-width: 190px;
    font: inherit;
    color: #fff;
    background: #0b111b;
    border: 1px solid #354159;
    border-radius: 9px;
    padding: 10px 12px;
}

.moderation-filters {
    flex-wrap: wrap;
}

.moderation-filters input {
    flex: 1 1 320px;
}

.moderation-filters select {
    min-width: 190px;
    font: inherit;
    color: #fff;
    background: #0b111b;
    border: 1px solid #354159;
    border-radius: 9px;
    padding: 10px 12px;
}

.audit-filters {
    flex-wrap: wrap;
}

.audit-filters input {
    flex: 1 1 300px;
}

.audit-filters select {
    min-width: 160px;
    font: inherit;
    color: #fff;
    background: #0b111b;
    border: 1px solid #354159;
    border-radius: 9px;
    padding: 10px 12px;
}

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

.health-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.health-card > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.health-card p,
.status-timestamp {
    margin-bottom: 0;
}

.health-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 112, 123, .12);
}

.health-card.healthy .health-dot {
    background: #56d6a0;
    box-shadow: 0 0 0 4px rgba(86, 214, 160, .12);
}

.operations-summary a {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.operations-summary a:hover {
    filter: brightness(1.12);
}

.decision-summary {
    margin-top: 16px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0d1420;
}

.decision-summary p {
    margin: 5px 0 0;
}

.attention-row {
    box-shadow: inset 3px 0 #ff707b;
}

.compact-stats {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.privacy-note {
    margin-bottom: 0;
    font-size: .85rem;
}

.host-summary { margin-top: 22px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.host-summary-values { display: flex; flex-wrap: wrap; gap: 18px 32px; margin: 18px 0; }
.host-summary-values span { display: grid; gap: 4px; }
.host-summary-values strong { font-size: 1.25rem; }
.host-metrics { margin-bottom: 20px; }
.host-metrics article { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.monitor-warning { color: #ff8e98; }

.region-map-card {
    margin: 20px 0;
    padding: 20px;
    background: #0d1420;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.region-map-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.region-map-heading h3 { margin: 3px 0 0; }

.region-map-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: .78rem;
}

.region-map-legend i {
    width: 18px;
    height: 12px;
    border-radius: 3px;
}

.england-region-map {
    display: block;
    width: min(100%, 570px);
    max-height: 620px;
    margin: 16px auto;
}

.england-region-map use {
    stroke: #0b0f17;
    stroke-width: 2.4;
    vector-effect: non-scaling-stroke;
    transition: fill .18s ease;
}

.county-map-base {
    pointer-events: none;
}

.county-map-number {
    font-size: 11px;
}

.map-level-0 { fill: #222c3d; }
.map-level-1, .region-map-legend .level-1 { fill: #31216d; background: #31216d; }
.map-level-2, .region-map-legend .level-2 { fill: #45319a; background: #45319a; }
.map-level-3, .region-map-legend .level-3 { fill: #5f48c8; background: #5f48c8; }
.map-level-4, .region-map-legend .level-4 { fill: #7963e7; background: #7963e7; }
.map-level-5, .region-map-legend .level-5 { fill: #9b8aff; background: #9b8aff; }
.map-suppressed { fill: #293349; }

.region-map-number-bg {
    fill: rgba(8, 13, 21, .88);
    stroke: rgba(255, 255, 255, .35);
    stroke-width: 1;
}

.region-map-number {
    fill: #fff;
    font: 800 14px Inter, ui-sans-serif, system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

.region-map-card figcaption {
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.45;
}

@media (max-width: 1180px) {
    .supply-filters {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .supply-filter-toggles {
        grid-column: span 2;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 22px;
    }

    .supply-apply {
        justify-self: start;
    }
}

@media (max-width: 800px) {
    .supply-filters {
        grid-template-columns: 1fr;
    }

    .supply-filter-toggles {
        grid-column: auto;
        display: grid;
    }

    .document-details,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-chart {
        grid-template-columns: repeat(14, 42px);
    }

    .status-grid {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    .detail-summary,
    .detail-grid,
    .detail-columns,
    .professional-grid {
        grid-template-columns: 1fr;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }

    .region-map-heading {
        flex-direction: column;
    }
}
