/* ---------- 1.0.3: الطلبات والقوائم والإعفاءات ---------- */
.nbadge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  margin-inline-start: 6px;
  display: inline-block;
  position: relative;
}
.bnav .tab .nbadge {
  position: absolute;
  top: 2px;
  inset-inline-start: calc(50% + 6px);
  margin: 0;
}
.bnav .tab {
  position: relative;
}
.nbadge.inline {
  margin-inline-start: 6px;
}
.seg button .nbadge {
  background: var(--bad);
}
.lists-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 900px) {
  .lists-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.opt-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.opt-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.opt-list li:first-child {
  border-top: 0;
}
.opt-list li.off {
  opacity: 0.55;
}
.opt-list .icon-btn.sm {
  width: 32px;
  height: 32px;
}
.opt-list .icon-btn[data-mv$='up'] .ic {
  transform: rotate(-90deg);
}
.opt-list .icon-btn[data-mv$='down'] .ic {
  transform: rotate(-90deg);
}
button.notice {
  border: 1px solid rgba(251, 191, 36, 0.3);
  margin-bottom: 12px;
}

/* ---------- 1.0.5: الورديات والجدول ---------- */
.sdot.sm {
  width: 10px;
  height: 34px;
  border-radius: 5px;
  flex-shrink: 0;
}
.cycles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.cyc {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  white-space: nowrap;
}
.cyc.off {
  --c: var(--faint);
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}
.swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sw {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-2);
}
.sw.on {
  border-color: var(--text);
  transform: scale(1.1);
}
.seg {
  flex-wrap: wrap;
}
.legend-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg i {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.lg i.ovd {
  background: transparent;
  border: 2px dashed var(--brand);
}
.table-wrap.roster {
  max-height: 68dvh;
  overflow: auto;
}
.roster table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.roster th,
.roster td {
  padding: 6px 4px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.roster th.stick,
.roster td.stick {
  position: sticky;
  inset-inline-start: 0;
  z-index: 2;
  background: var(--surface-solid);
  text-align: start;
  white-space: nowrap;
  min-width: 150px;
  padding-inline: 10px;
  border-inline-end: 1px solid var(--line);
}
.roster thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-solid);
}
.roster thead th.stick {
  z-index: 4;
}
.roster .dc {
  min-width: 42px;
}
.roster .dc small {
  display: block;
  font-size: 10px;
  color: var(--faint);
  font-weight: 400;
}
.roster .dc.wk {
  background: color-mix(in srgb, var(--faint) 8%, transparent);
}
.roster .dc.hol {
  background: color-mix(in srgb, var(--info) 14%, transparent);
}
.roster th.today {
  color: var(--brand);
}
.rc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 5px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--c) 24%, transparent);
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  cursor: pointer;
  white-space: nowrap;
}
.rc.off {
  --c: var(--faint);
  background: transparent;
  color: var(--faint);
  border-color: transparent;
}
.rc.none {
  background: none;
  border: 0;
  color: var(--line-2);
  font-weight: 400;
}
.rc.ov {
  box-shadow:
    0 0 0 2px var(--surface-solid),
    0 0 0 3.5px var(--brand);
}
.roster td[data-c] {
  cursor: pointer;
}
.roster td[data-c]:hover {
  background: var(--surface-2);
}

/* ---------- 1.0.6: التحليلات ---------- */
.dtabs {
  display: flex;
  justify-content: center;
  margin: 2px 0 14px;
}
.dtabs .seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.kpis8 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.kpis8 .kpi b {
  font-size: 26px;
}
.kpi .u {
  font-size: 13px;
  font-weight: 500;
  margin-inline-start: 3px;
  color: var(--muted);
}
.dl {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  position: relative;
}
.dl.good {
  background: rgba(52, 211, 153, 0.14);
  color: var(--ok);
}
.dl.bad {
  background: rgba(251, 113, 133, 0.14);
  color: var(--bad);
}
.dl.flat {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
}
.an-grid {
  display: grid;
  gap: 14px;
}
.an-grid > .card {
  margin: 0;
  min-width: 0;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart .ct {
  font: 400 10px var(--font);
  fill: var(--faint);
}
.chart .ct.sm {
  font-size: 9px;
}
.chart .cv {
  font: 600 11px var(--font);
  fill: var(--text);
}
.lgd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: 10px;
}
.lgd i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.lgd2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.lgd2 i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.lgd2 b {
  margin-inline-start: auto;
  color: var(--text);
}
.hbars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hb-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 6px;
}
.hb-top span {
  color: var(--muted);
}
.hb-track {
  height: 10px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.hb-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s var(--ease);
}
.hb-sub {
  font-size: 11.5px;
  color: var(--faint);
  margin-top: 4px;
}
.heat {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.heat i {
  width: 14px;
  height: 22px;
  border-radius: 4px;
  display: inline-block;
}
.rank {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--grad-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
@media (min-width: 760px) {
  .kpis8 {
    grid-template-columns: repeat(4, 1fr);
  }
  .an-grid {
    grid-template-columns: 1fr 1fr;
  }
  .an-grid .span2 {
    grid-column: 1/-1;
  }
}
@media (min-width: 1180px) {
  .an-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .an-grid .span2 {
    grid-column: span 2;
  }
}

.kpi > small {
  display: block;
}
.kpi .dl {
  display: inline-block;
}
.cbars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.cb {
  display: grid;
  grid-template-columns: 128px 1fr 54px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.cb-l {
  color: var(--muted);
  line-height: 1.35;
}
.cb b {
  font-weight: 600;
  text-align: start;
}
.cb b small {
  display: block;
  font-weight: 400;
  color: var(--faint);
  font-size: 10.5px;
}
@media (max-width: 420px) {
  .cb {
    grid-template-columns: 100px 1fr 46px;
  }
}
