/* ==========================================================================
   SCOPSY LAB - DASHBOARD STYLES
   v2.0 - Refactored using Core Design System
   ========================================================================== */

/* --- Header Specifics --- */
/* Moved to core.css */
/* Nav specific to dashboard can stay or be adjusted if needed, but core handles structure */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

/* Métricas Compactas no Header */
.metrics-compact {
    display: flex;
    gap: 20px;
    align-items: center;
}

.metric-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.metric-mini:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.metric-mini-icon {
    font-size: 16px;
}

.metric-mini strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 15px;
}

.user-name {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: var(--text-main);
    margin-bottom: var(--space-md);
    font-weight: 800;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Assistants/Modules Grid --- */
.assistants-section {
    padding: var(--space-xl) 0;
}

.assistants-section h2,
.progress-section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: var(--text-main);
}

.assistants-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 380px));
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

/* Card Customizations */
.assistant-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    padding: var(--space-xl);
    height: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    transition: transform 0.3s ease;
}

.assistant-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-badge {
    background: rgba(140, 82, 255, 0.1);
    color: var(--color-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assistant-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-main);
}

.card-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.card-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feature-tag svg {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

.card-footer {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Progress Section --- */
.progress-section {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-3xl);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 280px));
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.stat-card {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(140, 82, 255, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: var(--space-xs) 0;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* =========================================
   GAMIFICATION GRID - CORREÇÃO DE ALINHAMENTO
   ========================================= */

.gamification-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   RESPONSIVIDADE
   ========================================= */

@media (max-width: 968px) {
    .gamification-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .level-card,
    .freshness-indicator {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .assistants-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 20px;
    }

    /* Métricas compactas em mobile */
    .metrics-compact {
        gap: 12px;
    }

    .metric-mini {
        padding: 4px 8px;
        font-size: 12px;
    }

    .metric-mini-icon {
        font-size: 14px;
    }

    .metric-mini strong {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .level-card,
    .freshness-indicator {
        padding: 20px;
    }

    .level-name,
    .freshness-title {
        font-size: 18px;
    }

    .level-icon {
        font-size: 28px;
    }

    .freshness-icon {
        font-size: 32px;
    }

    .freshness-percentage {
        font-size: 20px;
    }
}

/* =========================================
   ACESSIBILIDADE
   ========================================= */

.level-card:focus-visible,
.freshness-indicator:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 2px;
}

/* Reduzir animações se o usuário preferir */
@media (prefers-reduced-motion: reduce) {
    .progress-fill,
    .freshness-fill,
    .freshness-icon,
    .freshness-indicator.critical {
        animation: none;
    }

    .level-card:hover,
    .freshness-indicator:hover {
        transform: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .assistants-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

/* --- Modules/Case Selection Specifics --- */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 520px));
    gap: var(--space-xl);
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.mode-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
    /* Ensure it behaves like a block */
    text-decoration: none;
    /* Remove underline */
    color: inherit;
    /* Inherit text color */
}

.mode-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.mode-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin: 20px 0 16px;
    color: var(--text-main);
}

.mode-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.mode-details {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.mode-details h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-main);
}

.mode-details ul {
    list-style: none;
}

.mode-details li {
    padding: 8px 0 8px 32px;
    position: relative;
    font-size: 1rem;
    color: var(--text-secondary);
}

.mode-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.2em;
}

.mode-btn {
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    padding: 18px;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: center;
    display: block;
}

.mode-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(140, 82, 255, 0.3);
}

.tip-box {
    text-align: center;
    margin: 80px auto 40px;
    padding: 32px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 900px;
}

.tip-box strong {
    color: var(--color-primary);
}

/* --- Trial & Locked UI --- */

/* Trial Banner */
/* Trial Banner */
.trial-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.5s ease;
}

.trial-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

.trial-content i {
    color: #ffd700;
}

.trial-content strong {
    color: #ffd700;
    font-size: 1.2rem;
}

.btn-upgrade {
    background: linear-gradient(90deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
    filter: brightness(1.1);
}

/* Locked Card */
.locked-card {
    opacity: 0.7;
    position: relative;
    cursor: not-allowed;
    filter: grayscale(0.8);
    transition: var(--transition);
}

.locked-card:hover {
    transform: none;
    box-shadow: none;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 16px;
    font-weight: 700;
    font-size: 1.2rem;
    backdrop-filter: blur(2px);
    border-radius: var(--radius-lg);
}

.locked-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff4757;
}

/* Trial Limit Infos (Inside Cards) */
.trial-limit-info {
    background: var(--bg-subtle);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.limit-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.limit-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.limit-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    text-align: right;
}

/* Trial Stats Section */
.trial-card .progress-bar {
    height: 10px;
    background: rgba(140, 82, 255, 0.1);
    border-radius: 5px;
    margin-top: 12px;
    overflow: hidden;
}

.trial-card .fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 5px;
    transition: width 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Freshness Alert Banner --- */
.freshness-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    border: 2px solid;
    animation: slideDown 0.4s ease-out;
    transition: all 0.3s ease;
}

.freshness-alert.good {
    background: #FFF4E6;
    border-color: #F59E0B;
}

.freshness-alert.warning {
    background: #FEF3E2;
    border-color: #F97316;
}

.freshness-alert.critical {
    background: #FEE2E2;
    border-color: #EF4444;
    animation: slideDown 0.4s ease-out, gentle-pulse 2s ease-in-out infinite;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.alert-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.alert-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}

.alert-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

.freshness-alert.critical .alert-text strong {
    color: #DC2626;
}

.alert-dismiss {
    background: none;
    border: none;
    font-size: 28px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.alert-dismiss:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #6B7280;
}

/* --- Modal Statistics --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    position: relative;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s ease;
}

.premium-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid var(--color-primary);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #1a1a2e;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.premium-modal h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.premium-modal p {
    font-size: 1.1rem;
    color: #a0a0b0;
    margin-bottom: 32px;
}

.premium-features-list {
    text-align: left;
    margin-bottom: 32px;
    list-style: none;
}

.premium-features-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

.premium-features-list li:last-child {
    border-bottom: none;
}

.premium-features-list li i {
    color: #ffd700;
}

.btn-upgrade-modal {
    display: inline-block;
    background: linear-gradient(90deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-upgrade-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #a0a0b0;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   SPRINT 3 - FEEDBACK VISUAL & MICRO-ANIMAÇÕES
   ========================================================================== */

/* 1. FLOATING COGNITS ANIMATION (+X 💎) */
.floating-cognits-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.floating-cognit {
    position: absolute;
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 0 2px 8px rgba(140, 82, 255, 0.4);
    animation: floatUp 2s ease-out forwards;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-cognit .cognit-emoji {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-60px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.8);
    }
}

/* 2. PROGRESS BAR SHIMMER EFFECT */
.progress-fill {
    position: relative;
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

.progress-fill.near-level::after {
    animation: shimmer 1s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* 3. ENHANCED HOVER EFFECTS (Cards) */
.assistant-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    opacity: 0;
    animation: cardFadeIn 0.6s ease-out forwards;
}

/* Cascade delay for each card */
.assistant-card:nth-child(1) { animation-delay: 0.1s; }
.assistant-card:nth-child(2) { animation-delay: 0.2s; }
.assistant-card:nth-child(3) { animation-delay: 0.3s; }
.assistant-card:nth-child(4) { animation-delay: 0.4s; }
.assistant-card:nth-child(5) { animation-delay: 0.5s; }
.assistant-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    opacity: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(140, 82, 255, 0.15),
        transparent 40%
    );
    transition: opacity 0.3s;
    pointer-events: none;
}

.assistant-card:hover::before {
    opacity: 1;
}

.assistant-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(140, 82, 255, 0.25),
        0 0 0 1px rgba(140, 82, 255, 0.1);
}

/* 4. BADGE UNLOCK MODAL */
.badge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.badge-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 48px;
    border-radius: 24px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: badgePopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.badge-modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(140, 82, 255, 0.1) 0%,
        transparent 70%
    );
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes badgePopIn {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.badge-modal-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: badgeBounce 1s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(140, 82, 255, 0.3));
    position: relative;
    z-index: 1;
}

@keyframes badgeBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.badge-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.badge-modal-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.badge-modal-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.badge-modal-xp {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(140, 82, 255, 0.1) 0%, rgba(0, 194, 255, 0.1) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    border: 2px solid rgba(140, 82, 255, 0.2);
    position: relative;
    z-index: 1;
}

.xp-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
}

.xp-amount {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.xp-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.badge-modal-close {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(140, 82, 255, 0.3);
    position: relative;
    z-index: 1;
}

.badge-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(140, 82, 255, 0.4);
}

/* 5. SKELETON LOADING STATES */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e8e8e8 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-lg);
}

.skeleton-text {
    width: 100%;
    height: 20px;
    margin-bottom: 12px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

/* Loading state para level card */
.level-card.loading .level-icon,
.level-card.loading .level-info,
.level-card.loading .cognit-counter {
    opacity: 0.5;
}

.level-card.loading .progress-fill {
    animation: shimmer 1s infinite;
}

/* Pulsing dot indicator */
.loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   SPRINT 4 - MICRO-INTERAÇÕES & POLIMENTO FINAL
   ========================================================================== */

/* BUTTON RIPPLE EFFECT */
.btn,
.btn-primary,
.btn-secondary,
.btn-logout,
.btn-upgrade,
.badge-modal-close,
.assistant-card {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* BUTTON ACTIVE STATE (Bounce) */
.btn:active,
.btn-primary:active,
.btn-upgrade:active {
    transform: scale(0.95);
}

.assistant-card:active {
    transform: translateY(-6px) scale(0.98);
}

/* Responsivo SPRINT 3 */
@media (max-width: 768px) {
    .floating-cognit {
        font-size: 20px;
    }

    .badge-modal-content {
        padding: 32px 24px;
    }

    .badge-modal-icon {
        font-size: 60px;
    }

    .badge-modal-name {
        font-size: 1.5rem;
    }
}