/* ===== «التارقت» ===== */
.tg { display: flex; flex-direction: column; gap: 14px; }
.tg-tabs { margin-bottom: 2px; }
.tg-m { white-space: nowrap; }
.tg-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.tg-dot { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; margin-inline-start: .35rem;
  border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 900; line-height: 1; }
.side__link .tg-dot { margin-inline-start: auto; }
#tg_root { display: flex; flex-direction: column; gap: 14px; }
.tg-bar-top { gap: 12px; }
.tg-period { display: flex; align-items: center; gap: 8px; }
.tg-period b { min-width: 9rem; text-align: center; font-weight: 900; }

/* progress bar with the «where we should be today» marker */
.tg-bar { position: relative; height: 10px; border-radius: 999px; background: #eef1f5; overflow: visible; margin: 8px 0 4px; }
.tg-bar > span { display: block; height: 100%; border-radius: inherit; transition: width .25s ease; background: var(--muted); }
.tg-bar--ok > span { background: var(--green); }
.tg-bar--warn > span { background: var(--yellow); }
.tg-bar--bad > span { background: var(--red); }
.tg-bar__mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--dark); border-radius: 2px; }
.tg-cellbar { min-width: 8rem; }
.tg-cellbar .tg-bar { height: 6px; margin: 4px 0 0; }

/* totals + metrics */
.tg-total { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.tg-total > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tg-total > header h3 { font-size: 1rem; font-weight: 900; }
.tg-total > header small { color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tg-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tg-metric { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: linear-gradient(180deg, #fbfcfd, #fff); min-width: 0; }
.tg-metric__h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; color: var(--muted); font-size: .85rem; }
.tg-metric__h b { font-size: 1.35rem; color: var(--ink); font-weight: 900; }
.tg-metric__v { font-weight: 800; margin-top: 4px; }
.tg-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0 0; }
.tg-dl div { min-width: 0; }
.tg-dl dt { color: var(--muted); font-size: .74rem; font-weight: 700; }
.tg-dl dd { margin: 0; font-weight: 800; font-size: .88rem; white-space: nowrap; }
.tg-hint { background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: #475467; font-size: .84rem; font-weight: 600; margin: 8px 0 0; }

/* unit cards */
.tg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tg-card { text-align: start; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: border-color .18s, transform .18s, box-shadow .18s; display: flex; flex-direction: column; gap: 6px; }
.tg-card:hover, .tg-card:focus-visible { border-color: var(--orange); transform: translateY(-1px); outline: none; }
.tg-card__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tg-card__h small { display: block; color: var(--muted); font-weight: 700; font-size: .75rem; }
.tg-card__h b { font-size: 1.05rem; font-weight: 900; }
.tg-card__mgr { color: var(--muted); font-size: .82rem; }
.tg-card__mgr b { color: var(--ink); }
.tg-card__nums { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-weight: 800; }
.tg-card__nums > span { font-size: 1.1rem; }
.tg-card__nums > small { color: var(--muted); }
.tg-card__nums > b { margin-inline-start: auto; font-size: 1.2rem; font-weight: 900; }
.tg-card__f { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }

/* employee + waiting list */
.tg-mine { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.tg-mine > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tg-mine > header small { color: var(--muted); font-weight: 700; }
.tg-mine > header h3 { font-size: 1.15rem; font-weight: 900; }
.tg-foot { margin-top: 10px; font-size: .82rem; }
.tg-ack { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff8ee; border: 1px solid #fcd9a8;
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-weight: 700; }
.tg-wait { background: #fff; border: 1px solid #fcd9a8; border-radius: 14px; padding: 12px 14px; }
.tg-wait h3 { font-size: .95rem; font-weight: 900; margin-bottom: 8px; }
.tg-wait__i { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: start; font: inherit; color: inherit; background: #fffaf3;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 6px; cursor: pointer; transition: border-color .18s; }
.tg-wait__i:hover, .tg-wait__i:focus-visible { border-color: var(--orange); outline: none; }
.tg-wait__i span { color: #92400e; font-weight: 800; font-size: .84rem; }

/* one target */
.tg-detail { display: flex; flex-direction: column; gap: 12px; }
.tg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-head__t { flex: 1; min-width: 0; }
.tg-head__t small { color: var(--muted); font-weight: 700; }
.tg-head__t h2 { font-size: 1.35rem; font-weight: 900; }
.tg-head__t span { color: var(--muted); font-size: .85rem; }
.tg-head__t span b { color: var(--ink); }
.tg-next { background: #eaf4fb; color: #1f6f8f; border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: .88rem; }
.tg-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-danger { color: var(--red) !important; }
.tg-reject { background: #fdeeee; border: 1px solid #f5c2c0; color: #7a1d17; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.tg-reject div { margin-top: 4px; font-weight: 800; }
.tg-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tg-log li { border-inline-start: 3px solid var(--line); padding-inline-start: 10px; display: flex; flex-direction: column; }
.tg-log small { color: var(--muted); }
.tg-log span { font-size: .85rem; }

/* forms */
.tg-form { display: flex; flex-direction: column; gap: 10px; }
.tg-form__3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tg-in { font-variant-numeric: tabular-nums; }
.modal__card.tg-modal--wide { width: min(980px, 96vw); max-width: 96vw; }
.tg-split { display: flex; flex-direction: column; gap: 10px; }
.tg-split__bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 800; }
.tg-split__t td { vertical-align: middle; }
.tg-split__t td small { display: block; }
.tg-split__t input { min-width: 6.5rem; }
.tg-split__sum { margin-inline-start: auto; font-weight: 800; color: var(--ink); }
.tg-split__t tfoot td { background: #f8fafc; font-weight: 800; }
.tg-ok { color: var(--green); font-weight: 900; }
.tg-short { color: var(--red); font-weight: 900; }

@media (max-width: 640px) {
  .tg-period b { min-width: 6rem; }
  .tg-dl { grid-template-columns: 1fr 1fr; }
  .tg-split__t input { min-width: 5rem; }
}
