/* ==========================================================================
   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);
}

.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(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* 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, 1fr));
    gap: var(--space-lg);
}

.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;
}

/* Responsiveness */
@media (max-width: 768px) {


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

    .hero {
        padding-top: 20px;
    }
}

/* --- 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: 1180px;
    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);
    }
}

/* --- 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;
    }
}