.order-success {
    padding: 7rem 0 6rem;
    background: var(--cream);
    min-height: 70vh;
}

.order-success__loading,
.orders-loading,
.order-detail-loading {
    text-align: center;
    padding: 3rem 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.order-success__content {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.order-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(45, 122, 79, 0.1);
    color: var(--success);
    margin: 0 auto 2rem;
}

.order-success__label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.order-success__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 1rem;
}

.order-success__divider {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 1rem;
}

.order-success__subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.order-success__number-card {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.order-success__number-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.order-success__number {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--burgundy);
    letter-spacing: 1px;
    margin: 0;
}

.order-success__details {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.order-success__notice {
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.25);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.order-success__notice p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.order-success__notice strong {
    color: var(--charcoal);
}

.order-success__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.order-success__error {
    text-align: center;
    padding: 4rem 0;
    max-width: 400px;
    margin: 0 auto;
}

.order-success__error-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.order-success__error-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.orders-page {
    padding: 7rem 0 6rem;
    background: var(--cream);
    min-height: 70vh;
}

.orders-header {
    text-align: center;
    margin-bottom: 3rem;
}

.orders-header__label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.orders-header__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 1rem;
}

.orders-header__divider {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.order-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--white);
    border: 1px solid var(--cream-dark);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.order-card:hover {
    border-color: var(--burgundy);
    box-shadow: 0 4px 20px rgba(74, 29, 63, 0.06);
}

.order-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.order-card__number {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: 0.5px;
}

.order-card__date {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-card__status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.order-status {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.order-status--pending {
    background: rgba(197, 160, 89, 0.15);
    color: #8B6D2F;
}

.order-status--paid {
    background: rgba(45, 122, 79, 0.12);
    color: var(--success);
}

.order-status--processing {
    background: rgba(74, 29, 63, 0.1);
    color: var(--burgundy);
}

.order-status--shipped {
    background: rgba(69, 116, 184, 0.12);
    color: #2D5FA8;
}

.order-status--delivered {
    background: rgba(45, 122, 79, 0.15);
    color: var(--success);
}

.order-status--cancelled {
    background: rgba(184, 69, 69, 0.1);
    color: var(--error);
}

.order-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.order-card__total {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--burgundy);
}

.order-card__arrow {
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.orders-empty,
.orders-auth-required {
    text-align: center;
    padding: 5rem 0;
    max-width: 400px;
    margin: 0 auto;
}

.orders-empty__title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.orders-empty__text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.order-detail-page {
    padding: 6.5rem 0 6rem;
    background: var(--cream);
    min-height: 70vh;
}

.order-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.order-detail__back:hover {
    color: var(--burgundy);
}

.order-detail-content {
    max-width: 900px;
    margin: 0 auto;
}

.order-detail__header {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    padding: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-detail__header-left h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--charcoal);
    margin: 0 0 0.35rem 0;
}

.order-detail__header-date {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.order-detail__section {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.order-detail__section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--charcoal);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cream-dark);
}

.order-detail__items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.order-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--cream-dark);
}

.order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-item__image {
    width: 80px;
    height: 96px;
    overflow: hidden;
    border: 1px solid var(--cream-dark);
    background: var(--cream);
}

.order-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.order-item__details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.order-item__name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--charcoal);
    margin: 0;
    line-height: 1.35;
}

.order-item__name a {
    color: var(--charcoal);
    text-decoration: none;
    transition: color 0.3s ease;
}

.order-item__name a:hover {
    color: var(--burgundy);
}

.order-item__meta {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-item__price {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--burgundy);
    text-align: right;
}

.order-detail__address p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0.25rem 0;
}

.order-detail__address strong {
    color: var(--charcoal);
    font-weight: 600;
}

.order-detail__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.order-detail__summary-divider {
    height: 1px;
    background: var(--cream-dark);
    margin: 0.75rem 0;
}

.order-detail__summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0 0;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--charcoal);
}

.order-detail__tracking {
    background: rgba(74, 29, 63, 0.03);
    padding: 1.25rem;
    border-left: 3px solid var(--burgundy);
    margin-top: 1rem;
}

.order-detail__tracking-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.order-detail__tracking-number {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: 0.5px;
}

.order-detail__tracking-carrier {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.order-detail-error {
    text-align: center;
    padding: 5rem 0;
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 768px) {

    .order-success,
    .orders-page,
    .order-detail-page {
        padding: 6rem 0 4rem;
    }

    .order-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem 1.5rem;
    }

    .order-card__right {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .order-detail__header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .order-detail__section {
        padding: 1.5rem;
    }

    .order-item {
        grid-template-columns: 70px 1fr;
        gap: 1rem;
    }

    .order-item__image {
        width: 70px;
        height: 85px;
    }

    .order-item__price {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 0.5rem;
    }

    .order-success__actions {
        flex-direction: column;
    }

    .order-success__actions .btn {
        width: 100%;
        text-align: center;
    }
}

.order-timeline-customer {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline-step {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 0;
    position: relative;
}

.timeline-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 30px;
    bottom: -8px;
    width: 2px;
    background: var(--cream-dark);
}

.timeline-step--completed:not(:last-child)::before {
    background: var(--gold);
}

.timeline-step__dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--cream-dark);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-step--completed .timeline-step__dot {
    background: var(--gold);
}

.timeline-step--completed .timeline-step__dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 6px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    margin-top: -1px;
}

.timeline-step--current .timeline-step__dot {
    background: var(--burgundy);
    box-shadow: 0 0 0 4px rgba(74, 29, 63, 0.15);
}

.timeline-step--rejected .timeline-step__dot {
    background: var(--error);
}

.timeline-step--rejected .timeline-step__dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 2px;
    background: var(--white);
    box-shadow: 0 0 0 0 var(--white);
}

.timeline-step--rejected .timeline-step__dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 10px;
    height: 2px;
    background: var(--white);
}

.timeline-step__content {
    flex: 1;
    padding-top: 0.15rem;
}

.timeline-step__title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.15rem;
}

.timeline-step:not(.timeline-step--completed) .timeline-step__title {
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-step__time {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.order-card__tracking-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(45, 95, 168, 0.08);
    color: #2D5FA8;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(45, 95, 168, 0.15);
    word-break: break-all;
    max-width: 100%;
}

@media (max-width: 480px) {
    .order-success__number {
        font-size: 1.2rem;
    }
}