﻿/* ===== CONFIGURADOR BLUEPRINT ===== */

body.cfg-page { overflow: hidden; }

/* â”€â”€ Wrapper fullscreen below navbar â”€â”€ */
.cfg-wrapper {
    position: fixed;
    top: 70px;
    left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    background: #111;
    z-index: 100;
}

/* â”€â”€ Toolbar â”€â”€ */
.cfg-toolbar {
    height: 46px;
    background: rgba(24, 24, 24, 0.98);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    gap: 0.35rem;
    flex-shrink: 0;
    z-index: 10;
}

.cfg-toolbar-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #ff7b3a;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-right: 0.5rem;
    padding-right: 0.75rem;
    border-right: 1px solid rgba(255,255,255,0.09);
    flex-shrink: 0;
}
.cfg-toolbar-brand i { font-size: 0.9rem; }

.cfg-toolbar-btn {
    text-decoration: none;   /* la barra tiene botones y enlaces; se ven igual */
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: none;
    border-radius: 0;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.cfg-toolbar-btn:hover {
    background: transparent;
    color: #fff;
}
.cfg-toolbar-btn.accent { color: #ff9560; }
.cfg-toolbar-btn.accent:hover { color: #ffb088; }
.cfg-toolbar-btn.danger { color: #e87070; }
.cfg-toolbar-btn.danger:hover { color: #ff9999; }
.cfg-toolbar-btn.danger.active { color: #ffaaaa; }
.cfg-toolbar-btn i { font-size: 0.7rem; }
.cfg-toolbar-btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.cfg-toolbar-btn-disabled:hover { color: inherit; }

.cfg-toolbar-sep {
    color: rgba(255,255,255,0.15);
    font-size: 0.85rem;
    line-height: 1;
    margin: 0 0.05rem;
    flex-shrink: 0;
    user-select: none;
}
.cfg-toolbar-sep::after { content: '|'; }

.cfg-toolbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.2);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
}
.cfg-toolbar-hint { display: flex; align-items: center; gap: 0.35rem; }
.cfg-toolbar-hint i { font-size: 0.65rem; }

.cfg-status {
    position: absolute;
    bottom: 22px;
    left: 22px;
    z-index: 200;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: 440px;
    line-height: 1.45;
    box-shadow: 0 6px 24px rgba(0,0,0,0.7);
    letter-spacing: 0.01em;
}
.cfg-status:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}
.cfg-status--ok   { background: #0d2e1a; color: #4dff8e; border: 1.5px solid #2aaa55; }
.cfg-status--warn { background: #2e2000; color: #ffe040; border: 1.5px solid #cc9900; }
.cfg-status--err  { background: #2e0d0d; color: #ff6b6b; border: 1.5px solid #cc2222; }


/* â”€â”€ Body â”€â”€ */
.cfg-body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* â”€â”€ Sidebar â”€â”€ */
.cfg-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: rgba(24, 24, 24, 0.98);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
    transition: width 0.2s ease;
}
.cfg-sidebar::-webkit-scrollbar { width: 3px; }
.cfg-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Sidebar collapse header */
.cfg-sidebar-header {
    display: flex;
    justify-content: flex-end;
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.cfg-sidebar-toggle {
    width: 26px; height: 26px;
    border: none;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.cfg-sidebar-toggle i { transition: transform 0.2s ease; }
.cfg-sidebar-toggle:hover { background: rgba(255,123,58,0.15); color: #ff7b3a; }

/* Collapsed state */
.cfg-sidebar.collapsed { width: 52px; }
.cfg-sidebar.collapsed .cfg-sidebar-toggle i { transform: rotate(180deg); }
.cfg-sidebar.collapsed .cfg-sidebar-header { justify-content: center; padding: 0.35rem 0; }
.cfg-sidebar.collapsed .cfg-component-item { justify-content: center; padding: 0.42rem 0; gap: 0; }
.cfg-sidebar.collapsed .cfg-component-item .cfg-item-label { display: none; }
.cfg-sidebar.collapsed .cfg-sidebar-group-label { display: none; }

.cfg-sidebar-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.cfg-sidebar-search i { color: rgba(255,255,255,0.25); font-size: 0.7rem; flex-shrink: 0; }
.cfg-sidebar-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: rgba(255,255,255,0.75);
    font-size: 0.78rem;
    font-family: inherit;
}
.cfg-sidebar-search input::placeholder { color: rgba(255,255,255,0.2); }

/* â”€â”€ Lista plana de componentes â”€â”€ */
.cfg-sidebar-list { padding: 0.4rem; }

.cfg-component-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.55rem;
    border-radius: 7px;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    border: 1px solid transparent;
    transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.1s;
    user-select: none;
}
.cfg-component-item:hover {
    background: rgba(255,123,58,0.08);
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,123,58,0.2);
}
.cfg-component-item:active { transform: scale(0.96); }
.cfg-component-item { cursor: grab; }
.cfg-component-item.cfg-item-dragging { opacity: 0.45; transform: scale(0.95); }

.cfg-canvas-drop-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px dashed rgba(255,123,58,0.55);
    border-radius: 4px;
    background: rgba(255,123,58,0.04);
    pointer-events: none;
    z-index: 2;
    animation: cfg-drop-pulse 0.7s ease-in-out infinite alternate;
}
@keyframes cfg-drop-pulse {
    from { border-color: rgba(255,123,58,0.35); background: rgba(255,123,58,0.02); }
    to   { border-color: rgba(255,123,58,0.7);  background: rgba(255,123,58,0.06); }
}

.cfg-item-ico {
    width: 24px; height: 24px;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
    background: rgba(255,123,58,0.1);
    color: #ff7b3a;
}

.cfg-item-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.cfg-item-code {
    font-family: 'Courier New', monospace;
    font-size: 0.57rem;
    color: #ff7b3a;
    opacity: 0.65;
    letter-spacing: 0.04em;
    font-weight: 600;
    line-height: 1;
}
.cfg-item-name {
    font-size: 0.78rem;
    line-height: 1.2;
}
body.light-theme .cfg-item-code { color: #c95000; opacity: 0.8; }

/* â”€â”€ Sidebar group labels â”€â”€ */
.cfg-sidebar-group-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,123,58,0.55);
    padding: 0.55rem 0.7rem 0.2rem 0.85rem;
    margin-top: 0.1rem;
    border-left: 2px solid rgba(255, 107, 53, 0.4);
}

/* â”€â”€ Sidebar tips â”€â”€ */
.cfg-sidebar-tips {
    padding: 0.65rem 0.7rem 0.8rem;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.cfg-sidebar-tips p {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.2);
    margin: 0.28rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    line-height: 1.4;
}
.cfg-sidebar-tips i { color: rgba(255,123,58,0.4); margin-top: 1px; flex-shrink: 0; }

/* ── Empty canvas state ── */
.cfg-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
    animation: cfg-es-fadein 0.5s ease both;
}
@keyframes cfg-es-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cfg-empty-state.cfg-es-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    animation: none !important;
}
.cfg-empty-state.cfg-es-hidden * {
    pointer-events: none !important;
}
.cfg-es-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
    pointer-events: auto;
}
.cfg-es-icon {
    font-size: 2.8rem;
    color: rgba(255,255,255,0.06);
    margin-bottom: 0.3rem;
    animation: cfg-es-pulse 3s ease-in-out infinite;
}
@keyframes cfg-es-pulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1;   }
}
.cfg-es-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.02em;
}
.cfg-es-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.13);
    max-width: 280px;
    line-height: 1.6;
}
.cfg-es-chips {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.4rem;
}
.cfg-es-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.85rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    color: rgba(255,255,255,0.4);
    font-size: 0.76rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
}
.cfg-es-chip:hover {
    background: rgba(255,123,58,0.1);
    border-color: rgba(255,123,58,0.32);
    color: rgba(255,255,255,0.8);
    transform: translateY(-1px);
}
.cfg-es-chip i {
    color: #ff7b3a;
    font-size: 0.68rem;
}
.cfg-es-hint {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.12);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cfg-es-hint kbd {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-family: inherit;
    color: rgba(255,255,255,0.3);
}
body.light-theme .cfg-es-title { color: rgba(0,0,0,0.2); }
body.light-theme .cfg-es-sub   { color: rgba(0,0,0,0.15); }
body.light-theme .cfg-es-icon  { color: rgba(0,0,0,0.06); }
body.light-theme .cfg-es-hint  { color: rgba(0,0,0,0.15); }
body.light-theme .cfg-es-chip  { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.09); color: rgba(0,0,0,0.4); }
body.light-theme .cfg-es-chip:hover { background: rgba(255,123,58,0.08); border-color: rgba(255,123,58,0.25); color: rgba(0,0,0,0.7); }
body.light-theme .cfg-es-hint kbd { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.3); }

/* ── Canvas area ── */
.cfg-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #313131;
    background-image: radial-gradient(circle, rgba(255,255,255,0.171) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
}
body.light-theme .cfg-canvas-wrap {
    background-color: #ebebeb;
    background-image: radial-gradient(circle, rgba(0,0,0,0.15) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
}

#cfg-canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: #313131;
}
body.light-theme #cfg-canvas { background-color: #ebebeb; }

/* â”€â”€ Litegraph overrides â”€â”€ */
.litegraph.litecontextmenu {
    background: rgba(18,18,28,0.97) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
    font-family: inherit !important;
}
.litegraph.litecontextmenu .litemenu-entry {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 1rem !important;
    border-radius: 6px !important;
    margin: 0.1rem 0.3rem !important;
}
.litegraph.litecontextmenu .litemenu-entry:hover {
    background: rgba(255,123,58,0.12) !important;
    color: #fff !important;
}
.litegraph.litecontextmenu .litemenu-entry.separator {
    background: rgba(255,255,255,0.07) !important;
    height: 1px !important;
    margin: 0.25rem 0.5rem !important;
}

/* â”€â”€ Build Summary Modal â”€â”€ */
.cfg-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.cfg-modal.open {
    display: flex;
    animation: cfg-backdrop-in 0.28s ease both;
}
.cfg-modal.cfg-modal-closing {
    display: flex;
    animation: cfg-backdrop-out 0.22s ease forwards;
    pointer-events: none;
}
.cfg-modal.cfg-modal-closing .cfg-modal-box {
    animation: cfg-modal-out 0.22s ease forwards;
}
@keyframes cfg-backdrop-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes cfg-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes cfg-modal-out {
    from { opacity: 1; transform: translateY(0)   scale(1);    }
    to   { opacity: 0; transform: translateY(10px) scale(0.97); }
}

.cfg-modal-box {
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 2px solid #ff7b3a;
    border-radius: 16px;
    padding: 1.75rem;
    min-width: 400px;
    max-width: 700px;
    width: 92%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: cfg-modal-in 0.2s ease;
}
@keyframes cfg-modal-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cfg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.cfg-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cfg-modal-title i { color: #ff7b3a; }
.cfg-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
}
.cfg-modal-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

.cfg-summary-empty {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}
.cfg-summary-empty i { display: block; font-size: 2rem; margin-bottom: 0.75rem; color: rgba(255,123,58,0.3); }

/* â”€â”€ Summary content â”€â”€ */
#summary-content { max-height: 68vh; overflow-y: auto; padding-right: 2px; }
#summary-content::-webkit-scrollbar { width: 4px; }
#summary-content::-webkit-scrollbar-track { background: transparent; }
#summary-content::-webkit-scrollbar-thumb { background: rgba(255,123,58,0.25); border-radius: 99px; }

.cfg-sum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cfg-sum-header-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.cfg-sum-completeness {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
}
.cfg-sum-completeness.full  { background: rgba(45,200,100,0.15); color: #4dff8e; }
.cfg-sum-completeness.part  { background: rgba(255,123,58,0.15); color: #ff7b3a; }
.cfg-sum-completeness.empty { background: rgba(255,107,107,0.15); color: #ff6b6b; }

.cfg-sum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.cfg-sum-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    transition: border-color 0.15s;
}
.cfg-sum-card:hover { border-color: rgba(255,123,58,0.2); }
.cfg-sum-card.missing {
    opacity: 0.38;
    border-style: dashed;
    border-color: rgba(255,255,255,0.1);
}
.cfg-sum-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    gap: 0.4rem;
}
.cfg-sum-type {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,123,58,0.65);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cfg-sum-badge {
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 99px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cfg-sum-badge.ok  { background: rgba(45,200,100,0.15); color: #4dff8e; }
.cfg-sum-badge.err { background: rgba(200,40,40,0.15);  color: #ff6b6b; }
.cfg-sum-badge.neu { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.35); }
.cfg-sum-model {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cfg-sum-specs { display: flex; flex-direction: column; gap: 0.12rem; }
.cfg-sum-spec {
    font-size: 0.66rem;
    color: rgba(255,255,255,0.45);
    display: flex;
    gap: 0.4rem;
}
.cfg-sum-spec-lbl {
    color: rgba(255,255,255,0.22);
    min-width: 58px;
    flex-shrink: 0;
}

/* light theme overrides */
body.light-theme #summary-content::-webkit-scrollbar-thumb { background: rgba(180,80,0,0.2); }
body.light-theme .cfg-sum-header { border-bottom-color: rgba(0,0,0,0.07); }
body.light-theme .cfg-sum-header-label { color: rgba(0,0,0,0.35); }
body.light-theme .cfg-sum-completeness.full  { background: rgba(10,120,60,0.1);  color: #0a7a38; }
body.light-theme .cfg-sum-completeness.part  { background: rgba(180,70,0,0.1);   color: #b84500; }
body.light-theme .cfg-sum-completeness.empty { background: rgba(180,20,20,0.1);  color: #b81a1a; }
body.light-theme .cfg-sum-card { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-sum-card:hover { border-color: rgba(180,80,0,0.2); }
body.light-theme .cfg-sum-card.missing { border-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-sum-type { color: rgba(180,80,0,0.65); }
body.light-theme .cfg-sum-badge.ok  { background: rgba(10,120,60,0.1);  color: #0a7a38; }
body.light-theme .cfg-sum-badge.err { background: rgba(180,20,20,0.1);  color: #b81a1a; }
body.light-theme .cfg-sum-badge.neu { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.3); }
body.light-theme .cfg-sum-model { color: #111; }
body.light-theme .cfg-sum-spec { color: rgba(0,0,0,0.5); }
body.light-theme .cfg-sum-spec-lbl { color: rgba(0,0,0,0.25); }

/* â”€â”€ Summary: incompatible card tint â”€â”€ */
.cfg-sum-card.has-err {
    border-color: rgba(200,40,40,0.3);
    background: rgba(200,40,40,0.04);
}
.cfg-sum-card.has-err:hover { border-color: rgba(200,40,40,0.5); }

/* â”€â”€ Summary: issues banner â”€â”€ */
.cfg-sum-issues-banner {
    margin-bottom: 1rem;
    background: rgba(200,40,40,0.08);
    border: 1px solid rgba(200,40,40,0.25);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
}
.cfg-sum-ib-head {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cfg-sum-ib-list {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.cfg-sum-ib-list li {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}
.cfg-sum-ib-list li strong { color: rgba(255,255,255,0.75); }

/* â”€â”€ Summary: all-ok banner â”€â”€ */
.cfg-sum-ok-banner {
    margin-bottom: 1rem;
    background: rgba(45,200,100,0.08);
    border: 1px solid rgba(45,200,100,0.2);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4dff8e;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* â”€â”€ Summary: expandable reason â”€â”€ */
.cfg-sum-reason-toggle {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ff6b6b;
    background: rgba(200,40,40,0.1);
    border: 1px solid rgba(200,40,40,0.2);
    border-radius: 5px;
    padding: 0.28rem 0.6rem;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    justify-content: center;
}
.cfg-sum-reason-toggle:hover { background: rgba(200,40,40,0.18); }
.cfg-sum-reason-toggle.open  { background: rgba(200,40,40,0.08); }

.cfg-sum-reason {
    display: none;
    margin-top: 0.5rem;
    padding: 0.6rem 0.7rem;
    background: rgba(200,40,40,0.07);
    border-left: 2px solid rgba(200,40,40,0.4);
    border-radius: 0 6px 6px 0;
    display: none;
    flex-direction: column;
    gap: 0.3rem;
}
.cfg-sum-reason.open { display: flex; }

.cfg-sum-reason-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ff6b6b;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.35;
}
.cfg-sum-reason-detail {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.35;
}
.cfg-sum-reason-detail i { color: rgba(255,255,255,0.3); margin-top: 1px; }
.cfg-sum-reason-tip {
    font-size: 0.7rem;
    color: rgba(255,193,7,0.8);
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.35;
    margin-top: 0.1rem;
}
.cfg-sum-reason-tip i { color: rgba(255,193,7,0.6); margin-top: 1px; }

/* light theme overrides for new elements */
body.light-theme .cfg-sum-card.has-err { background: rgba(180,20,20,0.04); border-color: rgba(180,20,20,0.25); }
body.light-theme .cfg-sum-issues-banner { background: rgba(180,20,20,0.06); border-color: rgba(180,20,20,0.2); }
body.light-theme .cfg-sum-ib-head { color: #b81a1a; }
body.light-theme .cfg-sum-ib-list li { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-sum-ib-list li strong { color: rgba(0,0,0,0.75); }
body.light-theme .cfg-sum-ok-banner { background: rgba(10,120,60,0.07); border-color: rgba(10,120,60,0.18); color: #0a7a38; }
body.light-theme .cfg-sum-reason-toggle { color: #b81a1a; background: rgba(180,20,20,0.07); border-color: rgba(180,20,20,0.18); }
body.light-theme .cfg-sum-reason-toggle:hover { background: rgba(180,20,20,0.13); }
body.light-theme .cfg-sum-reason { background: rgba(180,20,20,0.05); border-left-color: rgba(180,20,20,0.35); }
body.light-theme .cfg-sum-reason-title { color: #b81a1a; }
body.light-theme .cfg-sum-reason-detail { color: rgba(0,0,0,0.5); }
body.light-theme .cfg-sum-reason-tip { color: rgba(150,100,0,0.85); }

/* â”€â”€ Light theme â”€â”€ */
body.light-theme .cfg-wrapper { background: #f0f0f8; }
body.light-theme .cfg-toolbar {
    background: rgba(250,250,255,0.98);
    border-bottom-color: rgba(0,0,0,0.09);
}
body.light-theme .cfg-toolbar-brand { color: #e86020; border-right-color: rgba(0,0,0,0.1); }
body.light-theme .cfg-toolbar-btn { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-toolbar-btn:hover { color: #000; }
body.light-theme .cfg-toolbar-sep { color: rgba(0,0,0,0.18); }
body.light-theme .cfg-toolbar-right { color: rgba(0,0,0,0.25); }
body.light-theme .cfg-sidebar {
    background: rgba(248,248,254,0.98);
    border-right-color: rgba(0,0,0,0.08);
}
body.light-theme .cfg-sidebar-header { border-bottom-color: rgba(0,0,0,0.07); }
body.light-theme .cfg-sidebar-toggle { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.35); }
body.light-theme .cfg-sidebar-toggle:hover { background: rgba(255,123,58,0.12); color: #c95000; }
body.light-theme .cfg-category-header { color: rgba(0,0,0,0.4); }
body.light-theme .cfg-category-header:hover { color: rgba(0,0,0,0.75); }
body.light-theme .cfg-component-item { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-component-item:hover { color: rgba(0,0,0,0.9); }
body.light-theme .cfg-sidebar-search input { color: rgba(0,0,0,0.75); }
body.light-theme .cfg-sidebar-tips p { color: rgba(0,0,0,0.3); }
body.light-theme .cfg-modal-box { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-modal-title { color: #111; }
body.light-theme .cfg-modal-close { color: rgba(0,0,0,0.35); }
body.light-theme .cfg-modal-close:hover { color: #111; background: rgba(0,0,0,0.06); }
body.light-theme .cfg-sidebar-group-label { color: rgba(180,80,0,0.6); border-left-color: rgba(180,80,0,0.35); }

/* â”€â”€ Component picker modal â”€â”€ */
#cfg-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 4999;
    animation: cfg-fade-in 0.15s ease;
}
@keyframes cfg-fade-in { from { opacity: 0; } to { opacity: 1; } }

#cfg-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5000;
    width: min(760px, 95vw);
    max-height: min(76vh, 640px);
    background: rgb(18,18,18);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cfg-picker-in 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes cfg-picker-in {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.cfg-picker-hdr {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.cfg-picker-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ff7b3a;
    flex-shrink: 0;
}
.cfg-picker-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    padding: 0.3rem 0.6rem;
}
.cfg-picker-search-wrap i { color: rgba(255,255,255,0.22); font-size: 0.65rem; flex-shrink: 0; }
#cfg-picker-search {
    flex: 1; background: none; border: none; outline: none;
    color: rgba(255,255,255,0.85); font-size: 0.82rem; font-family: inherit;
}
#cfg-picker-search::placeholder { color: rgba(255,255,255,0.2); }
#cfg-picker-compare {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,123,58,0.1); border: 1px solid rgba(255,123,58,0.3);
    border-radius: 6px; color: #ff7b3a; font-size: 0.75rem;
    padding: 0.28rem 0.5rem; text-decoration: none; flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
#cfg-picker-compare:hover { background: rgba(255,123,58,0.22); border-color: rgba(255,123,58,0.55); }
#cfg-picker-close {
    background: none; border: none; color: rgba(255,255,255,0.3);
    font-size: 0.9rem; cursor: pointer; padding: 0.2rem 0.35rem;
    border-radius: 5px; flex-shrink: 0; transition: color 0.15s, background 0.15s;
}
#cfg-picker-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
#cfg-picker-list {
    overflow-y: auto; flex: 1; padding: 0.3rem 0;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#cfg-picker-list::-webkit-scrollbar { width: 4px; }
#cfg-picker-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.cfg-picker-item {
    padding: 0.5rem 1rem; color: rgba(255,255,255,0.6); font-size: 0.8rem;
    cursor: pointer; transition: background 0.1s, color 0.1s; user-select: none;
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.cfg-picker-item:hover    { background: rgba(255,123,58,0.1); color: rgba(255,255,255,0.95); }
.cfg-picker-item.selected { background: rgba(255,123,58,0.1); color: #ff9560; font-weight: 600; }
.cfg-pi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-pi-cmp-btn {
    display: none; flex-shrink: 0;
    background: rgba(255,123,58,0.18); border: 1px solid rgba(255,123,58,0.45);
    color: #ff7b3a; border-radius: 4px; padding: 2px 7px; font-size: 0.7rem;
    cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap;
    line-height: 1.4;
}
.cfg-pi-cmp-btn:hover { background: rgba(255,123,58,0.38); color: #fff; }
.cfg-picker-item:hover .cfg-pi-cmp-btn { display: inline-flex; align-items: center; gap: 4px; }
.cfg-pi-empty { padding: 2.5rem; text-align: center; color: rgba(255,255,255,0.22); font-size: 0.82rem; }

/* ── Aviso de lista filtrada por la placa ──
   Va pegado arriba de la lista y no se va con el scroll: el usuario tiene que
   poder ver en todo momento por que faltan modelos, y como recuperarlos. */
.cfg-pi-compat {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
    padding: 0.45rem 1rem;
    /* El margen negativo se come el padding superior de la lista: si no, los
       modelos asoman por ese hueco al desplazarse. */
    margin: -0.3rem 0 0.3rem;
    /* OJO: opaco a proposito. Con un fondo translucido, la lista se ve por
       detras al hacer scroll y el aviso queda ilegible. Este color es el
       naranja al 10% ya mezclado sobre el rgb(18,18,18) del panel, asi que se
       ve igual que antes pero sin transparentarse. */
    background: rgb(42,29,22);
    border-bottom: 1px solid rgba(255,123,58,0.28);
    color: rgba(255,255,255,0.7); font-size: 0.72rem; line-height: 1.35;
}
/* Sin filtrar es un estado informativo, no una advertencia: se apaga el naranja */
.cfg-pi-compat.off {
    background: rgb(28,28,28);
    border-bottom-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.45);
}
.cfg-pi-compat-btn {
    flex-shrink: 0; cursor: pointer; white-space: nowrap;
    background: rgba(255,123,58,0.18); border: 1px solid rgba(255,123,58,0.45);
    color: #ff7b3a; border-radius: 4px; padding: 2px 8px; font-size: 0.7rem;
    line-height: 1.4; transition: background 0.15s, color 0.15s;
}
.cfg-pi-compat-btn:hover { background: rgba(255,123,58,0.32); color: #ffb07a; }

/* Lo mismo en el modo lista, con la caja redondeada que usa ese modal */
.ls-picker-compat {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 14px; margin-bottom: 10px; border-radius: 10px;
    background: rgba(255,107,53,0.08);
    border: 1px solid rgba(255,107,53,0.28);
    color: rgba(255,255,255,0.68); font-size: 0.76rem; line-height: 1.4;
}
.ls-picker-compat.off {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.45);
}
.ls-picker-compat-btn {
    flex-shrink: 0; cursor: pointer; white-space: nowrap;
    background: rgba(255,107,53,0.18); border: 1px solid rgba(255,107,53,0.45);
    color: #ff6b35; border-radius: 6px; padding: 3px 10px; font-size: 0.72rem;
    transition: background 0.15s, color 0.15s;
}
.ls-picker-compat-btn:hover { background: rgba(255,107,53,0.32); color: #ff9a70; }
body.light-theme .ls-picker-compat { color: rgba(0,0,0,0.65); }
body.light-theme .ls-picker-compat.off { color: rgba(0,0,0,0.45); }

/* ── Compare tray ── */
.cfg-cmp-tray {
    position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 9999;
    background: #1c1c1c; border: 1px solid rgba(255,123,58,0.35);
    border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.55);
    width: 260px; display: flex; flex-direction: column; gap: 0;
    overflow: hidden;
}
.cfg-cmp-tray-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0.85rem; background: rgba(255,123,58,0.1);
    border-bottom: 1px solid rgba(255,123,58,0.2);
    font-size: 0.78rem; font-weight: 600; color: #ff7b3a; letter-spacing: 0.04em;
}
.cfg-cmp-tray-hdr button {
    background: none; border: none; color: rgba(255,255,255,0.4);
    cursor: pointer; font-size: 0.8rem; padding: 2px 4px; line-height: 1;
}
.cfg-cmp-tray-hdr button:hover { color: #fff; }
.cfg-cmp-tray-items { display: flex; flex-direction: column; padding: 0.5rem 0; min-height: 40px; }
.cfg-cmp-tray-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.85rem; font-size: 0.75rem; color: rgba(255,255,255,0.8);
}
.cfg-cmp-tray-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-cmp-tray-item button {
    background: none; border: none; color: rgba(255,255,255,0.3);
    cursor: pointer; font-size: 0.7rem; padding: 1px 3px; flex-shrink: 0; line-height: 1;
}
.cfg-cmp-tray-item button:hover { color: #ff5a5a; }
.cfg-cmp-tray-empty { padding: 0.6rem 0.85rem; font-size: 0.73rem; color: rgba(255,255,255,0.25); font-style: italic; }
.cfg-cmp-tray-go {
    margin: 0.5rem 0.85rem 0.75rem;
    background: #ff7b3a; border: none; color: #fff;
    border-radius: 6px; padding: 0.45rem 0.75rem;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s; display: flex; align-items: center; gap: 0.4rem; justify-content: center;
}
.cfg-cmp-tray-go:hover:not(:disabled) { background: #ff5a1a; }
.cfg-cmp-tray-go:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Picker two-column layout ── */
.cfg-picker-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── Sidebar de filtros ── */
#cfg-picker-sidebar {
    width: 168px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.28);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.07) transparent;
    padding-bottom: 0.5rem;
}
#cfg-picker-sidebar::-webkit-scrollbar { width: 3px; }
#cfg-picker-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 2px; }
#cfg-picker-sidebar:empty,
#cfg-picker-sidebar.cfg-pfb-empty { display: none; }

.cfg-pfg {
    border-top: 1px solid rgba(255,255,255,0.055);
}
.cfg-pfg:first-child { border-top: none; }

/* ─ Header del grupo (clickable accordion) ─ */
.cfg-pfg-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.52rem 0.65rem 0.52rem 0.82rem;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    gap: 0.4rem;
}
.cfg-pfg-hdr:hover { background: rgba(255,255,255,0.025); }
.cfg-pfg-hdr > span {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    font-family: 'Courier New', Courier, monospace;
    white-space: nowrap;
    flex: 1;
    transition: color 0.12s;
}
.cfg-pfg-hdr.has-active > span { color: rgba(255,150,96,0.75); }

/* Flecha ► / ▼ con CSS puro */
.cfg-pfg-hdr::after {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid rgba(255,255,255,0.2);
    border-bottom: 1.5px solid rgba(255,255,255,0.2);
    transform: rotate(-45deg) translateY(1px);
    transition: transform 0.15s ease, border-color 0.12s;
    flex-shrink: 0;
    margin-right: 2px;
}
.cfg-pfg.open .cfg-pfg-hdr::after {
    transform: rotate(45deg) translateX(-1px);
    border-color: rgba(255,123,58,0.5);
}

/* ─ Lista de opciones colapsable ─ */
.cfg-pfg-chips {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.cfg-pfg.open .cfg-pfg-chips {
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.07) transparent;
}
.cfg-pfg.open .cfg-pfg-chips::-webkit-scrollbar { width: 3px; }
.cfg-pfg.open .cfg-pfg-chips::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 2px; }

/* ─ Cada opción ─ */
.cfg-pfc {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 30px;
    height: 30px;
    padding: 0 10px 0 13px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.36);
    font-size: 13px;
    line-height: 1;
    font-family: 'Courier New', Courier, monospace;
    text-align: left;
    transition: color 0.1s, background 0.1s;
    user-select: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    flex-shrink: 0;
}
.cfg-pfc::before {
    content: '';
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 1px;
    transition: background 0.1s, border-color 0.1s;
}
.cfg-pfc:hover { color: rgba(255,255,255,0.72); background: rgba(255,255,255,0.03); }
.cfg-pfc:hover::before { border-color: rgba(255,123,58,0.55); }
.cfg-pfc.active { color: #ff9560; }
.cfg-pfc.active::before { background: #ff7b3a; border-color: #ff7b3a; box-shadow: 0 0 4px rgba(255,123,58,0.45); }

/* ─ Árbol de filtros ─ */
.cfg-pfg-tree-node { position: relative; }

.cfg-pfg-tree-hdr {
    display: flex;
    align-items: center;
    width: 100%;
    height: 26px;
    padding: 0 8px 0 13px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,123,58,0.55);
    text-align: left;
    user-select: none;
    transition: color 0.12s;
    gap: 6px;
}
.cfg-pfg-tree-hdr:hover { color: rgba(255,123,58,0.85); }

/* Flecha ► / ▼ */
.cfg-pfg-tree-hdr::after {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid rgba(255,123,58,0.4);
    border-bottom: 1.5px solid rgba(255,123,58,0.4);
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.15s;
    flex-shrink: 0;
    margin-left: auto;
}
.cfg-pfg-tree-node:not(.open) .cfg-pfg-tree-hdr::after {
    transform: rotate(-45deg) translateX(-1px);
}

/* Contenedor de ítems del nodo del árbol */
.cfg-pfg-tree-items {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 10px;
    overflow: hidden;
    max-height: 600px;
    transition: max-height 0.2s ease;
}
.cfg-pfg-tree-node:not(.open) .cfg-pfg-tree-items {
    max-height: 0;
}

/* Línea vertical del árbol */
.cfg-pfg-tree-items::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 4px;
    bottom: 14px;
    width: 1px;
    background: rgba(255,123,58,0.2);
    pointer-events: none;
}

/* Ítems dentro del árbol: línea horizontal conectora */
.cfg-pfg-tree-items .cfg-pfc {
    padding-left: 26px;
    position: relative;
}
.cfg-pfg-tree-items .cfg-pfc::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: rgba(255,123,58,0.2);
}
.cfg-pfg-tree-items .cfg-pfc:hover::after { background: rgba(255,123,58,0.45); }
.cfg-pfg-tree-items .cfg-pfc.active::after { background: rgba(255,123,58,0.7); }

/* reset button al fondo del sidebar */
#cfg-sidebar-reset {
    display: none;
    width: calc(100% - 1.45rem);
    margin: 0.6rem 0.7rem 0 0.75rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 3px;
    color: rgba(255,255,255,0.28);
    font-size: 0.59rem;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
    text-align: center;
}
#cfg-sidebar-reset:hover { color: rgba(255,255,255,0.65); border-color: rgba(255,255,255,0.22); }
#cfg-sidebar-reset.visible { display: block; }

/* â”€â”€ Error tooltip â”€â”€ */
#cfg-err-tooltip {
    position: fixed;
    display: none;
    z-index: 6100;
    max-width: 260px;
    padding: 10px 14px;
    border-radius: 9px;
    background: rgba(22, 6, 6, 0.97);
    border: 1px solid rgba(200, 60, 60, 0.45);
    box-shadow: 0 6px 24px rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    pointer-events: none;
    font-size: 11.5px;
    line-height: 1.55;
    color: rgba(255, 175, 175, 0.92);
}
#cfg-err-tooltip strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #ff6b6b;
}

/* â”€â”€ Power indicator â”€â”€ */
.cfg-power {
    position: absolute;
    top: 12px;
    left: 12px;
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    z-index: 150;
    box-shadow: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    pointer-events: none;
}
.cfg-power i {
    color: #ff7b3a;
    font-size: 0.78rem;
    filter: drop-shadow(0 0 4px rgba(255,123,58,0.6));
}
.cfg-power-label {
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    margin-left: 0.1rem;
}
#cfg-power-val { letter-spacing: 0.02em; }
.cfg-power.ok   { border-color: transparent; box-shadow: none; }
.cfg-power.warn { border-color: transparent;  box-shadow: none; }
.cfg-power.over { border-color: transparent; box-shadow: none; }
.cfg-power.ok   #cfg-power-val { color: #4dff8e; }
.cfg-power.warn #cfg-power-val { color: #ffe040; }
.cfg-power.over #cfg-power-val { color: #ff6b6b; }
body.light-theme .cfg-power { background: transparent; border-color: transparent; box-shadow: none; color: #111; }
body.light-theme .cfg-power i { color: #c95000; filter: none; }
body.light-theme .cfg-power-label { color: rgba(0,0,0,0.35); }
body.light-theme .cfg-power.ok   { border-color: transparent;  }
body.light-theme .cfg-power.ok   #cfg-power-val { color: #0a7a38; }
body.light-theme .cfg-power.warn { border-color: transparent; }
body.light-theme .cfg-power.warn #cfg-power-val { color: #7a5a00; }
body.light-theme .cfg-power.over { border-color: transparent; }
body.light-theme .cfg-power.over #cfg-power-val { color: #b81a1a; }

/* ── Cuello de botella — panel flotante (modo nodo) ────────────────────────
   Se ancla abajo a la derecha del lienzo (position:absolute, como la checklist)
   para no quedar atrapado en el flujo de la barra lateral. Lo muestra/oculta
   configurador.js según haya CPU y GPU seleccionadas. */
#cfg-bottleneck {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 150;
    width: 250px;
    background: rgb(18,18,18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 15px 15px;
    box-shadow: 0 8px 36px rgba(0,0,0,0.8);
}
body.light-theme #cfg-bottleneck {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 10px 32px rgba(0,0,0,0.13);
}

/* â”€â”€ Onboarding overlay â”€â”€ */
.cfg-onboarding {
    position: fixed; inset: 0;
    z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.cfg-onboarding.active { opacity: 1; pointer-events: auto; }
.cfg-ob-box {
    background: #0d0d0d;
    border: 1px solid rgba(255,123,58,0.25);
    border-top: 2px solid #ff7b3a;
    border-radius: 18px;
    padding: 2rem;
    width: min(480px, 92vw);
    box-shadow: 0 32px 80px rgba(0,0,0,0.7);
    animation: cfg-modal-in 0.25s ease;
}
.cfg-ob-header {
    font-size: 0.9rem; font-weight: 700; color: #ff7b3a;
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 1.5rem; text-align: center;
}
.cfg-ob-steps { position: relative; min-height: 160px; }
.cfg-ob-step { display: none; text-align: center; animation: cfg-modal-in 0.2s ease; }
.cfg-ob-step.active { display: block; }
.cfg-ob-step-ico {
    font-size: 2.8rem; color: rgba(255,123,58,0.8);
    margin-bottom: 0.75rem;
}
.cfg-ob-step-n {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: rgba(255,123,58,0.5);
    margin-bottom: 0.35rem;
}
.cfg-ob-step-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.cfg-ob-step-desc  { font-size: 0.82rem; color: rgba(255,255,255,0.55); line-height: 1.6; }
.cfg-ob-step-desc strong { color: rgba(255,123,58,0.85); }
.cfg-ob-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 1.75rem; gap: 1rem;
}
.cfg-ob-skip {
    background: none; border: none; color: rgba(255,255,255,0.3);
    font-size: 0.75rem; cursor: pointer; padding: 0.35rem 0.5rem;
    border-radius: 6px; transition: color 0.15s; font-family: inherit;
}
.cfg-ob-skip:hover { color: rgba(255,255,255,0.6); }
.cfg-ob-next {
    background: rgba(255,123,58,0.15); border: 1px solid rgba(255,123,58,0.35);
    color: #ff9560; font-size: 0.82rem; font-weight: 600; cursor: pointer;
    padding: 0.5rem 1.1rem; border-radius: 8px; transition: background 0.15s;
    font-family: inherit;
}
.cfg-ob-next:hover { background: rgba(255,123,58,0.25); }
.cfg-ob-dots { display: flex; gap: 6px; }
.cfg-ob-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.15); transition: background 0.2s;
}
.cfg-ob-dot.active { background: #ff7b3a; }
body.light-theme .cfg-ob-box { background: #fff; border-color: rgba(200,80,0,0.25); }
body.light-theme .cfg-ob-step-title { color: #111; }
body.light-theme .cfg-ob-step-desc  { color: rgba(0,0,0,0.5); }
body.light-theme .cfg-ob-skip  { color: rgba(0,0,0,0.3); }
body.light-theme .cfg-ob-skip:hover { color: rgba(0,0,0,0.6); }

/* â”€â”€ Global search overlay â”€â”€ */
.cfg-gsearch-overlay {
    position: fixed; inset: 0;
    z-index: 8000;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 12vh;
    opacity: 0; pointer-events: none;
    transition: opacity 0.18s;
}
.cfg-gsearch-overlay.active { opacity: 1; pointer-events: auto; }
.cfg-gsearch-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
}
.cfg-gsearch-box {
    position: relative; z-index: 1;
    width: min(600px, 94vw);
    background: rgb(18,18,18);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.75);
    overflow: hidden;
    animation: cfg-modal-in 0.18s ease;
}
.cfg-gsearch-hdr {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cfg-gsearch-hdr > i { color: rgba(255,123,58,0.7); font-size: 0.85rem; flex-shrink: 0; }
#cfg-gsearch-input {
    flex: 1; background: none; border: none; outline: none;
    color: #fff; font-size: 0.95rem; font-family: inherit;
}
#cfg-gsearch-input::placeholder { color: rgba(255,255,255,0.22); }
.cfg-gsearch-hdr kbd {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px; padding: 2px 6px; font-size: 0.68rem; color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}
.cfg-gsearch-results { max-height: 340px; overflow-y: auto; }
.cfg-gsearch-results::-webkit-scrollbar { width: 4px; }
.cfg-gsearch-results::-webkit-scrollbar-thumb { background: rgba(255,123,58,0.2); border-radius: 99px; }
.cfg-gsearch-empty { padding: 2rem; text-align: center; color: rgba(255,255,255,0.25); font-size: 0.82rem; }
.cfg-gsearch-item {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.6rem 1rem; cursor: pointer;
    transition: background 0.1s; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cfg-gsearch-item:hover, .cfg-gsearch-item.selected { background: rgba(255,123,58,0.1); }
.cfg-gsearch-badge {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: rgba(255,123,58,0.75);
    background: rgba(255,123,58,0.1); border-radius: 4px;
    padding: 2px 7px; white-space: nowrap; flex-shrink: 0;
}
.cfg-gsearch-name { flex: 1; font-size: 0.82rem; color: rgba(255,255,255,0.8); }
.cfg-gsearch-add { color: rgba(255,255,255,0.2); font-size: 0.75rem; flex-shrink: 0; }
.cfg-gsearch-item:hover .cfg-gsearch-add, .cfg-gsearch-item.selected .cfg-gsearch-add { color: #ff7b3a; }
.cfg-gsearch-footer {
    display: flex; gap: 1.25rem; align-items: center;
    padding: 0.5rem 1rem; border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
}
.cfg-gsearch-footer span { font-size: 0.65rem; color: rgba(255,255,255,0.3); display: flex; align-items: center; gap: 4px; }
.cfg-gsearch-footer kbd {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px; padding: 1px 5px; font-size: 0.63rem; color: rgba(255,255,255,0.45);
}
body.light-theme .cfg-gsearch-box { background: #fff; border-color: rgba(0,0,0,0.1); }
body.light-theme #cfg-gsearch-input { color: #111; }
body.light-theme .cfg-gsearch-item:hover, body.light-theme .cfg-gsearch-item.selected { background: rgba(200,80,0,0.08); }
body.light-theme .cfg-gsearch-name { color: rgba(0,0,0,0.75); }
body.light-theme .cfg-gsearch-footer { background: rgba(0,0,0,0.03); border-top-color: rgba(0,0,0,0.07); }

/* â”€â”€ Guardar en cuenta â”€â”€ */
.cfg-btn-cloud { color: #5bc8f5 !important; }
.cfg-btn-cloud:hover { color: #82d8ff !important; }

.cfg-save-modal-body { padding: 0.25rem 0 0.25rem; }
.cfg-save-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.5rem;
}
.cfg-save-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.cfg-save-input:focus { border-color: #ff7b3a; }
.cfg-save-preview {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cfg-save-chip {
    background: rgba(255,123,58,0.12);
    border: 1px solid rgba(255,123,58,0.25);
    border-radius: 20px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.cfg-save-chip i { color: #ff7b3a; font-size: 0.65rem; }
.cfg-save-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.cfg-save-btn-ok {
    flex: 1;
    padding: 0.75rem;
    background: #ff7b3a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.cfg-save-btn-ok:hover { background: #e06828; transform: translateY(-1px); }
.cfg-save-btn-ok:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.cfg-save-btn-cancel {
    flex: 0 0 auto;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.cfg-save-btn-cancel:hover { background: rgba(255,255,255,0.1); }
.cfg-save-status {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 6px;
}
.cfg-save-status.ok  { color: #4eca7e; background: rgba(78,202,126,0.1); }
.cfg-save-status.err { color: #e87070; background: rgba(232,112,112,0.1); }

body.light-theme .cfg-save-input { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: #111; }
body.light-theme .cfg-save-label { color: rgba(0,0,0,0.45); }
body.light-theme .cfg-save-btn-cancel { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.5); border-color: rgba(0,0,0,0.1); }
body.light-theme .cfg-save-btn-cancel:hover { background: rgba(0,0,0,0.08); }
body.light-theme .cfg-btn-cloud { color: #0088cc !important; }
body.light-theme .cfg-btn-cloud:hover { color: #006699 !important; }
body.light-theme .cfg-save-chip {
    background: rgba(255,123,58,0.1);
    border-color: rgba(255,123,58,0.3);
    color: rgba(0,0,0,0.65);
}
body.light-theme .cfg-save-chip i { color: #d05a00; }
body.light-theme .cfg-save-btn-ok { background: #e8622a; }
body.light-theme .cfg-save-btn-ok:hover { background: #c95000; }
body.light-theme .cfg-save-status.ok  { color: #1a7a40; background: rgba(26,122,64,0.08); }
body.light-theme .cfg-save-status.err { color: #b02020; background: rgba(176,32,32,0.08); }
body.light-theme .cfg-save-limit-banner { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-save-limit-banner--full { color: rgba(0,0,0,0.7); }

/* ── Limit banner ── */
.cfg-save-limit-banner {
    font-size: 0.77rem;
    color: rgba(255,255,255,0.45);
    padding: 0.5rem 0.7rem;
    margin-bottom: 1.1rem;
    background: rgba(255,107,53,0.06);
    border-left: 2px solid rgba(255,107,53,0.35);
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
}
.cfg-save-limit-banner--full {
    color: rgba(255,100,100,0.75);
    background: rgba(232,112,112,0.07);
    border-left-color: rgba(232,112,112,0.4);
}
.cfg-save-limit-banner i {
    color: rgba(255,107,53,0.65);
    margin-right: 0.25rem;
}

/* ── Save modal — dark redesign ── */
#save-account-modal .cfg-modal-box {
    background: rgb(18,18,18);
    border: 1px solid rgba(255,255,255,0.07);
    border-top: 2px solid #ff7b3a;
    box-shadow: 0 28px 72px rgba(0,0,0,0.9), 0 0 80px rgba(255,123,58,0.06);
    padding: 2rem;
}
#save-account-modal .cfg-modal-header {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}
#save-account-modal .cfg-modal-title {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}
#save-account-modal .cfg-save-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.55rem;
}
#save-account-modal .cfg-save-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
#save-account-modal .cfg-save-input:focus {
    border-color: #ff7b3a;
    background: rgba(255,123,58,0.04);
    box-shadow: 0 0 0 3px rgba(255,123,58,0.1);
}
#save-account-modal .cfg-save-preview {
    margin-top: 1.1rem;
    gap: 0.45rem;
}
#save-account-modal .cfg-save-preview {
    margin-top: 1.1rem;
    display: block;
}
.cfg-save-list {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cfg-save-list-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.38rem 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    padding-left: 1.1rem;
}
.cfg-save-list-item:last-child { border-bottom: none; }
.cfg-save-list-item::before {
    content: '-';
    position: absolute;
    left: 0;
    color: rgba(255,255,255,0.25);
    font-weight: 400;
}
.cfg-save-list-item i {
    color: #ff7b3a;
    font-size: 0.7rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.cfg-save-list-label {
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}
.cfg-save-list-model {
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#save-account-modal .cfg-save-actions {
    margin-top: 1.5rem;
    gap: 0.7rem;
}
#save-account-modal .cfg-save-btn-ok {
    background: linear-gradient(135deg, #ff7b3a 0%, #e85d20 100%);
    border-radius: 10px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(255,123,58,0.25);
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}
#save-account-modal .cfg-save-btn-ok:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255,123,58,0.38);
    background: linear-gradient(135deg, #ff7b3a 0%, #e85d20 100%);
}
#save-account-modal .cfg-save-btn-ok:disabled {
    filter: none;
    box-shadow: none;
}
#save-account-modal .cfg-save-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.4);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
#save-account-modal .cfg-save-btn-cancel:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.65);
}
#save-account-modal .cfg-save-status {
    border-radius: 8px;
    font-size: 0.83rem;
}

/* ── Migrate local builds banner ── */
.cfg-migrate-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem;
    height: 38px;
    background: #1a2a1a;
    border-bottom: 1px solid rgba(255,123,58,0.3);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    flex-shrink: 0;
}
.cfg-migrate-banner > i { color: #ff7b3a; font-size: 0.75rem; flex-shrink: 0; }
.cfg-migrate-banner strong { color: #ff9560; font-weight: 700; }
.cfg-migrate-banner > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfg-migrate-btns { display: flex; gap: 0.4rem; margin-left: auto; flex-shrink: 0; }
.cfg-migrate-btn-yes {
    padding: 0.28rem 0.7rem;
    background: #ff7b3a;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.cfg-migrate-btn-yes:hover { background: #e06828; }
.cfg-migrate-btn-yes:disabled { opacity: 0.55; cursor: not-allowed; }
.cfg-migrate-btn-no {
    padding: 0.28rem 0.6rem;
    background: transparent;
    color: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 5px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.cfg-migrate-btn-no:hover { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.25); }
body.light-theme .cfg-migrate-banner { background: #fff8f4; border-color: rgba(255,123,58,0.25); color: rgba(0,0,0,0.55); }
body.light-theme .cfg-migrate-banner strong { color: #d05000; }
body.light-theme .cfg-migrate-btn-no { color: rgba(0,0,0,0.35); border-color: rgba(0,0,0,0.12); }
body.light-theme .cfg-migrate-btn-no:hover { color: rgba(0,0,0,0.6); border-color: rgba(0,0,0,0.25); }

/* ── Help Modal ── */
#help-modal .cfg-modal-box {
    background: rgb(18,18,18);
    border: 1px solid rgba(255,255,255,0.07);
    border-top: 2px solid #ff7b3a;
    box-shadow: 0 28px 72px rgba(0,0,0,0.9), 0 0 80px rgba(255,123,58,0.06);
    padding: 2rem;
}
#help-modal .cfg-modal-header {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}
#help-modal .cfg-modal-title {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}
.cfg-help-box {
    max-width: 780px;
    width: 94vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.cfg-help-body {
    overflow-y: auto;
    padding: 0.25rem 0.1rem 1rem;
    flex: 1;
}
.cfg-help-intro {
    font-size: 0.87rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    margin: 0 0 1.5rem;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border-left: 3px solid #ff7b3a;
}
.cfg-help-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
}
.cfg-help-badge.ok  { background: rgba(78,202,126,0.15); color: #4eca7e; }
.cfg-help-badge.warn { background: rgba(255,193,7,0.15); color: #ffc107; }
.cfg-help-badge.err { background: rgba(232,112,112,0.15); color: #e87070; }

.cfg-help-section {
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
}
.cfg-help-sh {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    background: rgba(255,123,58,0.08);
    border-bottom: 1px solid rgba(255,123,58,0.15);
}
.cfg-help-sh i {
    color: #ff7b3a;
    font-size: 0.9rem;
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}
.cfg-help-sh h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}
.cfg-help-sh h3 span {
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}
.cfg-help-rules {
    padding: 0.5rem 0;
}
.cfg-help-rule {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cfg-help-rule:last-child { border-bottom: none; }
.cfg-help-rule-hd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.5rem;
}
.cfg-help-rule-hd i {
    color: #ff9560;
    font-size: 0.75rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}
.cfg-help-rule p {
    margin: 0 0 0.45rem;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
}
.cfg-help-rule p:last-child { margin-bottom: 0; }
.cfg-help-rule em { color: rgba(255,255,255,0.7); font-style: normal; font-weight: 600; }
.cfg-help-rule strong { color: rgba(255,255,255,0.85); }
.cfg-help-list {
    margin: 0.3rem 0 0.45rem 1.1rem;
    padding: 0;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
}
.cfg-help-formula {
    font-family: 'Consolas', 'Courier New', monospace;
    background: rgba(255,123,58,0.07);
    border: 1px solid rgba(255,123,58,0.15);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    color: rgba(255,200,150,0.85) !important;
    margin-top: 0.5rem !important;
}
.cfg-help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.81rem;
    margin: 0.5rem 0;
}
.cfg-help-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cfg-help-table td {
    padding: 0.4rem 0.6rem;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.cfg-help-table tr:first-child td { border-top: none; }
.cfg-help-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
    line-height: 1.6;
}
.cfg-help-footer i { color: #ff7b3a; }

/* ── Help Tree design ── */
.cfg-help-body {
    overflow-y: auto;
    padding: 0.65rem 0.85rem 1rem;
    flex: 1;
    scroll-behavior: smooth;
}

.help-status-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.75rem;
    margin-bottom: 0.8rem;
    background: rgba(255,107,53,0.04);
    border-radius: 0;
    border: none;
    border-left: 3px solid rgba(255, 107, 53, 0.55);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
}
.help-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    vertical-align: middle;
}

/* ── Tree branches (each <details>) ── */
.help-acc {
    position: relative;
    margin: 0;
    padding-left: 1.35rem;
    margin-left: 0.25rem;
    border: none;
    background: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}
/* Vertical line connecting siblings */
.help-acc::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 107, 53, 0.18);
}
/* Last branch: vertical line only to the horizontal connector */
.help-acc:last-of-type::before {
    height: 1.15rem;
    bottom: auto;
}
/* Horizontal connector to header */
.help-acc::after {
    content: '';
    position: absolute;
    left: 0;
    top: 1.15rem;
    width: 1.1rem;
    height: 1px;
    background: rgba(255, 107, 53, 0.18);
    transform: translateY(-50%);
}
.help-acc-hd {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.55rem;
    background: none;
    cursor: pointer;
    list-style: none;
    user-select: none;
    border-bottom: none;
    border-radius: 6px;
    transition: background 0.15s;
}
.help-acc-hd::-webkit-details-marker { display: none; }
.help-acc[open] > .help-acc-hd { background: rgba(255,107,53,0.06); }
.help-acc-hd:hover { background: rgba(255,107,53,0.09); }

/* Folder-style icon box */
.help-acc-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #ff7b3a;
    flex-shrink: 0;
}
.help-acc-title {
    flex: 1;
    font-size: 0.84rem;
    font-weight: 600;
    color: #fff;
}
.help-acc-title em {
    font-weight: 400;
    color: rgba(255,255,255,0.38);
    font-size: 0.8rem;
    font-style: normal;
}
.help-acc-arrow {
    color: rgba(255,107,53,0.45);
    font-size: 0.6rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.help-acc[open] .help-acc-arrow { transform: rotate(180deg); }

/* Sub-tree body: vertical line for the rules */
.help-acc-body {
    padding: 0.15rem 0 0.3rem 0.65rem;
    border-left: 1px solid rgba(255, 107, 53, 0.14);
    margin-left: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Each rule = leaf node with left accent */
.help-rule {
    position: relative;
    background: rgba(255,255,255,0.015);
    border: none;
    border-left: 2px solid rgba(255, 107, 53, 0.28);
    border-radius: 0 4px 4px 0;
    padding: 0.38rem 0.55rem 0.38rem 0.7rem;
}
.help-rule:last-child { border-bottom: none; }
.help-rule-hd {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 107, 53, 0.82);
    margin-bottom: 0.28rem;
}
.help-rule-hd i {
    color: #ff9560;
    font-size: 0.68rem;
    width: 13px;
    text-align: center;
    flex-shrink: 0;
}
.help-pts {
    margin: 0 0 0.3rem 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
}
.help-pts li { margin-bottom: 0.06rem; padding-left: 1rem; position: relative; }
.help-pts li::before { content: '·'; position: absolute; left: 0.2rem; color: rgba(255,107,53,0.4); font-weight: 400; }
.help-pts strong { color: rgba(255,255,255,0.8); }
.help-pts em { color: rgba(255,255,255,0.65); font-style: normal; }

.help-example {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.28rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.73rem;
    line-height: 1.5;
    background: none;
    border: none;
}
.help-example-ok   { border-left: 2px solid rgba(78,202,126,0.5);   background: rgba(78,202,126,0.05);   color: rgba(255,255,255,0.5); }
.help-example-warn { border-left: 2px solid rgba(255,193,7,0.5);    background: rgba(255,193,7,0.05);    color: rgba(255,255,255,0.5); }
.help-example-err  { border-left: 2px solid rgba(232,112,112,0.45); background: rgba(232,112,112,0.05);  color: rgba(255,255,255,0.5); }
.help-example-label { flex-shrink: 0; }

/* Light theme */
body.light-theme .help-status-bar { background: rgba(255,107,53,0.04); border-left-color: rgba(180,80,0,0.45); color: rgba(0,0,0,0.45); }
body.light-theme .help-acc::before,
body.light-theme .help-acc::after { background: rgba(180,80,0,0.18); }
body.light-theme .help-acc-hd:hover,
body.light-theme .help-acc[open] > .help-acc-hd { background: rgba(255,107,53,0.07); }
body.light-theme .help-acc-title { color: #111; }
body.light-theme .help-acc-title em { color: rgba(0,0,0,0.38); }
body.light-theme .help-acc-arrow { color: rgba(180,80,0,0.45); }
body.light-theme .help-acc-body { border-left-color: rgba(180,80,0,0.12); }
body.light-theme .help-rule { background: rgba(0,0,0,0.015); border-left-color: rgba(180,80,0,0.28); }
body.light-theme .help-rule-hd { color: rgba(180,80,0,0.85); }
body.light-theme .help-pts { color: rgba(0,0,0,0.55); }
body.light-theme .help-pts li::before { color: rgba(180,80,0,0.35); }
body.light-theme .help-pts strong { color: rgba(0,0,0,0.8); }
body.light-theme .help-pts em { color: rgba(0,0,0,0.7); }
body.light-theme .help-example-ok   { background: rgba(78,202,126,0.05);  color: rgba(0,0,0,0.5); }
body.light-theme .help-example-warn { background: rgba(255,193,7,0.05);   color: rgba(0,0,0,0.5); }
body.light-theme .help-example-err  { background: rgba(232,112,112,0.05); color: rgba(0,0,0,0.5); }

/* ── Help modal animations ── */
.help-acc {
    transition: none;
}
.help-acc[open] {
    border-color: transparent;
    box-shadow: none;
}

/* Accordion body slides in when opened */
@keyframes help-body-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.help-acc[open] .help-acc-body {
    animation: help-body-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Each rule slides in from the left, staggered */
@keyframes help-rule-in {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}
.help-acc[open] .help-rule {
    animation: help-rule-in 0.24s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.help-acc[open] .help-rule:nth-child(1) { animation-delay: 0.04s; }
.help-acc[open] .help-rule:nth-child(2) { animation-delay: 0.09s; }
.help-acc[open] .help-rule:nth-child(3) { animation-delay: 0.14s; }
.help-acc[open] .help-rule:nth-child(4) { animation-delay: 0.19s; }
.help-acc[open] .help-rule:nth-child(5) { animation-delay: 0.24s; }
.help-acc[open] .help-rule:nth-child(6) { animation-delay: 0.29s; }
.help-acc[open] .help-rule:nth-child(7) { animation-delay: 0.34s; }

/* Example boxes pop in with a slight delay after the rule */
@keyframes help-example-in {
    from { opacity: 0; transform: scale(0.95) translateY(4px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
}
.help-acc[open] .help-example {
    animation: help-example-in 0.22s cubic-bezier(0.34, 1.2, 0.64, 1) both;
    animation-delay: inherit;
}
.help-acc[open] .help-rule:nth-child(1) .help-example { animation-delay: 0.12s; }
.help-acc[open] .help-rule:nth-child(2) .help-example { animation-delay: 0.17s; }
.help-acc[open] .help-rule:nth-child(3) .help-example { animation-delay: 0.22s; }
.help-acc[open] .help-rule:nth-child(4) .help-example { animation-delay: 0.27s; }
.help-acc[open] .help-rule:nth-child(5) .help-example { animation-delay: 0.32s; }
.help-acc[open] .help-rule:nth-child(6) .help-example { animation-delay: 0.37s; }
.help-acc[open] .help-rule:nth-child(7) .help-example { animation-delay: 0.42s; }

/* Status bar entrance when modal opens */
.cfg-modal.open .help-status-bar {
    animation: help-body-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .cfg-modal.open, .cfg-modal.cfg-modal-closing,
    .cfg-modal.cfg-modal-closing .cfg-modal-box,
    .help-acc[open] .help-acc-body,
    .help-acc[open] .help-rule,
    .help-acc[open] .help-example,
    .cfg-modal.open .help-status-bar {
        animation: none !important;
        transition: none !important;
    }
}

/* Legacy light-theme overrides (kept for old classes still in DOM) */
body.light-theme .cfg-help-intro { background: rgba(0,0,0,0.03); color: rgba(0,0,0,0.6); }
body.light-theme .cfg-help-section { border-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-help-sh { background: rgba(255,123,58,0.06); border-color: rgba(255,123,58,0.12); }
body.light-theme .cfg-help-sh h3 { color: #111; }
body.light-theme .cfg-help-sh h3 span { color: rgba(0,0,0,0.4); }
body.light-theme .cfg-help-rule { border-color: rgba(0,0,0,0.05); }
body.light-theme .cfg-help-rule-hd { color: rgba(0,0,0,0.85); }
body.light-theme .cfg-help-rule p,
body.light-theme .cfg-help-list { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-help-rule em { color: rgba(0,0,0,0.75); }
body.light-theme .cfg-help-rule strong { color: rgba(0,0,0,0.8); }
body.light-theme .cfg-help-formula { color: #7a3000 !important; background: rgba(255,123,58,0.05); }
body.light-theme .cfg-help-table th { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.45); }
body.light-theme .cfg-help-table td { color: rgba(0,0,0,0.6); border-color: rgba(0,0,0,0.05); }
body.light-theme .cfg-help-footer { color: rgba(0,0,0,0.3); }

/* ── Modal de reglas de compatibilidad (leídas en vivo del código) ──
   Neumorphism simple, solo aquí: el modal viejo "Ayuda" comparte las
   mismas clases .help-acc/.help-rule y se queda con su estilo de árbol
   tal cual — por eso todo esto va bajo #reglas-modal, no suelto. */
#reglas-modal {
    --rg-luz:      rgba(255,255,255,0.045);
    --rg-sombra:   rgba(0,0,0,0.55);
    --rg-hueco-bg: #141414;
}
body.light-theme #reglas-modal {
    --rg-luz:      rgba(255,255,255,0.9);
    --rg-sombra:   rgba(163,177,198,0.55);
    --rg-hueco-bg: #ececec;
}

/* Fuera las líneas de árbol heredadas de .help-acc */
#reglas-modal .help-acc::before,
#reglas-modal .help-acc::after { display: none; }
#reglas-modal .help-acc {
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 0.5rem;
}
#reglas-modal .help-acc-body {
    border-left: none;
    margin-left: 0;
    padding: 0.5rem 0.1rem 0.2rem;
    gap: 0.6rem;
}
/* La altura la anima el JS con WAAPI (mide el alto real y anima de
   verdad); estas animaciones por fotogramas son del acordeón viejo y
   aquí solo estorbarían — se paran para que no compitan. */
#reglas-modal .help-acc-body,
#reglas-modal .help-rule,
#reglas-modal .help-status-bar { animation: none !important; }

/* Cabecera de grupo: elevada, es donde se actúa (togglea) */
#reglas-modal .help-acc-hd {
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    box-shadow: -2px -2px 6px var(--rg-luz), 3px 3px 10px var(--rg-sombra);
}
#reglas-modal .help-acc[open] > .help-acc-hd {
    background: none;
    box-shadow: inset 2px 2px 6px var(--rg-sombra), inset -2px -2px 5px var(--rg-luz);
}

/* Regla individual: sin caja propia — se repite 29 veces, va plano */
#reglas-modal .help-rule {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0.15rem 0.3rem 0.4rem;
}
#reglas-modal .help-rule-hd { color: rgba(255,255,255,0.7); }
#reglas-modal .help-rule-hd i { color: #ff7b3a; }
#reglas-modal .help-acc-icon {
    background: none;
    border: none;
    color: #ff7b3a;
    font-size: 0.8rem;
}

/* El mensaje en sí es el único hueco: ahí SÍ hay datos que mostrar */
#reglas-modal .cfg-regla-msg {
    margin: 0.35rem 0 0;
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.58);
    background: var(--rg-hueco-bg);
    border: none;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    box-shadow: inset 2px 2px 6px var(--rg-sombra), inset -2px -2px 5px var(--rg-luz);
}
.cfg-regla-sindato { color: #d97706; }
body.light-theme #reglas-modal .cfg-regla-msg { color: rgba(0,0,0,0.62); }

/* ── Load Builds Modal ── */
#load-builds-modal .cfg-modal-box {
    background: rgb(18,18,18);
    border: 1px solid rgba(255,255,255,0.07);
    border-top: 2px solid #ff7b3a;
    box-shadow: 0 28px 72px rgba(0,0,0,0.9), 0 0 80px rgba(255,123,58,0.06);
    padding: 2rem;
}
#load-builds-modal .cfg-modal-header {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}
#load-builds-modal .cfg-modal-title {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}
.lbm-body {
    max-height: 58vh;
    overflow-y: auto;
    padding: 0 0 0.25rem;
}
.lbm-list { display: flex; flex-direction: column; gap: 0.75rem; }
.lbm-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 2px solid rgba(255,123,58,0.2);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    transition: border-color 0.18s, background 0.18s;
}
.lbm-card:hover {
    border-color: rgba(255,123,58,0.35);
    border-left-color: #ff7b3a;
    background: rgba(255,123,58,0.03);
}
.lbm-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}
.lbm-card-name { font-weight: 700; font-size: 0.92rem; color: #fff; }
.lbm-power {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
}
.lbm-power.low  { background: rgba(78,202,126,0.15); color: #4eca7e; }
.lbm-power.mid  { background: rgba(255,193,7,0.15);  color: #ffc107; }
.lbm-power.high { background: rgba(232,112,112,0.15); color: #e87070; }
.lbm-comps {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 0.35rem 0.85rem;
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.lbm-comp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding-left: 1rem;
    position: relative;
}
.lbm-comp:last-child { border-bottom: none; }
.lbm-comp::before {
    content: '-';
    position: absolute;
    left: 0;
    color: rgba(255,255,255,0.25);
}
.lbm-comp-l { color: rgba(255,255,255,0.35); min-width: 80px; flex-shrink: 0; font-weight: 600; font-size: 0.74rem; }
.lbm-comp-v { color: rgba(255,255,255,0.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbm-nocomp { color: rgba(255,255,255,0.22); font-size: 0.78rem; }
.lbm-card-foot { display: flex; justify-content: flex-end; }
.lbm-btn-load {
    padding: 0.45rem 1.1rem;
    background: linear-gradient(135deg, #ff7b3a 0%, #e85d20 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 3px 12px rgba(255,123,58,0.2);
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}
.lbm-btn-load:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(255,123,58,0.32);
}
.lbm-btn-load:disabled { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.lbm-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgba(255,255,255,0.4);
}
.lbm-state i { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.lbm-state p { margin: 0.2rem 0; font-size: 0.9rem; }
.lbm-hint { font-size: 0.8rem; opacity: 0.65; }

body.light-theme .lbm-card { background: rgba(0,0,0,0.025); border-color: rgba(0,0,0,0.08); border-left-color: rgba(255,123,58,0.25); }
body.light-theme .lbm-card:hover { border-color: rgba(255,123,58,0.4); border-left-color: #ff7b3a; background: rgba(255,123,58,0.02); }
body.light-theme .lbm-card-name { color: #111; }
body.light-theme .lbm-comps { background: rgba(0,0,0,0.025); border-color: rgba(0,0,0,0.07); }
body.light-theme .lbm-comp-l { color: rgba(0,0,0,0.35); }
body.light-theme .lbm-comp-v { color: rgba(0,0,0,0.7); }
body.light-theme .lbm-comp::before { color: rgba(0,0,0,0.2); }
body.light-theme .lbm-comp { border-bottom-color: rgba(0,0,0,0.05); }
body.light-theme .lbm-nocomp { color: rgba(0,0,0,0.25); }
body.light-theme .lbm-state { color: rgba(0,0,0,0.38); }

/* Cuerpo desplazable del resumen */
#summary-content {
    max-height: 62vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
#summary-content::-webkit-scrollbar { width: 5px; }
#summary-content::-webkit-scrollbar-track { background: transparent; }
#summary-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
body.light-theme #summary-content { scrollbar-color: rgba(0,0,0,0.18) transparent; }
body.light-theme #summary-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); }

/* ═══════════════════════════════════════════════════════════════════
   MODE SELECTOR OVERLAY
═══════════════════════════════════════════════════════════════════ */
.cfg-ms-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}
.cfg-ms-inner {
    width: 100%;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}
.cfg-ms-header { text-align: center; }
.cfg-ms-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color, #ff6b35);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}
.cfg-ms-logo i { margin-right: 6px; }
.cfg-ms-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.cfg-ms-sub {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.45);
    margin: 0;
}
.cfg-ms-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}
.cfg-ms-card {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    padding: 32px 28px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
.cfg-ms-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(255,107,53,0.08) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.3s;
}
.cfg-ms-card:hover { border-color: var(--primary-color, #ff6b35); background: rgba(255,107,53,0.05); transform: translateY(-3px); }
.cfg-ms-card:hover::before { opacity: 1; }
.cfg-ms-card-icon {
    font-size: 2.2rem;
    color: var(--primary-color, #ff6b35);
    line-height: 1;
}
.cfg-ms-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.cfg-ms-card-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    flex: 1;
}
.cfg-ms-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cfg-ms-card-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 2px 9px;
    letter-spacing: 0.3px;
}
.cfg-ms-card-cta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color, #ff6b35);
    display: flex;
    align-items: center;
    gap: 6px;
}
.cfg-ms-card-cta i { transition: transform 0.2s; }
.cfg-ms-card:hover .cfg-ms-card-cta i { transform: translateX(4px); }
.cfg-ms-card.cfg-ms-card-last {
    border-color: rgba(255,107,53,0.4);
    background: rgba(255,107,53,0.04);
}
.cfg-ms-card.cfg-ms-card-last::after {
    content: 'Último usado';
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary-color, #ff6b35);
    opacity: 0.7;
}

@media (max-width: 560px) {
    .cfg-ms-cards { grid-template-columns: 1fr; }
    .cfg-ms-title { font-size: 1.5rem; }
}

/* Light theme mode selector */
body.light-theme .cfg-ms-overlay { background: #f5f5f5; }
body.light-theme .cfg-ms-title { color: #1a1a1a; }
body.light-theme .cfg-ms-sub { color: rgba(0,0,0,0.45); }
body.light-theme .cfg-ms-card {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}
body.light-theme .cfg-ms-card:hover { border-color: var(--primary-color, #ff6b35); background: rgba(255,107,53,0.04); }
body.light-theme .cfg-ms-card-name { color: #1a1a1a; }
body.light-theme .cfg-ms-card-desc { color: rgba(0,0,0,0.5); }
body.light-theme .cfg-ms-card-tags span { color: rgba(0,0,0,0.4); background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }

/* ═══════════════════════════════════════════════════════════════════
   MODO LISTA  —  layout 3 columnas
═══════════════════════════════════════════════════════════════════ */
/* ── contenedor y toolbar ── */
.cfg-lista-view {
    display: flex;
    flex-direction: column;
    margin-top: 70px;
    height: calc(100vh - 70px);
    overflow: hidden;
    position: relative;

    /* Neumorphism escopado a Modo Lista — mismo lenguaje que soft-ui.css /
       #reglas-modal: HUNDIDO recibe/contiene datos, ELEVADO se actúa sobre
       ello, PLANO en reposo para lo que se repite mucho (tarjetas). */
    --ll-luz:      rgba(255, 255, 255, 0.045);
    --ll-sombra:   rgba(0, 0, 0, 0.55);
    --ll-radio:    14px;
    --ll-hueco-bg: #141414;
}
body.light-theme .cfg-lista-view {
    --ll-luz:      rgba(255, 255, 255, 0.9);
    --ll-sombra:   rgba(163, 177, 198, 0.55);
    --ll-hueco-bg: #ececec;
}

/* ── Pantalla de bienvenida ── */
.cfg-lista-welcome {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.cfg-lista-welcome-card {
    display: flex;
    align-items: center;
    gap: 64px;
    max-width: 920px;
    width: 100%;
}
.cfg-lista-welcome-img {
    width: 420px;
    max-width: 48%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.cfg-lista-welcome-text { flex: 1; min-width: 0; }
.cfg-lista-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,107,53,0.12);
    color: #ff6b35;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.cfg-lista-welcome-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 18px;
    color: #fff;
}
.cfg-lista-welcome-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.65;
    margin: 0 0 36px;
    max-width: 400px;
}
.cfg-lista-welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
    font-family: inherit;
    box-shadow: -3px -3px 8px var(--ll-luz, rgba(255,255,255,0.045)), 4px 4px 14px var(--ll-sombra, rgba(0,0,0,0.55));
}
.cfg-lista-welcome-btn:hover {
    background: #e55a24;
    transform: translateY(-2px);
}
.cfg-lista-welcome-btn:active {
    transform: translateY(0);
    box-shadow: inset 3px 3px 7px var(--ll-sombra, rgba(0,0,0,0.55)), inset -2px -2px 5px var(--ll-luz, rgba(255,255,255,0.045));
}
body.light-theme .cfg-lista-welcome { background: #f5f5f5; }
body.light-theme .cfg-lista-welcome-title { color: #111; }
body.light-theme .cfg-lista-welcome-img { box-shadow: 0 24px 60px rgba(0,0,0,0.15); }
@media (max-width: 700px) {
    .cfg-lista-welcome-card { flex-direction: column; gap: 32px; }
    .cfg-lista-welcome-img  { width: 100%; max-width: 100%; }
    .cfg-lista-welcome-title { font-size: 1.8rem; }
}
.cfg-lista-toolbar {
    height: 48px;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    flex-shrink: 0;
}
.cfg-lista-back {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    border-radius: 7px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, border-color 0.2s;
}
.cfg-lista-back:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.cfg-lista-toolbar-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-left: 4px;
    margin-right: auto;
}
.cfg-lista-toolbar-actions { display: flex; gap: 6px; align-items: center; }
.cfg-lista-toolbar .cfg-toolbar-btn {
    border-radius: 8px;
    transition: color 0.15s, box-shadow 0.15s, background 0.15s;
}
.cfg-lista-toolbar .cfg-toolbar-btn:hover,
.cfg-lista-toolbar .cfg-toolbar-btn:focus-visible {
    background: rgba(255,255,255,0.03);
    box-shadow: -2px -2px 6px var(--ll-luz, rgba(255,255,255,0.045)), 3px 3px 10px var(--ll-sombra, rgba(0,0,0,0.55));
}
body.light-theme .cfg-lista-toolbar .cfg-toolbar-btn:hover,
body.light-theme .cfg-lista-toolbar .cfg-toolbar-btn:focus-visible {
    background: rgba(0,0,0,0.02);
}
.cfg-lista-toolbar-watts {
    display: flex;
    align-items: baseline;
    gap: 5px;
    background: var(--ll-hueco-bg, #141414);
    border: none;
    border-radius: 8px;
    padding: 5px 13px;
    margin-right: 8px;
    box-shadow: inset 3px 3px 8px var(--ll-sombra, rgba(0,0,0,0.55)), inset -2px -2px 6px var(--ll-luz, rgba(255,255,255,0.045));
}
.cfg-lista-toolbar-watts i {
    font-size: 0.78rem;
    color: var(--primary-color, #ff6b35);
}
.cfg-lista-toolbar-watts #ls-power-val {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.cfg-lista-toolbar-watts-unit {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

/* ── barra de pasos horizontal ── */
.cfg-ll-stepper {
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.012);
    padding: 0 12px;
}
.cfg-ll-steps {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-width: max-content;
}
.cfg-ll-step {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 12px;
    cursor: pointer;
    white-space: nowrap;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.cfg-ll-step:hover { background: rgba(255,255,255,0.04); }
.cfg-ll-step.active { border-bottom-color: var(--primary-color, #ff7b3a); background: rgba(255,107,53,0.06); }
.cfg-ll-step-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(255,107,53,0.1);
    color: var(--primary-color, #ff7b3a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.cfg-ll-step.active .cfg-ll-step-icon { background: rgba(255,107,53,0.2); }
.cfg-ll-step-text { display: flex; flex-direction: column; min-width: 0; }
.cfg-ll-step-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}
.cfg-ll-step.active .cfg-ll-step-label { color: #fff; }
.cfg-ll-step-sel {
    display: none;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cfg-ll-step.active .cfg-ll-step-sel { display: block; }
.cfg-ll-step-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.cfg-ll-step-dot.ok   { background: #4caf50; box-shadow: 0 0 4px rgba(76,175,80,0.5); }
.cfg-ll-step-dot.warn { background: #ffc107; box-shadow: 0 0 4px rgba(255,193,7,0.5); }
.cfg-ll-step-dot.err  { background: #f44336; box-shadow: 0 0 4px rgba(244,67,54,0.5); }
.cfg-ll-step-sep {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.15);
    font-size: 0.62rem;
    flex-shrink: 0;
}
body.light-theme .cfg-ll-stepper { border-bottom-color: rgba(0,0,0,0.08); background: #fff; }
body.light-theme .cfg-ll-step:hover { background: rgba(0,0,0,0.04); }
body.light-theme .cfg-ll-step.active { background: rgba(255,107,53,0.07); }
body.light-theme .cfg-ll-step-label { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-ll-step.active .cfg-ll-step-label { color: #1a1a1a; }
body.light-theme .cfg-ll-step-sel { color: rgba(0,0,0,0.4); }
body.light-theme .cfg-ll-step-sep { color: rgba(0,0,0,0.15); }

/* ── botón de la toolbar que abre el cajón de análisis ── */
.cfg-ll-analysis-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    margin-left: 2px;
    display: inline-block;
}
.cfg-ll-analysis-dot.ok   { background: #4caf50; box-shadow: 0 0 4px rgba(76,175,80,0.5); }
.cfg-ll-analysis-dot.warn { background: #ffc107; box-shadow: 0 0 4px rgba(255,193,7,0.5); }
.cfg-ll-analysis-dot.err  { background: #f44336; box-shadow: 0 0 4px rgba(244,67,54,0.5); }

/* ── una sola columna: el centro ocupa todo el ancho ── */
.cfg-lista-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ══════════ CAJÓN DE ANÁLISIS — bajo demanda, no columna fija ══════════ */
.cfg-ll-drawer-backdrop {
    position: absolute;
    inset: 0;
    z-index: 599;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.cfg-ll-drawer {
    position: absolute;
    top: 48px;
    right: 0;
    bottom: 0;
    z-index: 600;
    width: min(360px, 92vw);
    background: #1a1a1a;
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -12px 0 32px var(--ll-sombra, rgba(0,0,0,0.55));
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.cfg-lista-view.ll-drawer-open .cfg-ll-drawer { transform: translateX(0); }
.cfg-lista-view.ll-drawer-open .cfg-ll-drawer-backdrop { opacity: 1; pointer-events: auto; }
.cfg-ll-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.cfg-ll-drawer-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.cfg-ll-drawer-title i { color: var(--primary-color, #ff7b3a); }
.cfg-ll-drawer-close {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cfg-ll-drawer-close:hover { color: #fff; border-color: rgba(255,123,58,0.45); background: rgba(255,123,58,0.12); }
.cfg-ll-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    scrollbar-width: none;
}
.cfg-ll-drawer-body::-webkit-scrollbar { display: none; }
body.light-theme .cfg-ll-drawer { background: #fff; border-left-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-ll-drawer-head { border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-ll-drawer-title { color: rgba(0,0,0,0.5); }
body.light-theme .cfg-ll-drawer-close { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: rgba(0,0,0,0.45); }
@media (max-width: 600px) { .cfg-ll-drawer { width: 100vw; top: 0; } }

/* ══════════ CENTRO — detalle ══════════ */
.cfg-ll-center {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #161616;
}

/* ── Slot header ── */
.ls-slot-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 0;
    flex-shrink: 0;
}
.ls-slot-header-icon {
    width: 42px; height: 42px;
    border-radius: 11px;
    background: rgba(255,107,53,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    color: #ff6b35;
    flex-shrink: 0;
}
.ls-slot-header-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,107,53,0.55);
    margin-bottom: 2px;
}
.ls-slot-header-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

/* ── Split layout ── */
.ls-center-split {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.ls-center-list {
    flex: 0 0 var(--ls-list-w, 46%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* Divisor arrastrable: permite reducir/ampliar la lista (máx. = 46%). */
.ls-center-resizer {
    flex: 0 0 7px;
    align-self: stretch;
    position: relative;
    cursor: col-resize;
    background: transparent;
    z-index: 6;
    touch-action: none;
}
.ls-center-resizer::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.05);
    transition: width 0.15s ease, background 0.15s ease;
}
.ls-center-resizer:hover::before,
.ls-center-resizer.dragging::before {
    width: 3px;
    background: #ff6b35;
}
/* Asa central estilo ficha de dominó (6 puntos) */
.ls-resizer-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 26px;
    border-radius: 3px;
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.38);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    pointer-events: none;
}
.ls-resizer-grip::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 2.5px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 4px 0, 0 8px, 4px 8px, 0 16px, 4px 16px;
}
.ls-center-resizer:hover .ls-resizer-grip,
.ls-center-resizer.dragging .ls-resizer-grip {
    border-color: #ff6b35;
    color: #fff;
}
.ls-center-resizer.dragging .ls-resizer-grip { background: #3a2418; }
body.ls-resizing,
body.ls-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}
.ls-center-detail {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #111;
}

/* ── Detail panel ── */
.ls-detail-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,0.12);
    padding: 40px;
    text-align: center;
}
.ls-detail-ph-icon { font-size: 2.8rem; }
.ls-detail-placeholder p { font-size: 0.8rem; margin: 0; max-width: 180px; line-height: 1.5; }
.ls-detail-img-area {
    min-height: 200px;
    max-height: 260px;
    flex: 0 0 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.ls-detail-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.ls-detail-img-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem;
    color: rgba(255,255,255,0.06);
}
.ls-detail-sel-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #ff6b35;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ls-detail-info { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.ls-detail-cat {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,107,53,0.55);
    margin-bottom: 5px;
}
.ls-detail-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
    line-height: 1.35;
}
.ls-detail-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
/* ── Spec table ── */
.ls-spec-table {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    background: var(--ll-hueco-bg, #141414);
    box-shadow: inset 4px 4px 10px var(--ll-sombra, rgba(0,0,0,0.55)), inset -3px -3px 8px var(--ll-luz, rgba(255,255,255,0.045));
    margin-bottom: 16px;
}
.ls-spec-table-title {
    padding: 7px 14px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ls-spec-row {
    display: flex;
    align-items: center;
    padding: 7px 14px;
    gap: 12px;
}
.ls-spec-row.even { background: rgba(255,255,255,0.025); }
.ls-spec-row.odd  { background: rgba(255,255,255,0.045); }
.ls-spec-label {
    flex: 0 0 150px;
    font-size: 0.71rem;
    font-weight: 600;
    color: rgba(255,255,255,0.38);
    letter-spacing: 0.2px;
}
.ls-spec-val {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

/* light theme spec table */
body.light-theme .ls-spec-table { background: var(--ll-hueco-bg, #ececec); }
body.light-theme .ls-spec-table-title { color: rgba(0,0,0,0.35); background: rgba(0,0,0,0.03); }
body.light-theme .ls-spec-row.even { background: rgba(0,0,0,0.02); }
body.light-theme .ls-spec-row.odd  { background: rgba(0,0,0,0.04); }
body.light-theme .ls-spec-label    { color: rgba(0,0,0,0.4); }
body.light-theme .ls-spec-val      { color: #111; }

.ls-detail-compat { display: flex; flex-direction: column; gap: 5px; }
.ls-detail-compat-msg {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.74rem;
    padding: 6px 10px;
    border-radius: 7px;
    line-height: 1.4;
}
.ls-detail-compat-msg i { margin-top: 1px; flex-shrink: 0; }
.ls-detail-compat-msg.ok   { background: rgba(76,175,80,0.08);  color: #81c784; }
.ls-detail-compat-msg.warn { background: rgba(255,193,7,0.08);  color: #ffd54f; }
.ls-detail-compat-msg.err  { background: rgba(244,67,54,0.08);  color: #ef9a9a; }

/* ── Posicion de montaje de la AIO (selector en la ficha del disipador) ── */
.ls-aio-position { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.ls-aio-position-label {
    font-size: 0.71rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
}
.ls-aio-pos-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-aio-pos-pill {
    position: relative;
    padding: 6px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ls-aio-pos-pill:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ls-aio-pos-pill.selected {
    background: rgba(255,107,53,0.2);
    border-color: rgba(255,107,53,0.55);
    color: #ff9a70;
}
.ls-aio-pos-dot {
    position: absolute;
    top: 3px; right: 3px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ffc107;
}
body.light-theme .ls-aio-position-label { color: rgba(0,0,0,0.45); }
body.light-theme .ls-aio-pos-pill { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: rgba(0,0,0,0.55); }
body.light-theme .ls-aio-pos-pill:hover { background: rgba(0,0,0,0.08); color: #000; }
body.light-theme .ls-aio-pos-pill.selected { background: rgba(255,107,53,0.15); border-color: rgba(255,107,53,0.5); color: #d9531e; }

/* ── Siguiente button ── */
.ls-detail-next-wrap { margin-top: 20px; }
/* El navegador nuevo (sidebar+tabla) ya tiene su propia barra inferior con el
   boton de "Siguiente"; el del panel de detalle sobraria por duplicado. */
.ls-browse .ls-center-detail .ls-detail-next-wrap { display: none; }
.ls-detail-next-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: -3px -3px 8px var(--ll-luz, rgba(255,255,255,0.045)), 4px 4px 14px var(--ll-sombra, rgba(0,0,0,0.55));
}
.ls-detail-next-btn:hover { background: #e55a24; transform: translateY(-2px); }
.ls-detail-next-btn:active:not(.done) {
    transform: translateY(0);
    box-shadow: inset 3px 3px 7px var(--ll-sombra, rgba(0,0,0,0.55)), inset -2px -2px 5px var(--ll-luz, rgba(255,255,255,0.045));
}
.ls-detail-next-btn.done {
    background: rgba(76,175,80,0.15);
    color: #81c784;
    cursor: default;
}
.ls-detail-next-btn.done:hover { transform: none; background: rgba(76,175,80,0.15); }

/* light theme */
body.light-theme .ls-center-detail { background: #f0f0f0; }
body.light-theme .ls-detail-name   { color: #111; }
body.light-theme .ls-detail-img-area { background: rgba(0,0,0,0.02); }
body.light-theme .ls-center-resizer::before { background: rgba(0,0,0,0.07); }
body.light-theme .ls-center-resizer:hover::before,
body.light-theme .ls-center-resizer.dragging::before { background: #ff6b35; }
body.light-theme .ls-resizer-grip {
    background: #e4e4e4;
    border-color: rgba(0,0,0,0.18);
    color: rgba(0,0,0,0.4);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
body.light-theme .ls-center-resizer:hover .ls-resizer-grip,
body.light-theme .ls-center-resizer.dragging .ls-resizer-grip {
    border-color: #ff6b35;
    color: #ff6b35;
}
body.light-theme .ls-center-resizer.dragging .ls-resizer-grip { background: #ffe6d9; }

/* ── Search bar ── */
.ls-inline-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 20px 8px;
    background: var(--ll-hueco-bg, #141414);
    border-radius: 10px;
    padding: 0 14px;
    flex-shrink: 0;
    border: 1.5px solid transparent;
    box-shadow: inset 3px 3px 8px var(--ll-sombra, rgba(0,0,0,0.55)), inset -2px -2px 6px var(--ll-luz, rgba(255,255,255,0.045));
    transition: border-color 0.15s;
}
.ls-inline-search-wrap:focus-within { border-color: rgba(255,107,53,0.35); }
.ls-inline-search-icon { color: rgba(255,255,255,0.25); font-size: 0.82rem; }
.ls-inline-search {
    flex: 1;
    background-color: transparent !important;
    background-image: none !important;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.88rem;
    padding: 11px 0;
    font-family: inherit;
}
.ls-inline-search::placeholder { color: rgba(255,255,255,0.2); }
/* Chrome/Edge pintan de blanco (o amarillo) el fondo real de un input en
   cuanto el navegador recuerda algo escrito ahi, pise lo que pise el autor
   -es un estado interno del navegador, no algo que "background: none" pueda
   tapar-. El truco es el de siempre: un box-shadow inset gigante del color
   que sí queremos, que sustituye visualmente al relleno nativo. */
.ls-inline-search:-webkit-autofill,
.ls-inline-search:-webkit-autofill:hover,
.ls-inline-search:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px var(--ll-hueco-bg, #141414) inset;
    box-shadow: 0 0 0 1000px var(--ll-hueco-bg, #141414) inset;
    transition: background-color 9999s ease-in-out 0s;
}
body.light-theme .ls-inline-search:-webkit-autofill,
body.light-theme .ls-inline-search:-webkit-autofill:hover,
body.light-theme .ls-inline-search:-webkit-autofill:focus {
    -webkit-text-fill-color: #111;
    caret-color: #111;
    -webkit-box-shadow: 0 0 0 1000px var(--ll-hueco-bg, #ececec) inset;
    box-shadow: 0 0 0 1000px var(--ll-hueco-bg, #ececec) inset;
}

/* ── Cards list ── */
.ls-inline-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 20px 20px;
    scrollbar-width: none;
}
.ls-inline-cards::-webkit-scrollbar { display: none; }
.ls-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 13px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.12s;
    border: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.ls-card:hover:not(.disabled) {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,107,53,0.2);
    box-shadow: -2px -2px 5px var(--ll-luz, rgba(255,255,255,0.045)), 3px 3px 8px var(--ll-sombra, rgba(0,0,0,0.55));
    transform: translateY(-1px);
}
.ls-card.selected {
    border-color: rgba(255,107,53,0.5);
    background: rgba(255,107,53,0.06);
    box-shadow: inset 3px 3px 7px var(--ll-sombra, rgba(0,0,0,0.55)), inset -2px -2px 5px var(--ll-luz, rgba(255,255,255,0.045));
    transform: none;
}
.ls-card.disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }
.ls-card-img-wrap {
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
}
.ls-card-img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.25s ease; }
.ls-card-img.ls-lazy-loaded { opacity: 1; }
.ls-card-img-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.18);
    font-size: 1rem;
}
.ls-card-info { flex: 1; min-width: 0; }
.ls-card-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-card-sub {
    font-size: 0.71rem;
    color: rgba(255,255,255,0.38);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-card-warn { font-size: 0.69rem; color: #ffd54f; margin-top: 2px; }
.ls-card-err  { font-size: 0.69rem; color: #ef9a9a; margin-top: 2px; }
.ls-card-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.ls-card-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ls-card-badge.err  { background: rgba(244,67,54,0.13); color: #ef9a9a; }
.ls-card-badge.warn { background: rgba(255,193,7,0.1);  color: #ffd54f; }
.ls-card-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #ff6b35;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 0.65rem;
    flex-shrink: 0;
}
.ls-cards-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 20px;
    color: rgba(255,255,255,0.25);
    font-size: 0.85rem;
}
.ls-cards-empty i { font-size: 1.6rem; }
.ls-cards-empty p { margin: 0; }

/* light theme cards */
body.light-theme .ls-slot-header-name { color: #111; }
body.light-theme .ls-slot-header-icon { background: rgba(255,107,53,0.1); }
body.light-theme .ls-inline-search-wrap { background: var(--ll-hueco-bg, #ececec); }
body.light-theme .ls-inline-search { color: #111; }
body.light-theme .ls-inline-search::placeholder { color: rgba(0,0,0,0.35); }
body.light-theme .ls-inline-search-icon { color: rgba(0,0,0,0.3); }
body.light-theme .ls-card { background: rgba(0,0,0,0.015); border-color: rgba(0,0,0,0.08); }
body.light-theme .ls-card:hover:not(.disabled) { background: rgba(0,0,0,0.03); }
body.light-theme .ls-card.selected { background: rgba(255,107,53,0.06); }
body.light-theme .ls-card-name { color: #111; }
body.light-theme .ls-card-sub { color: rgba(0,0,0,0.4); }

/* placeholder inicial */
.cfg-ll-center-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 80px;
    color: rgba(255,255,255,0.2);
}
.cfg-ll-center-placeholder i { font-size: 2.5rem; }
.cfg-ll-center-placeholder p { font-size: 0.9rem; margin: 0; }

/* ══════════ EXIT CONFIRM MODAL ══════════ */
.ls-exit-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.ls-exit-modal-card {
    background: #1e1e1e;
    border: none;
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 380px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: -6px -6px 14px rgba(255,255,255,0.045), 8px 8px 22px rgba(0,0,0,0.55);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.ls-exit-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,107,53,0.12);
    border: 1px solid rgba(255,107,53,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color, #ff6b35);
    margin-bottom: 4px;
}
.ls-exit-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}
.ls-exit-modal-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    margin-bottom: 8px;
}
.ls-exit-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.ls-exit-btn-save, .ls-exit-btn-discard {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
}
.ls-exit-btn-save:hover, .ls-exit-btn-discard:hover { opacity: 0.85; }
.ls-exit-btn-save {
    background: var(--primary-color, #ff6b35);
    color: #fff;
    box-shadow: -3px -3px 8px rgba(255,255,255,0.045), 4px 4px 14px rgba(0,0,0,0.55);
}
.ls-exit-btn-discard {
    background: rgba(244,67,54,0.12);
    border: 1px solid rgba(244,67,54,0.25);
    color: #ef9a9a;
}
.ls-exit-btn-cancel {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 0.82rem;
    cursor: pointer;
    margin-top: 4px;
    padding: 4px 8px;
}
.ls-exit-btn-cancel:hover { color: rgba(255,255,255,0.6); }

/* ══════════ LIGHT THEME ══════════ */
body.light-theme .cfg-lista-view { background: #f5f5f5; }
body.light-theme .cfg-lista-toolbar { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-lista-back { color: rgba(0,0,0,0.5); border-color: rgba(0,0,0,0.1); }
body.light-theme .cfg-lista-back:hover { color: #1a1a1a; }
body.light-theme .cfg-lista-toolbar-title { color: rgba(0,0,0,0.5); }
body.light-theme .cfg-ll-center { background: #fafafa; }
body.light-theme .cfg-ll-center-placeholder { color: rgba(0,0,0,0.2); }
body.light-theme .cfg-lista-toolbar-watts { background: var(--ll-hueco-bg, #ececec); }
body.light-theme .cfg-lista-toolbar-watts #ls-power-val { color: #1a1a1a; }


/* ═══════════════════════════════════════════════════════════════════
   ASISTENTE INLINE — dentro del card de componente
═══════════════════════════════════════════════════════════════════ */
.ls-inline-assistant {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px 8px;
    flex-shrink: 0;
}
.ls-inline-assistant:empty { display: none; }

.ls-assistant-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,107,53,0.7);
    margin-bottom: 2px;
}
.ls-assistant-header i { font-size: 0.8rem; }
.ls-assistant-hint { display: none; }

.ls-assistant-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ls-assistant-q {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    min-width: 90px;
}
.ls-assistant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ls-chip {
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.55);
    border-radius: 7px;
    padding: 5px 13px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
    white-space: nowrap;
    user-select: none;
    font-family: inherit;
    letter-spacing: 0.2px;
}
.ls-chip:hover {
    background: rgba(255,107,53,0.15);
    color: #ff6b35;
}
.ls-chip.active {
    background: rgba(255,107,53,0.22);
    color: #ff8055;
    font-weight: 700;
}
.ls-chip.auto {
    background: rgba(76,175,80,0.12);
    color: #81c784;
}
.ls-chip.auto:hover {
    background: rgba(76,175,80,0.2);
}

/* Light theme */
body.light-theme .ls-assistant-q { color: rgba(0,0,0,0.4); }
body.light-theme .ls-assistant-hint { color: rgba(0,0,0,0.3); }
body.light-theme .ls-chip { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.5); }
body.light-theme .ls-chip:hover { background: rgba(255,107,53,0.12); color: #e55a24; }
body.light-theme .ls-chip.active { background: rgba(255,107,53,0.18); color: #d04e1a; }


/* ── Diálogo de confirmación ────────────────────────────────────────
   Versión desnuda del modal: sin cabecera, sin separadores y con un
   único elemento relleno. Al no competir nada con el botón naranja,
   la acción recomendada se lee de un vistazo.

   Los tres botones se estilan con el mismo peso de selector
   (.cfg-confirm-acciones button.loquesea) para que el reset común no
   gane por especificidad a la variante y le borre el fondo. */
.cfg-confirm {
    min-width: 0;
    width: min(440px, 92vw);
    padding: 1.5rem;
    border-top-width: 1px;
    border-top-color: rgba(255,255,255,0.08);
    text-align: left;
}
.cfg-confirm-title {
    margin: 0 0 .5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .2px;
}
.cfg-confirm-text {
    margin: 0 0 1.5rem;
    font-size: .875rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.5);
}
.cfg-confirm-acciones {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .25rem;
}
.cfg-confirm-acciones button {
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    padding: .6rem .8rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background .18s, color .18s;
}
/* Las dos salidas son texto suelto; solo se dibuja su fondo al pasar por
   encima, para que no compitan con la acción recomendada. */
.cfg-confirm-acciones button.cfg-confirm-cancelar { color: rgba(255,255,255,0.45); }
.cfg-confirm-acciones button.cfg-confirm-cancelar:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.75); }
.cfg-confirm-acciones button.cfg-confirm-descartar { color: #e87070; }
.cfg-confirm-acciones button.cfg-confirm-descartar:hover { background: rgba(231,76,60,0.12); color: #ff8a8a; }
.cfg-confirm-acciones button.cfg-confirm-ok {
    margin-left: .35rem;
    padding: .6rem 1.1rem;
    background: #ff7b3a;
    color: #0d0d0d;
}
.cfg-confirm-acciones button.cfg-confirm-ok:hover { background: #ff8f56; }
.cfg-confirm-acciones button:focus-visible {
    outline: 2px solid #ff7b3a;
    outline-offset: 2px;
}

body.light-theme .cfg-confirm { border-top-color: rgba(0,0,0,0.08); }
body.light-theme .cfg-confirm-title { color: #111; }
body.light-theme .cfg-confirm-text { color: rgba(0,0,0,0.55); }
body.light-theme .cfg-confirm-acciones button.cfg-confirm-cancelar { color: rgba(0,0,0,0.45); }
body.light-theme .cfg-confirm-acciones button.cfg-confirm-cancelar:hover { background: rgba(0,0,0,0.06); color: #111; }
body.light-theme .cfg-confirm-acciones button.cfg-confirm-descartar { color: #c0392b; }
body.light-theme .cfg-confirm-acciones button.cfg-confirm-ok { color: #fff; }

@media (max-width: 460px) {
    .cfg-confirm-acciones { flex-direction: column-reverse; align-items: stretch; }
    .cfg-confirm-acciones button { width: 100%; margin-left: 0; }
}

/* ── Resumen del build ──────────────────────────────────────────────
   Sustituye a la ventana de terminal (.term-*). Se mantiene la
   tipografía monoespaciada, que es la del sitio entero, pero se van los
   adornos de consola: la barra con los tres puntos, el prompt, los
   corchetes de los tags y el cursor.

   El color se reserva para el estado. Todo lo que va bien se dibuja en
   gris: si algo aparece coloreado es porque pide atención. */
.cfg-res {
    /* Ancho de la columna de la etiqueta mas el de la miniatura. La nota
       desplegable se sangra con esto para caer bajo el modelo. */
    --res-etiqueta: 8.5rem;
    --res-foto: 2.5rem;
    --res-sangria: calc(var(--res-etiqueta) + var(--res-foto) + 1.5rem);
    max-width: 620px;
    padding: 0;
    overflow: hidden;
    border-top-width: 1px;
    border-top-color: rgba(255,255,255,0.08);
}
body.light-theme .cfg-res { border-top-color: rgba(0,0,0,0.08); }
.cfg-res-top {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cfg-res-top h2 {
    margin: 0;
    flex: 1;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .3px;
}
.cfg-res-top button {
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    padding: .45rem .7rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background .18s, color .18s;
}
.cfg-res-top button:hover { background: rgba(255,255,255,0.07); color: #fff; }
.cfg-res-top button:disabled { opacity: .5; cursor: default; }

/* Veredicto: la única frase grande de todo el panel. */
.cfg-res-veredicto {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid rgba(255,255,255,0.12);
}
.cfg-res-veredicto.bien  { border-left-color: #7bd88f; }
.cfg-res-veredicto.falla { border-left-color: #e87070; }
.cfg-res-veredicto.falta { border-left-color: #ff7b3a; }
.cfg-res-frase {
    margin: 0 0 .3rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}
.cfg-res-frase.bien  { color: #7bd88f; }
.cfg-res-frase.falla { color: #e87070; }
.cfg-res-frase.falta { color: #ff7b3a; }
.cfg-res-cuenta {
    margin: 0;
    font-size: .8rem;
    color: rgba(255,255,255,0.4);
}

.cfg-res-seccion {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cfg-res-seccion:last-child { border-bottom: 0; }
.cfg-res-eyebrow {
    margin: 0 0 .9rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
}

/* Explicaciones: el porqué, no solo el qué. */
.cfg-res-nota {
    margin-bottom: 1.15rem;
    padding-left: .85rem;
    border-left: 2px solid rgba(255,255,255,0.09);
}
.cfg-res-nota.falla { border-left-color: rgba(232,112,112,0.5); }
.cfg-res-nota.falta { border-left-color: rgba(255,123,58,0.35); }
.cfg-res-nota:last-child { margin-bottom: 0; }
.cfg-res-nota-tit {
    margin: 0 0 .35rem;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
}
.cfg-res-nota-tit .cfg-res-pieza {
    color: rgba(255,255,255,0.35);
    font-weight: 600;
}
.cfg-res-nota p {
    margin: 0 0 .3rem;
    font-size: .82rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.55);
}
.cfg-res-nota p:last-child { margin-bottom: 0; }
/* La línea del arreglo lleva un filete a la izquierda: es la acción. */
.cfg-res-arreglo {
    margin-top: .5rem !important;
    padding-left: .7rem;
    border-left: 2px solid rgba(255,123,58,0.5);
    color: rgba(255,255,255,0.75) !important;
}

/* Lista de componentes: filas sin caja, separadas por un filete. */
.cfg-res-lista { display: flex; flex-direction: column; }
.cfg-res-fila {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cfg-res-fila:last-child { border-bottom: 0; }
.cfg-res-pieza {
    flex: 0 0 var(--res-etiqueta, 8.5rem);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .8px;
    color: rgba(255,255,255,0.35);
}
.cfg-res-cuerpo { flex: 1; min-width: 0; }
.cfg-res-modelo {
    display: block;
    font-size: .84rem;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cfg-res-specs {
    display: block;
    margin-top: .15rem;
    font-size: .75rem;
    color: rgba(255,255,255,0.35);
}
.cfg-res-fila.vacia .cfg-res-modelo { color: rgba(255,255,255,0.28); }
.cfg-res-fila.problema .cfg-res-modelo { color: #e87070; }
/* Marca de estado: un punto, no una insignia con texto. */
.cfg-res-punto {
    flex: 0 0 auto;
    width: 6px; height: 6px;
    border-radius: 50%;
    align-self: center;
    background: rgba(255,255,255,0.14);
}
.cfg-res-punto.bien  { background: #7bd88f; }
.cfg-res-punto.falla { background: #e87070; }
.cfg-res-punto.falta { background: rgba(255,123,58,0.55); }

.cfg-res-vacio {
    padding: 3rem 1.5rem;
    text-align: center;
    font-size: .85rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.4);
}

body.light-theme .cfg-res-top,
body.light-theme .cfg-res-veredicto,
body.light-theme .cfg-res-seccion { border-bottom-color: rgba(0,0,0,0.07); }
body.light-theme .cfg-res-top h2,
body.light-theme .cfg-res-nota-tit { color: #111; }
body.light-theme .cfg-res-top button { color: rgba(0,0,0,0.45); }
body.light-theme .cfg-res-top button:hover { background: rgba(0,0,0,0.06); color: #111; }
body.light-theme .cfg-res-frase.bien { color: #2e7d43; }
body.light-theme .cfg-res-cuenta,
body.light-theme .cfg-res-eyebrow,
body.light-theme .cfg-res-pieza,
body.light-theme .cfg-res-specs { color: rgba(0,0,0,0.45); }
body.light-theme .cfg-res-nota p { color: rgba(0,0,0,0.6); }
body.light-theme .cfg-res-arreglo { color: rgba(0,0,0,0.8) !important; }
body.light-theme .cfg-res-modelo { color: #111; }
body.light-theme .cfg-res-fila { border-bottom-color: rgba(0,0,0,0.05); }
body.light-theme .cfg-res-vacio { color: rgba(0,0,0,0.45); }

@media (max-width: 520px) {
    .cfg-res-fila { flex-wrap: wrap; }
    .cfg-res-pieza { flex-basis: 100%; }
}


/* ── Nota desplegable de cada componente ────────────────────────────
   Cada nodo del canvas ya calcula su propio veredicto y lo guarda en
   varias lineas. Aqui se reutiliza tal cual: la primera es el titular y
   el resto el razonamiento, asi que no hay que redactar nada aparte.

   La fila entera es el disparador, no un iconito: es mas facil de
   acertar y deja claro que se puede abrir. */
.cfg-res-item { border-bottom: 1px solid rgba(255,255,255,0.04); }
.cfg-res-item:last-child { border-bottom: 0; }
.cfg-res-item .cfg-res-fila { border-bottom: 0; }

button.cfg-res-fila {
    width: 100%;
    font-family: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
}
button.cfg-res-fila:hover { background: rgba(255,255,255,0.035); }
button.cfg-res-fila:focus-visible { outline: 2px solid #ff7b3a; outline-offset: -2px; }

.cfg-res-flecha {
    flex: 0 0 auto;
    align-self: center;
    font-size: .7rem;
    color: rgba(255,255,255,0.25);
    transition: transform .2s ease, color .15s;
}
button.cfg-res-fila:hover .cfg-res-flecha { color: rgba(255,255,255,0.5); }
button.cfg-res-fila[aria-expanded="true"] .cfg-res-flecha { transform: rotate(90deg); }

/* El truco de las filas de rejilla anima cualquier altura sin tener que
   adivinar un max-height, que se queda corto con los errores largos. */
.cfg-res-nota-comp {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .22s ease;
}
.cfg-res-nota-comp.abierta { grid-template-rows: 1fr; }
.cfg-res-nota-comp > div { overflow: hidden; }
.cfg-res-nota-cuerpo {
    margin: 0 0 .75rem var(--res-sangria, 12rem);
    padding: .1rem 0 .1rem .85rem;
    border-left: 2px solid rgba(255,255,255,0.12);
}
.cfg-res-nota-comp.bien  .cfg-res-nota-cuerpo { border-left-color: rgba(123,216,143,0.45); }
.cfg-res-nota-comp.falla .cfg-res-nota-cuerpo { border-left-color: rgba(232,112,112,0.55); }
.cfg-res-nota-cuerpo p {
    margin: 0 0 .25rem;
    font-size: .78rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.5);
}
.cfg-res-nota-cuerpo p:first-child {
    color: rgba(255,255,255,0.85);
    font-weight: 700;
}
.cfg-res-nota-cuerpo p:last-child { margin-bottom: 0; }

body.light-theme .cfg-res-item { border-bottom-color: rgba(0,0,0,0.05); }
body.light-theme button.cfg-res-fila:hover { background: rgba(0,0,0,0.03); }
body.light-theme .cfg-res-flecha { color: rgba(0,0,0,0.25); }
body.light-theme .cfg-res-nota-cuerpo { border-left-color: rgba(0,0,0,0.12); }
body.light-theme .cfg-res-nota-cuerpo p { color: rgba(0,0,0,0.6); }
body.light-theme .cfg-res-nota-cuerpo p:first-child { color: #111; }
body.light-theme .cfg-res-veredicto { border-left-color: rgba(0,0,0,0.12); }
body.light-theme .cfg-res-nota { border-left-color: rgba(0,0,0,0.1); }

@media (max-width: 520px) {
    .cfg-res-nota-cuerpo { margin-left: 0; }
}


/* ── Miniatura del componente ───────────────────────────────────────
   El icono va debajo siempre y la foto encima. Si la foto no carga se
   borra sola y queda el icono, en vez del recuadro roto del navegador:
   la mayoria son enlaces al sitio del fabricante y varios ya no
   responden. De RAM y disipadores no hay ninguna foto todavia. */
.cfg-res-foto {
    position: relative;
    flex: 0 0 var(--res-foto, 2.5rem);
    height: 2.5rem;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}
.cfg-res-foto i {
    font-size: .85rem;
    color: rgba(255,255,255,0.22);
}
.cfg-res-foto img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    background: rgba(255,255,255,0.04);
}
.cfg-res-foto.vacia { opacity: .45; }

body.light-theme .cfg-res-foto { background: rgba(0,0,0,0.04); }
body.light-theme .cfg-res-foto i { color: rgba(0,0,0,0.25); }
body.light-theme .cfg-res-foto img { background: #fff; }

@media (max-width: 520px) {
    .cfg-res-nota-cuerpo { margin-left: 0; }
}

/* ══════════════════════════════════════════════════════════════════════
   NAVEGADOR DE PROCESADORES (paso "cpu" en Modo Lista)
   Sidebar de filtros + tabla de resultados + panel de detalle, en vez del
   listado de tarjetas de siempre. Ver renderCpuBrowser() en
   configurador-lista.js.
══════════════════════════════════════════════════════════════════════ */
.ls-browse {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 14px;
    padding: 14px 18px;
    overflow: hidden;
}
.ls-browse > .ls-center-detail { flex: 0 0 440px; border-radius: var(--ll-radio, 14px); }

/* ── Sidebar de filtros ── */
.ls-fsidebar {
    flex: 0 0 210px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}
.ls-fsidebar-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color, #ff7b3a);
    margin-bottom: 12px;
}
.ls-fgroup { margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ls-fgroup-hdr {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: rgba(255,255,255,0.82);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 11px 2px;
    cursor: pointer;
    text-align: left;
}
.ls-fgroup-hdr i { font-size: 0.7rem; color: rgba(255,255,255,0.35); transition: transform 0.15s; }
.ls-fgroup-hdr.open i { transform: rotate(180deg); }
.ls-fgroup-body { padding: 0 2px 12px; display: flex; flex-direction: column; gap: 9px; }

.ls-fcheck {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.68);
    cursor: pointer;
    user-select: none;
}
.ls-fcheck input { position: absolute; opacity: 0; width: 0; height: 0; }
.ls-fcheck-box {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    background: var(--ll-hueco-bg, #141414);
    box-shadow: inset 2px 2px 5px var(--ll-sombra, rgba(0,0,0,0.55)), inset -1px -1px 3px var(--ll-luz, rgba(255,255,255,0.045));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.6rem;
    transition: background 0.15s, color 0.15s;
}
.ls-fcheck input:checked + .ls-fcheck-box { background: var(--primary-color, #ff6b35); color: #fff; }
.ls-fcheck input:focus-visible + .ls-fcheck-box { outline: 2px solid rgba(255,123,58,0.5); outline-offset: 1px; }
.ls-fcheck:hover { color: #fff; }

/* ── Slider de rango doble ── */
.ls-range { padding: 6px 2px 2px; }
.ls-range-track-wrap { position: relative; height: 18px; }
.ls-range-track {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 3px;
    background: var(--ll-hueco-bg, #141414);
    box-shadow: inset 1px 1px 3px var(--ll-sombra, rgba(0,0,0,0.55));
}
.ls-range-fill { position: absolute; top: 0; bottom: 0; background: var(--primary-color, #ff6b35); border-radius: 3px; }
.ls-range-input {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    margin: 0;
    height: 18px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}
.ls-range-input::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color, #ff6b35);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    margin-top: 0;
}
.ls-range-input::-moz-range-thumb {
    pointer-events: auto;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary-color, #ff6b35);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.ls-range-input::-webkit-slider-runnable-track { background: none; }
.ls-range-input::-moz-range-track { background: none; }
.ls-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

.ls-fsidebar-reset {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    color: rgba(255,255,255,0.6);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.ls-fsidebar-reset:hover:not(:disabled) { background: rgba(255,107,53,0.12); color: #ff9a70; }
.ls-fsidebar-reset:disabled { opacity: 0.35; cursor: default; }

/* ── Columna principal de resultados ── */
.ls-browse-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.ls-browse-main .ls-slot-header { padding: 0 0 14px; }
.ls-browse-main #ls-inline-compat { margin-bottom: 10px; }

.ls-results-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ls-results-count { font-size: 0.82rem; color: rgba(255,255,255,0.45); font-weight: 600; white-space: nowrap; }
.ls-results-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ls-results-search.ls-inline-search-wrap { margin: 0; width: 220px; }
.ls-sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; color: rgba(255,255,255,0.45); white-space: nowrap; }
.ls-sort-select {
    background: var(--ll-hueco-bg, #141414);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 7px 10px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

/* ── Tabla de resultados ── */
.ls-cpu-rows { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 2px; }
.ls-cpu-row {
    display: grid;
    grid-template-columns: 18px 34px minmax(120px,1fr) 72px 72px 78px 18px 12px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.015);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.ls-cpu-row:hover { background: rgba(255,255,255,0.045); }
.ls-cpu-row.selected { border-color: rgba(255,107,53,0.55); background: rgba(255,107,53,0.08); }
.ls-cpu-row.disabled { opacity: 0.38; cursor: not-allowed; }
.ls-cpu-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 5px;
    background: var(--ll-hueco-bg, #141414);
    box-shadow: inset 2px 2px 5px var(--ll-sombra, rgba(0,0,0,0.5));
    color: var(--primary-color, #ff6b35);
    font-size: 0.62rem;
}
.ls-cpu-brand-badge {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
}
.ls-cpu-brand-badge.intel  { background: rgba(0,120,215,0.14); color: #4fa8ff; }
.ls-cpu-brand-badge.amd    { background: rgba(237,28,36,0.14); color: #ff5b63; }
.ls-cpu-brand-badge.nvidia { background: rgba(118,185,0,0.16); color: #8ed629; }
.ls-cpu-brand-img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
body.light-theme .ls-cpu-brand-badge { background: rgba(0,0,0,0.05); color: rgba(0,0,0,0.35); }
.ls-cpu-col-name { min-width: 0; }
.ls-cpu-name { font-size: 0.85rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-cpu-sub { font-size: 0.72rem; color: rgba(255,255,255,0.42); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-cpu-col-spec {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ls-cpu-spec-val { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ls-cpu-spec-lbl { font-size: 0.58rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.ls-cpu-col-igpu .ls-cpu-spec-val { font-size: 0.66rem; font-weight: 600; }
.ls-cpu-col-compat { font-size: 0.95rem; text-align: center; }
.ls-cpu-compat-ok   { color: #4caf50; }
.ls-cpu-compat-warn { color: #ffc107; }
.ls-cpu-compat-err  { color: #f44336; }
.ls-cpu-col-chevron { color: rgba(255,255,255,0.2); font-size: 0.74rem; }

/* ── Barra inferior: seleccion + siguiente ── */
.ls-browse-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.ls-browse-bottombar-sel { font-size: 0.8rem; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 8px; }
.ls-browse-bottombar-sel i { color: #4caf50; }
.ls-browse-clear-btn {
    background: none;
    border: none;
    color: rgba(255,107,53,0.8);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.ls-browse-bottombar .ls-detail-next-btn { width: auto; min-width: 240px; }

@media (max-width: 1100px) {
    .ls-browse { flex-wrap: wrap; overflow-y: auto; }
    .ls-fsidebar { flex: 1 1 100%; order: 2; overflow: visible; }
    .ls-browse-main { flex: 1 1 100%; order: 1; }
    .ls-browse > .ls-center-detail { display: none; }
    .ls-cpu-col-spec:nth-of-type(n+3) { display: none; }
}

/* light theme */
body.light-theme .ls-fgroup { border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme .ls-fgroup-hdr { color: rgba(0,0,0,0.75); }
body.light-theme .ls-fcheck { color: rgba(0,0,0,0.6); }
body.light-theme .ls-fcheck:hover { color: #111; }
body.light-theme .ls-fsidebar-reset { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.55); }
body.light-theme .ls-results-count { color: rgba(0,0,0,0.45); }
body.light-theme .ls-sort-wrap { color: rgba(0,0,0,0.5); }
body.light-theme .ls-sort-select { background: var(--ll-hueco-bg, #ececec); color: #111; border-color: rgba(0,0,0,0.1); }
body.light-theme .ls-cpu-row { background: rgba(0,0,0,0.02); }
body.light-theme .ls-cpu-row:hover { background: rgba(0,0,0,0.05); }
body.light-theme .ls-cpu-name { color: #111; }
body.light-theme .ls-cpu-spec-val { color: rgba(0,0,0,0.8); }
body.light-theme .ls-cpu-col-chevron { color: rgba(0,0,0,0.2); }
body.light-theme .ls-browse-bottombar-sel { color: rgba(0,0,0,0.55); }
body.light-theme .ls-browse-bottombar { border-top-color: rgba(0,0,0,0.08); }
body.light-theme .ls-cpu-sub { color: rgba(0,0,0,0.42); }
body.light-theme .ls-cpu-spec-lbl { color: rgba(0,0,0,0.35); }
