/* ==================== ADMIN PANEL CSS ==================== */

/* Admin Body */
.admin-body {
    background: var(--app-bg);
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: var(--leading-normal);
    font-size: var(--text-base);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ==================== ADMIN HEADER ==================== */

.admin-header {
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.9);
}

.admin-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    max-width: none;
    height: 70px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-primary);
}

.admin-logo i {
    font-size: var(--text-xl);
    color: var(--interactive-primary);
}

.admin-logo h1, .admin-logo h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    margin: 0;
    color: var(--text-primary);
}

/* Mobile Menu Toggle */
.admin-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--app-border);
    border-radius: var(--radius-lg);
    background: var(--app-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-mobile-toggle:hover {
    background: var(--interactive-secondary);
    color: var(--text-primary);
}

.admin-mobile-toggle i {
    font-size: var(--text-lg);
}

/* Desktop Navigation */
.admin-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.admin-nav .btn span {
    display: inline;
}

/* ==================== MOBILE NAVIGATION ==================== */

.admin-mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-mobile-nav.active {
    display: flex;
    opacity: 1;
}

.admin-mobile-nav-content {
    width: 300px;
    height: 100%;
    background: var(--app-surface);
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.admin-mobile-nav.active .admin-mobile-nav-content {
    transform: translateX(0);
}

.admin-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--app-border);
}

.admin-mobile-nav-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.admin-mobile-nav-close:hover {
    background: var(--interactive-secondary);
    color: var(--text-primary);
}

.admin-mobile-nav-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
    padding: var(--space-6);
}

.admin-mobile-nav-item {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: var(--text-base);
}

.admin-mobile-nav-item:hover,
.admin-mobile-nav-item.active {
    background: var(--interactive-primary);
    color: var(--text-inverse);
}

.admin-mobile-nav-item i {
    width: 20px;
    text-align: center;
}

.admin-mobile-nav-items hr {
    border: none;
    border-top: 1px solid var(--app-border);
    margin: var(--space-4) 0;
}

/* ==================== ADMIN CONTAINER ==================== */

.admin-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* ==================== ADMIN SIDEBAR ==================== */

.admin-sidebar {
    width: 280px;
    background: var(--app-surface);
    border-right: 1px solid var(--app-border);
    position: fixed;
    left: 0;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 100;
}

.admin-menu ul {
    list-style: none;
    padding: var(--space-6);
    margin: 0;
}

.admin-menu li {
    margin-bottom: var(--space-2);
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
    font-size: var(--text-base);
}

.admin-menu-item:hover {
    background: var(--interactive-secondary);
    color: var(--text-primary);
}

.admin-menu-item.active {
    background: var(--interactive-primary);
    color: var(--text-inverse);
}

.admin-menu-item i {
    width: 20px;
    text-align: center;
    font-size: var(--text-base);
}

/* ==================== ADMIN MAIN CONTENT ==================== */

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: var(--space-6);
    background: var(--app-bg);
    min-height: calc(100vh - 70px);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* ==================== ADMIN HEADER BAR ==================== */

.admin-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--app-border);
}

.admin-header-bar h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ==================== STATS GRID ==================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--app-border);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all 0.2s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: var(--text-inverse);
}

.stat-icon.news {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.stat-icon.events {
    background: linear-gradient(135deg, #10b981, #047857);
}

.stat-icon.members {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.views {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-info h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.stat-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    font-weight: var(--font-weight-medium);
}

/* ==================== DASHBOARD WIDGETS ==================== */

.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.widget {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--app-border);
}

.widget h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ==================== ADMIN FILTERS ==================== */

.admin-filters {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--app-border);
}

.admin-filters select,
.admin-filters input[type="text"] {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--app-border);
    border-radius: var(--radius-md);
    background: var(--app-bg);
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.admin-filters select:focus,
.admin-filters input[type="text"]:focus {
    outline: none;
    border-color: var(--interactive-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================== ADMIN TABLES ==================== */

.admin-table-container {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--app-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.admin-table th {
    background: var(--app-bg);
    padding: var(--space-4);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    border-bottom: 1px solid var(--app-border);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--app-divider);
    color: var(--text-secondary);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: var(--app-bg);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.loading {
    text-align: center;
    color: var(--text-tertiary);
    font-style: italic;
    padding: var(--space-8);
}

/* ==================== PAGINATION ==================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.pagination button {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

.pagination button:hover:not(:disabled) {
    background: var(--interactive-secondary);
    color: var(--text-primary);
}

.pagination button.active {
    background: var(--interactive-primary);
    color: var(--text-inverse);
    border-color: var(--interactive-primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== SETTINGS ==================== */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-6);
}

.settings-group {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--app-border);
}

.settings-group h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--app-border);
}

/* ==================== FORMS ==================== */

.image-preview { 
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--app-border);
    border-radius: var(--radius-lg);
    background: var(--app-bg);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    text-align: center;
 }

.image-preview img {
    max-width: 100%; height: auto;
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--app-border);
    border-radius: var(--radius-lg);
    background: var(--app-bg);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--interactive-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-group.checkbox label {
    margin: 0;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.form-section {
    margin-bottom: var(--space-8);
    
}

.form-section h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--app-border);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding-top: var(--space-6);
    border-top: 1px solid var(--app-border);
}

/* ==================== MODALS ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 3000;
    padding: var(--space-6);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: var(--space-8);
}

.modal-content.large {
    max-width: 800px;
}

.modal-content .close {
    position: absolute;
    right: var(--space-6);
    top: var(--space-6);
    font-size: var(--text-xl);
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.modal-content .close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-6) 0;
}

/* ==================== MOBILE CARD LAYOUTS ==================== */

.admin-cards-container {
    display: none;
}

.admin-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.admin-card {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--app-border);
    transition: all 0.2s ease;
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-3);
}

.admin-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
    line-height: var(--leading-snug);
}

.admin-card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.admin-card-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.admin-card-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

.admin-card-meta-label {
    color: var(--text-tertiary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
}

.admin-card-meta-value {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.admin-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-3);
    border-top: 1px solid var(--app-divider);
}

@media (max-width: 768px) {
    .admin-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }
}

.admin-card-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-card-status.published {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.admin-card-status.draft {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.admin-card-status.scheduled {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.admin-card-status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.admin-card-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.admin-card-status.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.admin-card-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.admin-card-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-8);
    color: var(--text-tertiary);
    font-style: italic;
}

.admin-card-loading i {
    font-size: var(--text-lg);
}

.admin-card-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex: 1;
    max-width: 200px;
}

@media (max-width: 768px) {
    .admin-card-buttons {
        max-width: none;
        width: 100%;
    }
}

.admin-card-btn {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--app-border);
    background: var(--app-bg);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    min-height: 36px;
}

.admin-card-btn:hover {
    background: var(--interactive-secondary);
    color: var(--text-primary);
}

.admin-card-btn.primary {
    background: var(--interactive-primary);
    color: var(--text-inverse);
    border-color: var(--interactive-primary);
}

.admin-card-btn.primary:hover {
    background: var(--club-blue-light);
}

.admin-card-btn.danger {
    background: var(--club-error);
    color: var(--text-inverse);
    border-color: var(--club-error);
}

.admin-card-btn.danger:hover {
    background: #dc2626;
}

/* Desktop/Mobile Toggle Classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    /* Show mobile toggle, hide desktop nav */
    .admin-mobile-toggle {
        display: flex;
    }
    
    .admin-nav {
        display: none;
    }
    
    /* Show mobile cards, hide desktop tables */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .admin-cards-container {
        display: block;
    }
    
    /* Hide sidebar on mobile */
    .admin-sidebar {
        display: none;
    }
    
    /* Full width main content on mobile */
    .admin-main {
        margin-left: 0;
        padding: var(--space-4);
    }
    
    /* Header adjustments */
    .admin-header-content {
        padding: var(--space-3) var(--space-4);
    }
    
    /* Responsive header bar */
    .admin-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }
    
    .admin-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Single column stats on mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    /* Single column dashboard widgets */
    .dashboard-widgets {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    /* Responsive filters */
    .admin-filters {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
        padding: var(--space-4);
    }
    
    /* Responsive settings */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    /* Responsive form rows */
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    /* Responsive table */
    .admin-table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 600px;
    }
    
    /* Responsive modal */
    .modal {
        padding: var(--space-4);
    }
    
    .modal-content {
        padding: var(--space-6);
        max-height: 95vh;
    }
    
    .modal-content.large {
        max-width: 100%;
    }
    
    /* Form actions responsive */
    .form-actions {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: var(--space-3);
    }
    
    .stat-card {
        padding: var(--space-4);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-lg);
    }
    
    .widget {
        padding: var(--space-4);
    }
    
    .settings-group {
        padding: var(--space-4);
    }
    
    /* Kompakte Card-Buttons für kleine Bildschirme */
    .admin-card-btn {
        padding: var(--space-1) var(--space-2);
        font-size: var(--text-xs);
    }
    
    .admin-card-buttons {
        gap: var(--space-1);
    }
}

/* ==================== ACTIVITY & EVENT LISTS ==================== */

.activity-list,
.event-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.activity-item,
.event-item {
    padding: var(--space-3);
    background: var(--app-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--app-border);
    transition: all 0.2s ease;
}

.activity-item:hover,
.event-item:hover {
    background: var(--interactive-secondary);
}

/* ==================== NOTIFICATIONS ==================== */

.notifications {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: 4000;
    max-width: 500px;
    width: 90%;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--space-3);
    pointer-events: none;
}

.notification {
    background: var(--app-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    border: 1px solid var(--app-border);
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 100%;
    min-height: 52px;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.notification.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.notification.success i {
    color: #10b981;
}

.notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.notification.error i {
    color: #ef4444;
}

.notification.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.notification.warning i {
    color: #f59e0b;
}

.notification.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.notification.info i {
    color: #3b82f6;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(30px) scale(0.9);
        opacity: 0;
    }
}

/* ==================== UTILITY CLASSES ==================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--text-tertiary); }
.text-primary { color: var(--interactive-primary); }
.text-success { color: var(--club-accent); }
.text-warning { color: var(--club-warning); }
.text-error { color: var(--club-error); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }

/* ==================== TT-MATCH RESULT BADGES ==================== */

.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.result-badge.win {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.result-badge.loss {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-badge.draw {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ==================== BADGE SYSTEM STYLING ==================== */

/* Badge Statistics Grid */
.badge-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.badge-stat-card {
    background: white;
    border-radius: 12px;
    padding: var(--space-5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.badge-stat-card.primary {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(59, 130, 246, 0.001));
}

.badge-stat-card.success {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.02), rgba(34, 197, 94, 0.001));
}

.badge-stat-card.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), rgba(245, 158, 11, 0.001));
}

.badge-stat-card.info {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(139, 92, 246, 0.001));
}

.badge-stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.badge-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.badge-stat-card.primary .badge-stat-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.badge-stat-card.success .badge-stat-icon {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.badge-stat-card.warning .badge-stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-stat-card.info .badge-stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.badge-stat-content {
    flex: 1;
}

.badge-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.badge-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.badge-stat-sublabel {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.badge-stat-trend {
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-stat-trend i {
    font-size: 0.7rem;
}

/* Badge Content Grid */
.badge-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.badge-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.badge-panel-header {
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

.badge-panel-header i {
    color: var(--interactive-primary);
}

.badge-panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: var(--text-secondary);
    min-width: 140px;
}

.badge-panel-content {
    padding: var(--space-5);
    max-height: 400px;
    overflow-y: auto;
}

/* Loading States */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-6);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Badge Leaderboard */
.badge-leaderboard {
    /* Will be populated by JavaScript */
}

/* Badge Activities */
.badge-activities {
    /* Will be populated by JavaScript */
}

/* Badge Categories */
.badge-categories {
    margin-top: var(--space-6);
}

.badge-categories h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.badge-categories h3 i {
    color: var(--interactive-primary);
}

.badge-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.badge-category-card {
    background: white;
    border-radius: 12px;
    padding: var(--space-5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.badge-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.badge-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.badge-category-icon.training {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.badge-category-icon.competition {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-category-icon.community {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.badge-category-icon.special {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.badge-category-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.badge-category-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 var(--space-3) 0;
    line-height: 1.4;
}

.badge-category-stats {
    display: flex;
    gap: var(--space-3);
}

.badge-count, .user-count {
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Badge Tabs */
.badge-tabs {
    margin: var(--space-6) 0 var(--space-4) 0;
}

.badge-tab-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    gap: 2px;
}

.badge-tab-btn {
    padding: 12px 20px;
    background: #f8fafc;
    border: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.badge-tab-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.badge-tab-btn.active {
    background: white;
    color: var(--interactive-primary);
    border-bottom-color: var(--interactive-primary);
    font-weight: 600;
}

.badge-tab-btn i {
    font-size: 0.9rem;
}

.badge-tab-content {
    display: none;
    padding-top: var(--space-4);
}

.badge-tab-content.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .badge-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-content-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-category-grid {
        grid-template-columns: 1fr;
    }
    
    .badge-stat-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }
    
    .badge-category-card {
        flex-direction: column;
        text-align: center;
    }
    
    .badge-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    
    .badge-tab-nav {
        flex-direction: column;
    }
    
    .badge-tab-btn {
        border-radius: 8px;
        margin-bottom: 2px;
    }
}

/* Badge Level Styling */
.level-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-badge.beginner {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.level-badge.intermediate {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.level-badge.advanced {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

.level-badge.expert {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

/* Activity Badge Styling */
.activity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: capitalize;
}

.activity-badge.manual_assignment {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.activity-badge.auto_assignment {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.activity-badge.badge_revoked {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.inline-flex { display: inline-flex; }