
/* AuraDesk — compact fleet cockpit heading + footer account cluster.
   Reuses existing handlers and design tokens; no changes to navigation or data. */

/* Stronger hierarchy for the Computers section heading. */
#computersView .section-head{
    align-items:center;
    gap:16px;
    padding:10px 1px 17px;
}
#computersView .section-head-left{align-items:center;gap:12px;min-width:0}
#computersView .computers-head-emblem{
    width:45px;height:45px;flex:0 0 45px;
    display:inline-flex;align-items:center;justify-content:center;
    background:linear-gradient(140deg,
        color-mix(in srgb,var(--accent) 21%,var(--card)),
        color-mix(in srgb,var(--accent) 7%,var(--panel)));
    color:var(--accent);
    border:1px solid color-mix(in srgb,var(--accent) 29%,var(--border));
    border-radius:12px;
}
#computersView .computers-head-emblem .section-head-icon{
    display:block;
    color:var(--accent);
    margin:0;width:23px;height:23px;
}
#computersView .section-head-line{align-items:center;gap:10px;flex-wrap:wrap}
#computersView .section-head .section-title{
    font-size:21px;font-weight:790;line-height:1.18;
    letter-spacing:-.55px;margin:0;
}
#computersView #computersGroup{
    display:inline-flex;align-items:center;min-height:24px;
    max-width:min(270px,45vw);
    box-sizing:border-box;
    padding:3px 9px;
    border:1px solid color-mix(in srgb,var(--accent) 30%,var(--border));
    border-radius:99px;
    background:color-mix(in srgb,var(--accent) 11%,var(--card));
    color:var(--accent);
    font-size:11px;font-weight:690;
    letter-spacing:0;
}
#computersView .section-head-sep{display:none}
#computersView .section-hint{
    font-size:12px;color:var(--muted);
    line-height:1.35;margin-top:5px;
}
#computersView .section-head-right{
    flex:0 1 auto;align-items:center;gap:8px;
    margin-left:auto;justify-content:flex-end;
}
#computersView #computersStats{display:none}
#computersView .section-head-right .org-toggle-btn{
    height:34px;display:inline-flex;align-items:center;
    gap:6px;padding:0 11px;
    border-radius:8px;
    border-color:var(--border2);
    background:var(--panel);
}
#computersView .section-head-right .head-search{
    min-width:195px;max-width:260px;
}
#computersView .section-head-right .head-search input{
    border-radius:8px;
}

/* Small KPI cards, left-aligned, instead of three full-bleed banners. */
#computersView .fleet-overview-kpis{
    width:min(100%,738px);
    grid-template-columns:repeat(3,minmax(0,1fr));
    justify-content:start;
    gap:9px;
    padding:0 0 13px;
}
#computersView .fleet-kpi{
    min-height:61px;
    grid-template-columns:35px minmax(0,1fr);
    grid-template-rows:24px 14px;
    column-gap:9px;
    padding:10px 11px;
    border-radius:10px;
}
#computersView .fleet-kpi-symbol{
    width:35px;height:35px;
    font-size:17px;border-radius:9px;
}
#computersView .fleet-kpi-value{
    font-size:22px;letter-spacing:-.3px;
}
#computersView .fleet-kpi-label{
    font-size:11px;line-height:1.2;
}

/* Account, notification and theme settings live beside Logout. */
.sidebar-footer{
    gap:8px;
    align-items:stretch;
    padding-top:12px;
}
.sidebar-account{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:"profile profile" "theme notify";
    gap:7px;
    flex:0 0 100%;
    width:100%;
    min-width:0;
}
.sidebar-account #userMenuBtn{
    grid-area:profile;
    display:flex;align-items:center;justify-content:flex-start;
    width:100%;min-width:0;min-height:39px;
    gap:8px;padding:6px 9px;
    border:1px solid var(--border);
    border-radius:9px;
    background:color-mix(in srgb,var(--accent) 5%,var(--panel));
    color:var(--text);
    font-size:12px;text-align:left;
}
.sidebar-account #userMenuBtn:hover,
.sidebar-account #userMenuBtn.open{
    border-color:color-mix(in srgb,var(--accent) 37%,var(--border));
    background:color-mix(in srgb,var(--accent) 12%,var(--panel));
}
.sidebar-account #userMenuAvatar{
    flex:0 0 26px;
    width:26px;height:26px;
    border-radius:50%;
}
.sidebar-account #userMenuName{
    min-width:0;max-width:none;flex:1;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-weight:620;font-size:12px;
}
.sidebar-account #userMenuBtn .user-menu-caret{
    width:14px;height:14px;flex:0 0 14px;
    color:var(--muted2);
}
.sidebar-account #themeBtn,
.sidebar-account #notifyBtn{
    display:flex;align-items:center;justify-content:center;
    width:100%;min-width:0;height:34px;
    border:1px solid var(--border2);
    border-radius:8px;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
}
.sidebar-account #themeBtn{grid-area:theme}
.sidebar-account #notifyBtn{grid-area:notify}
.sidebar-account #themeBtn .i,
.sidebar-account #notifyBtn .i{
    width:17px;height:17px;color:var(--muted);
}
.sidebar-account #themeBtn:hover,
.sidebar-account #notifyBtn:hover,
.sidebar-account #themeBtn.open,
.sidebar-account #notifyBtn.open{
    color:var(--text);
    background:var(--hover);
    border-color:color-mix(in srgb,var(--accent) 22%,var(--border));
}
.sidebar-account #themeBtn:hover .i,
.sidebar-account #notifyBtn:hover .i{color:var(--accent)}
.sidebar-footer #logoutBtn{
    margin:0;
    border-radius:8px;
    border:1px solid transparent;
    font-size:12px;
    color:var(--muted);
    background:transparent;
}
.sidebar-footer #logoutBtn:hover{
    color:var(--danger);
    background:color-mix(in srgb,var(--danger) 8%,var(--panel));
    border-color:color-mix(in srgb,var(--danger) 20%,var(--border));
}
.sidebar-footer .app-version{
    padding-top:2px;
    font-size:10px;
}

/* Icon-only sidebar: preserve access to profile and two settings. */
.sidebar.collapsed .sidebar-account{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
}
.sidebar.collapsed .sidebar-account #userMenuBtn{
    justify-content:center;
    padding:5px 0;
    min-height:38px;
}
.sidebar.collapsed .sidebar-account #userMenuName,
.sidebar.collapsed .sidebar-account #userMenuBtn .user-menu-caret{
    display:none;
}
.sidebar.collapsed .sidebar-account #themeBtn,
.sidebar.collapsed .sidebar-account #notifyBtn{
    height:28px;min-height:28px;
}
.sidebar.collapsed .sidebar-account #themeBtn .i,
.sidebar.collapsed .sidebar-account #notifyBtn .i{
    width:14px;height:14px;
}
@media(max-width:1024px){
    #computersView .section-head-right .head-search{min-width:155px}
}
@media(max-width:700px){
    #computersView .section-head{gap:10px}
    #computersView .section-head .section-title{font-size:18px}
    #computersView .computers-head-emblem{
        width:38px;height:38px;flex-basis:38px;border-radius:10px;
    }
    #computersView .computers-head-emblem .section-head-icon{
        width:20px;height:20px;
    }
    #computersView .section-head-right{
        width:100%;margin-left:0;justify-content:flex-start;
        flex-wrap:wrap;
    }
    #computersView .fleet-overview-kpis{width:100%;gap:5px}
    #computersView .fleet-kpi{
        min-height:55px;padding:8px;
        grid-template-columns:26px minmax(0,1fr);
        column-gap:6px;grid-template-rows:22px 14px;
    }
    #computersView .fleet-kpi-symbol{
        width:26px;height:29px;font-size:14px;
    }
    #computersView .fleet-kpi-value{font-size:19px}
}


/* Computers summary — heading + three metrics + search/actions in one responsive row. */
#computersView .computers-overview-row {
    display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
    gap:12px 16px; width:100%; min-width:0; padding:1px 0 11px;
}
#computersView .computers-overview-row .section-head {
    flex:1 1 260px; min-width:240px; margin:0; padding:0;
    display:flex; align-items:center;
}
#computersView .computers-overview-row .fleet-overview-kpis {
    flex:0 1 440px; width:auto; max-width:440px; min-width:340px;
    grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px;
    margin:0; padding:0;
}
#computersView .computers-overview-row .fleet-kpi {
    grid-template-columns:28px minmax(0,1fr); grid-template-rows:22px 14px;
    column-gap:7px; min-height:56px; padding:8px;
}
#computersView .computers-overview-row .fleet-kpi-symbol {
    width:28px; height:32px; font-size:14px; border-radius:8px;
}
#computersView .computers-overview-row .fleet-kpi-value {
    font-size:20px; line-height:1.05;
}
#computersView .computers-overview-row .fleet-kpi-label {
    font-size:10px; line-height:1.1;
}
#computersView .computers-overview-row .section-head-right {
    flex:0 1 auto; width:auto; min-width:0; margin-left:auto;
    padding:0; gap:7px; align-items:center; justify-content:flex-end;
}
#computersView .computers-overview-row .section-head-right .head-search{
    min-width:175px; max-width:236px;
}
@media (max-width:1280px) {
    #computersView .computers-overview-row .section-head-right{
        flex:1 1 100%; justify-content:flex-end;
    }
}
@media (max-width:750px) {
    #computersView .computers-overview-row {
        flex-direction:column; align-items:stretch; gap:9px;
    }
    #computersView .computers-overview-row .section-head{
        min-width:0; flex:0 0 auto;
    }
    #computersView .computers-overview-row .fleet-overview-kpis{
        width:100%; max-width:none; min-width:0; flex:0 0 auto; gap:5px;
    }
    #computersView .computers-overview-row .section-head-right{
        flex:0 0 auto; margin:0; justify-content:flex-start;
    }
}

/* 2026-11-11 — wide three-card KPI row; search and organization moved below. */
#computersView .computers-overview-row{
    display:flex; flex-wrap:nowrap; align-items:center;
    justify-content:space-between; gap:18px;
}
#computersView .computers-overview-row > .section-head{
    flex:0 1 430px; width:auto; min-width:310px; max-width:480px;
}
#computersView .computers-overview-row > .fleet-overview-kpis{
    flex:1 1 0; width:auto; min-width:0; max-width:none;
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px; align-self:center; justify-self:stretch;
}
#computersView .computers-overview-row .fleet-kpi{
    min-width:0; max-width:none; padding:9px 12px;
    grid-template-columns:35px minmax(0,1fr);
    grid-template-rows:24px 16px; min-height:62px;
}
#computersView .computers-overview-row .fleet-kpi-symbol{
    width:35px; height:35px; font-size:16px;
}
#computersView .computers-overview-row .fleet-kpi-value{
    font-size:22px;
}
#computersView .computers-overview-row .fleet-kpi-label{
    font-size:11px;
}
#computersView .filters .filters-commands .org-toggle-btn{
    display:inline-flex; align-items:center; gap:7px;
    font-size:12px; min-height:34px; height:34px;
    padding:0 11px;
    background:color-mix(in srgb,var(--accent) 6%,var(--panel));
    border:1px solid color-mix(in srgb,var(--accent) 18%,var(--border2));
    color:var(--text);
}
#computersView .filters .filters-commands .org-toggle-btn .i{
    color:var(--accent); width:16px; height:16px;
}
#computersView .filters .filters-commands .org-toggle-btn:hover{
    border-color:color-mix(in srgb,var(--accent) 34%,var(--border));
    background:color-mix(in srgb,var(--accent) 12%,var(--panel));
}
#computersView .filters .filters-fields .filters-search{
    flex:1 1 190px; width:auto; min-width:165px; max-width:310px;
    margin-left:auto; position:relative;
}
#computersView .filters .filters-fields .filters-search input{
    width:100%; height:34px; min-width:0; max-width:none;
    box-sizing:border-box; padding-left:31px; padding-right:29px;
    border-radius:8px; font-size:12px;
    background:color-mix(in srgb,var(--input) 74%,var(--panel));
    border:1px solid color-mix(in srgb,var(--border) 57%,transparent);
    color:var(--text);
}
#computersView .filters .filters-fields .filters-search input:focus{
    outline:2px solid color-mix(in srgb,var(--accent) 28%,transparent);
    border-color:var(--accent);
}
#computersView .filters .filters-fields #orgFilterChips{
    flex:0 1 auto; min-width:0;
}
@media(max-width:880px){
    #computersView .computers-overview-row{
        flex-wrap:wrap; align-items:stretch; gap:9px;
    }
    #computersView .computers-overview-row > .section-head{
        flex:1 1 100%; min-width:0; max-width:none;
    }
    #computersView .computers-overview-row > .fleet-overview-kpis{
        flex:1 1 100%; min-width:0; max-width:none;
        width:100%;
    }
    #computersView .filters .filters-fields .filters-search{
        flex:1 1 100%; max-width:none; margin-left:0;
    }
}

/* Variant 2 — emerald network lines behind the Computers title. */
#computersView .computers-overview-row > .section-head{
 position:relative;isolation:isolate;overflow:hidden;
 box-sizing:border-box;min-height:82px;padding:12px 15px;
 border-radius:13px;
 border:1px solid color-mix(in srgb,var(--accent) 22%,var(--border));
 background:
 radial-gradient(ellipse 70% 140% at 75% 95%,color-mix(in srgb,var(--accent) 14%,transparent),transparent 78%),
 linear-gradient(120deg,color-mix(in srgb,var(--accent) 13%,var(--card)),color-mix(in srgb,#06422d 48%,var(--card)) 63%,var(--card));
 box-shadow:inset 0 -1px 0 color-mix(in srgb,var(--accent) 12%,transparent);
}
#computersView .computers-overview-row > .section-head::before{
 content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
 background:url("/remote/auradesk-header-network.svg?v=1") right center / cover no-repeat;
 opacity:.75;
}
#computersView .computers-overview-row > .section-head::after{
 content:"";position:absolute;pointer-events:none;left:25px;right:36%;bottom:0;height:1px;
 background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--accent) 38%,transparent),transparent);
}
#computersView .computers-overview-row > .section-head > .section-head-left{
 position:relative;z-index:1;min-width:0;width:100%;
}
#computersView .computers-overview-row .computers-head-emblem{
 background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 22%,var(--card)),color-mix(in srgb,#075f38 34%,var(--card)));
 border-color:color-mix(in srgb,var(--accent) 37%,var(--border));
 box-shadow:0 0 17px color-mix(in srgb,var(--accent) 9%,transparent);
}
body.light-theme #computersView .computers-overview-row > .section-head{
 background:radial-gradient(ellipse 76% 130% at 75% 85%,rgba(45,160,86,.10),transparent 76%),linear-gradient(118deg,#f3faf5,#eaf6ee 66%,#fff);
 border-color:rgba(25,125,64,.22);box-shadow:inset 0 -1px rgba(25,125,64,.08);
}
body.light-theme #computersView .computers-overview-row > .section-head::before{opacity:.43}
@media(max-width:750px){
 #computersView .computers-overview-row > .section-head{min-height:72px;padding:10px 12px;border-radius:10px}
 #computersView .computers-overview-row > .section-head::before{opacity:.45;background-size:auto 100%}
}

/* Search clear inside the same input, regardless of filter toolbar width. */
#computersView .filters .filters-fields .filters-search{
    position:relative;display:inline-flex;align-items:center;
    box-sizing:border-box;min-width:165px;max-width:310px;
}
#computersView .filters .filters-fields .filters-search > input#searchInput{
    box-sizing:border-box;display:block;flex:1 1 auto;width:100%;
    min-width:0;padding-left:31px;padding-right:36px;
}
#computersView .filters .filters-fields .filters-search > svg.i{
    position:absolute;left:10px;top:50%;transform:translateY(-50%);
    width:15px;height:15px;pointer-events:none;
}
#computersView .filters .filters-fields .filters-search > #searchClear{
    position:absolute;top:50%;right:6px;left:auto;
    transform:translateY(-50%);
    box-sizing:border-box;width:24px;height:24px;
    padding:4px;z-index:2;
    border:0;border-radius:6px;
    background:transparent;color:var(--muted);
    cursor:pointer;align-items:center;justify-content:center;
}
#computersView .filters .filters-fields .filters-search > #searchClear:hover{
    background:var(--hover);color:var(--text);
}
#computersView .filters .filters-fields .filters-search > #searchClear:focus-visible{
    outline:2px solid var(--accent);outline-offset:1px;
}
#computersView .filters .filters-fields .filters-search > #searchClear > svg.i{
    display:block;position:static;top:auto;left:auto;right:auto;
    transform:none;width:15px;height:15px;pointer-events:none;
    color:inherit;
}

#computersView .computers-mobile-toolbar,
.computers-mobile-brand,
#computerModal .computer-modal-close { display: none; }

@media (max-width: 900px) {
    .app-content:has(#computersView.active) > .header {
        flex-direction: row;
        align-items: center;
        min-height: 52px;
        padding: 0 12px;
    }
    .app-content:has(#computersView.active) > .header .computers-mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--text);
        font-size: 18px;
        font-weight: 750;
        letter-spacing: .4px;
        text-transform: uppercase;
    }
    .app-content:has(#computersView.active) > .header .menu-toggle,
    #connTabs:not(:has(> .conn-tab ~ .conn-tab)) { display: none; }

    #computersView .computers-overview-row,
    #computersView #computerFilters { display: none; }
    #computersView .computers-mobile-toolbar {
        display: grid;
        gap: 8px;
        margin-bottom: 10px;
    }
    #computersMobileToolbar > .field {
        display: block;
        min-width: 0;
        margin: 0;
    }
    #computersMobileToolbar > .field > span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    #computersMobileToolbar #groupFilterSelect,
    #computersMobileToolbar #searchInput {
        width: 100%;
        min-width: 0;
        height: 44px;
        box-sizing: border-box;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background-color: var(--input);
        color: var(--text);
        font-size: 16px;
    }
    #computersMobileToolbar .filters-search { position: relative; display: flex; }
    #computersMobileToolbar #searchInput { padding: 0 44px 0 32px; }
    #computersMobileToolbar #searchInput:placeholder-shown { padding-right: 8px; }
    #computersMobileToolbar .filters-search > svg {
        position: absolute;
        inset-inline-start: 10px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }
    #computersMobileToolbar #searchClear {
        position: absolute;
        inset: 0 0 0 auto;
        transform: none;
        width: 44px;
        height: 44px;
    }
    #computersView .host-row {
        grid-template-columns: 8px minmax(0, 1fr) auto !important;
    }
    #computersView .host-row > .host-pick { display: flex !important; }
    #computersView .host-pick .computer-check { display: none; }
    #computersView .host-pick .status-dot { width: 8px; height: 8px; }
    #computersView .host-pick .status-dot.offline { background: var(--muted2); }
    #computersView .host-row .col-site { display: none; }
    #computersView .row-menu-btn { width: 44px; height: 44px; opacity: 1; }

    #rowMenuBackdrop:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 890;
        background: rgba(0, 0, 0, .5);
        touch-action: none;
    }
    #rowMenu {
        inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px;
        z-index: 891;
        width: auto;
        min-width: 0;
        max-height: 75vh;
        max-height: 75dvh;
        margin: 0;
        padding: 6px;
        box-sizing: border-box;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    #rowMenu button { min-height: 44px; }

    #computerModal .modal {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100dvh;
        min-width: 0;
        box-sizing: border-box;
        padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        overflow: hidden;
    }
    #computerModal .computer-modal-head {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
    }
    #computerModal .computer-modal-head h3 { margin: 0; }
    #computerModal .computer-modal-close { display: inline-flex; align-items: center; min-height: 44px; }
    #computerModal .card-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin: 0 0 10px;
        padding: 0;
    }
    #computerModal .card-tab {
        min-height: 44px;
        padding: 4px;
        margin: 0;
        border-radius: var(--radius);
        border-bottom: 1px solid transparent;
        overflow-wrap: anywhere;
    }
    #computerModal .card-tab.active { border-bottom-color: var(--border); }
    #computerModal .card-body { min-width: 0; overflow-wrap: anywhere; overscroll-behavior: contain; }
    #computerModal .card-body input:not([type=checkbox]), #computerModal .card-body select { max-width: 100%; font-size: 16px; }
    #computerModal .modal-btns { flex-wrap: wrap; margin-top: 8px; }
    #computerModal .modal-btns .btn { min-height: 44px; }
}

