/* صفحة الطلبات المختصرة، العدادات الحمراء، رفع الوسائط، قسم الدفع */

/* ───── العدادات الحمراء في القائمة الجانبية ───── */
.side nav a .count, .side nav summary .count { background: #e3161d !important; color: #fff !important; min-width: 20px; text-align: center; box-shadow: 0 0 0 2px rgba(227, 22, 29, .18); }
.side nav .count[hidden] { display: none !important; }

/* تنبيه صغير بدل الكارت الكبير في لوحة التحكم */
body.admin .ntf.ntf-mini { width: auto; max-width: calc(100vw - 32px); padding: 8px 12px; border-radius: 99px; border-color: #e3161d; }
body.admin .ntf.ntf-mini .ntf-list, body.admin .ntf.ntf-mini .ntf-foot { display: none !important; }
body.admin .ntf.ntf-mini .ntf-head { margin: 0; }
body.admin .ntf.ntf-mini .ntf-title { cursor: pointer; color: var(--text); font-size: 13.5px; }
body.admin .ntf.ntf-mini .ntf-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e3161d; margin-inline-end: 7px; vertical-align: middle; }

/* ───── فلاتر الطلبات ───── */
.ord-filters { padding: 12px 14px; }
.ord-filters [hidden] { display: none !important; }
.ord-f-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ord-f-row .field { margin: 0; flex: 1 1 150px; min-width: 0; }
.ord-f-row .field.grow { flex: 2 1 240px; }
.ord-f-row .field.btn-field { flex: 0 0 auto; }
.ord-f-row .field label { font-size: 12.5px; }
.ord-more { margin-top: 10px; }
.ord-more summary { cursor: pointer; font-size: 13px; margin-bottom: 8px; }
.ord-more .ord-f-row > .select { width: auto; min-width: 150px; }
.stage-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.stage-chips a { flex: none; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }
.stage-chips a b { color: var(--text); margin-inline-start: 3px; }
.stage-chips a.on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.stage-chips a.on b { color: var(--ink); }
.stage-chips a.hot:not(.on) b { color: #fff; background: #e3161d; padding: 0 6px; border-radius: 99px; }

/* ───── القائمة المختصرة ───── */
.ord-list { display: grid; gap: 8px; margin-bottom: 14px; }
.ord-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel, rgba(255, 255, 255, .02)); color: var(--text); transition: border-color .15s, transform .15s; }
.ord-row:hover { border-color: var(--gold); transform: translateY(-1px); }
.ord-row.unseen { border-inline-start: 3px solid #e3161d; }
.ord-row .o-main { display: grid; gap: 2px; min-width: 0; }
.ord-row .o-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-row .o-sign { color: var(--gold-2, var(--gold)); font-weight: 600; }
.ord-row .o-money { display: grid; text-align: end; }
.ord-row .status { font-size: 12.5px; }
@media (max-width: 760px) {
  .ord-row { grid-template-columns: 1fr auto; }
  .ord-row .o-main { grid-column: 1 / -1; }
  .ord-row .o-money { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .ord-filters { padding: 10px; }
  .ord-f-row:first-child { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ord-f-row .field.grow { grid-column: 1 / -1; order: -1; }
  .ord-f-row .field.btn-field { display: none; }
  .ord-f-row .field.pay-field { grid-column: 1 / -1; }
  .ord-f-row .field label { font-size: 11.5px; margin-bottom: 3px; }
  .ord-f-row .field .input, .ord-f-row .field .select { height: 40px; font-size: 14px; }
}

/* ───── رفع صور وفيديوهات متعددة ───── */
.media-up { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px; }
.media-up.drag { border-color: var(--gold); background: rgba(212, 175, 55, .06); }
.media-up .mu-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.media-up .mu-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.media-up .mu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.media-up .mu-grid:empty { display: none; }
.mu-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; display: grid; place-items: center; }
.mu-item img, .mu-item video { width: 100%; height: 100%; object-fit: cover; }
.mu-item .mu-file { color: #ddd; font-size: 11.5px; padding: 6px; text-align: center; word-break: break-all; }
.mu-item .mu-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(227, 22, 29, .92); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.mu-item .mu-tag { position: absolute; bottom: 4px; inset-inline-start: 4px; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; }
.mu-item .mu-size { position: absolute; bottom: 4px; inset-inline-end: 4px; font-size: 10px; padding: 1px 5px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #ccc; }
.thumbs .vid { position: relative; }
.thumbs video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: #000; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.media-grid > a, .media-grid > div { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: #000; }
.media-grid img, .media-grid video { width: 100%; height: 100%; object-fit: cover; }
.media-grid .doc { background: transparent; color: var(--muted); font-size: 12px; padding: 6px; text-align: center; }

/* ───── قسم حالة الدفع والدفعات ───── */
.pay-sec .pay-states { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pay-sec .pay-states label { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; font-size: 13.5px; }
.pay-sec .pay-states label:has(input:checked) { border-color: var(--gold); background: rgba(212, 175, 55, .08); }
.pay-sec .pay-states small { display: block; color: var(--muted); font-size: 12px; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.pay-grid div { border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; }
.pay-grid small { display: block; color: var(--muted); font-size: 11.5px; }
.pay-grid b { font-size: 15px; }
.pay-grid .rem b { color: #e3161d; }
.pay-grid .ok b { color: var(--ok, #3ecf8e); }
.pay-stage-pill { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--gold); font-weight: 700; font-size: 13px; }
.flash-info { background: rgba(212, 175, 55, .08); border-color: rgba(212, 175, 55, .35); color: var(--text); }
.ord-wrap { display: flex; gap: 6px; align-items: stretch; }
.ord-wrap > .ord-row { flex: 1; min-width: 0; }
.ord-del { display: grid; place-items: center; }
.fr-types { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; margin: 0 !important; }
.fr-types label { align-items: center; }
@media print { .side, .topbar, .appbar, .no-print, .head-row .actions { display: none !important; } }

/* تلوين المراحل */
.stage-chips a { --c: var(--gold, #F5C518); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); color: var(--text); }
.stage-chips a b { color: var(--c); }
.stage-chips a.on { background: var(--c); border-color: var(--c); color: #111; }
.stage-chips a.on b { color: #111; }
.stage-chips a.zero { opacity: .55; }
.stage-chips a.all { font-weight: 800; }
.stage-chips a.all b { color: var(--gold, #F5C518); }
.stage-chips a.all.on b { color: #111; }
.ord-row { --c: var(--line); border-inline-start: 4px solid var(--c) !important; }
.ord-row.unseen { box-shadow: inset 0 0 0 1px rgba(227, 22, 29, .5); }
.stage-pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.o-stage { display: grid; justify-items: start; gap: 2px; }
.fin-off { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; margin-inline-end: 8px; padding: 4px 12px; border-radius: 99px; background: rgba(227, 22, 29, .12); border: 1px solid rgba(227, 22, 29, .45); color: #ff6b6b; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .fin-off span { display: none; } }

/* زر حذف الملف المختار */
.file-clear { display: flex; gap: 6px; align-items: center; }
.file-clear > input { flex: 1; min-width: 0; }
.file-x { flex: none; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(227, 22, 29, .5); background: rgba(227, 22, 29, .12); color: #ff6b6b; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.file-x:hover { background: #e3161d; color: #fff; }
.file-x[hidden], .file-info[hidden] { display: none !important; }
.file-info { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .file-x span { display: none; } }
/* إخفاء عدادات القائمة الجانبية */
.side nav .count, .side-nav .count { display: none !important; }
/* تحويل عرض السعر: طلب جديد أو طلب ميداني */
.pq-convert summary { list-style: none; cursor: pointer; }
.pq-convert summary::-webkit-details-marker { display: none; }
.pq-convert .pq-caret { margin-inline-start: 4px; transition: transform .2s; display: inline-block; }
.pq-convert[open] .pq-caret { transform: rotate(180deg); }
.pq-convert-opts { display: grid; gap: 6px; margin-top: 6px; }
.pq-convert-opts a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); transition: border-color .15s, background .15s; }
.pq-convert-opts a:hover { border-color: var(--gold); background: rgba(212, 175, 55, .08); }
.pq-convert-opts .ico-sm { color: var(--gold); flex: none; }
.pq-convert-opts span { display: grid; } .pq-convert-opts small { color: var(--muted); font-size: 12px; }
