/* فريق التصميم البصري (أ): لوحة القيادة، الفريق، التقارير، الإعدادات
   لا رموز جديدة ولا ألوان جديدة: كل القيم من app.css. الأحمر للمتأخر عندنا فقط، وانتظار الجهة محايد. */

/* ─────────── أدوات مشتركة ─────────── */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cu { display: inline-block; font-variant-numeric: tabular-nums; }
.org-none { display: inline-block; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); }

/* شارة موعد/حالة صغيرة: محايدة افتراضيًا، والأحمر للمتأخر عندنا وحده */
.dchip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.dchip .i { width: 13px; height: 13px; }
.dchip.late { background: var(--danger-soft); color: var(--danger-ink); box-shadow: inset 0 0 0 1px var(--danger-line); }
.dchip.soon { background: var(--warn-soft); color: var(--warn-ink); box-shadow: inset 0 0 0 1px var(--warn-line); }
.dchip.wait { background: var(--slate-bg); color: var(--slate-ink); box-shadow: inset 0 0 0 1px var(--slate-line); }
.dchip .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dchip.kind.review .dot { background: var(--violet-dot); }
.dchip.kind.external .dot { background: var(--teal-dot); }

/* قائمة WhatsApp: details أصلي، بلا لون جديد */
.wa { position: relative; }
.wa > summary { list-style: none; cursor: pointer; user-select: none; }
.wa > summary::-webkit-details-marker { display: none; }
.wa[open] > summary { background: var(--surface-2); border-color: var(--line-3); }
.wa-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); animation: v-pop .16s var(--ease); }
.wa-pop-h { font-size: var(--fs-xs); color: var(--ink-3); padding: 4px 10px 6px; }
.wa-pop button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; text-align: start; line-height: 1.45; }
.wa-pop button:hover, .wa-pop button:focus-visible { background: var(--surface-2); }
.wa-pop button b { font-weight: 500; font-size: var(--fs-ui); }
.wa-pop button span { font-size: var(--fs-xs); color: var(--ink-3); }
.wa-pop-f { display: block; border-top: 1px solid var(--line); margin-top: 4px; padding: 8px 10px 4px; font-size: var(--fs-xs); }
@keyframes v-pop { from { opacity: 0; transform: translateY(-4px); } }

/* ─────────── لوحة القيادة ─────────── */
.dash { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }

/* «لك اليوم»: الإطار الهادئ نفسه الذي كانت فيه الحلقة، صار يحمل ما يخصك */
.dk-hero { display: block; padding: 16px 20px 18px; }
.dk-hello { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-3); }
.dk-hello .avatar { box-shadow: none; }
.dk-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 28px; margin-top: 8px; }
.dk-cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dk-col-h { display: flex; align-items: center; gap: 8px; min-height: 34px; margin-bottom: 6px; }
.dk-col-h h2 { font-size: 18px; font-weight: 600; line-height: 1.4; }
.dk-col-h .btn.link { margin-inline-start: auto; }
.dk-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 600; background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hero-line); font-variant-numeric: tabular-nums; }
.dk-n:empty { display: none; }

.tlist { display: flex; flex-direction: column; gap: 6px; }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--hero-line); border-radius: var(--r); cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .15s var(--ease); }
.trow:hover { border-color: var(--accent-line); box-shadow: var(--sh-2); }
.trow:active { transform: translateY(1px); }
.trow-main { min-width: 0; display: flex; flex-direction: column; }
.trow-main b { font-weight: 500; font-size: 14.5px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-main small { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-end { display: flex; align-items: center; gap: 8px; color: var(--ink-4); }
.trow:hover .trow-end > .i { color: var(--ink-2); }
.tempty { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px dashed var(--hero-line); border-radius: var(--r); color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.6; }
.tempty .i { color: var(--ok); flex: none; }
.card .tempty { border-color: var(--line); }
.card .tempty .i { color: var(--ink-4); }

.dk-anon { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.dk-anon-t { flex: 1; min-width: 0; }
.dk-prompt { margin: 2px 0 0; font-size: 17px; font-weight: 600; line-height: 1.6; }

/* جملة الفريق + المؤشرات الأربعة */
.dk-team { display: flex; flex-direction: column; gap: 12px; }
.dk-head { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.dk-sentence { margin: 0; flex: 1; min-width: 240px; font-size: 16px; font-weight: 500; line-height: 1.6; color: var(--ink); }
.dk-head-end { margin-inline-start: auto; }
.dk-kpi { padding-bottom: 22px; overflow: hidden; }
.dk-kpi .kpi-val { font-size: 30px; }
.kpi.calm .kpi-ic, .kpi.alert:not(.has) .kpi-ic { background: var(--surface-3); color: var(--ink-2); }
/* مقياس رفيع: نصيب المؤشر من الأعمال المفتوحة (أو المفتوحة من الكل) */
.kpi-meter { position: absolute; inset-inline: 16px; bottom: 11px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.kpi-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ink-4); transition: width .8s var(--ease); }
.kpi.info .kpi-meter i { background: var(--accent); }
.kpi.alert.has .kpi-meter i { background: var(--danger); }

.dk-grid { align-items: start; }
.li.dd { gap: 12px; }
.date-box.waiting .m { background: var(--slate-bg); color: var(--slate-ink); }

/* حمل الفريق: أشرطة أسمك على مسار هادئ، تنمو بانتقال ناعم */
.dl-legend { margin-bottom: 12px; }
.dl-row { grid-template-columns: 132px minmax(0, 1fr) 56px; gap: 12px; padding: 8px; }
.dl-row .lbl .avatar { box-shadow: none; }
.dl-row.empty .lbl { color: var(--ink-3); }
.dl-track { height: 14px; gap: 0; background: var(--surface-2); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.dl-track .bar-seg { width: 0; min-width: 0; height: 100%; border-radius: 3px; transition: width .7s var(--ease), opacity .15s; }
.dl-track .bar-seg.on { margin-inline-end: 2px; }
.dl-late[hidden] { display: none; }

/* المخاطر الثلاث: لكل واحدة إجراء */
.risk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: background .12s; }
.risk:last-child { border-bottom: 0; }
.risk:hover { background: var(--surface-2); }
.risk-ic { width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center; }
.risk-ic.high { background: var(--danger-soft); color: var(--danger-ink); }
.risk-ic.mid { background: var(--warn-soft); color: var(--warn-ink); }
.risk-main { min-width: 0; display: flex; flex-direction: column; }
.risk-main b { font-weight: 500; font-size: var(--fs-ui); line-height: 1.5; }
.risk-main small { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk-act { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500; white-space: nowrap; color: var(--accent-ink); background: var(--accent-soft); transition: background .12s; }
.risk:hover .risk-act { background: var(--accent-line); }

@media (max-width: 900px) {
  .dk-cols.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .dash { gap: 16px; }
  .dk-hero { padding: 14px 14px 14px; }
  .dk-col-h h2 { font-size: 17px; }
  .trow { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "org main" "org end"; row-gap: 6px; padding: 10px 12px; }
  .trow > .org-badge { grid-area: org; align-self: start; margin-top: 2px; }
  .trow-main { grid-area: main; }
  .trow-main b { white-space: normal; }
  .trow-end { grid-area: end; }
  .trow-end > .i { display: none; }
  .dk-sentence { font-size: 15px; min-width: 0; flex-basis: 100%; }
  .dk-head-end { margin-inline-start: 0; }
  .dk-kpi .kpi-val { font-size: 26px; }
  .kpi-meter { inset-inline: 12px; bottom: 9px; }
  .dl-row { grid-template-columns: 104px minmax(0, 1fr) 48px; }
  .li.dd > .org-badge, .li.dd .side .avatar { display: none; }
  .risk { grid-template-columns: auto minmax(0, 1fr); }
  .risk-act { grid-column: 2; justify-self: start; }
}

/* ─────────── التقارير ─────────── */
/* من أرسل: مقياس من خمس خانات + العدد + زر التذكير في سطر واحد */
.rp-who { padding: 16px 20px; }
.rp-who-h { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rp-who-t { display: flex; flex-direction: column; min-width: 0; margin-inline-end: auto; }
.rp-who-t b { font-size: 16px; line-height: 1.5; }
.rp-who-t .muted { font-size: var(--fs-sm); }
.rp-meter { display: flex; gap: 3px; }
.rp-meter i { width: 26px; height: 8px; border-radius: 3px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); transition: background .3s; }
.rp-meter i.on { background: var(--ok); box-shadow: none; }
.rp-count { font-size: 22px; font-weight: 600; line-height: 1; }
.rp-count small { font-size: var(--fs-ui); font-weight: 500; color: var(--ink-3); }
.rp-all { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ok-ink); }
.rp-who .rep-who { height: 40px; padding-inline: 8px 14px; gap: 8px; transition: border-color .15s, background .15s, color .15s; }
.rp-who .rep-who .avatar { width: 26px; height: 26px; box-shadow: none; }
.rp-wait { font-size: var(--fs-xs); color: var(--ink-3); }

/* بطاقة التقرير الأسبوعي: هوية أوضح، وكل عمل بشريط نسبته */
.rp-card { display: flex; flex-direction: column; padding: 16px 20px; }
.rp-card .rep-h { flex-wrap: nowrap; gap: 10px; }
.rp-card .rep-h .avatar { box-shadow: none; }
.rp-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.rp-id b { font-size: 15px; }
.rp-id .muted { font-size: var(--fs-xs); }
.rp-card .rep-sum { font-size: 14.5px; }
.rp-card .rep-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) 64px 38px; align-items: center; gap: 4px 8px; padding: 8px 10px; }
.rp-card .rep-items li > .org-badge { grid-column: 1; }
.rp-card .rep-task { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.rp-card .rep-items li:not(:has(> .org-badge)) .rep-task { grid-column: 1 / 3; }
.rp-prog { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rp-prog i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.rp-card .rep-items li > b.num { font-size: var(--fs-xs); text-align: end; color: var(--ink-2); }
.rp-card .rep-items li > .rp-note { grid-column: 1 / -1; color: var(--ink-2); flex-basis: auto; line-height: 1.6; }
.rp-card .rep-meta { gap: 6px; margin-top: 12px; }
.rp-block, .rp-next { display: flex; align-items: flex-start; gap: 6px; line-height: 1.6; }
.rp-block { padding: 6px 10px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn-ink); }
.rp-block .i, .rp-next .i { margin-top: 4px; flex: none; }
.rp-next { color: var(--ink-2); }

/* التقرير الشهري: الخلاصة التنفيذية */
.exec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 18px 0 8px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ex { background: var(--surface); padding: 14px 16px 12px; min-width: 0; }
.ex-l { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; }
.ex-v { font-size: 30px; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ex-v small { font-size: 15px; font-weight: 500; color: var(--ink-3); margin-inline-start: 2px; }
.ex-d { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--ink-2); }
.ex-d .i { color: var(--ink-3); }
.exec-note { margin-bottom: 4px; }
.mr-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); font-size: 13.5px; }
.mr-q { display: inline-flex; align-items: center; gap: 6px; }
.mr-q .avatar { box-shadow: none; }
.mr-q small { color: var(--ink-3); font-size: var(--fs-xs); }

@media (max-width: 900px) { .exec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .rp-who { padding: 14px; }
  .rp-who-t { flex-basis: 100%; }
  .rp-meter i { width: 20px; }
  .rp-card .rep-items li { grid-template-columns: auto minmax(0, 1fr) 48px 34px; }
  .ex-v { font-size: 24px; }
}

/* ─────────── الفريق ─────────── */
.tm { overflow: visible; }
.tm-h, .tm-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(220px, 1.6fr) 104px minmax(110px, .8fr) minmax(170px, 1.2fr) 20px; align-items: center; gap: 16px; padding: 0 20px; }
.tm-h { min-height: 44px; background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-3); }
.tm-h-load { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-h-load .legend { font-weight: 400; font-size: var(--fs-xs); gap: 4px 12px; }
.tm-row { min-height: 76px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.tm-row:last-child { border-bottom: 0; }
.tm-row:hover { background: var(--surface-2); }
.tm-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-who > div { min-width: 0; }
.tm-who .avatar { box-shadow: none; }
.tm-who .nm { font-weight: 500; font-size: 14.5px; line-height: 1.45; }
.tm-who .rl { font-size: var(--fs-sm); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-load { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.tm-load b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.tm-load b small { font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.tm-load b.zero { color: var(--ink-3); font-weight: 400; }
.tm-orgs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tm-more { font-size: var(--fs-xs); color: var(--ink-3); }
.tm-note .input { height: 34px; font-size: 13.5px; width: 100%; }
.tm-note .input:not(:focus):not(:hover) { border-color: var(--line); }
.tm-go { color: var(--ink-4); display: grid; place-items: center; }
.tm-row:hover .tm-go { color: var(--ink-2); }
.tm-profile .avatar { box-shadow: none; }
.tm-title { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; }
.tm-title > .org-badge { grid-row: span 3; align-self: start; margin-top: 2px; }
.tm-title > :not(.org-badge) { grid-column: 2; justify-self: start; }

@media (max-width: 1240px) {
  .tm-h { display: none; }
  .tm-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto 20px; grid-template-areas: "who load late go" "orgs note note note"; row-gap: 10px; padding: 14px 20px; }
  .tm-who { grid-area: who; } .tm-load { grid-area: load; } .tm-late { grid-area: late; } .tm-go { grid-area: go; } .tm-orgs { grid-area: orgs; } .tm-note { grid-area: note; }
}
@media (max-width: 600px) {
  .tm-row { grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: "who late go" "load load load" "orgs orgs orgs" "note note note"; padding: 14px 16px; }
  .tm-orgs:has(> .muted:only-child) { display: none; }
  .tm-late:has(> .muted) { visibility: hidden; }
}

/* ─────────── الإعدادات ─────────── */
.set-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.set-top .modules { margin-bottom: 0; }
.wa-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.wa-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.wa-field .input { text-align: left; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .set-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .wa-fields { grid-template-columns: minmax(0, 1fr); } }

/* ─────────── الطباعة (التقرير الشهري) ─────────── */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body { background: #fff !important; } /* color-ok: ورق الطباعة */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wa, .rep-edit { display: none !important; }
  .exec, .mr-member, .mr-quiet, .mr-tbl tr { break-inside: avoid; }
  .mr-h { break-after: avoid; }
  .exec { margin-top: 12px; }
  .ex-v { font-size: 24px; }
  .month-report a, .rep-task { color: inherit; text-decoration: none; }
}


/* ─────────── حمل موزون + سقف مرن (3 قيد التنفيذ): ملاحظة كهرمانية هادئة لا إنذار ─────────── */
.dl-wip, .tm-wip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--amber-ink); line-height: 1.5; }
.dl-wip { grid-column: 2 / -1; margin-top: -6px; }
.dl-wip[hidden] { display: none; }
.tm-wip { grid-column: 1 / -1; }
.dl-wip::before, .tm-wip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber-dot); flex: none; }
.wip-over .dl-track { box-shadow: inset 0 0 0 1px var(--amber-line); }

/* ─────────── التقرير الشهري: كيف جرى العمل + الجهة × نوع الخدمة ─────────── */
.mr-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.mr-flow .fl { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.mr-flow .fl-v { font-size: 20px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.mr-flow .fl-v small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-inline-start: 2px; }
.mr-flow .fl-l { font-size: var(--fs-xs); color: var(--ink-3); }
.mr-matrix td.num, .mr-matrix th:nth-child(n+3) { text-align: center; font-variant-numeric: tabular-nums; }
.mx-org { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .mr-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  .mr-flow, .mr-matrix tr { break-inside: avoid; }
  .mr-flow .fl { background: none; }
}

/* ─────────── ترحيب العضو الجديد: بطاقة هادئة مرة واحدة، فيها ثلاث عادات وزر «ابدأ» ─────────── */
.welcome-slot { max-width: 1440px; width: 100%; margin: 0 auto; padding: 8px 32px 0; }
.welcome-slot:empty { display: none; }
.welcome { position: relative; margin-bottom: 12px; padding: 20px 20px 16px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-lg); box-shadow: var(--sh-1); animation: v-welcome .32s var(--ease) both; }
.welcome-h { display: flex; align-items: center; gap: 12px; padding-inline-end: 40px; }
.welcome-h .avatar { box-shadow: none; }
.welcome-t { min-width: 0; }
.welcome-t h2 { font-size: 18px; font-weight: 600; line-height: 1.45; }
.welcome-t p { margin: 0; font-size: var(--fs-ui); color: var(--ink-2); line-height: 1.6; }
.welcome-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.welcome-habits { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.welcome-habits li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.welcome-ic { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); }
.welcome-habits li > div { min-width: 0; }
.welcome-habits b { display: block; font-weight: 600; font-size: var(--fs-ui); line-height: 1.55; }
.welcome-habits li > div > span { display: block; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.6; }
.welcome-f { display: flex; justify-content: flex-end; margin-top: 14px; }
.welcome-f .btn { min-width: 120px; }
@keyframes v-welcome { from { opacity: 0; transform: translateY(-6px); } }
.dk-hero:focus-visible { border-radius: var(--r-lg); }
@media (max-width: 900px) {
  .welcome-slot { padding: 8px 16px 0; }
  .welcome-habits { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  .welcome-slot { padding: 8px 12px 0; }
  .welcome { padding: 16px 16px 14px; }
  .welcome-t h2 { font-size: 17px; }
  .welcome-habits li { padding: 10px 12px; }
  .welcome-f .btn { width: 100%; height: 44px; }
}

/* ─────────── صفحة العضو: جدول أعماله يصير بطاقات على الهاتف (كان يُقصّ ويتمرّر أفقيًا) ─────────── */
.mt-tbl td.mt-prog { min-width: 130px; }
@media (max-width: 640px) {
  .mt-tbl thead { display: none; }
  .mt-tbl, .mt-tbl tbody { display: block; width: 100%; }
  .mt-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "due status" "prog prog"; gap: 8px 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .mt-tbl tr:last-child { border-bottom: 0; }
  .mt-tbl td { display: block; padding: 0 !important; border: 0 !important; min-width: 0 !important; }
  .mt-tbl td:nth-child(1) { grid-area: title; }
  .mt-tbl td:nth-child(2) { grid-area: due; }
  .mt-tbl td:nth-child(3) { grid-area: status; justify-self: end; }
  .mt-tbl td:nth-child(4) { grid-area: prog; }
}

/* ─────────── الإعدادات › الفريق: كل عضو بطاقة على الهاتف (كانت الحقول مقصوصة) ─────────── */
.mem-tbl .m-role { min-width: 240px; }
@media (max-width: 640px) {
  .mem-tbl thead { display: none; }
  .mem-tbl, .mem-tbl tbody { display: block; width: 100%; }
  .mem-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who active" "person person" "role role" "join join" "acts acts"; gap: 10px 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
  .mem-tbl tr:last-child { border-bottom: 0; }
  .mem-tbl td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
  .mem-tbl td:nth-child(1) { grid-area: who; }
  .mem-tbl td:nth-child(2) { grid-area: person; }
  .mem-tbl td:nth-child(3) { grid-area: role; }
  .mem-tbl td:nth-child(4) { grid-area: join; }
  .mem-tbl td:nth-child(5) { grid-area: active; }
  .mem-tbl td:nth-child(6) { grid-area: acts; }
  .mem-tbl td[data-l] { display: flex; align-items: center; gap: 10px; }
  .mem-tbl td[data-l]::before { content: attr(data-l); flex: none; font-size: var(--fs-sm); color: var(--ink-3); }
  .mem-tbl .input { width: 100%; min-width: 0; height: 40px; font-size: 16px; }
  .mem-tbl .m-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; white-space: normal; }
}

@media print { .welcome-slot { display: none !important; } }
