/* ========================================
   PadelWorldClub - Dashboard Layout
   ======================================== */

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

.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: 8px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--space-md) var(--space-sm);
}

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

.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: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    position: relative;
}

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

.sidebar-link--active {
    color: var(--color-gold);
    background: rgba(255,215,0,0.1);
    font-weight: 600;
}

.sidebar-link--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--color-gold);
}

.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: var(--color-gold);
    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;
}

/* 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-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: 6px;
    transition: all var(--transition-fast);
    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: 100vh;
}

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

.dashboard-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

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

/* Cards */
.dashboard-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.dashboard-card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    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: var(--color-gold-dark);
    text-decoration: none;
    font-weight: 500;
}

.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: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-fast);
}

.stat-compact:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-compact__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    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: var(--color-gold-dark);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* Hero Profile Widget */
.dashboard-widget--hero {
    border-left: 4px solid var(--color-gold);
}

.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 var(--color-gold);
}

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

.hero-profile__name {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
}

.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: var(--color-gold-dark);
}

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

.badge--premium {
    background: var(--color-gold-gradient);
    color: #1a1a1a;
}

/* 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: var(--radius-md);
    border: 2px solid var(--color-border);
    background: var(--color-white);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-fast);
    text-align: center;
    font-weight: 600;
}

.quick-action:hover {
    border-color: var(--color-gold);
    background: rgba(255,215,0,0.04);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-action svg {
    width: 24px;
    height: 24px;
    color: var(--color-gold-dark);
    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: var(--radius-sm);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.match-item:hover {
    border-color: var(--color-gold);
    box-shadow: var(--shadow-sm);
}

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

.match-item__date {
    text-align: center;
    min-width: 52px;
    flex-shrink: 0;
}

.match-item__day {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-gold-dark);
    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(40,167,69,0.15);
    color: var(--color-success);
}

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

/* Premium CTA */
.premium-cta {
    background: var(--color-gold-gradient);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    color: #1a1a1a;
}

.premium-cta__text h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    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;
}

.placeholder-page__icon svg {
    width: 40px;
    height: 40px;
    color: var(--color-gold-dark);
}

.placeholder-page h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

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

    .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 var(--color-gold);
    }

    .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: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    animation: widgetFadeIn 0.3s ease;
}

@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: 700;
    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: var(--color-gold-dark);
    text-decoration: none;
    font-weight: 500;
}

.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: 700;
    color: var(--color-text);
    margin: 0;
}

.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: var(--color-gold);
    color: var(--color-gold-dark);
    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 ease, visibility 0.3s ease;
}

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

.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: 700;
    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__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: var(--color-gold);
}

.settings-layout-option--active {
    border-color: var(--color-gold);
    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: var(--color-gold-dark);
}

.settings-layout-option--active .settings-layout-option__radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gold-dark);
}

/* 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: 12px;
    cursor: pointer;
    transition: background 0.25s ease;
}

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

.settings-toggle input:checked + .settings-toggle__slider {
    background: var(--color-gold-dark);
}

.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: var(--color-gold);
}

/* 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: var(--color-gold-dark);
    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;
    border-bottom: 1px solid var(--color-border-light);
}

.activity-item:last-child {
    border-bottom: 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: var(--color-gold-dark); }
.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;
}

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