/* ============================================================
   TẾT PHỒN VINH - PROSPERITY LUNAR THEME
   Order & Tracking Plugin - Vietnamese New Year Edition
   Version: 1.0.0
   
   TABLE OF CONTENTS:
   1. CSS Variables & Root Settings
   2. Base Resets & Typography  
   3. Floating Buttons (Order & Tracking)
   4. Popup Container & Overlay
   5. Popup Header with Tết Decoration
   6. Form Elements & Inputs
   7. Product Section
   8. Voucher Cards
   9. Payment Methods & Deposit
   10. Order Summary
   11. Receipt/Success State
   12. Phase 3 - Waiting Confirmation
   13. Tracking Popup Specific
   14. Admin Dashboard Styles
   15. Animations & Effects
   16. Responsive Breakpoints
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES & ROOT SETTINGS
   ============================================================ */
:root {
    /* Tết Color Palette */
    --oat-red-primary: #C41E3A;
    --oat-red-dark: #9B1B30;
    --oat-red-light: #E85A71;
    --oat-gold-primary: #D4AF37;
    --oat-gold-light: #F4D03F;
    --oat-gold-dark: #B8860B;
    --oat-cream: #FFF8F0;
    --oat-cream-dark: #FFF0E0;
    --oat-white: #FFFFFF;
    --oat-black: #1A1A1A;
    
    /* Neutral Colors */
    --oat-gray-100: #F8F9FA;
    --oat-gray-200: #E9ECEF;
    --oat-gray-300: #DEE2E6;
    --oat-gray-400: #CED4DA;
    --oat-gray-500: #ADB5BD;
    --oat-gray-600: #6C757D;
    --oat-gray-700: #495057;
    --oat-gray-800: #343A40;
    --oat-gray-900: #212529;
    
    /* Status Colors */
    --oat-success: #28A745;
    --oat-success-light: #D4EDDA;
    --oat-warning: #FFC107;
    --oat-warning-light: #FFF3CD;
    --oat-error: #DC3545;
    --oat-error-light: #F8D7DA;
    --oat-info: #17A2B8;
    --oat-info-light: #D1ECF1;
    
    /* Typography */
    --oat-font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --oat-font-size-xs: clamp(0.625rem, 0.5rem + 0.5vw, 0.75rem);
    --oat-font-size-sm: clamp(0.75rem, 0.65rem + 0.5vw, 0.875rem);
    --oat-font-size-base: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
    --oat-font-size-lg: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --oat-font-size-xl: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
    --oat-font-size-2xl: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
    --oat-line-height: 1.6;
    
    /* Spacing */
    --oat-space-xs: 0.25rem;
    --oat-space-sm: 0.5rem;
    --oat-space-md: 1rem;
    --oat-space-lg: 1.5rem;
    --oat-space-xl: 2rem;
    --oat-space-2xl: 3rem;
    
    /* Border Radius */
    --oat-radius-sm: 4px;
    --oat-radius-md: 8px;
    --oat-radius-lg: 12px;
    --oat-radius-xl: 16px;
    --oat-radius-full: 50%;
    
    /* Shadows */
    --oat-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --oat-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --oat-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --oat-shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    --oat-shadow-glow-red: 0 0 20px rgba(196, 30, 58, 0.3);
    --oat-shadow-glow-gold: 0 0 20px rgba(212, 175, 55, 0.4);
    
    /* Transitions */
    --oat-transition-fast: 150ms ease;
    --oat-transition-base: 250ms ease;
    --oat-transition-slow: 400ms ease;
    
    /* Z-Index */
    --oat-z-floating: 9999;
    --oat-z-overlay: 100000;
    --oat-z-popup: 100001;
    --oat-z-tooltip: 100010;
}

/* ============================================================
   2. BASE RESETS & TYPOGRAPHY (Scoped to plugin)
   ============================================================ */
.oat-app,
.oat-app *,
.oat-app *::before,
.oat-app *::after {
    box-sizing: border-box;
}

.oat-app {
    font-family: var(--oat-font-primary);
    font-size: var(--oat-font-size-base);
    line-height: var(--oat-line-height);
    color: var(--oat-gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.oat-app h1, .oat-app h2, .oat-app h3, .oat-app h4, .oat-app h5, .oat-app h6 {
    margin: 0 0 var(--oat-space-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--oat-gray-900);
}

.oat-app p {
    margin: 0 0 var(--oat-space-sm);
}

.oat-app a {
    color: var(--oat-red-primary);
    text-decoration: none;
    transition: color var(--oat-transition-fast);
}

.oat-app a:hover {
    color: var(--oat-red-dark);
}

/* ============================================================
   3. FLOATING BUTTONS (ORDER & TRACKING)
   ============================================================ */
.oat-floating-wrapper {
    position: fixed;
    z-index: var(--oat-z-floating);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--oat-space-sm);
}

/* Order button - Bottom Right */
.oat-floating-wrapper--order {
    right: 20px;
    bottom: 100px;
}

/* Tracking button - Bottom Right, above order */
.oat-floating-wrapper--tracking {
    right: 20px;
    bottom: 180px;
}

.oat-floating-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: var(--oat-radius-full);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--oat-transition-base);
    overflow: visible;
}

/* Order Button - Red với Tết pattern */
.oat-floating-btn--order {
    background: linear-gradient(135deg, var(--oat-red-light) 0%, var(--oat-red-primary) 50%, var(--oat-red-dark) 100%);
    box-shadow: var(--oat-shadow-lg), var(--oat-shadow-glow-red);
}

.oat-floating-btn--order::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2C13.1 2 14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C15.1 7 16 7.9 16 9H8C8 7.9 8.9 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2Z' fill='%23FFD700' fill-opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

/* Golden ring decoration */
.oat-floating-btn--order::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid var(--oat-gold-primary);
    opacity: 0.6;
    pointer-events: none;
    animation: oat-golden-ring 2s ease-in-out infinite;
}

@keyframes oat-golden-ring {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 0.3; }
}

/* Tracking Button - Gold */
.oat-floating-btn--tracking {
    background: linear-gradient(135deg, var(--oat-gold-light) 0%, var(--oat-gold-primary) 50%, var(--oat-gold-dark) 100%);
    box-shadow: var(--oat-shadow-lg), var(--oat-shadow-glow-gold);
}

.oat-floating-btn--tracking::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid var(--oat-red-primary);
    opacity: 0.5;
    pointer-events: none;
}

.oat-floating-btn:hover {
    transform: scale(1.08) translateY(-2px);
}

.oat-floating-btn:active {
    transform: scale(0.95);
}

.oat-floating-btn__icon {
    width: 26px;
    height: 26px;
    fill: var(--oat-white);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
}

.oat-floating-btn--tracking .oat-floating-btn__icon {
    fill: var(--oat-gray-900);
}

/* Floating label */
.oat-floating-btn__label {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--oat-white);
    color: var(--oat-red-primary);
    font-size: var(--oat-font-size-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: var(--oat-shadow-sm);
    border: 1px solid var(--oat-gold-primary);
}

.oat-floating-btn--tracking .oat-floating-btn__label {
    color: var(--oat-gold-dark);
}

/* Pulse animation for CTA */
.oat-floating-btn--pulse {
    animation: oat-btn-pulse 2s ease-in-out infinite;
}

@keyframes oat-btn-pulse {
    0% { box-shadow: var(--oat-shadow-lg), 0 0 0 0 rgba(196, 30, 58, 0.5); }
    50% { box-shadow: var(--oat-shadow-lg), 0 0 0 12px rgba(196, 30, 58, 0); }
    100% { box-shadow: var(--oat-shadow-lg), 0 0 0 0 rgba(196, 30, 58, 0); }
}

/* ============================================================
   4. POPUP CONTAINER & OVERLAY
   ============================================================ */
/* Note: .order-popup and .tracking-popup use jQuery fadeIn/fadeOut for display toggle
   so we don't override display property here. Style only when visible. */
.oat-popup {
    /* display controlled by JS via fadeIn/fadeOut */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--oat-z-overlay);
}

/* Compatibility with existing JS that uses fadeIn/fadeOut */
.order-popup.oat-app,
.tracking-popup.oat-app {
    /* Display controlled by jQuery fadeIn/fadeOut */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

/* Overlay styling - works with existing HTML class */
.oat-overlay,
.order-popup-overlay,
.tracking-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.7) 0%, 
        rgba(139, 30, 58, 0.3) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.oat-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.7) 0%, 
        rgba(139, 30, 58, 0.3) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: oat-fade-in var(--oat-transition-base);
}

@keyframes oat-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Popup content container - existing HTML classes */
.order-popup-content.oat-popup,
.tracking-popup-content.oat-popup,
.oat-popup__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 94%;
    max-width: 520px;
    /* Viewport-safe max-height: vh → svh → dvh */
    max-height: 98vh;
    max-height: 98svh;
    max-height: 98dvh;
    background: var(--oat-white);
    border-radius: var(--oat-radius-xl);
    box-shadow: var(--oat-shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: oat-popup-slide-up var(--oat-transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Tết border decoration for popup */
.order-popup-content.oat-popup::before,
.tracking-popup-content.oat-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--oat-red-primary) 0%, 
        var(--oat-gold-primary) 50%, 
        var(--oat-red-primary) 100%);
    z-index: 10;
}

@keyframes oat-popup-slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Bottom-sheet slide-up animation (mobile) — NO transform */
@keyframes oat-bottomsheet-slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tết border decoration */
.oat-popup__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--oat-red-primary) 0%, 
        var(--oat-gold-primary) 50%, 
        var(--oat-red-primary) 100%);
    z-index: 10;
}

/* ============================================================
   5. POPUP HEADER WITH TẾT DECORATION
   ============================================================ */
/* Support existing HTML class names */
.oat-popup-header,
.order-popup-header-fixed.oat-popup-header,
.tracking-popup-header.oat-popup-header,
.oat-popup__header {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, var(--oat-cream) 0%, var(--oat-white) 100%);
    padding: var(--oat-space-lg) var(--oat-space-lg) var(--oat-space-md);
    border-bottom: 1px solid var(--oat-gray-200);
    flex-shrink: 0;
}

/* Tết pattern background */
.oat-popup-header::before,
.oat-popup__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C41E3A' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
    pointer-events: none;
}

/* Title styling */
.oat-popup-header h2,
.oat-popup-title {
    font-size: var(--oat-font-size-xl);
    font-weight: 700;
    color: var(--oat-red-primary);
    margin: 0;
    position: relative;
}

.oat-popup-header h2 svg,
.oat-popup-title svg {
    fill: var(--oat-red-primary);
}

/* Close button */
.oat-popup-close,
.order-popup-close.oat-popup-close,
.tracking-popup-close.oat-popup-close {
    position: absolute;
    top: var(--oat-space-sm);
    right: var(--oat-space-sm);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--oat-gray-100);
    border-radius: var(--oat-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--oat-gray-600);
    transition: all var(--oat-transition-fast);
    z-index: 11;
}

.oat-popup-close:hover {
    background: var(--oat-red-light);
    color: var(--oat-red-primary);
    transform: rotate(90deg);
}

.oat-popup__header-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--oat-space-md);
}

.oat-popup__title-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--oat-red-primary) 0%, var(--oat-red-dark) 100%);
    border-radius: var(--oat-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--oat-shadow-sm);
}

.oat-popup__title-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--oat-white);
}

.oat-popup__title {
    flex: 1;
    font-size: var(--oat-font-size-xl);
    font-weight: 700;
    color: var(--oat-red-primary);
    margin: 0;
}

/* Close button */
.oat-popup__close {
    position: absolute;
    top: var(--oat-space-md);
    right: var(--oat-space-md);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--oat-gray-100);
    border-radius: var(--oat-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--oat-transition-fast);
    color: var(--oat-gray-600);
    font-size: 20px;
    line-height: 1;
}

.oat-popup__close:hover {
    background: var(--oat-error-light);
    color: var(--oat-error);
    transform: rotate(90deg);
}

/* Voucher countdown banner */
.oat-popup__voucher-banner {
    display: none;
    margin-top: var(--oat-space-sm);
    padding: var(--oat-space-sm) var(--oat-space-md);
    background: linear-gradient(90deg, var(--oat-warning-light) 0%, #FFE4B5 100%);
    border: 1px solid var(--oat-gold-primary);
    border-radius: var(--oat-radius-md);
    text-align: center;
    font-size: var(--oat-font-size-sm);
    color: var(--oat-gold-dark);
    font-weight: 500;
}

.oat-popup__voucher-banner.is-active {
    display: block;
    animation: oat-shake 0.5s ease-in-out;
}

@keyframes oat-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================================
   6. FORM ELEMENTS & INPUTS
   ============================================================ */
/* Popup body - support existing HTML class */
.oat-popup-body,
.order-popup-stages-container.oat-popup-body,
.tracking-popup-content-body.oat-popup-body,
.oat-popup__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--oat-space-lg);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Custom scrollbar */
.oat-popup-body::-webkit-scrollbar,
.oat-popup__body::-webkit-scrollbar {
    width: 6px;
}

.oat-popup-body::-webkit-scrollbar-track,
.oat-popup__body::-webkit-scrollbar-track {
    background: var(--oat-gray-100);
    border-radius: 3px;
}

.oat-popup-body::-webkit-scrollbar-thumb,
.oat-popup__body::-webkit-scrollbar-thumb {
    background: var(--oat-gray-300);
    border-radius: 3px;
}

.oat-popup-body::-webkit-scrollbar-thumb:hover,
.oat-popup__body::-webkit-scrollbar-thumb:hover {
    background: var(--oat-gray-400);
}

/* Form groups */
.oat-form-group {
    margin-bottom: var(--oat-space-lg);
}

.oat-form-group:last-child {
    margin-bottom: 0;
}

.oat-form-label {
    display: flex;
    align-items: center;
    gap: var(--oat-space-sm);
    margin-bottom: var(--oat-space-sm);
    font-weight: 600;
    font-size: var(--oat-font-size-sm);
    color: var(--oat-gray-700);
}

.oat-form-label__icon {
    width: 18px;
    height: 18px;
    fill: var(--oat-red-primary);
}

.oat-form-label__required {
    color: var(--oat-error);
    margin-left: 2px;
}

/* Input fields - support both new and existing classes */
.oat-form-input,
.oat-form-textarea,
.oat-form-select,
.oat-app input[type="text"],
.oat-app input[type="email"],
.oat-app input[type="tel"],
.oat-app input[type="number"],
.oat-app textarea,
.oat-app select {
    width: 100%;
    padding: var(--oat-space-md);
    font-size: var(--oat-font-size-base);
    font-family: inherit;
    color: var(--oat-gray-800);
    background: var(--oat-white);
    border: 2px solid var(--oat-gray-300);
    border-radius: var(--oat-radius-md);
    transition: all var(--oat-transition-fast);
    outline: none;
}

.oat-form-input:hover,
.oat-form-textarea:hover,
.oat-form-select:hover,
.oat-app input[type="text"]:hover,
.oat-app input[type="email"]:hover,
.oat-app input[type="tel"]:hover,
.oat-app input[type="number"]:hover,
.oat-app textarea:hover,
.oat-app select:hover {
    border-color: var(--oat-gray-400);
}

.oat-form-input:focus,
.oat-form-textarea:focus,
.oat-form-select:focus,
.oat-app input[type="text"]:focus,
.oat-app input[type="email"]:focus,
.oat-app input[type="tel"]:focus,
.oat-app input[type="number"]:focus,
.oat-app textarea:focus,
.oat-app select:focus {
    border-color: var(--oat-red-primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.oat-form-input::placeholder,
.oat-form-textarea::placeholder {
    color: var(--oat-gray-500);
}

.oat-form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Inline field errors (shipping info) */
.oat-field-error {
    margin-top: 6px;
    font-size: var(--oat-font-size-xs);
    color: var(--oat-error);
}

.oat-input--error,
.oat-app input.oat-input--error,
.oat-app textarea.oat-input--error,
.oat-app select.oat-input--error {
    border-color: var(--oat-error);
    background: var(--oat-error-light);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.oat-input--error:focus,
.oat-app input.oat-input--error:focus,
.oat-app textarea.oat-input--error:focus,
.oat-app select.oat-input--error:focus {
    border-color: var(--oat-error);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.oat-shipping-error-notice {
    margin-bottom: var(--oat-space-md);
    padding: var(--oat-space-sm) var(--oat-space-md);
    border: 1px solid var(--oat-error);
    background: var(--oat-error-light);
    color: var(--oat-error);
    border-radius: var(--oat-radius-md);
    font-size: var(--oat-font-size-sm);
}

/* Collapsible sections */
.oat-collapsible {
    border: 2px dashed var(--oat-gold-primary);
    border-radius: var(--oat-radius-md);
    background: linear-gradient(180deg, var(--oat-cream) 0%, var(--oat-white) 100%);
    overflow: hidden;
    transition: all var(--oat-transition-base);
}

.oat-collapsible:hover {
    border-color: var(--oat-red-primary);
    background: var(--oat-cream);
}

.oat-collapsible__toggle {
    display: flex;
    align-items: center;
    gap: var(--oat-space-sm);
    width: 100%;
    padding: var(--oat-space-md);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--oat-font-size-base);
    color: var(--oat-red-primary);
    text-align: left;
}

.oat-collapsible__icon {
    width: 20px;
    height: 20px;
    background: var(--oat-red-primary);
    color: var(--oat-white);
    border-radius: var(--oat-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: transform var(--oat-transition-fast);
}

.oat-collapsible.is-open .oat-collapsible__icon {
    transform: rotate(45deg);
}

.oat-collapsible__content {
    display: none;
    padding: 0 var(--oat-space-md) var(--oat-space-md);
}

.oat-collapsible.is-open .oat-collapsible__content {
    display: block;
    animation: oat-slide-down var(--oat-transition-base);
}

@keyframes oat-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Address summary card */
.oat-address-summary {
    margin-top: var(--oat-space-md);
    padding: var(--oat-space-md);
    background: var(--oat-success-light);
    border: 1px solid var(--oat-success);
    border-radius: var(--oat-radius-md);
}

.oat-address-summary p {
    margin: var(--oat-space-xs) 0;
    font-size: var(--oat-font-size-sm);
}

.oat-address-summary strong {
    color: var(--oat-gray-800);
}

/* ============================================================
   7. PRODUCT SECTION
   ============================================================ */
.oat-product-section {
    background: var(--oat-cream);
    border: 1px solid var(--oat-gold-primary);
    border-radius: var(--oat-radius-lg);
    padding: var(--oat-space-lg);
    margin-bottom: var(--oat-space-lg);
}

.oat-product-section__legend {
    font-size: var(--oat-font-size-lg);
    font-weight: 700;
    color: var(--oat-red-primary);
    margin-bottom: var(--oat-space-md);
    padding-bottom: var(--oat-space-sm);
    border-bottom: 2px solid var(--oat-gold-primary);
    display: flex;
    align-items: center;
    gap: var(--oat-space-sm);
}

.oat-product-section__legend::before {
    content: '🎁';
    font-size: 1.2em;
}

.oat-product-card {
    display: flex;
    gap: var(--oat-space-md);
    align-items: flex-start;
}

.oat-product-card__image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--oat-radius-md);
    overflow: hidden;
    border: 2px solid var(--oat-gold-primary);
    box-shadow: var(--oat-shadow-sm);
}

.oat-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oat-product-card__details {
    flex: 1;
    min-width: 0;
}

.oat-product-card__name {
    font-size: var(--oat-font-size-lg);
    font-weight: 600;
    color: var(--oat-gray-900);
    margin-bottom: var(--oat-space-sm);
}

/* Policy badges */
.oat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oat-space-xs);
    margin-bottom: var(--oat-space-sm);
}

.oat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: var(--oat-font-size-xs);
    font-weight: 600;
    border-radius: var(--oat-radius-sm);
    border: 1px solid;
}

.oat-badge--warranty {
    background: #FFF3E0;
    border-color: #FFB74D;
    color: #F57C00;
}

.oat-badge--authentic {
    background: var(--oat-success-light);
    border-color: #81C784;
    color: #388E3C;
}

/* Price display */
.oat-price-display {
    margin-bottom: var(--oat-space-sm);
}

.oat-price-display__original {
    font-size: var(--oat-font-size-sm);
    color: var(--oat-gray-500);
    text-decoration: line-through;
    margin-right: var(--oat-space-sm);
}

.oat-price-display__final {
    font-size: var(--oat-font-size-xl);
    font-weight: 700;
    color: var(--oat-red-primary);
}

.oat-price-display__discount {
    display: inline-block;
    margin-left: var(--oat-space-sm);
    padding: 2px 8px;
    font-size: var(--oat-font-size-xs);
    font-weight: 600;
    background: var(--oat-error);
    color: var(--oat-white);
    border-radius: var(--oat-radius-sm);
}

/* Quantity selector */
.oat-quantity {
    display: flex;
    align-items: center;
    gap: var(--oat-space-sm);
}

.oat-quantity__label {
    font-size: var(--oat-font-size-sm);
    font-weight: 500;
    color: var(--oat-gray-700);
}

.oat-quantity__input {
    width: 70px;
    padding: var(--oat-space-sm);
    text-align: center;
    font-size: var(--oat-font-size-base);
    font-weight: 600;
    border: 2px solid var(--oat-gray-300);
    border-radius: var(--oat-radius-md);
}

.oat-quantity__input:focus {
    border-color: var(--oat-red-primary);
    outline: none;
}

.oat-quantity__notice {
    display: none;
    margin-top: var(--oat-space-sm);
    padding: var(--oat-space-sm);
    font-size: var(--oat-font-size-sm);
    color: var(--oat-error);
    background: var(--oat-error-light);
    border-radius: var(--oat-radius-sm);
}

/* Voucher section */
.oat-voucher-section {
    margin-top: var(--oat-space-lg);
    padding-top: var(--oat-space-lg);
    border-top: 1px dashed var(--oat-gray-300);
}

.oat-voucher-input-group {
    display: flex;
    gap: var(--oat-space-sm);
}

.oat-voucher-input-group .oat-form-input {
    flex: 1;
}

/* ============================================================
   8. VOUCHER CARDS
   ============================================================ */
.oat-voucher-lookup {
    display: none;
    margin-top: var(--oat-space-md);
    padding: var(--oat-space-lg);
    background: var(--oat-white);
    border: 1px solid var(--oat-gray-200);
    border-radius: var(--oat-radius-lg);
    box-shadow: var(--oat-shadow-sm);
}

.oat-voucher-lookup.is-active {
    display: block;
    animation: oat-slide-down var(--oat-transition-base);
}

.oat-voucher-list {
    max-height: 280px;
    overflow-y: auto;
    margin-top: var(--oat-space-md);
    padding-right: var(--oat-space-xs);
}

/* Voucher card với Tết style */
.oat-voucher-card {
    position: relative;
    display: flex;
    background: linear-gradient(135deg, var(--oat-red-primary) 0%, var(--oat-red-dark) 100%);
    border-radius: var(--oat-radius-lg);
    margin-bottom: var(--oat-space-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--oat-transition-base);
    box-shadow: var(--oat-shadow-md);
}

.oat-voucher-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--oat-shadow-lg);
}

.oat-voucher-card:last-child {
    margin-bottom: 0;
}

/* Zigzag edge */
.oat-voucher-card::before {
    content: '';
    position: absolute;
    left: 75px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: linear-gradient(135deg, var(--oat-white) 25%, transparent 25%) -5px 0,
                linear-gradient(225deg, var(--oat-white) 25%, transparent 25%) -5px 0,
                linear-gradient(315deg, var(--oat-white) 25%, transparent 25%),
                linear-gradient(45deg, var(--oat-white) 25%, transparent 25%);
    background-size: 10px 10px;
}

.oat-voucher-card__icon {
    flex-shrink: 0;
    width: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--oat-space-md);
    color: var(--oat-gold-light);
}

.oat-voucher-card__icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    margin-bottom: var(--oat-space-xs);
}

.oat-voucher-card__icon span {
    font-size: var(--oat-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.oat-voucher-card__content {
    flex: 1;
    padding: var(--oat-space-md) var(--oat-space-md) var(--oat-space-md) var(--oat-space-lg);
    background: var(--oat-white);
}

.oat-voucher-card__code {
    display: inline-block;
    padding: 4px 10px;
    background: var(--oat-cream);
    border: 1px solid var(--oat-gold-primary);
    border-radius: var(--oat-radius-sm);
    font-size: var(--oat-font-size-sm);
    font-weight: 700;
    color: var(--oat-red-primary);
    margin-bottom: var(--oat-space-sm);
}

.oat-voucher-card__discount {
    font-size: var(--oat-font-size-base);
    font-weight: 600;
    color: var(--oat-success);
    margin-bottom: var(--oat-space-xs);
}

.oat-voucher-card__expiry {
    font-size: var(--oat-font-size-xs);
    color: var(--oat-error);
    font-weight: 500;
}

.oat-voucher-card__action {
    margin-top: var(--oat-space-sm);
}

/* ============================================================
   9. PAYMENT METHODS & DEPOSIT
   ============================================================ */
.oat-payment-section {
    margin-bottom: var(--oat-space-lg);
}

.oat-payment-options {
    display: flex;
    flex-direction: column;
    gap: var(--oat-space-sm);
}

.oat-payment-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: var(--oat-space-md);
    background: var(--oat-white);
    border: 2px solid var(--oat-gray-300);
    border-radius: var(--oat-radius-md);
    cursor: pointer;
    transition: all var(--oat-transition-fast);
}

.oat-payment-option:hover {
    border-color: var(--oat-gold-primary);
    background: var(--oat-cream);
}

.oat-payment-option.is-selected {
    border-color: var(--oat-red-primary);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.oat-payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.oat-payment-option__radio {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--oat-gray-400);
    border-radius: var(--oat-radius-full);
    margin-right: var(--oat-space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--oat-transition-fast);
}

.oat-payment-option.is-selected .oat-payment-option__radio {
    border-color: var(--oat-red-primary);
    background: var(--oat-red-primary);
}

.oat-payment-option__radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--oat-white);
    border-radius: var(--oat-radius-full);
    opacity: 0;
    transform: scale(0);
    transition: all var(--oat-transition-fast);
}

.oat-payment-option.is-selected .oat-payment-option__radio::after {
    opacity: 1;
    transform: scale(1);
}

.oat-payment-option__icon {
    width: 24px;
    height: 24px;
    margin-right: var(--oat-space-sm);
    fill: var(--oat-gray-600);
}

.oat-payment-option.is-selected .oat-payment-option__icon {
    fill: var(--oat-red-primary);
}

.oat-payment-option__text {
    font-weight: 500;
    color: var(--oat-gray-700);
}

.oat-payment-option.is-selected .oat-payment-option__text {
    color: var(--oat-red-primary);
}

/* Deposit options */
.oat-deposit-section {
    display: none;
    margin-top: var(--oat-space-md);
    padding: var(--oat-space-lg);
    background: var(--oat-cream);
    border: 1px solid var(--oat-gold-primary);
    border-radius: var(--oat-radius-md);
    animation: oat-slide-down var(--oat-transition-base);
}

.oat-deposit-section.is-active {
    display: block;
}

.oat-deposit-notice {
    font-size: var(--oat-font-size-sm);
    font-style: italic;
    color: var(--oat-gray-600);
    margin-bottom: var(--oat-space-md);
    padding: var(--oat-space-sm);
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--oat-radius-sm);
}

.oat-deposit-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--oat-space-sm);
}

.oat-deposit-option {
    position: relative;
    flex: 1;
    min-width: 100px;
    padding: var(--oat-space-md);
    background: var(--oat-white);
    border: 2px solid var(--oat-gray-300);
    border-radius: var(--oat-radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--oat-transition-fast);
}

.oat-deposit-option:hover {
    border-color: var(--oat-gold-primary);
}

.oat-deposit-option.is-selected {
    border-color: var(--oat-red-primary);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
}

.oat-deposit-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.oat-deposit-option__amount {
    font-size: var(--oat-font-size-lg);
    font-weight: 700;
    color: var(--oat-gray-800);
}

.oat-deposit-option.is-selected .oat-deposit-option__amount {
    color: var(--oat-red-primary);
}

/* ============================================================
   10. ORDER SUMMARY
   ============================================================ */
.oat-order-summary {
    background: linear-gradient(180deg, var(--oat-cream) 0%, var(--oat-white) 100%);
    border: 2px solid var(--oat-gold-primary);
    border-radius: var(--oat-radius-lg);
    padding: var(--oat-space-lg);
    margin-top: var(--oat-space-lg);
}

.oat-order-summary__title {
    font-size: var(--oat-font-size-lg);
    font-weight: 700;
    color: var(--oat-red-primary);
    margin-bottom: var(--oat-space-md);
    padding-bottom: var(--oat-space-sm);
    border-bottom: 2px dashed var(--oat-gold-primary);
    display: flex;
    align-items: center;
    gap: var(--oat-space-sm);
}

.oat-order-summary__title::before {
    content: '📋';
}

.oat-order-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--oat-space-sm) 0;
    font-size: var(--oat-font-size-sm);
}

.oat-order-summary__row--discount {
    color: var(--oat-error);
}

.oat-order-summary__row--shipping {
    color: var(--oat-success);
}

.oat-order-summary__row--subtotal {
    border-top: 1px dotted var(--oat-gray-300);
    margin-top: var(--oat-space-sm);
    padding-top: var(--oat-space-md);
}

.oat-order-summary__row--total {
    border-top: 2px solid var(--oat-gold-primary);
    margin-top: var(--oat-space-sm);
    padding-top: var(--oat-space-md);
    font-size: var(--oat-font-size-xl);
    font-weight: 700;
}

.oat-order-summary__row--total .oat-order-summary__value {
    color: var(--oat-red-primary);
}

.oat-order-summary__label {
    font-weight: 500;
    color: var(--oat-gray-700);
}

.oat-order-summary__value {
    font-weight: 600;
    color: var(--oat-gray-900);
}

/* Savings highlight */
.oat-savings-banner {
    display: none;
    margin-top: var(--oat-space-md);
    padding: var(--oat-space-md);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px dashed var(--oat-red-primary);
    border-radius: var(--oat-radius-md);
    text-align: center;
}

.oat-savings-banner.is-active {
    display: block;
    animation: oat-pulse-glow 2s ease-in-out infinite;
}

@keyframes oat-pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.3); }
    50% { box-shadow: 0 0 15px 5px rgba(196, 30, 58, 0.1); }
}

.oat-savings-banner__text {
    font-weight: 600;
    color: var(--oat-red-primary);
}

/* Delivery estimate */
.oat-delivery-estimate {
    display: none;
    margin-top: var(--oat-space-md);
    padding: var(--oat-space-md);
    background: var(--oat-success-light);
    border: 1px dashed var(--oat-success);
    border-radius: var(--oat-radius-md);
    text-align: center;
    color: #1B5E20;
    font-weight: 500;
}

.oat-delivery-estimate.is-active {
    display: block;
}

.oat-delivery-estimate::before {
    content: '🚚';
    margin-right: var(--oat-space-sm);
}

/* ============================================================
   11. PRIMARY BUTTON / CTA
   ============================================================ */
.oat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--oat-space-sm);
    padding: var(--oat-space-md) var(--oat-space-lg);
    font-family: inherit;
    font-size: var(--oat-font-size-base);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--oat-radius-md);
    cursor: pointer;
    transition: all var(--oat-transition-base);
    outline: none;
}

.oat-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary button - Tết style (support both naming conventions) */
.oat-btn--primary,
.oat-btn-primary,
.oat-btn.oat-btn-primary,
#submit-order.oat-btn-primary,
#submit-tracking.oat-btn-primary {
    width: 100%;
    padding: var(--oat-space-lg);
    font-size: var(--oat-font-size-lg);
    color: var(--oat-white);
    background: linear-gradient(135deg, var(--oat-red-light) 0%, var(--oat-red-primary) 50%, var(--oat-red-dark) 100%);
    box-shadow: var(--oat-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.oat-btn--primary::before,
.oat-btn-primary::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 ease;
}

.oat-btn--primary:hover:not(:disabled),
.oat-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--oat-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.oat-btn--primary:hover:not(:disabled)::before,
.oat-btn-primary:hover:not(:disabled)::before {
    left: 100%;
}

.oat-btn--primary:active:not(:disabled),
.oat-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary button */
.oat-btn--secondary {
    color: var(--oat-red-primary);
    background: var(--oat-white);
    border: 2px solid var(--oat-red-primary);
}

.oat-btn--secondary:hover:not(:disabled) {
    background: rgba(196, 30, 58, 0.05);
}

/* Gold button */
.oat-btn--gold {
    color: var(--oat-gray-900);
    background: linear-gradient(135deg, var(--oat-gold-light) 0%, var(--oat-gold-primary) 50%, var(--oat-gold-dark) 100%);
    box-shadow: var(--oat-shadow-sm);
}

.oat-btn--gold:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--oat-shadow-md);
}

/* Small button */
.oat-btn--sm {
    padding: var(--oat-space-sm) var(--oat-space-md);
    font-size: var(--oat-font-size-sm);
}

/* ============================================================
   12. RECEIPT / SUCCESS STATE
   ============================================================ */
.oat-receipt {
    text-align: left;
}

.oat-receipt__header {
    text-align: center;
    padding: var(--oat-space-lg);
    background: linear-gradient(180deg, var(--oat-success-light) 0%, var(--oat-white) 100%);
    border-radius: var(--oat-radius-lg);
    margin-bottom: var(--oat-space-lg);
}

/* Success animation */
.oat-receipt__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--oat-space-md);
}

.oat-receipt__icon-svg {
    width: 100%;
    height: 100%;
    border-radius: var(--oat-radius-full);
    stroke-width: 3;
    stroke: var(--oat-white);
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 var(--oat-success);
    animation: oat-success-fill 0.4s ease-in-out 0.4s forwards, oat-success-scale 0.3s ease-in-out 0.9s both;
}

.oat-receipt__icon-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--oat-success);
    fill: none;
    animation: oat-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.oat-receipt__icon-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 4;
    stroke: var(--oat-success);
    fill: none;
    animation: oat-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes oat-stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes oat-success-scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes oat-success-fill {
    100% { box-shadow: inset 0 0 0 40px var(--oat-success); }
}

.oat-receipt__title {
    font-size: var(--oat-font-size-2xl);
    font-weight: 700;
    color: var(--oat-success);
    margin-bottom: var(--oat-space-sm);
}

.oat-receipt__subtitle {
    font-size: var(--oat-font-size-base);
    color: var(--oat-gray-600);
}

/* Receipt sections */
.oat-receipt__section {
    background: var(--oat-gray-100);
    border: 1px solid var(--oat-gray-200);
    border-radius: var(--oat-radius-md);
    padding: var(--oat-space-lg);
    margin-bottom: var(--oat-space-md);
}

.oat-receipt__section-title {
    font-size: var(--oat-font-size-base);
    font-weight: 600;
    color: var(--oat-gray-800);
    margin-bottom: var(--oat-space-md);
    padding-bottom: var(--oat-space-sm);
    border-bottom: 1px dotted var(--oat-gray-300);
}

.oat-receipt__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--oat-space-sm);
    font-size: var(--oat-font-size-sm);
}

.oat-receipt__label {
    color: var(--oat-gray-600);
}

.oat-receipt__value {
    font-weight: 500;
    color: var(--oat-gray-800);
    text-align: right;
}

/* Bank transfer info */
.oat-bank-info {
    margin-top: var(--oat-space-md);
    padding: var(--oat-space-lg);
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border: 1px dashed #2196F3;
    border-radius: var(--oat-radius-md);
}

.oat-bank-info__title {
    font-weight: 600;
    color: #1565C0;
    margin-bottom: var(--oat-space-md);
}

.oat-bank-info p {
    margin: var(--oat-space-sm) 0;
    font-size: var(--oat-font-size-sm);
}

.oat-bank-info code {
    display: inline-block;
    padding: 3px 8px;
    background: var(--oat-white);
    border-radius: var(--oat-radius-sm);
    font-weight: 600;
    color: #0D47A1;
}

/* Payment confirmation */
.oat-payment-confirm {
    display: none;
    margin-top: var(--oat-space-lg);
    padding-top: var(--oat-space-lg);
    border-top: 1px dashed var(--oat-gray-300);
}

.oat-payment-confirm.is-active {
    display: block;
}

.oat-payment-confirm__checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--oat-space-md);
    padding: var(--oat-space-md);
    background: var(--oat-warning-light);
    border: 1px solid var(--oat-warning);
    border-radius: var(--oat-radius-md);
    margin-bottom: var(--oat-space-md);
    cursor: pointer;
}

.oat-payment-confirm__checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--oat-red-primary);
}

.oat-payment-confirm__text {
    font-size: var(--oat-font-size-sm);
    color: var(--oat-gray-700);
}

/* Receipt actions */
.oat-receipt__actions {
    display: flex;
    gap: var(--oat-space-md);
    margin-top: var(--oat-space-lg);
    padding-top: var(--oat-space-lg);
    border-top: 1px solid var(--oat-gray-200);
}

.oat-receipt__actions .oat-btn {
    flex: 1;
}

/* ============================================================
   13. PHASE 3 - WAITING CONFIRMATION
   ============================================================ */
.oat-waiting {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--oat-space-2xl) var(--oat-space-lg);
    text-align: center;
    background: linear-gradient(180deg, var(--oat-cream) 0%, var(--oat-white) 100%);
    border-radius: var(--oat-radius-lg);
}

.oat-waiting.is-active {
    display: flex;
    animation: oat-fade-in var(--oat-transition-base);
}

.oat-waiting__title {
    font-size: var(--oat-font-size-xl);
    font-weight: 700;
    color: var(--oat-gray-800);
    margin-bottom: var(--oat-space-md);
}

/* Spinner */
.oat-waiting__spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--oat-gray-200);
    border-top-color: var(--oat-success);
    border-radius: var(--oat-radius-full);
    margin: var(--oat-space-lg) 0;
    animation: oat-spin 1s linear infinite;
}

@keyframes oat-spin {
    to { transform: rotate(360deg); }
}

/* Countdown timer */
.oat-waiting__timer {
    font-size: var(--oat-font-size-2xl);
    font-weight: 700;
    color: var(--oat-success);
    margin-bottom: var(--oat-space-md);
    font-variant-numeric: tabular-nums;
}

.oat-waiting__status {
    font-size: var(--oat-font-size-base);
    color: var(--oat-gray-600);
    line-height: 1.6;
    margin-bottom: var(--oat-space-lg);
}

/* Status messages */
.oat-status-message {
    padding: var(--oat-space-lg);
    border-radius: var(--oat-radius-md);
    margin-bottom: var(--oat-space-md);
}

.oat-status-message--success {
    background: var(--oat-success-light);
    border: 1px solid var(--oat-success);
    color: #1B5E20;
}

.oat-status-message--warning {
    background: var(--oat-warning-light);
    border: 1px solid var(--oat-warning);
    border-left: 4px solid var(--oat-warning);
    color: #856404;
}

.oat-status-message__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--oat-space-md);
}

.oat-status-message__title {
    font-size: var(--oat-font-size-lg);
    font-weight: 600;
    margin-bottom: var(--oat-space-sm);
}

.oat-status-message ul {
    list-style: none;
    padding: 0;
    margin: var(--oat-space-md) 0 0;
    text-align: left;
}

.oat-status-message li {
    position: relative;
    padding-left: var(--oat-space-lg);
    margin-bottom: var(--oat-space-sm);
    font-size: var(--oat-font-size-sm);
}

.oat-status-message li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: var(--oat-radius-full);
    opacity: 0.6;
}

/* ============================================================
   14. TRACKING POPUP SPECIFIC
   ============================================================ */
.oat-tracking-form {
    position: sticky;
    top: 0;
    background: var(--oat-white);
    z-index: 5;
    padding: var(--oat-space-lg);
    border-bottom: 1px solid var(--oat-gray-200);
}

.oat-tracking-input-group {
    display: flex;
    gap: var(--oat-space-sm);
}

.oat-tracking-input-group .oat-form-input {
    flex: 1;
}

.oat-tracking-result {
    padding: var(--oat-space-lg);
}

/* Order card in tracking */
.oat-order-card {
    background: var(--oat-white);
    border: 1px solid var(--oat-gray-200);
    border-radius: var(--oat-radius-lg);
    padding: var(--oat-space-lg);
    margin-bottom: var(--oat-space-md);
    box-shadow: var(--oat-shadow-sm);
    transition: all var(--oat-transition-fast);
}

.oat-order-card:hover {
    box-shadow: var(--oat-shadow-md);
    border-color: var(--oat-gold-primary);
}

.oat-order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--oat-space-md);
    padding-bottom: var(--oat-space-md);
    border-bottom: 1px solid var(--oat-gray-200);
}

.oat-order-card__code {
    font-size: var(--oat-font-size-lg);
    font-weight: 700;
    color: var(--oat-red-primary);
}

.oat-order-card__date {
    font-size: var(--oat-font-size-sm);
    color: var(--oat-gray-500);
}

/* Status badge */
.oat-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--oat-space-xs);
    padding: var(--oat-space-xs) var(--oat-space-md);
    font-size: var(--oat-font-size-sm);
    font-weight: 600;
    border-radius: 20px;
}

.oat-status-badge--pending {
    background: var(--oat-warning-light);
    color: #856404;
}

.oat-status-badge--processing {
    background: var(--oat-info-light);
    color: #0C5460;
}

.oat-status-badge--shipping {
    background: #E3F2FD;
    color: #1565C0;
}

.oat-status-badge--completed {
    background: var(--oat-success-light);
    color: #155724;
}

.oat-status-badge--cancelled {
    background: var(--oat-error-light);
    color: #721C24;
}

/* Timeline */
.oat-timeline {
    position: relative;
    padding-left: var(--oat-space-xl);
    margin-top: var(--oat-space-lg);
}

.oat-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--oat-gray-200);
}

.oat-timeline__item {
    position: relative;
    padding-bottom: var(--oat-space-lg);
}

.oat-timeline__item:last-child {
    padding-bottom: 0;
}

.oat-timeline__dot {
    position: absolute;
    left: calc(-1 * var(--oat-space-xl) + 3px);
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--oat-gray-300);
    border: 2px solid var(--oat-white);
    border-radius: var(--oat-radius-full);
    box-shadow: 0 0 0 2px var(--oat-gray-200);
}

.oat-timeline__item--active .oat-timeline__dot {
    background: var(--oat-success);
    box-shadow: 0 0 0 2px var(--oat-success-light);
}

.oat-timeline__time {
    font-size: var(--oat-font-size-xs);
    color: var(--oat-gray-500);
    margin-bottom: var(--oat-space-xs);
}

.oat-timeline__status {
    font-weight: 600;
    color: var(--oat-gray-800);
    margin-bottom: var(--oat-space-xs);
}

.oat-timeline__note {
    font-size: var(--oat-font-size-sm);
    color: var(--oat-gray-600);
}

/* Error/Not found states */
.oat-result-message {
    text-align: center;
    padding: var(--oat-space-xl);
}

.oat-result-message__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--oat-space-md);
    opacity: 0.5;
}

.oat-result-message__text {
    font-size: var(--oat-font-size-base);
    color: var(--oat-gray-600);
}

.oat-result-message--error {
    background: var(--oat-error-light);
    border-radius: var(--oat-radius-md);
}

.oat-result-message--error .oat-result-message__text {
    color: #721C24;
}

/* ============================================================
   15. ANIMATIONS & EFFECTS
   ============================================================ */
/* Confetti effect for success */
.oat-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100002;
    overflow: hidden;
}

.oat-confetti__piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--oat-red-primary);
    animation: oat-confetti-fall 3s ease-out forwards;
}

.oat-confetti__piece:nth-child(2n) {
    background: var(--oat-gold-primary);
}

.oat-confetti__piece:nth-child(3n) {
    background: var(--oat-red-light);
}

@keyframes oat-confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Loading states */
.oat-loading {
    position: relative;
    pointer-events: none;
}

.oat-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast notifications */
.oat-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100010;
    padding: var(--oat-space-md) var(--oat-space-lg);
    background: var(--oat-white);
    border-radius: var(--oat-radius-md);
    box-shadow: var(--oat-shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--oat-space-md);
    animation: oat-toast-in 0.3s ease-out;
}

.oat-toast--success {
    border-left: 4px solid var(--oat-success);
}

.oat-toast--error {
    border-left: 4px solid var(--oat-error);
}

.oat-toast--warning {
    border-left: 4px solid var(--oat-warning);
}

@keyframes oat-toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================
   16. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet & larger mobile (max 768px) */
@media (max-width: 768px) {
    .oat-floating-wrapper--order {
        right: 15px;
        bottom: 90px;
    }
    
    .oat-floating-wrapper--tracking {
        right: 15px;
        bottom: 160px;
    }
    
    .oat-floating-btn {
        width: 52px;
        height: 52px;
    }
    
    .oat-popup__container {
        width: 96%;
        max-height: 94vh;
        max-height: 94svh;
        max-height: 94dvh;
        border-radius: var(--oat-radius-lg);
        min-height: auto !important;
    }
    
    /* ============================================================
       BOTTOM-SHEET MOBILE: Override high-specificity base selectors
       (.order-popup-content.oat-popup / .tracking-popup-content.oat-popup)
       ============================================================ */
    .order-popup-content.oat-popup,
    .tracking-popup-content.oat-popup {
        /* Bám đáy — bottom sheet */
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        transform: none; /* Tránh iOS zoom/layout bug */
        
        /* Full-width */
        width: 100%;
        max-width: none;
        
        /* Height auto + max-height dvh */
        height: auto;
        min-height: 200px;
        max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px));
        max-height: calc(100svh - 20px - env(safe-area-inset-top, 0px));
        max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px));
        
        /* Border-radius: Bo góc trên, flat dưới */
        border-radius: 20px 20px 0 0;
        
        /* Slide-up animation cho bottom sheet */
        animation: oat-bottomsheet-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .oat-popup__header {
        padding: var(--oat-space-md);
    }
    
    .oat-popup__body {
        padding: var(--oat-space-md);
    }
    
    .oat-product-card {
        flex-direction: column;
    }
    
    .oat-product-card__image {
        width: 100%;
        height: 150px;
    }
    
    .oat-deposit-options {
        flex-direction: column;
    }
    
    .oat-deposit-option {
        width: 100%;
    }
    
    .oat-receipt__actions {
        flex-direction: column;
    }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
    :root {
        --oat-space-lg: 1.25rem;
        --oat-space-xl: 1.5rem;
    }
    
    .oat-floating-wrapper--order {
        right: 12px;
        bottom: 80px;
    }
    
    .oat-floating-wrapper--tracking {
        right: 12px;
        bottom: 145px;
    }
    
    .oat-floating-btn {
        width: 48px;
        height: 48px;
    }
    
    .oat-floating-btn__label {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .oat-popup__title {
        font-size: var(--oat-font-size-lg);
    }
    
    .oat-popup__title-icon {
        width: 36px;
        height: 36px;
    }
    
    .oat-popup__close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .oat-voucher-card {
        flex-direction: column;
    }
    
    .oat-voucher-card::before {
        display: none;
    }
    
    .oat-voucher-card__icon {
        width: 100%;
        flex-direction: row;
        gap: var(--oat-space-sm);
        padding: var(--oat-space-sm) var(--oat-space-md);
        border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    }
    
    .oat-voucher-card__content {
        padding: var(--oat-space-md);
    }
    
    .oat-voucher-input-group {
        flex-direction: column;
    }
    
    .oat-voucher-input-group .oat-btn {
        width: 100%;
    }
    
    .oat-tracking-input-group {
        flex-direction: column;
    }
    
    .oat-tracking-input-group .oat-btn {
        width: 100%;
    }
}

/* Extra small mobile (max 360px) */
@media (max-width: 360px) {
    .oat-popup__container {
        width: 98%;
        max-height: 96vh;
        max-height: 96dvh;
        min-height: auto !important;
    }
    
    .oat-floating-btn {
        width: 44px;
        height: 44px;
    }
    
    .oat-floating-btn__icon {
        width: 22px;
        height: 22px;
    }
    
    .oat-product-section {
        padding: var(--oat-space-md);
    }
    
    .oat-order-summary {
        padding: var(--oat-space-md);
    }
}

/* Safe area for notch devices */
@supports (padding: max(0px)) {
    .oat-floating-wrapper--order {
        bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
        right: max(20px, calc(20px + env(safe-area-inset-right)));
    }
    
    .oat-floating-wrapper--tracking {
        bottom: max(180px, calc(180px + env(safe-area-inset-bottom)));
        right: max(20px, calc(20px + env(safe-area-inset-right)));
    }
    
    .oat-popup__container {
        padding-bottom: env(safe-area-inset-bottom);
        max-height: 98dvh;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .oat-popup__container {
        max-height: 98vh;
        max-height: 98dvh;
    }
    
    .oat-popup__header {
        padding: var(--oat-space-sm) var(--oat-space-md);
    }
    
    .oat-popup__body {
        padding: var(--oat-space-sm) var(--oat-space-md);
    }
    
    .oat-floating-wrapper--order {
        bottom: 20px;
    }
    
    .oat-floating-wrapper--tracking {
        bottom: 85px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .oat-app *,
    .oat-app *::before,
    .oat-app *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --oat-red-primary: #B71C1C;
        --oat-gold-primary: #FF8F00;
    }
    
    .oat-form-input,
    .oat-form-textarea,
    .oat-form-select {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .oat-popup,
    .oat-floating-wrapper {
        display: none !important;
    }
}
