* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.order-history-container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.header h1 i {
    margin-right: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1rem;
}

.loading-spinner {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 15px;
}

.no-orders {
    text-align: center;
    background: white;
    padding: 60px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.no-orders i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-orders p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-3px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.order-info {
    flex: 1;
}

.order-id {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.order-date {
    font-size: 0.9rem;
    color: #666;
}

.order-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-placed {
    background: #e3f2fd;
    color: #1976d2;
}

.status-accepted {
    background: #fff3e0;
    color: #f57c00;
}

.status-inprogress,
.status-baking {
    background: #fff8e1;
    color: #ff8f00;
}

.status-ready,
.status-pickedup {
    background: #e8f5e9;
    color: #388e3c;
}

.status-completed,
.status-delivered {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

.order-amount {
    text-align: right;
    margin-left: 20px;
}

.amount-label {
    font-size: 0.8rem;
    color: #666;
}

.amount-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.order-toggle {
    margin-left: 15px;
    color: #999;
    transition: transform 0.3s;
}

.order-toggle.expanded {
    transform: rotate(180deg);
}

.order-details {
    display: none;
    padding: 20px;
    background: #fafafa;
}

.order-details.show {
    display: block;
}

.items-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.item-quantity {
    font-size: 0.85rem;
    color: #666;
}

.item-price {
    font-weight: 600;
    color: #333;
}

.order-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.95rem;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    padding-top: 10px;
    margin-top: 5px;
    border-top: 1px solid #ddd;
}

.store-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    font-size: 0.9rem;
    color: #666;
}

.store-info i {
    margin-right: 8px;
    color: #999;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .order-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .order-amount {
        text-align: left;
        margin-left: 0;
    }

    .order-toggle {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .order-header {
        position: relative;
        padding-right: 50px;
    }
}

/* OTP UI Styles */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.otp-field {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.otp-field:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.resend-link {
    color: #667eea;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.resend-link.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.popup-actions .btn-primary,
.popup-actions .btn-secondary {
    margin: 0;
}

/* Mobile Popup Styles */
.mobile-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mobile-popup .popup-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.mobile-popup h2 {
    color: #333;
    margin-bottom: 10px;
}

.mobile-popup h2 i {
    margin-right: 10px;
    color: #667eea;
}

.mobile-popup p {
    color: #666;
    margin-bottom: 20px;
}

.mobile-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.mobile-input-group select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.mobile-input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.mobile-input-group input:focus,
.mobile-input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.error-text {
    color: #dc3545;
    font-size: 0.9rem;
    min-height: 1.5em;
    margin-bottom: 15px;
}

.mobile-popup .btn-primary {
    width: 100%;
    margin-bottom: 10px;
}

.btn-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

/* Mobile Popup Responsive */
@media (max-width: 480px) {
    .mobile-popup .popup-content {
        padding: 20px;
        width: 95%;
        margin: 10px;
    }

    .mobile-popup h2 {
        font-size: 1.2rem;
    }

    .mobile-popup p {
        font-size: 0.9rem;
    }

    .mobile-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .mobile-input-group select {
        width: 100%;
        padding: 10px;
    }

    .mobile-input-group input {
        width: 100%;
        min-width: 0;
        padding: 10px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}