/* Admin Panel Responsive Styles */

/* Mobile First Approach */
@media (max-width: 640px) {
    /* Container adjustments */
    .admin-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Header responsive */
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .admin-header .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-header .header-actions a,
    .admin-header .header-actions button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Statistics cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    /* Filter section */
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-actions > * {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Table responsive */
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Pagination */
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .pagination-info {
        order: 1;
        text-align: center;
    }
    
    .pagination-links {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-meta {
        order: 3;
        text-align: center;
    }
    
    /* Form responsive */
    .admin-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-form-actions > * {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Quick actions */
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Bulk actions */
    .bulk-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .bulk-actions form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .bulk-actions select,
    .bulk-actions button {
        width: 100%;
    }
}

/* Tablet styles */
@media (min-width: 641px) and (max-width: 1024px) {
    .admin-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .filter-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 1rem 0.75rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .admin-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop styles */
@media (min-width: 1025px) {
    .admin-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .filter-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .admin-form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Component Styles */
.admin-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.admin-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0.75rem 0.75rem 0 0;
}

.admin-card-body {
    padding: 1.5rem;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    gap: 0.5rem;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.admin-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.admin-btn-secondary {
    background: #6b7280;
    color: white;
}

.admin-btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.admin-btn-success {
    background: #10b981;
    color: white;
}

.admin-btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.admin-btn-danger {
    background: #ef4444;
    color: white;
}

.admin-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.admin-btn-warning {
    background: #f59e0b;
    color: white;
}

.admin-btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.admin-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.admin-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    transition: all 0.3s ease;
}

.admin-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.25rem;
}

.admin-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.admin-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Loading states */
.admin-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.admin-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert styles */
.admin-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.admin-alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.admin-alert-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.admin-alert-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Responsive utilities */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 640px) {
    .hide-mobile {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .admin-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .admin-btn {
        display: none;
    }
}
