/* ==============================================
   Dashboard Module - Premium Design
   ============================================== */

.dashboard-wrapper {
    min-height: 100vh;
}

/* ==============================================
   Hero Section
   ============================================== */

.dashboard-hero {
    position: relative;
    padding: 60px 40px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.dashboard-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 122, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 122, 255, 0.08) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.dashboard-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

.dashboard-hero-text {
    flex: 1;
}

.dashboard-greeting {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
}

.dashboard-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #00d4ff 50%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.dashboard-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 400px;
}

.dashboard-hero-actions {
    display: flex;
    gap: var(--spacing-md);
}

/* Glow Button */
.btn-glow {
    background: linear-gradient(135deg, var(--accent), #0066cc);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 122, 255, 0.5);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-glow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.btn-ghost-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.btn-ghost-light svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ==============================================
   Dashboard Content
   ============================================== */

.dashboard-content {
    margin-top: calc(-1 * var(--spacing-xl));
    position: relative;
    z-index: 2;
}

/* ==============================================
   Stats Grid - Premium Cards
   ============================================== */

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
}

.stat-card-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-card:hover .stat-card-glow {
    opacity: 1;
}

/* Color variants */
.stat-card-primary .stat-card-glow {
    background: radial-gradient(circle at 30% 50%, rgba(0, 122, 255, 0.15), transparent 70%);
}
.stat-card-primary:hover { border-color: rgba(0, 122, 255, 0.5); box-shadow: 0 10px 40px rgba(0, 122, 255, 0.2); }
.stat-card-primary .stat-card-icon { background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(0, 122, 255, 0.1)); color: var(--accent); }

.stat-card-success .stat-card-glow {
    background: radial-gradient(circle at 30% 50%, rgba(52, 199, 89, 0.15), transparent 70%);
}
.stat-card-success:hover { border-color: rgba(52, 199, 89, 0.5); box-shadow: 0 10px 40px rgba(52, 199, 89, 0.2); }
.stat-card-success .stat-card-icon { background: linear-gradient(135deg, rgba(52, 199, 89, 0.2), rgba(52, 199, 89, 0.1)); color: var(--success); }

.stat-card-warning .stat-card-glow {
    background: radial-gradient(circle at 30% 50%, rgba(255, 159, 10, 0.15), transparent 70%);
}
.stat-card-warning:hover { border-color: rgba(255, 159, 10, 0.5); box-shadow: 0 10px 40px rgba(255, 159, 10, 0.2); }
.stat-card-warning .stat-card-icon { background: linear-gradient(135deg, rgba(255, 159, 10, 0.2), rgba(255, 159, 10, 0.1)); color: var(--warning); }

.stat-card-cyan .stat-card-glow {
    background: radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.15), transparent 70%);
}
.stat-card-cyan:hover { border-color: rgba(0, 212, 255, 0.5); box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2); }
.stat-card-cyan .stat-card-icon { background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1)); color: var(--cyan); }

.stat-card.skeleton {
    height: 100px;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.stat-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.stat-card-trend {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--success-soft);
    color: var(--success);
}

/* ==============================================
   Quick Actions
   ============================================== */

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-action-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.quick-action-icon-search { background: rgba(0, 122, 255, 0.1); color: var(--accent); }
.quick-action-icon-players { background: rgba(52, 199, 89, 0.1); color: var(--success); }
.quick-action-icon-map { background: rgba(255, 159, 10, 0.1); color: var(--warning); }
.quick-action-icon-analysis { background: rgba(0, 212, 255, 0.1); color: var(--cyan); }

.quick-action-content {
    flex: 1;
    min-width: 0;
}

.quick-action-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.quick-action-content p {
    font-size: 12px;
    color: var(--text-tertiary);
}

.quick-action-arrow {
    width: 20px;
    height: 20px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.quick-action-card:hover .quick-action-arrow {
    transform: translateX(4px);
    stroke: var(--accent);
}

/* ==============================================
   Dashboard Grid
   ============================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--spacing-lg);
}

.dashboard-spotlight {
    grid-column: 1;
    grid-row: 1 / 3;
}

.dashboard-favorites {
    grid-column: 2;
    grid-row: 1;
}

.dashboard-matches {
    grid-column: 2;
    grid-row: 2;
}

.dashboard-contacts {
    grid-column: 1 / 3;
}

.dashboard-grid > div {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
}

/* ==============================================
   Spotlight Card
   ============================================== */

.spotlight-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spotlight-card:hover {
    transform: scale(1.02);
}

.spotlight-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(0, 212, 255, 0.05));
}

.spotlight-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.spotlight-photo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
}

.spotlight-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotlight-info {
    flex: 1;
}

.spotlight-name {
    font-size: 22px;
    font-weight: 700;
    margin: var(--spacing-sm) 0;
}

.spotlight-team {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.spotlight-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--text-tertiary);
}

.spotlight-action {
    flex-shrink: 0;
}

.spotlight-action svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.spotlight-empty {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-input);
    border-radius: var(--radius-lg);
}

.spotlight-empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    background: var(--accent-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotlight-empty-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

.spotlight-empty h4 {
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
}

.spotlight-empty p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-md);
}

/* ==============================================
   Favorites Avatars
   ============================================== */

.favorites-avatars {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.favorite-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.favorite-avatar:hover {
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

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

.favorite-avatar-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.favorite-avatar-more:hover {
    background: var(--accent);
    color: white;
}

/* ==============================================
   Matches Timeline
   ============================================== */

.matches-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.match-timeline-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--border);
    transition: all 0.3s ease;
}

.match-timeline-item:hover {
    background: var(--bg-card-hover);
}

.match-timeline-next {
    border-left-color: var(--accent);
    background: rgba(0, 122, 255, 0.05);
}

.match-timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.match-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.match-month {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.match-timeline-content {
    flex: 1;
}

.match-teams {
    font-size: 14px;
    font-weight: 600;
}

.match-info {
    display: flex;
    gap: var(--spacing-md);
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ==============================================
   Contacts Grid
   ============================================== */

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.contact-mini-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.contact-mini-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-role {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ==============================================
   Empty State Inline
   ============================================== */

.empty-state-inline {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-input);
    border-radius: var(--radius-lg);
}

.empty-state-inline p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-md);
}

/* ==============================================
   Recent Players Section
   ============================================== */

.dashboard-recent-players {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.recent-players-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
}

.recent-player-card {
    position: relative;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-align: center;
}

.recent-player-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.15);
    background: var(--bg-card-hover);
}

.recent-player-photo {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-sm);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border);
    transition: border-color 0.3s ease;
}

.recent-player-card:hover .recent-player-photo {
    border-color: var(--accent);
}

.recent-player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-player-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

.recent-player-badge svg {
    width: 12px;
    height: 12px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.recent-player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.recent-player-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-player-club {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.recent-player-date {
    font-size: 10px;
    color: var(--text-tertiary);
    padding: 2px 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-pill);
    margin-top: 4px;
}

.badge-xs {
    font-size: 10px;
    padding: 2px 6px;
}

/* ==============================================
   Dark Mode Enhancements
   ============================================== */

[data-theme="dark"] .dashboard-hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .stat-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .spotlight-card {
    background: rgba(0, 122, 255, 0.05);
}

[data-theme="dark"] .quick-action-card:hover {
    background: rgba(0, 122, 255, 0.1);
}

/* ==============================================
   Responsive
   ============================================== */

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

    .dashboard-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .recent-players-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .dashboard-spotlight,
    .dashboard-favorites,
    .dashboard-matches,
    .dashboard-contacts {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .dashboard-hero {
        padding: 40px 20px;
    }

    .dashboard-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-title {
        font-size: 28px;
    }

    .dashboard-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-glow,
    .btn-ghost-light {
        width: 100%;
        justify-content: center;
    }

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

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

    .contacts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recent-players-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spotlight-content {
        flex-direction: column;
        text-align: center;
    }

    .spotlight-action {
        width: 100%;
    }
}
