/* ========== ადმინ პანელის სტილები ========== */

/* ტაბები */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}

.admin-tab:hover {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary);
}

.admin-tab.active {
    background: var(--primary);
    color: #0f172a;
    font-weight: 600;
}

/* ადმინ კარტები */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.admin-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
}

.admin-card h3 {
    margin-bottom: 15px;
    color: white;
    font-size: 16px;
}

.admin-card.full-width {
    grid-column: 1 / -1;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-controls {
    display: flex;
    gap: 10px;
}

.admin-controls input,
.admin-controls select {
    padding: 8px 12px;
    margin: 0;
    font-size: 13px;
}

/* მომხმარებლების გრიდი */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.admin-user-card:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--primary);
}

.admin-user-card.user-banned {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.admin-user-card .user-avatar {
    position: relative;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.admin-user-card .user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.admin-user-card .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.banned-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 12px;
}

.admin-user-card .user-info {
    flex: 1;
    min-width: 0;
}

.admin-user-card .username {
    display: block;
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.admin-user-card .username.role-owner {
    color: #fbbf24;
}

.admin-user-card .username.role-admin {
    color: var(--primary);
}

.admin-user-card .user-meta {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

.admin-user-card .user-role {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.admin-user-card .user-actions {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.action-btn.ban-btn {
    background: rgba(239, 68, 68, 0.2);
}

.action-btn.ban-btn:hover {
    background: #ef4444;
}

.action-btn.unban-btn {
    background: rgba(34, 197, 94, 0.2);
}

.action-btn.unban-btn:hover {
    background: #22c55e;
}

.action-btn.role-btn {
    background: rgba(59, 130, 246, 0.2);
}

.action-btn.role-btn:hover {
    background: #3b82f6;
}

/* სტატისტიკა */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.stat-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
}

.top-item, .gender-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-rank {
    color: #fbbf24;
    font-weight: 600;
    margin-right: 10px;
}

.top-count, .gender-count {
    color: var(--primary);
    font-weight: 600;
}

/* მოდალი */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    width: 400px;
    max-width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
}

.modal-content label {
    display: block;
    margin: 10px 0 5px;
    color: #94a3b8;
    font-size: 13px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
}

/* Toggle Switch */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* გლობალური შეტყობინება */
.announcement-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 15px 40px 15px 20px;
    z-index: 30000;
    animation: slideDown 0.3s ease;
    max-width: 90%;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.announcement-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 20px;
    color: #94a3b8;
}

.announcement-close:hover {
    color: white;
}

/* რესპონსივი */
@media (max-width: 768px) {
    .admin-tabs {
        justify-content: center;
    }
    
    .admin-tab {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}