:root {
    --primary-color: #38b16f;
    --primary-hover: #2f975e;
    --header-gradient: linear-gradient(135deg, #d6f5e3, #e0f7f1);
    --light-gray: #f2f4f7;
    --form-bg: #ffffff;
    --text-main: #1d1d1f;
}


.form-wrapper {
    max-width: 1100px;
    margin: 1.5rem auto;
    background-color: var(--form-bg);
    padding: 28px 36px;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    font-size: 0.9rem;
    border-radius: 10px;
    padding: 8px 12px;
}

    .form-control::placeholder {
        color: #b0b0b0;
    }

.btn-save {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.55rem 1.8rem;
    font-size: 0.9rem;
}

    .btn-save:hover {
        background-color: var(--primary-hover);
    }

.alert {
    border-radius: 12px;
    font-size: 0.9rem;
}

.row > .col-md-6 {
    padding-right: 12px;
    padding-left: 12px;
}
.bulk-panel {
    background-color: #f4fdf7;
    border: 1px solid #cce5da;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

    .bulk-panel h5 {
        font-weight: 600;
        color: #3DBA6F;
        margin-bottom: 16px;
    }

.form-control, .form-select {
    border-radius: 10px;
}

.btn-apply {
    background-color: #3DBA6F;
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 20px;
}

    .btn-apply:hover {
        background-color: #2e9f5a;
    }


.config-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    max-width: 860px;
    margin: auto;
    margin-top: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #3DBA6F;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 16px;
}

    .form-control:disabled {
        background-color: #f1f3f5;
    }

.btn-save {
    background-color: #3DBA6F;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 14px;
    border: none;
    margin-top: 30px;
    font-size: 16px;
}

    .btn-save:hover {
        background-color: #2e9f5a;
    }

:root {
    --primary-color: #38b16f;
    --primary-hover: #2f975e;
    --danger-color: #e74c3c;
    --danger-hover: #c0392b;
    --soft-grey: #f7fafd;
    --header-bubble-bg: #f5f5f5;
}



.header-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    padding: 1rem 2rem;
    border-radius: 999px;
    text-align: center;
    margin: 2rem auto 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    max-width: 640px;
    margin-top: 0px;
}

    .header-bubble h1 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
        color: #1d1d1f;
    }

    .header-bubble p {
        font-size: 0.85rem;
        margin: 0;
        color: #666;
    }


.alert-bubble {
    padding: 16px 24px;
    margin: 0 auto 24px auto;
    border-radius: 16px;
    border: 1px solid #b2e6c1;
    background-color: #e6f9ed;
    color: #256c3d;
    font-weight: 500;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    max-width: 400px;
}

.view-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

    .view-toggle i {
        font-size: 22px;
        cursor: pointer;
        color: #888;
        transition: color 0.2s ease;
    }

        .view-toggle i.active {
            color: var(--primary-color);
        }

.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: 20px;
}

.delete-card {
    background: linear-gradient(to bottom, #fffdfd, #fff2f2);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #f5c2c7;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

    .delete-card:hover {
        box-shadow: 0 10px 25px rgba(231, 76, 60, 0.2);
        transform: translateY(-4px);
    }

.node-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.node-detail {
    font-size: 15px;
    color: #333;
    margin-top: 6px;
}

.btn-delete {
    background-color: var(--danger-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 500;
}

    .btn-delete:hover {
        background-color: var(--danger-hover);
    }

.table-zebra tbody tr:nth-child(odd) {
    background-color: #fef6f6;
}

.table-zebra tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.modal-content {
    border-radius: 20px !important;
}

:root {
    --apple-green: #34c759;
    --apple-green-dark: #28a745;
    --apple-gray1: #f5f5f7;
    --apple-gray2: #e5e5ea;
    --apple-label: #1d1d1f;
}


.apple-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    color: var(--apple-label);
}

.apple-subtitle {
    font-size: 0.85rem;
    color: #4b5563; /* dark grey-blue, not washed out */
    margin: 0;
}

.apple-btn-primary {
    background-color: var(--apple-green);
    color: white;
}

    .apple-btn-primary:hover {
        background-color: var(--apple-green-dark);
    }


body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--apple-gray1);
}

.full-width-bg {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: var(--apple-gray1);
    padding: 10px 0;
}



.apple-section {
    background-color: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--apple-gray2);
    max-width: 1200px;
    margin: 0 auto;
}

.apple-form-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--apple-label);
    margin-bottom: 8px;
}

.apple-dropdown {
    border-radius: 12px;
    border: 1px solid var(--apple-gray2);
    padding: 12px;
    font-size: 16px;
    width: 100%;
    max-width: 400px;
    background-color: white;
}

.apple-btn {
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    border: none;
    transition: all 0.2s ease;
}



.disabled-btn {
    background-color: #d6d6d6 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}



.bottom-sheet {
    position: fixed;
    left: 0;
    bottom: -100%;
    width: 100%;
    height: 55vh;
    background-color: white;
    border-top: 1px solid var(--apple-gray2);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.12);
    border-radius: 24px 24px 0 0;
    padding: 32px;
    z-index: 1051;
    overflow-y: auto;
    transition: bottom 0.4s ease;
}

    .bottom-sheet.open {
        bottom: 0;
    }

.sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(240, 240, 240, 0.7);
    z-index: 1050;
    display: none;
}

    .sheet-backdrop.show {
        display: block;
    }



.bg-panel-inner {
    width: 100%;
    padding: 1rem 2rem;
}


/* Base node card styling (still white) */
.node-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border-left: 5px solid transparent; /* placeholder for status color */
    transition: all 0.2s ease;
}

    /* Battery status indicators via border-left */
    .node-card.optimal {
        border-left-color: #16a34a; /* green */
    }

    .node-card.normal {
        border-left-color: #facc15; /* yellow */
    }

    .node-card.low {
        border-left-color: #f97316; /* orange */
    }

    .node-card.critical {
        border-left-color: #ef4444; /* red */
    }

/* Optional: bold text color for status label */
.battery-status {
    font-weight: 600;
    font-size: 0.85rem;
}



.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2d4739;
}

.btn-configure {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 500;
    border-radius: 12px;
    padding: 0.4rem 1.2rem;
    transition: background-color 0.2s ease-in-out;
}

    .btn-configure:hover {
        background-color: var(--primary-hover);
    }

.status-icon {
    font-size: 1.1rem;
}

#cardViewIcon, #tableViewIcon {
    margin-left: 10px;
    font-size: 1.6rem;
}
.status-icon.text-success {
    position: relative;
    animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.15);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}






.form-wrapper {
    background-color: white;
    border-radius: 18px;
    padding: 32px 36px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.form-control.rounded-pill,
.form-select.rounded-pill {
    border-radius: 50rem;
    padding: 0.5rem 1rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d4739;
}

.text-danger.small {
    font-size: 0.8rem;
}

.toggle-green:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-success:hover {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
    }

.is-invalid {
    border: 1px solid red;
}






.form-wrapper {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    padding: 36px 40px;
    max-width: 840px;
    margin: auto;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d4739;
}

.form-control::placeholder {
    color: #aaa;
}

.form-control.rounded-pill,
.form-select.rounded-pill {
    border-radius: 50rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.btn-register {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

    .btn-register:hover {
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
    }

.alert {
    border-radius: 12px;
    font-size: 0.9rem;
}
/* Legacy block delimiter removed during theme consolidation */
:root {
    --primary-color: #38b16f;
    --primary-hover: #2f975e;
    --apple-gray1: #f5f5f7;
    --apple-gray2: #e5e5ea;
    --apple-label: #1d1d1f;
}





.apple-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--apple-label);
    margin-bottom: 0.15rem;
}

.apple-subtitle {
    font-size: 0.85rem;
    color: #4b5563;
    margin: 0;
}

.content-container {
    width: 100%;
    margin: 0;
    padding: 0;
}




th, td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--apple-gray2);
    text-align: left;
}

th {
    background-color: #ecfdf5;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    color: #333;
}

tr:hover {
    background-color: #f4fef8;
}

.btn-view-users {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

    .btn-view-users:hover {
        background-color: var(--primary-hover);
    }

#userPanel {
    display: none;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 20px;
    margin-top: 30px;
    max-width: 900px;
    transition: all 0.3s ease;
}

#userList li {
    margin-bottom: 16px;
    font-size: 14px;
}

#userList strong {
    font-size: 15px;
}
:root {
    --apple-blue: #0071e3;
    --apple-gray1: #f5f5f7;
    --apple-gray2: #e5e5ea;
    --apple-gray3: #d2d2d7;
    --apple-gray6: #86868b;
    --apple-green: #34c759;
    --apple-red: #ff3b30;
    --apple-label: #1d1d1f;
    --apple-system: -apple-system, BlinkMacSystemFont, sans-serif;
}





.apple-navbar {
    padding: 15px 20px;
    background-color: white;
    border-bottom: 1px solid var(--apple-gray2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.apple-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    color: var(--apple-label);
}

.apple-subtitle {
    font-size: 0.85rem;
    color: var(--apple-gray6);
    margin: 0;
}


.apple-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--apple-gray2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

    .apple-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

.apple-card-body {
    padding: 16px;
}
/* === Modern Apple/Nest-style Table === */
.apple-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    z-index: 1;
    text-align: center; /* Ensures all cells default to center */
}
    .apple-table thead th {
        position: sticky;
        top: 0;
        z-index: 10;
        background: linear-gradient(to bottom, #f5f7fa 0%, #e8ecf2 100%) !important;
    }


    .apple-table::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 60%);
        z-index: -1;
        pointer-events: none;
    }

    /* === Table Header === */
    .apple-table th {
        background: linear-gradient(to bottom, #f5f7fa 0%, #e8ecf2 100%);
        color: #3a3a3c;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        padding: 8px 12px;
        border: none;
        position: relative;
        backdrop-filter: blur(8px);
        text-align: center !important;
        vertical-align: middle !important;
    }

        .apple-table th:not(:last-child)::after {
            content: '';
            position: absolute;
            right: 0;
            top: 20%;
            height: 60%;
            width: 1px;
            background: linear-gradient(to bottom, rgba(200,200,200,0) 0%, rgba(200,200,200,0.3) 50%, rgba(200,200,200,0) 100%);
        }

    /* === Table Body Cells === */
    .apple-table td {
        padding: 6px 12px;
        font-size: 0.75rem;
        color: #1d1d1f;
        border-bottom: 1px solid rgba(210, 210, 215, 0.4);
        font-weight: 450;
        transition: all 0.28s cubic-bezier(0.165, 0.84, 0.44, 1);
        line-height: 1.2;
        text-align: center !important;
        vertical-align: middle !important;
    }

        .apple-table td:first-child {
            font-weight: 500;
            color: #0066cc;
        }

    /* === Row Styling === */
    .apple-table tr:not(:last-child) td {
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    }

    .apple-table tr:last-child td {
        border-bottom: none;
    }

    .apple-table tr {
        position: relative;
        transition: background-color 0.25s ease;
        cursor: pointer;
        height: 38px;
    }

        /* Optional Hover Effect for Focused Row Highlight */
        .apple-table tr:hover {
            transform: scale(1.005);
            transition: 0.15s ease;
        }
    /* Light modern row separation */
    .apple-table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.04); /* ultra-light separator */
    }

        .apple-table tbody tr:last-child {
            border-bottom: none; /* clean bottom */
        }
        .apple-table tbody tr:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            transform: translateY(-1px);
            transition: all 0.2s ease;
            z-index: 1;
        }

    /* Optional: slightly increase row spacing for breathability */
    /* Compact row height for live status table */
    .apple-table td {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 0.72rem; /* slightly smaller text */
        line-height: 1.1;
    }

    .apple-table th {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        font-size: 0.72rem;
        line-height: 1.1;
    }

    .apple-table tr {
        height: auto !important; /* let content drive height */
    }


.apple-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--apple-gray2);
    color: var(--apple-gray6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    cursor: default;
}
    .apple-badge:hover::after {
        content: attr(data-fulltext);
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: white;
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 6px;
        white-space: normal;
        max-width: 240px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        margin-top: 6px;
        z-index: 10;
    }



    .apple-badge.admin {
        background-color: rgba(0, 113, 227, 0.12);
        color: var(--apple-blue);
    }

.apple-btn {
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: none;
    transition: all 0.2s ease;
}

.apple-btn-primary {
    background-color: var(--apple-blue);
    color: white;
}

.apple-btn-secondary {
    background-color: var(--apple-gray1);
    color: var(--apple-blue);
}

.apple-btn-danger {
    background-color: var(--apple-red);
    color: white;
}

.apple-btn-outline {
    background-color: transparent;
    border: 1px solid var(--apple-gray2);
    color: var(--apple-blue);
}

.apple-btn:hover {
    opacity: 0.85;
    transform: scale(0.98);
}

.apple-form-control {
    border-radius: 12px;
    border: 1px solid var(--apple-gray2);
    padding: 10px 14px;
    font-size: 14px;
    background-color: white;
}

    .apple-form-control:focus {
        border-color: var(--apple-blue);
        box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
    }

.apple-search-container {
    background-color: white;
    border-radius: 12px;
    border: 1px solid var(--apple-gray2);
    padding: 8px;
    width: 100%;
    max-width: 380px;
}

.apple-search-input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 100%;
    padding: 6px 10px;
}

.apple-search-btn {
    background: none;
    border: none;
    color: var(--apple-blue);
    padding: 6px 12px;
}

.apple-view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.apple-view-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--apple-gray1);
    color: var(--apple-gray6);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .apple-view-toggle-btn.active {
        background-color: var(--apple-blue);
        color: white;
    }

.apple-drawer {
    width: 480px;
    background-color: white;
    border-left: 1px solid var(--apple-gray2);
}

.apple-drawer-header {
    padding: 16px;
    border-bottom: 1px solid var(--apple-gray2);
}

.apple-drawer-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.apple-drawer-body {
    padding: 16px;
}

.apple-form-group {
    margin-bottom: 16px;
}

.apple-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--apple-gray6);
}

.apple-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    margin-right: 8px;
}

    .apple-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.apple-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--apple-gray3);
    transition: .4s;
    border-radius: 34px;
}

    .apple-slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .apple-slider {
    background-color: var(--apple-green);
}

input:focus + .apple-slider {
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.3);
}

input:checked + .apple-slider:before {
    transform: translateX(18px);
}

.apple-toast {
    position: fixed;
    top: 120px; /* ? CHANGE THIS */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--apple-green);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}


    .apple-toast.visible {
        opacity: 1;
    }

.checked-icon {
    color: var(--apple-green);
}

.unchecked-icon {
    color: var(--apple-gray3);
}



.action-bar {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}
/* === NAVBAR CORE === */
.navbar {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
    height: 72px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar-nav .nav-link {
    padding: 24px 20px;
    font-weight: 500;
    font-size: 15px;
    color: #1d1d1f;
    transition: all 0.25s ease;
    position: relative;
}

    .navbar-nav .nav-link:hover {
        color: #0071e3 !important;
        transform: translateY(-1px);
    }

/* === Hover Underline === */
.navbar-nav .nav-item:not(.dropdown) .nav-link::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 0;
    height: 2px;
    background: #0071e3;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-nav .nav-item:not(.dropdown):hover .nav-link::after {
    width: calc(100% - 40px);
}

/* === DROPDOWN WRAPPER === */
.nav-item.dropdown {
    position: relative;
    padding-bottom: 20px;
}

    .nav-item.dropdown::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        height: 20px;
        width: 100%;
        background: transparent;
    }

/* === MAIN DROPDOWN === */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding: 12px 0;
    min-width: 260px;
    background-color: rgba(251, 251, 253, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: all 0.2s ease;
    z-index: 999;
    pointer-events: none;
}

.nav-item.dropdown:hover > .dropdown-menu,
.nav-item.dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}


.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-left: 2px;
        min-width: 260px;
        padding: 12px 0;
        background-color: rgba(251, 251, 253, 0.98);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-radius: 18px;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(0, 0, 0, 0.04);
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px) scale(0.98);
        transition: all 0.2s ease;
        z-index: 999;
        pointer-events: none;
    }

        /* show when Bootstrap toggles it */
        .dropdown-submenu > .dropdown-menu.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(0) scale(1);
            pointer-events: auto;
        }

    /* Default right arrow (chevron) */
    .dropdown-submenu > .dropdown-toggle::after {
        content: "";
        float: right;
        margin-left: .5rem;
        border: solid currentColor;
        border-width: 0 .20em .20em 0;
        display: inline-block;
        padding: 3px;
        transform: rotate(-45deg); /* ? right */
        transition: transform 0.2s ease;
    }

    /* When submenu is open (? down) */
    .dropdown-submenu.open > .dropdown-toggle::after {
        transform: rotate(45deg); /* ? down */
    }




/* === DROPDOWN ITEM === */
.dropdown-item {
    color: #1d1d1f !important;
    padding: 14px 24px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 10px;
}

    .dropdown-item:hover {
        background-color: rgba(245, 245, 247, 0.8) !important;
        color: #0071e3 !important;
        transform: translateX(4px);
    }
#deleteConfirmModal {
    transition: opacity 0.25s ease;
}

    #deleteConfirmModal .shadow {
        animation: fadeInUp 0.3s ease;
    }

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
:root {
    --red: #FF3B30;
    --yellow: #FFCC00;
    --green: #34C759;
    --gray: #F2F2F7;
    --dark-gray: #8E8E93;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0px;
}

.dashboard {
    max-width: 1200px;
    margin: auto;
}


.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
}

.stat {
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    width: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

    .stat i {
        font-size: 24px;
        margin-bottom: 8px;
        display: block;
    }

    .stat span {
        font-size: 24px;
        font-weight: 600;
        display: block;
    }

    .stat small {
        color: var(--dark-gray);
        font-size: 13px;
    }

.filter-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

    .filter-controls input {
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid #ccc;
        width: 260px;
    }

.filter-buttons {
    display: flex;
    gap: 8px;
}

    .filter-buttons button {
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        cursor: pointer;
        background: #eee;
    }

        .filter-buttons button.active {
            background: var(--green);
            color: white;
        }

.nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}


.node-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}



.node-name {
    font-weight: 600;
    font-size: 18px;
    margin: 0;
}

.node-type {
    color: var(--dark-gray);
    font-size: 14px;
    margin-top: 4px;
}

.battery-status {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
}


.battery-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.battery-shape {
    position: relative;
    width: 60px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
    margin-right: 0.5rem;
}

.battery-level {
    height: 100%;
    background-color: #4ade80;
    transition: width 0.4s ease;
}

.battery-tip {
    position: absolute;
    right: -6px;
    top: 25%;
    width: 4px;
    height: 50%;
    background-color: #ccc;
    border-radius: 1px;
}
.percentage {
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

    .filter-controls input {
        flex: 1;
        min-width: 220px;
        padding: 0.5rem 1rem;
        border: 1px solid #ddd;
        border-radius: 6px;
    }

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

    .filter-buttons button {
        padding: 0.4rem 1rem;
        border: none;
        border-radius: 6px;
        background-color: #f3f4f6;
        cursor: pointer;
    }

        .filter-buttons button.active {
            background-color: #2563eb;
            color: white;
            font-weight: 600;
        }


.stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1rem;
}

    .stat i {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
/* ?? Critical Mold Risk */
.status-red {
    background-color: #ff4c4c !important;
    color: white !important;
}

/* ?? High Mold Risk */
.status-orange {
    background-color: #ffa07a !important;
    color: white !important;
}

/* ?? Moderate Mold Risk */
.status-yellow {
    background-color: #ffd700 !important;
    color: black !important;
}

/* ?? Mild Mold Risk */
.status-light-yellow {
    background-color: #ffffcc !important;
    color: black !important;
}

/* ?? Safe */
.status-green {
    background-color: #34C759 !important;
    color: black !important;
}

/* ? Offline / AI Pending */
.status-gray {
    background-color: #e0e0e0 !important;
    color: black !important;
}


/* Optional: smooth transitions */
.apple-table tr {
    transition: background-color 0.25s ease;
}
/* ? Centered Modern Mold Risk Scoring */
.mold-risk-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 8px;
    position: relative;
    width: 100%;
}

.mold-risk-track {
    position: relative;
    height: 24px;
    background: #f5f5f7;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
    width: 155px;
}

.mold-risk-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #4caf50, #ffc107, #f44336);
}

.mold-risk-indicator {
    position: absolute;
    top: -6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: left 0.5s ease;
    transform: translateX(-50%);
    /* ? Clamp between 15% and 85% */
    left: clamp(15%, var(--score, 50%), 85%);
}




.mold-risk-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #2c3e50;
    margin-bottom: 2px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.mold-risk-score-bubble {
    background: #2c3e50;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mold-risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #8e8e93;
    padding: 0 4px;
}


.score-value {
    text-align: center;
    margin-top: 4px;
    font-weight: 600;
}

 .status-legend {
        max-width: fit-content;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(200, 200, 200, 0.2);
    }
    
    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .status-indicator {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    
    .legend-label {
        font-size: 13px;
        font-weight: 500;
        color: #3A3A3C;
        letter-spacing: -0.08px;
    }
.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.7em;
    border-radius: 999px;
    font-weight: 500;
}
/* Subtle hover effect for rows */
.hover-elevate {
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}


    .hover-elevate:hover {
        background-color: rgba(240, 240, 255, 0.6);
        transform: scale(1.005);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
        z-index: 5;
    }





@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}
thead th {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.node-name,
.node-meta {
    font-size: 0.75rem; /* match .apple-table td */
    font-weight: 450; /* same subtle weight */
    font-family: inherit; /* stop monospace fallback */
    line-height: 1.2;
}

.node-name {
    color: #000; /* black */
}

.node-meta {
    color: #000; /* dark grey */
}

body .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 2rem;
    padding-right: 2rem;
}
:root {
    --apple-blue: #0071e3;
    --apple-light-gray: #f5f5f7;
    --apple-dark-gray: #1d1d1f;
    --apple-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --apple-card-radius: 18px;
    --apple-button-radius: 12px;
    --apple-transition: all 0.4s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.header-container {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.header-title {
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--apple-dark-gray);
    margin-bottom: 0.5rem;
}

.header-subtitle {
    font-size: 1.1rem;
    color: #86868b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.group-card {
    background: white;
    border-radius: var(--apple-card-radius);
    padding: 24px;
    box-shadow: var(--apple-card-shadow);
    transition: var(--apple-transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e0e0e0;
}

    .group-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    }

    .group-card h5 {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--apple-dark-gray);
        margin-bottom: 12px;
    }

    .group-card p {
        font-size: 0.9rem;
        color: #86868b;
        margin-bottom: 0;
    }

    .group-card .btn-apple {
        background-color: transparent;
        color: var(--apple-blue);
        border: 2px solid var(--apple-blue);
        border-radius: var(--apple-button-radius);
        padding: 8px 16px;
        font-size: 0.9rem;
        font-weight: 500;
        margin-top: 16px;
        transition: var(--apple-transition);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

        .group-card .btn-apple:hover {
            background-color: rgba(0, 113, 227, 0.1);
            color: var(--apple-blue);
        }

        .group-card .btn-apple i {
            font-size: 1rem;
            margin-right: 6px;
        }

.no-groups-card {
    background: white;
    border-radius: var(--apple-card-radius);
    padding: 2rem;
    box-shadow: var(--apple-card-shadow);
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
    border: 1px solid #e0e0e0;
}

    .no-groups-card i {
        font-size: 2rem;
        color: #fa9f3e;
        margin-bottom: 1rem;
    }

    .no-groups-card p {
        color: #86868b;
        margin-bottom: 0;
        font-size: 1rem;
    }

@media (max-width: 768px) {
    .header-title {
        font-size: 2rem;
    }

    .group-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
/* ?? Side-by-side layout */
/* ?? Container for everything */
.maintenance-layout {
    text-align: center;
    margin-top: 2rem;
}

/* ?? Big Image */
.device-image {
    display: block;
    max-height: 400px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 2rem auto; /* smaller margin to reduce gap */
    margin-top:-100px; 
}

/* ?? Battery row under image */
.battery-counts {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: -100px
}

/* ??? Battery Boxes */
.battery-status-box {
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    text-align: center;
    width: 240px;
    transition: transform 0.3s ease;
}

.battery-status-box:hover {
    transform: translateY(-4px);
}

.battery-status-box h2 {
    margin-top: 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f1f1f;
}

/* ?? Status Labels */
.status-pill {
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    display: inline-block;
    font-size: 0.85rem;
}

.status-pill.high {
    background-color: #34C759;
    color: white;
}

.status-pill.normal {
    background-color: #FFCC00;
    color: #1f1f1f;
}

.status-pill.low {
    background-color: #FF3B30;
    color: white;
}

/* ?? Order Button */
.order-section {
    margin-top: 1rem;
}

.order-section a.btn {
    margin-top: 0.75rem;
}

/* ?? Warning & Disclaimer */
.warning-msg {
    background-color: #fff6f6;
    border: 1px solid #ffb3b3;
    color: #d8000c;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin: 2rem auto 1rem auto;
    font-size: 0.95rem;
    max-width: 650px;
    text-align: center;
}

.disclaimer {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2rem;
    text-align: center;
}
.support-container {
    max-width: 800px;
    margin: 3rem auto;
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.support-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f1f1f;
}

.support-header p {
    color: #6c757d;
    margin-top: 0.75rem;
    font-size: 1.05rem;
}

.support-methods {
    margin-top: 2.5rem;
}

.support-method {
    margin-bottom: 2rem;
}

    .support-method h3 {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .support-method a {
        color: #007bff;
        text-decoration: none;
        font-size: 1rem;
    }

        .support-method a:hover {
            text-decoration: underline;
        }

.support-footer {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #6c757d;
}
.status-blink-red {
    animation: blink 1s infinite;
    background-color: #ffcccc !important;
}

.status-pulse-red {
    animation: pulse 2s infinite;
    background-color: #ffe5e5 !important;
}

@keyframes blink {
    0% {
        background-color: #ff4d4d;
    }

    50% {
        background-color: #ffe5e5;
    }

    100% {
        background-color: #ff4d4d;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,0,0,0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255,0,0,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255,0,0,0);
    }
}

/* General styling for active item */
.active-item {
    background: rgba(13, 110, 253, 0.1) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px); /* For Safari support */
    color: #0d6efd !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 6px 14px;
    transition: all 0.2s ease-in-out; /* Smooth transition */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

    /* Hover effect for active item */
    .active-item:hover {
        transform: scale(1.03); /* Slight scale on hover */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhance shadow on hover */
    }

/* Styling for active parent nav-link */
.active-parent > .nav-link {
    background: rgba(13, 110, 253, 0.08) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* For Safari support */
    color: #0d6efd !important;
    font-weight: 500;
    border-radius: 12px;
    padding: 6px 18px;
    transition: background 0.3s ease; /* Transition for background */
}

/* Hover effect for nav-item > nav-link */
.nav-item > .nav-link:hover {
    background: rgba(13, 110, 253, 0.12); /* Darker background on hover */
    color: #0d6efd;
    border-radius: 12px;
    transform: translateY(-2px); /* Slight lift on hover */
    transition: all 0.2s ease; /* Smooth transition */
}

/* Styling for dropdown-item hover */
.dropdown-menu .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1); /* Slightly darker background */
    color: #0d6efd;
    font-weight: 500;
    border-radius: 8px;
    padding-left: 20px; /* Add some padding for better spacing */
    transition: background-color 0.2s ease; /* Smooth background transition */
}

/* Optional: Adding a subtle animation for dropdown menus */
.dropdown-menu {
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.clickable-risk {
    cursor: pointer;
}

.mold-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(2px);
}


.mold-modal-box {
    background: linear-gradient(to bottom right, #ffffff, #f2f7fc);
    padding: 32px;
    border-radius: 20px;
    width: 560px;
    max-width: 95%;
    box-shadow: 0 35px 85px rgba(0,0,0,0.2);
    animation: fadeInPop 0.3s ease-out;
    font-family: 'Segoe UI', sans-serif;
    border: 1px solid #d0e2f2;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #004080;
    margin-bottom: 20px;
    text-align: center;
}

.modal-block {
    background-color: #f0f4fa;
    border-left: 4px solid #007aff;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 18px;
    color: #333;
    box-shadow: inset 0 0 0.5px rgba(0,0,0,0.1);
    line-height: 1.5;
    font-family: 'Segoe UI', sans-serif;
}

#riskScore {
    font-size: 1.1rem;
    font-weight: 600;
    color: #004080;
}
#noChartData i {
    opacity: 0.6;
    transition: transform 0.2s ease;
}

#noChartData:hover i {
    transform: scale(1.05);
}

.modal-content {
    border-radius: 20px;
}

.modal-body {
    font-size: 1.05rem;
    color: #333;
}

.modal-footer .btn {
    min-width: 100px;
}

.btn-danger {
    background-color: #ff3b30;
    border-color: #ff3b30;
}

.btn-light {
    background-color: #e5e5ea;
    border-color: #e5e5ea;
}

.modal-75-center {
    width: 75vw !important;
    max-width: 75vw !important;
    margin: auto !important;
}

/* force vertical + horizontal centering for custom-width modals */
.modal-dialog.modal-75-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-content {
    width: 100% !important;
}

/* Optional: smooth Chart canvas sizing */
.chart-scroll-wrapper,
.chart-container {
    max-width: 100%;
    overflow-x: auto;
}

#sensorChart {
    width: 100% !important;
    max-width: 100% !important;
    height: 450px !important;
    display: block;
    box-sizing: border-box;
}
/* ?? GLOBAL RESPONSIVE FIX */
html, body {
    max-width: 100%;
   
    box-sizing: border-box;
    font-size: 16px;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ?? Fix full-width sections */
.container, .content-container, .form-wrapper, .dashboard, .apple-section {
    width: 100%;
    max-width: 100%;
}

/* ?? MOBILE/TABLET ADJUSTMENTS */
@media (max-width: 1024px) {
    .form-wrapper,
    .apple-section,
    .config-card,
    .modal-75-center {
        padding: 1.5rem;
        margin: 1rem;
    }

    .apple-table {
        font-size: 0.75rem;
        overflow-x: auto;
    }

    .node-grid {
        grid-template-columns: 1fr;
    }

    .group-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        flex-direction: column;
        align-items: center;
    }

    .navbar-nav .nav-link {
        padding: 16px 12px;
        font-size: 14px;
    }
    nav {
        position: relative; /* or fixed/sticky */
        z-index: 100;
    }

    /* Mobile-only responsive overrides - desktop remains unchanged */
    @media (max-width: 991.98px) {
        .navbar {
            height: auto !important;
            min-height: 70px !important;
        }

            .navbar .container-fluid {
                height: auto !important;
                flex-direction: column !important;
                padding: 15px !important;
                position: static !important;
            }

                .navbar .container-fluid > div:first-child {
                    position: static !important;
                    left: auto !important;
                    top: auto !important;
                    margin-bottom: 15px !important;
                }

                    .navbar .container-fluid > div:first-child img {
                        height: 80px !important;
                        width: auto !important;
                        max-width: 250px !important;
                    }

                .navbar .container-fluid > div:nth-child(2) {
                    width: 100% !important;
                    margin-bottom: 15px !important;
                }

                    .navbar .container-fluid > div:nth-child(2) ul {
                        padding-top: 0 !important;
                        justify-content: center !important;
                        flex-wrap: wrap !important;
                    }

                .navbar .container-fluid > div:last-child {
                    position: static !important;
                    right: auto !important;
                    width: 100% !important;
                    justify-content: center !important;
                    text-align: center !important;
                }

        .dropdown-menu {
            position: absolute !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            min-width: 200px !important;
        }

        .dropdown-submenu .dropdown-menu {
            position: static !important;
            transform: none !important;
            left: auto !important;
            background-color: #f8f9fa !important;
            margin-left: 15px !important;
            box-shadow: none !important;
            border: none !important;
        }

    }

   


}
.export-actions {
    gap: 12px;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

    .export-btn i {
        font-size: 16px;
    }

    .export-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .export-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

.print-btn {
    background: #f1f3f6;
    color: #11314C;
}

.pdf-btn {
    background: linear-gradient(90deg, #d32f2f, #f44336);
    color: #fff;
}
/* A responsive box that reserves predictable space */
.mp-img-box {
    width: 100%;
    max-width: 560px; /* cap width */
    aspect-ratio: 4 / 3; /* or 16/9 depending on your asset */
    /* Or: max-height: 360px; height:auto; if you prefer height cap instead */
}

/* Fill the box without changing layout height */
.mp-img-fit {
    width: 100%;
    height: 100%;
    object-fit: contain; /* or 'cover' if you want edge-to-edge crop */
    display: block;
}
/* Hide Print/PDF controls on phones only */
@media (max-width: 767.98px) {
    /* Your common classes */
    .export-actions,
    .export-btn,
    .print-btn,
    .pdf-btn {
        display: none !important;
    }

    /* Safety net: any element wired to print/PDF handlers */
    [onclick^="printPage"],
    [onclick^="downloadPDF"] {
        display: none !important;
    }

    /* If you ever render them as links */
    a.export-btn,
    a.print-btn,
    a.pdf-btn {
        display: none !important;
    }
}
/* Alarm hover should not underline or shift color */
a.apple-badge,
a.apple-badge:hover,
a.apple-badge:focus,
a.apple-badge:active {
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
}

    /* Also prevent any pseudo underline effects from theme CSS */
    a.apple-badge::after,
    a.apple-badge:hover::after {
        content: none !important;
    }
    a.apple-badge:hover {
        transform: translateY(-1px);
    }
/* Keep Air Pollution tight */
th.col-air, td.col-air {
    width: 140px;
    max-width: 140px;
    white-space: nowrap;
}

    /* Ensure the chip respects the width */
    td.col-air .sensor-chip {
        display: inline-block;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
/* Always keep legend dots perfectly circular */
.status-indicator {
    width: 12px !important;
    height: 12px !important;
    aspect-ratio: 1 / 1;
    border-radius: 999px !important;
    flex: 0 0 12px;
    display: inline-block;
}
/* ============================
   Refined Apple Alarm Pill
   (row-color safe)
   ============================ */

/* Base pill */
.alarm-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 450;
    letter-spacing: .15px;
    line-height: 1;
    color: #0F172A;
    white-space: nowrap;
    /* Stronger frosted-glass */
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(15, 23, 42, 0.14);
    box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9);
    position: relative;
}

    /* Left urgency bar ? SOLID, not transparent */
    .alarm-pill::before {
        content: "";
        width: 6px;
        height: 14px;
        border-radius: 999px;
        background: #FF3B30; /* Apple red */
    }

/* Warning (non-clickable) */
.alarm-pill--static::before {
    background: #FFCC00; /* Apple yellow */
}

/* Clickable alarms */
.alarm-pill--action {
    cursor: pointer;
    text-decoration: none !important;
}

/* Chevron */
.alarm-pill__chev {
    font-size: 13px;
    opacity: 0.8;
}

/* Anchor reset */
a.alarm-pill,
a.alarm-pill:hover,
a.alarm-pill:focus,
a.alarm-pill:active,
a.alarm-pill:visited {
    color: #0F172A !important;
    text-decoration: none !important;
}

/* Hover = elevation, NOT color change */
a.alarm-pill--action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 1px 2px rgba(0,0,0,.08);
}

/* Focus ring (accessibility, still clean) */
a.alarm-pill--action:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.25), 0 1px 2px rgba(0,0,0,.08);
}

/* None stays plain text */
.alarm-none {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 12px;
    font-weight: 450;
    color: #6B7280 !important;
}

/* ===== Canonical Mold Risk Palette (matches Live Status) ===== */
:root {
    --risk-safe: #34C759;
    --risk-mild: #FFFFCC;
    --risk-moderate: #FFD700;
    --risk-high: #FFA07A;
    --risk-severe: #FF4C4C;
    --risk-pending: #E0E0E0;
}

/* Score chip base */
.score-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    width: fit-content;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.03);
    color: rgba(0,0,0,.78);
}

.score-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,.25);
    box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}

/* Safe */
.score-chip.safe {
    background: color-mix(in srgb, var(--risk-safe) 18%, white);
    border-color: color-mix(in srgb, var(--risk-safe) 35%, white);
}

    .score-chip.safe .score-dot {
        background: var(--risk-safe);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk-safe) 22%, white);
    }

/* Mild */
.score-chip.mild {
    background: color-mix(in srgb, var(--risk-mild) 55%, white);
    border-color: color-mix(in srgb, var(--risk-mild) 70%, #c7c7c7);
}

    .score-chip.mild .score-dot {
        background: var(--risk-mild);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk-mild) 50%, white);
    }

/* Moderate */
.score-chip.moderate {
    background: color-mix(in srgb, var(--risk-moderate) 24%, white);
    border-color: color-mix(in srgb, var(--risk-moderate) 40%, white);
}

    .score-chip.moderate .score-dot {
        background: var(--risk-moderate);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk-moderate) 22%, white);
    }

/* High */
.score-chip.high {
    background: color-mix(in srgb, var(--risk-high) 24%, white);
    border-color: color-mix(in srgb, var(--risk-high) 40%, white);
}

    .score-chip.high .score-dot {
        background: var(--risk-high);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk-high) 22%, white);
    }

/* Severe */
.score-chip.severe {
    background: color-mix(in srgb, var(--risk-severe) 18%, white);
    border-color: color-mix(in srgb, var(--risk-severe) 34%, white);
}

    .score-chip.severe .score-dot {
        background: var(--risk-severe);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk-severe) 22%, white);
    }

/* Pending (if you ever show it) */
.score-chip.pending {
    background: color-mix(in srgb, var(--risk-pending) 65%, white);
    border-color: color-mix(in srgb, var(--risk-pending) 80%, #bdbdbd);
}

    .score-chip.pending .score-dot {
        background: var(--risk-pending);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--risk-pending) 55%, white);
    }


/* Buttons */
.btn-success,
.btn-save,
.btn-apply,
.btn-register,
.btn-configure,
.btn-view-users,
.apple-btn-primary {
    background-color: var(--apple-blue) !important;
    border-color: var(--apple-blue) !important;
    color: #fff !important;
}

    .btn-success:hover,
    .btn-save:hover,
    .btn-apply:hover,
    .btn-register:hover,
    .btn-configure:hover,
    .btn-view-users:hover,
    .apple-btn-primary:hover {
        background-color: var(--apple-blue-dark) !important;
        border-color: var(--apple-blue-dark) !important;
    }

/* Toggles / switches that were ?green? */
.toggle-green:checked,
input:checked + .apple-slider {
    background-color: var(--apple-blue) !important;
    border-color: var(--apple-blue) !important;
}

input:focus + .apple-slider {
    box-shadow: 0 0 0 3px rgba(0,113,227,0.30) !important;
}

/* Green highlights (chips/headers/panels) ? blue-neutral */
.bulk-panel {
    background-color: rgba(0,113,227,0.06) !important;
    border-color: rgba(0,113,227,0.22) !important;
}

    .bulk-panel h5,
    .section-title,
    .view-toggle i.active {
        color: var(--apple-blue) !important;
    }

/* Any ?success? icon/text from Bootstrap */
.text-success,
.status-icon.text-success,
.checked-icon {
    color: var(--apple-blue) !important;
}

/* Apple-themed metric cards */
.apple-metric-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    height: 100%;
}

.apple-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 122, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

    .metric-icon i {
        font-size: 24px;
    }

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 12px;
    font-weight: 500;
    color: #8e8e93;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.2;
}

.apple-chart-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    overflow: hidden;
    height: 450px; /* ?? ADJUSTED to make the graph smaller */
    display: flex;
    flex-direction: column;
}



.chart-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    display: flex;
    align-items: center;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-body {
    flex: 1;
    padding: 12px 16px 16px;
    position: relative;
    min-height: 320px; /* ?? Reduced from 400px */
}


    .chart-body canvas {
        width: 100% !important;
        height: 100% !important;
        display: block;
    }


/* Apple-themed insight cards */
.apple-insight-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.insight-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.insight-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    display: flex;
    align-items: center;
}

.custom-legend {
    padding: 16px 24px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-text {
    font-size: 11px;
    font-weight: 500;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
}
/* Completely hide any Chart.js legend elements */
#riskScoreChart ~ .chartjs-legend,
.apple-chart-container .chartjs-legend,
.apple-chart-container canvas + ul,
.apple-chart-container canvas + div[style*="legend"] {
    display: none !important;
}

.insight-badge .badge {
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
}

.insight-content {
    flex: 1;
    padding: 16px 24px 24px;
}

.insight-text {
    color: #424245;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-item {
    color: #424245;
    line-height: 1.6;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
}

    .recommendation-item:last-child {
        margin-bottom: 0;
    }

    .recommendation-item i {
        color: #34c759;
        margin-top: 2px;
        flex-shrink: 0;
    }

/* Apple-themed form controls */
.apple-form-control {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

    .apple-form-control:focus {
        border-color: #007aff;
        box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
        background: rgba(255, 255, 255, 0.95);
    }

/* Apple-themed buttons */
.apple-btn-primary {
    background: #007aff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
}

    .apple-btn-primary:hover {
        background: #0056cc;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    }

    .apple-btn-primary:disabled {
        background: #8e8e93;
        transform: none;
        box-shadow: none;
    }

.apple-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 500;
    color: #1d1d1f;
    transition: all 0.2s ease;
}

    .apple-btn-secondary:hover {
        background: rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }

/* Loading state */
.apple-loading-state {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
}

.loading-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.chart-body canvas {
    cursor: grab;
}

    .chart-body canvas:active {
        cursor: grabbing;
    }

.loading-text {
    color: #8e8e93;
    font-size: 14px;
    margin: 0;
}

.text-risk-safe {
    color: #34C759 !important; /* green */
}

.text-risk-mild {
    color: #A3E635 !important; /* lime yellow */
}

.text-risk-moderate {
    color: #FFD700 !important; /* gold */
}

.text-risk-high {
    color: #FF8C66 !important; /* light orange/red */
}

.text-risk-severe {
    color: #FF4C4C !important; /* bright red */
}

:root {
    --apple-blue: #007AFF;
    --apple-blue-hover: #0056CC;
    --apple-gray-1: #F2F2F7;
    --apple-gray-2: #E5E5EA;
    --apple-gray-3: #D1D1D6;
    --apple-gray-4: #C7C7CC;
    --apple-gray-5: #AEAEB2;
    --apple-gray-6: #8E8E93;
    --apple-text-primary: #1D1D1F;
    --apple-text-secondary: #86868B;
    --apple-green: #30D158;
    --apple-orange: #FF9500;
    --apple-red: #FF3B30;
    --apple-radius: 8px;
    --apple-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    --apple-shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body {
    background: var(--apple-gray-1);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* COMPACT CONTROL PANEL */
.control-panel {
    background: white;
    border-radius: var(--apple-radius);
    box-shadow: var(--apple-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--apple-gray-2);
}

.quick-ranges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--apple-gray-2);
}

.quick-range-btn {
    background: var(--apple-gray-1);
    border: 1px solid var(--apple-gray-3);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--apple-text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

    .quick-range-btn:hover {
        background: var(--apple-blue);
        color: white;
        border-color: var(--apple-blue);
    }

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 0.8fr;
    gap: 1rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--apple-text-primary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-control {
    background: var(--apple-gray-1);
    border: 1px solid var(--apple-gray-3);
    border-radius: var(--apple-radius);
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: var(--apple-text-primary);
}

    .form-control:focus {
        outline: none;
        border-color: var(--apple-blue);
        background: white;
        box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
    }

.btn-primary {
    background: var(--apple-blue);
    border: none;
    border-radius: var(--apple-radius);
    padding: 0.6rem 1rem;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

    .btn-primary:hover {
        background: var(--apple-blue-hover);
        transform: translateY(-1px);
        box-shadow: var(--apple-shadow-hover);
    }

/* COMPACT RESULTS */
.results-container {
    background: white;
    border-radius: var(--apple-radius);
    box-shadow: var(--apple-shadow);
    overflow: hidden;
    border: 1px solid var(--apple-gray-2);
}

.results-header {
    background: var(--apple-gray-1);
    padding: 1rem;
    border-bottom: 1px solid var(--apple-gray-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--apple-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--apple-gray-1);
    border: 1px solid var(--apple-gray-3);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--apple-text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

    .btn-secondary:hover:not(:disabled) {
        background: var(--apple-gray-2);
        transform: translateY(-1px);
        box-shadow: var(--apple-shadow);
    }

    .btn-secondary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.status-legend {
    padding: 0.75rem 1rem;
    background: var(--apple-gray-1);
    border-bottom: 1px solid var(--apple-gray-2);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-ongoing {
    background: var(--apple-red);
}

.status-short {
    background: var(--apple-orange);
}

.status-resolved {
    background: var(--apple-green);
}

/* COMPACT TABLE HEADER */
.excursions-header {
    padding: 0.5rem 1rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 120px;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--apple-gray-2);
    background: var(--apple-gray-1);
}

.header-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--apple-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

    .header-label:first-child {
        text-align: left;
    }

/* COMPACT ROW-STYLE CARDS */
.excursions-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.excursion-row {
    background: white;
    border-radius: var(--apple-radius);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--apple-gray-4);
    transition: all 0.2s ease;
    border: 1px solid var(--apple-gray-2);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 120px;
    gap: 1rem;
    align-items: center;
    min-height: 45px;
}

    .excursion-row:hover {
        transform: translateY(-1px);
        box-shadow: var(--apple-shadow);
        border-color: var(--apple-gray-3);
    }

    .excursion-row.ongoing {
        border-left-color: var(--apple-red);
        background: rgba(255, 59, 48, 0.02);
    }

    .excursion-row.short {
        border-left-color: var(--apple-orange);
        background: rgba(255, 149, 0, 0.02);
    }

    .excursion-row.resolved {
        border-left-color: var(--apple-green);
        background: rgba(48, 209, 88, 0.02);
    }

.row-time {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.row-time-range {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--apple-text-primary);
    line-height: 1.2;
}

.row-duration {
    font-size: 0.7rem;
    color: var(--apple-text-secondary);
    font-weight: 500;
}

.row-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.row-metric-label {
    font-size: 0.65rem;
    color: var(--apple-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.15rem;
}

.row-metric-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--apple-text-primary);
}

.row-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.status-ongoing-badge {
    background: rgba(255, 59, 48, 0.1);
    color: var(--apple-red);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.status-short-badge {
    background: rgba(255, 149, 0, 0.1);
    color: var(--apple-orange);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.status-resolved-badge {
    background: rgba(48, 209, 88, 0.1);
    color: var(--apple-green);
    border: 1px solid rgba(48, 209, 88, 0.2);
}

.no-data {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--apple-text-secondary);
}

.no-data-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.no-data h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--apple-text-primary);
}

.no-data p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.4;
}

.no-data-text {
    color: var(--apple-text-secondary);
    font-style: italic;
}

.flatpickr-input {
    background: var(--apple-gray-1) !important;
    border: 1px solid var(--apple-gray-3) !important;
    border-radius: var(--apple-radius) !important;
}

/* Modal Button */
.btn-threshold-modal {
    background: var(--apple-blue);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--apple-radius);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

    .btn-threshold-modal:hover {
        background: var(--apple-blue-hover);
        transform: translateY(-1px);
        box-shadow: var(--apple-shadow-hover);
    }

/* Modal Styles */
.threshold-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}



.threshold-modal-content {
    background: white;
    border-radius: 16px;
    width: 600px;
    height: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}



.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem 1.5rem 0 1.5rem;
    flex-shrink: 0;
}

.modal-icon {
    color: var(--apple-blue);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.modal-title-section {
    flex: 1;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--apple-text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--apple-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.close-modal {
    background: var(--apple-gray-1);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--apple-text-secondary);
    flex-shrink: 0;
}

    .close-modal:hover {
        background: var(--apple-gray-2);
        color: var(--apple-text-primary);
    }

.modal-body {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.info-section {
    background: var(--apple-gray-1);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.info-icon {
    color: var(--apple-blue);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--apple-text-primary);
    margin: 0;
}

.thresholds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    flex: 1;
}

.threshold-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    border: 1.5px solid var(--apple-gray-2);
}

    .threshold-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--apple-shadow);
        border-color: var(--apple-gray-3);
    }

    .threshold-item.critical {
        background: rgba(255, 59, 48, 0.02);
        border-color: rgba(255, 59, 48, 0.15);
    }

    .threshold-item.high {
        background: rgba(255, 107, 53, 0.02);
        border-color: rgba(255, 107, 53, 0.15);
    }

    .threshold-item.medium {
        background: rgba(255, 149, 0, 0.02);
        border-color: rgba(255, 149, 0, 0.15);
    }

    .threshold-item.low {
        background: rgba(255, 210, 63, 0.02);
        border-color: rgba(255, 210, 63, 0.15);
    }

.threshold-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.risk-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.risk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.risk-indicator.critical .risk-dot {
    background: var(--apple-red);
}

.risk-indicator.critical {
    color: var(--apple-red);
}

.risk-indicator.high .risk-dot {
    background: #FF6B35;
}

.risk-indicator.high {
    color: #FF6B35;
}

.risk-indicator.medium .risk-dot {
    background: var(--apple-orange);
}

.risk-indicator.medium {
    color: var(--apple-orange);
}

.risk-indicator.low .risk-dot {
    background: #FFD23F;
}

.risk-indicator.low {
    color: #B8860B;
}

.threshold-icon {
    font-size: 1.25rem;
    opacity: 0.8;
}

.threshold-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--apple-text-primary);
    margin-bottom: 0.5rem;
}

.threshold-condition {
    font-size: 0.8rem;
    color: var(--apple-text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.threshold-why {
    font-size: 0.75rem;
    color: var(--apple-text-secondary);
    font-style: italic;
    line-height: 1.3;
    margin-top: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--apple-text-secondary);
    margin-top: 1rem;
    flex-shrink: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--apple-gray-2);
}

    .modal-footer svg {
        color: var(--apple-green);
    }



.modal-header {
    padding: 1.25rem 1.25rem 0 1.25rem;
}

.modal-body {
    padding: 0.75rem 1.25rem 1.25rem 1.25rem;
}

.modal-title {
    font-size: 1.1rem;
}

.modal-subtitle {
    font-size: 0.8rem;
}

.info-section {
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.info-text {
    font-size: 0.8rem;
}

.threshold-item {
    padding: 0.75rem;
}

.threshold-icon {
    font-size: 1.1rem;
}

.threshold-title {
    font-size: 0.85rem;
}

.threshold-condition {
    font-size: 0.75rem;
}

.threshold-why {
    font-size: 0.7rem;
}


/* --- Keep original hero header styles --- */
.summary-hero {
    max-width: 860px;
    margin: 24px auto;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc, #f3f6fb);
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 4px 18px rgba(16,24,40,.06);
}

    .summary-hero .hero-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .summary-hero .hero-sub {
        color: #475467;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .summary-hero .hero-pills {
        display: flex;
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .summary-hero .pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #fff;
        border: 1px solid #e6ebf2;
        border-radius: 999px;
        padding: 6px 10px;
        font-size: 13px;
        color: #344054;
    }

/* --- Compact Landscape KPI Section --- */
.kpi-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem 0;
    margin: 1.5rem 0;
}

.kpi-row {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 0 1rem;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .kpi-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--accent-color);
    }

    .kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .kpi-card.temp {
        --accent-color: #ef4444;
    }

    .kpi-card.humidity {
        --accent-color: #3b82f6;
    }

    .kpi-card.voc {
        --accent-color: #10b981;
    }

    .kpi-card.lux {
        --accent-color: #f59e0b;
    }

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.kpi-card.temp .kpi-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.kpi-card.humidity .kpi-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.kpi-card.voc .kpi-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.kpi-card.lux .kpi-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.kpi-content {
    flex: 1;
}

.kpi-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* --- Full Width Table Section --- */
.table-section {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 2rem 0;
    margin: 1.5rem 0;
}

.table-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1rem;
}

.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.table-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.table-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0.25rem 0 0 0;
}/* --- Column Visibility Controls (Modern Inline Style) --- */
.colvis-toolbar {
    --bg: rgba(255,255,255,0.85);
    --bd: rgba(0,0,0,0.15);
    --txt: rgba(0,0,0,0.85); /* Dark text for visibility */
    --sub: rgba(0,0,0,0.65); /* Slightly lighter for subtitles */
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--bd);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}


/* Title + actions */
.colvis-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--txt);
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
}

.colvis-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: .25rem;
}

.colvis-link {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: .8rem;
    color: var(--sub);
    text-decoration: underline;
}

    .colvis-link:hover {
        color: var(--txt);
    }

.colvis-sep {
    color: var(--sub);
}

/* Chips row */
.colvis-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .6rem;
    margin-left: auto; /* pushes chips to the right; remove if you want everything centered */
}

/* Group labels and divider */
.colvis-group {
    color: var(--sub);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 0 .2rem;
}

.colvis-divider {
    width: 1px;
    height: 18px;
    background: var(--bd);
    display: inline-block;
    margin: 0 .25rem;
    border-radius: 1px;
}

/* Chip = hidden checkbox + styled label */
.chip {
    position: relative;
    display: inline-flex;
}

    .chip input {
        position: absolute;
        inset: 0;
        opacity: 0;
        pointer-events: none;
    }

    .chip label {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .42rem .7rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 500;
        color: var(--txt);
        background: rgba(255,255,255,0.22);
        border: 1px solid var(--bd);
        backdrop-filter: blur(8px);
        transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
        cursor: pointer;
        user-select: none;
    }

        .chip label:hover {
            background: var(--hover);
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(0,0,0,.12);
        }

    /* Active (checked) state */
    .chip input:checked + label {
        background: rgba(59,130,246,.18);
        border-color: rgba(59,130,246,.55);
        box-shadow: inset 0 0 0 1px rgba(59,130,246,.6), 0 4px 12px rgba(59,130,246,.15);
    }

        .chip input:checked + label i {
            filter: none;
        }

    /* Icon subtle tint */
    .chip label i {
        filter: brightness(1.1) saturate(1.2) opacity(.9);
    }

/* Small screens */
@media (max-width: 640px) {
    .colvis-toolbar {
        justify-content: center;
    }

    .colvis-chips {
        margin-left: 0;
        justify-content: center;
    }
}



.table-responsive {
    overflow-x: auto;
    background: white;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: white;
}

    .data-table th {
        background: linear-gradient(135deg, #f8fafc, #f1f5f9);
        padding: 0.75rem 0.75rem;
        text-align: center;
        font-weight: 600;
        color: #374151;
        border-bottom: 2px solid #e5e7eb;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

        .data-table th i {
            margin-right: 0.25rem;
            color: #6b7280;
        }

    .data-table td {
        padding: 0.75rem 0.75rem;
        border-bottom: 1px solid #f3f4f6;
        vertical-align: middle;
        text-align: center;
    }

    .data-table tbody tr {
        transition: all 0.2s ease;
    }

        .data-table tbody tr:hover {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
        }

        .data-table tbody tr:nth-child(even) {
            background: #fafbfc;
        }

            .data-table tbody tr:nth-child(even):hover {
                background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            }

/* --- Column Visibility --- */
.col-humidity {
    display: none;
}

.col-voc {
    display: none;
}

.col-lux {
    display: none;
}

.col-leak {
    display: none;
}

.show-humidity .col-humidity {
    display: table-cell;
}

.show-voc .col-voc {
    display: table-cell;
}

.show-lux .col-lux {
    display: table-cell;
}

.show-leak .col-leak {
    display: table-cell;
}



/* --- Horizontal Stat Chips --- */
.stat-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.stat-chip {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

    .stat-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .stat-chip.min {
        background: linear-gradient(135deg, #ecfdf5, #d1fae5);
        border-color: #10b981;
        color: #065f46;
    }

    .stat-chip.avg {
        background: linear-gradient(135deg, #eff6ff, #dbeafe);
        border-color: #3b82f6;
        color: #1e40af;
    }

    .stat-chip.max {
        background: linear-gradient(135deg, #fef2f2, #fee2e2);
        border-color: #ef4444;
        color: #991b1b;
    }

.stat-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* --- Compact Status Badges --- */
.sample-count {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #166534;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}

.leak-status {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid;
}

    .leak-status.ok {
        background: linear-gradient(135deg, #f0fdf4, #dcfce7);
        color: #166534;
        border-color: #bbf7d0;
    }

    .leak-status.yes {
        background: linear-gradient(135deg, #fef2f2, #fee2e2);
        color: #991b1b;
        border-color: #fca5a5;
    }

.risk-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 60px;
    justify-content: center;
}

.risk-low {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #166534;
    border-color: #bbf7d0;
}

.risk-medium {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border-color: #fde68a;
}

.risk-high {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border-color: #fca5a5;
}

/* Responsive adjustments for inline controls */

.column-controls-inline .checkbox-group {
    justify-content: center;
}

.column-controls-inline .checkbox-item {
    padding: 0.3rem 0.6rem;
}

.kpi-card {
    padding: 0.75rem 1rem;
}

.table-container {
    padding: 0 0.5rem;
}

.stat-group {
    flex-wrap: wrap;
    justify-content: center;
}

.data-table th,
.data-table td {
    padding: 0.5rem 0.4rem;
}

.stat-chip {
    font-size: 0.7rem;
}

/* Default: columns hidden (unless you want default visible ? see note below) */
/* Hide optional columns by default */
.data-table .col-humidity,
.data-table .col-voc,
.data-table .col-lux {
    display: none;
}

.data-table.show-humidity .col-humidity {
    display: table-cell;
}

.data-table.show-voc .col-voc {
    display: table-cell;
}

.data-table.show-lux .col-lux {
    display: table-cell;
}


/* Show when the table has the corresponding class */
#dataTable.show-humidity .col-humidity {
    display: table-cell;
}

#dataTable.show-voc .col-voc {
    display: table-cell;
}

#dataTable.show-lux .col-lux {
    display: table-cell;
}

#dataTable.show-leak .col-leak {
    display: table-cell;
}

/* Keep header and body aligned on smaller screens */
@media (max-width: 768px) {
    #dataTable th, #dataTable td {
        white-space: nowrap;
    }
}
/* Confirmed Alarms Specific Styles */
.alarm-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.alarm-type-data {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.alarm-type-signal {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alarm-type-battery {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.node-id {
    font-weight: 600;
    color: #495057;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.time-display {
    color: #495057;
}

.time-sub {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.resolution-notes {
    color: #495057;
    line-height: 1.4;
    max-width: 300px;
}

.no-notes {
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

.confirmed-by {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #495057;
    font-weight: 500;
}

.sort-header {
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

    .sort-header:hover {
        color: #007bff;
    }

.sort-active {
    color: #007bff;
}

.sort-inactive {
    opacity: 0.4;
    font-size: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .alarm-type-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .resolution-notes {
        max-width: 200px;
    }
}
/* Confirmed Alarms Specific Styles */
.button-center {
    display: flex;
    justify-content: center;
    align-items: end;
}

.alarm-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.alarm-type-data {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.alarm-type-signal {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alarm-type-battery {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.node-id {
    font-weight: 600;
    color: #495057;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    text-align: center;
}

.time-display {
    color: #495057;
    text-align: center;
}

.time-sub {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.resolution-notes {
    color: #495057;
    line-height: 1.4;
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
}

.no-notes {
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
    text-align: center;
}

.confirmed-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #495057;
    font-weight: 500;
}

.sort-header {
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.sort-header:hover {
    color: #007bff;
}

.sort-active {
    color: #007bff;
}

.sort-inactive {
    opacity: 0.4;
    font-size: 10px;
}

/* Center all table headers and cells */
#confirmedAlarmsTable th {
    text-align: center;
}

#confirmedAlarmsTable td {
    text-align: center;
    vertical-align: middle;
}

/* Center alarm type badge */
#confirmedAlarmsTable .alarm-type-badge {
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .alarm-type-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .resolution-notes {
        max-width: 200px;
    }
}
/* Center and expand the search button */
.button-center {
    display: flex;
    justify-content: center;
    align-items: end;
    width: 80%;
}

    .button-center .btn-primary {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 12px 24px;
    }

/* Rest of the CSS remains the same... */
.alarm-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.alarm-type-data {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.alarm-type-signal {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alarm-type-battery {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.node-id {
    font-weight: 600;
    color: #495057;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    text-align: center;
}

.time-display {
    color: #495057;
    text-align: center;
}

.time-sub {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.resolution-notes {
    color: #495057;
    line-height: 1.4;
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
}

.no-notes {
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
    text-align: center;
}

.confirmed-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #495057;
    font-weight: 500;
}

.sort-header {
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s ease;
}

    .sort-header:hover {
        color: #007bff;
    }

.sort-active {
    color: #007bff;
}

.sort-inactive {
    opacity: 0.4;
    font-size: 10px;
}

/* Center all table headers and cells */
#confirmedAlarmsTable th {
    text-align: center;
}

#confirmedAlarmsTable td {
    text-align: center;
    vertical-align: middle;
}

/* Center alarm type badge */
#confirmedAlarmsTable .alarm-type-badge {
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .button-center .btn-primary {
        max-width: 100%;
    }

    .alarm-type-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .resolution-notes {
        max-width: 200px;
    }
}
/* Reporting.css */

/* Center the first column (Date) */
#weeklyTable td.time-period {
    text-align: center !important;
    vertical-align: middle !important;
}


.export-actions {
    gap: 14px;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px; /* pill */
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    letter-spacing: 0.3px;
}

    .export-btn i {
        font-size: 16px;
    }

    .export-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .export-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

.print-btn {
    background: linear-gradient(145deg, #f9f9f9, #f1f3f6);
    color: #11314C;
    border: 1px solid #e0e0e0;
}

.pdf-btn {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: #fff;
}
/* Default hidden (match your other patterns) */
#dataTable .col-iaq {
    display: none;
}

/* Show when toggled on */
#dataTable.show-iaq .col-iaq {
    display: table-cell;
}
/* ---------- KPI GRID (Apple modern) ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
}

.kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 14px 30px rgba(0,0,0,.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* No truncation anywhere */
.kpi-title, .kpi-sub {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Badge (colorful Apple icon bubble) */
.kpi-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
    flex: 0 0 44px;
}

    .kpi-badge i {
        font-size: 18px;
    }

.kpi-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.kpi-title {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.2;
    color: #0b1220;
}

.kpi-value {
    font-weight: 900;
    font-size: 24px;
    line-height: 1.05;
    color: #0b1220;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-sub {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.25;
    color: #64748b;
}

/* ---------- Color themes per KPI ---------- */
.kpi-temp .kpi-badge {
    background: linear-gradient(135deg,#ff3b30,#ff9f0a);
}

.kpi-humidity .kpi-badge {
    background: linear-gradient(135deg,#0a84ff,#5ac8fa);
}

.kpi-lux .kpi-badge {
    background: linear-gradient(135deg,#ffd60a,#ff9f0a);
}

.kpi-iaq .kpi-badge {
    background: linear-gradient(135deg,#34c759,#0a84ff);
}

/* ---------- IAQ pill (Apple style) ---------- */
.kpi-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    background: rgba(255,255,255,.85);
}

/* Bosch IAQ band colors */
.iaq-excellent {
    background: rgba(52,199,89,.16);
    border-color: rgba(52,199,89,.32);
    color: #0b3d1a;
}

.iaq-good {
    background: rgba(52,199,89,.12);
    border-color: rgba(52,199,89,.26);
    color: #0b3d1a;
}

.iaq-light {
    background: rgba(255,221,87,.24);
    border-color: rgba(255,221,87,.44);
    color: #4a3b00;
}

.iaq-moderate {
    background: rgba(255,179,0,.22);
    border-color: rgba(255,179,0,.44);
    color: #4a2a00;
}

.iaq-heavy {
    background: rgba(255,122,89,.22);
    border-color: rgba(255,122,89,.44);
    color: #4a1200;
}

.iaq-severe {
    background: rgba(255,76,76,.22);
    border-color: rgba(255,76,76,.44);
    color: #4a0000;
}

.iaq-extreme {
    background: rgba(255,76,76,.32);
    border-color: rgba(255,76,76,.56);
    color: #4a0000;
}

.iaq-na {
    background: rgba(148,163,184,.16);
    border-color: rgba(148,163,184,.32);
    color: #475569;
}

/* ---------- Responsive (no cut off) ---------- */
@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-value {
        font-size: 22px;
    }
}
.kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
#weeklyTable .col-iaq {
    display: none;
}

#weeklyTable.show-iaq .col-iaq {
    display: table-cell;
}
.iaq-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.85);
}

/* IAQ bands */
.iaq-excellent {
    background: rgba(52,199,89,.16);
    border-color: rgba(52,199,89,.32);
    color: #0b3d1a;
}

.iaq-good {
    background: rgba(52,199,89,.12);
    border-color: rgba(52,199,89,.26);
    color: #0b3d1a;
}

.iaq-light {
    background: rgba(255,221,87,.24);
    border-color: rgba(255,221,87,.44);
    color: #4a3b00;
}

.iaq-moderate {
    background: rgba(255,179,0,.22);
    border-color: rgba(255,179,0,.44);
    color: #4a2a00;
}

.iaq-heavy {
    background: rgba(255,122,89,.22);
    border-color: rgba(255,122,89,.44);
    color: #4a1200;
}

.iaq-severe {
    background: rgba(255,76,76,.22);
    border-color: rgba(255,76,76,.44);
    color: #4a0000;
}

.iaq-extreme {
    background: rgba(255,76,76,.32);
    border-color: rgba(255,76,76,.56);
    color: #4a0000;
}
.kpi-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    cursor: help;
    line-height: 1;
}

    .kpi-help:hover {
        color: #0f172a;
        border-color: #94a3b8;
        background: #f8fafc;
    }

/* Smaller, cleaner ?Apple-ish? sizing (less zoomed-in) */
:root {
    --risk-safe: #34C759;
    --risk-mild: #FFFFCC;
    --risk-moderate: #FFD700;
    --risk-high: #FFA07A;
    --risk-severe: #FF4C4C;
    --mp-blue: #0A84FF;
    --mp-blue-bg: rgba(10,132,255,.08);
    --mp-blue-br: rgba(10,132,255,.22);
    --mp-border: rgba(0,0,0,.06);
    --mp-text: rgba(0,0,0,.74);
    --mp-sub: rgba(0,0,0,.52);
}

.results-container {
    padding-top: 6px;
}

/* Grid: slightly wider, but more compact */
.ai-header,
.ai-row {
    display: grid;
    grid-template-columns: 180px 110px minmax(0,1fr) minmax(0,1fr) 110px;
    gap: 12px;
}

.ai-header {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.70);
    border: 1px solid var(--mp-border);
    font-weight: 800;
    font-size: .86rem;
    color: var(--mp-sub);
}

.ai-row {
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--mp-border);
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
    margin-bottom: 10px;
}

.ai-cell {
    min-width: 0;
}

.ai-ts-main {
    font-weight: 800;
    font-size: .92rem;
    color: rgba(0,0,0,.82);
}

.ai-ts-sub {
    margin-top: 2px;
    font-size: .78rem;
    color: var(--mp-sub);
}

/* Score chip: compact */
.score-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: .86rem;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.03);
    color: rgba(0,0,0,.78);
}

.score-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.score-chip.safe {
    background: rgba(52,199,89,.14);
    border-color: rgba(52,199,89,.28);
}

    .score-chip.safe .score-dot {
        background: var(--risk-safe);
        box-shadow: 0 0 0 3px rgba(52,199,89,.18);
    }

.score-chip.mild {
    background: rgba(255,255,204,.70);
    border-color: rgba(0,0,0,.08);
}

    .score-chip.mild .score-dot {
        background: var(--risk-mild);
        box-shadow: 0 0 0 3px rgba(255,255,204,.55);
    }

.score-chip.moderate {
    background: rgba(255,215,0,.16);
    border-color: rgba(255,215,0,.30);
}

    .score-chip.moderate .score-dot {
        background: var(--risk-moderate);
        box-shadow: 0 0 0 3px rgba(255,215,0,.18);
    }

.score-chip.high {
    background: rgba(255,160,122,.18);
    border-color: rgba(255,160,122,.30);
}

    .score-chip.high .score-dot {
        background: var(--risk-high);
        box-shadow: 0 0 0 3px rgba(255,160,122,.18);
    }

.score-chip.severe {
    background: rgba(255,76,76,.14);
    border-color: rgba(255,76,76,.28);
}

    .score-chip.severe .score-dot {
        background: var(--risk-severe);
        box-shadow: 0 0 0 3px rgba(255,76,76,.18);
    }

/* Preview: single-line, calm */
.ai-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ai-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .74rem;
    border: 1px solid rgba(0,0,0,.06);
    background: rgba(0,0,0,.02);
    color: var(--mp-sub);
    width: fit-content;
}

.ai-preview-line {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .90rem;
    line-height: 1.22;
    color: var(--mp-text);
}

/* Details button: Apple blue, compact */
.ai-expand-btn {
    border-radius: 999px;
    border: 1px solid var(--mp-blue-br);
    background: var(--mp-blue-bg);
    color: var(--mp-blue);
    padding: 7px 10px;
    font-weight: 900;
    font-size: .86rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(10,132,255,.10);
    transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}

    .ai-expand-btn:hover {
        transform: translateY(-1px);
        background: rgba(10,132,255,.10);
        box-shadow: 0 10px 20px rgba(10,132,255,.14);
    }

/* Details panel: subtle blue border, not loud */
.ai-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(10,132,255,.18);
    background: rgba(10,132,255,.03);
    box-shadow: 0 10px 22px rgba(10,132,255,.06);
    margin: 0 0 10px 0;
}

.ai-detail-card {
    border-radius: 14px;
    border: 1px solid rgba(10,132,255,.14);
    background: #fff;
    overflow: hidden;
}

.ai-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(10,132,255,.04);
    border-bottom: 1px solid rgba(10,132,255,.10);
}

.ai-detail-title {
    font-weight: 900;
    font-size: .88rem;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: rgba(0,0,0,.78);
}

.ai-detail-body {
    padding: 10px 12px;
    font-size: .92rem;
    line-height: 1.45;
    color: rgba(0,0,0,.76);
    white-space: pre-wrap;
    max-height: 260px;
    overflow: auto;
}

/* Copy: icon-only, tiny */
.ai-copy-btn {
    width: 34px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid rgba(10,132,255,.18);
    background: rgba(10,132,255,.05);
    color: var(--mp-blue);
}

    .ai-copy-btn.copied {
        border-color: rgba(52,199,89,.35);
        background: rgba(52,199,89,.10);
        color: rgba(52,199,89,1);
    }

/* Pager: subtle and small */
.ai-pager {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.78);
    border: 1px solid var(--mp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ai-pager-meta {
    font-weight: 750;
    font-size: .86rem;
    color: var(--mp-sub);
}

.ai-page-size-label {
    font-weight: 850;
    font-size: .82rem;
    color: var(--mp-sub);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ai-page-size {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.10);
    padding: 5px 9px;
    background: #fff;
    font-weight: 850;
    font-size: .86rem;
}

.ai-pager-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ai-page-btn.icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.03);
    color: rgba(0,0,0,.62);
}

    .ai-page-btn.icon:hover {
        background: rgba(0,0,0,.05);
        color: rgba(0,0,0,.78);
    }

    .ai-page-btn.icon:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

.ai-page-indicator {
    font-weight: 850;
    font-size: .86rem;
    color: var(--mp-sub);
    padding: 0 4px;
}

@media (max-width: 1100px) {
    .ai-header, .ai-row {
        grid-template-columns: 1fr 110px 1fr 110px;
    }

    .ai-detail-grid {
        grid-template-columns: 1fr;
    }

    .ai-pager {
        flex-direction: column;
        align-items: flex-start;
    }
}

.ai-detail-head,
.ai-detail-title {
    text-align: left;
    justify-content: flex-start;
}

.ai-detail-body {
    text-align: left !important;
    text-indent: 0 !important;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    /* keep readability */
    line-height: 1.55;
    white-space: normal; /* single paragraph, no artificial breaks */
    word-break: break-word;
}

    /* defensive: remove any first-line styling */
    .ai-detail-body::first-line {
        text-indent: 0 !important;
    }

/* Centralized compliance-report visual aliases.
   Keep selectors additive to avoid breaking report scripts. */

.is-hidden {
    display: none !important;
}

.scope-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.scope-toggle .chip {
    border-radius: 999px;
}

.report-signature-panel,
.signature-panel {
    border: 1px solid var(--mp-border, #dbe2ea);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.report-summary-card,
.summary-card {
    border: 1px solid var(--mp-border, #dbe2ea);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.compliance-table-wrap {
    border: 1px solid var(--mp-border, #dbe2ea);
    border-radius: 16px;
    overflow: auto;
    background: #fff;
}

:root {
    --mp-bg: #f7f8f6;
    --mp-surface: #ffffff;
    --mp-surface-soft: #eef3ef;
    --mp-text: #111827;
    --mp-muted: #6b7280;
    --mp-primary: #0a84ff;
    --mp-primary-dark: #0869cc;
    --mp-border: rgba(17, 24, 39, 0.08);
    --mp-radius: 16px;
    --mp-shadow: 0 2px 10px rgba(17, 24, 39, 0.05), 0 12px 28px rgba(17, 24, 39, 0.08);
    --mp-transition: 220ms ease;
    --mp-success: #22a06b;
    --mp-warning: #f5a623;
    --mp-danger: #d94a4a;
}

html,
body {
    background: var(--mp-bg);
    color: var(--mp-text);
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.45;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mp-shell main {
    animation: mpFadeIn .22s ease-out both;
}

@keyframes mpFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.mp-page {
    display: grid;
    gap: 1rem;
}

.mp-hero,
.mp-page-header,
.header-bubble {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    border: 1px solid var(--mp-border);
    border-radius: 18px;
    box-shadow: var(--mp-shadow);
    padding: 1rem 1.35rem;
}

.mp-hero {
    padding: 1.3rem 1.5rem;
}

.mp-page-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.mp-page-subtitle {
    margin-top: .35rem;
    color: var(--mp-muted);
    font-size: .95rem;
}

.header-bubble h1,
.mp-page-header h1 {
    margin: 0;
    color: var(--mp-text);
    font-size: 1.35rem;
    font-weight: 700;
}

.header-bubble p,
.mp-page-header p {
    margin: .15rem 0 0;
    color: var(--mp-muted);
}

.mp-card,
.mp-form-card,
.mp-table-card,
.form-wrapper,
.config-card,
.apple-card,
.apple-section,
.table-card,
.results-container {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
}

.mp-card-header {
    border-bottom: 1px solid var(--mp-border);
    padding: .9rem 1rem;
    font-weight: 700;
}

.mp-grid {
    display: grid;
    gap: 1rem;
}

.mp-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mp-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mp-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
}

.mp-kpi-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9fcf9 100%);
    border: 1px solid var(--mp-border);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
    padding: .85rem;
}

.mp-kpi-card .kpi-label {
    font-size: .75rem;
    color: var(--mp-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

.mp-kpi-card .kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--mp-text);
    margin-top: .2rem;
}

.mp-kpi-card .kpi-note {
    font-size: .75rem;
    color: var(--mp-muted);
    margin-top: .15rem;
}

.mp-form .form-label,
.form-label,
.apple-form-label {
    color: var(--mp-text);
    font-weight: 600;
    font-size: .85rem;
}

.mp-input,
.mp-select,
.form-control,
.form-select,
.apple-form-control {
    background: #fff;
    border: 1px solid var(--mp-border);
    border-radius: 12px;
    color: var(--mp-text);
    transition: border-color var(--mp-transition), box-shadow var(--mp-transition);
}

.mp-input:focus,
.mp-select:focus,
.form-control:focus,
.form-select:focus,
.apple-form-control:focus {
    border-color: var(--mp-primary);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.mp-btn,
.mp-btn-primary,
.mp-btn-secondary,
.btn,
.btn-login,
.btn-save,
.btn-apply,
.btn-register,
.btn-configure,
.btn-view-users,
.apple-btn,
.apple-btn-primary {
    border-radius: 999px;
    font-weight: 600;
    transition: transform var(--mp-transition), box-shadow var(--mp-transition), filter var(--mp-transition);
}

.mp-btn-primary,
.btn-primary,
.btn-success,
.btn-login,
.btn-save,
.btn-apply,
.btn-register,
.btn-configure,
.btn-view-users,
.apple-btn-primary,
.btn-primary-modern {
    background: linear-gradient(135deg, var(--mp-primary) 0%, var(--mp-primary-dark) 100%);
    border-color: transparent;
    color: #fff;
}

.mp-btn-primary:hover,
.btn-primary:hover,
.btn-success:hover,
.btn-login:hover,
.btn-save:hover,
.btn-apply:hover,
.btn-register:hover,
.btn-configure:hover,
.btn-view-users:hover,
.apple-btn-primary:hover,
.btn-primary-modern:hover {
    filter: brightness(.98);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(10, 132, 255, 0.22);
}

.mp-btn-secondary,
.btn-outline-secondary,
.btn-outline-modern,
.apple-btn-secondary {
    border: 1px solid var(--mp-border);
    background: linear-gradient(180deg, #ffffff 0%, var(--mp-surface-soft) 100%);
    color: var(--mp-text);
}

.export-btn,
.print-btn,
.pdf-btn {
    border-radius: 999px;
    border: 1px solid var(--mp-border);
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.1);
}

.print-btn {
    background: #fff;
    color: var(--mp-text);
}

.pdf-btn {
    background: linear-gradient(135deg, #f25c5c, var(--mp-danger));
    color: #fff;
}

.mp-table,
.apple-table,
.data-table,
table.table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    overflow: hidden;
    background: #fff;
}

.mp-table thead th,
.apple-table thead th,
.data-table thead th,
table.table thead th {
    background: #edf3ee;
    color: #3b4a60;
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--mp-border);
}

.mp-table tbody tr:nth-child(even),
.apple-table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even),
table.table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.mp-table tbody tr:hover,
.apple-table tbody tr:hover,
.data-table tbody tr:hover,
table.table tbody tr:hover {
    background: #f1f7f2;
}

.mp-badge,
.mp-status,
.mp-status-pill,
.mp-risk-chip,
.badge,
.apple-badge,
.sensor-chip,
.alarm-pill {
    border-radius: 999px;
    font-weight: 600;
}

.mp-status {
    border: 1px solid transparent;
    padding: .25rem .6rem;
    font-size: .75rem;
}

.mp-status-pill {
    padding: .3rem .7rem;
    font-size: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.mp-risk-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .65rem;
    border: 1px solid var(--mp-border);
    background: #fff;
    color: var(--mp-text);
    font-size: .75rem;
}

.mp-risk-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--mp-primary), #4aa0f0, #e5ece6);
    box-shadow: inset 0 0 0 6px #fff;
}

.mp-risk-low,
.risk-low {
    background: rgba(10, 132, 255, 0.12);
    color: #0f5cb5;
    border-color: rgba(10, 132, 255, 0.3);
}

.mp-risk-medium,
.risk-medium {
    background: rgba(217, 155, 0, 0.16);
    color: #6a4b00;
    border-color: rgba(217, 155, 0, 0.35);
}

.mp-risk-high,
.risk-high {
    background: rgba(217, 67, 67, 0.14);
    color: #7a1f1f;
    border-color: rgba(217, 67, 67, 0.28);
}

.mp-risk-critical {
    background: rgba(170, 25, 25, 0.16);
    color: #5a1111;
    border-color: rgba(170, 25, 25, 0.34);
}

.mp-dot-safe { background-color: #34c759; }
.mp-dot-mild { background-color: #ffffcc; }
.mp-dot-moderate { background-color: #ffd700; }
.mp-dot-high { background-color: #ffa07a; }
.mp-dot-severe { background-color: #ff4c4c; }
.mp-dot-pending { background-color: #e0e0e0; }

.mp-filter-bar,
.mp-filter-panel,
.control-panel,
.action-bar,
.colvis-toolbar {
    background: var(--mp-surface-soft);
    border: 1px solid var(--mp-border);
    border-radius: 14px;
}

.mp-insight-panel,
.mp-action-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
    border: 1px solid var(--mp-border);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
}

.mp-report-header {
    display: grid;
    gap: .3rem;
}

.mp-report-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.mp-empty-state,
.no-data,
.no-groups-card {
    border: 1px dashed var(--mp-border);
    border-radius: var(--mp-radius);
    background: var(--mp-surface-soft);
}

.mp-modal .modal-content,
.modal-content,
.modern-modal-content,
.threshold-modal-content {
    border: 1px solid var(--mp-border);
    border-radius: calc(var(--mp-radius) + 2px);
    box-shadow: 0 20px 36px rgba(16, 24, 40, 0.2);
}

.mp-drawer,
.apple-drawer {
    border-left: 1px solid var(--mp-border);
    background: #fff;
}

.mp-section-title,
.section-title,
.apple-title,
.table-title,
.results-title {
    color: var(--mp-text);
    font-weight: 700;
}

.navbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--mp-border);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.mp-shell-navbar {
    min-height: 92px;
}

.mp-shell-bar {
    min-height: 116px;
}

.mp-shell-logo-wrap {
    position: absolute;
    left: 24px;
    top: -38px;
    z-index: 10;
}

.mp-shell-logo {
    height: 222px;
    width: 312px;
    object-fit: contain;
}

.mp-shell-nav-center .navbar-nav {
    padding-top: 25px;
}

.mp-shell-user {
    position: absolute;
    right: 24px;
}

.mp-customer-id {
    font-size: 13px;
}

.navbar-nav .nav-link {
    color: #25324a;
    border-radius: 12px;
    padding: .55rem 1rem;
}

.navbar-nav .nav-link:hover,
.active-parent > .nav-link {
    background: rgba(10, 132, 255, 0.1);
    color: var(--mp-primary) !important;
}

.dropdown-menu {
    border: 1px solid var(--mp-border);
    border-radius: 12px;
    box-shadow: 0 18px 32px rgba(16, 24, 40, 0.12);
}

.dropdown-item {
    border-radius: 10px;
}

.dropdown-item:hover,
.active-item {
    background: rgba(10, 132, 255, 0.1) !important;
    color: var(--mp-primary) !important;
}

.mp-mobile-navbar {
    height: 68px;
    border-bottom: 1px solid var(--mp-border);
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
    position: relative;
}

.mp-mobile-navbar .mp-toggler {
    width: 44px;
    height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.mp-mobile-navbar .mp-toggler:focus {
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.18), 0 8px 18px rgba(15, 23, 42, 0.10);
}

.mp-mobile-navbar .mp-toggler .navbar-toggler-icon {
    width: 1.35rem;
    height: 1.35rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 0.88%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.35' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.mp-mobile-brand {
    position: relative;
    height: 64px;
    line-height: 0;
    overflow: visible;
}

.mp-mobile-brand img {
    position: absolute;
    left: -115px;
    top: 50%;
    transform: translateY(-50%);
    height: 275px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
}

.mp-offcanvas {
    background: var(--mp-bg);
    border-right: 1px solid var(--mp-border);
}

.mp-accordion .accordion-button {
    border: 1px solid var(--mp-border);
    border-radius: 12px;
    color: var(--mp-text);
    font-weight: 600;
    box-shadow: none;
}

.mp-accordion .accordion-button:not(.collapsed) {
    color: #fff;
    background: linear-gradient(135deg, var(--mp-primary) 0%, var(--mp-primary-dark) 100%);
}

.auth-bg {
    background: radial-gradient(circle at top, #fbfdfb, #f3f7f3 45%, #ebf1ec);
}

.auth-card,
.login-card,
.form-container,
.main-container {
    border: 1px solid var(--mp-border);
    border-radius: 20px;
    box-shadow: 0 18px 35px rgba(16, 24, 40, 0.12);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-dialog {
    max-width: min(96vw, 980px);
}

.modal-body {
    overflow-wrap: anywhere;
}

.offcanvas {
    max-width: min(94vw, 420px);
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.live-status-table-wrapper,
.table-container,
.results-container,
.table-card {
    width: 100%;
}

.full-width-bg {
    width: 100%;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
}

.bg-panel-inner {
    padding: .65rem 1rem;
}

@media (max-width: 991.98px) {
    .container {
        padding-left: .9rem;
        padding-right: .9rem;
    }

    .mp-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-report-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-grid.two,
    .mp-grid.three {
        grid-template-columns: 1fr;
    }

    .header-bubble,
    .mp-page-header {
        border-radius: 16px;
    }

    .action-bar,
    .filter-controls,
    .export-actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: .7rem;
        padding-right: .7rem;
    }

    .mp-dashboard-grid,
    .mp-report-kpis {
        grid-template-columns: 1fr;
    }

    .header-bubble,
    .mp-page-header {
        padding: .85rem .95rem;
    }

    .header-bubble h1,
    .mp-page-header h1 {
        font-size: 1.12rem;
    }

    .action-bar,
    .filter-controls {
        flex-direction: column;
        align-items: stretch !important;
    }

    .export-actions .export-btn {
        width: 100%;
        justify-content: center;
    }

    .bg-panel-inner {
        padding: .5rem .45rem;
    }

    .modal-dialog {
        margin: .5rem auto;
    }

    .modal-75-center {
        width: 96vw !important;
        max-width: 96vw !important;
    }
}

/* ===== Report + page title neutral palette override ===== */
.header-bubble,
.mp-page-header,
.mp-hero {
    background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
    border-color: rgba(17, 24, 39, 0.08);
}

.mp-report-header,
.control-panel,
.mp-filter-panel,
.action-bar,
.colvis-toolbar {
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    border-color: rgba(17, 24, 39, 0.08);
}

.mp-report-header input[type="date"],
.mp-report-header .flatpickr-input,
.control-panel input[type="date"],
.control-panel .flatpickr-input,
#startDate,
#endDate,
#weekStart {
    background: #ffffff !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
    color: #1f2937 !important;
}

.mp-report-header input[type="date"]:focus,
.mp-report-header .flatpickr-input:focus,
.control-panel input[type="date"]:focus,
.control-panel .flatpickr-input:focus,
#startDate:focus,
#endDate:focus,
#weekStart:focus {
    border-color: #9aa4b2 !important;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.16) !important;
}

/* Environmental Compliance compact header/scope row */
.mp-compliance-header {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding-top: .82rem;
    padding-bottom: .82rem;
    margin-bottom: .75rem;
}

.mp-compliance-header .page-subtitle {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.34;
}

.mp-scope-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    width: 100%;
}

.mp-scope-toggle .chip {
    white-space: normal;
    margin: 0;
    min-height: 36px;
    padding: .38rem .62rem;
    flex: 1 1 170px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 991.98px) {
    .mp-compliance-header .page-subtitle { font-size: .86rem; }
    .mp-scope-toggle .chip { flex-basis: 100%; }
}

/* ===== Industry polish: modern title bubbles + cleaner tables ===== */
.header-bubble,
.mp-page-header {
    position: relative;
    border-radius: 22px !important;
    padding: 1rem 1.35rem !important;
    background: linear-gradient(165deg, #ffffff 0%, #f7f8fb 78%, #f2f4f8 100%) !important;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05), 0 16px 32px rgba(17, 24, 39, 0.09) !important;
    overflow: hidden;
}

.header-bubble::before,
.mp-page-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #2f80ed 0%, #0a84ff 100%);
    opacity: .9;
}

.header-bubble h1,
.mp-page-header h1,
.mp-page-title {
    font-size: clamp(1.2rem, 1.45vw, 1.65rem) !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    color: #111827 !important;
    margin: 0 !important;
}

.header-bubble p,
.mp-page-header p,
.page-subtitle,
.mp-page-subtitle {
    margin-top: .28rem !important;
    color: #6b7280 !important;
    font-size: .9rem !important;
    line-height: 1.35;
}

/* Cleaner, sharper, executive-style row flow */
.mp-table,
.apple-table,
table.table,
.data-table,
.live-status-table {
    border-radius: 16px !important;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    background: #ffffff !important;
}

.mp-table thead th,
.apple-table thead th,
table.table thead th,
.data-table thead th,
.live-status-table thead th {
    background: linear-gradient(180deg, #f4f6f9 0%, #edf1f5 100%) !important;
    color: #475569 !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .045em;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08) !important;
}

.mp-table tbody tr,
.apple-table tbody tr,
table.table tbody tr,
.data-table tbody tr,
.live-status-table tbody tr {
    transition: background-color .16s ease, box-shadow .16s ease;
}

.mp-table tbody tr:nth-child(odd),
.apple-table tbody tr:nth-child(odd),
table.table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd),
.live-status-table tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.mp-table tbody tr:nth-child(even),
.apple-table tbody tr:nth-child(even),
table.table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even),
.live-status-table tbody tr:nth-child(even) {
    background: #fafbfd !important;
}

.mp-table tbody td,
.apple-table tbody td,
table.table tbody td,
.data-table tbody td,
.live-status-table tbody td {
    color: #1f2937 !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    border-bottom: 1px solid rgba(17, 24, 39, 0.07) !important;
    vertical-align: middle;
}

.mp-table tbody tr:hover,
.apple-table tbody tr:hover,
table.table tbody tr:hover,
.data-table tbody tr:hover,
.live-status-table tbody tr:hover {
    background: #f3f7fd !important;
    box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.14);
}

.live-status-table .node-name {
    color: #111827 !important;
    font-weight: 650 !important;
}

.live-status-table .node-meta {
    color: #4b5563 !important;
    font-weight: 500 !important;
}

.sensor-chip,
.apple-badge,
.mp-status-pill,
.mp-risk-chip {
    border: 1px solid rgba(17, 24, 39, 0.1) !important;
    background: #f9fafb !important;
    color: #1f2937 !important;
}

/* ===== Final visual alignment pass ===== */
.header-bubble,
.mp-page-header {
    border-radius: 999px !important;
    padding: .92rem 1.45rem .92rem 1.45rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%) !important;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05), 0 12px 28px rgba(17, 24, 39, 0.08) !important;
}

.header-bubble::before,
.mp-page-header::before {
    display: none !important;
}

.header-bubble h1,
.mp-page-header h1,
.mp-page-title {
    font-size: clamp(1.18rem, 1.35vw, 1.48rem) !important;
    letter-spacing: -0.01em !important;
}

/* Better desktop logo alignment */
.mp-shell-navbar {
    min-height: 88px !important;
}

.mp-shell-bar {
    min-height: 108px !important;
}

.mp-shell-logo-wrap {
    top: -74px !important;
    left: 28px !important;
}

.mp-shell-logo {
    height: 266px !important;
    width: auto !important;
}

.mp-shell-nav-center .navbar-nav {
    padding-top: 18px !important;
}

.mp-shell-user {
    top: 50%;
    transform: translateY(-50%);
}

/* Better mobile logo placement */
.mp-mobile-brand {
    height: 62px !important;
}

.mp-mobile-brand img {
    left: -86px !important;
    top: 42% !important;
    height: 214px !important;
    width: auto !important;
}

/* Keep compliance header and input panel from colliding */
.mp-compliance-header + .control-panel.wide-layout {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    clear: both;
}

/* Global table typography/readability standards */
.mp-table tbody td,
.apple-table tbody td,
table.table tbody td,
.data-table tbody td,
.live-status-table tbody td {
    font-size: .8rem !important;
    line-height: 1.25 !important;
    letter-spacing: 0.005em !important;
}

.mp-table thead th,
.apple-table thead th,
table.table thead th,
.data-table thead th,
.live-status-table thead th {
    font-size: .69rem !important;
    letter-spacing: .06em !important;
}

@media (max-width: 991.98px) {
    .header-bubble,
    .mp-page-header {
        border-radius: 999px !important;
        padding: .85rem 1rem !important;
    }

    .mp-shell-user {
        top: auto;
        transform: none;
    }

    .mp-mobile-brand img {
        left: -72px !important;
        top: 45% !important;
        height: 192px !important;
    }

    .mp-mobile-navbar .container-fluid {
        min-height: 68px;
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        padding-inline: .75rem !important;
    }

    .mp-mobile-brand {
        grid-column: 2;
        justify-self: center;
        width: min(48vw, 190px);
        height: 62px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible;
    }

    .mp-mobile-brand img {
        left: 50% !important;
        top: 50% !important;
        height: 192px !important;
        transform: translate(-50%, -50%) !important;
    }

    .mp-mobile-navbar .mp-toggler {
        grid-column: 3;
        justify-self: end;
    }
}

/* ===== Bugfix polish overrides ===== */
/* Environmental Compliance multiselect dropdown clipping */
.control-panel.wide-layout,
.control-panel.wide-layout .form-grid,
.control-panel.wide-layout .form-group,
.control-panel.wide-layout .mdrop {
    overflow: visible !important;
}

.control-panel.wide-layout .mdrop-menu {
    z-index: 12000 !important;
}

/* Group Node/User Access view toggle visibility */
.apple-btn.btn-outline-secondary {
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid rgba(51, 65, 85, 0.22) !important;
}

.apple-btn.btn-outline-secondary:hover {
    background: #eef2f7 !important;
    color: #1f2937 !important;
    border-color: rgba(51, 65, 85, 0.34) !important;
}

.apple-btn.btn-outline-secondary.active,
.apple-btn.btn-outline-secondary:active,
a.apple-btn.btn-outline-secondary.active {
    background: linear-gradient(135deg, #0a84ff 0%, #0869cc 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(10, 132, 255, 0.28);
}

/* Group User Access: prevent white-on-white hover/invisible tabs */
a.apple-btn.btn-outline-secondary,
a.apple-btn.btn-outline-secondary:hover,
a.apple-btn.btn-outline-secondary:focus-visible {
    text-decoration: none !important;
}

/* Live Status value readability (Temp/Humidity/Lux + full row clarity) */
.live-status-table tbody td {
    color: #1f2937 !important;
    font-weight: 560 !important;
    font-size: .76rem !important;
    letter-spacing: 0.008em;
}

.live-status-table td .sensor-chip {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit;
    font-variant-numeric: tabular-nums;
}

.live-status-table td:nth-child(8) .sensor-chip,
.live-status-table td:nth-child(9) .sensor-chip,
.live-status-table td:nth-child(10) .sensor-chip {
    background: transparent !important;
    color: inherit !important;
    border: 0 !important;
    box-shadow: none !important;
}

.live-status-table .node-name,
.live-status-table .node-meta,
.live-status-table .iaq-label {
    color: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
}

/* Force consistent typography for all row content (including time fields) */
.live-status-table tbody td *,
.live-status-table tbody td span,
.live-status-table tbody td div {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
}

.live-status-table .status-icon {
    font-size: 1.05rem !important;
    line-height: 1 !important;
}

.live-status-table tbody tr {
    border-bottom: 1px solid rgba(17, 24, 39, 0.08) !important;
}

.live-status-table tbody tr:hover {
    background: #eff5ff !important;
}

/* ===== Global dropdown clipping prevention ===== */
.control-panel,
.control-panel.wide-layout,
.mp-filter-panel,
.action-bar,
.colvis-toolbar,
.form-grid,
.form-group,
.btn-group,
.dropdown,
.mdrop {
    overflow: visible !important;
}

.control-panel.wide-layout,
.mp-filter-panel,
.action-bar {
    position: relative;
    z-index: 15;
}

.dropdown-menu,
.mdrop-menu,
.flatpickr-calendar {
    z-index: 12000 !important;
}

/* Keep horizontal table scroll, but do not clip vertical dropdowns */
.table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Environmental Compliance: let multi-device dropdown expand page flow */
.mp-compliance-controls #multiDeviceDropdown .mdrop-menu {
    position: absolute !important;
    top: calc(100% + .45rem) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    z-index: 4300 !important;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.12);
}

.mp-compliance-controls #multiDeviceDropdown {
    position: relative !important;
    z-index: 4301 !important;
}

.mp-compliance-controls #multiDeviceDropdown .mdrop-list {
    max-height: none !important;
    overflow: visible !important;
}

/* Environmental Compliance: disable internal scroll trap, use full-page scroll */
#printArea.report-container .main-grid {
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: auto auto !important;
}

#printArea.report-container .grid-section {
    overflow: visible !important;
    min-height: 0 !important;
}

#printArea.report-container .section-content,
#printArea.report-container .scrollable-content {
    overflow: visible !important;
    max-height: none !important;
}

.mp-compliance-controls {
    position: relative !important;
    z-index: 4200 !important;
    overflow: visible !important;
}

/* Keep the report body below the compliance controls dropdown */
#printArea.report-container,
#printArea.report-container .main-grid,
#printArea.report-container .grid-section {
    position: relative;
    z-index: 1;
}

/* Keep global nav/dropdowns above page content overlays */
.navbar,
.mp-shell-navbar,
.mp-mobile-navbar {
    position: relative;
    z-index: 200000 !important;
}

header {
    position: relative;
    z-index: 199999 !important;
    isolation: isolate;
    overflow: visible !important;
}

.navbar .dropdown-menu,
.mp-shell-navbar .dropdown-menu,
.mp-mobile-navbar .dropdown-menu {
    z-index: 200001 !important;
}

.navbar,
.mp-shell-navbar,
.mp-shell-bar,
.mp-shell-nav-center,
.navbar .container-fluid,
.navbar-nav,
.nav-item.dropdown,
.dropdown-menu {
    overflow: visible !important;
}

.dropdown-menu {
    max-height: none !important;
    overflow-y: visible !important;
}

/* Keep side drawers above shell nav so close button stays visible */
.offcanvas-backdrop {
    z-index: 209998 !important;
}

.offcanvas,
.mp-offcanvas,
.apple-drawer {
    z-index: 210000 !important;
}

/* Reports: keep table header title/subtitle readable on dark header */
.table-header .table-title,
.table-header .table-title i {
    color: #ffffff !important;
}

.table-header .table-subtitle {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* ===== Backoffice account/admin pages unified schema ===== */
.mp-backoffice-page,
.mp-backoffice-login {
    background: linear-gradient(180deg, #f6f7fa 0%, #eef2f7 100%) !important;
    color: #111827 !important;
}

.mp-backoffice-page .main-container {
    background: transparent !important;
}

.mp-backoffice-page .header-section {
    background: linear-gradient(135deg, #0a84ff 0%, #0869cc 100%) !important;
    color: #ffffff !important;
    border-radius: 20px;
    margin: 1rem;
    box-shadow: 0 14px 32px rgba(10, 132, 255, 0.22);
}

.mp-backoffice-page .header-title {
    font-size: clamp(1.35rem, 1.7vw, 1.95rem) !important;
    letter-spacing: -0.012em;
}

.mp-backoffice-page .header-subtitle {
    color: rgba(255, 255, 255, 0.92) !important;
}

.mp-backoffice-page .content-section {
    padding-top: 1rem !important;
}

.mp-backoffice-page .form-container,
.mp-backoffice-page .table-container,
.mp-backoffice-page .action-bar {
    background: #ffffff !important;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08) !important;
}

.mp-backoffice-page .action-bar {
    padding: 1rem 1.15rem !important;
}

.mp-backoffice-page .form-title h2 {
    font-size: clamp(1.2rem, 1.4vw, 1.55rem) !important;
}

.mp-backoffice-page .form-title p,
.mp-backoffice-page .form-help-text,
.mp-backoffice-page .text-muted {
    color: #6b7280 !important;
}

.mp-backoffice-page .form-control-modern {
    border: 1px solid rgba(17, 24, 39, 0.14) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
}

.mp-backoffice-page .form-control-modern:focus {
    border-color: #0a84ff !important;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14) !important;
    background: #ffffff !important;
}

.mp-backoffice-page .btn-modern {
    border-radius: 11px !important;
    font-weight: 600 !important;
}

.mp-backoffice-page .btn-primary-modern {
    background: linear-gradient(135deg, #0a84ff 0%, #0869cc 100%) !important;
    color: #ffffff !important;
}

.mp-backoffice-page .btn-primary-modern:hover {
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.28) !important;
}

.mp-backoffice-page .btn-secondary-modern,
.mp-backoffice-page .btn-outline-modern {
    background: #f8fafc !important;
    border: 1px solid rgba(51, 65, 85, 0.22) !important;
    color: #1f2937 !important;
}

.mp-backoffice-page .btn-secondary-modern:hover,
.mp-backoffice-page .btn-outline-modern:hover {
    background: #eef2f7 !important;
    border-color: rgba(51, 65, 85, 0.34) !important;
}

.mp-backoffice-page .table-modern thead th {
    background: linear-gradient(180deg, #f4f6f9 0%, #edf1f5 100%) !important;
    color: #475569 !important;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08) !important;
}

.mp-backoffice-page .table-modern tbody tr:hover {
    background: #f3f7fd !important;
}

.mp-backoffice-page .company-id-badge {
    background: #eef2f7 !important;
    color: #334155 !important;
}

.mp-backoffice-page .stats-card {
    background: linear-gradient(135deg, #0a84ff 0%, #0869cc 100%) !important;
}

.mp-backoffice-page .modal-modern .modal-header {
    background: linear-gradient(135deg, #0a84ff 0%, #0869cc 100%) !important;
}

.mp-backoffice-page .alert-danger-modern {
    background: #fff1f2 !important;
    color: #b91c1c !important;
    border-left-color: #dc2626 !important;
}

.mp-backoffice-page .alert-success-modern {
    background: #ecfdf3 !important;
    color: #166534 !important;
    border-left-color: #16a34a !important;
}

.mp-backoffice-page .alert-info-modern {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-left-color: #2563eb !important;
}

/* PulseAdmin / PulseSupport unified login shell */
.mp-backoffice-login .login-container,
.mp-backoffice-login body {
    min-height: 100vh;
}

.mp-backoffice-login .login-card {
    border-radius: 20px !important;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    box-shadow: 0 18px 36px rgba(16, 24, 40, 0.14) !important;
    background: #ffffff !important;
}

.mp-backoffice-login .form-control {
    border: 1px solid rgba(17, 24, 39, 0.16) !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
}

.mp-backoffice-login .form-control:focus {
    border-color: #0a84ff !important;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14) !important;
    background: #ffffff !important;
}

.mp-backoffice-login .btn-login {
    background: linear-gradient(135deg, #0a84ff 0%, #0869cc 100%) !important;
    border-radius: 10px !important;
}

.mp-backoffice-login .btn-login:hover {
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.28) !important;
}

/* ===== Small laptop density mode (13-14" screens) ===== */
@media (min-width: 992px) and (max-width: 1440px) {
    html {
        font-size: 92.5%;
    }

    .mp-page {
        gap: 0.7rem;
    }

    .header-bubble,
    .mp-page-header,
    .mp-hero {
        padding: 0.72rem 1.05rem !important;
    }

    .header-bubble h1,
    .mp-page-header h1,
    .mp-page-title {
        font-size: clamp(1.05rem, 1.15vw, 1.28rem) !important;
    }

    .header-bubble p,
    .mp-page-header p,
    .mp-page-subtitle {
        font-size: 0.82rem !important;
        line-height: 1.28 !important;
    }

    .action-bar,
    .control-panel,
    .control-panel.wide-layout,
    .mp-filter-panel,
    .colvis-toolbar {
        padding: 0.65rem 0.85rem !important;
        gap: 0.45rem !important;
    }

    .table-responsive {
        margin-bottom: 0 !important;
    }

    .mp-table thead th,
    .apple-table thead th,
    table.table thead th,
    .data-table thead th,
    .live-status-table thead th {
        font-size: 0.64rem !important;
    }

    .mp-table tbody td,
    .apple-table tbody td,
    table.table tbody td,
    .data-table tbody td,
    .live-status-table tbody td {
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
    }
}

/* Report-focused laptop density: less page scrolling, still readable */
@media (min-width: 992px) and (max-width: 1440px) {
    .control-panel,
    .control-panel.wide-layout,
    .mp-filter-panel {
        padding: 0.7rem 0.9rem !important;
        margin-bottom: 0.7rem !important;
    }

    .kpi-container {
        margin-bottom: 0.65rem !important;
    }

    .kpi-grid {
        gap: 0.6rem !important;
    }

    .kpi-card {
        padding: 0.72rem !important;
        min-height: 0 !important;
    }

    .kpi-title {
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
    }

    .kpi-value {
        font-size: 1.22rem !important;
        line-height: 1.08 !important;
    }

    .kpi-sub {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }

    .table-section {
        margin-top: 0.7rem !important;
    }

    .table-card {
        border-radius: 14px !important;
    }

    .table-header {
        padding: 0.95rem 1.1rem !important;
    }

    .table-title {
        font-size: 0.98rem !important;
        line-height: 1.2 !important;
    }

    .table-subtitle {
        font-size: 0.74rem !important;
        line-height: 1.2 !important;
        margin-top: 0.2rem !important;
    }

    .colvis-toolbar {
        padding: 0.52rem 0.72rem !important;
    }

    .chip label,
    .colvis-link,
    .colvis-title {
        font-size: 0.73rem !important;
    }

    /* Keep reports flowing naturally (avoid partial-page scroll traps) */
    #printArea .table-responsive {
        max-height: none !important;
        overflow-y: visible !important;
    }

    #printArea.report-container .main-grid {
        gap: 0.65rem !important;
    }

    #printArea.report-container .grid-section {
        padding: 0.7rem !important;
    }
}

/* Standard desktop density (18"-24" monitors) */
@media (min-width: 1441px) and (max-width: 1919px) {
    .header-bubble,
    .mp-page-header,
    .mp-hero {
        padding: 0.82rem 1.12rem !important;
    }

    .action-bar,
    .control-panel,
    .control-panel.wide-layout,
    .mp-filter-panel,
    .colvis-toolbar {
        padding: 0.72rem 0.92rem !important;
    }

    .kpi-grid {
        gap: 0.68rem !important;
    }

    .kpi-card {
        padding: 0.78rem !important;
    }

    .table-header {
        padding: 1rem 1.2rem !important;
    }

    .table-title {
        font-size: 1.02rem !important;
    }

    .table-subtitle {
        font-size: 0.76rem !important;
    }

    #printArea .table-responsive {
        max-height: none !important;
        overflow-y: visible !important;
    }
}

/* Large monitor density (24"-30"+): keep elegant, avoid oversized gaps */
@media (min-width: 1920px) {
    .header-bubble,
    .mp-page-header,
    .mp-hero {
        padding: 0.9rem 1.2rem !important;
    }

    .action-bar,
    .control-panel,
    .control-panel.wide-layout,
    .mp-filter-panel,
    .colvis-toolbar {
        padding: 0.78rem 0.96rem !important;
    }

    .kpi-grid {
        gap: 0.72rem !important;
    }

    .kpi-card {
        padding: 0.82rem !important;
    }

    .table-header {
        padding: 1.05rem 1.25rem !important;
    }

    .table-subtitle {
        font-size: 0.78rem !important;
    }

    #printArea .table-responsive {
        max-height: none !important;
        overflow-y: visible !important;
    }
}

/* ===== Hover contrast safety (prevents blue text turning white/invisible) ===== */
.quick-range-btn:hover {
    background: #eaf2ff !important;
    color: #1f2937 !important;
    border-color: rgba(47, 128, 237, 0.35) !important;
}

.btn-outline-secondary:hover,
.btn-outline-modern:hover,
.apple-btn.btn-outline-secondary:hover,
a.apple-btn.btn-outline-secondary:hover,
.colvis-link:hover,
.sort-header:hover,
.chip label:hover {
    color: #1f2937 !important;
}

.text-primary:hover,
.link-primary:hover,
.btn-link:hover {
    color: #0a84ff !important;
}

/* User Management: keep card/table in one unified visual section */
.mp-users-combined-panel {
    background: #f3f5f8;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    padding: 1rem;
}

.mp-users-combined-panel > form.mb-4 {
    margin-bottom: 0.85rem !important;
}

.mp-users-combined-panel .action-bar,
.mp-users-combined-panel .colvis-toolbar,
.mp-users-combined-panel .mp-filter-panel {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mp-users-view-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0 !important;
}

.mp-users-combined-panel #tableView {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.mp-users-view-section #cardView {
    margin-bottom: 0 !important;
}

.mp-users-view-section #tableView {
    border-radius: 14px;
    overflow: hidden;
}

/* Live Status: align title bubble scale with premium page headers */
.mp-live-header {
    border-radius: 999px !important;
    padding: 1.02rem 1.55rem !important;
}

.mp-live-header .mp-page-title {
    font-size: clamp(1.26rem, 1.5vw, 1.62rem) !important;
    font-weight: 700 !important;
    letter-spacing: -0.012em !important;
}

.mp-live-header .mp-page-subtitle {
    font-size: 0.92rem !important;
    line-height: 1.38 !important;
    color: #6b7280 !important;
}

/* ===== Enterprise portal density pass ===== */
.mp-shell-app {
    --mp-page-gutter: clamp(.8rem, 1.1vw, 1.35rem);
    --mp-page-top: clamp(.55rem, .75vw, .95rem);
    --mp-section-gap: clamp(.55rem, .78vw, .9rem);
    --mp-control-pad: clamp(.62rem, .78vw, .92rem);
    --mp-report-table-height: clamp(360px, calc(100vh - 350px), 720px);
}

.mp-shell-app .container.pt-4.mp-page {
    max-width: 100% !important;
    padding: var(--mp-page-top) var(--mp-page-gutter) .95rem !important;
}

.mp-shell-app .mp-page > main {
    min-width: 0;
    padding-bottom: .8rem !important;
}

.mp-shell-app .mp-page > main > .container,
.mp-shell-app .mp-page > main > .container-fluid {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mp-shell-app .header-bubble,
.mp-shell-app .mp-page-header {
    max-width: min(100%, 920px) !important;
    margin-top: 0 !important;
    margin-bottom: var(--mp-section-gap) !important;
    padding: clamp(.66rem, .82vw, .95rem) clamp(.95rem, 1.15vw, 1.35rem) !important;
}

.mp-shell-app .header-bubble h1,
.mp-shell-app .mp-page-header h1,
.mp-shell-app .mp-page-title {
    font-size: clamp(1.08rem, 1.18vw, 1.42rem) !important;
    line-height: 1.15 !important;
}

.mp-shell-app .header-bubble p,
.mp-shell-app .mp-page-header p,
.mp-shell-app .page-subtitle,
.mp-shell-app .mp-page-subtitle {
    font-size: clamp(.78rem, .78vw, .88rem) !important;
    line-height: 1.3 !important;
    max-width: 82ch;
}

.mp-shell-app .control-panel,
.mp-shell-app .filter-form,
.mp-shell-app .action-bar,
.mp-shell-app .mp-filter-panel,
.mp-shell-app .colvis-toolbar {
    margin-bottom: var(--mp-section-gap) !important;
    padding: var(--mp-control-pad) !important;
}

.mp-shell-app .form-grid {
    gap: .55rem .72rem !important;
    align-items: end !important;
}

.mp-shell-app .form-label {
    margin-bottom: .28rem !important;
    font-size: .76rem !important;
    line-height: 1.2 !important;
}

.mp-shell-app .form-control,
.mp-shell-app .form-select,
.mp-shell-app .apple-form-control,
.mp-shell-app .mdrop-toggle {
    min-height: 36px;
    padding: .42rem .62rem !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
    border-radius: 10px !important;
}

.mp-shell-app .btn,
.mp-shell-app .btn-primary,
.mp-shell-app .btn-success,
.mp-shell-app .btn-danger,
.mp-shell-app .apple-btn,
.mp-shell-app .mp-btn,
.mp-shell-app .export-btn {
    min-height: 34px;
    padding: .42rem .78rem !important;
    font-size: .8rem !important;
    line-height: 1.12 !important;
}

.mp-shell-app .table-wrapper,
.mp-shell-app .table-responsive,
.mp-shell-app .live-status-table-wrapper {
    scrollbar-gutter: stable;
}

.mp-shell-app .apple-table thead th,
.mp-shell-app .data-table thead th,
.mp-shell-app table.table thead th {
    padding: .42rem .52rem !important;
    line-height: 1.12 !important;
}

.mp-shell-app .apple-table tbody td,
.mp-shell-app .data-table tbody td,
.mp-shell-app table.table tbody td {
    padding: .38rem .52rem !important;
    line-height: 1.18 !important;
}

.mp-shell-app .apple-table tbody tr:hover,
.mp-shell-app .data-table tbody tr:hover,
.mp-shell-app table.table tbody tr:hover,
.mp-shell-app .node-card:hover,
.mp-shell-app .apple-card:hover,
.mp-shell-app .kpi-card:hover {
    transform: none !important;
}

.mp-shell-app .form-wrapper,
.mp-shell-app .config-card,
.mp-shell-app .apple-section,
.mp-shell-app .content-container,
.mp-shell-app .mp-card,
.mp-shell-app .mp-form-card {
    margin-top: 0 !important;
    padding: clamp(.85rem, 1vw, 1.15rem) !important;
}

/* Reports: compact controls, KPIs, charts, and result tables */
.mp-shell-reporting {
    --mp-report-table-height: clamp(380px, calc(100vh - 330px), 740px);
}

.mp-shell-reporting .control-panel {
    margin-bottom: .6rem !important;
}

.mp-shell-reporting .control-panel .form-grid {
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr)) minmax(120px, .72fr);
}

.mp-shell-reporting .control-panel.wide-layout .form-grid,
.mp-shell-reporting .mp-compliance-controls .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.mp-shell-reporting .quick-ranges {
    justify-content: flex-start !important;
    gap: .35rem !important;
    margin-bottom: .55rem !important;
    padding-bottom: .55rem !important;
}

.mp-shell-reporting .quick-range-btn {
    min-height: 31px;
    padding: .28rem .58rem !important;
    font-size: .74rem !important;
}

.mp-shell-reporting .export-actions {
    margin-bottom: .5rem !important;
}

.mp-shell-reporting .export-btn {
    gap: .35rem !important;
    min-height: 32px;
    padding: .36rem .72rem !important;
}

.mp-shell-reporting #printArea {
    min-width: 0;
}

.mp-shell-reporting .summary-hero {
    max-width: 100% !important;
    margin: .55rem 0 !important;
    padding: .7rem .9rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem 1rem;
    text-align: left !important;
}

.mp-shell-reporting .summary-hero .hero-title {
    font-size: clamp(.98rem, 1vw, 1.16rem) !important;
    line-height: 1.18 !important;
    margin: 0 !important;
}

.mp-shell-reporting .summary-hero .hero-sub {
    font-size: .78rem !important;
    line-height: 1.22 !important;
    margin: 0 !important;
}

.mp-shell-reporting .summary-hero .hero-pills {
    justify-content: flex-start !important;
    gap: .35rem !important;
}

.mp-shell-reporting .summary-hero .pill {
    padding: .28rem .48rem !important;
    font-size: .72rem !important;
}

.mp-shell-reporting .kpi-container {
    padding: .35rem 0 !important;
    margin: .45rem 0 !important;
    background: transparent !important;
}

.mp-shell-reporting .kpi-grid {
    gap: .52rem !important;
}

.mp-shell-reporting .kpi-card {
    gap: .52rem !important;
    padding: .62rem .7rem !important;
    border-radius: 12px !important;
}

.mp-shell-reporting .kpi-badge {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
    border-radius: 10px !important;
}

.mp-shell-reporting .kpi-badge i {
    font-size: 15px !important;
}

.mp-shell-reporting .kpi-body {
    gap: .22rem !important;
}

.mp-shell-reporting .kpi-title {
    font-size: .72rem !important;
    line-height: 1.16 !important;
}

.mp-shell-reporting .kpi-value {
    font-size: 1.03rem !important;
    line-height: 1.08 !important;
    gap: .35rem !important;
}

.mp-shell-reporting .kpi-sub {
    font-size: .66rem !important;
    line-height: 1.15 !important;
}

.mp-shell-reporting .table-section {
    margin-top: .55rem !important;
    margin-bottom: .7rem !important;
}

.mp-shell-reporting .table-container {
    padding: 0 !important;
}

.mp-shell-reporting .table-card,
.mp-shell-reporting .results-container,
.mp-shell-reporting .apple-chart-container,
.mp-shell-reporting .apple-metric-card,
.mp-shell-reporting .apple-insight-card {
    border-radius: 12px !important;
}

.mp-shell-reporting .table-header {
    padding: .68rem .84rem !important;
    text-align: left !important;
}

.mp-shell-reporting .table-header br {
    display: none !important;
}

.mp-shell-reporting .table-title {
    justify-content: flex-start !important;
    font-size: .92rem !important;
    line-height: 1.16 !important;
}

.mp-shell-reporting .table-subtitle {
    font-size: .72rem !important;
    line-height: 1.18 !important;
}

.mp-shell-reporting .colvis-toolbar {
    margin-top: .45rem !important;
    gap: .38rem .48rem !important;
    padding: .42rem .52rem !important;
    border-radius: 10px !important;
}

.mp-shell-reporting .colvis-chips {
    gap: .28rem .36rem !important;
    margin-left: 0 !important;
}

.mp-shell-reporting .colvis-title,
.mp-shell-reporting .colvis-link,
.mp-shell-reporting .chip label {
    font-size: .7rem !important;
}

.mp-shell-reporting .chip label {
    padding: .26rem .46rem !important;
}

.mp-shell-reporting .table-card > .table-responsive,
.mp-shell-reporting .bg-white > .table-responsive {
    max-height: var(--mp-report-table-height);
    overflow: auto !important;
}

.mp-shell-reporting .data-table thead th,
.mp-shell-reporting .apple-table thead th,
.mp-shell-reporting table.table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.mp-shell-reporting .stat-group {
    gap: .24rem !important;
}

.mp-shell-reporting .stat-chip {
    padding: .16rem .32rem !important;
    border-radius: 6px !important;
}

.mp-shell-reporting .stat-label {
    font-size: .54rem !important;
}

.mp-shell-reporting .stat-value {
    font-size: .68rem !important;
}

.mp-shell-reporting .row.mb-4,
.mp-shell-reporting .row.gx-4.mb-4 {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .65rem;
    margin-bottom: .65rem !important;
}

.mp-shell-reporting .apple-metric-card {
    min-height: 0 !important;
    padding: .72rem !important;
}

.mp-shell-reporting .metric-icon {
    width: 34px !important;
    height: 34px !important;
    margin-right: .55rem !important;
    border-radius: 10px !important;
}

.mp-shell-reporting .metric-icon i {
    font-size: 17px !important;
}

.mp-shell-reporting .metric-label {
    margin-bottom: .15rem !important;
    font-size: .66rem !important;
}

.mp-shell-reporting .metric-value {
    font-size: .98rem !important;
    line-height: 1.1 !important;
}

.mp-shell-reporting .apple-chart-container {
    height: clamp(305px, 42vh, 420px) !important;
}

.mp-shell-reporting .chart-header,
.mp-shell-reporting .insight-header {
    padding: .62rem .82rem !important;
}

.mp-shell-reporting .chart-title,
.mp-shell-reporting .insight-title {
    font-size: .92rem !important;
}

.mp-shell-reporting .chart-body {
    min-height: 0 !important;
    padding: .5rem .65rem .65rem !important;
}

.mp-shell-reporting #environmentPreviewChart {
    height: 42px !important;
    margin-top: 6px !important;
}

.mp-shell-reporting .custom-legend {
    padding: .42rem .7rem .28rem !important;
    gap: .35rem .55rem !important;
}

.mp-shell-reporting .legend-text {
    font-size: .66rem !important;
}

.mp-shell-reporting .text-center.mb-4 {
    margin-bottom: .65rem !important;
}

.mp-shell-reporting .text-center.mb-4 p[style*="padding-bottom"] {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.mp-shell-reporting .results-container {
    margin-top: .55rem !important;
    padding: .55rem !important;
}

.mp-shell-reporting .results-header {
    padding: .45rem .55rem !important;
}

.mp-shell-reporting .results-title {
    font-size: .94rem !important;
}

.mp-shell-reporting .ai-list {
    max-height: clamp(360px, calc(100vh - 340px), 720px);
    overflow: auto;
    padding-right: .15rem;
}

.mp-shell-reporting .ai-header,
.mp-shell-reporting .ai-row {
    grid-template-columns: 150px 78px minmax(0, 1fr) minmax(0, 1fr) 86px;
    gap: .5rem !important;
}

.mp-shell-reporting .ai-header {
    padding: .42rem .55rem !important;
    font-size: .72rem !important;
    border-radius: 10px !important;
}

.mp-shell-reporting .ai-row {
    padding: .5rem .55rem !important;
    margin-bottom: .42rem !important;
    border-radius: 10px !important;
}

.mp-shell-reporting .ai-ts-main,
.mp-shell-reporting .score-chip,
.mp-shell-reporting .ai-expand-btn {
    font-size: .76rem !important;
}

.mp-shell-reporting .ai-ts-sub,
.mp-shell-reporting .ai-preview-line,
.mp-shell-reporting .ai-preview-pill {
    font-size: .68rem !important;
}

.mp-shell-reporting .ai-detail-grid {
    gap: .45rem !important;
    padding: .5rem !important;
}

.mp-shell-reporting .ai-detail-head {
    padding: .48rem .58rem !important;
}

.mp-shell-reporting .ai-detail-body {
    max-height: 180px !important;
    padding: .55rem .65rem !important;
    font-size: .78rem !important;
    line-height: 1.38 !important;
}

.mp-shell-reporting #resultsContainer,
.mp-shell-reporting #aiSummary {
    margin-top: .55rem !important;
    margin-bottom: .75rem !important;
}

.mp-shell-reporting #resultsContainer canvas {
    max-height: clamp(300px, 44vh, 430px);
}

.mp-shell-reporting .report-toolbar,
.mp-shell-reporting .report-card,
.mp-shell-reporting .metric-grid,
.mp-shell-reporting .report-container {
    max-width: 100% !important;
}

.mp-shell-reporting #printArea.report-container {
    padding: 0 !important;
    font-size: .82rem !important;
}

.mp-shell-reporting #printArea.report-container .report-header {
    margin-bottom: .65rem !important;
    padding: .7rem .85rem !important;
}

.mp-shell-reporting #printArea.report-container .customer-title {
    font-size: clamp(1rem, 1.1vw, 1.25rem) !important;
}

.mp-shell-reporting #printArea.report-container .header-meta {
    gap: .55rem .85rem !important;
    font-size: .72rem !important;
}

.mp-shell-reporting #printArea.report-container .verdict-badge {
    padding: .36rem .62rem !important;
    font-size: .76rem !important;
    box-shadow: none !important;
}

.mp-shell-reporting #printArea.report-container .main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: auto !important;
    gap: .65rem !important;
    height: auto !important;
    margin-bottom: .75rem !important;
}

.mp-shell-reporting #printArea.report-container .grid-section,
.mp-shell-reporting #printArea.report-container .detailed-excursions {
    border-radius: 10px !important;
}

.mp-shell-reporting #printArea.report-container .section-header,
.mp-shell-reporting #printArea.report-container .detailed-excursions .section-header {
    padding: .55rem .7rem !important;
}

.mp-shell-reporting #printArea.report-container .section-header h3,
.mp-shell-reporting #printArea.report-container .detailed-excursions .section-header h3 {
    font-size: .82rem !important;
}

.mp-shell-reporting #printArea.report-container .section-content {
    padding: .65rem !important;
    overflow: visible !important;
}

.mp-shell-reporting #printArea.report-container .summary-metrics .summary-text {
    margin-bottom: .65rem !important;
    line-height: 1.34 !important;
}

.mp-shell-reporting #printArea.report-container .key-metrics {
    gap: .45rem !important;
}

.mp-shell-reporting #printArea.report-container .metric-item {
    padding: .55rem !important;
}

.mp-shell-reporting #printArea.report-container .metric-value {
    font-size: 1rem !important;
}

.mp-shell-reporting #printArea.report-container .metric-label,
.mp-shell-reporting #printArea.report-container .field-row,
.mp-shell-reporting #printArea.report-container .rec-list,
.mp-shell-reporting #printArea.report-container .no-recommendations {
    font-size: .72rem !important;
}

.mp-shell-reporting #printArea.report-container .status-table th,
.mp-shell-reporting #printArea.report-container .status-table td,
.mp-shell-reporting #printArea.report-container .device-table th,
.mp-shell-reporting #printArea.report-container .device-table td,
.mp-shell-reporting #printArea.report-container .excursion-table th,
.mp-shell-reporting #printArea.report-container .excursion-table td,
.mp-shell-reporting #printArea.report-container .compact-table th,
.mp-shell-reporting #printArea.report-container .compact-table td {
    padding: .42rem .5rem !important;
    line-height: 1.18 !important;
}

.mp-shell-reporting #printArea.report-container .scrollable-content {
    max-height: none !important;
    overflow: visible !important;
}

/* Monitoring, alarms, configuration, and help share the same compact portal rhythm */
.mp-shell-monitoring .group-grid,
.mp-shell-configuration .node-grid,
.mp-shell-configuration #cardView,
.mp-shell-configuration .row[id="cardView"],
.mp-shell-configuration .row.row-cols-1,
.mp-shell-help .row {
    gap: .75rem !important;
}

.mp-shell-monitoring .group-card,
.mp-shell-monitoring .node-card,
.mp-shell-configuration .node-card,
.mp-shell-configuration .delete-card,
.mp-shell-configuration .apple-card,
.mp-shell-help .card {
    padding: .85rem !important;
    border-radius: 12px !important;
}

.mp-shell-monitoring .dashboard,
.mp-shell-monitoring .stats {
    margin-bottom: .7rem !important;
}

.mp-shell-monitoring .stat {
    padding: .65rem .75rem !important;
}

.mp-shell-monitoring #nodeGrid {
    gap: .75rem !important;
}

.mp-shell-alarms .filter-form {
    margin-bottom: .65rem !important;
}

.mp-shell-alarms .filter-form .row {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .55rem;
}

.mp-shell-alarms .bg-white > .table-responsive,
.mp-shell-configuration .table-wrapper,
.mp-shell-configuration #tableView {
    max-height: clamp(390px, calc(100vh - 310px), 760px);
    overflow: auto !important;
    scrollbar-gutter: stable;
}

.mp-shell-configuration .action-bar {
    padding-top: .6rem !important;
    margin-bottom: .7rem !important;
}

.mp-shell-configuration .row.g-4,
.mp-shell-configuration .row-cols-1.g-4 {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem;
}

@media (min-width: 992px) and (max-width: 1440px), (min-width: 992px) and (max-height: 820px) {
    .mp-shell-app {
        --mp-page-gutter: .85rem;
        --mp-page-top: .48rem;
        --mp-section-gap: .48rem;
        --mp-control-pad: .56rem;
        --mp-report-table-height: clamp(340px, calc(100vh - 300px), 690px);
    }

    .mp-shell-navbar {
        min-height: 80px !important;
    }

    .mp-shell-bar {
        min-height: 96px !important;
    }

    .mp-shell-nav-center .navbar-nav {
        padding-top: 14px !important;
    }

    .navbar-nav .nav-link {
        padding: .42rem .72rem !important;
        font-size: .88rem !important;
    }

    .mp-shell-user {
        gap: .65rem !important;
        right: 16px !important;
    }

    .mp-shell-user .small {
        font-size: .72rem !important;
    }

    .mp-shell-user .btn {
        padding: .32rem .72rem !important;
    }

    .mp-shell-reporting .kpi-sub {
        display: none !important;
    }

    .mp-shell-reporting .apple-chart-container {
        height: clamp(280px, 39vh, 380px) !important;
    }

    .mp-shell-reporting #printArea.report-container .main-grid {
        gap: .5rem !important;
    }
}

@media (min-width: 992px) and (max-width: 1240px) {
    .mp-shell-reporting .control-panel .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-shell-reporting .control-panel .form-group:last-child {
        grid-column: auto;
    }

    .mp-shell-reporting .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .mp-shell-reporting .ai-header,
    .mp-shell-reporting .ai-row {
        grid-template-columns: 132px 68px minmax(0, 1fr) 78px;
    }

    .mp-shell-reporting .ai-header .ai-h-col:nth-child(4),
    .mp-shell-reporting .ai-row .ai-cell:nth-child(4) {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .mp-shell-app {
        --mp-page-gutter: .78rem;
        --mp-page-top: .65rem;
        --mp-section-gap: .6rem;
        --mp-control-pad: .7rem;
    }

    .mp-shell-reporting .control-panel .form-grid,
    .mp-shell-reporting .control-panel.wide-layout .form-grid,
    .mp-shell-reporting .mp-compliance-controls .form-grid {
        grid-template-columns: 1fr !important;
    }

    .mp-shell-reporting .summary-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .mp-shell-reporting .table-card > .table-responsive,
    .mp-shell-reporting .bg-white > .table-responsive,
    .mp-shell-alarms .bg-white > .table-responsive,
    .mp-shell-configuration .table-wrapper,
    .mp-shell-configuration #tableView {
        max-height: none;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    .mp-shell-reporting #printArea.report-container .main-grid {
        grid-template-columns: 1fr !important;
    }

    .mp-shell-reporting .ai-header {
        display: none !important;
    }

    .mp-shell-reporting .ai-row {
        grid-template-columns: 1fr auto !important;
    }

    .mp-shell-reporting .ai-row .ai-score,
    .mp-shell-reporting .ai-row .ai-preview {
        grid-column: 1 / -1;
    }
}

/* ===== Launch readiness visual polish ===== */
.mp-section-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: .45rem;
    color: #0b6f82;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mp-launch-home,
.mp-policy-page,
.mp-error-page {
    max-width: 1160px;
    margin: 0 auto;
}

.mp-launch-hero,
.mp-policy-hero,
.mp-support-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(238, 247, 242, .96)),
        linear-gradient(90deg, rgba(34, 160, 107, .12), rgba(10, 132, 255, .10));
    border: 1px solid rgba(17, 24, 39, .08);
    box-shadow: 0 18px 38px rgba(17, 24, 39, .08);
}

.mp-launch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .75rem;
}

.mp-launch-meta span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .62rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #334155;
    font-size: .78rem;
    font-weight: 700;
}

.mp-launch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-top: .85rem;
}

.mp-launch-card {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    min-height: 132px;
    padding: 1rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    background: #fff;
    color: var(--mp-text);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mp-launch-card:hover {
    transform: translateY(-2px);
    border-color: rgba(10, 132, 255, .28);
    box-shadow: 0 18px 36px rgba(17, 24, 39, .10);
}

.mp-launch-card.primary {
    background: linear-gradient(135deg, #12314f, #0b6f82);
    color: #fff;
}

.mp-launch-card.primary small,
.mp-launch-card.primary .mp-launch-icon {
    color: rgba(255, 255, 255, .82);
}

.mp-launch-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(10, 132, 255, .10);
    color: #0b6f82;
    font-size: 1.1rem;
}

.mp-launch-card strong {
    display: block;
    margin-bottom: .3rem;
    font-size: .98rem;
}

.mp-launch-card small {
    display: block;
    color: #64748b;
    line-height: 1.35;
}

.mp-policy-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-top: .85rem;
}

.mp-policy-card {
    padding: 1rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .06);
}

.mp-policy-card i {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: .75rem;
    border-radius: 12px;
    background: rgba(34, 160, 107, .12);
    color: #15845a;
    font-size: 1.1rem;
}

.mp-policy-card h2 {
    margin: 0 0 .45rem;
    font-size: 1rem;
    font-weight: 800;
}

.mp-policy-card p {
    margin: 0;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.45;
}

.mp-error-page {
    display: grid;
    min-height: min(620px, calc(100vh - 180px));
    place-items: center;
}

.mp-error-panel {
    width: min(100%, 680px);
    padding: 2rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: 0 18px 38px rgba(17, 24, 39, .09);
}

.mp-error-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: .9rem;
    border-radius: 16px;
    background: rgba(245, 166, 35, .12);
    color: #b87300;
    font-size: 1.6rem;
}

.mp-error-panel h1 {
    margin-bottom: .5rem;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 800;
}

.mp-error-panel p {
    max-width: 540px;
    margin: 0 auto 1rem;
    color: #64748b;
}

.mp-request-id {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: .35rem 0 1.1rem;
    padding: .45rem .7rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: .8rem;
}

.mp-request-id code {
    color: #0f172a;
}

.mp-error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
}

.support-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.support-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-top: .85rem;
}

.support-method {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    background: #fff;
    color: var(--mp-text);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .06);
}

.support-method:hover {
    color: var(--mp-text);
    border-color: rgba(10, 132, 255, .28);
    box-shadow: 0 18px 36px rgba(17, 24, 39, .10);
}

.support-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: rgba(10, 132, 255, .10);
    color: #0b6f82;
    font-size: 1.15rem;
}

.support-method strong,
.support-method small {
    display: block;
}

.support-method small {
    margin-top: .18rem;
    color: #64748b;
}

.support-footer {
    margin-top: .85rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    font-size: .88rem;
}

.mp-shell-monitoring .maintenance-layout {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    margin-top: .75rem !important;
    text-align: left;
}

.mp-shell-monitoring .device-image {
    max-width: 100%;
    max-height: clamp(220px, 36vh, 330px);
    margin: 0 auto !important;
}

.mp-shell-monitoring .battery-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 0 !important;
}

.mp-shell-monitoring .battery-status-box {
    width: auto;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .06);
}

.mp-shell-monitoring .battery-status-box h2 {
    margin-top: .65rem;
    font-size: clamp(.98rem, 1.4vw, 1.2rem);
}

.mp-maintenance-warning {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    max-width: 900px;
    margin: .85rem auto 0;
    padding: .9rem 1rem;
    border: 1px solid rgba(217, 74, 74, .22);
    border-radius: 14px;
    background: #fff7f6;
    color: #8a1f17;
    text-align: left;
}

.mp-maintenance-warning i {
    flex: 0 0 auto;
    color: #d94a4a;
    font-size: 1.1rem;
    margin-top: .1rem;
}

.mp-maintenance-warning span {
    display: block;
    margin-top: .15rem;
    color: #7f3b36;
}

.mp-maintenance-note {
    max-width: 900px;
    margin: .6rem auto 0;
    padding: .7rem 1rem;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    background: #fff;
    color: #64748b;
    text-align: left;
}

.no-data-icon i {
    font-size: 1.7rem;
}

@media (max-width: 1440px) {
    .mp-launch-grid,
    .mp-policy-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .mp-launch-grid,
    .mp-policy-grid,
    .support-methods,
    .mp-shell-monitoring .maintenance-layout,
    .mp-shell-monitoring .battery-counts {
        grid-template-columns: 1fr;
    }

    .mp-launch-card,
    .support-method {
        min-height: auto;
    }

    .mp-error-panel {
        padding: 1.25rem;
    }
}
