/* Mobile Admin Menu Enhancements */

/* Accordion-style mobile menu */
@media (max-width: 1024px) {
    .mobile-admin-menu .menu-section {
        border-bottom: 1px solid rgba(59, 130, 246, 0.3);
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
    
    .mobile-admin-menu .menu-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .mobile-admin-menu .menu-header {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        color: rgba(191, 219, 254, 0.8);
        padding: 0 12px 4px;
        margin-bottom: 4px;
    }
    
    .mobile-admin-menu .menu-item {
        display: flex;
        align-items: center;
        color: rgb(191, 219, 254);
        padding: 10px 12px;
        border-radius: 6px;
        font-weight: 500;
        font-size: 15px;
        transition: all 0.2s ease;
        margin-bottom: 2px;
    }
    
    .mobile-admin-menu .menu-item:hover {
        background-color: rgb(30, 64, 175);
        color: white;
        transform: translateX(4px);
    }
    
    .mobile-admin-menu .menu-item i {
        width: 20px;
        margin-right: 8px;
        flex-shrink: 0;
        text-align: center;
    }
    
    /* Badge indicators for menu items with notifications */
    .mobile-admin-menu .menu-item.has-notification::after {
        content: '';
        width: 8px;
        height: 8px;
        background-color: #ef4444;
        border-radius: 50%;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* Active state for current page */
    .mobile-admin-menu .menu-item.active {
        background-color: rgba(59, 130, 246, 0.2);
        color: #fbbf24;
        font-weight: 600;
    }
    
    .mobile-admin-menu .menu-item.active i {
        color: #fbbf24;
    }
    
    /* Quick action buttons */
    .mobile-admin-actions {
        display: flex;
        gap: 8px;
        padding: 12px;
        background: rgba(30, 64, 175, 0.3);
        border-top: 1px solid rgba(59, 130, 246, 0.3);
        margin-top: 8px;
    }
    
    .mobile-admin-actions .quick-action {
        flex: 1;
        background: rgba(59, 130, 246, 0.2);
        border: 1px solid rgba(59, 130, 246, 0.4);
        border-radius: 6px;
        padding: 8px;
        text-align: center;
        color: rgb(191, 219, 254);
        font-size: 12px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .mobile-admin-actions .quick-action:hover {
        background: rgba(59, 130, 246, 0.4);
        color: white;
        transform: translateY(-1px);
    }
    
    .mobile-admin-actions .quick-action i {
        display: block;
        font-size: 14px;
        margin-bottom: 4px;
    }
}

/* Desktop admin dropdown improvements */
@media (min-width: 1025px) {
    .admin-dropdown {
        min-width: 280px;
        max-height: 80vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 #f1f5f9;
    }
    
    .admin-dropdown::-webkit-scrollbar {
        width: 4px;
    }
    
    .admin-dropdown::-webkit-scrollbar-track {
        background: #f1f5f9;
    }
    
    .admin-dropdown::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 2px;
    }
    
    .admin-dropdown .dropdown-section {
        padding: 8px 0;
    }
    
    .admin-dropdown .dropdown-section:not(:last-child) {
        border-bottom: 1px solid #f1f5f9;
    }
    
    .admin-dropdown .dropdown-header {
        padding: 4px 12px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        color: #6b7280;
        background: #f9fafb;
        margin-bottom: 4px;
    }
    
    .admin-dropdown .dropdown-item {
        display: flex;
        align-items: center;
        padding: 8px 16px;
        color: #374151;
        font-size: 14px;
        transition: all 0.15s ease;
    }
    
    .admin-dropdown .dropdown-item:hover {
        background: #f3f4f6;
        color: #1f2937;
        transform: translateX(2px);
    }
    
    .admin-dropdown .dropdown-item i {
        width: 16px;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .admin-dropdown .dropdown-item.with-count::after {
        content: attr(data-count);
        margin-left: auto;
        background: #3b82f6;
        color: white;
        font-size: 11px;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 10px;
        min-width: 18px;
        text-align: center;
    }
}

/* Loading states for menu items */
.menu-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.menu-item.loading::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive table improvements for admin */
@media (max-width: 768px) {
    .admin-table-container {
        margin: 0 -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .admin-table-mobile {
        display: block;
        width: 100%;
    }
    
    .admin-table-mobile thead {
        display: none;
    }
    
    .admin-table-mobile tbody tr {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px;
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .admin-table-mobile tbody td {
        display: block;
        text-align: left !important;
        border: none !important;
        padding: 6px 0 !important;
        position: relative;
        padding-left: 40% !important;
    }
    
    .admin-table-mobile tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 6px;
        font-weight: 600;
        font-size: 12px;
        color: #6b7280;
        text-transform: uppercase;
        width: 35%;
    }
    
    .admin-table-mobile .table-actions {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f3f4f6;
    }
    
    .admin-table-mobile .table-actions .btn {
        font-size: 12px;
        padding: 6px 12px;
        margin-right: 8px;
        margin-bottom: 4px;
    }
}

/* Admin notification styles */
.admin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    max-width: 320px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.admin-notification.success {
    border-left-color: #10b981;
}

.admin-notification.error {
    border-left-color: #ef4444;
}

.admin-notification.warning {
    border-left-color: #f59e0b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Quick stats cards for mobile */
@media (max-width: 640px) {
    .admin-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .admin-stat-card {
        padding: 16px !important;
    }
    
    .admin-stat-card .stat-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .admin-stat-card .stat-number {
        font-size: 20px !important;
    }
    
    .admin-stat-card .stat-label {
        font-size: 12px !important;
    }
}