/* Drill-down drawer: slides in from the inline-end edge (right in English, left in Arabic) */
.drill { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drill.is-open { pointer-events: auto; }

.drill__backdrop {
  position: absolute; inset: 0; background: rgba(34, 36, 73, 0.45);
  opacity: 0; transition: opacity .3s ease;
}
.drill.is-open .drill__backdrop { opacity: 1; }

.drill__panel {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  width: min(640px, 100%); overflow-y: auto;
  background: var(--bg); color: var(--text);
  border-inline-start: 4px solid var(--lean-blue);
  padding: var(--cell);
  display: flex; flex-direction: column; gap: var(--cell);
  transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
[dir="rtl"] .drill__panel { transform: translateX(-100%); }
.drill.is-open .drill__panel { transform: none; }

.drill__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--half); }
.drill__title { font-size: 22px; font-weight: var(--w-black); line-height: 1.3; }
.drill__value { display: block; font-size: 36px; color: var(--accent); }
.drill__sub {
  font-weight: var(--w-semibold); color: var(--text-muted); font-size: 14px;
  margin-bottom: 8px; text-transform: none;
}
.drill__svg svg { display: block; width: 100%; height: auto; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
  text-align: start; padding: 7px 10px; border-bottom: 1px solid var(--border);
}
.data-table thead th { font-weight: var(--w-bold); color: var(--text-muted); font-size: 12px; }
.data-table tbody th { font-weight: var(--w-semibold); }
.data-table .is-num { text-align: end; font-variant-numeric: tabular-nums; }
.data-table tbody tr:nth-child(odd) { background: var(--surface); }

.pill {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; font-weight: var(--w-semibold); color: var(--text);
}
.pill--good { background: rgba(34, 174, 136, 0.22); }
.pill--warn { background: rgba(249, 180, 80, 0.4); }

@media (max-width: 759px) {
  .drill__panel { padding: var(--half); }
  .drill__value { font-size: 28px; }
}
