/* ===== المتغيّرات والهوية ===== */
:root {
  --brand: #0f766e; --brand-dark: #0b5a54; --brand-light: #14b8a6;
  --accent: #d97706; --ink: #0f172a;
}
* { font-family: "El Messiri", "Segoe UI", Tahoma, sans-serif; }
body { -webkit-font-smoothing: antialiased; }

.text-brand { color: var(--brand); }
.bg-brand { background-color: var(--brand); }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .9rem; border-radius: .65rem; font-weight: 600;
  font-size: .875rem; transition: all .15s ease; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap; text-decoration: none;
}
.btn-sm { padding: .35rem .7rem; font-size: .8rem; border-radius: .55rem; }
/* حلقة تركيز موحّدة للوحة المفاتيح — تظهر عند التنقّل بـTab فقط (:focus-visible)، لا عند النقر بالفأرة.
   كانت المدخلات وحدها تُظهِر التركيز؛ الأزرار/الروابط/التبويبات كانت تبتلعه فيضيع مستخدم الكيبورد. */
.btn:focus-visible, .app-tab:focus-visible, .nav-link:focus-visible, .app-waffle:focus-visible,
.app-tile:focus-visible, .star-btn:focus-visible, .tbl th.tbl-sortable:focus-visible,
a:focus-visible, select:focus-visible, input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: .4rem;
}
/* احترام تفضيل تقليل الحركة (إتاحة) — يُلغي الرسوم والانتقالات لمن يتأثّر بها */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: #334155; border-color: #e2e8f0; }
.btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-danger { color: #be123c; border-color: #fecdd3; background: #fff; }
.btn-danger:hover { background: #fff1f2; }
.btn-brand.btn-danger { background: #e11d48; color: #fff; border-color: transparent; }
.btn-brand.btn-danger:hover { background: #be123c; }
.btn-white { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: #f1f5f9; }
.btn-glass { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-glass:hover { background: rgba(255,255,255,.28); }

.card { background: #fff; border: 1px solid #e9eef3; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.logo-box { display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); border-radius: .75rem; }

/* ===== الشريط الجانبي ===== */
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: .7rem;
  color: #475569; font-size: .9rem; font-weight: 500; transition: all .15s; cursor: pointer; text-decoration: none; }
.nav-link:hover { background: #f1f5f9; color: var(--ink); }
.nav-link.active { background: var(--brand); color: #fff; }
.nav-ico { width: 1.15rem; height: 1.15rem; opacity: .8; flex: none; }
.nav-group-title { font-size: .7rem; font-weight: 700; color: #94a3b8; padding: .9rem .8rem .35rem; }

/* ===== الشارات ===== */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; white-space: nowrap; }
.badge .dot { width: .5rem; height: .5rem; border-radius: 999px; display: inline-block; }

/* ===== النجوم ===== */
.stars { display: inline-flex; gap: 1px; }
.star-on { color: #f59e0b; fill: #f59e0b; }
.star-half { color: #f59e0b; fill: #fde68a; }
.star-off { color: #e2e8f0; fill: #e2e8f0; }

/* ===== الجداول ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tbl th { text-align: right; font-weight: 600; color: #64748b; font-size: .76rem; padding: .6rem .75rem; border-bottom: 1px solid #eef2f6; white-space: nowrap; }
.tbl td { padding: .65rem .75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcfd; }
.tbl th.tbl-sortable { cursor: pointer; user-select: none; transition: color .12s; }
.tbl th.tbl-sortable:hover { color: var(--brand-dark); }
.tbl-sort-ind { display: inline-block; margin-inline-start: .25rem; font-size: .7rem; opacity: 0; transition: opacity .12s; }
.tbl th.tbl-sortable:hover .tbl-sort-ind { opacity: .5; }
.tbl-sort-ind.is-active { opacity: .9; }
.tbl-pager { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .75rem .5rem 0; }

/* ===== أدوات عامة ===== */
.progress { height: .5rem; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; }
.brand-spinner { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== شاشة الإقلاع (بديل «جارٍ تحميل النظام» الرمادي) ===== */
.boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 200;
  background: radial-gradient(1100px 620px at 50% -8%, color-mix(in srgb, var(--brand) 14%, #ffffff), #f4f8f7 62%); }
.boot-in { text-align: center; animation: bootIn .5s ease both; }
@keyframes bootIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.boot-orb { width: 4.6rem; height: 4.6rem; margin: 0 auto 1.5rem; border-radius: 1.45rem; position: relative;
  background: linear-gradient(140deg, var(--brand-light, #34d399), var(--brand) 45%, var(--brand-dark)); color: #fff;
  display: grid; place-items: center; box-shadow: 0 16px 40px color-mix(in srgb, var(--brand) 42%, transparent);
  animation: bootBreathe 2.4s ease-in-out infinite; }
.boot-orb svg { width: 2rem; height: 2rem; }
@keyframes bootBreathe { 0%,100% { transform: scale(1); box-shadow: 0 14px 36px color-mix(in srgb, var(--brand) 34%, transparent); }
  50% { transform: scale(1.055); box-shadow: 0 22px 52px color-mix(in srgb, var(--brand) 52%, transparent); } }
.boot-msg { font-family: 'El Messiri', system-ui, sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--brand-dark); margin: 0; }
.boot-sub { font-size: .9rem; color: #8a9a95; margin: .35rem 0 0; }
.boot-loader { display: flex; justify-content: center; gap: .45rem; margin-top: 1.25rem; }
.boot-loader span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); animation: bootBounce 1.2s ease-in-out infinite; }
.boot-loader span:nth-child(2) { animation-delay: .16s; }
.boot-loader span:nth-child(3) { animation-delay: .32s; }
@keyframes bootBounce { 0%,100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-.42rem); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot-orb, .boot-in, .boot-loader span { animation: none; } .boot-loader span { opacity: .7; } }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
::-webkit-scrollbar { height: 9px; width: 9px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
[hidden] { display: none !important; }

/* ===== حقول النماذج ===== */
.fld { display: block; }
.fld-label { display: block; font-size: .78rem; font-weight: 600; color: #475569; margin-bottom: .25rem; }
.fld-hint { display: block; font-size: .7rem; color: #94a3b8; margin-top: .2rem; }
.inp { width: 100%; border: 1px solid #e2e8f0; border-radius: .6rem; padding: .5rem .7rem; font-size: .85rem; background: #fff; color: #1e293b; transition: border .15s, box-shadow .15s; outline: none; }
.inp:focus { border-color: var(--brand-light); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.inp-sm { padding: .4rem .6rem; font-size: .8rem; }
.skill-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: #475569; cursor: pointer; }
.skill-check input { width: 1rem; height: 1rem; accent-color: var(--brand); }

/* ===== شرائح التصنيف ===== */
.catchip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.catchip:hover { border-color: #cbd5e1; background: #f8fafc; }
.catchip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.catchip-n { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .45rem; font-size: .72rem; }
.catchip.active .catchip-n { background: rgba(255,255,255,.25); }

/* ===== شبكة بطاقات الموديلز ===== */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.mc { display: block; overflow: hidden; transition: transform .18s, box-shadow .18s; text-decoration: none; }
.mc:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,23,42,.12); }
.mc-cover { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #eef2f6; }
.mc-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mc:hover .mc-img { transform: scale(1.05); }
.mc-overlay { position: absolute; inset-inline: 0; bottom: 0; padding: 2rem .8rem .7rem; color: #fff;
  background: linear-gradient(to top, rgba(2,6,23,.85), rgba(2,6,23,.15) 60%, transparent); }
.mc-name { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.mc-sub { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; flex-wrap: wrap; }
.mc-city { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; color: rgba(255,255,255,.85); }
.mc-badges { position: absolute; top: .6rem; inset-inline-start: .6rem; display: flex; align-items: center; gap: .35rem; }
.mc-star { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: rgba(255,255,255,.9); color: #f59e0b; }
.mc-hidden { position: absolute; top: .6rem; inset-inline-end: .6rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: rgba(2,6,23,.55); color: #fff; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; }
.mc-rate { font-weight: 700; color: var(--brand-dark); font-size: .9rem; }
.avatar-fallback { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 700; font-size: 2rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); }

/* ===== ملف الموديل ===== */
.md-hero { position: relative; overflow: hidden; }
.md-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(26px) saturate(1.2); opacity: .28; transform: scale(1.15); }
.md-hero-inner { position: relative; display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem; flex-wrap: wrap; }
.md-avatar { width: 108px; height: 108px; border-radius: 1.2rem; overflow: hidden; flex: none; box-shadow: 0 6px 20px rgba(15,23,42,.18); border: 3px solid #fff; background: #eef2f6; }
.md-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.md-hero-main { flex: 1; min-width: 220px; }
.md-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
/* زرّ الرجوع داخل الهيدر — زاويةٌ علويّة (يسار في RTL) بدل صفٍّ منفصلٍ يأكل حيّزاً */
.md-hero-back { position: absolute; top: .6rem; inset-inline-end: 1rem; z-index: 3; }
.md-hero-inner { padding-top: 1.7rem; }
@media (max-width: 640px) { .md-hero-back { position: static; padding: .8rem 1rem 0; } .md-hero-inner { padding-top: 1.4rem; } }

.tabbar { display: flex; gap: .3rem; border-bottom: 1px solid #eef2f6; margin-bottom: 1rem; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .9rem; font-size: .85rem; font-weight: 600; color: #64748b; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* تبويباتٌ بمربّعاتٍ ملوّنة (tileTabs) — بلا تمرير أفقيّ، شبكةٌ متجاوبة */
.tile-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: .5rem; margin-bottom: 1.1rem; }
.tile-tab { --tile: #6366f1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: .75rem .4rem; border-radius: .85rem; border: 1.5px solid transparent; cursor: pointer; text-align: center;
  background: color-mix(in srgb, var(--tile) 9%, #fff); transition: transform .08s ease, box-shadow .15s ease, background .15s ease; }
.tile-tab:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2,6,23,.07); }
.tile-tab-ico { width: 2.1rem; height: 2.1rem; border-radius: .6rem; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tile) 16%, #fff); color: var(--tile); transition: background .15s, color .15s; }
.tile-tab-title { font-size: .8rem; font-weight: 600; color: #334155; line-height: 1.15; }
.tile-tab-n { font-size: .74rem; font-weight: 800; color: var(--tile); line-height: 1; }
.tile-tab.active { border-color: var(--tile); background: color-mix(in srgb, var(--tile) 15%, #fff);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--tile) 22%, transparent); }
.tile-tab.active .tile-tab-ico { background: var(--tile); color: #fff; }
.tile-tab:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; }
@media (max-width: 640px) { .tile-tabs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .4rem; }
  .tile-tab { padding: .6rem .3rem; } .tile-tab-title { font-size: .72rem; } }

.sec-title { font-size: .78rem; font-weight: 700; color: #94a3b8; margin-bottom: .5rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.info-cell { background: #f8fafc; border: 1px solid #eef2f6; border-radius: .6rem; padding: .5rem .7rem; }
.info-k { display: block; font-size: .7rem; color: #94a3b8; }
.info-v { display: block; font-size: .9rem; font-weight: 600; color: #1e293b; }

/* ===== المعرض ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.g-thumb { position: relative; aspect-ratio: 3/4; border-radius: .7rem; overflow: hidden; cursor: pointer; border: 0; padding: 0; background: #eef2f6; }
.g-thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.g-thumb:hover .g-thumb-img { transform: scale(1.06); }
.g-zoom { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: 0; background: rgba(2,6,23,.35); transition: opacity .2s; }
.g-thumb:hover .g-zoom { opacity: 1; }
.g-play { position: absolute; inset: 0; margin: auto; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--brand-dark); }
.g-vtitle { position: absolute; inset-inline: 0; bottom: 0; padding: 1rem .6rem .5rem; color: #fff; font-size: .78rem; font-weight: 600; background: linear-gradient(to top, rgba(2,6,23,.8), transparent); text-align: start; }

/* ===== نافذة الحجز ===== */
.book-total { font-size: 1.3rem; font-weight: 800; color: var(--brand-dark); }

/* ===== النافذة المنبثقة (Modal) ===== */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); opacity: 0; transition: opacity .15s; overflow-y: auto; }
.modal-backdrop.open { opacity: 1; }
.modal-backdrop.closing { opacity: 0; }
.modal-box { width: 100%; max-width: 480px; background: #fff; border-radius: 1rem; box-shadow: 0 20px 50px rgba(15,23,42,.25);
  transform: translateY(-8px); transition: transform .15s; margin: auto; }
.modal-backdrop.open .modal-box { transform: none; }
.modal-wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid #eef2f6; }
.modal-x { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: .5rem; color: #64748b; border: 0; background: none; cursor: pointer; }
.modal-x:hover { background: #f1f5f9; color: #0f172a; }
.modal-body { padding: 1.2rem; max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.2rem; border-top: 1px solid #eef2f6; }

/* ===== عارض الوسائط (Lightbox) ===== */
.lb-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(2,6,23,.92); padding: 3vh; }
.lb-stage { max-width: 90vw; max-height: 82vh; display: grid; place-items: center; }
.lb-media { max-width: 90vw; max-height: 82vh; border-radius: .6rem; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 1.2rem; inset-inline-end: 1.2rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.25); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { inset-inline-end: 1rem; } .lb-next { inset-inline-start: 1rem; }
.lb-caption { position: absolute; bottom: 1.2rem; inset-inline: 0; text-align: center; color: rgba(255,255,255,.8); font-size: .85rem; }

/* ===== إشعار (Toast) ===== */
/* حاوية التنبيهات — أسفل الوسط، تتكدّس عموديّاً (الأحدث بالأسفل) */
.toast-wrap { position: fixed; bottom: 1.75rem; inset-inline: 0; z-index: 95; display: flex; flex-direction: column;
  align-items: center; gap: .6rem; pointer-events: none; padding: 0 1rem; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: .9rem; min-width: 340px; max-width: min(94vw, 500px);
  background: #fff; color: #0f172a; border: 1px solid #e6ebf1; border-inline-start-width: 5px; border-radius: 1rem;
  padding: 1rem 1.15rem; font-weight: 650; font-size: .98rem; box-shadow: 0 20px 50px rgba(15,23,42,.24), 0 4px 12px rgba(15,23,42,.08);
  opacity: 0; transform: translateY(1.5rem) scale(.93); transition: opacity .26s ease, transform .32s cubic-bezier(.18,.9,.24,1.14); }
.toast.show { opacity: 1; transform: none; }
.toast-ico { width: 2.4rem; height: 2.4rem; border-radius: 999px; display: grid; place-items: center; flex: none; color: #fff; }
.toast-msg { flex: 1; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s ease; transform: none; } }
.toast-x { flex: none; background: none; border: 0; color: #94a3b8; cursor: pointer; padding: .2rem; border-radius: .4rem; display: grid; place-items: center; }
.toast-x:hover { background: #f1f5f9; color: #475569; }
/* ألوان حسب النوع: شريطٌ جانبيّ + دائرة الأيقونة */
.toast-green { border-inline-start-color: #16a34a; } .toast-green .toast-ico { background: #16a34a; }
.toast-red   { border-inline-start-color: #dc2626; } .toast-red .toast-ico { background: #dc2626; }
.toast-amber { border-inline-start-color: #f59e0b; } .toast-amber .toast-ico { background: #f59e0b; }
.toast-rose  { border-inline-start-color: #e11d48; } .toast-rose .toast-ico { background: #e11d48; }
.toast-blue  { border-inline-start-color: #2563eb; } .toast-blue .toast-ico { background: #2563eb; }
.toast-indigo{ border-inline-start-color: #4f46e5; } .toast-indigo .toast-ico { background: #4f46e5; }
.toast-teal  { border-inline-start-color: #0d9488; } .toast-teal .toast-ico { background: #0d9488; }
.toast-slate { border-inline-start-color: #64748b; } .toast-slate .toast-ico { background: #64748b; }

/* ===== الرئيسية ===== */
.dash-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--brand-dark), var(--brand) 55%, var(--brand-light)); border: 0; }
.dash-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% -10%, rgba(255,255,255,.25), transparent 40%); }
/* شرائح «لمحة يومك» — عدّاد + وصف، قابلة للنقر (زجاجيّة على تدرّج الـhero) */
.dash-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: .7rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff; font-size: .82rem; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
.dash-chip:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }
.dash-chip-n { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: .5rem; background: rgba(255,255,255,.25); font-weight: 800; font-size: .8rem; }
.dash-chip-amber .dash-chip-n { background: #f59e0b; color: #422006; }
.dash-chip-red .dash-chip-n { background: #f43f5e; color: #fff; }
.dash-chip-blue .dash-chip-n { background: #fff; color: var(--brand-dark); }
.dash-feat { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; }
.dash-feat-card { display: block; border: 1px solid #eef2f6; border-radius: .8rem; overflow: hidden; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.dash-feat-card:hover { box-shadow: 0 8px 20px rgba(15,23,42,.1); transform: translateY(-2px); }
.dash-feat-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #eef2f6; }
.dash-feat-info { padding: .5rem .6rem; }

/* ===== عرض العميل (Showcase) ===== */
.showcase-head { padding: 1.4rem; background: linear-gradient(120deg, #ffffff, #f0fdfa); }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; }
.sc-card { background: #fff; border: 2px solid #eef2f6; border-radius: 1rem; overflow: hidden; cursor: pointer; transition: all .18s; }
.sc-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15,23,42,.13); }
.sc-card.picked { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.sc-cover { position: relative; aspect-ratio: 4/5; overflow: hidden; background: #eef2f6; }
.sc-img { width: 100%; height: 100%; object-fit: cover; }
.sc-overlay { position: absolute; inset-inline: 0; bottom: 0; padding: 1.8rem .8rem .7rem; color: #fff; background: linear-gradient(to top, rgba(2,6,23,.85), transparent); }
.sc-name { font-weight: 700; font-size: 1.05rem; }
.sc-meta { font-size: .78rem; color: rgba(255,255,255,.85); }
.sc-pick { position: absolute; top: .7rem; inset-inline-end: .7rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.9); color: #94a3b8; border: 0; cursor: pointer; transition: all .15s; }
.sc-pick:hover { color: #e11d48; }
.sc-pick.on { background: #e11d48; color: #fff; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; }
.sc-rate { font-weight: 700; color: var(--brand-dark); font-size: .82rem; }
.sc-rate-quote { font-weight: 600; color: #64748b; font-size: .78rem; }
.shortlist-bar { position: fixed; bottom: 1rem; inset-inline: 1rem; z-index: 40; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: .7rem 1rem; box-shadow: 0 14px 40px rgba(15,23,42,.18); }
.sl-thumb { width: 2.4rem; height: 2.4rem; border-radius: .6rem; overflow: hidden; flex: none; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(15,23,42,.15); background: #eef2f6; }
.sl-thumb-img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 🔐 شاشة الدخول — تصميم مقسوم (صورة + فورم) ===== */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.login-hero { position: relative; background: url('../images/loginBackground.jpg') center/cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.login-hero-overlay { position: absolute; inset: 0; background: linear-gradient(140deg, rgba(4,120,87,.90) 0%, rgba(6,78,59,.82) 45%, rgba(15,23,42,.86) 100%); }
.login-hero-content { position: relative; z-index: 1; text-align: center; color: #fff; padding: 2.5rem; max-width: 480px; }
.login-hero-logo { height: 56px; width: auto; margin: 0 auto 2rem; display: block; filter: brightness(0) invert(1); opacity: .96; }
.login-hero-title { font-size: 2.15rem; font-weight: 800; margin-bottom: .9rem; letter-spacing: -.01em; }
.login-hero-tagline { font-size: 1.02rem; line-height: 2; color: rgba(255,255,255,.86); }

.login-form-side { display: grid; place-items: center; padding: 2rem 1.5rem; background: #f8fafc; }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid #eef2f7; border-radius: 1.5rem; padding: 2.75rem 2.25rem; box-shadow: 0 20px 55px rgba(15,23,42,.09); }
.login-card-logo { height: 46px; width: auto; margin: 0 auto 1.5rem; display: block; }
.login-card-title { text-align: center; font-size: 1.4rem; font-weight: 800; color: #0f172a; }
.login-card-sub { text-align: center; color: #94a3b8; font-size: .85rem; margin-top: .3rem; margin-bottom: 1.75rem; }
.login-fields { display: flex; flex-direction: column; gap: 1rem; }
.login-card .btn { justify-content: center; }   /* الزرّ العريض: المحتوى في الوسط لا عند الحافة */
.login-note { font-size: 11px; color: #94a3b8; line-height: 1.9; border-top: 1px solid #f1f5f9; padding-top: 1rem; margin-top: 1.5rem; text-align: center; }

@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-form-side { background: #fff; padding: 1.5rem 1rem; }
  .login-card { box-shadow: none; border: none; padding: 1.5rem 1rem; }
}

/* ===== ⊞ مُشغّل التطبيقات (Office 365 style) — بديل الشريط الجانبيّ ===== */
.app-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0; }

/* صفّ 1 — عالميّ */
.appbar-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1.25rem; }
.app-waffle { width: 2.25rem; height: 2.25rem; border-radius: .6rem; display: grid; place-items: center; color: #475569; background: none; border: 0; cursor: pointer; transition: background .15s; }
.app-waffle:hover { background: #f1f5f9; color: var(--brand-dark); }

/* صفّ 2 — تبويبات التطبيق النشط */
.app-tabs { display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; border-top: 1px solid #f1f5f9; overflow-x: auto; scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs-name { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .82rem; color: var(--app-color, #334155); padding: .55rem .2rem; flex: none; }
.app-tabs-list { display: flex; align-items: center; gap: .15rem; }
.app-tab { display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; border-bottom: 2px solid transparent; color: #64748b; font-size: .85rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color .15s, border-color .15s; }
.app-tab:hover { color: var(--ink); }
.app-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.app-tab svg { width: 1rem; height: 1rem; opacity: .85; flex: none; }

/* شبكة الوافل */
.app-launcher { position: absolute; top: calc(100% + .35rem); inset-inline-start: 1rem; z-index: 40; width: 420px; max-width: 92vw; background: #fff; border: 1px solid #e9eef3; border-radius: 1rem; box-shadow: 0 18px 44px rgba(15,23,42,.18); padding: 1rem; }
.app-launcher[hidden] { display: none; }
.app-launcher-head { font-size: .7rem; font-weight: 700; color: #94a3b8; padding: 0 .3rem .6rem; }
.app-launcher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.app-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1rem .5rem; border: 1px solid #eef2f7; border-radius: .85rem; background: #fff; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; text-align: center; }
.app-tile:hover { transform: translateY(-2px); border-color: var(--app-color); box-shadow: 0 8px 20px rgba(15,23,42,.1); }
.app-tile-ico { width: 2.75rem; height: 2.75rem; border-radius: .75rem; display: grid; place-items: center; color: #fff; background: var(--app-color, #64748b); }
.app-tile-name { font-size: .78rem; font-weight: 600; color: #334155; line-height: 1.3; }

@media (max-width: 768px) {
  .appbar-top { padding: .5rem .9rem; }
  .app-tabs { padding: 0 .9rem; }
  .app-launcher { inset-inline-start: .5rem; }
  .app-launcher-grid { grid-template-columns: repeat(2, 1fr); }
  .md-actions { width: 100%; }
}

/* ===== محادثات بأسلوب Gmail — جزءان متجاوران ===== */
.gm-split { display: grid; grid-template-columns: 320px 1fr; border: 1px solid #eef2f6; border-radius: .8rem; overflow: hidden; min-height: 440px; }
.gm-pane-list { border-inline-end: 1px solid #eef2f6; overflow-y: auto; max-height: 68vh; background: #fff; }   /* RTL: الحدّ على حافة البدء (يسار القائمة) */
.gm-list-head { display: flex; flex-direction: column; gap: .55rem; padding: .6rem; border-bottom: 1px solid #f1f5f9; position: sticky; top: 0; background: #fff; z-index: 1; }
.gm-pane-read { overflow-y: auto; max-height: 68vh; padding: 1rem; display: flex; flex-direction: column; }
.gm-empty { align-items: center; justify-content: center; text-align: center; }

.gm-row { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: start;
  padding: .65rem .8rem; border: 0; border-bottom: 1px solid #f1f5f9; background: #fff; cursor: pointer; transition: background .12s; }
.gm-row:last-child { border-bottom: 0; }
.gm-row:hover { background: #f8fafc; }
.gm-row.gm-sel { background: #eef2ff; }
.gm-row-dot { width: .5rem; flex: none; display: grid; place-items: center; }
.gm-dot { width: .5rem; height: .5rem; border-radius: 999px; background: var(--brand); display: inline-block; }
.gm-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.gm-row-subj { font-weight: 600; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.gm-row.gm-unread .gm-row-subj { font-weight: 800; color: #0f172a; }
.gm-row-snip { color: #94a3b8; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-row.gm-unread .gm-row-snip { font-weight: 700; color: #475569; }   /* غير المقروء: النصّ أوضح (Bold) */
.gm-row.gm-needs { border-inline-start: 3px solid #f59e0b; }           /* بحاجة لردّ: شريطٌ برتقاليّ */
.gm-needs-tag { display: inline-flex; align-items: center; gap: .15rem; font-size: .6rem; font-weight: 700;
  color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px; padding: .05rem .35rem; white-space: nowrap; }
.gm-search { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.gm-filters { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .5rem; }
.gm-chip { font-size: .7rem; font-weight: 600; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: .2rem .6rem; cursor: pointer; }
.gm-chip.on { background: var(--brand); color: #fff; border-color: transparent; }
.gm-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex: none; }
.gm-row-date { color: #94a3b8; font-size: .68rem; white-space: nowrap; }

.gm-thread-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; padding-bottom: .6rem; border-bottom: 1px solid #f1f5f9; }
.gm-thread-head h3 { min-width: 0; }
.gm-back { display: none; }              /* زرّ الرجوع للجوال فقط */
.gm-msgs { display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.gm-msg { border: 1px solid #eef2f6; border-radius: .7rem; padding: .7rem .9rem; background: #fff; }
.gm-msg-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.gm-msg-from { font-weight: 700; font-size: .82rem; color: #475569; }
.gm-msg-from.gm-me { color: var(--brand-dark); }
.gm-msg-date { font-size: .7rem; color: #94a3b8; }
.gm-msg-body { font-size: .9rem; color: #334155; line-height: 1.8; white-space: pre-line; }
.gm-reply { display: flex; align-items: flex-end; gap: .6rem; margin-top: .8rem; border-top: 1px solid #f1f5f9; padding-top: .8rem; }

/* الجوال: عرضٌ واحد — القائمة، ثم المحادثة كاملةً مع زرّ رجوع (متل Gmail موبايل) */
@media (max-width: 768px) {
  .gm-split { grid-template-columns: 1fr; min-height: 0; }
  .gm-pane-list { max-height: none; border-inline-end: 0; }
  .gm-pane-read { display: none; max-height: none; }
  .gm-split.gm-open .gm-pane-list { display: none; }
  .gm-split.gm-open .gm-pane-read { display: flex; }
  .gm-back { display: inline-flex; }
}

/* ===== صندوق الطلبات + جرس التنبيه ===== */
.req-item { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .7rem .8rem; border: 1px solid #fde68a; background: #fffbeb; border-radius: .7rem; }
.req-item.req-done { border-color: #e2e8f0; background: #f8fafc; }
.bell-badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 1.05rem; height: 1.05rem; padding: 0 .25rem;
  display: grid; place-items: center; border-radius: 999px; background: #e11d48; color: #fff; font-size: .65rem; font-weight: 700; }

/* ===== منتقي التقييم بالنجوم ===== */
.star-btn { border: 0; background: none; cursor: pointer; padding: 0; color: #e2e8f0; }
.star-btn svg { fill: #e2e8f0; stroke: #e2e8f0; }
.star-btn.on { color: #f59e0b; }
.star-btn.on svg { fill: #f59e0b; stroke: #f59e0b; }

/* ===== البحث الشامل ===== */
.search-results { position: absolute; top: calc(100% + .4rem); left: 0; right: 0; z-index: 30; background: #fff;
  border: 1px solid #e9eef3; border-radius: .7rem; box-shadow: 0 8px 24px rgba(15,23,42,.12); overflow: hidden; max-height: 60vh; overflow-y: auto; }

/* ===== شعار العميل ===== */
.client-logo { width: 56px; height: 56px; border-radius: .8rem; overflow: hidden; flex: none; background: #eef2f6; border: 1px solid #e2e8f0; }
.client-logo-sm { width: 2rem; height: 2rem; border-radius: .5rem; overflow: hidden; flex: none; background: #eef2f6; border: 1px solid #e2e8f0; }
.client-logo-img { width: 100%; height: 100%; object-fit: cover; }

/* ===== مسار المبيعات (Pipeline) ===== */
.pipe-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; }
.pipe-col { background: #f6f8fb; border: 1px solid #eef2f6; border-radius: .8rem; padding: .6rem; min-width: 220px; }
.pipe-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.pipe-card { background: #fff; border: 1px solid #e9eef3; border-radius: .7rem; padding: .6rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }

/* ===== التقويم ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: .72rem; font-weight: 700; color: #94a3b8; padding: .3rem 0; }
.cal-cell { min-height: 90px; border: 1px solid #eef2f6; border-radius: .6rem; padding: .35rem; background: #fff; overflow: hidden; }
.cal-empty { background: #fafcfd; border-style: dashed; }
.cal-unavail { background: repeating-linear-gradient(45deg, #fff5f5, #fff5f5 7px, #ffe9e9 7px, #ffe9e9 14px); border-color: #fecdd3; }
.cal-day { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; font-weight: 700; color: #475569; margin-bottom: .25rem; }
.cal-un { font-size: .6rem; font-weight: 700; color: #be123c; }
.cal-ev { display: block; width: 100%; text-align: start; border: 0; cursor: pointer; border-radius: .35rem; padding: .12rem .35rem; margin-bottom: 3px; font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-key { width: .85rem; height: .85rem; border-radius: .25rem; display: inline-block; }
.cal-key-un { background: repeating-linear-gradient(45deg, #fff5f5, #fff5f5 3px, #ffe9e9 3px, #ffe9e9 6px); border: 1px solid #fecdd3; }
@media (max-width: 640px) { .cal-cell { min-height: 64px; } .cal-ev { font-size: .6rem; } }

/* ===== سجلّ النشاط ===== */
.log-list { display: flex; flex-direction: column; }
.log-item { display: flex; gap: .75rem; padding: .7rem .2rem; border-bottom: 1px solid #f1f5f9; }
.log-item:last-child { border-bottom: 0; }
.log-ico { width: 2rem; height: 2rem; border-radius: .6rem; display: grid; place-items: center; flex: none; }
.log-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; font-size: .72rem; color: #94a3b8; }
.log-dot-sep { color: #cbd5e1; }

/* ===== أقسام النماذج ===== */
.form-section { padding-top: 1rem; margin-top: .75rem; border-top: 1px solid #eef2f6; }
.form-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.form-section-title { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 700; color: var(--brand-dark); margin-bottom: .8rem; }
.form-section-title svg { color: var(--brand); }

/* ===== محرّرات الوسائط (رفع) ===== */
.media-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.media-cell { position: relative; width: 70px; height: 90px; border-radius: .5rem; overflow: hidden; background: #eef2f6; border: 1px solid #e2e8f0; }
.media-thumb { width: 100%; height: 100%; object-fit: cover; }
.media-x { position: absolute; top: 2px; inset-inline-end: 2px; width: 1.2rem; height: 1.2rem; display: grid; place-items: center;
  border-radius: 999px; background: rgba(2,6,23,.6); color: #fff; border: 0; cursor: pointer; }
.media-x:hover { background: #e11d48; }
.cover-prev { width: 56px; height: 56px; border-radius: .6rem; overflow: hidden; flex: none; background: #eef2f6; border: 1px solid #e2e8f0; }
.cover-prev-img { width: 100%; height: 100%; object-fit: cover; }

/* ===== تنبيه إلزامي (موافقة القُصّر) ===== */
.warn-banner { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: .9rem;
  background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }

.warn-inline { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem .7rem; border-radius: .6rem;
  background: #fffbeb; border: 1px solid #fde68a; color: #b45309; font-size: .8rem; }

/* ===== بانٍ عرض السعر (Showcase) ===== */
.offer-bar { flex-direction: column; align-items: stretch; gap: .6rem; max-height: 46vh; }
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.offer-list { display: flex; flex-direction: column; gap: .4rem; overflow-y: auto; max-height: 24vh; }
.offer-row { display: flex; align-items: center; gap: .6rem; }
.offer-name { flex: 1; min-width: 0; font-size: .85rem; font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-price { width: 6rem; text-align: center; }
.offer-foot { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; border-top: 1px solid #eef2f6; padding-top: .6rem; }

/* ===== بوابة الموديل ===== */
.portal-shell { min-height: 100vh; background: #f6f8fb; }
.portal-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 1.2rem; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0; }
.portal-main { min-height: calc(100vh - 60px); }

.pt-hero { position: relative; overflow: hidden; }
.pt-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(24px) saturate(1.2); opacity: .9; transform: scale(1.15); }
.pt-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--brand-dark) 92%, transparent), color-mix(in srgb, var(--brand) 78%, transparent)); }
.pt-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.1rem; padding: 1.4rem; flex-wrap: wrap; }
.pt-avatar { width: 84px; height: 84px; border-radius: 1.1rem; overflow: hidden; flex: none; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 6px 20px rgba(0,0,0,.25); background: #eef2f6; }
.pt-avatar-img { width: 100%; height: 100%; object-fit: cover; }

/* ===== ثييم «غير متاح» — يُطبَّق على جذر بوّابة الموديل حين لا يستقبل حجوزات ===== */
/* يُعيد تعريف لون العلامة داخل البوّابة إلى رماديّ (يهدّئ كل النبرة) + ترويسة رماديّة + بانر */
.pt-off { --brand: #64748b; --brand-dark: #475569; --brand-light: #94a3b8; }
.pt-off .pt-hero::after { background: linear-gradient(120deg, #475569, #64748b); }
.pt-off .pt-hero-bg { filter: blur(24px) grayscale(1); opacity: .45; }
.pt-off-banner { display: flex; align-items: center; gap: .6rem; background: #fffbeb; border: 1px solid #fde68a;
  color: #b45309; border-inline-start: 4px solid #f59e0b; border-radius: .8rem; padding: .7rem .9rem; margin-bottom: 1rem; }

.msg-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border-radius: .6rem; background: #f8fafc; }
.msg-row.unread { background: color-mix(in srgb, var(--brand) 8%, white); }
.msg-dot { width: .55rem; height: .55rem; border-radius: 999px; background: var(--brand); flex: none; }
.msg-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .8rem;
  border: 1px solid #eef2f6; border-radius: .7rem; background: #fff; cursor: pointer; transition: all .15s; text-align: start; }
.msg-item:hover { border-color: #cbd5e1; background: #fafcfd; }
.msg-item.unread { border-color: color-mix(in srgb, var(--brand) 30%, white); background: color-mix(in srgb, var(--brand) 6%, white); }

.date-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px;
  background: #fff1f2; color: #be123c; font-size: .8rem; font-weight: 600; border: 1px solid #fecdd3; }
.date-x { display: grid; place-items: center; color: #be123c; border: 0; background: none; cursor: pointer; padding: 0; }
.date-x:hover { color: #881337; }

.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.pk-card { display: flex; align-items: center; gap: .8rem; padding: .7rem; border: 1px solid #e9eef3; border-radius: .9rem; background: #fff; text-decoration: none; transition: all .15s; }
.pk-card:hover { box-shadow: 0 8px 20px rgba(15,23,42,.1); transform: translateY(-2px); }
.pk-img { width: 3.2rem; height: 3.2rem; border-radius: .7rem; object-fit: cover; flex: none; background: #eef2f6; }
.pk-info { min-width: 0; }
.pk-unread { display: inline-block; margin-top: .2rem; font-size: .7rem; font-weight: 700; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 12%, white); padding: .05rem .45rem; border-radius: 999px; }

/* ===== طباعة قائمة العرض ===== */
.print-shortlist { display: none; }
@media print {
  /* ⚠️ كان `body * {visibility:hidden}` يجعل Ctrl+P يطبع **صفحة بيضاء** في كل صفحات النظام.
     الآن: إمّا يوجد عنصر طباعة مخصّص (.printable) فيُطبع وحده، وإلا تُطبع الصفحة نفسها
     بعد إخفاء القشرة (شريط جانبي/علوي/أزرار) فقط. */
  .app-header, .appbar-top, .app-tabs, .app-launcher, .notif-menu, .toast, .toast-wrap, .modal-backdrop,
  .btn, .tabbar, .filter-bar, .fab, .no-print { display: none !important; }
  body { background: #fff !important; }
  main, #view { padding: 0 !important; margin: 0 !important; }
  .card, .panel { box-shadow: none !important; border: 1px solid #e2e8f0 !important; page-break-inside: avoid; }
  /* وضع الطباعة المخصّص: عنصر واحد يُطبع وحده.
     ⚠️ كانت هذه القاعدة تُغطّي `.printable` فقط، بينما الفاتورة وعرض الموديلز يستخدمان
     `.print-shortlist` — فكانت طباعة الفاتورة تُخرج **الفاتورة والتطبيق كلّه خلفها**،
     ومقصوصةً عند صفحة واحدة بسبب `position:absolute; inset:0`. الآن كلاهما تحت نفس الآلية. */
  body:has(.printable) > *:not(.printable),
  body:has(.print-shortlist) > *:not(.print-shortlist) { display: none !important; }
  .printable, .print-shortlist { display: block !important; position: static !important; padding: 1.5rem; }
  body * { visibility: visible; }
  .ps-head h1 { font-size: 1.4rem; font-weight: 700; color: #0f766e; }
  .ps-head p { color: #64748b; font-size: .9rem; margin-bottom: 1rem; }
  .ps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .ps-card { display: flex; gap: .8rem; border: 1px solid #e2e8f0; border-radius: .8rem; padding: .7rem; page-break-inside: avoid; }
  .ps-card img { width: 90px; height: 110px; object-fit: cover; border-radius: .5rem; }
  .ps-name { font-weight: 700; font-size: 1rem; }
  .ps-meta { color: #64748b; font-size: .82rem; }
  .ps-rate { font-size: .82rem; margin-top: .3rem; }
  .ps-skills { font-size: .78rem; color: #0f766e; margin-top: .3rem; }
  .ps-total { margin-top: 1rem; text-align: left; font-weight: 700; color: #0f172a; font-size: 1rem; }
  .ps-foot { margin-top: 1.2rem; text-align: center; color: #94a3b8; font-size: .82rem; }
}

/* ===== مُدرّج الحالات (Stepper) — دورة حياة الإنتاج ===== */
.stepper { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .4rem; padding: .25rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.step-dot { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 999px; font-size: .7rem; flex: none;
  background: #e2e8f0; color: #64748b; border: 1px solid #cbd5e1; }
.step-label { white-space: nowrap; color: #94a3b8; }
.step-done .step-dot { background: #dcfce7; color: #15803d; border-color: #86efac; }
.step-done .step-label { color: #15803d; }
.step-current .step-dot { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, white); }
.step-current .step-label { color: var(--brand-dark); font-weight: 800; }

/* سطر التدقيق (أُنشئ/عُدِّل بواسطة) في ذيل التفاصيل */
.audit-line { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; padding-top: .7rem; margin-top: .3rem; border-top: 1px dashed #e7ecf0; font-size: .74rem; color: #94a3b8; }
.audit-item { display: inline-flex; align-items: center; gap: .3rem; }

/* التحقّق الموحّد: نجمة المطلوب + خطأ سطريّ + حدّ أحمر */
.fld-req { color: #dc2626; font-weight: 800; }
.fld-err { display: block; color: #dc2626; font-size: .74rem; font-weight: 600; margin-top: .25rem; }
.inp-invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important; }

/* مسار التنقّل (Breadcrumb) */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .05rem; font-size: .82rem; margin-bottom: 1.1rem; }
.crumb { display: inline-flex; align-items: center; gap: .3rem; color: var(--brand); text-decoration: none; padding: .18rem .45rem; border-radius: .45rem; white-space: nowrap; transition: background .12s; }
.crumb:hover { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.crumb:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.crumb-cur { color: #475569; font-weight: 700; }
.crumb-mod { color: #94a3b8; }
.crumb-sep { color: #cbd5e1; margin: 0 .05rem; user-select: none; }
.crumb-wrap { display: inline-flex; align-items: center; }

/* ===== بطاقة بند إنتاج + معرض الأعمال ===== */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.work-card { border: 1px solid #e9eef3; border-radius: .8rem; overflow: hidden; background: #fff; cursor: pointer; transition: all .15s; }
.work-card:hover { box-shadow: 0 8px 20px rgba(15,23,42,.1); transform: translateY(-2px); }
.work-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #eef2f6; display: block; }
.work-cap { padding: .45rem .6rem; }
.qc-check { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .85rem; color: #334155; }

/* ===== مُدرّج Workflow بأيقونات ووصلات (بوابة العميل) ===== */
.stepper-wf { gap: 0; align-items: flex-start; overflow: clip; overflow-clip-margin: 10px; }
.stepper-wf .step { flex-direction: column; align-items: center; gap: .35rem; padding: 0 2px; position: relative; flex: 1 1 0; min-width: 52px; text-align: center; }
.stepper-wf .step-dot { width: 2.4rem; height: 2.4rem; z-index: 1; }
.stepper-wf .step-label { white-space: normal; font-size: .68rem; line-height: 1.2; max-width: 5.5rem; }
/* الوصلة تمتدّ نحو الخطوة السابقة (يمين في RTL) فلا تتجاوز حافّة الحاوية */
.stepper-wf .step::before { content: ''; position: absolute; top: 1.2rem; left: 50%; width: 100%; height: 2px; background: #e2e8f0; z-index: 0; }
.stepper-wf .step:first-child::before { display: none; }
.stepper-wf .step-done::before, .stepper-wf .step-current::before { background: #86efac; }

/* ===== قائمة التنبيهات (الجرس) ===== */
.notif-menu { position: absolute; top: calc(100% + .5rem); left: 0; width: 320px; max-width: 88vw; max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid #e9eef3; border-radius: .9rem; box-shadow: 0 16px 40px rgba(15,23,42,.16); z-index: 40; }
.notif-menu[hidden] { display: none; }
.notif-head { padding: .6rem .9rem; font-weight: 700; font-size: .8rem; color: #0f172a; border-bottom: 1px solid #f1f5f9; position: sticky; top: 0; background: #fff; }
.notif-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; text-decoration: none; border-bottom: 1px solid #f6f8fb; transition: background .12s; }
.notif-row:hover { background: #f8fafc; }
.notif-ico { flex: none; display: grid; place-items: center; }
.notif-text { font-size: .82rem; color: #1e293b; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-sub { font-size: .7rem; color: #94a3b8; }

/* ===== شريط الفلاتر النظيف ===== */
.filter-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.filters-adv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem 1rem; padding: 1rem; align-items: end;
  background: #f8fafc; border: 1px solid #eef2f6; border-radius: .9rem; }
.filters-adv[hidden] { display: none; }
.filters-adv .inp { width: 100%; }
.filters-adv .fld { gap: .3rem; }

/* ===== مكتبة الملفات (WorkDrive) ===== */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.folder-card { display: flex; flex-direction: column; padding: .8rem .85rem; border: 1px solid #e9eef3; border-radius: .8rem; background: #fff; cursor: pointer; transition: all .15s; }
.folder-card:hover { background: #f8fafc; box-shadow: 0 6px 16px rgba(15,23,42,.08); transform: translateY(-1px); }
.folder-ico { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .55rem; background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand-dark); flex: none; }
.file-card { border: 1px solid #e9eef3; border-radius: .8rem; background: #fff; overflow: hidden; transition: all .15s; }
.file-card:hover { box-shadow: 0 8px 20px rgba(15,23,42,.1); }
.file-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #f1f5f9; display: block; cursor: pointer; }
.file-ph { aspect-ratio: 4/3; display: grid; place-items: center; background: #f1f5f9; color: #94a3b8; cursor: pointer; }
.file-meta { padding: .5rem .6rem; }
.crumb-link { color: var(--brand-dark); font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0 .2rem; }
.crumb-link:hover { text-decoration: underline; }

/* ===== شريط معاينة الصلاحيات ===== */
.role-banner { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.5rem; background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; font-size: .82rem; font-weight: 600; }

/* ===== عناصر صلاحيات الأدوار ===== */
.perm-item { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: #475569; cursor: pointer; padding: .3rem .35rem; border-radius: .45rem; min-width: 0; }
.perm-item:hover { background: #f8fafc; }
.perm-item input { width: 1rem; height: 1rem; accent-color: var(--brand); flex: none; }
.perm-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== قوالب العقود (الامتثال) ===== */
.tmpl-body { white-space: pre-wrap; font-family: inherit; font-size: .8rem; line-height: 1.7; color: #475569; background: #fff; border: 1px solid #eef2f6; border-radius: .5rem; padding: .75rem; margin-top: .5rem; }

/* ===== تقويم المحتوى + معرض الأعمال ===== */
.cal-add { width: 1.15rem; height: 1.15rem; line-height: 1; border: 0; background: #f1f5f9; color: #64748b; border-radius: .3rem; cursor: pointer; font-size: .95rem; font-weight: 700; display: grid; place-items: center; }
/* الأجهزة اللمسيّة: كبّر هدف «إضافة منشور» ليكون قابلاً للنقر بالإصبع */
@media (pointer: coarse) { .cal-add { width: 1.9rem; height: 1.9rem; border-radius: .45rem; } }
.cal-add:hover { background: var(--brand); color: #fff; }
.port-cell { display: flex; flex-direction: column; }
.btn-active { background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }

/* ===== سجلّ المخاطر ===== */
.risk-matrix { display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 5px; }
.rm-corner { font-size: .6rem; font-weight: 700; color: #94a3b8; display: grid; place-items: center; text-align: center; padding: .2rem; }
.rm-head { font-size: .72rem; color: #64748b; display: grid; place-items: center; text-align: center; padding: .2rem; }
.rm-row-head { min-width: 2.2rem; }
.rm-cell { border: 0; border-radius: .45rem; aspect-ratio: 1/1; min-height: 42px; cursor: default; display: grid; place-items: center; font-weight: 800; font-size: .95rem; transition: transform .12s; }
.rm-cell:hover { transform: scale(1.05); }
.rm-count { font-size: 1.05rem; }
.rm-score { opacity: .35; font-size: .8rem; font-weight: 600; }
.risk-row { display: flex; align-items: flex-start; gap: .6rem; background: #f8fafc; border: 1px solid transparent; border-radius: .6rem; padding: .6rem .7rem; transition: background .15s, border-color .15s; }
.risk-row-hl { background: #fffbeb; border-color: #fcd34d; }
.risk-score-chip { min-width: 2rem; height: 2rem; border-radius: .5rem; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.risk-evidence { display: flex; align-items: flex-start; gap: .3rem; font-size: .72rem; color: #0f766e; background: #f0fdfa; border-radius: .4rem; padding: .25rem .45rem; margin-top: .35rem; line-height: 1.6; }

/* ===== مكتبة القوالب ===== */
.tmpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.tmpl-card { border: 1px solid #eef2f6; border-radius: .7rem; padding: .8rem; background: #fff; transition: box-shadow .15s, border-color .15s; }
.tmpl-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.tab-count { font-size: .65rem; font-weight: 700; background: #f1f5f9; color: #64748b; border-radius: 999px; padding: .05rem .35rem; min-width: 1.1rem; text-align: center; }
.tab.active .tab-count { background: var(--brand); color: #fff; }

/* ===== طبقة الذكاء الاصطناعي ===== */
.btn-ai { background: linear-gradient(135deg, #eef2ff, #f5f3ff); color: #4338ca; border-color: #e0e7ff; }
.btn-ai:hover { background: linear-gradient(135deg, #e0e7ff, #ede9fe); border-color: #c7d2fe; }
.ai-out { font-family: inherit; line-height: 1.9; white-space: pre-wrap; }
.ai-review { display: flex; align-items: flex-start; gap: .5rem; font-size: .75rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: .5rem; padding: .5rem .65rem; line-height: 1.7; }
.ai-status { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: #64748b; min-height: 1.5rem; }
.toast-undo { flex: none; background: #0f172a; border: 0; color: #fff; font-size: .75rem; font-weight: 700; border-radius: .5rem; padding: .3rem .7rem; cursor: pointer; }
.toast-undo:hover { background: #1e293b; }

/* ===== الجرس الجديد: مجمَّع بالفئة + أزرار إجراء ===== */
.notif-menu { width: 400px; }
.notif-group { display: flex; align-items: center; justify-content: space-between; padding: .45rem .75rem .25rem; font-size: .68rem; font-weight: 800; color: #94a3b8; letter-spacing: .02em; background: #f8fafc; border-top: 1px solid #eef2f6; }
.notif-group-n { background: #e2e8f0; color: #475569; border-radius: 999px; padding: 0 .35rem; font-size: .62rem; }
.notif-row { position: relative; display: flex; align-items: center; gap: .55rem; padding: .5rem .75rem; }
.notif-row:hover { background: #f8fafc; }
.notif-new::before { content: ''; position: absolute; inset-inline-start: 0; top: .55rem; bottom: .55rem; width: 3px; background: var(--brand); border-radius: 0 3px 3px 0; }
.notif-acts { display: flex; align-items: center; gap: .15rem; opacity: 0; transition: opacity .12s; shrink: 0; }
.notif-row:hover .notif-acts { opacity: 1; }
.notif-act { font-size: .65rem; font-weight: 700; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: .35rem; padding: .12rem .3rem; cursor: pointer; white-space: nowrap; }
.notif-act:hover { background: #e2e8f0; color: #0f172a; }
.notif-act-wa { color: #128c7e; background: #dcfce7; border-color: #bbf7d0; display: grid; place-items: center; padding: .18rem; }
.notif-act-wa:hover { background: #bbf7d0; }
.notif-clear { font-size: .65rem; font-weight: 700; color: var(--brand); background: none; border: 0; cursor: pointer; }
.notif-clear:hover { text-decoration: underline; }
.bell-badge-new { animation: pulseBadge 1.6s ease-in-out infinite; }
@keyframes pulseBadge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* مفتاح تشغيل/إيقاف (switch) — تحكّم أنواع تنبيهات الجرس */
.sw { position: relative; width: 2.4rem; height: 1.35rem; border-radius: 999px; background: #cbd5e1; border: 0; cursor: pointer; padding: 0; transition: background .18s ease; flex: none; }
.sw-on { background: var(--brand); }
.sw-dot { position: absolute; top: 2px; right: 2px; width: 1.05rem; height: 1.05rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s ease; }
.sw-on .sw-dot { transform: translateX(-1.05rem); }
.sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.notif-lock { display: inline-flex; align-items: center; gap: .25rem; font-size: .62rem; font-weight: 800; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: .1rem .45rem; white-space: nowrap; }

/* ===== ربحية العملاء ===== */
.prof-row { display: flex; align-items: center; gap: .75rem; background: #f8fafc; border-inline-start: 3px solid var(--pt, #94a3b8); border-radius: .6rem; padding: .6rem .75rem; }
.prof-row:hover { background: #f1f5f9; }

/* ===== عروض الأسعار ===== */
.prop-row { display: flex; align-items: center; gap: .75rem; background: #f8fafc; border-radius: .6rem; padding: .65rem .75rem; }
.prop-row:hover { background: #f1f5f9; }
.accept-step { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: #334155; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: .5rem; padding: .5rem .65rem; }
.accept-step svg { color: #16a34a; flex: none; }

/* ===== التقارير ===== */
.rep-metrics, .rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; }
.rep-metrics > div, .rep-kpis > div { text-align: center; background: #f8fafc; border-radius: .5rem; padding: .5rem; }
.rep-metrics b, .rep-kpis b { display: block; font-size: 1.15rem; color: #0f172a; }
.rep-metrics span, .rep-kpis span { font-size: .68rem; color: #94a3b8; }
.rep-body { margin-top: 1rem; line-height: 1.9; color: #334155; font-size: .9rem; }

/* ===== المرحلة 21: سحب وإفلات · لوحة أوامر · رسوم · جوال ===== */

/* --- السحب والإفلات (Sortable) --- */
.pipe-drop { min-height: 3.5rem; border-radius: .75rem; transition: background .15s, box-shadow .15s; }
.pipe-drop.is-sortable .pipe-card { cursor: grab; }
.pipe-drop.is-sortable .pipe-card:active { cursor: grabbing; }
.drag-ghost { opacity: .35; background: #ecfeff !important; border-style: dashed !important; }
.drag-chosen { box-shadow: 0 8px 24px rgba(15,23,42,.16); }
.drag-active { transform: rotate(1.5deg); }
.pipe-col.drop-hot { background: #f0fdfa; }

/* --- لوحة الأوامر (Ctrl+K) --- */
.cmdk-trigger { display: inline-flex; align-items: center; gap: .45rem; height: 2.25rem; padding: 0 .6rem;
  border: 1px solid #e2e8f0; border-radius: .6rem; background: #f8fafc; color: #64748b; font-size: .8rem; }
.cmdk-trigger:hover { background: #f1f5f9; color: #334155; }
.cmdk-trigger-text { display: none; }
.cmdk-kbd { display: none; font-size: .65rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .35rem; padding: .05rem .3rem; color: #94a3b8; }
@media (min-width: 768px) { .cmdk-trigger-text, .cmdk-kbd { display: inline; } .cmdk-trigger { width: 15rem; justify-content: flex-start; } .cmdk-kbd { margin-inline-start: auto; } }
.cmdk-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15,23,42,.4); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 1rem 1rem; }
.cmdk-box { width: 100%; max-width: 40rem; background: #fff; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15,23,42,.28); display: flex; flex-direction: column; max-height: 70vh; animation: pop .16s ease; }
.cmdk-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid #eef2f6; }
.cmdk-input { flex: 1; border: 0; outline: none; font-size: 1rem; font-family: inherit; background: transparent; color: #0f172a; }
.cmdk-list { overflow-y: auto; padding: .35rem; }
.cmdk-row { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 0; background: none;
  border-radius: .6rem; text-align: start; cursor: pointer; font-family: inherit; }
.cmdk-row.is-on { background: #f1f5f9; }
.cmdk-ico { color: #94a3b8; display: grid; place-items: center; flex: none; }
.cmdk-label { font-size: .88rem; color: #0f172a; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-sub { font-size: .72rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.cmdk-kind { margin-inline-start: auto; font-size: .65rem; color: #94a3b8; background: #f8fafc; border: 1px solid #eef2f6;
  border-radius: 999px; padding: .1rem .45rem; flex: none; }
.cmdk-empty { padding: 1.5rem; text-align: center; color: #94a3b8; font-size: .85rem; }
.cmdk-hint { display: flex; gap: 1rem; padding: .5rem 1rem; border-top: 1px solid #eef2f6; font-size: .7rem; color: #94a3b8; }

/* --- الرسوم البيانية --- */
.chart-wrap { position: relative; width: 100%; }

/* ===== الجوال: النظام كان بـ3 استعلامات وسائط فقط ===== */
/* أنت في الميدان تزور المطاعم — الجوال ليس ترفاً. */
@media (max-width: 640px) {
  .modal-box { max-height: 92vh; width: 100%; border-radius: 1rem 1rem 0 0; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-foot { position: sticky; bottom: 0; background: #fff; }
  .modal-foot .btn { flex: 1; justify-content: center; }

  /* الجداول: بطاقات بدل تمرير أفقي أعمى — كل خلية تحمل عنوان عمودها */
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr { border: 1px solid #e2e8f0; border-radius: .75rem; margin-bottom: .6rem; padding: .35rem .1rem; background: #fff; }
  .tbl-cards td { border: 0; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .4rem .75rem; }
  .tbl-cards td::before { content: attr(data-label); font-size: .7rem; color: #94a3b8; font-weight: 600; flex: none; }
  .tbl-cards td:only-child::before { display: none; }

  .pipe-grid { grid-auto-flow: row; grid-template-columns: 1fr; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; justify-content: center; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .inp { width: 100% !important; }
  .stepper { overflow-x: auto; }
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* --- مجموعة تنقّل قابلة للطيّ (الإعدادات وحدها كانت 9 عناصر = 30% من الشريط) --- */
.nav-group-btn { display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; background: none; cursor: pointer; font-family: inherit; }
.nav-chev { width: 1rem; height: 1rem; transition: transform .18s; transform: rotate(-90deg); }
.nav-group.is-collapsed .nav-chev { transform: rotate(0deg); }
.nav-group.is-collapsed .nav-group-body { display: none; }

/* حقل رقميّ برقم مرفوض — كان النظام يقبل راتباً سالباً بلا اعتراض */
.inp-err { border-color: #f43f5e !important; background: #fff1f2; }

/* دوّار انتظار الرفع — كان الرفع بلا أي إشارة، فيضغط المستخدم مرّتين */
.spin { width: 1rem; height: 1rem; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* T-1.1 — بانر فقدان البيانات: ثابت لا يزول (رسالة عابرة كانت تُفوَّت والعمل يضيع) */
.persist-banner { display:flex; align-items:center; gap:.75rem; background:#fef2f2; border-bottom:2px solid #fecaca; color:#991b1b; padding:.65rem 1.25rem; }
