/* HIVELOCK clean fleet list controller */

#device-list {
    display: block !important;
    min-height: 220px !important;
    height: calc(100vh - 230px) !important;
    max-height: calc(100vh - 230px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    list-style: none !important;
    padding: 6px 6px 10px 0 !important;
    margin: 0 !important;
    scrollbar-gutter: stable;
}

#device-list::-webkit-scrollbar {
    width: 8px;
}

#device-list::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 999px;
}

#device-list::-webkit-scrollbar-track {
    background: transparent;
}

#device-list .device-item.hv-fleet-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 66px !important;
    padding: 12px 12px 12px 16px !important;
    border-bottom: 1px solid #edf2f7 !important;
    cursor: pointer !important;
    background: #fff !important;
    position: relative !important;
    overflow: visible !important;
    transition: background-color 0.12s ease, box-shadow 0.12s ease, border-left-color 0.12s ease !important;
}

#device-list .device-item.hv-fleet-row:hover {
    background: #f8fafc !important;
}

#device-list .device-item.hv-fleet-row.active {
    background: #fff !important;
    border-left: 5px solid #e53e3e !important;
    padding-left: 11px !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.025) !important;
}

#device-list .hv-fleet-main {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#device-list .hv-fleet-title {
    margin: 0 !important;
    font-size: 0.92rem !important;
    line-height: 1.15 !important;
    color: #1a202c !important;
    font-weight: 700 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#device-list .hv-fleet-meta {
    margin: 0 !important;
    font-size: 0.74rem !important;
    line-height: 1.2 !important;
    color: #718096 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

#device-list .hv-fleet-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    min-width: 150px !important;
    position: relative !important;
}

#device-list .hv-fleet-action {
    width: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #2d3748 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

#device-list .hv-fleet-action:hover {
    background: #f7fafc !important;
    border-color: #cbd5e0 !important;
}

#device-list .hv-fleet-lock {
    cursor: default !important;
}

#device-list .hv-fleet-lock.locked {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

#device-list .hv-fleet-lock.pending {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
}

#device-list .hv-fleet-route {
    background: #ede9fe !important;
    color: #6d28d9 !important;
    border-color: #ddd6fe !important;
}

#device-list .hv-fleet-route.is-hidden {
    display: none !important;
}

#device-list .status-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 999px !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
}

#device-list .status-dot.online {
    background: #38a169 !important;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.14) !important;
}

#device-list .status-dot.offline {
    background: #a0aec0 !important;
    box-shadow: 0 0 0 3px rgba(160, 174, 192, 0.16) !important;
}

#device-list .hv-fleet-menu-wrap {
    position: relative !important;
}

#device-list .hv-fleet-menu {
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 8px) !important;
    width: 245px !important;
    padding: 8px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18) !important;
    z-index: 99999 !important;
    display: none !important;
}

#device-list .device-item.hv-menu-open .hv-fleet-menu {
    display: block !important;
}

#device-list .hv-fleet-menu button {
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    text-align: left !important;
    cursor: pointer !important;
    display: grid !important;
    grid-template-columns: 24px 1fr !important;
    gap: 8px !important;
    align-items: center !important;
    color: #1a202c !important;
}

#device-list .hv-fleet-menu button:hover {
    background: #f7fafc !important;
}

#device-list .hv-fleet-menu button span {
    font-size: 1rem !important;
}

#device-list .hv-fleet-menu button strong {
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
}

#device-list .hv-fleet-empty {
    padding: 22px 14px !important;
    color: #94a3b8 !important;
    text-align: center !important;
    font-size: 0.85rem !important;
}

/* Hide legacy floating/icon layers. New list renders these inline. */
#device-monitoring-icon-layer,
#fleet-corridor-badge-layer,
#device-lock-menu-layer {
    display: none !important;
    pointer-events: none !important;
}

/* Hide legacy DOM injected into rows by old decorators, if any still runs. */
#device-list .lock-card-indicator,
#device-list .device-list-actions-menu-box,
#device-list .device-list-quick-actions,
#device-list .device-lock-actions-wrap,
#device-list .device-global-lock-menu-box,
#device-list .fleet-corridor-badge {
    display: none !important;
}

@media (max-width: 900px) {
    #device-list {
        height: calc(100vh - 260px) !important;
        max-height: calc(100vh - 260px) !important;
    }

    #device-list .device-item.hv-fleet-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #device-list .hv-fleet-actions {
        justify-content: flex-start !important;
        min-width: 0 !important;
    }

    #device-list .hv-fleet-menu {
        left: 0 !important;
        right: auto !important;
    }
}

/* Clean fleet menu loadfix: stable popover */
#device-list .hv-fleet-menu {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    max-height: min(360px, calc(100vh - 24px)) !important;
    overflow-y: auto !important;
}

#device-list .device-item.hv-menu-open .hv-fleet-menu {
    display: block !important;
}

#device-list .hv-fleet-action {
    visibility: visible !important;
    opacity: 1 !important;
}

#device-list .hv-fleet-actions {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Clean fleet list V2 visual polish */
#device-list .hv-fleet-actions {
    min-width: 136px !important;
    gap: 5px !important;
}

#device-list .hv-fleet-action {
    width: 28px !important;
    height: 28px !important;
    border-radius: 10px !important;
    font-size: 0 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

#device-list .hv-fleet-action svg {
    width: 15px !important;
    height: 15px !important;
    display: block !important;
    stroke-width: 2.2 !important;
}

#device-list .hv-fleet-lock.locked {
    background: #fff5f5 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border-color: #bbf7d0 !important;
}

#device-list .hv-fleet-lock.pending {
    background: #fffbeb !important;
    color: #d97706 !important;
    border-color: #fde68a !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: #bfdbfe !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
}

#device-list .hv-fleet-route {
    background: #f5f3ff !important;
    color: #7c3aed !important;
    border-color: #ddd6fe !important;
}

#device-list .hv-fleet-more {
    background: #f8fafc !important;
    color: #475569 !important;
}

#device-list .hv-fleet-more::before {
    content: "⋯";
    font-size: 18px;
    line-height: 1;
    margin-top: -4px;
}

#device-list .hv-fleet-action:hover {
    transform: translateY(-1px);
    background: #f8fafc !important;
}

/* Body portal menu, not inside scroll list */
#hv-fleet-menu-portal {
    position: fixed !important;
    width: 260px !important;
    padding: 8px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18) !important;
    z-index: 2147483200 !important;
    display: none !important;
}

#hv-fleet-menu-portal.open {
    display: block !important;
}

#hv-fleet-menu-portal button {
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    padding: 10px 11px !important;
    border-radius: 10px !important;
    text-align: left !important;
    cursor: pointer !important;
    display: grid !important;
    grid-template-columns: 26px 1fr !important;
    gap: 8px !important;
    align-items: center !important;
    color: #1a202c !important;
}

#hv-fleet-menu-portal button:hover {
    background: #f7fafc !important;
}

#hv-fleet-menu-portal span {
    font-size: 1rem !important;
}

#hv-fleet-menu-portal strong {
    font-size: 0.83rem !important;
    line-height: 1.2 !important;
}

#device-list .hv-fleet-menu {
    display: none !important;
}

/* Clean fleet list V3: bold status pills instead of small icons */
#device-list .hv-fleet-actions {
    min-width: 176px !important;
    gap: 5px !important;
}

#device-list .hv-fleet-action {
    height: 30px !important;
    min-width: 34px !important;
    width: auto !important;
    padding: 0 8px !important;
    border-radius: 9px !important;
    font-size: 0.68rem !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: 0.03em !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05) !important;
    text-transform: uppercase !important;
}

#device-list .hv-fleet-action svg {
    display: none !important;
}

#device-list .hv-fleet-lock {
    min-width: 42px !important;
}

#device-list .hv-fleet-lock.locked {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #b91c1c !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #15803d !important;
}

#device-list .hv-fleet-lock.pending {
    background: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

#device-list .hv-fleet-monitor {
    min-width: 44px !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #cbd5e1 !important;
    color: #475569 !important;
    border-color: #94a3b8 !important;
}

#device-list .hv-fleet-route {
    min-width: 34px !important;
    background: #7c3aed !important;
    color: #ffffff !important;
    border-color: #6d28d9 !important;
}

#device-list .hv-fleet-route.is-hidden {
    display: none !important;
}

#device-list .hv-fleet-more {
    min-width: 30px !important;
    width: 30px !important;
    padding: 0 !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    font-size: 1.05rem !important;
    letter-spacing: 0 !important;
}

#device-list .hv-fleet-more::before {
    content: none !important;
}

#device-list .hv-fleet-action:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#device-list .status-dot {
    width: 12px !important;
    height: 12px !important;
    margin-left: 2px !important;
}

/* Clean fleet list V4: original-like icons, but inline and stable */
#device-list .hv-fleet-actions {
    min-width: 148px !important;
    gap: 6px !important;
}

#device-list .hv-fleet-action {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
    transform: none !important;
    filter: none !important;
}

#device-list .hv-fleet-action:hover {
    transform: translateY(-1px) !important;
    filter: none !important;
}

#device-list .hv-fleet-action svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    stroke-width: 2.15 !important;
}

#device-list .hv-fleet-lock {
    cursor: default !important;
}

#device-list .hv-fleet-lock.locked {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #dcfce7 !important;
    color: #16a34a !important;
    border: 1px solid #bbf7d0 !important;
}

#device-list .hv-fleet-lock.pending {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

#device-list .hv-fleet-monitor {
    font-size: 0.78rem !important;
    font-weight: 900 !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
}

#device-list .hv-fleet-route {
    font-size: 0.95rem !important;
    background: #ede9fe !important;
    color: #6d28d9 !important;
    border: 1px solid #ddd6fe !important;
}

#device-list .hv-fleet-route.is-hidden {
    display: none !important;
}

#device-list .hv-fleet-more {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    margin-top: 0 !important;
}

#device-list .hv-fleet-more::before {
    content: none !important;
}

#device-list .status-dot {
    width: 10px !important;
    height: 10px !important;
    margin-left: 1px !important;
}

/* Clean fleet list V5: stacked readable status labels */
#device-list .device-item.hv-fleet-row {
    grid-template-columns: minmax(0, 1fr) 44px !important;
    align-items: center !important;
    min-height: 96px !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}

#device-list .hv-fleet-main {
    gap: 5px !important;
}

#device-list .hv-fleet-status-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-top: 3px !important;
}

#device-list .hv-fleet-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 22px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    cursor: default !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

#device-list .hv-fleet-status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    margin-right: 6px;
    opacity: 0.9;
}

#device-list .hv-fleet-lock.locked {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

#device-list .hv-fleet-lock.pending {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

#device-list .hv-fleet-monitor {
    cursor: pointer !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

#device-list .hv-fleet-route {
    cursor: pointer !important;
}

#device-list .hv-fleet-route:not(.is-hidden) {
    background: #ede9fe !important;
    color: #6d28d9 !important;
    border-color: #ddd6fe !important;
}

#device-list .hv-fleet-route.is-hidden {
    display: none !important;
}

#device-list .hv-fleet-actions {
    min-width: 36px !important;
    width: 36px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

#device-list .hv-fleet-more {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
}

#device-list .hv-fleet-more::before {
    content: none !important;
}

#device-list .status-dot {
    width: 10px !important;
    height: 10px !important;
    margin: 0 !important;
}

#device-list .hv-fleet-action svg {
    display: none !important;
}

#device-list .hv-fleet-action:not(.hv-fleet-more) {
    display: none !important;
}

/* Clean fleet list V6: refined stacked status cards */
#device-list .device-item.hv-fleet-row {
    min-height: 112px !important;
    padding: 13px 12px 13px 16px !important;
    border-bottom: 1px solid #eef2f7 !important;
}

#device-list .device-item.hv-fleet-row.active {
    border-left: 5px solid #e53e3e !important;
    padding-left: 11px !important;
}

#device-list .hv-fleet-title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

#device-list .hv-fleet-meta {
    font-size: 0.73rem !important;
    color: #64748b !important;
}

#device-list .hv-fleet-status-stack {
    gap: 5px !important;
    margin-top: 6px !important;
}

#device-list .hv-fleet-status-pill {
    width: min(100%, 230px) !important;
    min-height: 25px !important;
    padding: 5px 9px 5px 10px !important;
    border-radius: 9px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    border: 1px solid transparent !important;
    position: relative !important;
}

#device-list .hv-fleet-status-pill::before {
    width: 7px !important;
    height: 7px !important;
    margin-right: 7px !important;
    box-shadow: 0 0 0 3px currentColor !important;
    opacity: 0.18 !important;
}

#device-list .hv-fleet-status-pill::after {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 99px;
    background: currentColor;
    opacity: 0.75;
}

#device-list .hv-fleet-lock.locked {
    background: linear-gradient(90deg, #ecfdf5 0%, #ffffff 100%) !important;
    color: #047857 !important;
    border-color: #bbf7d0 !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: linear-gradient(90deg, #fef2f2 0%, #ffffff 100%) !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

#device-list .hv-fleet-lock.pending {
    background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%) !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%) !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%) !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

#device-list .hv-fleet-route:not(.is-hidden) {
    background: linear-gradient(90deg, #f5f3ff 0%, #ffffff 100%) !important;
    color: #6d28d9 !important;
    border-color: #ddd6fe !important;
}

#device-list .hv-fleet-monitor:hover,
#device-list .hv-fleet-route:hover {
    filter: brightness(0.985);
    transform: translateX(1px);
}

#device-list .hv-fleet-actions {
    gap: 10px !important;
}

#device-list .hv-fleet-more {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

#device-list .hv-fleet-more:hover {
    background: #e2e8f0 !important;
}

/* Monitoring confirm modal */
.hv-monitor-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483400;
    background: rgba(15, 23, 42, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.hv-monitor-confirm-box {
    width: min(420px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 18px;
}

.hv-monitor-confirm-box header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hv-monitor-confirm-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.hv-monitor-confirm-title {
    font-size: 1rem;
    font-weight: 850;
    color: #0f172a;
    margin: 0;
}

.hv-monitor-confirm-text {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
    margin: 4px 0 0;
}

.hv-monitor-confirm-device {
    display: inline-flex;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.86rem;
}

.hv-monitor-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.hv-monitor-confirm-actions button {
    border: 0;
    border-radius: 11px;
    padding: 9px 13px;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}

.hv-monitor-confirm-cancel {
    background: #f1f5f9;
    color: #334155;
}

.hv-monitor-confirm-ok {
    background: #2563eb;
    color: #ffffff;
}

.hv-monitor-confirm-ok.danger {
    background: #dc2626;
}

/* Monitoring confirm modal */
.hv-monitor-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483400;
    background: rgba(15, 23, 42, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.hv-monitor-confirm-box {
    width: min(420px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 18px;
}

.hv-monitor-confirm-box header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hv-monitor-confirm-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.hv-monitor-confirm-title {
    font-size: 1rem;
    font-weight: 850;
    color: #0f172a;
    margin: 0;
}

.hv-monitor-confirm-text {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
    margin: 4px 0 0;
}

.hv-monitor-confirm-device {
    display: inline-flex;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.86rem;
}

.hv-monitor-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.hv-monitor-confirm-actions button {
    border: 0;
    border-radius: 11px;
    padding: 9px 13px;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}

.hv-monitor-confirm-cancel {
    background: #f1f5f9;
    color: #334155;
}

.hv-monitor-confirm-ok {
    background: #2563eb;
    color: #ffffff;
}

.hv-monitor-confirm-ok.danger {
    background: #dc2626;
}

/* Clean fleet list V7: solid rectangular status labels */
#device-list .hv-fleet-status-stack {
    gap: 5px !important;
    margin-top: 7px !important;
}

#device-list .hv-fleet-status-pill {
    width: fit-content !important;
    max-width: 235px !important;
    min-height: 24px !important;
    padding: 5px 10px !important;
    border-radius: 5px !important;
    border: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14) !important;
    background-image: none !important;
    cursor: default !important;
}

#device-list .hv-fleet-status-pill::before,
#device-list .hv-fleet-status-pill::after {
    display: none !important;
    content: none !important;
}

/* Rygiel */
#device-list .hv-fleet-lock.locked {
    background: #16a34a !important;
    color: #ffffff !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #dc2626 !important;
    color: #ffffff !important;
}

#device-list .hv-fleet-lock.pending {
    background: #f59e0b !important;
    color: #ffffff !important;
}

/* Monitoring */
#device-list .hv-fleet-monitor.enabled {
    background: #2563eb !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #64748b !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

/* Korytarz */
#device-list .hv-fleet-route:not(.is-hidden) {
    background: #7c3aed !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

#device-list .hv-fleet-route.is-hidden {
    display: none !important;
}

/* Subtle hover only for clickable labels */
#device-list .hv-fleet-monitor:hover,
#device-list .hv-fleet-route:hover {
    filter: brightness(1.08) !important;
    transform: none !important;
}

/* Slightly cleaner row after bigger labels */
#device-list .device-item.hv-fleet-row {
    min-height: 105px !important;
}

/* Clean fleet list V8: more readable status labels */
#device-list .hv-fleet-status-stack {
    gap: 6px !important;
    margin-top: 8px !important;
}

#device-list .hv-fleet-status-pill {
    min-width: 156px !important;
    width: fit-content !important;
    max-width: 245px !important;
    min-height: 28px !important;
    padding: 7px 12px !important;
    border-radius: 6px !important;
    font-size: 0.78rem !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: 0.015em !important;
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22) !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18) !important;
    text-align: left !important;
}

/* Ciemniejsze tła = lepszy kontrast z białym tekstem */
#device-list .hv-fleet-lock.locked {
    background: #15803d !important;
}

#device-list .hv-fleet-lock.unlocked {
    background: #b91c1c !important;
}

#device-list .hv-fleet-lock.pending {
    background: #b45309 !important;
}

#device-list .hv-fleet-monitor.enabled {
    background: #1d4ed8 !important;
}

#device-list .hv-fleet-monitor.disabled {
    background: #475569 !important;
}

#device-list .hv-fleet-route:not(.is-hidden) {
    background: #6d28d9 !important;
}

/* Napis w tytule też lekko poprawiamy */
#device-list .hv-fleet-title {
    font-size: 0.98rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
}

#device-list .hv-fleet-meta {
    font-size: 0.75rem !important;
    color: #475569 !important;
}

/* Trochę więcej miejsca na czytelne statusy */
#device-list .device-item.hv-fleet-row {
    min-height: 118px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

/* Clean fleet list V9: top-right menu + readable online/offline status */
#device-list .device-item.hv-fleet-row {
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding-right: 118px !important;
}

#device-list .hv-fleet-actions {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    z-index: 3 !important;
}

/* Replace the lonely dot with a compact ONLINE/OFFLINE pill */
#device-list .status-dot {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 24px !important;
    min-width: 58px !important;
    padding: 0 8px 0 20px !important;
    margin: 0 !important;
    border-radius: 7px !important;
    font-size: 0.58rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em !important;
    line-height: 1 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;
}

#device-list .status-dot::before {
    content: "" !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 999px !important;
    transform: translateY(-50%) !important;
    background: currentColor !important;
}

#device-list .status-dot.online {
    background: #dcfce7 !important;
    color: #15803d !important;
}

#device-list .status-dot.online::after {
    content: "ONLINE" !important;
}

#device-list .status-dot.offline {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

#device-list .status-dot.offline::after {
    content: "OFFLINE" !important;
}

/* Better three-dot button */
#device-list .hv-fleet-more {
    width: 30px !important;
    min-width: 30px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;
}

#device-list .hv-fleet-more:hover {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
}

/* Keep status labels clean under the title */
#device-list .hv-fleet-status-stack {
    padding-right: 0 !important;
    margin-top: 9px !important;
}

#device-list .hv-fleet-status-pill {
    max-width: 220px !important;
}

/* Active row: leave space for right top controls */
#device-list .device-item.hv-fleet-row.active {
    padding-right: 118px !important;
}

/* Clean fleet list V10: bigger square online/menu controls without extra dot */
#device-list .device-item.hv-fleet-row {
    padding-right: 132px !important;
}

#device-list .device-item.hv-fleet-row.active {
    padding-right: 132px !important;
}

#device-list .hv-fleet-actions {
    top: 14px !important;
    right: 14px !important;
    gap: 8px !important;
}

/* ONLINE / OFFLINE badge without dot */
#device-list .status-dot {
    width: auto !important;
    min-width: 72px !important;
    height: 32px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    font-size: 0.66rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.045em !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.14) !important;
}

#device-list .status-dot::before {
    display: none !important;
    content: none !important;
}

#device-list .status-dot.online {
    background: #16a34a !important;
    color: #ffffff !important;
}

#device-list .status-dot.online::after {
    content: "ONLINE" !important;
}

#device-list .status-dot.offline {
    background: #64748b !important;
    color: #ffffff !important;
}

#device-list .status-dot.offline::after {
    content: "OFFLINE" !important;
}

/* Bigger square menu */
#device-list .hv-fleet-more {
    width: 36px !important;
    min-width: 36px !important;
    height: 32px !important;
    border-radius: 6px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
    font-size: 1.35rem !important;
    font-weight: 950 !important;
    line-height: 0.8 !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16) !important;
}

#device-list .hv-fleet-more:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
}

/* Clean fleet list V11: lighter menu button */
#device-list .hv-fleet-more {
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12) !important;
}

#device-list .hv-fleet-more:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}
