/* Admin Dashboard Styles */

.admin-navbar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.admin-nav-menu .nav-link {
    color: #ffffff;
    font-weight: 600;
}

.admin-nav-menu .nav-link:hover,
.admin-nav-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

/* Admin Main Content */
.admin-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 2px solid rgba(59, 130, 246, 0.1);
}

.admin-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.admin-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.15);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.stat-card .stat-icon i {
    font-size: 1.8rem;
    color: #ffffff;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333333;
    margin: 0 0 0.5rem 0;
}

.stat-label {
    color: #666666;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 191, 255, 0.2);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 191, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    color: #333333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
}

.action-btn:hover {
    background: rgba(0, 191, 255, 0.05);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.2);
}

.action-btn i {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* Admin Filters */
.admin-filters {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 191, 255, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.admin-filters .search-box input,
.admin-filters select {
    background: rgba(255, 255, 255, 0.9);
    color: #333333;
    border: 2px solid rgba(0, 191, 255, 0.2);
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.admin-filters .search-box input:focus,
.admin-filters select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.2);
}

/* Tables */
.products-table-container,
.orders-table-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.1);
}

.products-table,
.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.orders-table th {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    padding: 1.5rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table td,
.orders-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
    color: #333333;
    vertical-align: middle;
}

.products-table tr:hover,
.orders-table tr:hover {
    background: rgba(0, 191, 255, 0.05);
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(0, 191, 255, 0.2);
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-out-of-stock {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Action Buttons */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete,
.btn-view {
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #ffffff;
    font-weight: 500;
}

.btn-edit {
    background: #3b82f6;
}

.btn-edit:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-delete {
    background: #ef4444;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-view {
    background: #10b981;
}

.btn-view:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Modal Styles */
.admin-modal {
    max-width: 600px;
    width: 90%;
    background: rgba(255, 255, 255, 0.98);
    color: #333333;
    border: 1px solid rgba(0, 191, 255, 0.2);
}

.admin-modal h2 {
    color: #333333;
    border-bottom: 2px solid rgba(0, 191, 255, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #333333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid rgba(0, 191, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333333;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.2);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 191, 255, 0.1);
}

/* Import Modal */
.import-section {
    text-align: center;
    padding: 2rem 0;
}

.file-upload {
    margin-bottom: 1rem;
}

.upload-label {
    display: inline-block;
    padding: 2rem 3rem;
    border: 2px dashed rgba(0, 191, 255, 0.3);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 191, 255, 0.05);
    color: #333333;
}

.upload-label:hover {
    border-color: #3b82f6;
    background: rgba(0, 191, 255, 0.1);
}

.upload-label i {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 1rem;
    display: block;
}

.import-note {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.2);
}

.chart-card h3 {
    color: #333333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 191, 255, 0.2);
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 191, 255, 0.05);
    border-radius: 10px;
    color: #666666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .products-table,
    .orders-table {
        font-size: 0.9rem;
    }
    
    .products-table th,
    .orders-table th,
    .products-table td,
    .orders-table td {
        padding: 1rem 0.5rem;
    }
}
