body {
    min-height: 100vh;
}

.card {
    border-radius: 1rem;
}

code {
    word-break: break-word;
}

.status-box {
    white-space: pre-wrap;
}
/* Ward page v1.2 improvements */
.ward-hero {
    overflow: hidden;
}

.summary-card .display-6 {
    line-height: 1;
}

.ward-letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.ward-street-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: .65rem;
}

@media (min-width: 768px) {
    .ward-street-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .ward-street-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.ward-street-card {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(16, 24, 40, .1);
    border-radius: .9rem;
    color: #101828;
    display: flex;
    font-weight: 600;
    justify-content: space-between;
    min-height: 3.25rem;
    padding: .85rem 1rem;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ward-street-card:hover,
.ward-street-card:focus {
    border-color: rgba(13, 110, 253, .35);
    box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
    color: #0d6efd;
    transform: translateY(-1px);
}

.ward-street-arrow {
    color: rgba(16, 24, 40, .45);
    flex: 0 0 auto;
    font-weight: 800;
    margin-left: .75rem;
}

.ward-street-group {
    scroll-margin-top: 1rem;
}

.ward-accordion-icon {
    align-items: center;
    background: #fff;
    border: 3px solid currentColor;
    border-radius: 14px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    line-height: 1;
    width: 44px;
}

/* Ward page v1.4 resident street priority */
.ward-priority-streets .ward-street-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ward-street-card-priority {
    background: rgba(13, 110, 253, .04);
    border-color: rgba(13, 110, 253, .28);
}

/* Neighbourhood Network v1.5 visual refresh */
:root {
    --nn-navy: #13294b;
    --nn-navy-2: #0f213d;
    --nn-orange: #f28c28;
    --nn-orange-2: #ff9a3d;
    --nn-bg: #f7f4ef;
    --nn-surface: #ffffff;
    --nn-border: rgba(19, 41, 75, .11);
    --nn-muted: #64748b;
}

body {
    background:
        radial-gradient(circle at top left, rgba(242, 140, 40, .08), transparent 34rem),
        linear-gradient(180deg, #fbfaf7 0%, var(--nn-bg) 100%) !important;
    color: #1f2937;
}

.navbar.bg-primary {
    background: var(--nn-navy) !important;
    box-shadow: 0 10px 28px rgba(15, 33, 61, .16);
}

.navbar-brand {
    color: #fff !important;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, .82) !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff !important;
}

.site-footer {
    background: var(--nn-navy-2) !important;
}

.card,
.map-card,
.info-card {
    border: 1px solid var(--nn-border) !important;
    border-radius: 1.1rem !important;
    box-shadow: 0 12px 30px rgba(15, 33, 61, .075) !important;
}

.info-card {
    background: rgba(255, 255, 255, .96);
}

.ward-hero {
    background:
        linear-gradient(135deg, rgba(19, 41, 75, .96), rgba(19, 41, 75, .82)),
        radial-gradient(circle at top right, rgba(242, 140, 40, .35), transparent 20rem);
    color: #fff;
}

.ward-hero .text-muted,
.ward-hero .lead {
    color: rgba(255, 255, 255, .78) !important;
}

.brand-badge {
    background: rgba(242, 140, 40, .16);
    border: 1px solid rgba(242, 140, 40, .45);
    color: #fff;
}

.info-card .brand-badge {
    background: rgba(242, 140, 40, .14);
    color: #8a4a08;
}

.btn-primary {
    --bs-btn-bg: var(--nn-orange);
    --bs-btn-border-color: var(--nn-orange);
    --bs-btn-hover-bg: #dc7614;
    --bs-btn-hover-border-color: #dc7614;
    --bs-btn-active-bg: #c96b12;
    --bs-btn-active-border-color: #c96b12;
    --bs-btn-color: #1a2433;
    --bs-btn-hover-color: #111827;
    font-weight: 700;
}

.btn-outline-primary {
    --bs-btn-color: var(--nn-navy);
    --bs-btn-border-color: rgba(19, 41, 75, .35);
    --bs-btn-hover-bg: var(--nn-navy);
    --bs-btn-hover-border-color: var(--nn-navy);
    --bs-btn-hover-color: #fff;
    font-weight: 700;
}

.btn-outline-secondary {
    --bs-btn-color: #475569;
    --bs-btn-border-color: rgba(71, 85, 105, .28);
    --bs-btn-hover-bg: #475569;
    --bs-btn-hover-border-color: #475569;
    --bs-btn-hover-color: #fff;
}

.form-control,
.form-select {
    border-color: rgba(19, 41, 75, .18);
    border-radius: .85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(242, 140, 40, .75);
    box-shadow: 0 0 0 .25rem rgba(242, 140, 40, .16);
}

.ward-mini-map {
    width: 100%;
    min-height: 380px;
    border: 1px solid rgba(19, 41, 75, .14);
    border-radius: .95rem;
    overflow: hidden;
    background: #e8edf3;
}

@media (max-width: 767.98px) {
    .ward-mini-map {
        min-height: 310px;
    }
}

.ward-map-card .leaflet-container {
    font-family: inherit;
}

.ward-map-fallback {
    align-items: center;
    color: var(--nn-muted);
    display: flex;
    font-weight: 700;
    justify-content: center;
    min-height: 280px;
    padding: 2rem;
    text-align: center;
}

.ward-priority-panel {
    background: linear-gradient(135deg, rgba(242, 140, 40, .12), rgba(19, 41, 75, .04));
    border: 1px solid rgba(242, 140, 40, .22);
    border-radius: 1rem;
    padding: 1rem;
}

.ward-street-card {
    border-color: rgba(19, 41, 75, .12);
    border-radius: .85rem;
    box-shadow: none;
}

.ward-street-card:hover,
.ward-street-card:focus {
    border-color: rgba(242, 140, 40, .55);
    box-shadow: 0 10px 24px rgba(15, 33, 61, .08);
    color: var(--nn-navy);
}

.ward-street-card-priority {
    background: #fff;
    border-color: rgba(242, 140, 40, .38);
}

.ward-actions-card .card-body {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.ward-actions-card .d-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
}

.ward-actions-card .btn {
    width: auto;
}

.ward-info-accordion .accordion-item {
    border: 1px solid var(--nn-border) !important;
    box-shadow: 0 10px 24px rgba(15, 33, 61, .065) !important;
}

.ward-info-accordion .accordion-button {
    background: #fff;
    color: var(--nn-navy);
    padding: 1.1rem 1.25rem;
}

.ward-info-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, rgba(242, 140, 40, .09), rgba(19, 41, 75, .025));
    box-shadow: none;
    color: var(--nn-navy);
}

.ward-info-accordion .accordion-button:focus {
    border-color: rgba(242, 140, 40, .45);
    box-shadow: 0 0 0 .2rem rgba(242, 140, 40, .12);
}

.ward-feature-icon {
    align-items: center;
    background: #fff;
    border: 2px solid rgba(19, 41, 75, .16);
    border-radius: 14px;
    color: var(--nn-navy);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    line-height: 1;
    position: relative;
    width: 44px;
}

.ward-feature-icon-speed {
    border: 4px solid #d71920;
    border-radius: 50%;
    color: #111827;
    font-size: .96rem;
}

.ward-feature-icon-info {
    background: var(--nn-navy);
    border-color: var(--nn-navy);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-style: italic;
}

.ward-feature-icon-news {
    background: #fff;
    border-color: rgba(19, 41, 75, .28);
}

.ward-feature-icon-news::before {
    border: 2px solid var(--nn-navy);
    border-radius: 4px;
    content: '';
    height: 24px;
    left: 11px;
    position: absolute;
    top: 9px;
    width: 22px;
}

.ward-feature-icon-news::after {
    background: linear-gradient(var(--nn-navy), var(--nn-navy)) 0 0 / 15px 2px no-repeat,
                linear-gradient(var(--nn-navy), var(--nn-navy)) 0 7px / 15px 2px no-repeat,
                linear-gradient(var(--nn-orange), var(--nn-orange)) 0 14px / 10px 2px no-repeat;
    content: '';
    height: 18px;
    left: 15px;
    position: absolute;
    top: 14px;
    width: 16px;
}

.ward-feature-icon-fix {
    background: rgba(242, 140, 40, .13);
    border-color: rgba(242, 140, 40, .55);
}

.ward-feature-icon-fix::before {
    background: var(--nn-navy);
    border-radius: 4px;
    content: '';
    height: 23px;
    position: absolute;
    transform: rotate(42deg);
    width: 6px;
}

.ward-feature-icon-fix::after {
    background: var(--nn-orange);
    border-radius: 50%;
    box-shadow: 0 15px 0 var(--nn-orange);
    content: '';
    height: 8px;
    position: absolute;
    transform: rotate(42deg);
    width: 8px;
}

/* v1.6 structure reset: Ward Hub / Street Centre clarity */
.feature-action-card,
.street-tool-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    height: 100%;
    padding: 1rem;
    border: 1px solid rgba(15, 35, 64, 0.12);
    border-radius: 1.1rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(15, 35, 64, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.feature-action-card:hover,
.street-tool-card:hover {
    transform: translateY(-2px);
    border-color: rgba(242, 140, 40, 0.45);
    box-shadow: 0 16px 36px rgba(15, 35, 64, 0.1);
    color: inherit;
}

.feature-action-card-highlight,
.street-tool-card-highlight {
    border-color: rgba(242, 140, 40, 0.35);
    background: linear-gradient(180deg, #fff, rgba(242, 140, 40, 0.06));
}

.feature-action-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(15, 35, 64, 0.08);
    color: var(--brand-navy, #10233f);
}

.feature-action-icon-activity::before,
.feature-action-icon-activity::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
}

.feature-action-icon-activity::before {
    top: 14px;
    box-shadow: 0 7px 0 currentColor;
}

.feature-action-icon-activity::after {
    bottom: 10px;
    right: 18px;
}

.feature-action-icon-cctv {
    background: rgba(242, 140, 40, 0.14);
    color: #c96810;
}

.feature-action-icon-cctv::before {
    content: '';
    width: 20px;
    height: 13px;
    border: 3px solid currentColor;
    border-radius: 5px;
    transform: skewX(-8deg);
}

.feature-action-icon-cctv::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
    right: 6px;
    bottom: 10px;
    transform: rotate(-24deg);
}

.feature-action-icon-speed {
    border-radius: 50%;
    background: #fff;
    border: 4px solid #d71920;
    color: #10233f;
    font-weight: 800;
    font-size: 0.9rem;
}

.street-centre-hero {
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(15, 35, 64, 0.06), rgba(242, 140, 40, 0.09));
    border: 1px solid rgba(15, 35, 64, 0.08);
}

.street-context-card {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(15, 35, 64, 0.1);
}

.street-tool-card {
    padding: 1.2rem;
}

.street-tool-title,
.street-tool-text,
.street-tool-stat {
    display: block;
}

.street-tool-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--brand-navy, #10233f);
    margin-bottom: 0.25rem;
}

.street-tool-text {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.35;
    margin-bottom: 0.65rem;
}

.street-tool-stat {
    font-size: 0.82rem;
    font-weight: 700;
    color: #c96810;
}

.snapshot-list {
    display: grid;
    gap: 0.65rem;
}

.snapshot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(15, 35, 64, 0.08);
    color: #64748b;
}

.snapshot-row:last-child {
    border-bottom: 0;
}

.snapshot-row strong {
    color: var(--brand-navy, #10233f);
    font-size: 1.1rem;
}

@media (max-width: 767.98px) {
    .street-centre-hero {
        padding: 1.1rem;
    }

    .feature-action-card,
    .street-tool-card {
        padding: 0.95rem;
    }
}

/* v1.7 ward page clarity updates */
.ward-hero .btn-primary {
    background: #f28c28;
    border-color: #f28c28;
    color: #111827;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.ward-hero .btn-outline-primary,
.ward-hero .btn-outline-secondary {
    background: rgba(255, 255, 255, .94);
    border-color: rgba(255, 255, 255, .98);
    color: #13294b;
    font-weight: 800;
}

.ward-hero .btn-outline-primary:hover,
.ward-hero .btn-outline-secondary:hover {
    background: #fff;
    border-color: #fff;
    color: #13294b;
}

.ward-feature-icon-activity {
    background: rgba(19, 41, 75, .08);
    border-color: rgba(19, 41, 75, .24);
    color: var(--nn-navy);
}

.ward-feature-icon-activity::before,
.ward-feature-icon-activity::after {
    background: currentColor;
    border-radius: 3px;
    content: '';
    height: 3px;
    left: 12px;
    position: absolute;
    right: 12px;
}

.ward-feature-icon-activity::before {
    top: 14px;
    box-shadow: 0 7px 0 currentColor;
}

.ward-feature-icon-activity::after {
    bottom: 10px;
    right: 18px;
}

.ward-feature-icon-cctv {
    background: rgba(242, 140, 40, .14);
    border-color: rgba(242, 140, 40, .5);
    color: #c96810;
}

.ward-feature-icon-cctv::before {
    border: 3px solid currentColor;
    border-radius: 5px;
    content: '';
    height: 13px;
    position: absolute;
    transform: skewX(-8deg);
    width: 20px;
}

.ward-feature-icon-cctv::after {
    background: currentColor;
    border-radius: 3px;
    bottom: 10px;
    content: '';
    height: 3px;
    position: absolute;
    right: 6px;
    transform: rotate(-24deg);
    width: 12px;
}


/* v1.8 activity grid and ward hero badge contrast */
.ward-hero .brand-badge,
.ward-hero.info-card .brand-badge {
    background: rgba(15, 33, 61, .72);
    border-color: rgba(255, 255, 255, .32);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.activity-summary-card {
    min-height: 100%;
}

.activity-summary-title {
    color: var(--nn-navy);
}

.activity-summary-excerpt {
    color: #475569;
}

.activity-card-grid .modal .badge {
    font-size: .75rem;
}

/* v1.9 ward hub activity simplification */
.ward-info-accordion {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ward-info-accordion .accordion-item {
    margin-bottom: 0 !important;
}

@media (max-width: 991.98px) {
    .ward-info-accordion {
        grid-template-columns: 1fr;
    }
}

.latest-activity-card .brand-badge {
    background: rgba(19, 41, 75, .08);
    border: 1px solid rgba(19, 41, 75, .16);
    color: var(--nn-navy, #13294b);
}

.latest-activity-list {
    display: grid;
    gap: .75rem;
}

.latest-activity-item {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    padding: 1rem;
}

.latest-activity-item-linked {
    background: rgba(242, 140, 40, .12);
    border-color: rgba(242, 140, 40, .45);
}

.latest-activity-item-followed {
    background: rgba(19, 41, 75, .06);
    border-color: rgba(19, 41, 75, .22);
}

.latest-activity-relation-badge {
    background: #13294b;
    color: #fff;
}

.latest-activity-relation-badge-followed {
    background: #f28c28;
    color: #111827;
}

.latest-activity-item a {
    color: var(--nn-navy, #13294b);
    text-decoration: none;
}

.latest-activity-item a:hover {
    text-decoration: underline;
}

/* v1.10 ward latest activity accordion refinement */
.latest-activity-accordion .accordion-button {
    align-items: flex-start;
    padding: 1.5rem;
}

.latest-activity-accordion .accordion-button::after {
    margin-top: .75rem;
}

.latest-activity-accordion .accordion-button:not(.collapsed) {
    background: #fff;
    color: var(--nn-navy, #13294b);
    box-shadow: none;
}

.latest-activity-accordion .brand-badge {
    background: rgba(19, 41, 75, .08);
    border: 1px solid rgba(19, 41, 75, .16);
    color: var(--nn-navy, #13294b);
}

.latest-activity-column {
    background: rgba(248, 250, 252, .85);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    padding: 1rem;
}

.latest-activity-column-pending {
    background: rgba(242, 140, 40, .06);
    border-color: rgba(242, 140, 40, .22);
}

.latest-activity-item-pending {
    border-style: dashed;
    border-color: rgba(242, 140, 40, .45);
}
