/* ========================================
   PadelWorldClub - Dashboard Layout
   2026 Premium Redesign — Gold Accent
   ======================================== */

/* Dashboard Layout - Sidebar + Content */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.dashboard-sidebar {
    background: #1a1a1a;
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(255, 215, 0, 0.08);
}

.sidebar-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.sidebar-logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-md) var(--space-sm);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: var(--space-lg);
}

/* Cuenta section: separated visually at the bottom */
.sidebar-section--account {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-section-title {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    padding: 0 var(--space-sm);
    margin-bottom: var(--space-xs);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 12px;
    border-radius: 14px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255,215,0,0.10);
}

.sidebar-link--active {
    color: #FFD700;
    background: rgba(255,215,0,0.12);
    font-weight: 600;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.08);
}

.sidebar-link--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #FFD700, #FFA500);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}

.sidebar-link--active svg {
    opacity: 1;
}

.sidebar-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1a1a1a;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

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

.sidebar-user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-tier {
    font-size: var(--font-size-xs);
    color: rgba(255,255,255,0.5);
}

.sidebar-logout {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 6px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar-logout:hover {
    color: var(--color-error);
    background: rgba(220,53,69,0.1);
}

.sidebar-logout svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ---- Content Area ---- */
.dashboard-content {
    background: var(--color-bg);
    padding: var(--space-xl) var(--space-2xl);
    min-height: 0;
}

.dashboard-header {
    margin-bottom: var(--space-xl);
}

.dashboard-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.dashboard-header p {
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* Cards */
.dashboard-card {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 215, 0, 0.08);
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    border-color: rgba(255,215,0,0.25);
    box-shadow: 0 4px 16px rgba(255,215,0,0.1);
}

.dashboard-card__title {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card__title a {
    font-size: var(--font-size-sm);
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card__title a:hover {
    text-decoration: underline;
}

/* Full-width Column Container */
.dashboard-col-full {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.dashboard-col-full:empty {
    display: none;
}

/* Stats Widget — transparent container */
.dashboard-widget--stats {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Compact Stats Grid */
.stats-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
}

.stat-compact {
    background: var(--color-white);
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
}

.stat-compact:has(.stat-compact__icon--gold) { border-left-color: var(--color-gold); }
.stat-compact:has(.stat-compact__icon--green) { border-left-color: var(--color-success); }
.stat-compact:has(.stat-compact__icon--blue) { border-left-color: var(--color-info); }
.stat-compact:has(.stat-compact__icon--purple) { border-left-color: #805ad5; }
.stat-compact:has(.stat-compact__icon--orange) { border-left-color: #ed8936; }

.stat-compact:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-compact__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-compact__icon svg {
    width: 20px;
    height: 20px;
}

.stat-compact__icon--gold { background: rgba(255,215,0,0.15); color: var(--color-gold-dark); }
.stat-compact__icon--green { background: rgba(40,167,69,0.15); color: var(--color-success); }
.stat-compact__icon--blue { background: rgba(23,162,184,0.15); color: var(--color-info); }
.stat-compact__icon--purple { background: rgba(128,90,213,0.15); color: #805ad5; }
.stat-compact__icon--orange { background: rgba(237,137,54,0.15); color: #ed8936; }

.stat-compact__value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.stat-compact__label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.stat-compact__bar {
    height: 4px;
    background: rgba(0,0,0,0.06);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.stat-compact__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Profile Widget */
.dashboard-widget--hero {
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #FFD700, #FFA500) 1;
    border-image-slice: 1;
}

.hero-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.hero-profile__left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.hero-profile__avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    max-width: 80px;
    min-height: 80px;
    max-height: 80px;
    border-radius: 50%;
    background-image: var(--color-gold-gradient);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1a1a1a;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 0 3px #FFD700, 0 0 16px rgba(255, 215, 0, 0.2);
}

.hero-profile__avatar span {
    line-height: 1;
}

.hero-profile__name {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.hero-profile__email {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.hero-profile__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-sm);
}

.hero-profile__badges {
    display: flex;
    gap: var(--space-sm);
}

.hero-profile__ranking {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge--gold {
    background: rgba(255,215,0,0.15);
    color: #b8860b;
}

.badge--free {
    background: rgba(0,0,0,0.06);
    color: var(--color-text-muted);
}

.badge--premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.25);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.quick-action {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: 18px;
    border: 2px solid var(--color-border);
    background: var(--color-white);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-weight: 600;
}

.quick-action:hover {
    border-color: #FFD700;
    background: rgba(255,215,0,0.04);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.12);
    transform: translateY(-2px);
}

.quick-action svg {
    width: 24px;
    height: 24px;
    color: #b8860b;
    flex-shrink: 0;
}

.quick-action span {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* Match list items — card style */
.match-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    margin-bottom: var(--space-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.match-item:hover {
    border-color: #FFD700;
    box-shadow: 0 4px 16px rgba(255,215,0,0.12);
    transform: translateY(-1px);
}

.match-item:last-child {
    margin-bottom: 0;
}

.match-item__date {
    text-align: center;
    min-width: 52px;
    flex-shrink: 0;
    background: rgba(255,215,0,0.08);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
}

.match-item__day {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #b8860b;
    line-height: 1;
}

.match-item__month {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.match-item__info {
    flex: 1;
    min-width: 0;
}

.match-item__title {
    font-weight: 600;
    color: var(--color-text);
}

.match-item__detail {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.match-item__status {
    font-size: var(--font-size-xs);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    flex-shrink: 0;
}

.match-item__status--filling {
    background: rgba(255,215,0,0.15);
    color: var(--color-gold-dark);
}

.match-item__status--full {
    background: rgba(255,193,7,0.15);
    color: #F57F17;
}

.match-item__status--court_reserved {
    background: rgba(33,150,243,0.15);
    color: #1565C0;
}

.match-item__status--scheduled {
    background: rgba(156,39,176,0.15);
    color: #7B1FA2;
}

.match-item__status--completed {
    background: rgba(0,0,0,0.06);
    color: var(--color-text-muted);
}

/* Premium CTA */
.premium-cta {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 20px;
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    color: #1a1a1a;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.premium-cta__text h3 {
    font-size: var(--font-size-lg);
    font-weight: 800;
    margin: 0 0 var(--space-xs);
}

.premium-cta__text p {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin: 0;
}

.premium-cta .btn {
    background: #1a1a1a;
    color: var(--color-gold);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.premium-cta .btn:hover {
    background: #333;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--color-text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
    margin-bottom: var(--space-md);
}

.empty-state p {
    font-size: var(--font-size-sm);
}

/* Placeholder page */
.placeholder-page {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.placeholder-page__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-xl);
    background: rgba(255,215,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(255, 215, 0, 0.05);
}

.placeholder-page__icon svg {
    width: 40px;
    height: 40px;
    color: #b8860b;
}

.placeholder-page h2 {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.placeholder-page p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton--text {
    height: 14px;
    width: 120px;
}

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

.skeleton--block {
    height: 60px;
    width: 100%;
}

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

/* Mobile hamburger for dashboard */
.dashboard-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: auto;
        flex-direction: row;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        border-top: 1px solid rgba(255,255,255,0.1);
        z-index: 200;
    }

    .sidebar-header,
    .sidebar-section-title,
    .sidebar-footer {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        padding: 0;
        width: 100%;
    }

    .sidebar-section {
        display: flex;
        flex-direction: row;
        margin: 0;
        width: 100%;
    }

    /* Reset account section push-to-bottom in mobile */
    .sidebar-section--account {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .sidebar-link {
        flex-direction: column;
        gap: 2px;
        padding: 8px 4px;
        font-size: 10px;
        flex: 1;
        text-align: center;
        justify-content: center;
        min-width: 0;
        border-radius: 0;
    }

    .sidebar-link--active::before {
        display: none;
    }

    .sidebar-link--active {
        border-top: 2px solid #FFD700;
    }

    .sidebar-link svg {
        width: 22px;
        height: 22px;
    }

    .sidebar-link .link-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-badge {
        position: absolute;
        top: 2px;
        right: 50%;
        transform: translateX(14px);
        margin-left: 0;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }

    /* Hide less important links on mobile bottom nav */
    .sidebar-link--secondary {
        display: none;
    }

    .dashboard-content {
        padding: var(--space-md);
        padding-bottom: 80px; /* space for bottom nav */
    }

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

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

    .premium-cta {
        flex-direction: column;
        text-align: center;
    }

    .hero-profile {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .hero-profile__right {
        align-items: flex-start;
    }

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

@media (max-width: 640px) {
    .dashboard-card {
        padding: var(--space-md);
    }

    .hero-profile__avatar {
        width: 60px;
        height: 60px;
        min-width: 60px;
        max-width: 60px;
        min-height: 60px;
        max-height: 60px;
        font-size: var(--font-size-lg);
    }

    .hero-profile__name {
        font-size: var(--font-size-lg);
    }

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

    .stat-compact {
        padding: var(--space-sm) var(--space-md);
    }

    .stat-compact__icon {
        width: 32px;
        height: 32px;
    }

    .stat-compact__value {
        font-size: var(--font-size-lg);
    }
}

/* ========================================
   Dashboard Widgets System - v3
   ======================================== */

/* --- 2-Column Grid Layout --- */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-lg);
    align-items: start;
}

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

.dashboard-grid-layout--single .dashboard-col-side {
    display: none;
}

.dashboard-col-main,
.dashboard-col-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* --- Widget Containers --- */
.dashboard-widget {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
    padding: var(--space-xl);
    animation: widgetFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 215, 0, 0.08);
}

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

.dashboard-widget__title {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-widget__title a {
    font-size: var(--font-size-sm);
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-widget__title a:hover {
    text-decoration: underline;
}

/* --- Header with Gear Button --- */
.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.dashboard-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.dashboard-header p {
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.dashboard-settings-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.dashboard-settings-btn:hover {
    border-color: #FFD700;
    color: #b8860b;
    background: rgba(255,215,0,0.06);
}

.dashboard-settings-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Settings Panel (Drawer Right) --- */
.dash-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-settings-overlay--open {
    opacity: 1;
    visibility: visible;
}

.dash-settings-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-settings-panel--open {
    right: 0;
}

.dash-settings-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.dash-settings-panel__header h2 {
    font-size: var(--font-size-lg);
    font-weight: 800;
    margin: 0;
}

.dash-settings-panel__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-settings-panel__close:hover {
    color: var(--color-text);
    background: rgba(0,0,0,0.05);
}

.dash-settings-panel__close svg {
    width: 20px;
    height: 20px;
}

.dash-settings-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-xl);
}

.dash-settings-panel__footer {
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

/* Settings Section */
.settings-section {
    margin-bottom: var(--space-xl);
}

.settings-section + .settings-section {
    border-top: 1px solid var(--color-border-light);
    padding-top: var(--space-lg);
}

.settings-section__label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

/* Layout Radio Selector */
.settings-layout-options {
    display: flex;
    gap: var(--space-sm);
}

.settings-layout-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.settings-layout-option:hover {
    border-color: #FFD700;
}

.settings-layout-option--active {
    border-color: #FFD700;
    background: rgba(255,215,0,0.06);
}

.settings-layout-option input {
    display: none;
}

.settings-layout-option__radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.settings-layout-option--active .settings-layout-option__radio {
    border-color: #b8860b;
}

.settings-layout-option--active .settings-layout-option__radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

/* Toggle Switch */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.settings-toggle-row:last-child {
    border-bottom: none;
}

.settings-toggle-row__label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
}

.settings-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle__slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-toggle__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.settings-toggle input:checked + .settings-toggle__slider {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.settings-toggle input:checked + .settings-toggle__slider::before {
    transform: translateX(20px);
}

/* Sub-options (visible only when parent widget is on) */
.settings-suboptions {
    padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
    border-left: 2px solid var(--color-border-light);
    margin-left: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.settings-suboptions--hidden {
    display: none;
}

.settings-suboptions label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
    display: block;
}

.settings-suboptions select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    background: var(--color-white);
    cursor: pointer;
}

.settings-suboptions select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.12);
}

/* Stats Checkboxes in Settings */
.settings-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.settings-stat-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
    padding: 4px 0;
}

.settings-stat-check input[type="checkbox"] {
    accent-color: #b8860b;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.settings-stat-check--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.settings-stat-check--disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.settings-stats-hint {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Reset Button */
.settings-reset-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.settings-reset-btn:hover {
    border-color: var(--color-error);
    color: var(--color-error);
    background: rgba(220,53,69,0.04);
}

/* Profile tier badge */
.badge--tier {
    background: rgba(128,90,213,0.15);
    color: #805ad5;
}

/* --- Match Type Badges --- */
.match-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.match-type-badge--competitive { background: rgba(255,215,0,0.18); color: var(--color-gold-dark); }
.match-type-badge--friendly { background: rgba(40,167,69,0.15); color: var(--color-success); }
.match-type-badge--club { background: rgba(23,162,184,0.15); color: var(--color-info); }
.match-type-badge--pwc { background: rgba(255,215,0,0.18); color: var(--color-gold-dark); }
.match-type-badge--default, .match-type-badge--external { background: rgba(0,0,0,0.06); color: var(--color-text-muted); }

/* --- Match Item Enhanced --- */
.match-item__title-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.match-item__time {
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.match-item__slots-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* --- Player Avatars (Flutter-style with tier color) --- */
.match-players {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.match-players__team {
    display: flex;
    gap: 6px;
}

.match-players__vs {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 0 2px;
    align-self: center;
}

.player-avatar-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.player-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px;
    max-height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #EEE;
    color: #555;
    border: 2px solid #999;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.player-avatar--empty {
    background: #FAFAFA;
    border: 2px dashed rgba(0,0,0,0.15);
    color: rgba(0,0,0,0.25);
    font-size: 16px;
}

.player-avatar__tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.player-avatar:hover .player-avatar__tooltip {
    display: block;
}

.player-avatar-slot__name {
    font-size: 10px;
    color: var(--color-text-muted);
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

/* --- Activity Timeline --- */
.activity-timeline {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 40px;
    bottom: -8px;
    width: 2px;
    background: var(--color-border-light);
}

.activity-item:last-child::before {
    display: none;
}

.activity-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-item__icon svg {
    width: 16px;
    height: 16px;
}

.activity-item__icon--match { background: rgba(255,215,0,0.15); color: #b8860b; }
.activity-item__icon--reserva { background: rgba(23,162,184,0.15); color: var(--color-info); }
.activity-item__icon--team { background: rgba(128,90,213,0.15); color: #805ad5; }
.activity-item__icon--tournament { background: rgba(40,167,69,0.15); color: var(--color-success); }

.activity-item__content {
    flex: 1;
    min-width: 0;
}

.activity-item__text {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    line-height: 1.4;
}

.activity-item__time {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Profile Link --- */
.hero-profile__link {
    font-size: var(--font-size-sm);
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-profile__link:hover {
    text-decoration: underline;
}

/* --- Quick Action Subtexts --- */
.quick-action__text {
    display: flex;
    flex-direction: column;
}

.quick-action__text small {
    font-size: var(--font-size-xs);
    font-weight: 400;
    color: var(--color-text-muted);
}

/* --- Recommended Matches Widget --- */
.rec-match {
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.rec-match:hover {
    border-color: #FFD700;
    box-shadow: 0 4px 16px rgba(255,215,0,0.12);
    transform: translateY(-1px);
}

.rec-match:last-child { margin-bottom: 0; }

.rec-match__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.rec-match__time {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text);
}

.rec-match__club {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.rec-match__city {
    color: var(--color-text-muted);
    font-weight: 400;
}

.rec-match__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rec-match__spots {
    font-size: var(--font-size-xs);
    color: var(--color-success);
    font-weight: 600;
    white-space: nowrap;
}

.empty-state__link {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.empty-state__link:hover {
    text-decoration: underline;
}

/* --- Responsive: Widgets --- */
@media (max-width: 1024px) {
    .dashboard-grid-layout {
        grid-template-columns: 1fr;
    }

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

    .dash-settings-panel {
        width: 100%;
        right: -100%;
    }

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

@media (max-width: 640px) {
    .dashboard-widget {
        padding: var(--space-md);
    }

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

    .player-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .player-avatar-slot__name {
        font-size: 9px;
        max-width: 44px;
    }

    .match-players {
        gap: 4px;
    }

    .match-players__team {
        gap: 4px;
    }

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

/* ========================================
   Skill Assessment Wizard
   ======================================== */

.assessment-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.assessment-overlay--visible { opacity: 1; }

.assessment-modal {
    background: #1a1a2e; border-radius: 18px; width: 95%; max-width: 520px;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
    transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.assessment-overlay--visible .assessment-modal { transform: translateY(0); }

.assessment-modal__header {
    padding: 24px 24px 16px; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.assessment-modal__header h2 { color: #fff; font-size: 20px; margin: 0 0 4px; font-weight: 800; }
.assessment-modal__header p { color: rgba(255,255,255,0.5); font-size: 13px; margin: 0 0 16px; }

.assessment-progress {
    height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden;
}
.assessment-progress__bar {
    height: 100%; background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 2px; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.assessment-step-label { color: rgba(255,255,255,0.4); font-size: 12px; margin-top: 8px; }

.assessment-modal__body { padding: 24px; overflow-y: auto; flex: 1; }

.assessment-question__icon { font-size: 32px; margin-bottom: 12px; }
.assessment-question h3 { color: #fff; font-size: 18px; margin: 0 0 4px; font-weight: 600; }
.assessment-question p { color: rgba(255,255,255,0.5); font-size: 13px; margin: 0 0 20px; }

.assessment-options { display: flex; flex-direction: column; gap: 8px; }

.assessment-option {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 10px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8); font-size: 14px; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); text-align: left; width: 100%;
}
.assessment-option:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,215,0,0.3); }
.assessment-option--selected {
    background: rgba(255,215,0,0.12) !important;
    border-color: #FFD700 !important; color: #fff;
}
.assessment-option__icon { font-size: 20px; flex-shrink: 0; }

.assessment-modal__footer {
    padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.assessment-btn {
    padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.assessment-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.assessment-btn--skip { background: transparent; color: rgba(255,255,255,0.4); }
.assessment-btn--skip:hover { color: rgba(255,255,255,0.7); }
.assessment-btn--back { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); margin-right: 8px; }
.assessment-btn--back:hover { background: rgba(255,255,255,0.15); }
.assessment-btn--next { background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }
.assessment-btn--next:hover:not(:disabled) { filter: brightness(1.1); }

.assessment-result { text-align: center; }
.assessment-result__icon {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid; overflow: hidden;
}
.assessment-result__icon img { width: 50px; height: 50px; object-fit: contain; }
.assessment-result h3 {
    color: rgba(255,255,255,0.6); font-size: 14px; margin: 0 0 4px;
    text-transform: uppercase; letter-spacing: 1px;
}
.assessment-result__tier { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.assessment-result__points { color: rgba(255,255,255,0.5); font-size: 14px; margin-bottom: 16px; }
.assessment-result__desc { color: rgba(255,255,255,0.5); font-size: 13px; margin-bottom: 20px; line-height: 1.5; }
.assessment-result__breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.assessment-result__breakdown > div {
    display: flex; justify-content: space-between; padding: 8px 12px;
    background: rgba(255,255,255,0.05); border-radius: 10px;
}
.assessment-result__breakdown span { color: rgba(255,255,255,0.5); font-size: 12px; }
.assessment-result__breakdown strong { color: #b8860b; font-size: 13px; }

@media (max-width: 480px) {
    .assessment-modal { width: 100%; max-width: none; border-radius: 18px 18px 0 0; align-self: flex-end; }
    .assessment-result__breakdown { grid-template-columns: 1fr; }
}
