/* أنماط وحدة: orders */
/* ===== الطلبات ===== */
.muted { color: var(--text-dim); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }

.order-form { margin-top: 22px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.order-form label { display: block; margin-bottom: 16px; font-size: .9rem; font-weight: 600; color: var(--text-dim); }
.order-form input, .order-form select, .order-form textarea {
    width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font-family: inherit; font-size: .96rem;
}
.order-form input:focus, .order-form select:focus { outline: none; border-color: var(--primary); }
.order-form small { display: block; margin-top: 5px; font-weight: 500; font-size: .8rem; }
.order-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; margin: 6px 0 18px; border-radius: 10px;
    background: var(--bg); border: 1px dashed var(--border); font-size: .95rem;
}
.order-total strong { font-size: 1.25rem; color: var(--primary); }

.truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* شارات الحالة */
.st { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .76rem; font-weight: 700;
      border: 1px solid var(--border); background: var(--bg); white-space: nowrap; }
.st-pending     { color: #a16207; border-color: #a16207; }
.st-processing  { color: #0284c7; border-color: #0284c7; }
.st-in_progress { color: #0284c7; border-color: #0284c7; }
.st-completed   { color: #16a34a; border-color: #16a34a; }
.st-partial     { color: #d97706; border-color: #d97706; }
.st-canceled    { color: #6b7280; border-color: #6b7280; }
.st-refunded    { color: #6b7280; border-color: #6b7280; }
.st-error       { color: #dc2626; border-color: #dc2626; }

/* المرحلة 2: التقطير، التعليقات، إعادة التعبئة/الإلغاء، الطلب الجماعي */
.order-form textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.order-form [hidden] { display: none !important; }
.ord-check { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.ord-check input { width: auto !important; margin: 0 !important; }
.ord-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .ord-row { grid-template-columns: 1fr; } }
.ord-row > small { grid-column: 1 / -1; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ord-drip { display: block; font-size: .74rem; white-space: nowrap; }
.ord-acts { white-space: nowrap; }
.ord-acts form { display: inline-block; margin: 0 2px; }
.ord-btn { padding: 5px 10px; font-size: .8rem; }
.ord-rf-completed { color: #16a34a; }
.ord-rf-rejected, .ord-rf-error, .ord-bad { color: #dc2626; }
.ord-h2 { font-size: 1.1rem; margin: 18px 0 10px; }

.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); font-size: .88rem; font-weight: 600; color: var(--text-dim); }
.pager a.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ct); }
