/* PADLZ - Design System v2 - Global Styles */
/* Fonts loaded via <link> in HTML for better performance */

:root {
    --sidebar-bg: #0a0f1a;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --bg-main: #111827;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #0f172a;
    --bg-dark: #0a0f1a;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-orange: #fb923c;
    --accent-blue: #38bdf8;
    --accent-green: #4ade80;
    --accent-red: #f87171;
    --accent-yellow: #fcd34d;
    --accent-purple: #a78bfa;
    --border-color: #334155;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
    --sidebar-width: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', system-ui, sans-serif; background: var(--bg-main); color: var(--text-primary); line-height: 1.6; min-height: 100vh; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); padding: 24px 16px; display: flex; flex-direction: column; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; border-right: 1px solid rgba(255,255,255,0.05); }
.sidebar-logo { color: #fff; margin-bottom: 32px; padding: 0 8px; }
.sidebar-logo svg { width: 100%; height: auto; }
.nav-section { margin-bottom: 24px; }
.nav-section-title { font-size: 0.75rem; font-weight: 600; color: var(--sidebar-text); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 12px; margin-bottom: 8px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--border-radius); color: var(--sidebar-text); font-weight: 500; transition: all 0.2s; margin-bottom: 4px; }
.nav-link:hover { background: rgba(255,255,255,0.1); color: var(--sidebar-text-active); }
.nav-link.active { background: var(--accent-blue); color: var(--sidebar-text-active); }
.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-nav { flex: 1; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; margin-top: auto; }
.user-info { display: flex; align-items: center; gap: 12px; padding: 8px; cursor: pointer; border-radius: var(--border-radius); transition: background 0.2s; }
.user-info:hover { background: rgba(255,255,255,0.1); }
.user-avatar { width: 40px; height: 40px; border-radius: var(--border-radius-full); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; overflow: hidden; flex-shrink: 0; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-details { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 0.9rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.75rem; color: var(--sidebar-text); }
.logout-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px; color: var(--accent-red); font-size: 0.85rem; font-weight: 500; margin-top: 8px; }
.logout-btn:hover { opacity: 0.8; }

/* Main Content */
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 32px 40px; min-height: 100vh; }

/* Page Header */
.page-header { margin-bottom: 32px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }
.back-link:hover { color: var(--text-primary); }
.season-badge { display: inline-block; background: var(--accent-blue); color: white; padding: 4px 12px; border-radius: var(--border-radius-full); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.welcome-text { color: var(--text-secondary); font-size: 0.95rem; margin-left: 12px; }
.page-title { font-size: 2.5rem; font-weight: 800; margin-top: 8px; }
.page-title span { color: var(--accent-blue); }
.page-subtitle { color: var(--text-muted); font-size: 1rem; margin-top: 4px; }

/* Section */
.section { margin-bottom: 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; font-weight: 700; }
.section-title .icon { width: 40px; height: 40px; background: var(--accent-blue); border-radius: var(--border-radius); display: flex; align-items: center; justify-content: center; color: white; }
.section-subtitle { color: var(--text-muted); font-size: 0.85rem; }
.section-footer { margin-top: 16px; }

/* Cards */
.card { background: var(--bg-card); border-radius: var(--border-radius-lg); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Section Cards */
.section-card { background: var(--bg-card); border-radius: var(--border-radius-lg); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); margin-bottom: 24px; }
.section-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-card-icon { width: 32px; height: 32px; background: var(--bg-input); border-radius: var(--border-radius); display: flex; align-items: center; justify-content: center; color: var(--accent-blue); }
.section-card-title { font-weight: 700; font-size: 1.1rem; }

/* Grids */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.events-list { display: flex; flex-direction: column; gap: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--border-radius); font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--sidebar-bg); color: white; }
.btn-primary:hover { background: #334155; }
.btn-accent { background: var(--accent-blue); color: white; }
.btn-accent:hover { background: #0284c7; }
.btn-success { background: var(--accent-green); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--border-color); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--text-primary); color: var(--text-primary); }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,0.3); color: white; }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: var(--accent-red); color: white; }
.btn-outline-danger { background: transparent; border: 2px solid var(--accent-red); color: var(--accent-red); }
.btn-outline-danger:hover { background: var(--accent-red); color: white; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-icon { padding: 8px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon svg { display: block; }

/* Danger Zone */
.danger-zone { border: 1px solid var(--accent-red); border-radius: var(--border-radius); overflow: hidden; }
.danger-zone-header { background: rgba(239, 68, 68, 0.1); color: var(--accent-red); padding: 10px 16px; font-weight: 600; font-size: 0.85rem; border-bottom: 1px solid var(--accent-red); }
.danger-zone-content { padding: 16px; }
.danger-zone-content p { color: var(--text-secondary); font-size: 0.9rem; margin: 0 0 12px 0; }
.danger-zone-content .btn { margin-top: 4px; }

/* Delete Warning Modal */
.delete-warning { text-align: center; padding: 10px 0; }
.delete-warning-icon { font-size: 3rem; margin-bottom: 10px; }
.delete-warning h3 { margin: 0 0 15px 0; color: var(--text-primary); }
.delete-warning p { color: var(--text-secondary); margin: 0 0 10px 0; }
.delete-warning ul { text-align: left; color: var(--text-secondary); margin: 15px 0; padding-left: 25px; }
.delete-warning ul li { margin-bottom: 6px; }
.delete-warning .text-danger { color: var(--accent-red) !important; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.form-input { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--border-radius); color: var(--text-primary); font-family: inherit; font-size: 0.95rem; }
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(56,189,248,0.25); }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-checkbox input { width: 18px; height: 18px; accent-color: var(--accent-blue); }
.form-hint { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.partner-select-container select { padding-right: 36px; }
.partner-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    color: var(--accent-yellow);
}
.partner-warning svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Avatar Upload */
.avatar-upload { display: flex; align-items: center; gap: 20px; }
.avatar-preview { width: 80px; height: 80px; border-radius: var(--border-radius-full); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: white; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Image Upload */
.image-upload-area { border: 2px dashed var(--border-color); border-radius: var(--border-radius); padding: 32px; text-align: center; cursor: pointer; }
.image-upload-area:hover { border-color: var(--accent-blue); background: rgba(14,165,233,0.05); }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-top: 16px; }
.image-preview { position: relative; border-radius: var(--border-radius); overflow: hidden; aspect-ratio: 1; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-remove { position: absolute; top: 4px; right: 4px; background: var(--accent-red); color: white; border: none; width: 24px; height: 24px; border-radius: var(--border-radius-full); cursor: pointer; }

/* Badges */
.badge { display: inline-flex; padding: 4px 10px; border-radius: var(--border-radius-full); font-size: 0.75rem; font-weight: 600; }
.badge-blue { background: rgba(14,165,233,0.15); color: var(--accent-blue); }
.badge-green { background: rgba(34,197,94,0.15); color: var(--accent-green); }
.badge-orange { background: rgba(249,115,22,0.15); color: var(--accent-orange); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.badge-yellow { background: rgba(251,191,36,0.15); color: #b45309; }
.peiling-badge { background: rgba(251,191,36,0.15); color: #b45309; padding: 2px 8px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; border-radius: var(--border-radius-full); }
.vol-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(239,68,68,0.1); color: var(--accent-red); padding: 6px 12px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; border-radius: var(--border-radius-full); border: 1px solid rgba(239,68,68,0.2); }
.vol-badge svg { stroke: var(--accent-red); }
.status-badge { display: inline-flex; align-items: center; padding: 5px 10px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-radius: var(--border-radius-full); }
.status-vol { background: rgba(239,68,68,0.1); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.2); }
.status-open { background: rgba(34,197,94,0.1); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.2); }
.sold-badge { background: var(--accent-red); color: white; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; border-radius: var(--border-radius-full); }

/* Tooltips */
.tooltip { position: relative; cursor: help; }
.tooltip::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--bg-dark); color: white; padding: 8px 12px; border-radius: var(--border-radius); font-size: 0.75rem; font-weight: 400; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s; z-index: 100; box-shadow: var(--shadow-lg); }
.tooltip::before { content: ''; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--bg-dark); opacity: 0; visibility: hidden; transition: all 0.2s; z-index: 100; }
.tooltip:hover::after, .tooltip:hover::before { opacity: 1; visibility: visible; }

/* Tables */
.table-container { overflow-x: auto; border-radius: var(--border-radius-lg); background: var(--bg-card); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; }
th { background: var(--bg-input); font-weight: 600; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; }
td { border-bottom: 1px solid var(--border-color); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-hover); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border-radius: var(--border-radius-lg); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.3s; }
.modal.modal-lg { max-width: 900px; }
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-color); }
.modal-title { font-size: 1.25rem; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: var(--border-radius-full); background: var(--bg-input); border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--accent-red); color: white; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); display: flex; gap: 12px; justify-content: flex-end; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--bg-input); padding: 4px; border-radius: var(--border-radius); margin-bottom: 24px; }
.tab { flex: 1; padding: 10px 16px; border: none; background: transparent; color: var(--text-secondary); font-family: inherit; font-weight: 500; cursor: pointer; border-radius: calc(var(--border-radius) - 4px); }
.tab:hover { color: var(--text-primary); }
.tab.active { background: var(--bg-card); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* Alerts */
.alert { position: fixed; top: 20px; right: 20px; z-index: 2000; min-width: 300px; padding: 14px 18px; border-radius: var(--border-radius); animation: slideIn 0.3s ease; }
.alert-success { background: var(--accent-green); color: white; }
.alert-error { background: var(--accent-red); color: white; }
.alert-info { background: var(--accent-blue); color: white; }

/* ===== Badge Toast - Tier System ===== */
.badge-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150px);
    z-index: 2001;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}
.badge-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Badge Toast - Tier Border Colors */
.badge-toast-bronze { border-color: #cd7f32; }
.badge-toast-silver { border-color: #c0c0c0; }
.badge-toast-gold { border-color: #ffd700; }
.badge-toast-diamond { border-color: #00ffff; }

.badge-toast-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}
.badge-toast-icon svg {
    width: 100%;
    height: 100%;
}
.badge-toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.badge-toast-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.badge-toast-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.badge-toast-tier {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    background: var(--bg-input);
}
.badge-toast-bronze .badge-toast-tier { color: #cd7f32; }
.badge-toast-silver .badge-toast-tier { color: #c0c0c0; }
.badge-toast-gold .badge-toast-tier { color: #ffd700; }
.badge-toast-diamond .badge-toast-tier { color: #00ffff; }
.badge-toast-xp {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-yellow);
    margin-top: 2px;
}

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.text-green { color: var(--accent-green) !important; }
.text-blue { color: var(--accent-blue) !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.hidden { display: none !important; }

/* Image Cropper Modal */
.crop-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.crop-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.crop-modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    margin: 16px;
}
.crop-modal-overlay.active .crop-modal {
    transform: scale(1);
}
.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.crop-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}
.crop-container {
    width: 100%;
    height: 300px;
    background: #1a1a1a;
    overflow: hidden;
}
.crop-container img {
    display: block;
    max-width: 100%;
}
.crop-controls {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px;
    background: var(--bg-input);
    border-top: 1px solid var(--border-color);
}
.crop-zoom, .crop-rotate {
    display: flex;
    align-items: center;
    gap: 8px;
}
.crop-zoom span, .crop-rotate span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
}
.crop-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

/* Cropper.js overrides */
.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}
.cropper-view-box {
    box-shadow: 0 0 0 1px var(--accent-blue);
    outline: 0;
}
.cropper-line {
    background-color: var(--accent-blue);
}
.cropper-point {
    background-color: var(--accent-blue);
    width: 10px !important;
    height: 10px !important;
    opacity: 1;
}
.cropper-dashed {
    border-color: rgba(255, 255, 255, 0.5);
}
.cropper-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    accent-color: var(--accent-blue);
}

/* Form Improvements */
.form-group label.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

textarea.form-input {
    min-height: 200px;
    resize: vertical;
    font-family: 'Outfit', monospace;
    line-height: 1.5;
}

/* Account Page */
.account-page {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.account-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
}
.account-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px 0;
}
.account-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}
.account-avatar {
    margin-bottom: 8px;
}
.account-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.account-email {
    color: var(--text-muted);
    margin: 4px 0 0;
}
.account-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
}
.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-blue);
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.account-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.account-badges-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.account-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    cursor: default;
}
.account-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.account-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.account-badge-icon svg {
    display: block;
}
.account-badge-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Account Badge - Tier System ===== */

/* Badge Container with Tier Styling */
.account-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    cursor: default;
    border: 1px solid var(--border-color);
    overflow: hidden; /* BELANGRIJK: houdt effecten binnen */
}
.account-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.account-badge-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-badge-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Tier-based Account Badge Backgrounds */
.account-badge.badge-tier-bronze.badge-earned {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08), var(--bg-input));
    border-color: rgba(205, 127, 50, 0.25);
}
.account-badge.badge-tier-silver.badge-earned {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.08), var(--bg-input));
    border-color: rgba(192, 192, 192, 0.25);
}
.account-badge.badge-tier-gold.badge-earned {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), var(--bg-input));
    border-color: rgba(255, 215, 0, 0.25);
}
.account-badge.badge-tier-diamond.badge-earned {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.08), var(--bg-input));
    border-color: rgba(0, 255, 255, 0.25);
}

/* Hover Effects per Tier */
.account-badge.badge-tier-bronze.badge-earned:hover { border-color: rgba(205, 127, 50, 0.5); }
.account-badge.badge-tier-silver.badge-earned:hover { border-color: rgba(192, 192, 192, 0.5); }
.account-badge.badge-tier-gold.badge-earned:hover { border-color: rgba(255, 215, 0, 0.5); }
.account-badge.badge-tier-diamond.badge-earned:hover { border-color: rgba(0, 255, 255, 0.5); }

/* Icon Hover Scale */
.account-badge.badge-earned:hover .account-badge-icon {
    transform: scale(1.1);
}

/* Locked Badge Styling */
.account-badge.badge-locked {
    opacity: 0.4;
}
.account-badge.badge-locked .account-badge-icon svg {
    filter: grayscale(1) brightness(0.6);
}
.account-badge.badge-locked .account-badge-name {
    color: var(--text-muted);
}
.badge-lock-icon {
    font-size: 0.7rem;
    margin-left: auto;
    opacity: 0.5;
}
.account-badge.badge-locked:hover {
    opacity: 0.55;
}

/* Diamond Tier - Subtle Pulse */
.account-badge.badge-tier-diamond.badge-earned {
    animation: accountDiamondPulse 3s ease-in-out infinite;
}
@keyframes accountDiamondPulse {
    0%, 100% { border-color: rgba(0, 255, 255, 0.25); }
    50% { border-color: rgba(0, 255, 255, 0.5); }
}

/* Shimmer effect - contained within badge */
.account-badge.badge-tier-gold.badge-earned::after,
.account-badge.badge-tier-diamond.badge-earned::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: badgeShimmer 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes badgeShimmer {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* ===== Spelers Page ===== */
.spelers-search {
    margin-bottom: 20px;
    max-width: 400px;
}
.spelers-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.spelers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Speler Card */
.speler-card {
    display: grid;
    grid-template-columns: 32px 44px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.speler-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

/* Rank number */
.speler-rank {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

/* Avatar */
.speler-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}
.speler-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info section */
.speler-info {
    min-width: 0;
}
.speler-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.speler-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.speler-strength {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: var(--border-radius-full);
}

/* Stats */
.speler-stats {
    display: flex;
    gap: 16px;
}
.speler-stat {
    text-align: center;
    min-width: 50px;
}
.speler-stat-value {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-blue);
}
.speler-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Badges */
.speler-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 80px;
    justify-content: flex-end;
}
.speler-badges-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
}
/* ===== Speler Badge - Tier System ===== */
.speler-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}
.speler-badge:hover {
    transform: scale(1.15);
    z-index: 1;
}
.speler-badge svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Tier-based hover glow */
.speler-badge.badge-tier-bronze:hover { box-shadow: 0 2px 10px rgba(205, 127, 50, 0.4); }
.speler-badge.badge-tier-silver:hover { box-shadow: 0 2px 10px rgba(192, 192, 192, 0.4); }
.speler-badge.badge-tier-gold:hover { box-shadow: 0 2px 12px rgba(255, 215, 0, 0.5); }
.speler-badge.badge-tier-diamond:hover { box-shadow: 0 2px 14px rgba(0, 255, 255, 0.5); }

/* Auth Pages */
.auth-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-container .card {
    padding: 40px;
}

.verification-icon,
.success-icon,
.error-icon,
.loading-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

.verification-icon { color: var(--accent-blue); }
.success-icon { color: var(--accent-green); }
.error-icon { color: var(--accent-red); }
.loading-icon {
    color: var(--accent-orange);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}
.mobile-header-left {
    display: flex;
    align-items: center;
}
.mobile-header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.mobile-logo {
    display: grid;
    place-items: center;
}
.mobile-logo svg {
    width: 80px;
    height: auto;
    color: var(--text-primary);
}
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
}
.mobile-header-btn:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}
.mobile-notifications .notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.mobile-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    overflow: hidden;
    pointer-events: none;
}
.mobile-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.mobile-menu-toggle .close-icon {
    display: none;
}
.mobile-menu-toggle.active .hamburger-icon {
    display: none;
}
.mobile-menu-toggle.active .close-icon {
    display: block;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
}

/* ===== Notification System ===== */

/* Sidebar User Row - with notification bell */
.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-user-row .user-info {
    flex: 1;
    min-width: 0;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--sidebar-text);
    transition: all 0.2s;
    flex-shrink: 0;
}
.notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text-active);
}
.notification-bell.has-unread {
    color: var(--accent-blue);
}
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Dropdown */
.notification-dropdown {
    position: fixed;
    top: 60px;
    left: var(--sidebar-width);
    width: 380px;
    max-height: calc(100vh - 80px);
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 1rem;
}
.notification-mark-all {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}
.notification-mark-all:hover {
    background: rgba(14, 165, 233, 0.1);
}
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

/* Notification Item */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background: var(--bg-card-hover);
}
.notification-item.unread {
    background: rgba(14, 165, 233, 0.05);
}
.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-blue);
}
.notification-item {
    position: relative;
}
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-input);
    color: var(--accent-blue);
}
.notification-icon.event_signup { color: var(--accent-green); background: rgba(34, 197, 94, 0.15); }
.notification-icon.event_full { color: var(--accent-orange); background: rgba(249, 115, 22, 0.15); }
.notification-icon.event_reminder { color: var(--accent-blue); background: rgba(14, 165, 233, 0.15); }
.notification-icon.waitlist_promoted { color: var(--accent-green); background: rgba(34, 197, 94, 0.15); }
.notification-icon.match_request_joined { color: var(--accent-purple); background: rgba(167, 139, 250, 0.15); }
.notification-icon.marketplace_inquiry { color: var(--accent-orange); background: rgba(249, 115, 22, 0.15); }
.notification-icon.badge_earned { color: var(--accent-yellow); background: rgba(252, 211, 77, 0.15); }
.notification-icon.system { color: var(--accent-blue); background: rgba(14, 165, 233, 0.15); }

.notification-content {
    flex: 1;
    min-width: 0;
}
.notification-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
}
.notification-message {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Empty State */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}
.notification-empty svg {
    opacity: 0.4;
    margin-bottom: 12px;
}
.notification-empty p {
    font-size: 0.9rem;
}

/* Notification Backdrop (for closing on click outside) */
.notification-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}
.notification-backdrop.active {
    display: block;
}

/* Animations */
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}
