/* =========================================================
   PANEL AFILIADO - ARCHIVO UNIFICADO
   Orden:
   1. Base layout
   2. Dashboard gamificado / componentes visuales
   3. Themes
   ========================================================= */

/* =========================================================
   1. BASE LAYOUT
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--accent) 16%, transparent),
            transparent 22%
        ),
        radial-gradient(
            circle at bottom right,
            color-mix(in srgb, var(--accent-strong) 12%, transparent),
            transparent 24%
        ),
        var(--bg-main);
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.panel-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 16px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 110;
    height: 100vh;
    overflow: hidden;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.brand-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.brand-text h1 {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.brand-text p {
    font-size: 13px;
    color: var(--text-soft);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav__group {
    display: grid;
    gap: 8px;
}

.sidebar-nav__title {
    display: block;
    padding: 4px 10px 2px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.9;
    color: var(--text-soft);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    position: relative;
    transition: 0.2s ease;
    color: var(--text-main);
    overflow: hidden;
}

.nav-link::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transition: width 0.25s ease;
}

.nav-link:hover {
    background: var(--card-bg);
    border-color: var(--border);
    transform: translateX(4px);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 3px;
}

.nav-link.active {
    background: var(--accent-soft);
    border-color: color-mix(
        in srgb,
        var(--accent) 22%,
        rgba(255, 255, 255, 0.08)
    );
    color: #fff;
}

.nav-link__badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.main-wrapper {
    flex: 1;
    margin-left: 280px;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    transition: 0.2s ease;
}

.page-heading h2 {
    font-size: 28px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.page-heading p {
    font-size: 14px;
    color: var(--text-soft);
}

.topbar-icon-group {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.icon-btn,
.notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: 0.2s ease;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.icon-btn i,
.notification-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 16px;
}

.icon-btn:hover,
.notification-btn:hover,
.mobile-menu-btn:hover,
.theme-chip:hover,
.profile-menu-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.notif-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.cart-btn {
    position: relative;
    text-decoration: none;
}

.cart-btn:hover {
    text-decoration: none;
}

.cart-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 30%, transparent);
}

.cart-btn.active {
    border-color: color-mix(in srgb, var(--accent) 28%, transparent);
    background: var(--accent-soft);
}

.cart-btn.active i {
    color: var(--accent);
}

.profile-menu-wrapper {
    position: relative;
}

.profile-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 8px 12px;
    cursor: pointer;
    min-height: 52px;
    transition: 0.2s ease;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
}

.profile-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--card-bg-strong);
    border: 1px solid var(--border);
}

.profile-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-mini-meta {
    text-align: left;
}

.profile-mini-meta strong {
    display: block;
    font-size: 14px;
    color: var(--text-main);
}

.profile-mini-meta span {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    color: var(--text-soft);
}

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 250px;
    display: none;
    z-index: 120;
}

.topbar-dropdown.open {
    display: block;
}

.dropdown-card {
    border-radius: 18px;
    padding: 14px;
    background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.dropdown-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-soft);
}

.theme-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.theme-chip {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
}

.theme-chip.active {
    background: var(--accent-soft);
    border-color: color-mix(
        in srgb,
        var(--accent) 18%,
        rgba(255, 255, 255, 0.08)
    );
    color: var(--text-main);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    transition: 0.2s ease;
    color: var(--text-main);
}

.dropdown-link:hover {
    background: var(--card-bg);
}

.dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--border);
}

.dropdown-logout-form {
    margin: 0;
}

.dropdown-logout-form .dropdown-link {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.dropdown-link-danger {
    color: #fca5a5;
}

.dropdown-link-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.content {
    padding: 28px;
    color: var(--text-main);
}

.sidebar-overlay {
    display: none;
}

.hidden-image-input {
    display: none;
}

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: 12px !important;
    min-height: 44px;
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    color: var(--text-main) !important;
}

.select2-dropdown {
    background: color-mix(
        in srgb,
        var(--bg-secondary) 92%,
        transparent
    ) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
}

.select2-search__field {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border) !important;
}

/* =========================================================
   2. DASHBOARD GAMIFICADO / COMPONENTES
   ========================================================= */

.hero-card,
.hero-side-card,
.stat-card,
.content-card,
.quick-action,
.mini-info-item,
.side-list-item,
.theme-node,
.theme-badge-card,
.theme-goal-item {
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 18px;
    margin-bottom: 22px;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--card-bg-strong) 100%, transparent),
        color-mix(in srgb, var(--card-bg) 90%, transparent)
    );
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft), transparent 65%);
    z-index: -1;
    pointer-events: none;
}

.hero-card__content h3 {
    font-size: 34px;
    margin: 14px 0 10px;
    color: var(--text-main);
}

.hero-card__content p {
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-soft);
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 700;
    min-height: 48px;
    font-size: 14px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.hero-btn--soft {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.hero-card__side {
    display: grid;
    gap: 14px;
}

.hero-side-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.hero-side-label {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.hero-side-card strong {
    font-size: 24px;
    color: var(--text-main);
}

.theme-level-card {
    position: relative;
    overflow: hidden;
}

.theme-level-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -20px auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}

.theme-level-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.theme-level-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-soft);
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.theme-progress {
    position: relative;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-progress--lg {
    height: 14px;
}

.theme-progress__bar {
    position: relative;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent);
    animation: themeProgressIn 1s ease;
}

.theme-progress__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.32) 50%,
        transparent 100%
    );
    animation: themeShine 3s linear infinite;
}

.theme-progress__note {
    display: block;
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 12px;
}

.theme-state-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.theme-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.theme-state--active {
    background: rgba(34, 197, 94, 0.16);
    color: #dcfce7;
    border-color: rgba(34, 197, 94, 0.25);
}

.theme-state--completed {
    background: rgba(59, 130, 246, 0.16);
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.24);
}

.theme-state--locked {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.22);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.03),
        transparent 50%
    );
    pointer-events: none;
}

.theme-stat-card--highlight {
    border-color: color-mix(
        in srgb,
        var(--accent) 35%,
        rgba(255, 255, 255, 0.06)
    );
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
        var(--shadow);
}

.stat-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-label {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-note {
    display: block;
    margin-top: 6px;
    color: var(--text-soft);
    line-height: 1.5;
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 18px;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 18px;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.content-card__header {
    margin-bottom: 18px;
}

.content-card__header h3 {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.content-card__header p {
    color: var(--text-soft);
    font-size: 14px;
}

.theme-chart {
    padding-top: 8px;
}

.theme-chart__bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    min-height: 260px;
}

.theme-chart__item {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.theme-chart__label {
    order: 2;
    font-size: 12px;
    color: var(--text-soft);
}

.theme-chart__bar {
    order: 1;
    width: 100%;
    max-width: 34px;
    height: 210px;
    display: flex;
    align-items: end;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.theme-chart__bar span {
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    transition:
        height 0.5s ease,
        transform 0.2s ease;
}

.theme-chart__item:hover .theme-chart__bar span {
    transform: translateY(-3px);
}

.theme-network-tree {
    display: grid;
    gap: 16px;
}

.theme-network-tree__level {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.theme-network-tree__level--mini {
    gap: 10px;
}

.theme-network-tree__connector {
    width: 2px;
    height: 28px;
    margin: 0 auto;
    background: linear-gradient(
        180deg,
        var(--accent-soft),
        rgba(255, 255, 255, 0.06)
    );
    border-radius: 999px;
}

.theme-network-tree__connector--small {
    height: 20px;
}

.theme-node {
    width: 150px;
    min-height: 126px;
    padding: 14px 12px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 8px;
}

.theme-node:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
}

.theme-node__avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.theme-node strong {
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-main);
}

.theme-node span {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.4;
}

.theme-node--me {
    width: 170px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 18%, transparent),
        rgba(255, 255, 255, 0.04)
    );
    border-color: color-mix(
        in srgb,
        var(--accent) 35%,
        rgba(255, 255, 255, 0.08)
    );
}

.theme-node--active .theme-node__avatar {
    background: rgba(34, 197, 94, 0.16);
}

.theme-node--completed .theme-node__avatar {
    background: rgba(59, 130, 246, 0.18);
}

.theme-node--locked {
    opacity: 0.82;
    background: rgba(148, 163, 184, 0.08);
}

.theme-node--locked .theme-node__avatar {
    background: rgba(148, 163, 184, 0.16);
}

.theme-kpi-stack {
    display: grid;
    gap: 16px;
}

.theme-kpi-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-kpi-row span {
    color: var(--text-soft);
    font-size: 13px;
}

.theme-kpi-row strong {
    font-size: 16px;
    color: var(--text-main);
}

.theme-goals-list {
    display: grid;
    gap: 12px;
}

.theme-goal-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.theme-goal-item i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.theme-goal-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-main);
}

.theme-goal-item span {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.theme-goal-item--done i {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.theme-goal-item--active i {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.theme-goal-item--locked i {
    background: linear-gradient(135deg, #64748b, #475569);
}

.theme-badges-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.theme-badge-card {
    min-height: 120px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    align-content: start;
    gap: 8px;
}

.theme-badge-card:hover {
    transform: translateY(-3px);
}

.theme-badge-card i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.theme-badge-card strong {
    font-size: 14px;
    color: var(--text-main);
}

.theme-badge-card span {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.theme-badge-card--earned {
    border-color: color-mix(
        in srgb,
        var(--accent) 28%,
        rgba(255, 255, 255, 0.08)
    );
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 10%, transparent),
        rgba(255, 255, 255, 0.03)
    );
}

.theme-badge-card--earned i {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.theme-badge-card--locked {
    opacity: 0.82;
}

.theme-badge-card--locked i {
    background: linear-gradient(135deg, #64748b, #475569);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-action {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-main);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.quick-action--disabled {
    opacity: 0.8;
    pointer-events: none;
}

.quick-actions-grid .quick-action {
    min-height: 110px;
    align-items: center;
}

.quick-action__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
    color: #fff;
}

.quick-action strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
}

.quick-action span {
    display: block;
    color: var(--text-soft);
    line-height: 1.5;
    font-size: 13px;
}

.mini-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mini-info-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.mini-info-item span {
    display: block;
    color: var(--text-soft);
    font-size: 12px;
    margin-bottom: 6px;
}

.mini-info-item strong {
    display: block;
    font-size: 16px;
    color: var(--text-main);
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-list-item {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.side-list-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
}

.side-list-item span {
    color: var(--text-soft);
    line-height: 1.5;
    font-size: 13px;
}

.status-box p {
    margin-top: 14px;
    color: var(--text-soft);
    line-height: 1.6;
}

.status-pill {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pill--success {
    background: var(--accent-soft);
    color: #fff;
}

/* previews */
.preview-theme-dark {
    background: linear-gradient(135deg, #07111d, #0d1726, #64748b);
}
.preview-theme-emerald {
    background: linear-gradient(135deg, #07111d, #0d1726, #16a34a);
}
.preview-theme-gold {
    background: linear-gradient(135deg, #15110a, #23180a, #d97706);
}
.preview-theme-neon {
    background: linear-gradient(135deg, #060816, #0d1020, #00e5ff);
}
.preview-theme-minimal {
    background: linear-gradient(135deg, #f4f7fb, #e8eef7, #94a3b8);
}
.preview-theme-glass {
    background: linear-gradient(
        135deg,
        rgba(22, 28, 45, 0.95),
        rgba(34, 40, 60, 0.72),
        rgba(96, 165, 250, 0.45)
    );
}
.preview-theme-corporate {
    background: linear-gradient(135deg, #0f172a, #162033, #2563eb);
}
.preview-theme-gradient {
    background: linear-gradient(135deg, #1e1b4b, #7c3aed, #ec4899);
}
.preview-theme-soft {
    background: linear-gradient(135deg, #f8fafc, #eef2ff, #c4b5fd);
}
.preview-theme-crypto {
    background: linear-gradient(135deg, #0a0f1f, #111827, #f59e0b);
}
.preview-theme-rose {
    background: linear-gradient(135deg, #1a0f17, #241320, #db2777);
}
.preview-theme-ocean {
    background: linear-gradient(135deg, #071722, #0b2230, #0891b2);
}
.preview-theme-sunset {
    background: linear-gradient(135deg, #1b1020, #271528, #ef4444);
}
.preview-theme-midnight {
    background: linear-gradient(135deg, #030712, #0b1120, #2563eb);
}
.preview-theme-lavender {
    background: linear-gradient(135deg, #f6f3ff, #f1edff, #7c3aed);
}
.preview-theme-forest {
    background: linear-gradient(135deg, #08130d, #102017, #15803d);
}
.preview-theme-ruby {
    background: linear-gradient(135deg, #18090c, #240d12, #b91c1c);
}
.preview-theme-slate {
    background: linear-gradient(135deg, #0f172a, #162033, #64748b);
}
.preview-theme-cyberpunk {
    background: linear-gradient(135deg, #090511, #140b1f, #8b5cf6);
}
.preview-theme-coffee {
    background: linear-gradient(135deg, #16100c, #211710, #8b5e3c);
}

@keyframes themeProgressIn {
    from {
        width: 0;
    }
}

@keyframes themeShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(220%);
    }
}

/* =========================================================
   3. THEMES
   ========================================================= */

/* 1. DARK */
:root,
body[data-theme="theme-dark"] {
    --bg-main: #07111d;
    --bg-secondary: #0d1726;
    --sidebar-bg: rgba(7, 17, 29, 0.92);
    --topbar-bg: rgba(10, 18, 31, 0.72);
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-soft: #9fb0c7;
    --accent: #64748b;
    --accent-soft: rgba(100, 116, 139, 0.16);
    --accent-strong: #475569;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

/* 2. EMERALD */
body[data-theme="theme-emerald"] {
    --bg-main: #07111d;
    --bg-secondary: #0d1726;
    --sidebar-bg: rgba(7, 17, 29, 0.92);
    --topbar-bg: rgba(10, 18, 31, 0.72);
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-soft: #9fb0c7;
    --accent: #22c55e;
    --accent-soft: rgba(34, 197, 94, 0.16);
    --accent-strong: #16a34a;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

/* 3. GOLD */
body[data-theme="theme-gold"] {
    --bg-main: #120e07;
    --bg-secondary: #1c140a;
    --sidebar-bg: rgba(18, 14, 7, 0.94);
    --topbar-bg: rgba(28, 20, 10, 0.78);
    --card-bg: rgba(255, 244, 219, 0.06);
    --card-bg-strong: rgba(255, 244, 219, 0.09);
    --border: rgba(255, 226, 161, 0.12);
    --text-main: #fff8eb;
    --text-soft: #d8c8a8;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.16);
    --accent-strong: #d97706;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

/* 4. NEON */
body[data-theme="theme-neon"] {
    --bg-main: #050816;
    --bg-secondary: #0a1020;
    --sidebar-bg: rgba(5, 8, 22, 0.94);
    --topbar-bg: rgba(10, 16, 32, 0.74);
    --card-bg: rgba(0, 229, 255, 0.05);
    --card-bg-strong: rgba(0, 229, 255, 0.08);
    --border: rgba(0, 229, 255, 0.16);
    --text-main: #effbff;
    --text-soft: #9cd6e2;
    --accent: #00e5ff;
    --accent-soft: rgba(0, 229, 255, 0.16);
    --accent-strong: #00b8d9;
    --danger: #ff5d73;
    --danger-soft: rgba(255, 93, 115, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

/* 5. MINIMAL */
body[data-theme="theme-minimal"] {
    --bg-main: #e9eef5;
    --bg-secondary: #f3f6fb;
    --sidebar-bg: rgba(248, 251, 255, 0.96);
    --topbar-bg: rgba(255, 255, 255, 0.94);
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-bg-strong: rgba(255, 255, 255, 0.96);
    --border: rgba(15, 23, 42, 0.14);
    --text-main: #0f172a;
    --text-soft: #526072;
    --accent: #334155;
    --accent-soft: rgba(51, 65, 85, 0.14);
    --accent-strong: #0f172a;
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.12);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

/* 6. GLASS */
body[data-theme="theme-glass"] {
    --bg-main: #09111f;
    --bg-secondary: #0c1527;
    --sidebar-bg: rgba(14, 23, 40, 0.62);
    --topbar-bg: rgba(18, 28, 48, 0.56);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-bg-strong: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.14);
    --text-main: #f8fafc;
    --text-soft: #b8c5d8;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.16);
    --accent-strong: #3b82f6;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.36);
}

/* 7. CORPORATE */
body[data-theme="theme-corporate"] {
    --bg-main: #0b1323;
    --bg-secondary: #111c30;
    --sidebar-bg: rgba(11, 19, 35, 0.94);
    --topbar-bg: rgba(17, 28, 48, 0.76);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f5f9ff;
    --text-soft: #9fb0c7;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.16);
    --accent-strong: #1d4ed8;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* 8. GRADIENT */
body[data-theme="theme-gradient"] {
    --bg-main: #110f22;
    --bg-secondary: #1a1633;
    --sidebar-bg: rgba(17, 15, 34, 0.94);
    --topbar-bg: rgba(26, 22, 51, 0.72);
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #fbf7ff;
    --text-soft: #c7bcf3;
    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.18);
    --accent-strong: #ec4899;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* 9. SOFT */
body[data-theme="theme-soft"] {
    --bg-main: #eef2ff;
    --bg-secondary: #f5f7ff;
    --sidebar-bg: rgba(250, 251, 255, 0.96);
    --topbar-bg: rgba(255, 255, 255, 0.92);
    --card-bg: rgba(255, 255, 255, 0.84);
    --card-bg-strong: rgba(255, 255, 255, 0.94);
    --border: rgba(99, 102, 241, 0.16);
    --text-main: #1e293b;
    --text-soft: #59677a;
    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.16);
    --accent-strong: #6d28d9;
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.1);
    --shadow: 0 18px 40px rgba(99, 102, 241, 0.1);
}

/* 10. CRYPTO */
body[data-theme="theme-crypto"] {
    --bg-main: #0a0f1f;
    --bg-secondary: #111827;
    --sidebar-bg: rgba(10, 15, 31, 0.95);
    --topbar-bg: rgba(17, 24, 39, 0.78);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(251, 191, 36, 0.14);
    --text-main: #f8fafc;
    --text-soft: #9ca3af;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --accent-strong: #f97316;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* 11. ROSE */
body[data-theme="theme-rose"] {
    --bg-main: #1a0f17;
    --bg-secondary: #241320;
    --sidebar-bg: rgba(26, 15, 23, 0.94);
    --topbar-bg: rgba(36, 19, 32, 0.76);
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(244, 114, 182, 0.14);
    --text-main: #fff7fb;
    --text-soft: #d8b4c7;
    --accent: #f472b6;
    --accent-soft: rgba(244, 114, 182, 0.16);
    --accent-strong: #db2777;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* 12. OCEAN */
body[data-theme="theme-ocean"] {
    --bg-main: #071722;
    --bg-secondary: #0b2230;
    --sidebar-bg: rgba(7, 23, 34, 0.94);
    --topbar-bg: rgba(11, 34, 48, 0.74);
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(34, 211, 238, 0.14);
    --text-main: #effcff;
    --text-soft: #9fd1dc;
    --accent: #22d3ee;
    --accent-soft: rgba(34, 211, 238, 0.16);
    --accent-strong: #0891b2;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* 13. SUNSET */
body[data-theme="theme-sunset"] {
    --bg-main: #1b1020;
    --bg-secondary: #271528;
    --sidebar-bg: rgba(27, 16, 32, 0.94);
    --topbar-bg: rgba(39, 21, 40, 0.76);
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(251, 146, 60, 0.14);
    --text-main: #fff8f2;
    --text-soft: #e7b899;
    --accent: #fb923c;
    --accent-soft: rgba(251, 146, 60, 0.16);
    --accent-strong: #ef4444;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* 14. MIDNIGHT */
body[data-theme="theme-midnight"] {
    --bg-main: #030712;
    --bg-secondary: #0b1120;
    --sidebar-bg: rgba(3, 7, 18, 0.96);
    --topbar-bg: rgba(11, 17, 32, 0.8);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(96, 165, 250, 0.12);
    --text-main: #f8fbff;
    --text-soft: #93a4bc;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.16);
    --accent-strong: #2563eb;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

/* 15. LAVENDER */
body[data-theme="theme-lavender"] {
    --bg-main: #efeaff;
    --bg-secondary: #f6f2ff;
    --sidebar-bg: rgba(251, 249, 255, 0.96);
    --topbar-bg: rgba(255, 255, 255, 0.94);
    --card-bg: rgba(255, 255, 255, 0.86);
    --card-bg-strong: rgba(255, 255, 255, 0.95);
    --border: rgba(124, 58, 237, 0.16);
    --text-main: #2b2240;
    --text-soft: #6f6491;
    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.16);
    --accent-strong: #6d28d9;
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.1);
    --shadow: 0 18px 40px rgba(124, 58, 237, 0.1);
}

/* 16. FOREST */
body[data-theme="theme-forest"] {
    --bg-main: #08130d;
    --bg-secondary: #102017;
    --sidebar-bg: rgba(8, 19, 13, 0.95);
    --topbar-bg: rgba(16, 32, 23, 0.78);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(34, 197, 94, 0.14);
    --text-main: #f3fff6;
    --text-soft: #9cc4a7;
    --accent: #22c55e;
    --accent-soft: rgba(34, 197, 94, 0.16);
    --accent-strong: #15803d;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* 17. RUBY */
body[data-theme="theme-ruby"] {
    --bg-main: #18090c;
    --bg-secondary: #240d12;
    --sidebar-bg: rgba(24, 9, 12, 0.95);
    --topbar-bg: rgba(36, 13, 18, 0.78);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(239, 68, 68, 0.14);
    --text-main: #fff5f5;
    --text-soft: #d7aaaa;
    --accent: #ef4444;
    --accent-soft: rgba(239, 68, 68, 0.16);
    --accent-strong: #b91c1c;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* 18. SLATE */
body[data-theme="theme-slate"] {
    --bg-main: #0f172a;
    --bg-secondary: #162033;
    --sidebar-bg: rgba(15, 23, 42, 0.95);
    --topbar-bg: rgba(22, 32, 51, 0.78);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(148, 163, 184, 0.14);
    --text-main: #f8fafc;
    --text-soft: #a6b4c3;
    --accent: #94a3b8;
    --accent-soft: rgba(148, 163, 184, 0.16);
    --accent-strong: #64748b;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* 19. CYBERPUNK */
body[data-theme="theme-cyberpunk"] {
    --bg-main: #090511;
    --bg-secondary: #140b1f;
    --sidebar-bg: rgba(9, 5, 17, 0.96);
    --topbar-bg: rgba(20, 11, 31, 0.8);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(236, 72, 153, 0.16);
    --text-main: #fff7fd;
    --text-soft: #d7b0cb;
    --accent: #ec4899;
    --accent-soft: rgba(236, 72, 153, 0.16);
    --accent-strong: #8b5cf6;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 26px 64px rgba(0, 0, 0, 0.34);
}

/* 20. COFFEE */
body[data-theme="theme-coffee"] {
    --bg-main: #16100c;
    --bg-secondary: #211710;
    --sidebar-bg: rgba(22, 16, 12, 0.95);
    --topbar-bg: rgba(33, 23, 16, 0.78);
    --card-bg: rgba(255, 248, 240, 0.05);
    --card-bg-strong: rgba(255, 248, 240, 0.07);
    --border: rgba(191, 132, 92, 0.16);
    --text-main: #fff8f2;
    --text-soft: #d4b9a7;
    --accent: #c08457;
    --accent-soft: rgba(192, 132, 87, 0.16);
    --accent-strong: #8b5e3c;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

/* Fixes de contraste para temas claros */
body[data-theme="theme-minimal"],
body[data-theme="theme-soft"],
body[data-theme="theme-lavender"] {
    color: var(--text-main);
}

body[data-theme="theme-minimal"] .brand-icon,
body[data-theme="theme-soft"] .brand-icon,
body[data-theme="theme-lavender"] .brand-icon {
    color: #fff;
}

body[data-theme="theme-minimal"] .dropdown-card,
body[data-theme="theme-soft"] .dropdown-card,
body[data-theme="theme-lavender"] .dropdown-card {
    background: rgba(255, 255, 255, 0.98);
}

body[data-theme="theme-minimal"] .nav-link,
body[data-theme="theme-soft"] .nav-link,
body[data-theme="theme-lavender"] .nav-link,
body[data-theme="theme-minimal"] .dropdown-link,
body[data-theme="theme-soft"] .dropdown-link,
body[data-theme="theme-lavender"] .dropdown-link,
body[data-theme="theme-minimal"] .theme-chip,
body[data-theme="theme-soft"] .theme-chip,
body[data-theme="theme-lavender"] .theme-chip,
body[data-theme="theme-minimal"] .profile-menu-btn,
body[data-theme="theme-soft"] .profile-menu-btn,
body[data-theme="theme-lavender"] .profile-menu-btn,
body[data-theme="theme-minimal"] .icon-btn,
body[data-theme="theme-soft"] .icon-btn,
body[data-theme="theme-lavender"] .icon-btn,
body[data-theme="theme-minimal"] .notification-btn,
body[data-theme="theme-soft"] .notification-btn,
body[data-theme="theme-lavender"] .notification-btn,
body[data-theme="theme-minimal"] .content-card,
body[data-theme="theme-soft"] .content-card,
body[data-theme="theme-lavender"] .content-card,
body[data-theme="theme-minimal"] .stat-card,
body[data-theme="theme-soft"] .stat-card,
body[data-theme="theme-lavender"] .stat-card,
body[data-theme="theme-minimal"] .hero-card,
body[data-theme="theme-soft"] .hero-card,
body[data-theme="theme-lavender"] .hero-card,
body[data-theme="theme-minimal"] .hero-side-card,
body[data-theme="theme-soft"] .hero-side-card,
body[data-theme="theme-lavender"] .hero-side-card,
body[data-theme="theme-minimal"] .theme-node,
body[data-theme="theme-soft"] .theme-node,
body[data-theme="theme-lavender"] .theme-node,
body[data-theme="theme-minimal"] .theme-badge-card,
body[data-theme="theme-soft"] .theme-badge-card,
body[data-theme="theme-lavender"] .theme-badge-card,
body[data-theme="theme-minimal"] .theme-goal-item,
body[data-theme="theme-soft"] .theme-goal-item,
body[data-theme="theme-lavender"] .theme-goal-item,
body[data-theme="theme-minimal"] .quick-action,
body[data-theme="theme-soft"] .quick-action,
body[data-theme="theme-lavender"] .quick-action,
body[data-theme="theme-minimal"] .mini-info-item,
body[data-theme="theme-soft"] .mini-info-item,
body[data-theme="theme-lavender"] .mini-info-item,
body[data-theme="theme-minimal"] .side-list-item,
body[data-theme="theme-soft"] .side-list-item,
body[data-theme="theme-lavender"] .side-list-item {
    color: var(--text-main);
}

body[data-theme="theme-minimal"] .page-heading p,
body[data-theme="theme-soft"] .page-heading p,
body[data-theme="theme-lavender"] .page-heading p,
body[data-theme="theme-minimal"] .brand-text p,
body[data-theme="theme-soft"] .brand-text p,
body[data-theme="theme-lavender"] .brand-text p,
body[data-theme="theme-minimal"] .content-card__header p,
body[data-theme="theme-soft"] .content-card__header p,
body[data-theme="theme-lavender"] .content-card__header p,
body[data-theme="theme-minimal"] .hero-card__content p,
body[data-theme="theme-soft"] .hero-card__content p,
body[data-theme="theme-lavender"] .hero-card__content p,
body[data-theme="theme-minimal"] .stat-note,
body[data-theme="theme-soft"] .stat-note,
body[data-theme="theme-lavender"] .stat-note,
body[data-theme="theme-minimal"] .stat-label,
body[data-theme="theme-soft"] .stat-label,
body[data-theme="theme-lavender"] .stat-label,
body[data-theme="theme-minimal"] .theme-node span,
body[data-theme="theme-soft"] .theme-node span,
body[data-theme="theme-lavender"] .theme-node span,
body[data-theme="theme-minimal"] .theme-badge-card span,
body[data-theme="theme-soft"] .theme-badge-card span,
body[data-theme="theme-lavender"] .theme-badge-card span,
body[data-theme="theme-minimal"] .theme-goal-item span,
body[data-theme="theme-soft"] .theme-goal-item span,
body[data-theme="theme-lavender"] .theme-goal-item span,
body[data-theme="theme-minimal"] .quick-action span,
body[data-theme="theme-soft"] .quick-action span,
body[data-theme="theme-lavender"] .quick-action span,
body[data-theme="theme-minimal"] .dropdown-title,
body[data-theme="theme-soft"] .dropdown-title,
body[data-theme="theme-lavender"] .dropdown-title,
body[data-theme="theme-minimal"] .profile-mini-meta span,
body[data-theme="theme-soft"] .profile-mini-meta span,
body[data-theme="theme-lavender"] .profile-mini-meta span {
    color: var(--text-soft);
}

body[data-theme="theme-minimal"] .hero-btn--soft,
body[data-theme="theme-soft"] .hero-btn--soft,
body[data-theme="theme-lavender"] .hero-btn--soft {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    border-color: var(--border);
}

body[data-theme="theme-minimal"] .theme-chip.active,
body[data-theme="theme-soft"] .theme-chip.active,
body[data-theme="theme-lavender"] .theme-chip.active,
body[data-theme="theme-minimal"] .nav-link.active,
body[data-theme="theme-soft"] .nav-link.active,
body[data-theme="theme-lavender"] .nav-link.active {
    color: var(--text-main);
}

body[data-theme="theme-minimal"] .nav-link__badge,
body[data-theme="theme-soft"] .nav-link__badge,
body[data-theme="theme-lavender"] .nav-link__badge,
body[data-theme="theme-minimal"] .cart-dot,
body[data-theme="theme-soft"] .cart-dot,
body[data-theme="theme-lavender"] .cart-dot {
    color: #fff;
}

body[data-theme="theme-minimal"] .stat-card__icon,
body[data-theme="theme-soft"] .stat-card__icon,
body[data-theme="theme-lavender"] .stat-card__icon,
body[data-theme="theme-minimal"] .quick-action__icon,
body[data-theme="theme-soft"] .quick-action__icon,
body[data-theme="theme-lavender"] .quick-action__icon,
body[data-theme="theme-minimal"] .theme-node__avatar,
body[data-theme="theme-soft"] .theme-node__avatar,
body[data-theme="theme-lavender"] .theme-node__avatar {
    color: #fff;
}

body[data-theme="theme-minimal"] .theme-node,
body[data-theme="theme-soft"] .theme-node,
body[data-theme="theme-lavender"] .theme-node,
body[data-theme="theme-minimal"] .theme-badge-card,
body[data-theme="theme-soft"] .theme-badge-card,
body[data-theme="theme-lavender"] .theme-badge-card,
body[data-theme="theme-minimal"] .theme-goal-item,
body[data-theme="theme-soft"] .theme-goal-item,
body[data-theme="theme-lavender"] .theme-goal-item,
body[data-theme="theme-minimal"] .quick-action,
body[data-theme="theme-soft"] .quick-action,
body[data-theme="theme-lavender"] .quick-action {
    background: rgba(255, 255, 255, 0.8);
}

/* extras */
body[data-theme="theme-glass"] .content-card,
body[data-theme="theme-glass"] .stat-card,
body[data-theme="theme-glass"] .hero-card,
body[data-theme="theme-glass"] .brand-box,
body[data-theme="theme-glass"] .dropdown-card {
    backdrop-filter: blur(24px);
}

body[data-theme="theme-neon"] .theme-progress__bar,
body[data-theme="theme-neon"] .brand-icon,
body[data-theme="theme-neon"] .stat-card__icon,
body[data-theme="theme-neon"] .quick-action__icon {
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

body[data-theme="theme-gold"] .theme-badge-card--earned,
body[data-theme="theme-gold"] .theme-stat-card--highlight,
body[data-theme="theme-crypto"] .theme-stat-card--highlight {
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
        var(--shadow);
}

/* =========================================================
   FIXES REALES PARA TEMAS CLAROS
   soft / minimal / lavender
   ========================================================= */

body[data-theme="theme-minimal"] .topbar,
body[data-theme="theme-soft"] .topbar,
body[data-theme="theme-lavender"] .topbar {
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
}

body[data-theme="theme-minimal"] .sidebar,
body[data-theme="theme-soft"] .sidebar,
body[data-theme="theme-lavender"] .sidebar {
    border-right: 1px solid var(--border);
}

body[data-theme="theme-minimal"] .content,
body[data-theme="theme-soft"] .content,
body[data-theme="theme-lavender"] .content {
    background:
        radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--accent) 8%, transparent),
            transparent 24%
        ),
        radial-gradient(
            circle at bottom right,
            color-mix(in srgb, var(--accent-strong) 6%, transparent),
            transparent 24%
        ),
        var(--bg-main);
}

body[data-theme="theme-minimal"] .hero-btn--soft,
body[data-theme="theme-soft"] .hero-btn--soft,
body[data-theme="theme-lavender"] .hero-btn--soft,
body[data-theme="theme-minimal"] .secondary-btn,
body[data-theme="theme-soft"] .secondary-btn,
body[data-theme="theme-lavender"] .secondary-btn,
body[data-theme="theme-minimal"] .theme-chip,
body[data-theme="theme-soft"] .theme-chip,
body[data-theme="theme-lavender"] .theme-chip,
body[data-theme="theme-minimal"] .icon-btn,
body[data-theme="theme-soft"] .icon-btn,
body[data-theme="theme-lavender"] .icon-btn,
body[data-theme="theme-minimal"] .notification-btn,
body[data-theme="theme-soft"] .notification-btn,
body[data-theme="theme-lavender"] .notification-btn,
body[data-theme="theme-minimal"] .profile-menu-btn,
body[data-theme="theme-soft"] .profile-menu-btn,
body[data-theme="theme-lavender"] .profile-menu-btn {
    background: color-mix(in srgb, var(--card-bg) 92%, #ffffff 8%);
    color: var(--text-main);
    border-color: var(--border);
}

body[data-theme="theme-minimal"] .theme-node,
body[data-theme="theme-soft"] .theme-node,
body[data-theme="theme-lavender"] .theme-node {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 8%, #ffffff 92%),
        color-mix(in srgb, var(--card-bg) 94%, #ffffff 6%)
    );
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-theme="theme-minimal"] .theme-node--me,
body[data-theme="theme-soft"] .theme-node--me,
body[data-theme="theme-lavender"] .theme-node--me {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 16%, #ffffff 84%),
        color-mix(in srgb, var(--accent-soft) 70%, #ffffff 30%)
    );
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
    box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 14%, transparent);
}

body[data-theme="theme-minimal"] .theme-node__avatar,
body[data-theme="theme-soft"] .theme-node__avatar,
body[data-theme="theme-lavender"] .theme-node__avatar {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
}

body[data-theme="theme-minimal"] .theme-network-tree__connector,
body[data-theme="theme-soft"] .theme-network-tree__connector,
body[data-theme="theme-lavender"] .theme-network-tree__connector {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 35%, transparent),
        color-mix(in srgb, var(--accent-strong) 20%, transparent)
    );
    opacity: 0.9;
}

body[data-theme="theme-minimal"] .content-card,
body[data-theme="theme-soft"] .content-card,
body[data-theme="theme-lavender"] .content-card,
body[data-theme="theme-minimal"] .stat-card,
body[data-theme="theme-soft"] .stat-card,
body[data-theme="theme-lavender"] .stat-card,
body[data-theme="theme-minimal"] .hero-card,
body[data-theme="theme-soft"] .hero-card,
body[data-theme="theme-lavender"] .hero-card,
body[data-theme="theme-minimal"] .hero-side-card,
body[data-theme="theme-soft"] .hero-side-card,
body[data-theme="theme-lavender"] .hero-side-card,
body[data-theme="theme-minimal"] .quick-action,
body[data-theme="theme-soft"] .quick-action,
body[data-theme="theme-lavender"] .quick-action,
body[data-theme="theme-minimal"] .mini-info-item,
body[data-theme="theme-soft"] .mini-info-item,
body[data-theme="theme-lavender"] .mini-info-item,
body[data-theme="theme-minimal"] .side-list-item,
body[data-theme="theme-soft"] .side-list-item,
body[data-theme="theme-lavender"] .side-list-item,
body[data-theme="theme-minimal"] .dropdown-card,
body[data-theme="theme-soft"] .dropdown-card,
body[data-theme="theme-lavender"] .dropdown-card {
    background: color-mix(in srgb, var(--card-bg) 90%, #ffffff 10%);
    border-color: var(--border);
}

body[data-theme="theme-minimal"] .nav-link.active,
body[data-theme="theme-soft"] .nav-link.active,
body[data-theme="theme-lavender"] .nav-link.active,
body[data-theme="theme-minimal"] .theme-chip.active,
body[data-theme="theme-soft"] .theme-chip.active,
body[data-theme="theme-lavender"] .theme-chip.active {
    color: var(--text-main);
}

body[data-theme="theme-minimal"] .nav-link__badge,
body[data-theme="theme-soft"] .nav-link__badge,
body[data-theme="theme-lavender"] .nav-link__badge,
body[data-theme="theme-minimal"] .cart-dot,
body[data-theme="theme-soft"] .cart-dot,
body[data-theme="theme-lavender"] .cart-dot {
    color: #fff;
}

body[data-theme="theme-lavender"] .topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(124, 58, 237, 0.16);
    backdrop-filter: blur(18px);
}

body[data-theme="theme-lavender"] .sidebar {
    background: rgba(251, 249, 255, 0.96);
    border-right: 1px solid rgba(124, 58, 237, 0.16);
}
/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-badges-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: 0.25s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 105;
        background: rgba(0, 0, 0, 0.45);
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 16px 18px;
    }

    .content {
        padding: 20px;
    }

    .theme-chart__bars {
        min-height: 220px;
    }

    .theme-node {
        width: 136px;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .theme-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .topbar {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .profile-mini-meta {
        display: none;
    }

    .theme-chart__bars {
        gap: 8px;
    }

    .theme-chart__bar {
        max-width: 26px;
        height: 180px;
    }

    .theme-badges-grid {
        grid-template-columns: 1fr;
    }

    .theme-network-tree__level {
        justify-content: flex-start;
    }

    .quick-actions-grid,
    .mini-info-grid,
    .dashboard-side {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-card__content h3 {
        font-size: 28px;
    }
}

@media (max-width: 520px) {
    .content {
        padding: 16px;
    }

    .page-heading h2 {
        font-size: 22px;
    }

    .page-heading p {
        font-size: 13px;
    }

    .topbar-right {
        flex-wrap: wrap;
        gap: 10px;
    }

    .profile-menu-btn {
        width: 100%;
        justify-content: space-between;
    }

    .theme-mini-grid {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .content-card,
    .stat-card {
        padding: 16px;
    }

    .theme-node,
    .theme-node--me {
        width: 100%;
    }

    .theme-network-tree__level,
    .theme-network-tree__level--mini {
        display: grid;
        grid-template-columns: 1fr;
    }

    .theme-level-meta,
    .theme-kpi-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 6px;
}

/* =========================
   TOPBAR LOGO CENTRADO
   ========================= */

.topbar {
    position: relative;
}

.topbar-center {
    position: absolute;
    left: 40%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.topbar-center-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    pointer-events: auto;
}

.topbar-center-logo img {
    max-height: 52px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
}

/* Ajuste para que no choque con el contenido lateral */
.topbar-left,
.topbar-right {
    position: relative;
    z-index: 3;
}

/* Tablets */
@media (max-width: 992px) {
    .topbar-center-logo img {
        max-height: 36px;
    }
}

/* Móvil: ocultar para no apretar el header */
@media (max-width: 768px) {
    .topbar-center {
        display: none;
    }
}
