
.edeclara-theme {
    --brand-primary: #6C63FF;
    --brand-primary-dark: #574fd6;
    --brand-primary-light: #8c85ff;
    --brand-primary-subtle: rgba(108, 99, 255, 0.10);
    --brand-primary-border: rgba(108, 99, 255, 0.25);
    --n-blue: #6C63FF;
    --n-blue-dark: #574fd6;
    --n-blue-soft: #ede9ff;
    --n-app-bg: #f3f0ff;
    --n-border: #ddd8ff;
    --n-border-strong: #c4beff;
    --n-primary-bg: #ede9ff;
    --n-primary-text: #574fd6;
}

    /* ── Sidebar fondo morado ───────────────────────────────────────────────────── */
    .edeclara-theme .sidebar {
        background: radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 34%), linear-gradient(180deg, #2d1f7a 0%, #4a3db5 52%, #1e1554 100%) !important;
        border-right-color: rgba(108, 99, 255, 0.18) !important;
    }

    /* ── Menu links — item activo ───────────────────────────────────────────────── */
    .edeclara-theme a.menu-link.active {
        background: linear-gradient(135deg, rgba(108, 99, 255, 0.28), rgba(108, 99, 255, 0.14)) !important;
        border-color: rgba(108, 99, 255, 0.22) !important;
        box-shadow: inset 3px 0 0 #6C63FF, 0 6px 14px rgba(108, 99, 255, 0.12) !important;
        color: #ffffff !important;
    }

        .edeclara-theme a.menu-link.active .menu-icon {
            background: rgba(108, 99, 255, 0.35) !important;
            color: #ffffff !important;
        }

    /* ── Menu links — hover ─────────────────────────────────────────────────────── */
    .edeclara-theme .menu-button:hover,
    .edeclara-theme .menu-caret-button:hover,
    .edeclara-theme a.menu-link:hover {
        background: rgba(108, 99, 255, 0.14) !important;
        border-color: rgba(108, 99, 255, 0.12) !important;
        color: #ffffff !important;
        transform: translateX(2px) !important;
    }

    /* ── Menu icon base (blanco sobre fondo morado) ─────────────────────────────── */
    .edeclara-theme .menu-icon {
        background: rgba(255, 255, 255, 0.10) !important;
        color: rgba(255, 255, 255, 0.88) !important;
    }

    /* ── Menu links color base ──────────────────────────────────────────────────── */
    .edeclara-theme a.menu-link,
    .edeclara-theme .menu-button {
        color: rgba(255, 255, 255, 0.86) !important;
    }

    /* ── Submenu ────────────────────────────────────────────────────────────────── */
    .edeclara-theme .submenu-panel {
        border-left-color: rgba(108, 99, 255, 0.45) !important;
    }

        .edeclara-theme .submenu-panel a.menu-link.active {
            background: rgba(108, 99, 255, 0.22) !important;
            box-shadow: inset 3px 0 0 #6C63FF !important;
        }

    /* ── Header brand ───────────────────────────────────────────────────────────── */
    .edeclara-theme .workspace-brand-copy span {
        color: rgba(108, 99, 255, 0.65) !important;
    }

    .edeclara-theme .workspace-brand-copy strong {
        color: #6C63FF !important;
    }

    /* ── Session service pill ───────────────────────────────────────────────────── */
    .edeclara-theme .session-service-pill {
        border-color: rgba(108, 99, 255, 0.28) !important;
        background: radial-gradient(circle at top left, rgba(108, 99, 255, 0.18), transparent 52%), linear-gradient(160deg, rgba(237, 233, 255, 0.98), rgba(255, 255, 255, 0.98)) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 22px rgba(108, 99, 255, 0.12) !important;
    }

    .edeclara-theme .session-service-icon {
        background: rgba(108, 99, 255, 0.14) !important;
    }

    .edeclara-theme .session-service-copy span {
        color: rgba(108, 99, 255, 0.75) !important;
    }

    .edeclara-theme .session-service-copy strong {
        color: #574fd6 !important;
    }

    /* ── Botón secondary (Abrir tabla) ──────────────────────────────────────────── */
    .edeclara-theme button.secondary-btn,
    .edeclara-theme a.secondary-btn {
        background: transparent !important;
        background-image: none !important;
        border: 1px solid rgba(108, 99, 255, 0.3) !important;
        color: #6C63FF !important;
        box-shadow: none !important;
        min-height: 38px !important;
        padding: 0 1rem !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: .85rem !important;
    }

        .edeclara-theme button.secondary-btn:hover,
        .edeclara-theme a.secondary-btn:hover {
            background: rgba(108, 99, 255, 0.08) !important;
            border-color: #6C63FF !important;
            transform: none !important;
            color: #6C63FF !important;
        }

/* ══════════════════════════════════════════════════════════════════════════════
   LAYOUT DEL DASHBOARD
   ══════════════════════════════════════════════════════════════════════════════ */

.edeclara-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.edeclara-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

    .edeclara-state h3 {
        margin: 0;
        font-size: 1.15rem;
        font-weight: 600;
    }

    .edeclara-state p {
        margin: 0;
        font-size: .9rem;
    }

    .edeclara-state i {
        font-size: 2.5rem;
        opacity: .6;
    }

.edeclara-state-error i {
    color: #dc2626;
    opacity: 1;
}

.edeclara-state-error h3 {
    color: #dc2626;
}

.edeclara-overview {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.25rem;
}

@media (max-width: 860px) {
    .edeclara-overview {
        grid-template-columns: 1fr;
    }
}

.edeclara-summary,
.edeclara-spotlight,
.edeclara-panel {
    background: #fff;
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: .75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.edeclara-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 720px) {
    .edeclara-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Kickers / chips / pills ────────────────────────────────────────────────── */
.summary-real-kicker,
.section-kicker,
.panel-kicker {
    color: #6C63FF;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: block;
}

.summary-real-pill,
.section-chip {
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 999px;
    border: 1px solid rgba(108, 99, 255, 0.25);
    background: rgba(108, 99, 255, 0.08);
    color: #6C63FF;
}

/* ── Summary head / grid ────────────────────────────────────────────────────── */
.summary-real-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

.summary-real-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-real-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

    .summary-real-item .summary-real-label {
        font-size: .8rem;
        color: #6b7280;
    }

    .summary-real-item strong {
        font-size: 2.2rem;
        font-weight: 800;
        line-height: 1;
        color: #6C63FF;
        background: none !important;
        background-image: none !important;
        box-shadow: none !important;
        min-height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        display: block !important;
    }

    .summary-real-item small {
        font-size: .78rem;
        color: #6b7280;
    }

/* ── Section head ───────────────────────────────────────────────────────────── */
.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

    .section-head h3 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 700;
        color: #111827;
    }

.summary-spotlight-copy {
    margin: 0;
    font-size: .9rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ── Spotlight grid ─────────────────────────────────────────────────────────── */
.spotlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

@media (max-width: 600px) {
    .spotlight-grid {
        grid-template-columns: 1fr;
    }
}

.spotlight-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.1rem 1.25rem;
    border-radius: .75rem;
    border: 1px solid rgba(108, 99, 255, 0.2);
    background: #fff;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    transition: border-color .15s, background-color .15s, transform .15s;
}

    .spotlight-card:hover {
        border-color: #6C63FF;
        background: rgba(108, 99, 255, 0.04);
        transform: translateY(-2px);
    }

    .spotlight-card .spotlight-label {
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: #6b7280;
    }

    .spotlight-card strong {
        font-size: 1.8rem;
        font-weight: 800;
        line-height: 1;
        color: #6C63FF;
        background: none !important;
        background-image: none !important;
        box-shadow: none !important;
        min-height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        display: block !important;
    }

    .spotlight-card small {
        font-size: .8rem;
        color: #6b7280;
        line-height: 1.4;
    }

/* ── Panel head / compact list ──────────────────────────────────────────────── */
.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

    .panel-head h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
    }

.compact-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .65rem;
    border-radius: .5rem;
    background: #f9fafb;
    font-size: .85rem;
}

    .compact-row > div {
        display: flex;
        flex-direction: column;
        gap: .1rem;
    }

    .compact-row strong {
        font-weight: 600;
        color: #111827;
    }

    .compact-row span {
        font-size: .78rem;
        color: #6b7280;
    }

.mini-status {
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #16a34a;
    white-space: nowrap;
}

.mini-status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 2rem 1rem;
    text-align: center;
    color: #6b7280;
}

    .empty-panel i {
        font-size: 1.8rem;
        opacity: .5;
    }

    .empty-panel p {
        margin: 0;
        font-size: .85rem;
    }