body {
    background: #f4f6f9;
    color: #212529;
}

.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: inherit;
    text-decoration: none;
}

.sidebar-brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #ff8a2a, #ffb067);
    color: #fff;
    font-size: 1rem;
}

.sidebar-brand-text {
    white-space: nowrap;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: 272px;
    background: linear-gradient(180deg, #18202b 0%, #111821 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem 1.25rem;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transition: width 0.22s ease, transform 0.22s ease;
    box-shadow: 0.4rem 0 1rem rgba(15, 23, 42, 0.08);
}

.app-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sidebar-toggle {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.22rem;
    padding: 0 0.55rem;
}

.sidebar-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 999px;
}

.sidebar-toggle-mobile {
    display: none;
}

.app-sidebar-nav {
    display: grid;
    gap: 0.35rem;
}

.app-nav-group {
    display: grid;
    gap: 0.3rem;
}

.app-nav-group + .app-nav-group {
    margin-top: 0.65rem;
}

.app-nav-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.85rem;
    min-height: 1.75rem;
}

.app-nav-group-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-nav-group-arrow {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.app-nav-group.is-open .app-nav-group-arrow {
    transform: rotate(225deg);
}

.app-nav-group-links {
    display: none;
    gap: 0.35rem;
}

.app-nav-group.is-open .app-nav-group-links {
    display: grid;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.app-nav-link:hover,
.app-nav-link.active {
    background: rgba(255, 138, 42, 0.18);
    color: #fff;
}

.app-nav-icon {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.app-nav-icon svg {
    width: 1rem;
    height: 1rem;
}

.app-sidebar-footer {
    margin-top: auto;
    padding: 1rem 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-user-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
}

.app-user-name {
    margin-top: 0.2rem;
    font-weight: 600;
}

.app-shell-main {
    flex: 1;
    min-width: 0;
    margin-left: 272px;
    transition: margin-left 0.22s ease;
}

.app-topbar {
    height: 72px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-topbar-title {
    font-size: 1rem;
    font-weight: 700;
}

.app-topbar-subtitle {
    font-size: 0.78rem;
    color: #6c757d;
}

.app-topbar-user {
    font-size: 0.9rem;
    color: #495057;
}

.app-content {
    padding: 1.5rem;
}

.app-sidebar-backdrop {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar {
    width: 88px;
}

.app-shell[data-sidebar-state="collapsed"] .app-shell-main {
    margin-left: 88px;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar-brand-text,
.app-shell[data-sidebar-state="collapsed"] .app-nav-label,
.app-shell[data-sidebar-state="collapsed"] .app-nav-group-toggle,
.app-shell[data-sidebar-state="collapsed"] .app-user-role,
.app-shell[data-sidebar-state="collapsed"] .app-user-name,
.app-shell[data-sidebar-state="collapsed"] .app-sidebar-footer .btn {
    display: none;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar-header {
    justify-content: center;
}

.app-shell[data-sidebar-state="collapsed"] .app-nav-link {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.app-shell[data-sidebar-state="collapsed"] .app-nav-group-links {
    display: grid;
}

.app-shell[data-sidebar-state="collapsed"] .app-sidebar-footer {
    border-top-color: transparent;
    padding-top: 0;
}

.action-menu {
    position: relative;
    display: inline-block;
}

.action-menu summary {
    list-style: none;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-menu-toggle {
    width: 2rem;
    height: 2rem;
    border: 1px solid #d0d7de;
    border-radius: 0.75rem;
    background: #fff;
    color: #495057;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    box-shadow: 0 0.2rem 0.6rem rgba(15, 23, 42, 0.05);
}

.action-menu[open] .action-menu-toggle,
.action-menu-toggle:hover {
    border-color: #ff8a2a;
    color: #ff8a2a;
}

.action-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    min-width: 12.5rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.9rem;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.14);
    padding: 0.4rem;
    z-index: 20;
}

.action-menu-item {
    width: 100%;
    display: block;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: #212529;
    text-align: left;
    text-decoration: none;
    padding: 0.65rem 0.75rem;
    font-size: 0.92rem;
}

.action-menu-item:hover {
    background: #fff4ea;
    color: #ff8a2a;
}

.action-menu-item-danger:hover {
    background: #fff1f1;
    color: #dc3545;
}

.action-menu-compact .action-menu-panel {
    min-width: 11rem;
}

.status-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-green {
    background: #198754;
}

.status-yellow {
    background: #ffc107;
}

.status-red {
    background: #dc3545;
}

.status-grey {
    background: #6c757d;
}

.metric-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(15, 23, 42, 0.08);
}

.dashboard-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.dashboard-kpi-card,
.dashboard-toolbar {
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0.4rem 1rem rgba(15, 23, 42, 0.06);
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.dashboard-kpi-ring {
    --progress: 0;
    --tone: #d7dbe2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, #fff 74%, transparent 76% 100%),
        conic-gradient(var(--tone) calc(var(--progress) * 1%), #e9ecef 0);
    flex-shrink: 0;
}

.dashboard-kpi-ring span {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
}

.dashboard-kpi-ring-neutral {
    --tone: #ff8a2a;
}

.dashboard-kpi-ring-green {
    --tone: #198754;
}

.dashboard-kpi-ring-yellow {
    --tone: #ffc107;
}

.dashboard-kpi-ring-red {
    --tone: #dc3545;
}

.dashboard-kpi-ring-grey {
    --tone: #6c757d;
}

.dashboard-kpi-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #495057;
}

.dashboard-kpi-subline,
.dashboard-toolbar-caption-line {
    font-size: 0.82rem;
}

.dashboard-toolbar .btn.active {
    background: #ff8a2a;
    border-color: #ff8a2a;
    color: #fff;
}

.dashboard-toolbar-caption {
    display: grid;
    text-align: right;
}

.table-card,
.content-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(15, 23, 42, 0.06);
}

.dashboard-table-wrap {
    max-height: 62vh;
    overflow: auto;
}

.dashboard-table {
    font-size: 0.94rem;
}

.dashboard-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fb;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5c6672;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.dashboard-table tbody td {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    vertical-align: middle;
    background: #fff;
}

.dashboard-col-customer,
.dashboard-col-site,
.dashboard-col-model {
    min-width: 150px;
}

.dashboard-col-date {
    min-width: 150px;
}

.dashboard-col-ip {
    min-width: 150px;
}

.dashboard-sticky-col {
    position: sticky;
    z-index: 1;
    background: #fff;
}

.dashboard-sticky-col-1 {
    left: 0;
    min-width: 190px;
    box-shadow: 0.6rem 0 0.8rem -0.8rem rgba(15, 23, 42, 0.18);
}

.dashboard-sticky-col-2 {
    left: 190px;
    min-width: 170px;
    box-shadow: 0.6rem 0 0.8rem -0.8rem rgba(15, 23, 42, 0.12);
}

.dashboard-table thead .dashboard-sticky-col {
    z-index: 3;
    background: #f8f9fb;
}

.dashboard-mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.86rem;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dashboard-chip-neutral {
    color: #495057;
    background: #f1f3f5;
    border-color: #dee2e6;
}

.dashboard-chip-green {
    color: #146c43;
    background: rgba(25, 135, 84, 0.12);
    border-color: rgba(25, 135, 84, 0.2);
}

.dashboard-chip-yellow {
    color: #7a5b00;
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.25);
}

.dashboard-chip-red {
    color: #842029;
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.2);
}

.dashboard-chip-grey {
    color: #495057;
    background: rgba(108, 117, 125, 0.12);
    border-color: rgba(108, 117, 125, 0.2);
}

.vendor-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.vendor-inline-sonicwall {
    color: #8a1538;
    background: rgba(138, 21, 56, 0.08);
    border-color: rgba(138, 21, 56, 0.16);
}

.vendor-inline-securepoint {
    color: #0b5ed7;
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.16);
}

.dashboard-hint {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-alert-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-hint-icon {
    width: 1.3rem;
    height: 1.3rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #eef2f6;
    color: #5c6672;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: help;
}

.dashboard-tile {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 0.4rem 1rem rgba(15, 23, 42, 0.08);
    border-left: 0.4rem solid transparent;
}

.dashboard-tile-green {
    border-left-color: #198754;
}

.dashboard-tile-yellow {
    border-left-color: #ffc107;
}

.dashboard-tile-red {
    border-left-color: #dc3545;
}

.dashboard-tile-grey {
    border-left-color: #6c757d;
}

.dashboard-tile-link {
    color: inherit;
}

.dashboard-tile-link:hover {
    color: #0d6efd;
}

.dashboard-tile-meta {
    display: grid;
    gap: 0.35rem;
}

.vendor-badge,
.alarm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.vendor-logo {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.vendor-sonicwall {
    color: #8a1538;
    background: rgba(138, 21, 56, 0.08);
    border: 1px solid rgba(138, 21, 56, 0.16);
}

.vendor-sonicwall .vendor-logo {
    color: #8a1538;
}

.vendor-securepoint {
    color: #0b5ed7;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.16);
}

.vendor-securepoint .vendor-logo {
    color: #0b5ed7;
}

.node-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.node-pill-online {
    color: #146c43;
    background: rgba(25, 135, 84, 0.12);
    border-color: rgba(25, 135, 84, 0.2);
}

.node-pill-standby {
    color: #7a5b00;
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.25);
}

.node-pill-offline {
    color: #842029;
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.2);
}

.alarm-open {
    color: #842029;
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alarm-ack {
    color: #7a5b00;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.alarm-disabled {
    color: #495057;
    background: rgba(108, 117, 125, 0.12);
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.alarm-none {
    color: #146c43;
    background: rgba(25, 135, 84, 0.12);
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.dashboard-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-inline-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.dashboard-inline-section {
    border-left: 3px solid #ff8a2a;
    padding-left: 1rem;
}

.dashboard-inline-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.dashboard-inline-list {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 272px;
    }

    .app-shell-main {
        margin-left: 0;
    }

    .app-shell[data-sidebar-state="collapsed"] .app-shell-main {
        margin-left: 0;
    }

    .sidebar-toggle-desktop {
        display: none;
    }

    .sidebar-toggle-mobile {
        display: inline-flex;
    }

    .app-shell.sidebar-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.35);
        z-index: 1030;
    }

    .app-shell.sidebar-mobile-open .app-sidebar-backdrop {
        display: block;
    }

    .app-topbar {
        padding: 0 1rem;
    }

    .app-content {
        padding: 1rem;
    }

    .dashboard-kpi-card {
        padding: 0.85rem 1rem;
    }

    .dashboard-kpi-ring {
        width: 62px;
        height: 62px;
    }

    .dashboard-toolbar-caption {
        width: 100%;
        text-align: left;
    }

    .dashboard-tile {
        border-left-width: 0.3rem;
    }

    .dashboard-tile-footer .btn {
        flex: 1 1 auto;
    }

    .vendor-badge,
    .alarm-badge,
    .node-pill {
        font-size: 0.72rem;
    }

    .app-topbar-user {
        display: none;
    }
}
