﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ════════════════════════════════════════════════════════════════════════════
   cards.css  —  HUD Theme  (aligned with twx-panel.css)
   ════════════════════════════════════════════════════════════════════════════
   Sections
     1.  Root container & shared helpers
     2.  Base .card  +  title bar
     3.  Card body  (card2 — MetricCard)
     4.  Expand toggle  (chevron)
     5.  Slide / expand content  (card2 expand section)
     6.  List content  (card3 — NavigationCard / AlarmCard)
        6a.  Search box
        6b.  Sort dropdown
     7.  card3  —  NavigationCard  (right-docked, iconize)
     8.  card6  —  Dual-section collapsible list
        8a.  card6 toolbar
        8b.  card6 sections & headers
        8c.  card6 section body items  (matched to card3 style)
        8d.  card6 controls & iconized state
     9.  card5  —  Accordion card
    10.  Value / status children  (card5 items)
    11.  Utility  (reset button, selected state, legacy)
   ════════════════════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════════════════════
   1.  Root container & shared helpers
   ════════════════════════════════════════════════════════════════════════════ */
.cards {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    font-family: 'DM Sans', sans-serif;
}

    /* shared border helper — applied to nav-child rows, slide content etc. */
    .cards div.card-border {
        border: 1px solid rgba(56, 189, 248, 0.15);
        border-radius: 8px;
    }

    /* shared background helper — used on expand content, text-child, chart-child */
    .cards .card-background {
        background: rgba(2, 8, 20, 0.85);
    }


/* ════════════════════════════════════════════════════════════════════════════
   2.  Base .card  +  title bar
   ════════════════════════════════════════════════════════════════════════════ */
.card {
    position: relative;
    top: 150px;
    z-index: 1;
    background: rgba(2, 8, 20, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 8px;
    cursor: grab;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.7);
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

    .card:hover {
        z-index: 9;
        border-color: rgba(56, 189, 248, 0.28);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 12px rgba(56, 189, 248, 0.1), 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    .card label {
        margin: 0;
    }

    /* ── Title bar — shared by all card types ────────────────────────────────── */
    .card .title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 8px;
        height: 26px;
        background: rgba(2, 8, 20, 0.75);
        border-bottom: 1px solid rgba(56, 189, 248, 0.12);
        border-radius: 8px 8px 0 0;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
    }

        /* green status dot before title */
        .card .title::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #06d6a0;
            box-shadow: 0 0 6px #06d6a040;
            flex-shrink: 0;
            margin-right: 6px;
        }

        .card .title .label {
            flex: 1;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            height: 100%;
            display: flex;
            align-items: center;
        }

            .card .title .label label {
                margin: 0;
                font-size: 11px;
                font-weight: 700;
                color: rgba(248, 250, 252, 0.88);
                letter-spacing: 0.3px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

        /* legacy close control (card2/card4) */
        .card .title .ctrl {
            flex-shrink: 0;
            cursor: pointer;
            color: rgba(148, 163, 184, 0.4);
            padding: 0 3px;
            height: 100%;
            display: flex;
            align-items: center;
            transition: color 0.15s;
        }

            .card .title .ctrl:hover {
                color: rgba(248, 113, 113, 0.8);
            }

            .card .title .ctrl i {
                font-size: 11px !important;
            }


    /* ════════════════════════════════════════════════════════════════════════════
   3.  Card body  (card2 — MetricCard)
   ════════════════════════════════════════════════════════════════════════════ */
    .card .card-body {
        padding: 6px 0 0;
        background: transparent;
        text-align: center;
        color: rgba(148, 163, 184, 0.7);
        display: flex;
        flex-flow: column nowrap;
    }

        /* big KPI value */
        .card .card-body label {
            margin: 0;
            font-size: 18px;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            color: #06d6a0;
        }


    /* ════════════════════════════════════════════════════════════════════════════
   4.  Expand toggle  (chevron — card2 / card4)
   ════════════════════════════════════════════════════════════════════════════ */
    .card .icon-container-expand {
        cursor: pointer;
        color: rgba(148, 163, 184, 0.45);
        padding: 3px 0;
        text-align: center;
        transition: color 0.15s;
    }

        .card .icon-container-expand:hover {
            color: #38bdf8;
        }

        .card .icon-container-expand i {
            font-size: 14px !important;
        }


    /* ════════════════════════════════════════════════════════════════════════════
   5.  Slide / expand content  (card2 expand section)
   ════════════════════════════════════════════════════════════════════════════ */
    .card .slideContent {
        display: none;
        height: 250px;
        position: relative;
        top: 0;
        background: rgba(2, 8, 20, 0.6);
        border-top: 1px solid rgba(56, 189, 248, 0.08);
        color: rgba(148, 163, 184, 0.7);
        text-align: center;
    }

        .card .slideContent .child-row {
            width: 100%;
            display: flex;
            line-height: normal;
        }

        /* text-child: large live value */
        .card .slideContent .text-child {
            flex: 1;
        }

            .card .slideContent .text-child span {
                font-size: 36px;
                font-family: 'JetBrains Mono', monospace;
                font-weight: 700;
                color: #06d6a0;
            }

        /* chart-child: Highcharts embed */
        .card .slideContent .chart-child {
            flex: 1;
        }

        /* nav-child inside slide expand */
        .card .slideContent .nav-child {
            flex: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
        }

            .card .slideContent .nav-child label {
                cursor: pointer;
                margin: 0 auto;
                color: rgba(226, 232, 240, 0.8);
                font-size: 11px;
            }


    /* ════════════════════════════════════════════════════════════════════════════
   6.  List content  (card3 — NavigationCard / AlarmCard)
   ════════════════════════════════════════════════════════════════════════════ */

    /* container fills remaining height below title bar */
    .card .listContent {
        display: block !important;
        max-height: unset !important;
        height: calc(100% - 26px) !important;
        color: rgba(148, 163, 184, 0.7);
        text-align: center;
        overflow-y: auto !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(56, 189, 248, 0.2) transparent;
    }

        .card .listContent::-webkit-scrollbar {
            width: 4px;
        }

        .card .listContent::-webkit-scrollbar-track {
            background: transparent;
        }

        .card .listContent::-webkit-scrollbar-thumb {
            background: rgba(56, 189, 248, 0.2);
            border-radius: 2px;
        }

            .card .listContent::-webkit-scrollbar-thumb:hover {
                background: rgba(56, 189, 248, 0.4);
            }

        /* each item row */
        .card .listContent .child-row {
            width: 100%;
            display: flex;
            line-height: normal;
            margin: 5px 0;
        }

            .card .listContent .child-row:last-child {
                margin-bottom: 5px;
            }

        /* clickable nav item */
        .card .listContent .nav-child {
            background: rgba(15, 23, 42, 0.55);
            flex: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            width: 100%;
        }

            .card .listContent .nav-child label {
                cursor: pointer;
                margin: 0 auto;
                width: calc(100% - 10px);
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                font-size: 11px;
                font-weight: 500;
                /* color intentionally omitted — set by JS (applyAlarmColors / updateDataPointTextColor) */
            }

    /* base nav-child shape — applies across all card types */
    .card .nav-child {
        min-height: 28px;
        border-radius: 5px;
        transition: background 0.15s, border-color 0.15s;
    }

        .card .nav-child:hover {
            background: rgba(56, 189, 248, 0.08) !important;
            border-color: rgba(56, 189, 248, 0.22) !important;
        }

    /* ── 6a.  Search box ─────────────────────────────────────────────────────── */
    .card .search-box {
        width: 100%;
        padding: 4px 8px 4px 24px;
        background: rgba(15, 23, 42, 0.6);
        color: rgba(226, 232, 240, 0.85);
        border: 1px solid rgba(56, 189, 248, 0.12);
        border-radius: 5px;
        outline: none;
        font-size: 11px;
        font-family: 'DM Sans', sans-serif;
        transition: border-color 0.15s;
        box-sizing: border-box;
    }

        .card .search-box:focus {
            border-color: rgba(56, 189, 248, 0.35);
        }

        .card .search-box::placeholder {
            color: rgba(148, 163, 184, 0.3);
        }

/* ── 6b.  Sort dropdown ──────────────────────────────────────────────────── */
.btnSortCardItems {
    height: 100%;
    margin-right: 4px;
    background: rgba(56, 189, 248, 0.08) !important;
    border: 1px solid rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border-radius: 4px !important;
    transition: background 0.15s !important;
}

    .btnSortCardItems:hover {
        background: rgba(56, 189, 248, 0.15) !important;
    }

/* hide default Bootstrap caret */
.dropdown-toggle::after {
    display: none;
}

.dropdown-menu {
    background: rgba(2, 8, 20, 0.97) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: 6px !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.08), 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    padding: 4px 0 !important;
    min-width: 150px;
    /* keep Bootstrap from overriding */
    left: unset !important;
    right: 0;
    /* sit above section headers */
    z-index: 9999 !important;
}

/* ── Dropdown items ──────────────────────────────────────────────────────── */
.dropdown-item {
    background: transparent !important;
    color: rgba(148, 163, 184, 0.75) !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 7px 14px !important;
    border-radius: 0;
    transition: background 0.12s, color 0.12s;
    /* left accent bar — hidden by default */
    border-left: 2px solid transparent;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: rgba(56, 189, 248, 0.08) !important;
        color: #38bdf8 !important;
        border-left-color: #38bdf8;
        outline: none !important;
    }

    .dropdown-item:active {
        background: rgba(56, 189, 248, 0.15) !important;
        color: #38bdf8 !important;
    }

/* divider between items (optional — add <div class="dropdown-divider"> in HTML) */
.dropdown-divider {
    border-top: 1px solid rgba(56, 189, 248, 0.08) !important;
    margin: 3px 0 !important;
}


/* ════════════════════════════════════════════════════════════════════════════
   7.  card3  —  NavigationCard  (right-docked, full-height, iconize support)
   ════════════════════════════════════════════════════════════════════════════ */
.card3 {
    left: unset !important;
    right: 0 !important;
    top: 0 !important;
    min-height: unset !important;
    height: 100% !important;
    transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
}

    /* prevent scale on hover (inherited from .card:hover) */
    .card3:hover {
        transform: scale(1);
    }

    .card3 .title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 8px;
    }

        .card3 .title .label {
            flex: 1;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

    /* ── Minimize / close buttons ────────────────────────────────────────────── */
    .card3 .card-controls {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
    }

        .card3 .card-controls button {
            background: transparent;
            border: 1px solid rgba(56, 189, 248, 0.12);
            border-radius: 4px;
            color: rgba(148, 163, 184, 0.4);
            cursor: pointer;
            padding: 2px 5px;
            line-height: 1;
            font-size: 10px;
            transition: color 0.15s, border-color 0.15s, background 0.15s;
        }

            .card3 .card-controls button:hover {
                color: #ffffff;
                border-color: rgba(56, 189, 248, 0.35);
                background: rgba(56, 189, 248, 0.08);
            }

        .card3 .card-controls .btn-close-card:hover {
            color: #f87171;
            border-color: rgba(248, 113, 113, 0.35);
            background: rgba(248, 113, 113, 0.08);
        }

        /* prevent FontAwesome spin on minus/times icons */
        .card3 .card-controls i {
            animation: none !important;
            -webkit-animation: none !important;
        }

/* ── Iconized square state ───────────────────────────────────────────────── */
.card3--iconized {
    width: 42px !important;
    height: 44px !important;
    min-height: unset !important;
    overflow: visible !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative !important;
    right: 8px;
    background: rgba(2, 8, 20, 0.92) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.12) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .card3--iconized:hover {
        border-color: rgba(56, 189, 248, 0.5) !important;
        box-shadow: 0 0 16px rgba(56, 189, 248, 0.25) !important;
    }

    /* hide card content when iconized */
    .card3--iconized .title,
    .card3--iconized .listContent {
        display: none !important;
    }

    /* show icon-label only when iconized */
    .card3--iconized .icon-label {
        display: flex !important;
    }

/* icon-label — hidden by default, shown in iconized state */
.card3 .icon-label {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 16px;
    color: #38bdf8;
    pointer-events: none;
    user-select: none;
}

    /* tint SVG/PNG icons to match cyan accent */
    .card3 .icon-label img {
        filter: invert(1) sepia(1) saturate(2) hue-rotate(160deg) brightness(1.2);
    }

/* tooltip shown on hover when iconized — reads data-card-title attribute */
.card3--iconized::after {
    content: attr(data-card-title);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(2, 8, 20, 0.95);
    color: rgba(226, 232, 240, 0.9);
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.card3--iconized:hover::after {
    opacity: 1;
}

/* sidebar list indicator for iconized state */
#listCard a.card-iconized-li {
    opacity: 0.6;
    font-style: italic;
}


/* ════════════════════════════════════════════════════════════════════════════
   8.  card6  —  Dual-section collapsible list
   ════════════════════════════════════════════════════════════════════════════ */
.card6 {
    left: unset !important;
    right: 0 !important;
    top: 0 !important;
    min-height: unset !important;
    height: 100% !important;
    transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
}

    .card6:hover {
        transform: scale(1);
    }

/* scrollable body below the title bar */
.card6-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100% - 26px);
    cursor: default;
}

/* ── 8a.  Toolbar  (search + sort — sticky at top) ───────────────────────── */
.card6-toolbar {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 6px;
    background: rgba(2, 8, 20, 0.96);
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10; /* above section headers so dropdown renders on top */
}

    /* dropdown menu scoped to toolbar — renders above section content */
    .card6-toolbar .dropdown-menu {
        z-index: 9999;
    }

/* ── 8b.  Sections & headers ─────────────────────────────────────────────── */
.card6-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

    /* divider between sections */
    .card6-section + .card6-section {
        border-top: 1px solid rgba(56, 189, 248, 0.08);
    }

/* clickable section header row */
.card6-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(2, 8, 20, 0.45);
    border-bottom: 1px solid rgba(56, 189, 248, 0.06);
    flex-shrink: 0;
    position: relative;
    z-index: 1; /* below toolbar so dropdown menu is not covered */
    transition: background 0.15s;
}

    .card6-section-header:hover {
        background: rgba(56, 189, 248, 0.05);
    }

/* status dot — cyan for primary section, grey for secondary */
.card6-section-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.35);
}

.card6-section:first-of-type .card6-section-dot {
    background: #38bdf8;
    box-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
}

.card6-section-label {
    flex: 1;
    font-size: 10px;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.8);
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'DM Sans', sans-serif;
}

/* item count badge */
.card6-section-count {
    font-size: 9px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    padding: 1px 6px;
    flex-shrink: 0;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
}

/* collapse chevron — rotates when section is collapsed */
.card6-chevron {
    font-size: 9px;
    color: rgba(148, 163, 184, 0.4);
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.card6-chevron--collapsed {
    transform: rotate(-90deg);
}

/* ── 8c.  Section body items  (matched to card3 .listContent style) ──────── */
.card6-section-body {
    overflow-y: auto;
    flex-shrink: 0;
    max-height: 200px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.2) transparent;
}

    .card6-section-body::-webkit-scrollbar {
        width: 4px;
    }

    .card6-section-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .card6-section-body::-webkit-scrollbar-thumb {
        background: rgba(56, 189, 248, 0.2);
        border-radius: 2px;
    }

        .card6-section-body::-webkit-scrollbar-thumb:hover {
            background: rgba(56, 189, 248, 0.4);
        }

    /* item row — same spacing as card3 list */
    .card6-section-body .child-row {
        width: 100%;
        display: flex;
        line-height: normal;
        margin: 5px 0;
    }

        .card6-section-body .child-row:last-child {
            margin-bottom: 5px;
        }

    /* nav item — identical styling to .card .listContent .nav-child */
    .card6-section-body .nav-child {
        background: rgba(15, 23, 42, 0.85);
        flex: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 28px;
        border-radius: 5px;
        border: 1px solid rgba(56, 189, 248, 0.15) !important;
        transition: background 0.15s, border-color 0.15s;
    }

        .card6-section-body .nav-child:hover {
            background: rgba(56, 189, 248, 0.08) !important;
            border-color: rgba(56, 189, 248, 0.22) !important;
        }

        .card6-section-body .nav-child label {
            cursor: pointer;
            margin: 0 auto;
            width: calc(100% - 10px);
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            font-size: 11px;
            font-weight: 500;
            font-family: 'DM Sans', sans-serif;
            /* color set by JS (applyAlarmColors) */
        }

/* ── 8d.  card6 controls & iconized state  (mirrors card3) ──────────────── */
.card6 .card-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

    .card6 .card-controls button {
        background: transparent;
        border: 1px solid rgba(56, 189, 248, 0.12);
        border-radius: 4px;
        color: rgba(148, 163, 184, 0.4);
        cursor: pointer;
        padding: 2px 5px;
        line-height: 1;
        font-size: 10px;
        transition: color 0.15s, border-color 0.15s, background 0.15s;
    }

        .card6 .card-controls button:hover {
            color: #ffffff;
            border-color: rgba(56, 189, 248, 0.35);
            background: rgba(56, 189, 248, 0.08);
        }

    .card6 .card-controls .btn-close-card:hover {
        color: #f87171;
        border-color: rgba(248, 113, 113, 0.35);
        background: rgba(248, 113, 113, 0.08);
    }

    .card6 .card-controls i {
        animation: none !important;
        -webkit-animation: none !important;
    }

.card6--iconized {
    width: 39px !important;
    height: 44px !important;
    min-height: unset !important;
    overflow: visible !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative !important;
    right: 8px;
    background: rgba(2, 8, 20, 0.92) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.12) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .card6--iconized:hover {
        border-color: rgba(56, 189, 248, 0.5) !important;
        box-shadow: 0 0 16px rgba(56, 189, 248, 0.25) !important;
    }

    .card6--iconized .title,
    .card6--iconized .card6-body {
        display: none !important;
    }

    .card6--iconized .icon-label {
        display: flex !important;
    }

.card6 .icon-label {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 16px;
    color: #38bdf8;
    pointer-events: none;
    user-select: none;
}

    .card6 .icon-label img {
        filter: invert(1) sepia(1) saturate(2) hue-rotate(160deg) brightness(1.2);
    }

.card6--iconized::after {
    content: attr(data-card-title);
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(2, 8, 20, 0.95);
    color: rgba(226, 232, 240, 0.9);
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.card6--iconized:hover::after {
    opacity: 1;
}


/* ════════════════════════════════════════════════════════════════════════════
   9.  card5  —  Accordion card  (AssetStatusCard)
   ════════════════════════════════════════════════════════════════════════════ */
.accordion_card.card5 {
    position: relative;
    color: rgba(226, 232, 240, 0.85);
    max-width: 100%;
    width: 170px;
    top: 0;
    margin-right: 5px;
}

/* nested .card inside accordion must not inherit top:150px */
.accordion_card .accordion .card {
    position: relative;
    top: 0;
}

.accordion_card_title {
    text-align: center;
    padding: 5px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.88);
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}

/* accordion group header button */
.accordion-card-header button.accordion_title {
    background: rgba(15, 23, 42, 0.7);
    color: rgba(226, 232, 240, 0.85);
    box-shadow: none;
    border: none;
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
    width: 100%;
    padding: 6px 10px 6px 20px;
    outline: none;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    position: relative;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.15s, color 0.15s;
}

    .accordion-card-header button.accordion_title:hover {
        background: rgba(56, 189, 248, 0.06);
        color: #ffffff;
    }

/* remove bottom border on last group */
.cardWrapper:last-child .accordion-card-header button.accordion_title {
    border-bottom: none;
}

/* chevron pseudo-element before group label */
.accordion-card-header button.accordion_title::before {
    content: '';
    position: absolute;
    top: 9px;
    left: 6px;
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid rgba(56, 189, 248, 0.6);
    border-top: 1.5px solid rgba(56, 189, 248, 0.6);
    transform: rotate(135deg);
}

/* card body paragraph rows inside accordion */
.accordion_card .card-body p {
    margin-bottom: 1px;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 12px;
    position: relative;
    text-align: left;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.7);
    border-bottom: 1px solid rgba(56, 189, 248, 0.05);
}

    /* status indicator boxes — green default, red override */
    .accordion_card .card-body p .greenBox,
    .accordion_card .card-body p .redBox {
        width: 14px;
        height: 14px;
        border-radius: 3px;
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        background: #06d6a0;
        box-shadow: 0 0 6px #06d6a060;
    }

    .accordion_card .card-body p .redBox {
        background: #f87171;
        box-shadow: 0 0 6px #f8717160;
    }


/* ════════════════════════════════════════════════════════════════════════════
   10.  Value / status children  (card5 group items)
   ════════════════════════════════════════════════════════════════════════════ */

/* value-child: label + live numeric span */
.valueChild {
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    color: rgba(148, 163, 184, 0.65);
    margin-left: 10px;
    margin-bottom: 3px;
}

    .valueChild:first-of-type {
        margin-top: 8px;
    }

    .valueChild:last-of-type {
        margin-bottom: 12px;
    }

    .valueChild span {
        font-family: 'JetBrains Mono', monospace;
        font-size: 12px;
        font-weight: 700;
        color: #06d6a0;
        margin-left: 8px;
    }


/* ════════════════════════════════════════════════════════════════════════════
   11.  Utility
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Reset button ────────────────────────────────────────────────────────── */
#btnResetCards {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    color: rgba(148, 163, 184, 0.6);
    outline: none;
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 0 0 6px 6px;
    margin: 2px 0 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    padding: 5px 0;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.15s, color 0.15s;
}

    #btnResetCards:hover {
        background: rgba(56, 189, 248, 0.08);
        color: #38bdf8;
        border-color: rgba(56, 189, 248, 0.3);
    }

/* ── Selected / active state  (#listCard sidebar links) ─────────────────── */
.selected-li-a {
   /* color: #06d6a0 !important;*/
}

/* ── Hidden utility elements ─────────────────────────────────────────────── */
#aaa,
#bbb-bbb {
    display: none;
}

/* ── card1  (legacy — kept for reference) ────────────────────────────────── */
#card1 {
    height: 100px;
    width: 100px;
    display: none;
    left: 1600px;
    top: 50px;
}

    #card1 .card-body table {
        width: 100%;
        text-align: center;
        color: rgba(148, 163, 184, 0.7);
    }
