/* Synora Admin Dashboard Styles */

:root {
    --sidebar-width: 260px;
}

body {
    display: flex;
    min-height: 100vh;
}

/* Login Screen */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.login-card p {
    color: var(--primary-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    background: var(--bg-black);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-muted);
}

.login-card .btn {
    width: 100%;
    justify-content: center;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.admin-logo {
    font-size: 28px;
    color: var(--primary);
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    margin-bottom: 50px;
    padding-left: 10px;
}

.admin-nav {
    list-style: none;
    flex: 1;
}

.admin-nav li {
    margin-bottom: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--primary-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav a:hover {
    background: var(--glass);
    color: var(--primary);
}

.admin-nav a.active {
    background: var(--primary);
    color: var(--bg-black);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.admin-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--danger);
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    background: var(--bg-black);
}

.admin-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

#community-section {
    height: calc(100vh - 120px);
    display: none;
    flex-direction: column;
}

#community-section.active {
    display: flex;
}

/* Ensure community app inside admin fills the container */
.admin-community-chat.community-app {
    height: 100%;
    min-height: 500px;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.admin-community-chat .community-sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.admin-header p {
    color: var(--primary-muted);
    font-size: 16px;
}

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

.stat-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, #1a1a1a 100%);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card h3 {
    font-size: 48px;
    margin-bottom: 8px;
    color: var(--primary);
    letter-spacing: -2px;
}

.stat-card p {
    color: var(--primary-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Data Tables */
.data-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    color: var(--primary-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    vertical-align: middle;
}

.actions-cell {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--primary-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-icon.btn-view:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.2);
}

.btn-icon i {
    font-size: 14px;
}

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

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.status-active { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.status-blocked { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.status-pending { background: rgba(255, 255, 255, 0.05); color: var(--primary-muted); }

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

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

.admin-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#member-details p, #report-details p {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--primary-muted);
}

#member-details strong, #report-details strong {
    color: var(--primary);
    margin-right: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 80px;
        padding: 20px 10px;
    }
    .admin-logo, .admin-nav span, .admin-logout span {
        display: none;
    }
    .admin-nav a {
        justify-content: center;
        padding: 15px;
    }
    .admin-main {
        margin-left: 80px;
    }
}
