*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
    touch-action: auto;
}

input,
select,
textarea {
    font-size: 16px !important;
}

body {
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
    margin: 0;
    overflow-x: hidden;
}

.header {
    background: #020617;
    padding: 20px;
    border-bottom: 1px solid #1e293b;
}

.title {
    font-size: 22px;
    font-weight: 600;
}

.subtitle {
    font-size: 13px;
    color: #94a3b8;
}

.container {
    padding: 16px;
}

.card {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-width: 0;
}

img, svg {
    max-width: 100%;
    height: auto;
}

.issue-row,
.latest-issue-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

h2 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    h2 {
        font-size: 16px;
    }

    .card {
        padding: 14px;
    }

    .agent-widget {
        min-height: 64px;
    }

    .agent-widget-value {
        font-size: 1.1rem;
    }

    .issue-chip,
    .severity-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 900px) {
    #lvom-mobile-nav-toggle {
        display: inline-flex !important;
    }

    #lvom-mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(3, 8, 18, 0.65);
        z-index: 39;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    #lvom-app-shell[data-mobile-nav-open="1"] #lvom-mobile-nav-backdrop {
        display: block !important;
        opacity: 1;
        pointer-events: auto;
    }

    #lvom-left-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: min(86vw, 300px) !important;
        min-width: min(86vw, 300px) !important;
        max-width: min(86vw, 300px) !important;
        transform: translateX(-106%);
        transition: transform 0.2s ease;
        z-index: 45 !important;
        align-self: auto !important;
    }

    #lvom-app-shell[data-mobile-nav-open="1"] #lvom-left-nav {
        transform: translateX(0);
    }

    #lvom-main-content {
        width: 100%;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 12px !important;
        margin-top: 44px;
    }

    #overview-dashboard-root > div:nth-child(1) {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    }

    #overview-dashboard-root > div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }

    #overview-dashboard-root #overview-latest-issues-scroll {
        height: 320px !important;
        max-height: 320px !important;
    }

    #overview-dashboard-root #overview-agent-health-list [data-role="status"] {
        min-width: 0 !important;
        white-space: normal !important;
    }

    #systems .agent-summary-bar,
    #systems-controls,
    .systems-controls {
        flex-wrap: wrap !important;
    }

    #live-view-modal > div,
    #alert-ticket-modal > div,
    #history-logs-modal > div,
    #incident-capture-modal > div,
    #global-resolved-alerts-modal > div,
    #resolved-alerts-modal > div,
    #debug-event-modal > div,
    #debug-fault-modal > div,
    #debug-ai-history-modal > div {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        height: calc(100dvh - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
        margin: 6px auto !important;
        overflow-x: hidden !important;
    }

    #live-view-modal {
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden !important;
    }

    #live-view-modal .live-view-modal-shell {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        min-height: 0;
        position: relative;
        overflow: hidden !important;
    }

    #live-view-modal .live-view-modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #live-view-modal .live-view-modal-header {
        align-items: center !important;
        flex: 0 0 auto;
        position: relative;
        z-index: 5;
    }

    #live-view-controls {
        flex: 0 0 auto;
        position: relative;
        z-index: 6;
        overflow: visible;
        background: #081225;
    }

    #live-view-modal .live-view-content-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 1;
    }

    #live-view-modal .live-view-modal-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
    }

    #live-view-modal .live-view-modal-actions .agent-summary-chip {
        white-space: nowrap !important;
        min-width: 82px;
        line-height: 1.2;
    }

    #alert-ticket-modal {
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden !important;
    }

    #alert-ticket-modal .alert-ticket-shell {
        width: 100%;
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    #history-logs-modal > div,
    #incident-capture-modal > div,
    #global-resolved-alerts-modal > div,
    #resolved-alerts-modal > div,
    #debug-event-modal > div,
    #debug-fault-modal > div,
    #debug-ai-history-modal > div {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    #history-logs-modal > div > div:last-child,
    #incident-capture-modal > div > div:last-child,
    #global-resolved-alerts-modal > div > div:last-child,
    #resolved-alerts-modal > div > div:last-child,
    #debug-event-modal > div > div:last-child,
    #debug-fault-modal > div > div:last-child,
    #debug-ai-history-modal > div > div:last-child {
        overflow-y: auto;
        min-height: 0;
        flex: 1 1 auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #alert-ticket-modal .alert-ticket-header {
        align-items: flex-start !important;
        padding-right: 20px !important;
    }

    #alert-ticket-modal .alert-ticket-close {
        white-space: nowrap;
        flex: 0 0 auto;
        margin-left: auto;
    }

    #alert-ticket-modal #alert-ticket-body {
        overflow-y: auto;
        min-height: 0;
        flex: 1 1 auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    [id$="-modal"] {
        padding: 10px !important;
        overflow-x: hidden !important;
    }

    [id$="-modal"] > div {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #alert-ticket-modal .agent-summary-bar,
    #alert-ticket-modal .issue-actions,
    #live-view-modal .agent-summary-bar,
    #debug-stream-summary {
        flex-wrap: wrap !important;
    }

    #alert-ticket-modal > div > div:first-child {
        align-items: flex-start !important;
        padding-right: 20px !important;
    }

    #alert-ticket-modal > div > div:first-child button {
        flex: 0 0 auto;
        margin-left: auto;
    }

    #incident-capture-modal [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    #incident-capture-history-modal [style*="grid-template-columns:360px"] {
        grid-template-columns: 1fr !important;
    }

    #incident-capture-history-modal [style*="border-right:1px"] {
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    #incident-capture-detail [style*="grid-template-columns:repeat(2"],
    #incident-capture-detail [style*="grid-template-columns:repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    .admin-responsive-table thead {
        display: none;
    }

    .admin-responsive-table,
    .admin-responsive-table tbody,
    .admin-responsive-table tr,
    .admin-responsive-table td {
        display: block;
        width: 100%;
    }

    .admin-responsive-table tr {
        border-top: 1px solid rgba(255,255,255,0.1);
        padding: 8px;
    }

    .admin-responsive-table td {
        padding: 6px 6px 6px 0 !important;
        border: none !important;
    }

    .admin-responsive-table td::before {
        content: attr(data-label) ": ";
        color: #9fb0d1;
        font-weight: 700;
    }

    #lvom-toast-stack {
        width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        bottom: 10px !important;
    }

    .lvom-toast-header {
        padding-right: 12px !important;
    }

    .lvom-toast-close {
        width: 34px !important;
        height: 34px !important;
        font-size: 20px !important;
        border-radius: 10px !important;
        margin-right: 2px;
        flex: 0 0 34px;
    }

    .system-summary {
        font-size: 12px;
        line-height: 1.5;
        white-space: normal;
    }

    #global-resolved-alerts-modal .resolved-filters-grid {
        grid-template-columns: 1fr !important;
    }

    #global-resolved-alerts-modal .resolved-filter-search {
        grid-column: 1 / -1;
    }

    #global-resolved-alerts-modal .resolved-filter-dates {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .fortigate-two-col-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    .fortigate-two-col-grid .card,
    .fortigate-two-col-grid > div {
        width: 100% !important;
    }
}

.agent {
    padding: 8px 0;
    border-bottom: 1px solid #172033;
}

.online {
    color: #22c55e;
}

.raw-json-block {
    margin-top: 10px;
}
.raw-json-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}
.raw-json-summary-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}
.raw-json-caret {
    display: inline-flex;
    flex: 0 0 auto;
    transition: transform 0.16s ease;
    color: #9fb0d1;
}
details[open] > .raw-json-summary .raw-json-caret {
    transform: rotate(90deg);
}
.raw-json-summary::-webkit-details-marker { display: none; }
.raw-json-summary::marker { content: ""; }
.raw-json-summary-label { color: #9fb0d1; font-weight: 600; }
.raw-json-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(15,23,42,0.9);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 11px;
}
.raw-json-copy-btn:hover { background: rgba(30,41,59,0.95); color: #fff; }
.raw-json-copy-btn.raw-json-copy-ok { border-color: rgba(34,197,94,.65); color: #86efac; }
.raw-json-copy-btn.raw-json-copy-failed { border-color: rgba(239,68,68,.65); color: #fca5a5; }
.raw-json-copy-icon { display: inline-flex; line-height: 0; }
.raw-json-copy-text { font-weight: 700; }
.raw-json-panel {
    margin-top: 14px;
}
.raw-json-block pre,
.raw-json-panel pre {
    margin-top: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
}
#live-view-modal .raw-json-panel pre,
#live-view-modal .raw-json-block pre,
#live-view-modal .card.raw-json-panel pre {
    display: block;
    max-height: 320px;
    overflow: auto;
}

.offline {
    color: #ef4444;
}

.system-summary {
    margin-bottom: 14px;
    color: #cbd5e1;
}

.systems-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.systems-search {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    min-width: 320px;
    flex: 1 1 320px;
}

.live-view-empty-state {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #c7d2fe;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.statuscake-activity-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    justify-content: flex-end;
}
.statuscake-page-btn {
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(15,23,42,0.85);
    color: #cbd5e1;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}
.statuscake-page-btn-active {
    background: rgba(59,130,246,0.35);
    border-color: rgba(96,165,250,0.7);
    color: #dbeafe;
}
.statuscake-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.network-diag-snapshot-detail {
    margin-top: 8px;
    max-height: 180px;
    overflow: auto;
    font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
    font-size: 11px;
    background: rgba(2,6,23,0.55);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px;
}

.status-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-buttons button {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e5e7eb;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.status-buttons button:hover {
    background: #1e293b;
}

.filter-active {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.systems-results-count {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 13px;
}

.system-block {
    margin-bottom: 10px;
}

.system-row {
    padding: 12px 14px;
    border: 1px solid #172033;
    border-radius: 8px;
    background: #0b1220;
    cursor: pointer;
}

.system-row:hover {
    background: #111b2f;
}

.system-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 10px;
}

.system-dot-critical {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.system-dot-warning {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.system-dot-info {
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.system-dot-ok {
    background: #64748b;
}

.system-detail-panel {
    margin-top: 8px;
    padding: 14px;
    border: 1px solid #1e293b;
    border-radius: 8px;
    background: #08111d;
}

.detail-topline {
    margin-bottom: 12px;
    color: #cbd5e1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
    color: #cbd5e1;
}

.detail-section-title {
    margin: 10px 0;
    font-weight: bold;
    color: #e2e8f0;
}

.agent-group {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid #172033;
}

.agent-group-header {
    font-size: 14px;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #0b1730;
    border: 1px solid #1d3557;
    border-radius: 6px;
}

.detail-report {
    border-top: 1px solid #172033;
    padding-top: 10px;
    margin-top: 10px;
}

.detail-report-header {
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 13px;
}

.detail-issue {
    padding: 12px;
    border: 1px solid #1e293b;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #0f172a;
}

.detail-issue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.detail-issue-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.detail-issue-summary {
    color: #e5e7eb;
    margin-bottom: 8px;
}

.issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.issue-chip {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    color: #cbd5e1;
    background: #172033;
    border: 1px solid #334155;
}

.issue-bullets {
    margin-bottom: 8px;
}

.issue-bullet {
    color: #cbd5e1;
    margin-bottom: 4px;
}

.issue-raw {
    margin-top: 8px;
}

.issue-raw summary {
    cursor: pointer;
    color: #94a3b8;
    font-size: 13px;
}

.issue-raw pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    margin: 8px 0 0 0;
    color: #cbd5e1;
    font-size: 12px;
}

#live-view-modal .card,
#alert-ticket-modal .card {
    min-width: 0;
    white-space: normal;
}

#live-view-modal .card,
#alert-ticket-modal .card {
    overflow: hidden;
}

#live-view-modal .card pre,
#alert-ticket-modal .card pre,
#live-view-modal .card td,
#alert-ticket-modal .card td {
    word-break: break-word;
    overflow-wrap: break-word;
}

#live-view-modal .live-view-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

#live-view-modal .live-view-tile {
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
}

#live-view-modal .live-view-tile-label {
    font-size: 11px;
    color: #9fb0d1;
}

#live-view-modal .live-view-tile-value {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.statuscake-url-value {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    line-height: 1.2;
}

#live-view-modal,
#live-view-modal * {
    box-sizing: border-box;
}

#live-view-modal {
    overflow: hidden;
}

#live-view-body,
#live-view-body-content {
    min-width: 0;
}

.live-view-agent-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.live-view-agent-icon {
    display: inline-flex;
    width: 18px;
    justify-content: center;
}

.live-view-agent-label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#live-view-modal .live-view-mobile-agent-menu {
    margin-top: 6px;
    padding: 8px;
    background: #0f172a;
    border: 1px solid rgba(148,163,184,0.25);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#live-view-modal .live-view-mobile-agent-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #111827;
    color: #e5e7eb;
    border: 1px solid rgba(148,163,184,0.22);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

#live-view-modal .live-view-mobile-agent-item-active {
    background: #1d4ed8;
    border-color: rgba(147,197,253,0.7);
}

@media (max-width: 1024px) {
    #live-view-modal {
        padding: 12px;
    }
    #live-view-modal .live-view-modal-shell {
        width: min(100%, calc(100vw - 24px));
        max-height: calc(100dvh - 24px);
    }
    .live-view-agent-sidebar {
        width: 150px !important;
        min-width: 150px !important;
    }
}

@media (max-width: 760px) {
    #live-view-modal {
        padding: 4px !important;
        overflow: hidden;
    }
    #live-view-modal .live-view-modal-shell {
        width: calc(100vw - 8px) !important;
        max-width: calc(100vw - 8px) !important;
        height: calc(100dvh - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
        margin: 0 auto !important;
    }
    #live-view-modal .live-view-modal-header {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #0b1426;
        flex-wrap: wrap;
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    #live-view-title {
        font-size: 17px !important;
    }
    #live-view-subtitle,
    #live-view-refreshed {
        font-size: 10px !important;
        margin-top: 2px !important;
    }
    #live-view-agent-menu-toggle {
        margin-bottom: 6px !important;
    }
    #live-view-modal .live-view-modal-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px !important;
    }
    #live-view-modal .live-view-modal-actions .agent-summary-chip {
        min-height: 32px !important;
        height: 32px !important;
        flex: 1 1 auto !important;
    }
    #live-view-controls {
        height: auto !important;
        padding: 6px 10px !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    .live-view-location-controls {
        display: block !important;
        gap: 0 !important;
        overflow: visible !important;
    }
    .live-view-location-search-wrap {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    #live-view-controls [data-live-view-selector='1'] {
        max-width: 100% !important;
        width: 100%;
        position: relative !important;
        overflow: visible !important;
    }
    #live-view-controls > div > label {
        display: block !important;
        font-size: 11px !important;
        margin-bottom: 2px !important;
    }
    #live-view-location-input {
        height: 34px !important;
        font-size: 14px !important;
    }
    .live-view-selected-label {
        display: block !important;
        margin-top: 4px !important;
        margin-left: 0 !important;
        position: static !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        min-height: 0 !important;
        text-align: left !important;
    }
    .live-view-controls-dropdown-open .live-view-selected-label {
        display: none !important;
    }
    #live-view-controls .live-view-selected-row,
    #live-view-controls .live-view-selected-label {
        display: none !important;
    }
    #live-view-location-options {
        position: absolute !important;
        top: calc(100% + 4px) !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10020 !important;
        background: #0f1a2f !important;
        border: 1px solid rgba(148,163,184,0.25) !important;
        color: #e5e7eb !important;
        box-shadow: 0 12px 28px rgba(0,0,0,0.45) !important;
        max-height: min(38dvh, 280px) !important;
        overflow-y: auto !important;
    }
    .live-view-agent-shell {
        display: block !important;
    }
    #live-view-body-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    .live-view-agent-sidebar {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }
    .live-view-agent-btn {
        justify-content: center;
        padding: 8px 6px !important;
    }
    .live-view-agent-label {
        display: none;
    }
    #live-view-modal .card table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }
    #live-view-modal .card {
        overflow-x: visible;
    }
    #live-view-modal .card th,
    #live-view-modal .card td,
    #live-view-modal .card pre {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    #live-view-modal .agent-summary-chip {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    #live-view-modal .statuscake-days-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 481px) and (max-width: 760px) {
    #live-view-modal .statuscake-days-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

#live-view-modal .lvou-clients-mobile {
    display: none;
}

#live-view-modal .lvou-client-card {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
}

#live-view-modal .lvou-client-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

#live-view-modal .lvou-client-card-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: #d7e3ff;
}

#live-view-modal .lvou-client-card-row > span:first-child {
    color: #9fb0d1;
}

#live-view-modal .lvou-client-card-row > span:last-child {
    min-width: 0;
    word-break: break-word;
}

.cel-root.cel-grouped {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 1px 0;
    font-size: 11px;
    line-height: 1.15;
}

.cel-root.cel-grouped .cel-section {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    padding: 4px 6px;
}

.cel-root.cel-grouped .cel-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9fb0d1;
    margin-bottom: 2px;
}

.cel-root.cel-grouped .cel-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2px 8px;
    color: #dfe7ff;
}

.cel-root.cel-grouped .cel-summary-row {
    color: #dfe7ff;
    font-size: 11px;
    line-height: 1.15;
    padding: 1px 0;
    white-space: normal;
    word-break: break-word;
}

.cel-root.cel-grouped .cel-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.cel-root.cel-grouped .cel-chip {
    border: 1px solid rgba(125,162,255,0.45);
    background: rgba(125,162,255,0.12);
    color: #dbeafe;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: 11px;
    line-height: 1.15;
}

.cel-root.cel-grouped .cel-bridge-list,
.cel-root.cel-grouped .cel-timeline-list {
    display: grid;
    gap: 2px;
}

.cel-root.cel-grouped .cel-bridge-row,
.cel-root.cel-grouped .cel-timeline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) auto auto;
    gap: 4px;
    align-items: center;
    padding: 2px 4px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
    color: #dfe7ff;
    font-size: 11px;
}

.cel-root.cel-grouped .cel-timeline-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
}

.cel-root.cel-grouped .cel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cel-root.cel-grouped .cel-ts {
    white-space: nowrap;
}

.cel-root.cel-grouped .cel-detail {
    margin-top: 3px;
}

.cel-root.cel-grouped .cel-detail > summary {
    cursor: pointer;
    color: #9fb0d1;
    font-size: 11px;
    user-select: none;
}

.cel-root.cel-grouped .cel-detail-body {
    margin-top: 4px;
    display: grid;
    gap: 1px;
}

.cel-root.cel-grouped .cel-compact-header,
.cel-root.cel-grouped .cel-compact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    padding: 1px 3px;
    font-size: 11px;
    line-height: 1.15;
    color: #dfe7ff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cel-root.cel-grouped .cel-compact-header {
    color: #9fb0d1;
    font-weight: 700;
}

.cel-root.cel-grouped .cel-pre {
    margin: 0;
    max-height: 200px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 5px;
    background: rgba(255,255,255,0.02);
    white-space: pre-wrap;
    line-height: 1.2;
    color: #dfe7ff;
}

.cel-root.cel-grouped .cel-empty {
    color: #9fb0d1;
    font-size: 11px;
}

.cel-root.cel-grouped.cel-export .cel-section {
    border-color: #d9deea;
    background: #fff;
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 6px;
}

.cel-root.cel-grouped.cel-export .cel-section-title {
    color: #334155;
}

.cel-root.cel-grouped.cel-export .cel-summary-grid,
.cel-root.cel-grouped.cel-export .cel-bridge-row,
.cel-root.cel-grouped.cel-export .cel-timeline-row,
.cel-root.cel-grouped.cel-export .cel-compact-row,
.cel-root.cel-grouped.cel-export .cel-summary-row {
    color: #111827;
}

.cel-root.cel-grouped.cel-export .cel-chip {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #1e1b4b;
}

.cel-root.cel-grouped.cel-export .cel-detail > summary,
.cel-root.cel-grouped.cel-export .cel-empty,
.cel-root.cel-grouped.cel-export .cel-compact-header {
    color: #475569;
}

.cel-root.cel-grouped.cel-export .cel-pre {
    border-color: #d9deea;
    background: #f8fafc;
    color: #111827;
}

.cel-root.cel-grouped.cel-export,
.cel-root.cel-grouped.cel-export * {
    page-break-inside: avoid;
    break-inside: avoid;
    font-size: 10.5px;
    line-height: 1.12;
}

@media (max-width: 900px) {
    #live-view-modal .live-view-tile-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    #live-view-modal .live-view-tile {
        min-width: 0;
    }

    #live-view-modal .lvou-clients-desktop {
        display: none;
    }

    #live-view-modal .lvou-clients-mobile {
        display: block;
    }

    .cel-root.cel-grouped .cel-summary-grid {
        grid-template-columns: 1fr;
    }

    .cel-root.cel-grouped .cel-bridge-row {
        grid-template-columns: 1fr;
    }

    .cel-root.cel-grouped .cel-compact-header,
    .cel-root.cel-grouped .cel-compact-row {
        grid-template-columns: 1fr;
    }
}

#live-view-modal .ovrc-tile-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

#live-view-modal .ovrc-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

#live-view-modal .fortigate-two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

#live-view-modal .fortigate-interfaces-mobile {
    display: none;
}

#live-view-modal .fortigate-interface-card {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
}

#live-view-modal .fortigate-interface-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

#live-view-modal .fortigate-interface-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: #d7e3ff;
}

#live-view-modal .fortigate-interface-row > span:first-child {
    color: #9fb0d1;
}

#live-view-modal .fortigate-interface-row > span:last-child {
    min-width: 0;
    word-break: break-word;
}

#alert-ticket-modal .alert-ticket-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#alert-ticket-modal .alert-ticket-header-main {
    min-width: 0;
    flex: 1 1 auto;
}

#alert-ticket-modal .alert-ticket-subtitle {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#alert-ticket-modal .alert-ticket-close {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

@media (max-width: 900px) {
    #live-view-modal .ovrc-tile-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    #live-view-modal .ovrc-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    #live-view-modal .fortigate-two-col-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    #live-view-modal .fortigate-interfaces-desktop {
        display: none;
    }

    #live-view-modal .fortigate-interfaces-mobile {
        display: block;
    }
}

.detail-empty {
    color: #94a3b8;
    font-size: 13px;
}

.severity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.overview-live-view-card {
    grid-column: 2;
    min-height: 104px;
}

.network-diag-target {
    border: 0;
    background: transparent;
    color: #93c5fd;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.network-diagnostic-panel {
    max-width: 760px;
    margin: 6vh auto;
    background: #0b1220;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 16px;
    color: #dbe7ff;
}

.network-diag-stats-strip {
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    font-size: 12px;
    color: #9fb0d1;
}
.network-diag-target-card { margin-top: 8px; }
.network-diag-target-row, .network-diag-recent-row, .network-diag-controls, .network-diag-tab-row { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.network-diag-recent-row { margin-top: 6px; }
.network-diag-tab-row { margin-top: 10px; }
.network-diag-target-input { min-width:240px; flex:1 1 auto; background:#0f172a; border:1px solid rgba(255,255,255,.2); color:#fff; border-radius:6px; padding:6px 8px; }
.network-diag-tab-btn { display:inline-flex; align-items:center; gap:6px; }
.network-diag-tab-emoji { font-size: 13px; line-height: 1; }
.network-diag-feedback { margin-top:6px; color:#86efac; font-size:12px; }
.network-diag-output { max-height:40vh; overflow:auto; margin-top:8px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; line-height:1.45; color:#86efac; border:1px solid rgba(255,255,255,.1); border-radius:8px; padding:8px; background: rgba(3, 8, 20, 0.65); }
.network-diag-snapshot-header { margin-bottom: 8px; color:#cbd5e1; }
.network-diag-snapshot-card { border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 8px 10px; margin-top: 8px; background: rgba(255,255,255,.03); color:#dbeafe; }
.network-diag-snapshot-head { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.network-diag-snapshot-badge { font-size:11px; font-weight:700; }
.network-diag-snapshot-summary { margin-top:4px; color:#cbd5e1; }
.network-diag-snapshot-overall { border-color: rgba(250, 204, 21, .35); }

@media (max-width: 900px) {
    .overview-live-view-card {
        grid-column: 1 / -1;
    }
}

.severity-badge-critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.severity-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.severity-badge-info {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.severity-badge-ok {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.35);
}

.severity-critical strong,
.severity-critical .detail-issue-title {
    color: #ef4444;
}

.severity-warning strong,
.severity-warning .detail-issue-title {
    color: #f59e0b;
}

.severity-info strong,
.severity-info .detail-issue-title {
    color: #38bdf8;
}

.severity-ok strong,
.severity-ok .detail-issue-title {
    color: #e5e7eb;
}

.report-button {
    background: #2563eb;
    border: none;
    padding: 10px 16px;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 12px;
}

.report-button:hover {
    background: #1d4ed8;
}

.report-status {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.ai-reports-shell {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 16px;
}

.ai-reports-subtitle {
    color: #9fb0d1;
    margin-bottom: 12px;
}

.ai-reports-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-reports-content {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.ai-reports-right {
    min-width: 0;
}

.report-output {
    background: #0b1220;
    border: 1px solid #1e293b;
    padding: 12px;
    border-radius: 6px;
    min-height: 220px;
    overflow: auto;
}

.detail-topline-sub {
    color: #94a3b8;
    margin-left: 6px;
}

.agent-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.agent-summary-chip {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.2;
}

.agent-summary-chip:hover {
    background: #162033;
}

.agent-summary-chip-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.daily-report-history {
    margin-top: 0;
}

.report-current-header {
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.report-richtext {
    background: #0b1220;
    border: 1px solid #1e293b;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: #e5e7eb;
}



.report-h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #f8fafc;
}

.report-h4 {
    margin: 12px 0 8px 0;
    font-size: 14px;
    color: #cbd5e1;
}

.report-paragraph {
    margin: 0 0 10px 0;
    color: #e5e7eb;
}

.report-list {
    margin: 0 0 10px 18px;
    padding: 0;
}

.report-list li {
    margin-bottom: 6px;
    color: #cbd5e1;
}

.report-divider {
    border: 0;
    border-top: 1px solid #23314a;
    margin: 12px 0;
}

.report-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    align-content: flex-start;
    padding: 10px;
    border: 1px solid #1e293b;
    border-radius: 8px;
    background: #0b1220;
}

.report-history-list::-webkit-scrollbar {
    width: 8px;
}

.report-history-list::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 6px;
}

.report-history-list::-webkit-scrollbar-track {
    background: #0b1220;
}

@media (max-width: 900px) {
    .ai-reports-shell {
        padding: 12px;
    }

    .report-output {
        min-height: 180px;
    }

    .report-history-list {
        max-height: 220px;
    }
}

@media (max-width: 768px) {
  .ai-reports-container {
    display: flex;
    flex-direction: column;
  }

  .ai-reports-content {
    display: flex;
    flex-direction: column;
  }

  .ai-reports-actions {
    order: 1;
  }

  .ai-reports-viewer {
    order: 2;
  }

  .ai-reports-list {
    order: 3;
  }
}

.report-history-item {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 12px;
}

.report-history-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
    color: #cbd5e1;
    font-size: 13px;
    background: #0f172a;
}

.report-history-summary::-webkit-details-marker {
    display: none;
}

.report-history-body {
    padding: 14px 14px 28px 14px;
    border-top: 1px solid #1e293b;
    overflow: visible;
}

.report-history-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.issue-group {
    margin-bottom: 12px;
    border: 1px solid #22304a;
    border-radius: 10px;
    background: #0b1220;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.35);
}

.issue-group-summary {
    cursor: pointer;
    list-style: none;
    display: block;
    background: #0b1220;
}

.issue-group-summary::-webkit-details-marker {
    display: none;
}

.issue-group-body {
    border-top: 1px solid #22304a;
    padding: 12px;
    background: #050d18;
}

.issue-occurrence-meta {
    padding: 0 14px 12px 14px;
    font-size: 12px;
    color: #94a3b8;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
    gap: 8px 14px;
    align-items: center;
}

.issue-occurrence-meta strong {
    color: #cbd5e1;
    font-weight: 600;
}

.issue-log-row {
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid #24354f;
    border-radius: 8px;
    background: #081321;
}

.issue-log-row:last-child {
    margin-bottom: 0;
}

.issue-log-time {
    font-size: 11px;
    color: #7dd3fc;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.detail-issue-nested {
    background: #101b2d;
    border-color: #42536f;
    margin-bottom: 0;
    padding: 9px 10px;
    font-size: 12px;
}

.detail-issue-nested .detail-issue-title {
    font-size: 15px;
}

.detail-issue-nested .detail-issue-summary {
    font-size: 12px;
    margin-bottom: 6px;
}

.detail-issue-nested .issue-chip {
    background: #13253b;
    border-color: #49607d;
    font-size: 11px;
    padding: 3px 7px;
}

.detail-issue-nested .issue-bullet {
    font-size: 12px;
}

.detail-issue-nested .issue-raw summary {
    font-size: 12px;
}

.detail-issue-nested .issue-raw pre {
    font-size: 11px;
}


/* --- Issue history log readability improvements --- */

.issue-log-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #172033;
}

.issue-log-time {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}


/* Daily operations report layout */

.report-current-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.report-current-meta {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}





/* Daily operations report layout */

.report-current-header {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.report-current-meta {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 3px;
}





/* ---------- Agent Health Widgets ---------- */

.agent {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.02);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.agent-header-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.agent-name {
    font-size: 16px;
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1.2;
}

.agent-subtitle {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.2;
}

.agent-header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.agent-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255,255,255,0.12);
}

.agent-status-badge-online {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.35);
}

 .agent-status-badge-warn {
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.35);
}

.agent-status-badge-offline {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

.agent-last-seen {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.2;
}

.agent-health {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.agent-health-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 0.92em;
}

.agent-health-label {
    opacity: 0.78;
}

.agent-health-value {
    font-weight: 600;
}

.agent-health-empty {
    margin-top: 8px;
    opacity: 0.7;
    font-size: 0.92em;
}



/* ---------- Agent Dashboard Widgets ---------- */

.agent-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.agent-widget {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: 12px 14px;
    min-height: 78px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 6px 18px rgba(0,0,0,0.18);
}

.agent-widget::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 8px solid rgba(255,255,255,0.08);
    opacity: 0.7;
}

.agent-widget-label {
    font-size: 0.82rem;
    opacity: 0.78;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.agent-widget-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    word-break: break-word;
}

.agent-widget-neutral {
    background:
        linear-gradient(180deg, rgba(89,117,255,0.16), rgba(255,255,255,0.02));
}

.agent-widget-good {
    background:
        linear-gradient(180deg, rgba(38,201,120,0.18), rgba(255,255,255,0.02));
}

.agent-widget-warning {
    background:
        linear-gradient(180deg, rgba(255,184,77,0.18), rgba(255,255,255,0.02));
}

.agent-widget-bad {
    background:
        linear-gradient(180deg, rgba(255,92,92,0.18), rgba(255,255,255,0.02));
}

@media (max-width: 700px) {
    .issue-occurrence-meta {
        grid-template-columns: 1fr 1fr;
    }

    .agent-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agent-widget-value {
        font-size: 1.15rem;
    }
}



/* ---------- Apex Agent Chart Widgets ---------- */

.agent-widget-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 188px;
}

.agent-radial-chart {
    width: 100%;
    height: 160px;
    min-height: 160px;
}

.agent-widget .apexcharts-canvas {
    margin: 0 auto;
    min-height: 160px !important;
}

.agent-widget .apexcharts-text,
.agent-widget .apexcharts-datalabel-label,
.agent-widget .apexcharts-datalabel-value {
    font-family: inherit !important;
}


.endpoint-bar {
    margin-top: 8px;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.endpoint-bar-fill {
    height: 100%;
    background: linear-gradient(90deg,#26c978,#6df5a7);
}

.agent-chart-tooltip {
    padding: 8px 10px;
    background: #111827;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.tooltip-reg {
    color: #26c978;
    font-weight: 600;
}

.tooltip-unreg {
    color: #ff5d5d;
    font-weight: 600;
}

.endpoint-radial-footer {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.82rem;
    line-height: 1.2;
}

.endpoint-radial-reg {
    color: #26c978;
    font-weight: 600;
}

.endpoint-radial-unreg {
    color: #ff5d5d;
    font-weight: 600;
}


.issue-resolved-card {
    background: #102719;
    border-color: #1f6b39;
}

.badge-resolved {
    display: inline-block;
    margin-right: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
    vertical-align: middle;
}

.resolved-alert-card {
    margin-bottom: 14px;
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(16, 39, 25, 0.95), rgba(8, 21, 41, 0.95));
}

.resolved-alert-system {
    margin-bottom: 10px;
    color: #d1fae5;
}

.issue-raw pre[data-raw-target='1'] {
    max-height: 40vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #07101f;
    border: 1px solid #22304a;
    border-radius: 8px;
    padding: 10px;
}

#live-view-modal pre,
#alert-ticket-modal pre,
#history-logs-modal pre,
#incident-capture-modal pre,
#incident-capture-history-modal pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-height: 40vh;
    overflow-y: auto;
    overflow-x: hidden;
}


/* Paused Alert */
.issue-paused-card {
    border: 1px solid rgba(168, 85, 247, 0.5);
    background: linear-gradient(180deg, rgba(55, 35, 80, 0.9), rgba(8, 21, 41, 0.95));
}

.severity-badge-paused {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.severity-badge-muted {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.32);
}


.system-dot-paused {
    background: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

.severity-paused {
    border-left: 4px solid #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.08) !important;
}

.issue-status-paused {
    color: #c4b5fd;
    font-weight: 700;
}


.notes-button-chip {
    position: relative;
    overflow: visible;
}

.notes-count-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: #8b5cf6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #081529;
}

.overview-notes-indicator {
    position: relative;
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.overview-notes-count-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 12px;
    height: 12px;
    padding: 0 3px;
    border-radius: 999px;
    background: #8b5cf6;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
    box-shadow: 0 0 0 1px #081529;
    pointer-events: none;
}


.issue-group-location {
    border-color: #223a63;
    background: #08111d;
}

.issue-group-summary-location {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #08111d;
}

.issue-group-summary-location:hover {
    background: #0c1627;
}

.issue-group-summary-location .detail-issue-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.issue-occurrence-meta-location {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px 12px;
}

.issue-occurrence-meta-location strong {
    color: #cbd5e1;
}

.cu-attachment {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #07101f;
}

.cu-attachment-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex: 0 0 60px;
}

.cu-attachment-icon {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.08);
    flex: 0 0 60px;
}

.cu-attachment-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.trace-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.trace-hop {
    color: #6b7c93;
    min-width: 18px;
    flex: 0 0 auto;
}

.trace-hostip {
    color: #ffffff;
    flex: 1 1 auto;
    min-width: 0;
}

.trace-host {
    color: #ffffff;
}

.trace-ip {
    color: #7aa2f7;
    margin-left: 6px;
}

.trace-latency {
    color: #4ade80;
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.network-diag-mtr-summary {
    margin-top: 8px;
}
.network-diag-provider-pill { display:inline-flex; align-items:center; margin-left:5px; font-size:10px; color:#94a3b8; border:1px solid rgba(148,163,184,0.35); border-radius:999px; padding:1px 6px; background:rgba(15,23,42,.55); }

.mtr-cell-warn {
    background: rgba(250, 204, 21, 0.12);
}

.mtr-cell-critical {
    background: rgba(248, 113, 113, 0.16);
}

#overview-dashboard-root {
    row-gap: 12px;
}

#overview-dashboard-root .overview-section-card {
    margin: 0;
}
.network-diag-line-muted { color:#94a3b8; }
.network-diag-line-ok { color:#86efac; }
.network-diag-line-warn { color:#facc15; }
.network-diag-line-error { color:#f87171; }
.network-diag-token-ip { color:#67e8f9; }
.network-diag-token-seq { color:#fde047; }
.network-diag-token-ttl { color:#a5b4fc; }
.network-diag-token-time { color:#86efac; }
.network-diag-token-loss { font-weight:600; }
.network-diag-token-hop { color:#93c5fd; font-weight:600; }

.network-diag-snapshot-row { padding:2px 0; border-bottom:1px dashed rgba(148,163,184,0.15); }
.network-diag-snapshot-row:last-child { border-bottom:none; }

.dashboard-section-title{font-size:18px;font-weight:700;color:#fff;display:flex;align-items:center;gap:8px}
.dashboard-alerts-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.dashboard-alerts-badge{min-width:28px;padding:3px 10px;border-radius:999px;background:rgba(239,68,68,.16);border:1px solid rgba(248,113,113,.45);color:#fecaca;font-weight:700;font-size:12px;text-align:center}
.dashboard-alerts-frame{border:1px solid rgba(96,165,250,.25);border-radius:10px;background:rgba(2,6,23,.5);max-height:240px;overflow:auto}
.dashboard-alerts-list{display:flex;flex-direction:column}
.dashboard-alert-row{display:flex;gap:10px;align-items:flex-start;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid rgba(255,255,255,.08);padding:10px;cursor:pointer;color:#e5edff}
.dashboard-alert-row:hover{background:rgba(59,130,246,.12)}
.dashboard-alert-severity{font-size:11px;font-weight:700;padding:2px 7px;border-radius:999px;border:1px solid transparent;white-space:nowrap}
.dashboard-alert-severity-critical{background:rgba(239,68,68,.2);border-color:rgba(248,113,113,.5);color:#fecaca}
.dashboard-alert-severity-warning{background:rgba(245,158,11,.2);border-color:rgba(251,191,36,.5);color:#fde68a}
.dashboard-alert-severity-info{background:rgba(59,130,246,.2);border-color:rgba(96,165,250,.5);color:#bfdbfe}
.dashboard-alert-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.dashboard-alert-code{font-size:12px;font-weight:700}
.dashboard-alert-summary{font-size:12px;color:#9fb0d1;line-height:1.35}
.dashboard-alert-updated{font-size:11px;color:#7f93ba;white-space:nowrap;padding-top:1px}

@media (max-width:760px){
  .dashboard-alert-row{padding:8px;gap:8px}
  .dashboard-alert-updated{display:block;white-space:normal}
  #live-view-modal .card{padding:10px !important}
}


.companycam-header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:8px}
.companycam-title{font-size:16px;font-weight:700;color:#fff}
.companycam-status{font-size:12px;color:#9fb0d1}
.companycam-input{width:100%;background:#0b1426;border:1px solid rgba(255,255,255,.15);color:#e5edff;border-radius:8px;padding:8px 10px;font-size:12px}
.companycam-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px;margin:8px 0}
.companycam-thumb-btn{background:transparent;border:0;padding:0;cursor:pointer}
.companycam-thumb{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;border:1px solid rgba(255,255,255,.1)}
.companycam-viewer{position:fixed;inset:0;z-index:10060;background:rgba(2,6,23,.82);display:flex;align-items:center;justify-content:center;padding:16px}
.companycam-viewer-shell{max-width:min(96vw,1100px);max-height:95vh;overflow:auto;background:#07101f;border:1px solid rgba(255,255,255,.15);border-radius:12px;padding:10px}
.companycam-viewer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.companycam-viewer-image{max-width:100%;height:auto;display:block;border-radius:8px}
.companycam-results{max-height:170px;overflow:auto;display:flex;flex-direction:column;gap:6px;margin:8px 0}
.companycam-result{background:#0f172a;border:1px solid rgba(255,255,255,.08);color:#e5edff;padding:8px;border-radius:8px;text-align:left;cursor:pointer}
.companycam-result:hover,.companycam-result-selected{border-color:rgba(96,165,250,.6);background:rgba(59,130,246,.14)}
.companycam-sub{font-size:11px;color:#9fb0d1}
.companycam-tag-row{display:flex;gap:8px;align-items:center;margin-top:8px;flex-wrap:wrap}
@media (max-width:760px){.companycam-results{max-height:140px}.companycam-viewer{padding:8px}.companycam-grid{grid-template-columns:repeat(auto-fill,minmax(72px,1fr))}}


#alert-ticket-modal{z-index:101000 !important}
.dashboard-inventory-tile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-bottom:10px}
.dashboard-inventory-tile{background:rgba(15,23,42,.8);border:1px solid rgba(96,165,250,.25);border-radius:10px;padding:10px 12px;text-align:left;cursor:pointer;color:#e5edff}
.dashboard-inventory-tile:hover,.dashboard-inventory-tile-active{border-color:rgba(96,165,250,.75);background:rgba(59,130,246,.14)}
.dashboard-inventory-window{display:flex;flex-direction:column;gap:8px;margin-top:8px}
@media (max-width:760px){.dashboard-inventory-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-inventory-tile{padding:9px}}


.companycam-filter-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.companycam-tag-chip-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.companycam-tag-chip{background:rgba(15,23,42,.85);border:1px solid rgba(96,165,250,.24);border-radius:999px;color:#dbeafe;padding:5px 9px;font-size:12px;cursor:pointer}
.companycam-tag-chip:hover,.companycam-tag-chip-active{border-color:rgba(96,165,250,.75);background:rgba(59,130,246,.20);color:#fff}
.companycam-tag-chip span{color:#9fb0d1;margin-left:3px}


.dashboard-collapsible-section > summary{list-style:none}
.dashboard-collapsible-section > summary::-webkit-details-marker{display:none}
.dashboard-collapsible-summary{display:flex;align-items:center;gap:8px;padding:12px;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.08)}
.dashboard-collapsible-body{padding:12px}
.dashboard-collapsible-caret{display:inline-flex;align-items:center;justify-content:center;color:#9fb0d1;font-size:12px;transition:transform .15s ease}
.dashboard-collapsible-section[open] > .dashboard-collapsible-summary .dashboard-collapsible-caret{transform:rotate(90deg)}
.dashboard-collapsible-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;padding:2px 8px;border-radius:999px;background:rgba(96,165,250,.16);border:1px solid rgba(96,165,250,.42);color:#bfdbfe;font-size:12px}


/* Live View desktop viewport scroll fix */
#live-view-modal {
    overflow: hidden !important;
}

#live-view-modal .live-view-modal-shell {
    height: calc(100dvh - 40px);
    max-height: calc(100dvh - 40px);
    min-height: 0;
}

#live-view-modal .live-view-modal-body,
#live-view-modal .live-view-content-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}


#live-view-modal .lvou-firmware-mobile {
    display: none;
}

@media (max-width: 900px) {
    #live-view-modal .lvou-firmware-desktop {
        display: none !important;
    }

    #live-view-modal .lvou-firmware-mobile {
        display: grid;
        gap: 10px;
    }

    #live-view-modal .lvou-firmware-card {
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 12px;
        background: rgba(255,255,255,0.03);
        padding: 10px;
        display: grid;
        gap: 8px;
    }

    #live-view-modal .lvou-firmware-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    #live-view-modal .lvou-firmware-card-row {
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 8px;
        font-size: 12px;
        color: #d7e3ff;
    }

    #live-view-modal .lvou-firmware-card-row > span:first-child {
        color: #9fb0d1;
    }

    #live-view-modal .lvou-firmware-card-row > span:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

