.orders-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    margin-bottom: 30px;
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.order-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.08);
}

.order-header {
    background: rgba(0,0,0,0.15);
    padding: 10px 20px;
    font-size: 13px;
    color: #f97316;
    font-weight: bold;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-left: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.order-header span:first-child {
    color: #f97316;
    font-size: 12px;
}

.order-header span:last-child {
    color: #94a3b8;
    font-size: 11px;
}

.order-body {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    padding: 15px 20px;
}

.order-body img {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    padding: 4px;
}

.card-details {
    flex: 1;
}

.card-details h4 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: bold;
}

.card-details p {
    margin: 3px 0;
    font-size: 13px;
    color: #94a3b8;
}

.card-details p strong {
    color: var(--text);
}

.order-status {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-right: 1px solid rgba(255,255,255,0.08);
    min-width: 120px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending { background: rgba(249,115,22,0.15); color: #f97316; }
.status-completed { background: rgba(34,197,94,0.15); color: #22c55e; }
.status-cancelled { background: rgba(239,68,68,0.15); color: #ef4444; }

.card-code-container {
    margin-top: 10px;
    background: rgba(255,152,0,0.1);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed var(--primary);
}

.code-text {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.shop-now-btn {
    display: inline-block;
    margin-top: 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .order-card { flex-direction: column; }
    .order-header { flex-direction: row; width: 100%; border-left: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
}



/* إصلاح موضع قائمة البروفيل */
#user-dropdown {
    position: absolute;
    top: 100%;
    right: auto;
    left: 0;        /* يظهر لليسار بدل اليمين */
    min-width: 160px;
    z-index: 9999;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    padding: 8px 0;
    display: none;
}

#user-dropdown.show {
    display: block;
}

/* الحاوية تكون relative */
.user-menu-wrapper,
.nav-icons,
header {
    position: relative;
}