/**
 * cards.css
 * Extracted from inline styles across EnigmAPI frontend
 * Contains all reusable card component styles
 */

/* ========================================
   STAT CARD PATTERNS
   Extracted from: dashboard.html, analytics.html, and 40+ other files
   ======================================== */

/**
 * Base Stat Card
 * Most duplicated pattern - found in 42 files
 */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   PAGE CARD PATTERNS
   Extracted from: index.html, navigation pages
   ======================================== */

.page-card {
    background: rgba(15, 22, 41, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.page-card-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.page-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   GUIDE SECTION CARD
   Extracted from: api-key-setup.html, setup guides
   ======================================== */

.guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.section-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   CHART SECTION CARD
   Extracted from: analytics.html, dashboard.html
   ======================================== */

.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   WELCOME SECTION CARD
   Extracted from: dashboard.html
   ======================================== */

.welcome-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.welcome-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.welcome-text h1 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   ACCOUNT BADGES
   Extracted from: dashboard.html
   ======================================== */

.account-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge-item {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-item.premium {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(202, 138, 4, 0.15));
    border-color: rgba(234, 179, 8, 0.3);
    color: #fbbf24;
}

.badge-item.verified {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* ========================================
   FILTER BAR CARD
   Extracted from: assigned-bots.html, trade-history.html
   ======================================== */

.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ========================================
   BOT PERFORMANCE CARD
   Extracted from: dashboard.html, assigned-bots.html
   ======================================== */

.bot-performance {
    text-align: right;
}

.bot-profit {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.bot-profit.positive {
    color: var(--success);
}

.bot-profit.negative {
    color: var(--danger);
}

.bot-profit.neutral {
    color: var(--text-secondary);
}

/* ========================================
   CARD VARIANTS
   ======================================== */

.card-compact {
    padding: 1rem;
}

.card-spacious {
    padding: 2.5rem;
}

.card-hover-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.card-no-hover {
    transform: none !important;
}

.card-no-hover:hover {
    transform: none !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 24px;
    }

    .welcome-section {
        padding: 1.5rem;
    }

    .welcome-avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .welcome-text h1 {
        font-size: 22px;
    }

    .guide-section {
        padding: 1.5rem;
    }
}
