/**
 * SIMORA Custom Styles
 * Smart IoT Maggot Recycling Application
 */

:root {
    --primary-color: #28a745;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-success {
    border-radius: 20px;
    font-weight: 500;
}

.btn-warning {
    border-radius: 20px;
    font-weight: 500;
}

.btn-danger {
    border-radius: 20px;
    font-weight: 500;
}

/* Dashboard Stats Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
}

.stats-card.success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

.stats-card.info {
    background: linear-gradient(135deg, var(--info-color), #6f42c1);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Sensor Status Indicators */
.sensor-card {
    border-left: 5px solid var(--primary-color);
    margin-bottom: 15px;
}

.sensor-card.danger {
    border-left-color: var(--danger-color);
}

.sensor-card.warning {
    border-left-color: var(--warning-color);
}

.sensor-card.success {
    border-left-color: var(--success-color);
}

.sensor-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.sensor-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* QR Scanner Styles */
.qr-scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#qr-video {
    width: 100%;
    border-radius: 15px;
}

.qr-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: scale(1.02);
}

.product-image {
    height: 150px;
    object-fit: cover;
    width: 100%;
}

.product-points {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

/* Ranking List */
.ranking-list {
    list-style: none;
    padding: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ranking-position {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.ranking-position.gold {
    background: #ffd700;
    color: #333;
}

.ranking-position.silver {
    background: #c0c0c0;
    color: #333;
}

.ranking-position.bronze {
    background: #cd7f32;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .stats-number {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .sensor-value {
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Alert Styles */
.alert {
    border-radius: 15px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Gamification & Profile Styles */
.profile-avatar {
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.achievement-item {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.achievement-item:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.achievement-icon {
    min-width: 50px;
}

.ranking-badge {
    min-width: 40px;
    text-align: center;
}

.stats-card.success {
    border-left: 4px solid var(--bs-success);
}

.stats-card.info {
    border-left: 4px solid var(--bs-info);
}

.stats-card.warning {
    border-left: 4px solid var(--bs-warning);
}

.stats-card.danger {
    border-left: 4px solid var(--bs-danger);
}

/* Progress indicators */
.progress-ring {
    width: 60px;
    height: 60px;
}

.progress-ring circle {
    transition: stroke-dasharray 0.5s ease;
}

/* Leaderboard animations */
.list-group-item {
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Badge animations */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .stats-number {
        font-size: 1.5rem;
    }
    
    .achievement-item {
        margin-bottom: 0.5rem;
    }
    
    .profile-avatar {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Gamification progress bars */
.progress-gamification {
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
}

.progress-gamification .progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.8s ease;
}

/* Environmental impact indicators */
.impact-indicator {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.impact-indicator .impact-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.impact-indicator .impact-label {
    font-size: 0.9rem;
    opacity: 0.9;
}
/* Mobile-First Responsive Design Enhancements */

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
}

.mobile-nav-link {
    color: #6c757d;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.mobile-nav-link small {
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Enhanced Touch Targets */
.btn {
    min-height: 44px;
    min-width: 44px;
}

.nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Improved Mobile Navigation */
.navbar-toggler {
    border: none;
    padding: 8px;
    min-height: 44px;
    min-width: 44px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Mobile-Optimized Cards */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .stats-card {
        min-height: 120px;
    }
    
    .stats-number {
        font-size: 1.8rem;
    }
    
    .stats-label {
        font-size: 0.9rem;
    }
}

/* Touch-Friendly Form Controls */
.form-control,
.form-select {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
}

.form-check-input {
    width: 1.5em;
    height: 1.5em;
}

/* QR Scanner Styles */
.qr-scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.qr-scanner-video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.qr-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #28a745;
    border-radius: 12px;
    pointer-events: none;
}

.qr-scanner-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid #28a745;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
}

.qr-scanner-controls {
    margin-top: 1rem;
    text-align: center;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Improved Modal for Mobile */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        border-top: 1px solid #dee2e6;
    }
}

/* Enhanced Table Responsiveness */
.table-responsive {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        vertical-align: middle;
    }
}

/* Sticky Elements */
.sticky-top {
    z-index: 1020;
}

/* Performance Optimizations */
.img-fluid {
    height: auto;
    max-width: 100%;
}

/* Lazy Loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    text-align: center;
    padding: 0.5rem;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-indicator.show {
    transform: translateY(0);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    border-color: #28a745;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-outline-primary {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #121212;
        --bs-body-color: #ffffff;
        --bs-card-bg: #1e1e1e;
    }
}

/* Print Styles */
@media print {
    .mobile-bottom-nav,
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Admin Profile Styles */
.profile-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.profile-form .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.profile-form .input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 0 8px 8px 0;
}

.profile-form .btn-outline-secondary {
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.profile-form .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #28a745;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 5px;
    background-color: #e9ecef;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak {
    background-color: #dc3545;
    width: 33%;
}

.password-strength-medium {
    background-color: #ffc107;
    width: 66%;
}

.password-strength-strong {
    background-color: #28a745;
    width: 100%;
}

.admin-stats-overview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
}

.admin-stats-overview .stat-item {
    text-align: center;
    padding: 1rem;
}

.admin-stats-overview .stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.admin-stats-overview .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.account-info-table {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.account-info-table .table {
    margin-bottom: 0;
}

.account-info-table .table td {
    border: none;
    padding: 0.75rem 0;
}

.account-info-table .table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 40%;
}

/* Form validation styles */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38L7.7 4.09l.94.94L4.25 9.41z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Security badge styles */
.security-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.security-badge i {
    margin-right: 0.5rem;
}

/* Admin profile avatar enhancement */
.admin-profile-avatar {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.admin-profile-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive adjustments for admin profile */
@media (max-width: 768px) {
    .admin-stats-overview {
        padding: 1.5rem;
    }
    
    .admin-stats-overview .stat-number {
        font-size: 1.5rem;
    }
    
    .account-info-table {
        padding: 1rem;
    }
    
    .profile-form .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}
/* Admin Dashboard Quick Actions Enhancement */
.admin-quick-actions .btn {
    transition: all 0.3s ease;
    border-radius: 15px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-quick-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.admin-quick-actions .btn i {
    transition: transform 0.3s ease;
}

.admin-quick-actions .btn:hover i {
    transform: scale(1.1);
}

/* Responsive adjustments for admin dashboard */
@media (max-width: 992px) {
    .admin-quick-actions .btn {
        min-height: 100px !important;
        font-size: 0.9rem;
    }
    
    .admin-quick-actions .btn i {
        font-size: 2rem !important;
    }
}

@media (max-width: 768px) {
    .admin-quick-actions .btn {
        min-height: 90px !important;
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .admin-quick-actions .btn i {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .admin-quick-actions .btn span {
        font-size: 0.8rem;
    }
}

/* Color variations for admin buttons */
.admin-quick-actions .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.admin-quick-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.admin-quick-actions .btn-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

.admin-quick-actions .btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.admin-quick-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
}
/* Admin Reports Enhancement */
.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.exchange-history-table .table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.exchange-history-table .table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.exchange-history-table .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.product-image-sm {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.user-info {
    min-width: 200px;
}

.product-info {
    min-width: 180px;
}

.exchange-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Tab styling for exchange reports */
.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    border-bottom-color: #007bff;
    color: #007bff;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #007bff;
    color: #007bff;
}

/* Exchange summary cards */
.exchange-summary-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.exchange-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.exchange-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
}

.exchange-stats .stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.exchange-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive adjustments for exchange tables */
@media (max-width: 768px) {
    .exchange-history-table .table td,
    .exchange-history-table .table th {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .product-image-sm {
        width: 32px;
        height: 32px;
    }
    
    .user-info,
    .product-info {
        min-width: auto;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Empty state styling */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #adb5bd;
    margin-bottom: 0;
}

/* Badge variations for exchange status */
.badge-exchange-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.badge-exchange-pending {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.badge-exchange-failed {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

/* Table row animations */
.table-hover tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.exchange-row {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.exchange-row:hover {
    border-left-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05) !important;
}

/* Product name truncation with tooltip */
.product-name-truncate {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User ranking badges */
.rank-badge-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b5a00;
}

.rank-badge-2 {
    background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
    color: #666;
}

.rank-badge-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #fff;
}
/* Enhanced Admin Dashboard Management System */
.management-card {
    transition: all 0.3s ease;
    height: 100%;
}

.management-card:hover {
    transform: translateY(-5px);
}

.management-card .btn {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.management-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.management-card .btn:hover::before {
    left: 100%;
}

.management-card .btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.management-card .btn i {
    transition: transform 0.3s ease;
}

.management-card .btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Enhanced button colors with gradients */
.management-card .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.management-card .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.management-card .btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.management-card .btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
}

.management-card .btn-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
    border: none;
}

.management-card .btn-info:hover {
    background: linear-gradient(135deg, #117a8b, #0c5460);
}

.management-card .btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
    color: #212529;
}

.management-card .btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    color: #212529;
}

.management-card .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border: none;
}

.management-card .btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #3d4142);
}

.management-card .btn-dark {
    background: linear-gradient(135deg, #343a40, #23272b);
    border: none;
}

.management-card .btn-dark:hover {
    background: linear-gradient(135deg, #23272b, #1d2124);
}

.management-card .btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

.management-card .btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #dc3545;
    color: white;
}

/* Management section header enhancement */
.admin-quick-actions .card-header {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    border-radius: 15px 15px 0 0;
}

.admin-quick-actions .card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
}

/* Responsive adjustments for management cards */
@media (max-width: 768px) {
    .management-card .btn {
        min-height: 100px !important;
        font-size: 0.9rem;
        padding: 1rem !important;
    }
    
    .management-card .btn i {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .management-card .btn small {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

@media (max-width: 576px) {
    .management-card .btn {
        min-height: 90px !important;
        font-size: 0.85rem;
        padding: 0.75rem !important;
    }
    
    .management-card .btn i {
        font-size: 1.25rem !important;
    }
    
    .management-card .btn .fw-bold {
        font-size: 0.8rem;
    }
    
    .management-card .btn small {
        font-size: 0.7rem;
        display: none; /* Hide descriptions on very small screens */
    }
}

/* System info modal enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 1.5rem;
    border-radius: 0 0 15px 15px;
}

/* Table styling in system info */
.modal-body .table {
    font-size: 0.875rem;
}

.modal-body .table td {
    border: none;
    padding: 0.25rem 0.5rem;
}

.modal-body .table td:first-child {
    width: 40%;
    color: #6c757d;
}

/* Alert styling in modal */
.modal-body .alert {
    border-radius: 10px;
    border: none;
    font-size: 0.875rem;
}

/* Database status cards */
.modal-body .bg-light {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.modal-body .bg-light:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Grid spacing improvements */
.admin-quick-actions .row.g-3 {
    margin: 0;
}

.admin-quick-actions .row.g-3 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Loading animation for system info */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}
/* Admin Dashboard Header Enhancement - Green Theme */
.admin-header-card {
    background: linear-gradient(135deg, #28a745, #20c997, #17a2b8);
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    overflow: hidden;
    position: relative;
}

.admin-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.admin-header-card .card-body {
    position: relative;
    z-index: 2;
}

.admin-header-content h2 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 2.5rem;
    font-weight: 700;
}

.admin-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.admin-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    display: inline-block;
    color: #ffffff;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.admin-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.admin-badge i {
    font-size: 1.1rem;
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.admin-user-info {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.admin-user-info i {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments for admin header */
@media (max-width: 768px) {
    .admin-header-content h2 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .admin-subtitle {
        font-size: 1rem;
    }
    
    .admin-badge {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin-top: 1rem;
    }
    
    .admin-user-info {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .admin-header-card .card-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .admin-header-content h2 {
        font-size: 1.75rem;
    }
    
    .admin-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .admin-badge {
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }
    
    .admin-user-info {
        text-align: center;
        margin-top: 0.75rem;
    }
}

/* Animation for admin header */
.admin-header-card {
    animation: slideInDown 0.6s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect for entire header card */
.admin-header-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
}

/* Green theme consistency for management section header */
.admin-quick-actions .card-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

.admin-quick-actions .card-header h5 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.admin-quick-actions .card-header i {
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Stats cards header consistency */
.stats-card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-card.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stats-card.info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.stats-card.warning {
    background: linear-gradient(135deg, #ffc107, #28a745);
}

/* Ensure text contrast on all cards */
.stats-card .stats-number,
.stats-card .stats-label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stats-card small {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Additional green theme elements */
.card-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
}

.card-header h5 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-header i {
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
/* Admin Date Filter Styling */
.admin-date-filter {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-date-input {
    background: rgba(5, 148, 131, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #495057;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.admin-date-input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.admin-search-btn {
    background: rgba(5, 148, 131, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #28a745;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 40px;
}

.admin-search-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-search-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Enhanced profile avatar for admin pages */
.admin-profile-avatar {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease;
}

.admin-profile-avatar:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.05);
}

.admin-profile-avatar i {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Mobile responsive adjustments for date filter */
@media (max-width: 768px) {
    .admin-date-filter {
        margin-top: 1rem;
        padding: 0.5rem;
    }
    
    .admin-date-filter form {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .admin-date-input,
    .admin-search-btn {
        width: 100%;
    }
    
    .admin-search-btn {
        min-width: auto;
    }
}

/* Consistent green theme for all admin headers */
.admin-header-card h2 i {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Additional enhancements for better contrast */
.admin-header-card .opacity-90 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.admin-header-card .opacity-85 {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Ensure all text in admin headers has proper contrast */
.admin-header-card * {
    color: inherit;
}

.admin-header-card i {
    color: rgba(255, 255, 255, 0.9);
}

/* Stats cards with green theme consistency */
.stats-card:not(.success):not(.info):not(.warning) {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* Make sure all admin page headers use the same styling */
.admin-header-card .card-body {
    background: transparent;
}

/* Fix any potential text color issues */
.admin-header-card .text-white {
    color: #ffffff !important;
}

.admin-header-card .text-white * {
    color: inherit !important;
}
/* Admin Action Button Styling */
.admin-action-btn {
    background: rgba(5, 148, 131, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #28a745 !important;
    border-radius: 25px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.admin-action-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #1e7e34 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.admin-action-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.admin-action-btn i {
    color: inherit !important;
}

/* Enhanced Product Cards */
.product-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card .product-image {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card .product-points {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.product-card .card-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.product-card .btn-group .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-card .btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #007bff;
    transform: translateY(-1px);
}

.product-card .btn-outline-success:hover {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #28a745;
    transform: translateY(-1px);
}

.product-card .btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #dc3545;
    transform: translateY(-1px);
}

/* Enhanced Badge Styling */
.product-card .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
}

.product-card .badge.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.product-card .badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
}

/* User Management Enhancements */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 2px solid rgba(40, 167, 69, 0.2);
    transition: all 0.3s ease;
}

.avatar-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Enhanced Table Styling */
.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
    transform: translateX(2px);
    transition: all 0.3s ease;
}

.table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 2px solid #28a745;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Enhanced Button Groups */
.btn-group .btn {
    border-radius: 6px !important;
    margin: 0 1px;
    transition: all 0.3s ease;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .modal-title {
    font-weight: 600;
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
}

/* Form Enhancements */
.form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 12px;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left-color: #28a745;
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left-color: #dc3545;
    color: #721c24;
}

/* Statistics Cards Enhancement */
.stats-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.stats-card .card-body {
    position: relative;
    z-index: 2;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stats-card.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stats-card.info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.stats-card.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .admin-action-btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    .product-card .product-image {
        height: 150px;
    }
    
    .avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        margin: 0;
        border-radius: 6px !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #28a745;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* User Theme Consistency - Green Theme Implementation */
.user-header-card {
    background: linear-gradient(135deg, #28a745, #20c997, #17a2b8) !important;
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    overflow: hidden;
    position: relative;
}

.user-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="user-grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23user-grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.user-header-card .card-body {
    position: relative;
    z-index: 2;
}

.user-header-content h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 2.5rem;
    font-weight: 700;
}

.user-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    display: inline-block;
    color: #ffffff !important;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.user-badge i {
    font-size: 1.1rem;
    color: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.user-info {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-info i {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure all text in user headers has proper contrast */
.user-header-card * {
    color: inherit;
}

.user-header-card .text-white {
    color: #ffffff !important;
}

.user-header-card .text-white * {
    color: inherit !important;
}

.user-header-card .opacity-90 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.user-header-card .opacity-85 {
    color: rgba(255, 255, 255, 0.85) !important;
}

.user-header-card .opacity-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Responsive adjustments for user header */
@media (max-width: 768px) {
    .user-header-content h2 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .user-subtitle {
        font-size: 1rem;
    }
    
    .user-badge {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin-top: 1rem;
    }
    
    .user-info {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .user-header-card .card-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .user-header-content h2 {
        font-size: 1.75rem;
    }
    
    .user-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .user-badge {
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }
    
    .user-info {
        text-align: center;
        margin-top: 0.75rem;
    }
}

/* Animation for user header */
.user-header-card {
    animation: slideInDown 0.6s ease-out;
}

/* Hover effect for entire user header card */
.user-header-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
}

/* User Stats Cards Enhancement - Consistent with Green Theme */
.stats-card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.stats-card .card-body {
    position: relative;
    z-index: 2;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stats-card.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stats-card.info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.stats-card.warning {
    background: linear-gradient(135deg, #28a745, #ffc107);
}

.stats-card.danger {
    background: linear-gradient(135deg, #28a745, #fd7e14);
}

/* Ensure text contrast on all user stats cards */
.stats-card .stats-number,
.stats-card .stats-label {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stats-card small {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* User Quick Actions Enhancement */
.card .card-header {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border: none;
    border-radius: 15px 15px 0 0;
}

.card .card-header h5 {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.card .card-header i {
    color: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* User Action Buttons Enhancement */
.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: none;
    color: white !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #17a085) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
    border: none;
    color: white !important;
}

.btn-info:hover {
    background: linear-gradient(135deg, #117a8b, #17a085) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #28a745, #ffc107) !important;
    border: none;
    color: white !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #1e7e34, #e0a800) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #28a745) !important;
    border: none;
    color: white !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #1e7e34) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Sensor Cards Enhancement for User Pages */
.sensor-card {
    border-left: 5px solid #28a745;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.sensor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.sensor-card.danger {
    border-left-color: #dc3545;
}

.sensor-card.warning {
    border-left-color: #ffc107;
}

.sensor-card.success {
    border-left-color: #28a745;
}

/* Product Cards Enhancement for User Pages */
.product-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card .product-points {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* List Group Items Enhancement */
.list-group-item:hover {
    background-color: rgba(40, 167, 69, 0.05) !important;
    transform: translateX(2px);
    transition: all 0.3s ease;
}

/* Badge Enhancements */
.badge.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #28a745, #ffc107) !important;
    color: white !important;
}

/* Progress Bar Enhancement */
.progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997) !important;
}

/* Alert Enhancement for User Pages */
.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
    border-left: 4px solid #28a745;
    color: #155724 !important;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb) !important;
    border-left: 4px solid #dc3545;
    color: #721c24 !important;
}

/* Ensure proper text contrast in all user components */
.text-success {
    color: #28a745 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Mobile Responsive Enhancements for User Theme */
@media (max-width: 768px) {
    .user-header-card {
        margin-bottom: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
}

/* Dark mode compatibility for user theme */
@media (prefers-color-scheme: dark) {
    .user-header-card {
        box-shadow: 0 10px 30px rgba(40, 167, 69, 0.5);
    }
    
    .stats-card {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}
/* User Pages Specific Background Fixes - Refined and Balanced */
/* This ensures user pages have consistent green theme without affecting admin */

/* Body background for user pages - subtle and clean */
body.user-page {
    background: #f8f9fa !important;
    min-height: 100vh;
}

/* User page cards - clean and subtle */
.user-page .card:not(.user-header-card):not(.stats-card) {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease;
}

.user-page .card:not(.user-header-card):not(.stats-card):hover {
    border-color: rgba(40, 167, 69, 0.2) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.1) !important;
    transform: translateY(-1px);
}

/* User page card bodies - clean white background */
.user-page .card-body:not(.text-white) {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

/* User page card headers - green theme but subtle */
.user-page .card .card-header:not(.user-header-card .card-header) {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border-bottom: none !important;
}

/* Stats cards - keep the original gradient styling */
.user-page .stats-card {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Sensor cards - subtle green accent */
.user-page .sensor-card {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-left: 4px solid #28a745 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.user-page .sensor-card.danger {
    border-left-color: #dc3545 !important;
}

.user-page .sensor-card.warning {
    border-left-color: #ffc107 !important;
}

.user-page .sensor-card.success {
    border-left-color: #28a745 !important;
}

/* Product cards - clean and professional */
.user-page .product-card {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.user-page .product-card:hover {
    border-color: rgba(40, 167, 69, 0.2) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1) !important;
}

/* List group items - clean styling */
.user-page .list-group-item {
    background: #ffffff !important;
    border-color: #e9ecef !important;
}

.user-page .list-group-item:hover {
    background: #f8f9fa !important;
    border-color: rgba(40, 167, 69, 0.2) !important;
}

/* Alert boxes - subtle green accents */
.user-page .alert {
    border-left: 4px solid #28a745 !important;
    background: #ffffff !important;
    border-top: 1px solid #e9ecef !important;
    border-right: 1px solid #e9ecef !important;
    border-bottom: 1px solid #e9ecef !important;
}

.user-page .alert-success {
    background: #f8fff9 !important;
    border-left-color: #28a745 !important;
    color: #155724 !important;
}

.user-page .alert-danger {
    background: #fff5f5 !important;
    border-left-color: #dc3545 !important;
    color: #721c24 !important;
}

.user-page .alert-warning {
    background: #fffbf0 !important;
    border-left-color: #ffc107 !important;
    color: #856404 !important;
}

/* QR Scanner status - green theme but not overwhelming */
.user-qr-status {
    background: rgba(40, 167, 69, 0.9) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* User ranking badge - green theme */
.user-ranking-badge {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Points preview card - subtle green tint */
.user-page .bg-light {
    background: #f8fff9 !important;
    border: 1px solid #e9ecef !important;
}

/* Text color fixes for user pages */
.user-page .text-muted {
    color: #6c757d !important;
}

.user-page .text-dark {
    color: #2c3e50 !important;
}

/* Badge fixes - keep warning badges readable */
.user-page .badge.bg-warning.text-dark {
    background: #ffc107 !important;
    color: #212529 !important;
}

/* Ensure proper contrast in user pages */
.user-page .card-title {
    color: #2c3e50 !important;
    font-weight: 600;
}

.user-page .card-text {
    color: #495057 !important;
}

/* Tab content - clean background */
.user-page .tab-content {
    background: #ffffff !important;
    border-radius: 0 0 15px 15px !important;
}

/* Table styling - clean and professional */
.user-page .table {
    background: transparent !important;
}

.user-page .table th {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    border-bottom: 2px solid #28a745 !important;
}

.user-page .table td {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: #e9ecef !important;
}

/* Modal styling - clean and professional */
.user-page .modal-content {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
}

.user-page .modal-header {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border-bottom: none !important;
}

.user-page .modal-body {
    background: #ffffff !important;
}

/* Form styling - clean inputs */
.user-page .form-control {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
}

.user-page .form-control:focus {
    background: #ffffff !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Progress bars - green theme */
.user-page .progress {
    background: #e9ecef !important;
}

.user-page .progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997) !important;
}

/* Dropdown menus - clean styling */
.user-page .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.user-page .dropdown-item:hover {
    background: #f8f9fa !important;
}

/* Pagination - green accents */
.user-page .pagination .page-link {
    background: #ffffff !important;
    border-color: #ced4da !important;
    color: #28a745 !important;
}

.user-page .pagination .page-link:hover {
    background: #f8f9fa !important;
    border-color: #28a745 !important;
}

.user-page .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-color: #28a745 !important;
}

/* Breadcrumb - clean styling */
.user-page .breadcrumb {
    background: #f8f9fa !important;
}

.user-page .breadcrumb-item a {
    color: #28a745 !important;
}

/* Navbar - clean and professional */
body.user-page .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* Footer - clean styling */
body.user-page .footer {
    background: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
}

/* Mobile bottom navigation - clean styling */
body.user-page .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-top: 1px solid #e9ecef !important;
}

/* Override any remaining dark backgrounds - but subtle */
.user-page .bg-dark {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
}

.user-page .bg-black {
    background: linear-gradient(135deg, #2c3e50, #28a745) !important;
    color: white !important;
}

/* Text color overrides for better contrast */
.user-page .text-white {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.user-page .text-success {
    color: #28a745 !important;
}

.user-page .text-info {
    color: #17a2b8 !important;
}

.user-page .text-warning {
    color: #856404 !important;
}

.user-page .text-danger {
    color: #dc3545 !important;
}

/* Hover effects - subtle and professional */
.user-page .card:hover {
    transform: translateY(-1px) !important;
}

/* Remove overly aggressive styling */
.user-page .card,
.user-page .alert,
.user-page .modal-content {
    transition: all 0.3s ease !important;
}

/* Ensure stats cards keep their original beautiful gradients */
.user-page .stats-card.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: none !important;
}

.user-page .stats-card.info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
    border: none !important;
}

.user-page .stats-card.warning {
    background: linear-gradient(135deg, #28a745, #ffc107) !important;
    border: none !important;
}

.user-page .stats-card.danger {
    background: linear-gradient(135deg, #28a745, #fd7e14) !important;
    border: none !important;
}

/* Clean up any remaining issues */
.user-page .container,
.user-page .container-fluid,
.user-page .row,
.user-page .col,
.user-page [class*="col-"] {
    background: transparent !important;
}
/* Additional User Page Specific Fixes - Clean and Professional */

/* QR Scanner status with green theme */
.user-qr-status {
    background: rgba(40, 167, 69, 0.9) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* User ranking badge with green theme */
.user-ranking-badge {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-page .card {
        margin-bottom: 1rem !important;
    }
    
    .user-page .card-body {
        padding: 1rem !important;
    }
}
/* Fix Stats Cards Text Visibility in User Pages */
.user-page .stats-card {
    color: white !important;
}

.user-page .stats-card .stats-number {
    color: white !important;
    font-size: 2.5rem !important;
    font-weight: bold !important;
    margin-bottom: 5px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.user-page .stats-card .stats-label {
    color: white !important;
    font-size: 1rem !important;
    opacity: 0.9 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.user-page .stats-card small {
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.user-page .stats-card .card-body {
    color: white !important;
    background: transparent !important;
}

/* Ensure stats cards have proper padding and spacing */
.user-page .stats-card .card-body {
    padding: 1.5rem !important;
}

/* Make sure stats cards are visible and prominent */
.user-page .stats-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Add subtle pattern overlay for visual interest */
.user-page .stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stats-dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23stats-dots)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.user-page .stats-card .card-body {
    position: relative;
    z-index: 2;
}

/* Hover effects for stats cards */
.user-page .stats-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

/* Specific color fixes for each stats card type */
.user-page .stats-card.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.user-page .stats-card.info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
}

.user-page .stats-card.warning {
    background: linear-gradient(135deg, #28a745, #ffc107) !important;
}

.user-page .stats-card.danger {
    background: linear-gradient(135deg, #28a745, #fd7e14) !important;
}

/* Ensure all text elements in stats cards are visible */
.user-page .stats-card * {
    color: inherit !important;
}

.user-page .stats-card .text-center * {
    color: white !important;
}

/* Mobile responsive adjustments for stats cards */
@media (max-width: 768px) {
    .user-page .stats-card .stats-number {
        font-size: 2rem !important;
    }
    
    .user-page .stats-card .stats-label {
        font-size: 0.9rem !important;
    }
    
    .user-page .stats-card small {
        font-size: 0.8rem !important;
    }
}
/* Enhanced User Profile Styles */
.user-stat-item {
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.user-stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Enhanced Stats Cards for User Profile */
.stats-card.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-left: 4px solid #ffffff;
}

.stats-card.info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
    border-left: 4px solid #ffffff;
}

.stats-card.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    border-left: 4px solid #ffffff;
}

.stats-card.danger {
    background: linear-gradient(135deg, #28a745, #17a2b8) !important;
    border-left: 4px solid #ffffff;
}

/* Enhanced Achievement Items */
.achievement-item {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef !important;
}

.achievement-item:hover {
    border-color: #28a745 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15) !important;
}

/* Enhanced Navigation Pills */
.nav-pills .nav-link {
    border: 2px solid transparent;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:not(.active) {
    color: #6c757d;
    background: #f8f9fa;
}

.nav-pills .nav-link:not(.active):hover {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    color: white;
}

/* Enhanced Table Styling */
.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #28a745;
}

/* Enhanced Pagination */
.pagination .page-link {
    border: none;
    color: #28a745;
    font-weight: 500;
    margin: 0 2px;
}

.pagination .page-link:hover {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
}

/* Enhanced Empty State */
.text-muted .opacity-50 {
    opacity: 0.5 !important;
}

/* Profile Header Animation */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-header-card {
    animation: slideInDown 0.6s ease-out;
}

/* Card Hover Effects */
.card.border-0.shadow-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Badge Enhancements */
.badge.rounded-pill {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
}

/* Responsive Enhancements for User Profile */
@media (max-width: 768px) {
    .user-stat-item {
        margin-bottom: 0.5rem;
    }
    
    .stats-card .stats-number {
        font-size: 1.8rem;
    }
    
    .achievement-item {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .nav-pills .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .user-header-card .card-body {
        padding: 1.5rem !important;
    }
    
    .user-stat-item .fs-3 {
        font-size: 1.5rem !important;
    }
    
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .nav-pills {
        flex-direction: column;
    }
    
    .nav-pills .nav-item {
        margin-bottom: 0.5rem;
    }
}

/* Loading Animation for Charts */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.chart-loading .spinner-border {
    color: #28a745;
}

/* Enhanced Card Headers */
.card-header.bg-gradient {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

/* Profile Badge Tooltips */
.badge[title] {
    cursor: help;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Focus States for Accessibility */
.nav-link:focus,
.btn:focus,
.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}
/* Enhanced History Section Styles */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.product-image-container {
    position: relative;
}

.product-image-container img {
    transition: transform 0.3s ease;
}

.product-image-container:hover img {
    transform: scale(1.05);
}

/* Enhanced Table Styles for History */
.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
    transform: translateX(5px);
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
}

/* Badge Enhancements */
.badge.fs-6 {
    font-size: 0.875rem !important;
}

/* Summary Cards in History */
.bg-light.rounded.p-3 {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.bg-light.rounded.p-3:hover {
    border-color: rgba(40, 167, 69, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Pagination Enhancements */
.pagination .page-link {
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Empty State Enhancements */
.text-center.text-muted.py-5 {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

/* Tips Section */
.bg-light.rounded.p-4 {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    border: 1px solid rgba(40, 167, 69, 0.1);
}

/* Mobile Responsive for History */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .badge.rounded-pill {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hover-card {
        margin-bottom: 1rem;
    }
    
    .product-image-container img {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 576px) {
    .table th:nth-child(1),
    .table td:nth-child(1) {
        display: none; /* Hide number column on very small screens */
    }
    
    .nav-pills .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-pills .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Loading Animation for History */
.history-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.history-loading .spinner-border {
    color: #28a745;
    width: 3rem;
    height: 3rem;
}

/* Status Indicators */
.status-success {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-pending {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-failed {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Enhanced Tab Content */
.tab-content {
    min-height: 400px;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles for History */
@media print {
    .nav-pills,
    .pagination,
    .btn {
        display: none !important;
    }
    
    .table {
        font-size: 12px;
    }
    
    .badge {
        border: 1px solid #000;
        color: #000 !important;
        background: transparent !important;
    }
}
/* Product Card Animations */
.product-card {
    transition: all 0.3s ease-out;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-card {
    transition: all 0.2s ease-out;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Success Alert Animation */
.alert-success-animated {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Exchange Success Animation */
.exchange-success-card {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}

/* Product Image Styles */
.product-image {
    height: 200px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

/* Product Points Badge */
.product-points {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

/* Alert Enhancements */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8, #3498db);
    color: white;
}

/* Pagination Styles */
.page-link {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    margin: 0 2px;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Badge Styles */
.badge {
    border-radius: 8px;
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* User Header Card */
.user-header-card {
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    border-radius: 20px;
    overflow: hidden;
}

.user-header-card .card-body {
    padding: 2rem;
}

.user-badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.user-subtitle {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-image {
        height: 150px;
    }
    
    .user-header-card .card-body {
        padding: 1.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Empty State Styles */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Success Checkmark Animation */
.success-checkmark {
    animation: checkmarkScale 0.3s ease-out;
}

@keyframes checkmarkScale {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Admin Mobile Bottom Navigation */
.mobile-bottom-nav-admin {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
    background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
    border-top: 2px solid #28a745 !important;
}

.mobile-bottom-nav-admin .mobile-nav-link {
    color: #6c757d;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
}

.mobile-bottom-nav-admin .mobile-nav-link:hover,
.mobile-bottom-nav-admin .mobile-nav-link.active {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.mobile-bottom-nav-admin .mobile-nav-link i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-bottom-nav-admin .mobile-nav-link small {
    font-size: 0.7rem;
    margin-top: 2px;
    font-weight: 500;
}

/* User Mobile Bottom Navigation */
.mobile-bottom-nav-user {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
    background: linear-gradient(135deg, #ffffff, #f8f9fa) !important;
    border-top: 2px solid #17a2b8 !important;
}

.mobile-bottom-nav-user .mobile-nav-link {
    color: #6c757d;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
}

.mobile-bottom-nav-user .mobile-nav-link:hover,
.mobile-bottom-nav-user .mobile-nav-link.active {
    color: #17a2b8;
    background-color: rgba(23, 162, 184, 0.1);
}

.mobile-bottom-nav-user .mobile-nav-link i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-bottom-nav-user .mobile-nav-link small {
    font-size: 0.7rem;
    margin-top: 2px;
    font-weight: 500;
}

/* Add padding to body when bottom nav is present */
@media (max-width: 767.98px) {
    body.has-bottom-nav {
        padding-bottom: 70px;
    }
    
    main.has-bottom-nav {
        padding-bottom: 70px;
    }
}

/* Active state animation */
.mobile-nav-link.active i {
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Touch feedback for mobile nav */
.mobile-nav-link:active {
    transform: scale(0.95);
}
