/* ===== Admin Panel Styles ===== */

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #EFF6FF 100%);
    padding: 20px;
}

.admin-login-card {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.12);
}

.admin-login-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.admin-login-card .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.admin-login-card .logo h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 700;
}

.admin-login-card .logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.admin-login-card .btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    border-radius: 12px;
}

.login-error {
    background: #FEF2F2;
    color: #DC2626;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
}

.login-error.show {
    display: block;
}

/* ===== Admin Dashboard ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: #1E293B;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.admin-sidebar-header .brand .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.admin-sidebar-header p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.admin-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.admin-sidebar-nav .nav-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 12px 8px;
    font-weight: 600;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

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

.admin-sidebar-nav a.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.admin-sidebar-nav a .badge-count {
    margin-left: auto;
    background: #EF4444;
    color: white;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-footer .admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-sidebar-footer .admin-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-sidebar-footer .admin-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-sidebar-footer .admin-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    font-size: 0.8rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-light);
}

.admin-topbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-content {
    padding: 32px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.stat-card .stat-icon.blue {
    background: #EFF6FF;
}

.stat-card .stat-icon.orange {
    background: #FFF7ED;
}

.stat-card .stat-icon.green {
    background: #F0FDF4;
}

.stat-card .stat-icon.purple {
    background: #FAF5FF;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Admin Table */
.admin-table-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-table-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-table-filters {
    display: flex;
    gap: 8px;
}

.admin-table-filters button {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-body);
    background: var(--bg-gray);
}

.admin-table-filters button:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.admin-table-filters button.active {
    background: var(--primary);
    color: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 20px;
    font-size: 0.85rem;
    color: var(--text-body);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.admin-table tr:hover td {
    background: var(--bg-light);
}

.status-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

.status-badge.approved {
    background: #D1FAE5;
    color: #059669;
}

.status-badge.rejected {
    background: #FEE2E2;
    color: #DC2626;
}

.status-badge.verified {
    background: #D1FAE5;
    color: #059669;
}

.status-badge.unverified {
    background: #F3F4F6;
    color: #6B7280;
}

.table-actions {
    display: flex;
    gap: 6px;
}

.table-actions button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: var(--bg-gray);
    color: var(--text-body);
}

.table-actions button:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.table-actions button.approve:hover {
    background: #D1FAE5;
    color: #059669;
}

.table-actions button.reject:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.table-actions button.delete:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.table-empty {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.table-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.table-empty p {
    font-size: 0.9rem;
}

/* Admin section panels */
.admin-section {
    display: none;
}

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

/* Admin Modal */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.admin-modal {
    background: white;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.3s ease;
}

.admin-modal .modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-modal .modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-modal .modal-body {
    padding: 24px;
}

.admin-modal .modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 280px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.toast.success {
    border-color: #059669;
}

.toast.error {
    border-color: #DC2626;
}

.toast.info {
    border-color: var(--primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Image preview */
.image-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-gray);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
}

.member-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-info-cell .name {
    font-weight: 600;
    color: var(--text-dark);
}

.member-info-cell .sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive Admin */
.admin-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    border-radius: 8px;
    color: var(--text-dark);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-mobile-toggle {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-topbar {
        padding: 12px 16px;
    }

    .admin-table-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
    }
}