/* ========================================
   ADMIN PANEL STYLES
   ======================================== */

/* Admin Modal Container - blocks clicks to elements behind */
#admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#admin-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: all;
}

/* Admin Modal Specific Styles */
.admin-modal-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    pointer-events: all;
}

/* Admin Menu Button */
.admin-menu-btn {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.2), rgba(255, 50, 50, 0.2)) !important;
    border-color: rgba(255, 100, 100, 0.4) !important;
}

.admin-menu-btn:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.4), rgba(255, 50, 50, 0.4)) !important;
    box-shadow: 0 4px 12px rgba(255, 100, 100, 0.3) !important;
}

/* Tab Navigation */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-tab.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border-color: rgba(102, 126, 234, 0.6);
    color: white;
}

/* Tab Content */
.admin-tab-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.active {
    display: block;
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Sections */
.admin-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Admin Lists */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-list-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-list-item-info {
    flex: 1;
}

.admin-list-item-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.admin-list-item-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.admin-list-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin Buttons */
.admin-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.admin-btn-view {
    background: rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.admin-btn-view:hover {
    background: rgba(102, 126, 234, 0.5);
}

.admin-btn-delete {
    background: rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.admin-btn-delete:hover {
    background: rgba(255, 100, 100, 0.5);
}

.admin-btn-visit {
    background: rgba(100, 255, 150, 0.3);
    color: #64ff96;
}

.admin-btn-visit:hover {
    background: rgba(100, 255, 150, 0.5);
}

.admin-btn-ban {
    background: rgba(255, 150, 50, 0.3);
    color: #ff9632;
}

.admin-btn-ban:hover {
    background: rgba(255, 150, 50, 0.5);
}

/* Toolbar */
.admin-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
}

.admin-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.admin-search:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
}

.admin-filter {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.admin-filter option {
    background: #1a1a2e;
    color: white;
}

.admin-refresh-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-refresh-btn:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Images Grid */
.admin-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-image-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.admin-image-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.admin-image-card-info {
    padding: 0.75rem;
}

.admin-image-card-prompt {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.admin-image-card-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.admin-image-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 0.75rem 0.75rem;
}

.admin-image-card-actions .admin-btn {
    flex: 1;
    padding: 0.4rem;
    font-size: 0.75rem;
}

/* Avatars Grid */
.admin-avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.admin-avatar-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.admin-avatar-card:hover {
    transform: translateY(-4px);
}

.admin-avatar-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 3px solid rgba(102, 126, 234, 0.5);
}

.admin-avatar-card-name {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.admin-avatar-card-id {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.75rem;
}

/* Table Styles */
.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.admin-table .status-active {
    color: #64ff96;
}

.admin-table .status-flagged {
    color: #ffaa32;
}

.admin-table .status-banned {
    color: #ff6464;
}

/* Chat List */
.admin-chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}

.admin-chat-message {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.admin-chat-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.admin-chat-message-author {
    font-weight: 500;
    color: #667eea;
}

.admin-chat-message-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.admin-chat-message-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.admin-chat-message-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

/* Pagination */
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.admin-page-btn {
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-page-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.4);
}

.admin-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#images-page-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Loading & Empty States */
.admin-loading {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.admin-empty-state {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Image Preview Modal */
.admin-image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.admin-image-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.admin-image-preview-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.admin-image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-tabs {
        justify-content: center;
    }
    
    .admin-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-toolbar {
        flex-direction: column;
    }
    
    .admin-search {
        width: 100%;
    }
}


