
/* ==========================================================
   /ui/css/base/ljh-control-panels.css
   LJH CONTROL PANELS
   ----------------------------------------------------------
   Ansvar:
   - Kontrollpanel-struktur och wrapper
   - Dashboard-rader och statuskort
   - Tool row (filter/search/sort/CTA)
   - Huvud-tabs (browser style)
   - Sub-tabs (segmented style)
   - Panel-typografi och states
   - Toggle group och toggle chips
   ----------------------------------------------------------
   Scope: .ljh-control-panel only
   INTE: layout, globala komponenter, knappar, inputs
========================================================== */


/* ==========================================================
   1. BASE WRAPPER
========================================================== */

.ljh-control-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


/* ==========================================================
   2. DASHBOARD ROW
========================================================== */

.ljh-control-panel .ljh-dashboard-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}


/* ==========================================================
   3. DASHBOARD CARDS
========================================================== */

.ljh-control-panel .ljh-dashboard-card {
    text-decoration: none;
    color: inherit;
    min-height: 110px;
    padding: 1.6rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ljh-control-panel .ljh-dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(140,200,255,0.35),
        0 0 20px rgba(140,200,255,0.25);
}


/* ==========================================================
   4. DASHBOARD TYPOGRAPHY
========================================================== */

.ljh-control-panel .ljh-dashboard-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    transition: opacity 0.2s ease;
}

.ljh-control-panel .ljh-dashboard-label {
    font-size: 0.85rem;
    opacity: 0.85;
    letter-spacing: 0.02em;
}


/* ==========================================================
   5. DASHBOARD STATES
========================================================== */

.ljh-control-panel .ljh-dashboard-card.is-critical {
    box-shadow:
        0 0 0 1px rgba(255,80,80,0.4),
        0 0 18px rgba(255,60,60,0.35);
}

.ljh-control-panel .ljh-dashboard-card.is-critical:hover {
    box-shadow:
        0 0 0 1px rgba(255,90,90,0.6),
        0 0 28px rgba(255,60,60,0.55);
}

.ljh-control-panel .ljh-dashboard-card.is-muted          { opacity: 0.65; }
.ljh-control-panel .ljh-dashboard-card.is-muted .ljh-dashboard-value { opacity: 0.6; }
.ljh-control-panel .ljh-dashboard-card.is-muted:hover    { opacity: 0.85; }


/* ==========================================================
   6. GLASS CARD OVERRIDE
========================================================== */

.ljh-control-panel .ljh-glass-card { padding: 1.8rem; }


/* ==========================================================
   7. EMPTY STATE
========================================================== */

.ljh-control-panel .ljh-empty-state {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-top: 0.8rem;
}


/* ==========================================================
   8. TOOL ROW
========================================================== */

.ljh-control-panel .ljh-tool-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.6rem 1.8rem;
    border-radius: 20px;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.10),
        rgba(255,255,255,0.05)
    );
    backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.25),
        0 14px 30px rgba(0,0,0,0.35);
}

.ljh-control-panel .ljh-tool-left {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.ljh-control-panel .ljh-tool-right { display: flex; align-items: center; }


/* ==========================================================
   9. TOOL INPUT VISUAL INTEGRATION
========================================================== */

.ljh-control-panel .ljh-tool-row .ljh-input,
.ljh-control-panel .ljh-tool-row .ljh-select {
    min-width: 180px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
}


/* ==========================================================
   10. TOGGLE GROUP & CHIPS
   (från ljh-banner.css)
========================================================== */

.ljh-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.ljh-toggle {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: all .2s ease;
}

.ljh-toggle:hover  { color: #fff; background: rgba(255,255,255,0.12); }

.ljh-toggle.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.28);
}


/* ==========================================================
   CONTROL TABS – Scoped (inuti .ljh-control-panel)
========================================================== */

.ljh-control-panel .ljh-tabs {
    display: flex;
    gap: 1.4rem;
    align-items: center;
    margin-bottom: 1.4rem;
}

.ljh-control-panel .ljh-tab {
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    color: rgba(255,255,255,0.75);
    transition: all 0.2s ease;
}

.ljh-control-panel .ljh-tab:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
}

.ljh-control-panel .ljh-tab.is-active {
    color: #ffffff;
    background: linear-gradient(
        180deg,
        rgba(140,200,255,0.35),
        rgba(90,160,255,0.25)
    );
    border: 1px solid rgba(140,200,255,0.45);
    box-shadow:
        0 0 0 1px rgba(140,200,255,0.25),
        0 0 20px rgba(140,200,255,0.25);
}


/* ==========================================================
   MAIN TABS – Browser Style (global)
========================================================== */

.ljh-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    margin-bottom: 1.8rem;
    position: relative;
}

.ljh-tabs::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: rgba(255,255,255,0.15);
}

.ljh-tab {
    position: relative;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    padding: 0.9rem 1.6rem;
    border-radius: 14px 14px 0 0;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-bottom: none;
    transition: all 0.2s ease;
    z-index: 1;
}

.ljh-tab:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
}

.ljh-tab.is-active {
    color: #ffffff;
    background: linear-gradient(
        180deg,
        rgba(140,200,255,0.35),
        rgba(90,160,255,0.18)
    );
    border: 1px solid rgba(140,200,255,0.45);
    border-bottom: 1px solid transparent;
    box-shadow: 0 -4px 18px rgba(140,200,255,0.35);
    z-index: 3;
    transform: translateY(2px);
}

.ljh-tab:not(.is-active) {
    opacity: 0.85;
    transform: translateY(6px);
    z-index: 0;
}


/* ==========================================================
   SUBTABS – Segmented Style
========================================================== */

.notes-subtabs {
    display: flex;
    gap: 0.6rem;
    margin: 0.8rem 0 2rem 0;
    flex-wrap: wrap;
}

.notes-subtabs .ljh-tab {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    transform: none;
    z-index: 1;
}

.notes-subtabs .ljh-tab.is-active {
    background: linear-gradient(
        180deg,
        rgba(140,200,255,0.30),
        rgba(90,160,255,0.15)
    );
    border: 1px solid rgba(140,200,255,0.45);
    box-shadow: 0 0 14px rgba(140,200,255,0.25);
    color: #ffffff;
}

