html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.divider-text:before,
.divider-text:after {
    color: white;
    content: "";
    flex: 1;
    border-bottom: 1px solid #555;
    margin: auto 0.25rem;
    box-shadow: 0 -2px;
}

/* ===========================
   ORGANIZATIONS INDEX (scoped)
   =========================== */

.orgs .page-wrap {
    max-width: 1200px;
    margin-inline: auto;
}

.orgs .hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg,#0d6efd 0%,#20c997 100%);
    box-shadow: 0 10px 22px rgba(13,110,253,.15);
    color: #fff;
}

    .orgs .hero h2 {
        margin: 0;
        font-weight: 700
    }

    .orgs .hero .btn {
        box-shadow: 0 6px 16px rgba(0,0,0,.15)
    }

.orgs .toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin: 12px 0;
    flex-wrap: wrap;
}

.orgs .search-pill {
    border-radius: 999px;
    padding: .55rem .9rem;
    border: 1px solid #e6e9ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    min-width: 260px;
}

.orgs .size-select {
    border-radius: 999px
}

.orgs #resultCount {
    white-space: nowrap;
}

.orgs .table-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(0,0,0,.05);
    border: 1px solid #eef2f7;
}

.orgs table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 700;
    letter-spacing: .02em;
}

.orgs table tbody tr:hover {
    background: #f6fbff
}

.orgs .addr {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orgs .pill-badge {
    font-weight: 600;
    border-radius: 999px;
    padding: .3rem .6rem;
}

.orgs .actions .btn {
    border-radius: 10px
}

.orgs .btn-outline-primary, .orgs .btn-outline-info, .orgs .btn-outline-danger {
    --bs-btn-font-weight: 600
}

.orgs .pager-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem
}

.orgs .count-text {
    color: #98a2b3
}

.orgs .pagination {
    margin: 0
}

    .orgs .pagination .page-link {
        border: 1px solid #e6e9ef;
        border-radius: 10px;
        margin: 0 .15rem;
        color: #475569;
    }

    .orgs .pagination .active .page-link {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
    }

/* ===========================
   ORGANIZATIONS UPSERT (scoped)
   =========================== */

/* ==== Organizations Upsert (scoped) ==== */

.orgs-upsert .elev-card-groups {
    border: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
}

.orgs-upsert .hero-head {
    background: linear-gradient(135deg,#0d6efd 0%,#6f42c1 100%);
    color: #fff;
}

    .orgs-upsert .hero-head h3 {
        margin: 0;
        font-weight: 700
    }

.orgs-upsert .section-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1rem 1rem 1.25rem 1rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

    .orgs-upsert .section-card + .section-card {
        margin-top: .5rem;
    }

/* Section head (same as Locations) */
.orgs-upsert .section-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

    .orgs-upsert .section-head i {
        font-size: 1.25rem;
        width: 2.2rem;
        height: 2.2rem;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: linear-gradient(135deg,#e8f7ff 0%, #eef4ff 100%);
        color: #0d6efd;
        box-shadow: 0 2px 8px rgba(13,110,253,.15);
    }

/* Actions row (centered buttons) */
.orgs-upsert .section-actions {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .25rem;
}

/* Floating labels spacing to match */
.orgs-upsert .form-floating > .form-control,
.orgs-upsert .form-floating > .form-select {
    padding-top: 1.25rem;
}

.orgs-upsert .form-floating > label {
    opacity: .7;
}

/* Same elevated card depth as Locations (if you keep elev-card-groups) */
.orgs-upsert .elev-card-groups {
    border: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
}


/* ===========================
   ORG DETAILS (scoped)
   =========================== */

/* ==== Groups Details (scoped) ==== */

.orgs-details .hero {
    background: linear-gradient(135deg,#20c997 0%,#0d6efd 100%);
    color: #fff;
    border-radius: .5rem;
}

.orgs-details .tile {
    border: 0;
    box-shadow: 0 10px 18px rgba(0,0,0,.05);
}

/* ===========================
   ORGS (GROUPS) MOBILE TABLE
   =========================== */

@media (max-width: 768px) {

    .orgs table thead {
        display: none;
    }

    .orgs table,
    .orgs table tbody,
    .orgs table tr,
    .orgs table td {
        display: block;
        width: 100%;
    }

        .orgs table tbody tr {
            background: #fff;
            border: 1px solid #e9ecef;
            border-radius: 14px;
            padding: .75rem;
            margin-bottom: 1rem;
            box-shadow: 0 6px 14px rgba(0,0,0,.05);
        }

        .orgs table tbody td {
            border: none !important;
            padding: .5rem 0;
            text-align: left !important;
        }

            .orgs table tbody td::before {
                content: attr(data-label);
                display: block;
                font-size: .75rem;
                font-weight: 600;
                color: #6c757d;
                margin-bottom: .25rem;
                text-transform: uppercase;
                letter-spacing: .03em;
            }

    .orgs .actions .d-flex {
        justify-content: flex-start !important;
    }

    .orgs .form-check {
        justify-content: flex-start !important;
    }

    .orgs .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

        .orgs .toolbar .d-flex {
            flex-direction: column;
            gap: .5rem;
        }

    .orgs .size-select {
        width: 100% !important;
    }

    .orgs .pager-wrap {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===========================
   CONTACTS INDEX (scoped)
   =========================== */

.contacts .page-wrap {
    max-width: 1200px;
    margin-inline: auto;
}

.contacts .hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg,#0d6efd 0%, #6610f2 100%); /* blue ? indigo, harmonious with theme */
    box-shadow: 0 10px 22px rgba(13,110,253,.15);
    color: #fff;
}

    .contacts .hero h2 {
        margin: 0;
        font-weight: 700
    }

    .contacts .hero .btn {
        box-shadow: 0 6px 16px rgba(0,0,0,.15)
    }

.contacts .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 12px 0;
}

.contacts .search-pill {
    border-radius: 999px;
    padding: .55rem .9rem;
    border: 1px solid #e6e9ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    min-width: 260px;
}

.contacts #resultCount {
    white-space: nowrap;
}

.contacts .table-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(13,110,253,.08);
    border: 1px solid #eef2f7;
}

.contacts table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 700;
    letter-spacing: .02em;
}

.contacts table tbody tr:hover {
    background: #f6fbff
}

.contacts .pill-badge {
    font-weight: 600;
    border-radius: 999px;
    padding: .3rem .6rem
}

.contacts .actions .btn {
    border-radius: 10px
}

.contacts .btn-outline-primary,
.contacts .btn-outline-info,
.contacts .btn-outline-danger {
    --bs-btn-font-weight: 600
}

.contacts .pager-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem
}

.contacts .count-text {
    color: #98a2b3
}

.contacts .pagination {
    margin: 0
}

    .contacts .pagination .page-link {
        border: 1px solid #e6e9ef;
        border-radius: 10px;
        margin: 0 .15rem;
        color: #475569;
    }

    .contacts .pagination .active .page-link {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
    }

/* ===========================
   CONTACTS UPSERT (scoped)
   =========================== */

.contacts-upsert .elev-card {
    border: 0;
    box-shadow: 0 12px 24px rgba(102,16,242,.08);
}

.contacts-upsert .hero-head {
    background: linear-gradient(135deg,#6610f2 0%, #0d6efd 100%); /* indigo ? blue */
    color: #fff;
}

    .contacts-upsert .hero-head h3 {
        margin: 0;
        font-weight: 700
    }

.contacts-upsert .section-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1rem 1rem 1.25rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

    .contacts-upsert .section-card + .section-card {
        margin-top: .5rem;
    }

.contacts-upsert .section-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

    .contacts-upsert .section-head i {
        font-size: 1.25rem;
        width: 2.2rem;
        height: 2.2rem;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: linear-gradient(135deg,#e8f7ff 0%, #eef4ff 100%);
        color: #0d6efd;
        box-shadow: 0 2px 8px rgba(13,110,253,.15);
    }

.contacts-upsert .section-actions {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .25rem;
}

.contacts-upsert .form-floating > .form-control,
.contacts-upsert .form-floating > .form-select {
    padding-top: 1.25rem;
}

.contacts-upsert .form-floating > label {
    opacity: .7;
}

/* ===========================
   CONTACTS MOBILE TABLE
   =========================== */

@media (max-width: 768px) {

    .contacts table thead {
        display: none;
    }

    .contacts table,
    .contacts table tbody,
    .contacts table tr,
    .contacts table td {
        display: block;
        width: 100%;
    }

        .contacts table tbody tr {
            background: #fff;
            border: 1px solid #e9ecef;
            border-radius: 14px;
            padding: .75rem;
            margin-bottom: 1rem;
            box-shadow: 0 6px 14px rgba(0,0,0,.05);
        }

        .contacts table tbody td {
            border: none !important;
            padding: .5rem 0;
            text-align: left !important;
        }

            .contacts table tbody td::before {
                content: attr(data-label);
                display: block;
                font-size: .75rem;
                font-weight: 600;
                color: #6c757d;
                margin-bottom: .25rem;
                text-transform: uppercase;
                letter-spacing: .03em;
            }

    .contacts .actions {
        justify-content: flex-start !important;
    }

    .contacts .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

        .contacts .toolbar .d-flex {
            flex-direction: column;
            gap: .5rem;
        }

    .contacts .size-select {
        width: 100% !important;
    }

    .contacts .pager-wrap {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===========================
   LOCATIONS INDEX (scoped)
   =========================== */

.locations .page-wrap {
    max-width: 1200px;
    margin-inline: auto
}

.locations .hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg,#0d6efd 0%, #0aa2c0 100%); /* blue → cyan */
    box-shadow: 0 10px 22px rgba(13,110,253,.15);
    color: #fff;
}

    .locations .hero h2 {
        margin: 0;
        font-weight: 700
    }

    .locations .hero .btn {
        box-shadow: 0 6px 16px rgba(0,0,0,.15)
    }

.locations .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 12px 0
}

.locations .search-pill {
    border-radius: 999px;
    padding: .55rem .9rem;
    border: 1px solid #e6e9ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    min-width: 260px
}

.locations .size-select {
    border-radius: 999px
}

.locations #resultCount {
    white-space: nowrap
}

.locations .table-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(0,0,0,.05);
    border: 1px solid #eef2f7
}

.locations table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 700;
    letter-spacing: .02em
}

.locations table tbody tr:hover {
    background: #f6fbff
}

.locations .addr {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.locations .pill-badge {
    font-weight: 600;
    border-radius: 999px;
    padding: .3rem .6rem
}

.locations .actions .btn {
    border-radius: 10px
}

.locations .btn-outline-primary, .locations .btn-outline-info, .locations .btn-outline-danger {
    --bs-btn-font-weight: 600
}

.locations .pager-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem
}

.locations .count-text {
    color: #98a2b3
}

.locations .pagination {
    margin: 0
}

    .locations .pagination .page-link {
        border: 1px solid #e6e9ef;
        border-radius: 10px;
        margin: 0 .15rem;
        color: #475569
    }

    .locations .pagination .active .page-link {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd
    }

/* ===========================
   LOCATIONS UPSERT (scoped)
   =========================== */

.locations-upsert .elev-card {
    border: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.06)
}

.locations-upsert .hero-head {
    background: linear-gradient(135deg,#0aa2c0 0%, #0d6efd 100%); /* cyan → blue, cohesive with theme */
    color: #fff;
}

    .locations-upsert .hero-head h3 {
        margin: 0;
        font-weight: 700
    }

/* Section card */
.locations-upsert .section-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1rem 1rem 1.25rem 1rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

    .locations-upsert .section-card + .section-card {
        margin-top: .5rem;
    }

.locations-upsert .section-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

    .locations-upsert .section-head i {
        font-size: 1.25rem;
        width: 2.2rem;
        height: 2.2rem;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: linear-gradient(135deg,#e8f7ff 0%, #eef4ff 100%);
        color: #0d6efd;
        box-shadow: 0 2px 8px rgba(13,110,253,.15);
    }

.locations-upsert .section-actions {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .25rem
}

/* Floating label smoothing */
.locations-upsert .form-floating > .form-control,
.locations-upsert .form-floating > .form-select {
    padding-top: 1.25rem;
}

.locations-upsert .form-floating > label {
    opacity: .7;
}

/* ===========================
   LOCATIONS MOBILE TABLE
   =========================== */

@media (max-width: 768px) {

    .locations table thead {
        display: none;
    }

    .locations table,
    .locations table tbody,
    .locations table tr,
    .locations table td {
        display: block;
        width: 100%;
    }

        .locations table tbody tr {
            background: #fff;
            border: 1px solid #e9ecef;
            border-radius: 14px;
            padding: .75rem;
            margin-bottom: 1rem;
            box-shadow: 0 6px 14px rgba(0,0,0,.05);
        }

        .locations table tbody td {
            border: none !important;
            padding: .5rem 0;
            text-align: left !important;
        }

            .locations table tbody td::before {
                content: attr(data-label);
                display: block;
                font-size: .75rem;
                font-weight: 600;
                color: #6c757d;
                margin-bottom: .25rem;
                text-transform: uppercase;
                letter-spacing: .03em;
            }

    .locations .actions .d-flex {
        justify-content: flex-start !important;
    }

    .locations .form-check {
        justify-content: flex-start !important;
    }

    .locations .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

        .locations .toolbar .d-flex {
            flex-direction: column;
            gap: .5rem;
        }

    .locations .size-select {
        width: 100% !important;
    }

    .locations .pager-wrap {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===========================
   INSPECTIONS INDEX (scoped)
   =========================== */

.inspections .page-wrap {
    max-width: 1200px;
    margin-inline: auto
}

.inspections .hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg,#0d6efd 0%, #4dabf7 100%); /* blue → lighter blue */
    box-shadow: 0 10px 22px rgba(13,110,253,.15);
    color: #fff;
}

    .inspections .hero h2 {
        margin: 0;
        font-weight: 700
    }

    .inspections .hero .btn {
        box-shadow: 0 6px 16px rgba(0,0,0,.15)
    }

.inspections .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 12px 0
}

.inspections .search-pill {
    border-radius: 999px;
    padding: .55rem .9rem;
    border: 1px solid #e6e9ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    min-width: 260px
}

.inspections .size-select {
    border-radius: 999px
}

.inspections #resultCount {
    white-space: nowrap
}

.inspections .table-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(0,0,0,.05);
    border: 1px solid #eef2f7
}

.inspections table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 700;
    letter-spacing: .02em
}

.inspections table tbody tr:hover {
    background: #f6fbff
}

.inspections .thumb {
    height: 40px;
    width: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}


.inspections .pill-badge {
    font-weight: 600;
    border-radius: 999px;
    padding: .3rem .6rem
}

.inspections .actions .btn {
    border-radius: 10px
}

.inspections .btn-outline-primary, .inspections .btn-outline-info, .inspections .btn-outline-danger {
    --bs-btn-font-weight: 600
}

.inspections .pager-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem
}

.inspections .count-text {
    color: #98a2b3
}

.inspections .pagination {
    margin: 0
}

    .inspections .pagination .page-link {
        border: 1px solid #e6e9ef;
        border-radius: 10px;
        margin: 0 .15rem;
        color: #475569
    }

    .inspections .pagination .active .page-link {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd
    }

/* ===========================
   INSPECTIONS UPSERT (scoped)
   =========================== */

.inspections-upsert .elev-card {
    border: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.06)
}

.inspections-upsert .hero-head {
    background: linear-gradient(135deg,#4dabf7 0%, #0d6efd 100%); /* light blue → blue */
    color: #fff;
}

    .inspections-upsert .hero-head h3 {
        margin: 0;
        font-weight: 700
    }

.inspections-upsert #existingImages .existing-img-tile {
    width: 140px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: .5rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.04);
}

.inspections-upsert .existing-thumb {
    max-height: 80px;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: .25rem;
}

.inspections-upsert #pendingList .form-control {
    min-width: 170px;
}

.inspections-upsert .section-card {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1rem 1rem 1.25rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

    .inspections-upsert .section-card + .section-card {
        margin-top: .5rem;
    }

.inspections-upsert .section-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem
}

    .inspections-upsert .section-head i {
        font-size: 1.25rem;
        width: 2.2rem;
        height: 2.2rem;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: linear-gradient(135deg,#e8f7ff 0%, #eef4ff 100%);
        color: #0d6efd;
        box-shadow: 0 2px 8px rgba(13,110,253,.15);
    }

.inspections-upsert .section-actions {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .25rem
}

/* ===========================
   INSPECTIONS MOBILE TABLE
   =========================== */

@media (max-width: 768px) {

    .inspections table thead {
        display: none;
    }

    .inspections table,
    .inspections table tbody,
    .inspections table tr,
    .inspections table td {
        display: block;
        width: 100%;
    }

        .inspections table tbody tr {
            background: #fff;
            border: 1px solid #e9ecef;
            border-radius: 14px;
            padding: .75rem;
            margin-bottom: 1rem;
            box-shadow: 0 6px 14px rgba(0,0,0,.05);
        }

        .inspections table tbody td {
            border: none !important;
            padding: .5rem 0;
            text-align: left !important;
        }

            .inspections table tbody td::before {
                content: attr(data-label);
                display: block;
                font-size: .75rem;
                font-weight: 600;
                color: #6c757d;
                margin-bottom: .25rem;
                text-transform: uppercase;
                letter-spacing: .03em;
            }

    /* Fix alignment issues */
    .inspections .actions .d-flex {
        justify-content: flex-start !important;
    }

    .inspections .form-check {
        justify-content: flex-start !important;
    }

    /* Better image sizing on mobile */
    .inspections .thumb {
        height: 60px;
        width: auto;
    }

    /* Stack toolbar nicely */
    .inspections .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

        .inspections .toolbar .d-flex {
            flex-direction: column;
            gap: .5rem;
        }

    .inspections .size-select {
        width: 100% !important;
    }

    /* Pager cleanup */
    .inspections .pager-wrap {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===========================
   DASHBOARD (scoped)
   =========================== */

/* Hero */
.dashboard .hero {
    background: linear-gradient(135deg,#0d6efd 0%,#20c997 100%);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: #fff;
    box-shadow: 0 6px 24px rgba(13,110,253,.12);
}

    .dashboard .hero .title {
        font-weight: 700;
        letter-spacing: .2px;
    }

    .dashboard .hero small {
        opacity: .9;
    }

/* KPI cards */
.dashboard .kpi-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(16,24,40,.06);
}

.dashboard .kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,.08);
    color: #0d6efd;
}

.dashboard .kpi-value {
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 700;
}

/* Plain card shell */
.dashboard .card-plain {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 8px 28px rgba(16,24,40,.06);
}

/* Section heads (title + actions) */
.dashboard .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

    .dashboard .panel-head h6 {
        margin: 0;
        font-weight: 600;
    }

/* Charts/map equal heights on large screens */
@media (min-width: 1200px) {
    #countyWrap, #mapWrap {
        height: 470px;
    }

        #countyWrap .card-body, #mapWrap .card-body {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        #countyWrap .chart-host {
            flex: 1 1 auto;
        }

    #sitesMap {
        height: 100%;
    }
}

@media (max-width: 1199.98px) {
    #sitesMap {
        height: 420px;
    }
}

/* Make dashboard charts a bit taller by default */
.dashboard .card-body canvas {
    width: 100%;
    height: 360px;
    display: block;
}

/* Map container baseline (kept for safety if used outside #mapWrap) */
#sitesMap {
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    z-index: 0;
}

/* Tiny pin helpers (if you later use custom HTML markers) */
.pin {
    font-size: 22px;
    line-height: 22px;
    text-align: center;
}

.pin-good {
    color: #198754;
}
/* success */
.pin-bad {
    color: #6c757d;
}
/* secondary */

/* Leaflet under sticky headers */
.leaflet-container {
    z-index: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dashboard .card-body canvas {
        animation: none !important;
        transition: none !important;
    }
}

/* Select2 */
.select2-container .select2-selection--single {
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.35rem 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5rem;
    color: #212529;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-dropdown {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

/* ===========================
   REPORTS PAGE (scoped)
   =========================== */

.reports-page .page-wrap {
    max-width: 1280px;
    margin-inline: auto;
}

.reports-page .hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d6efd 0%, #20c997 100%);
    box-shadow: 0 10px 22px rgba(13,110,253,.15);
    color: #fff;
}

    .reports-page .hero h2 {
        margin: 0;
        font-weight: 700;
    }

.reports-page .reports-intro {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 14px rgba(0,0,0,.04);
}

.reports-page .report-shell {
    height: 100%;
}

.reports-page .report-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    overflow: hidden;
}

    .reports-page .report-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
        border-color: #d7e3f3;
    }

.reports-page .report-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1rem .75rem;
}

.reports-page .report-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e8f2ff 0%, #eefaf6 100%);
    color: #0d6efd;
    font-size: 1.35rem;
    box-shadow: inset 0 0 0 1px rgba(13,110,253,.08);
}

.reports-page .report-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #475569;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.reports-page .report-card-body {
    padding: 0 1rem 1rem;
    flex: 1 1 auto;
}

.reports-page .report-title {
    margin: 0 0 .65rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.reports-page .report-text {
    margin: 0;
    color: #475569;
    line-height: 1.6;
    font-size: .96rem;
}

.reports-page .report-card-foot {
    padding: 0 1rem 1rem;
}

    .reports-page .report-card-foot .btn {
        border-radius: 12px;
        font-weight: 600;
    }

@media (max-width: 767.98px) {
    .reports-page .hero {
        padding: 1rem;
    }

    .reports-page .report-card-head,
    .reports-page .report-card-body,
    .reports-page .report-card-foot {
        padding-left: .9rem;
        padding-right: .9rem;
    }
}

/* ===========================
   AUTH PAGES (scoped)
   =========================== */

.auth-page .page-wrap {
    max-width: 980px;
    margin-inline: auto;
}

.auth-page .hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    box-shadow: 0 10px 22px rgba(13,110,253,.15);
    color: #fff;
}

    .auth-page .hero h2 {
        margin: 0;
        font-weight: 700;
    }

.auth-page .auth-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
    overflow: hidden;
}

.auth-page .auth-card-body {
    padding: 1.5rem;
}

.auth-page .section-head {
    display: flex;
    align-items: center;
    gap: .75rem;
}

    .auth-page .section-head i {
        font-size: 1.25rem;
        width: 2.4rem;
        height: 2.4rem;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: linear-gradient(135deg,#e8f2ff 0%, #eef4ff 100%);
        color: #0d6efd;
        box-shadow: 0 2px 8px rgba(13,110,253,.15);
    }

.auth-page .form-floating > .form-control {
    padding-top: 1.25rem;
    border-radius: 12px;
}

.auth-page .form-floating > label {
    opacity: .7;
}

.auth-page .auth-submit {
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(13,110,253,.18);
}

.auth-page .auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    justify-content: center;
}

    .auth-page .auth-links a {
        color: #0d6efd;
        text-decoration: none;
        font-weight: 500;
    }

        .auth-page .auth-links a:hover {
            text-decoration: underline;
        }

.auth-page .form-check-input {
    margin-top: .2rem;
}

@media (max-width: 767.98px) {
    .auth-page .hero {
        padding: 1rem;
    }

    .auth-page .auth-card-body {
        padding: 1rem;
    }

    .auth-page .auth-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}