/* ============================================
   KMERLIONS - Dashboard Styles
   ============================================ */

/* Dashboard Layout */
.dashboard-body {
    background: var(--gray-50);
    min-height: 100vh;
}

/* Top Navbar */
.dashboard-navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
}

.dashboard-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--black);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-brand span {
    color: var(--yellow);
}

.dashboard-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-nav-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.dashboard-nav-links li a:hover {
    background: var(--gray-100);
    color: var(--black);
}

.dashboard-nav-links li a.active {
    background: var(--black);
    color: var(--white);
}

.dashboard-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--black);
    padding: 4px;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    padding: 24px;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--black);
    position: absolute;
    top: 16px;
    right: 16px;
}

.mobile-sidebar-links {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.mobile-sidebar-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
}

.mobile-sidebar-links li a:hover,
.mobile-sidebar-links li a.active {
    background: var(--gray-100);
    color: var(--black);
}

/* Main Content */
.dashboard-main {
    padding-top: 64px;
    min-height: 100vh;
}

.dashboard-content {
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Sections */
.dashboard-section {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.dashboard-section.active {
    display: block;
}

/* Welcome Card */
.welcome-card {
    background: var(--black);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 40px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-greeting {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.welcome-matricule {
    font-size: 14px;
    color: var(--gray-400);
    font-family: monospace;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.welcome-badge {
    display: inline-block;
    background: var(--yellow);
    color: var(--black);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

/* Stat Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--yellow);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--black);
}

.stat-card-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
}

.stat-card-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* QR Code Card */
.qr-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.qr-card img {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.qr-card-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 4px;
}

.qr-card-text {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* Section Title */
.section-title-sm {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 20px;
}

/* Event Cards */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.event-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.event-card-banner {
    height: 160px;
    background: var(--gray-200);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.event-card-body {
    padding: 20px;
}

.event-card-date {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.event-card-info {
    font-size: 13px;
    color: var(--gray-500);
    display: flex;
    gap: 16px;
}

.event-card-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Ticket Cards */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.ticket-item:hover {
    border-color: var(--yellow);
}

.ticket-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ticket-status-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.ticket-status-badge.valid {
    background: #D1FAE5;
    color: #065F46;
}

.ticket-status-badge.used {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Payment Blocker Modal */
.payment-blocker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.payment-blocker-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.payment-blocker-icon {
    width: 72px;
    height: 72px;
    background: #FFFBEB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    color: var(--yellow);
}

.payment-blocker-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.payment-blocker-text {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.payment-blocker-amount {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    color: var(--black);
    margin: 16px 0;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.payment-method-btn {
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.payment-method-btn:hover {
    border-color: var(--yellow);
    background: #FFFBEB;
}

.payment-method-btn.selected {
    border-color: var(--yellow);
    background: #FFFBEB;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.payment-method-btn img {
    height: 28px;
}

.payment-phone-input {
    margin-top: 16px;
}

/* Profile Form */
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-form-full {
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 991px) {
    .dashboard-nav-links {
        display: none;
    }

    .sidebar-toggle {
        display: block;
    }

    .welcome-card {
        padding: 24px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .dashboard-content {
        padding: 20px 16px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .payment-blocker-card {
        padding: 24px;
    }
}