/* /home/user-data/www/default/assets/css/admin.css */
/* Optimized admin styles - duplicates removed, uses components.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    line-height: 1.6;
}

/* ============================================ */
/* ADMIN LAYOUT */
/* ============================================ */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-logo {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================ */
/* ADMIN LOGIN */
/* ============================================ */

.admin-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.admin-login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-login-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.admin-login-card p {
    margin-bottom: 2rem;
    opacity: 0.8;
}

.admin-footer-link {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-footer-link a {
    color: #feca57;
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-footer-link a:hover {
    text-decoration: underline;
}

/* ============================================ */
/* ADMIN STATS */
/* ============================================ */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #feca57;
}

/* ============================================ */
/* ADMIN ACTIONS */
/* ============================================ */

.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* ============================================ */
/* USERS SECTION */
/* ============================================ */

.users-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
}

.users-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* ============================================ */
/* ADMIN TABLE */
/* ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

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

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

.admin-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

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

.admin-table .user-id {
    font-family: monospace;
    opacity: 0.7;
}

/* ============================================ */
/* USER STATUS & ROLE BADGES */
/* ============================================ */

.user-status,
.user-role {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.status-banned {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.role-admin {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.role-user {
    background: rgba(33, 150, 243, 0.3);
    color: #2196F3;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.bookmark-count {
    font-weight: bold;
    color: #feca57;
}

/* ============================================ */
/* ADMIN MODALS - New modal design pattern */
/* ============================================ */

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-modal.active {
    display: flex;
}

.admin-modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.admin-modal-content h3 {
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.3rem;
    text-align: center;
}

.admin-modal-content p {
    color: white;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-align: center;
}

/* Form spacing in modals */
.admin-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-modal .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.admin-modal .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Confirmation modal specific styles */
.admin-modal .admin-modal-content span {
    font-weight: bold;
    color: #feca57;
}

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

@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-logo {
        font-size: 2rem;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-actions {
        justify-content: center;
    }
    
    .user-actions {
        justify-content: center;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.25rem;
    }

    /* Modal responsive adjustments */
    .admin-modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-width: 95%;
    }

    .admin-modal .form-row {
        grid-template-columns: 1fr;
    }

    .admin-modal .form-actions {
        flex-direction: column;
        align-items: center;
    }

    .admin-modal .form-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }

    .admin-modal-content {
        padding: 1rem;
    }

    .admin-modal-content h3 {
        font-size: 1.1rem;
    }
}
