/* ═══════════════════════════════════════════════════
   CONTROL CENTER — Super Admin Cockpit Theme
   ═══════════════════════════════════════════════════ */

.cc-view {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
    min-height: 100vh;
}

/* ── PULSE BAR ── */
.cc-pulse-bar {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.cc-pulse-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    transition: all 0.2s;
}

.cc-pulse-item.ok {
    color: #34d399;
    background: rgba(16, 185, 129, 0.08);
}

.cc-pulse-item.warn {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
}

.cc-pulse-item.error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.15); }
}

.cc-pulse-item i {
    font-size: 1rem;
}

/* ── HEADER ── */
.cc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cc-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

[data-theme="neon"] .cc-title {
    font-family: 'Cyberpunk', sans-serif !important;
    color: #fcee09 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 2.2rem;
    text-shadow: 1px 1px 0 var(--info), -1px -1px 0 var(--secondary);
}


.cc-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

.cc-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.35rem 0 0;
    letter-spacing: 0.04em;
}

.cc-db-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
}

.cc-db-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.cc-db-btn i:first-child {
    font-size: 1.15rem;
}

/* ── LOADING ── */
.cc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
    gap: 1rem;
    color: var(--text-muted);
}

.cc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── HEALTH CARDS GRID ── */
.cc-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.cc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.cc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.cc-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.cc-card-body {
    display: flex;
    flex-direction: column;
}

.cc-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.02em;
}

.cc-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cc-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.cc-role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
}

/* ── ACTIONS ROW (2 columns) ── */
.cc-actions-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}

.cc-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.cc-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.cc-section-title i {
    color: var(--primary);
}

/* ── ACTION BUTTONS GRID ── */
.cc-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cc-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-body-secondary);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    text-align: center;
    color: var(--text-main);
}

.cc-action-btn i {
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.cc-action-btn span {
    font-weight: 700;
    font-size: 0.85rem;
}

.cc-action-btn small {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cc-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.cc-action-btn:hover i {
    transform: scale(1.15);
}

.cc-action-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Button variants */
.cc-action-btn.maintenance i { color: #f87171; }
.cc-action-btn.maintenance:hover { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }

.cc-action-btn.sessions i { color: #fbbf24; }
.cc-action-btn.sessions:hover { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.05); }

.cc-action-btn.cache i { color: #34d399; }
.cc-action-btn.cache:hover { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.05); }

.cc-action-btn.db i { color: #60a5fa; }
.cc-action-btn.db:hover { border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.05); }

/* ── IMPERSONATION CENTER ── */
.cc-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.cc-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.cc-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-body-secondary);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    box-sizing: border-box;
}

.cc-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cc-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.cc-user-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 320px;
    overflow-y: auto;
}

.cc-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.cc-user-item:hover {
    background: var(--bg-body-secondary);
    border-color: var(--border-color);
}

.cc-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cc-user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.cc-user-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cc-user-role {
    font-size: 0.75rem;
    font-weight: 700;
}

.cc-user-hub {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cc-impersonate-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s;
}

.cc-user-item:hover .cc-impersonate-icon {
    opacity: 1;
    color: #f59e0b;
}

.cc-no-results {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 2rem 0;
}

.cc-search-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2rem 0;
    opacity: 0.6;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .cc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 600px) {
    .cc-view {
        padding: 1rem;
    }

    .cc-cards-grid {
        grid-template-columns: 1fr;
    }

    .cc-action-grid {
        grid-template-columns: 1fr;
    }

    .cc-pulse-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cc-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════
   V2 : TABS, TABLES & NEW COMPONENTS
   ═══════════════════════════════════════════════════ */

/* ── LAYOUT ── */
.admin-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

.admin-loading-shield {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

/* ── TABS ── */
.cc-header-titles {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cc-header-titles h1 { margin: 0; font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
[data-theme="neon"] .cc-header-titles h1 {
    font-family: 'Cyberpunk', sans-serif !important;
    color: #fcee09 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 2.5rem;
    text-shadow: 1px 1px 0 var(--info), -1px -1px 0 var(--secondary);
}
.cc-header-titles p { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.cc-header-titles i { font-size: 2rem; color: var(--primary); }
[data-theme="neon"] .cc-header-titles i { color: #fcee09 !important; }


.cc-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cc-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.cc-tab-btn i { font-size: 1.1rem; }
.cc-tab-btn:hover { background: var(--bg-body-secondary); color: var(--text-main); }

.cc-tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

[data-theme="neon"] .cc-tab-btn.active {
    color: #010103 !important; /* Noir sur Jaune */
    font-weight: 800;
}


.cc-tab-content {
    animation: fadeInTab 0.3s ease-out;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── TABLES ── */
.cc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.cc-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.cc-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.cc-table tbody tr { transition: background 0.2s; }
.cc-table:not(.no-hover) tbody tr:hover { background: var(--bg-body-secondary); }

.cc-table.compact td { padding: 0.6rem 1rem; }

/* ── GAMIFICATION COMPONENTS ── */
.cc-stat-block {
    background: var(--bg-body-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.stat-big {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-big span { font-weight: 600; color: var(--text-muted); font-size: 1rem; }
.stat-big strong { font-size: 2.5rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }

.stat-details { margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.mt-4 { margin-top: 1.5rem; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-body-secondary);
    font-weight: 800;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    color: var(--text-muted);
}

.rank-badge[data-rank="1"] { background: #fef08a; color: #a16207; }
.rank-badge[data-rank="2"] { background: #e2e8f0; color: #475569; }
.rank-badge[data-rank="3"] { background: #fed7aa; color: #9a3412; }

/* ── ACTIVITY COMPONENTS ── */
.streak-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.streak-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-body-secondary);
    border-radius: 12px;
}

.streak-user { font-weight: 700; color: var(--text-main); }
.streak-count { font-weight: 800; color: #f97316; display: flex; align-items: center; gap: 0.35rem; font-size: 1.1rem; }

.danger-text { color: #ef4444 !important; }

/* Impersonation search */
.search-box { position: relative; margin-bottom: 1rem; }
.search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-box input { 
    width: 100%; padding: 1rem 1rem 1rem 3rem; 
    background: var(--bg-body-secondary); border: 1px solid var(--border-color); 
    border-radius: 12px; color: var(--text-main); font-weight: 600; 
}
.search-box input:focus { border-color: var(--primary); outline: none; }

.user-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-radius: 10px; cursor: pointer; transition: all 0.2s;
    border: 1px solid transparent;
}
.user-row:hover { background: var(--bg-body-secondary); border-color: var(--primary); }
.u-info strong { display: block; color: var(--text-main); }
.u-info span { font-size: 0.8rem; color: var(--text-muted); }
.u-meta { display: flex; gap: 0.5rem; align-items: center; }
.u-role { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 6px; }
.u-hub { font-size: 0.75rem; color: var(--text-muted); }
.take-control { color: var(--primary); font-size: 1.2rem; opacity: 0; transition: opacity 0.2s; }
.user-row:hover .take-control { opacity: 1; }

.col-span-2 { grid-column: span 2; }
.text-sm { font-size: 0.8rem !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── ADMIN CONTAINER WITH ASIDES LAYOUT ── */
.admin-container-with-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-main-aside-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.admin-main {
    display: flex;
    flex-direction: column;
}

.admin-aside {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-aside-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.admin-aside-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.admin-aside-title i {
    color: var(--primary);
}

/* Responsive: hide aside on smaller screens */
@media (max-width: 1200px) {
    .admin-main-aside-wrapper {
        grid-template-columns: 1fr;
    }

    .admin-aside {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════
   V3 : MODALS & FORMS
   ═══════════════════════════════════════════════════ */

/* ── MODAL ── */
.cc-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.cc-modal-lg { max-width: 680px; }
.cc-modal-xl { max-width: 900px; }

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cc-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cc-modal-close:hover {
    background: var(--bg-body-secondary);
    color: var(--text-main);
}

.cc-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cc-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.cc-modal-btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.cc-modal-btn-primary:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.cc-modal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── FORM GROUPS ── */
.cc-form-group {
    margin-bottom: 1rem;
}

.cc-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── ADMIN VIEW OVERRIDE — use dashboard-layout padding ── */
.admin-view.dashboard-layout {
    padding-top: 80px !important;
    min-height: 100vh;
}

/* ── Left sidebar action buttons (stacked) ── */
.admin-view .dashboard-sidebar-left .cc-action-btn {
    flex-direction: row;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    justify-content: flex-start;
}

.admin-view .dashboard-sidebar-left .cc-action-btn i {
    font-size: 1.15rem;
}

.admin-view .dashboard-sidebar-left .cc-action-btn span {
    font-size: 0.8rem;
}

/* ── Cards grid 4-col for admin ── */
@media (max-width: 1100px) {
    .cc-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .cc-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cc-modal { width: 95%; }
    .cc-modal-lg, .cc-modal-xl { max-width: 95%; }
}

/* ═══════════════════════════════════════════════════
   V4 : SIDEBAR SPACING, AVATARS, DROPZONE, TAGS
   ═══════════════════════════════════════════════════ */

/* ── SIDEBAR STACK (gap between items) ── */
.cc-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-sidebar-left .cc-section + .cc-section,
.admin-sidebar-right .cc-section + .cc-section {
    margin-top: 1rem;
}

/* ── ASIDE LIST (right sidebar rows) ── */
.cc-aside-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cc-aside-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: background 0.15s;
}

.cc-aside-row span {
    color: var(--text-muted);
    font-weight: 500;
}

.cc-aside-row strong {
    font-weight: 800;
}

.cc-aside-row-hover:hover {
    background: var(--bg-body-secondary);
}

/* ── MAINTENANCE LOGO ── */
.cc-maintenance-logo {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cc-maintenance-logo i {
    font-size: 1.25rem;
}

.cc-maintenance-logo .cc-logo-text {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1;
}

/* ── AVATAR GRID ── */
.cc-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.cc-avatar-card {
    background: var(--bg-body-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s;
    text-align: center;
}

.cc-avatar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.cc-avatar-img-wrapper {
    padding: 1.25rem 0 0.5rem;
    display: flex;
    justify-content: center;
}

.cc-avatar-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: var(--bg-card);
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cc-avatar-info {
    padding: 0.25rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cc-avatar-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-avatar-cat {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.cc-avatar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.cc-avatar-price-edit {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cc-avatar-price-input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-body-secondary);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.cc-avatar-price-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.cc-avatar-toggle, .cc-avatar-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-avatar-toggle:hover {
    background: rgba(16, 185, 129, 0.1);
}

.cc-avatar-delete {
    color: #ef4444;
}

.cc-avatar-delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ── DROPZONE ── */
.cc-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-body-secondary);
    color: var(--text-muted);
}

.cc-dropzone:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.03);
}

.cc-dropzone i {
    font-size: 2.5rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.cc-dropzone p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── CATEGORY TAGS ── */
.cc-cat-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    background: var(--bg-body-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    user-select: none;
}

.cc-cat-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cc-cat-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── CLICKABLE CARD ── */
.cc-card-clickable {
    cursor: pointer;
}

.cc-card-clickable:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.12);
}

/* ── DROPDOWN LIST (Modals) ── */
.cc-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    margin-top: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.cc-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}

.cc-dropdown-item:last-child {
    border-bottom: none;
}

.cc-dropdown-item:hover {
    background: var(--bg-body-secondary);
}

.cc-dropdown-item.selected {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--primary);
}

/* ── MINI AVATAR ── */
.cc-mini-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── SELECTED BADGE ── */
.cc-selected-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.cc-selected-badge.ok {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.cc-selected-badge.warn {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.cc-selected-badge.info {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ── RADIO BUTTONS ── */
.cc-radio {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.cc-radio input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* ── GAME CONFIG (Modal) ── */
.cc-game-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-body-secondary);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.cc-game-config-row:hover {
    border-color: var(--primary);
}

.cc-game-config-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.cc-game-config-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-config-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.cc-config-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cc-config-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.cc-config-btn.active-gold {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

.cc-config-btn.active-blue {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* ── COST INPUT ── */
.cc-cost-input {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 0.5rem;
    transition: border-color 0.2s;
}

.cc-cost-input:focus-within {
    border-color: var(--primary);
}

.cc-cost-input input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    width: 50px;
    padding: 0.4rem 0;
    text-align: center;
    outline: none;
}

.cc-cost-input span {
    font-weight: 800;
    color: #fbbf24;
    font-size: 0.85rem;
}

/* ── LAB BADGE ── */
.cc-lab-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cc-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════
   PROMOTIONS TAB
   ═══════════════════════════════════════════════════ */

/* ── Promo Cards Grid ── */
.cc-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.cc-promo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-promo-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cc-promo-card.active {
    border-color: rgba(251, 191, 36, 0.3);
}

.cc-promo-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.cc-promo-card.expired {
    opacity: 0.5;
}

.cc-promo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.cc-promo-card-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.cc-promo-discount-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.cc-promo-target {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 8px;
    font-weight: 600;
}

.cc-promo-target i {
    color: #6366f1;
}

.cc-promo-countdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.75rem;
}

.cc-promo-countdown i {
    font-size: 1rem;
}

.cc-promo-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.cc-promo-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: none;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.cc-promo-btn.stop {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.cc-promo-btn.stop:hover {
    background: rgba(239, 68, 68, 0.2);
}

.cc-promo-btn.delete {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

.cc-promo-btn.delete:hover {
    background: rgba(100, 116, 139, 0.2);
}

/* ── Promo Create Form ── */
.cc-promo-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.cc-promo-form-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.cc-promo-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.cc-promo-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cc-promo-form-group.full {
    grid-column: 1 / -1;
}

.cc-promo-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body-secondary);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
}

.cc-promo-input:focus {
    border-color: var(--primary);
}

.cc-promo-select {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body-secondary);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

/* ── Discount Slider ── */
.cc-discount-slider-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cc-discount-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
}

.cc-discount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.cc-discount-value {
    font-weight: 900;
    font-size: 1.2rem;
    color: #ef4444;
    min-width: 55px;
    text-align: center;
}

/* ── Target Type Buttons ── */
.cc-target-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cc-target-btn {
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cc-target-btn.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.cc-target-btn:hover {
    border-color: var(--primary);
}

/* ── Status Badge for Promo ── */
.cc-promo-status {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cc-promo-status.live {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.cc-promo-status.ended {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

/* ── Launch Button ── */
.cc-promo-launch-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.cc-promo-launch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.cc-promo-launch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Aside Promo Stats ── */
.cc-promo-aside-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.cc-promo-aside-stat:last-child {
    border-bottom: none;
}

.cc-promo-aside-stat .label {
    color: var(--text-muted);
    font-weight: 600;
}

.cc-promo-aside-stat .value {
    font-weight: 800;
    color: var(--text-main);
}

/* ── Visual Picker (Avatars/Items) ── */
.cc-visual-picker {
    background: var(--bg-body-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cc-picker-search {
    position: relative;
    display: flex;
    align-items: center;
}

.cc-picker-search i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 1rem;
}

.cc-picker-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.cc-picker-input:focus {
    border-color: var(--primary);
}

.cc-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for the picker grid */
.cc-picker-grid::-webkit-scrollbar {
    width: 6px;
}
.cc-picker-grid::-webkit-scrollbar-track {
    background: transparent;
}
.cc-picker-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.cc-picker-item {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
}

.cc-picker-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cc-picker-item.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.cc-picker-item.active::after {
    content: '\eb7a'; /* remix icon check */
    font-family: 'remixicon';
    position: absolute;
    top: 6px;
    right: 6px;
    background: #6366f1;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.cc-picker-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0,0,0,0.05);
    background: var(--bg-body-secondary);
}

.cc-picker-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
}

.cc-picker-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-picker-cat {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cc-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.cc-picker-empty i {
    font-size: 2.5rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 1rem;
}

