/* ╔══════════════════════════════════════════════════════════════╗
   ║   TEJASVIN — ORDERS PAGE  (Premium Dark Theme)               ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ─── Custom Properties ─────────────────────────────────────────── */
:root {
    --gold: rgb(201, 162, 77);
    --gold-light: rgba(201, 162, 77, 0.18);
    --gold-glow: rgba(201, 162, 77, 0.35);
    --cream: rgb(245, 239, 230);
    --cream-60: rgba(245, 239, 230, 0.6);
    --cream-30: rgba(245, 239, 230, 0.3);
    --cream-10: rgba(245, 239, 230, 0.08);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(245, 239, 230, 0.1);
    --border-gold: rgba(201, 162, 77, 0.3);
    --danger: #e05555;
    --success: #4caf7d;
    --shipped: #5b9cd6;
    --page-max: 860px;
    --radius: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s var(--ease);
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.orders-hero {
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.orders-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201, 162, 77, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.orders-hero__inner {
    position: relative;
    z-index: 1;
    max-width: var(--page-max);
    margin: 0 auto;
}

.orders-hero__icon {
    width: 72px;
    height: 72px;
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.6rem;
    color: var(--gold);
}

.orders-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    color: var(--cream);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.orders-hero p {
    font-size: 1.4rem;
    color: var(--cream-60);
    letter-spacing: 0.02em;
}

/* ─── Page Container ─────────────────────────────────────────────── */
.orders-page-container {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

/* ─── AUTH CARD ──────────────────────────────────────────────────── */
.auth-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0 3rem;
}

.auth-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3.5rem;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeUp 0.4s var(--ease) both;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.auth-card__brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2.4rem;
}

.auth-card__brand img {
    border-radius: 8px;
}

.auth-card__brand span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: 0.15em;
}

.auth-card h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 0.4rem;
}

.auth-card__sub {
    font-size: 1.3rem;
    color: var(--cream-60);
    margin-bottom: 2.8rem;
}

.auth-field-group {
    margin-bottom: 1.6rem;
}

.auth-label {
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cream-60);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cream-30);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.auth-input-wrap input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.2rem 1.4rem 1.2rem 4.2rem;
    font-size: 1.4rem;
    color: var(--cream);
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    font-family: inherit;
}

.auth-input-wrap input::placeholder {
    color: rgba(245, 239, 230, 0.2);
}

.auth-input-wrap input:focus {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.auth-error {
    background: rgba(224, 85, 85, 0.12);
    border: 1px solid rgba(224, 85, 85, 0.3);
    border-radius: var(--radius-sm);
    color: #f88;
    font-size: 1.2rem;
    padding: 1rem 1.4rem;
    margin-bottom: 1.4rem;
}

.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--gold) 0%, #c8973a 100%);
    color: #1a1200;
    border: none;
    border-radius: var(--radius-sm);
    padding: 1.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px var(--gold-glow);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 18, 0, 0.3);
    border-top-color: #1a1200;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.2rem;
    color: var(--cream-30);
    font-size: 1.2rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-switch {
    text-align: center;
    font-size: 1.3rem;
    color: var(--cream-60);
}

.auth-switch a {
    color: var(--gold);
    cursor: pointer;
    font-weight: 600;
    transition: opacity var(--transition);
}

.auth-switch a:hover {
    opacity: 0.8;
}

/* ─── USER TOPBAR ────────────────────────────────────────────────── */
.user-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 2rem;
    margin-bottom: 2.4rem;
    gap: 1rem;
}

.user-topbar__left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
}

.user-topbar__label {
    font-size: 1.1rem;
    color: var(--cream-30);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.user-topbar__email {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--cream);
    word-break: break-all;
}

.signout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--cream-60);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    font-family: inherit;
}

.signout-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(224, 85, 85, 0.07);
}

/* ─── LOADING ────────────────────────────────────────────────────── */
.orders-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    padding: 6rem 2rem;
    color: var(--cream-30);
    font-size: 1.4rem;
}

.orders-loading__spinner {
    width: 42px;
    height: 42px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* ─── ORDERS LIST HEADER ─────────────────────────────────────────── */
.orders-list-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.orders-list-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: 0.03em;
}

.orders-count-badge {
    background: var(--gold-light);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.25rem 0.9rem;
    border-radius: 20px;
}

/* ─── ORDER CARD (LIST) ──────────────────────────────────────────── */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    animation: fadeUp 0.35s var(--ease) both;
}

.order-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-gold);
    transform: translateY(-2px);
}

.order-card__left {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    min-width: 0;
}

.order-card__icon {
    width: 50px;
    height: 50px;
    background: rgba(245, 239, 230, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream-60);
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}

.order-card:hover .order-card__icon { background: var(--gold-light); color: var(--gold); border-color: var(--border-gold); }
.order-card__icon.icon--delivered { background: rgba(76, 175, 125, 0.12); color: var(--success); border-color: rgba(76, 175, 125, 0.25); }
.order-card__icon.icon--shipped { background: rgba(91, 156, 214, 0.12); color: var(--shipped); border-color: rgba(91, 156, 214, 0.25); }

.order-card__info { min-width: 0; }

.order-card__id {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
    font-family: monospace;
    letter-spacing: 0.05em;
}

.order-card__items {
    font-size: 1.2rem;
    color: var(--cream-60);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
    margin-top: 0.3rem;
}

.order-card__meta {
    font-size: 1.15rem;
    color: var(--cream-30);
    margin-top: 0.2rem;
}

.order-card__right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-shrink: 0;
}

.order-card__arrow {
    color: var(--cream-30);
    transition: transform var(--transition), color var(--transition);
}

.order-card:hover .order-card__arrow {
    transform: translateX(3px);
    color: var(--gold);
}

/* ─── STATUS BADGES ──────────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge--pending {
    background: rgba(245, 239, 230, 0.08);
    color: var(--cream-60);
    border: 1px solid var(--border);
}
.badge--processing {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}
.badge--shipped {
    background: rgba(91, 156, 214, 0.12);
    color: var(--shipped);
    border: 1px solid rgba(91, 156, 214, 0.25);
}
.badge--delivered {
    background: rgba(76, 175, 125, 0.12);
    color: var(--success);
    border: 1px solid rgba(76, 175, 125, 0.25);
}
.badge--cancelled {
    background: rgba(224, 85, 85, 0.1);
    color: var(--danger);
    border: 1px solid rgba(224, 85, 85, 0.25);
}

/* ─── EMPTY STATE ────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5rem 2rem;
    gap: 1.2rem;
}

.empty-state__icon {
    width: 100px;
    height: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream-30);
    margin-bottom: 0.8rem;
}

.empty-state h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
}

.empty-state p {
    font-size: 1.35rem;
    color: var(--cream-60);
    line-height: 1.7;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: linear-gradient(135deg, var(--gold) 0%, #c8973a 100%);
    color: #1a1200;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 1.2rem 2.6rem;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.8rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-shop-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--gold-glow);
}

/* ─── ORDER DETAIL ───────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gold);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: gap var(--transition), opacity var(--transition);
}

.back-link:hover { gap: 1rem; opacity: 0.85; }

.order-detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.8rem;
    animation: fadeUp 0.35s var(--ease) both;
    position: relative;
    overflow: hidden;
}

.order-detail-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.order-detail-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.4rem;
    flex-wrap: wrap;
}

.order-id-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cream-30);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.order-id-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
    font-family: monospace;
    margin: 0.3rem 0;
}

.order-date-val {
    font-size: 1.2rem;
    color: var(--cream-60);
}

/* ─── DELIVERY STATUS TRACK ──────────────────────────────────────── */
.status-track {
    margin: 2.4rem 0;
    padding: 2.2rem;
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.status-track__steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1.2rem;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.status-step__dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(245, 239, 230, 0.06);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    position: relative;
}

.status-step.done .status-step__dot {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.status-step.active .status-step__dot {
    background: var(--gold-light);
    border-color: var(--gold);
    color: var(--gold);
}

.pulse-ring {
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulseDot 1.8s ease-in-out infinite;
}

.status-step__label {
    font-size: 1rem;
    text-align: center;
    color: var(--cream-30);
    font-weight: 500;
    line-height: 1.3;
    max-width: 80px;
}

.status-step.done .status-step__label,
.status-step.active .status-step__label {
    color: var(--cream);
    font-weight: 600;
}

.status-track__bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.status-track__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--gold));
    border-radius: 2px;
    transition: width 0.8s var(--ease);
}

.cancelled-notice {
    background: rgba(224, 85, 85, 0.08);
    border: 1px solid rgba(224, 85, 85, 0.2);
    border-radius: var(--radius-sm);
    color: #f99;
    font-size: 1.3rem;
    padding: 1.2rem 1.6rem;
    margin: 1.6rem 0;
}

/* Location / Expected */
.detail-location,
.detail-expected {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.3rem;
    color: var(--cream-60);
    padding: 1rem 1.4rem;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}
.detail-location svg, .detail-expected svg { flex-shrink: 0; }
.detail-location strong { color: var(--cream); }
.detail-expected strong { color: var(--gold); }

/* Items */
.detail-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cream-30);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 2.4rem 0 1.2rem;
}

.detail-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.detail-item__img-wrap {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0,0,0,0.2);
}

.detail-item__img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.detail-item__img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream-30);
}

.detail-item__info { flex: 1; min-width: 0; }

.detail-item__name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-item__meta {
    font-size: 1.15rem;
    color: var(--cream-60);
    margin-top: 0.25rem;
}

.detail-item__price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
}

.detail-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1.6rem;
    margin-top: 1.6rem;
    font-size: 1.4rem;
    color: var(--cream-60);
}

.detail-total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
}

.detail-delivery-info {
    margin-top: 1.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.detail-delivery-info__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    color: var(--cream-30);
}

.detail-empty-items {
    color: var(--cream-30);
    font-size: 1.3rem;
    text-align: center;
    padding: 2rem;
}

/* ─── KEYFRAMES ──────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.7; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .auth-card {
        padding: 2.5rem 2rem;
    }

    .order-card {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .order-card__items {
        max-width: 180px;
    }

    .status-track__steps {
        gap: 0.2rem;
    }

    .status-step__label {
        font-size: 0.85rem;
    }

    .order-detail-card {
        padding: 2rem 1.6rem;
    }

    .user-topbar {
        flex-wrap: wrap;
        gap: 1.2rem;
    }

    .orders-hero {
        padding: 3.5rem 1.5rem 2.5rem;
    }
}
