/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.review-thanks {
    background: rgba(0, 166, 81, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    width: fit-content;
    border: 1px solid rgba(0, 166, 81, 0.2);
}

.review-thanks i {
    font-size: 14px;
}

body {
    background: linear-gradient(43deg, #42dd44f7 0%, #ffffff 100%);
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

:root {
    --primary-color: #00A651;
    --primary-dark: #008f45;
    --primary-light: #00d66a;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #ffffff;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
}

/* Dark Mode Variables */
html.dark-mode {
    --text-dark: #f7fafc;
    --text-light: #cbd5e0;
    --bg-light: #1a202c;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

html.dark-mode body {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

/* Top Navigation */
.top-nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 166, 81, 0.3);
    height: 61px;
    backdrop-filter: blur(10px);
}

.nav-left .back-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.nav-left .back-icon:hover {
    transform: scale(1.1) translateX(-3px);
}

.nav-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 25px 15px;
    padding-bottom: 100px;
    margin: 0 auto;
    max-width: 1200px;
    z-index: 1;
}

.orders-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Order Card - Premium Design */
.order-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 166, 81, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.order-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 166, 81, 0.2);
    border-color: rgba(0, 166, 81, 0.3);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.05) 0%, rgba(0, 166, 81, 0.02) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark-mode .card-header {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.1) 0%, rgba(0, 166, 81, 0.05) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.order-id {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Courier New', monospace;
    background: rgba(0, 166, 81, 0.1);
    padding: 8px 14px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 8px;
}

.order-date {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.order-date i {
    color: var(--primary-color);
}

/* Status Badge - Enhanced */
.status-badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-pending {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

.status-pending::before {
    background: #78350f;
}

.status-confirmed {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #1e3a8a;
}

.status-confirmed::before {
    background: #1e3a8a;
}

.status-shipped {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #4c1d95;
}

.status-shipped::before {
    background: #4c1d95;
}

.status-delivered {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: #064e3b;
}

.status-delivered::before {
    background: #064e3b;
}

.status-canceled {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #7f1d1d;
}

.status-canceled::before {
    background: #7f1d1d;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Product Preview */
.product-preview {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-preview::-webkit-scrollbar {
    display: none;
}

.product-thumb {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(0, 166, 81, 0.2);
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-thumb:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

/* Card Body */
.card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(0, 166, 81, 0.02);
}

html.dark-mode .card-body {
    background: rgba(0, 166, 81, 0.05);
}

.total-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.total-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.total-amount {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 166, 81, 0.4);
}

.view-btn i {
    transition: transform 0.3s ease;
}

.view-btn.active i {
    transform: rotate(180deg);
}

/* Expanded Details */
.order-details-expanded {
    display: none;
    padding: 10px;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.03) 0%, rgba(0, 166, 81, 0.01) 100%);
    border-top: 1px dashed rgba(0, 166, 81, 0.2);
    animation: slideDown 0.4s ease;
}

.order-details-expanded.show {
    display: block;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(0, 166, 81, 0.2);
}

.info-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

html.dark-mode .info-item {
    background: rgba(255, 255, 255, 0.05);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 166, 81, 0.1);
}

.info-item span {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.info-item strong {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    display: block;
}

/* Delivery Status Tracker */
.delivery-status-tracker {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

html.dark-mode .delivery-status-tracker {
    background: rgba(255, 255, 255, 0.05);
}

.status-tracker-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-tracker-title i {
    color: var(--primary-color);
}

.tracker-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.tracker-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10px;
    right: 15px;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tracker-step.completed .step-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
}

.tracker-step.active .step-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    animation: bounce 1s infinite;
}

.step-label {
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
}

.tracker-step.completed .step-label,
.tracker-step.active .step-label {
    color: var(--text-dark);
    font-weight: 600;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Product List */
.product-list-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-list-title i {
    color: var(--primary-color);
}

.product-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.product-list li:hover {
    padding-left: 8px;
    background: rgba(0, 166, 81, 0.02);
}

.product-list li:last-child {
    border-bottom: none;
}

html.dark-mode .product-list li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.order-item-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.product-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 166, 81, 0.3);
}

.product-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.product-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-order-btn {
    background: linear-gradient(135deg, #00A651 0%, #00d66a 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 166, 81, 0.2);
    margin-top: 2px;
}

.rate-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 166, 81, 0.4);
    filter: brightness(1.1);
}

.rate-order-btn i {
    font-size: 10px;
}

/* Summary Section */
.order-summary {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

html.dark-mode .order-summary {
    background: rgba(255, 255, 255, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
}

.summary-row.total {
    border-top: 2px solid rgba(0, 166, 81, 0.2);
    margin-top: 10px;
    padding-top: 16px;
}

.summary-row.total .summary-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
}

.summary-row.total .summary-value {
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-label {
    color: var(--text-light);
}

.summary-value {
    color: var(--text-dark);
    font-weight: 600;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.loading-state i {
    font-size: 48px;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 2000px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-top: 30px;
    box-shadow: var(--card-shadow);
}

html.dark-mode .empty-state {
    background: var(--bg-light);
}

.empty-state i {
    font-size: 80px;
    color: #cbd5e0;
    margin-bottom: 24px;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 24px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
}

.shop-now-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 16px;
}

.shop-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 166, 81, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .tracker-steps {
        flex-wrap: wrap;
    }

    .tracker-step {
        flex: 0 0 0%;
        margin-bottom: 20px;
    }
}