/* ============================================================
   سجل الإنجاز — نظام التصميم الموحد
   عربي RTL · خط Cairo · mobile-first · فاتح/داكن عبر رموز الألوان
   ============================================================ */

/* ---------- 1) رموز التصميم (Design Tokens) ---------- */
:root {
  color-scheme: light;

  /* الألوان الأساسية */
  --primary: #0f766e;            /* أزرار وإجراءات أساسية */
  --primary-dark: #0b5d57;
  --primary-ink: #0f766e;        /* نصوص وعناوين بلون الهوية */
  --primary-soft: #e7f4f1;       /* خلفيات مختارة/نشطة */

  /* الأسطح والنصوص */
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #f2f5f4;          /* رؤوس الجداول، الرقائق، تظليل الصفوف */
  --text: #1a2827;
  --muted: #5f7370;
  --border: #e3e8e7;
  --border-strong: #cdd7d5;

  /* الحالات */
  --error-bg: #fef2f2;
  --error-text: #b91c1c;
  --error-border: #fecaca;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;
  --info-border: #bfdbfe;
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --success-border: #a7f3d0;
  --warn-bg: #fef9ec;
  --warn-text: #92400e;
  --warn-border: #f3e3b3;
  --warn-strong: #b45309;        /* الرقم القياسي، النسب اللافتة، تحذير الصحة */
  --accent: #0e7490;             /* تقدم الفريق */

  /* الأبعاد والظلال */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .12);
  --ring: 0 0 0 3px rgba(15, 118, 110, .16);

  /* المسافات */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --primary: #12857c;
  --primary-dark: #0f766e;
  --primary-ink: #52d1c5;
  --primary-soft: rgba(82, 209, 197, .1);

  --bg: #0f1514;
  --surface: #171f1e;
  --surface-2: #1e2928;
  --text: #e7edec;
  --muted: #98aeaa;
  --border: #27342f;
  --border-strong: #3a4a45;

  --error-bg: rgba(248, 113, 113, .1);
  --error-text: #f87171;
  --error-border: rgba(248, 113, 113, .3);
  --info-bg: rgba(96, 165, 250, .1);
  --info-text: #82b4f8;
  --info-border: rgba(96, 165, 250, .3);
  --success-bg: rgba(52, 211, 153, .1);
  --success-text: #3fd9a4;
  --success-border: rgba(52, 211, 153, .3);
  --warn-bg: rgba(251, 191, 36, .09);
  --warn-text: #f5c454;
  --warn-border: rgba(251, 191, 36, .28);
  --warn-strong: #f5c454;
  --accent: #22a8c4;

  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .45);
  --ring: 0 0 0 3px rgba(82, 209, 197, .22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.4; }
.muted { color: var(--muted); }
.mt-1 { margin-top: 1rem; }
.inline { display: inline; }

/* ---------- 2) البطاقات والحاويات ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-5);
}

.container {
  max-width: 720px;
  margin: var(--sp-5) auto;
  padding: 0 var(--sp-4);
}

.container-wide { max-width: 1080px; }

/* عنوان الصفحة */
.container > h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: var(--sp-4);
}

.section-title { margin: var(--sp-5) 0 var(--sp-3); font-size: 1.05rem; }

/* ---------- 3) الشريط العلوي والتنقل ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .55rem var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.topbar-start {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex: 1;
  min-width: 0;
}

.topbar-brand {
  color: var(--primary-ink);
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { background: var(--surface-2); color: var(--text); }
}
.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.topbar-username { font-size: .9rem; font-weight: 600; white-space: nowrap; }

/* زر تبديل المظهر */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.theme-toggle:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* زر المظهر العائم في صفحات الدخول */
.auth-theme { position: fixed; top: var(--sp-4); inset-inline-end: var(--sp-4); z-index: 10; }

/* ---------- 4) النماذج ---------- */
label { display: block; margin: .75rem 0 .25rem; font-weight: 600; font-size: .95rem; }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: .65rem .9rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder { color: var(--muted); opacity: .55; font-weight: 400; letter-spacing: normal; }

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

input[disabled] { background: var(--surface-2); color: var(--muted); }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary-ink);
  outline-offset: 2px;
}

/* ---------- 5) الأزرار ---------- */
.btn {
  display: inline-block;
  padding: .65rem 1.4rem;
  font: inherit;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  min-height: 44px; /* حجم لمس مريح على الجوال */
}

.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn[disabled]:active { transform: none; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(15, 118, 110, .25); }
.btn-ghost { background: transparent; color: var(--primary-ink); border-color: var(--border); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--primary-dark); }
  .btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
}
.btn-block { display: block; width: 100%; margin-top: var(--sp-5); }
.btn-sm { padding: .35rem .9rem; min-height: 36px; font-size: .9rem; }
.btn-lg { font-size: 1.15rem; min-height: 54px; }
.btn-danger { color: var(--error-text); }
.btn-danger.btn-ghost { border-color: var(--border); }
@media (hover: hover) and (pointer: fine) {
  .btn-danger.btn-ghost:hover { background: var(--error-bg); border-color: var(--error-border); }
}

/* ---------- 6) التنبيهات ---------- */
.alert {
  padding: .7rem 1rem;
  border-radius: var(--radius);
  margin: .75rem 0;
  font-size: .95rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.alert-error { background: var(--error-bg); color: var(--error-text); border-color: var(--error-border); }
.alert-info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-border); }
.alert-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }

/* ---------- 7) الشارات والرقائق ---------- */
.badge {
  display: inline-block;
  padding: .1rem .6rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.badge-active { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.badge-voided { background: var(--error-bg); color: var(--error-text); border-color: var(--error-border); }
.badge-edited { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.badge-disabled { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

.chip {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .05rem .6rem;
  font-size: .78rem;
  margin: .1rem 0 .1rem .25rem;
}

/* ---------- 8) بطاقات الإحصاءات والتقدم ---------- */
.stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (min-width: 640px) { .stats-row { grid-template-columns: repeat(3, 1fr); } }

.stat-card { text-align: center; padding: var(--sp-4); }
.stat-title { font-weight: 600; color: var(--muted); font-size: .85rem; }
.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.stat-record { color: var(--warn-strong); }
.stat-sub { font-size: .85rem; }

/* على الجوال: بطاقات الأرقام البسيطة في صف واحد */
.stats-row-tight { grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.stats-row-tight .stat-card { padding: .75rem .5rem; }
.stats-row-tight .stat-title { font-size: .78rem; }

.progress {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
  margin: .4rem 0;
}
.progress-fill {
  background: var(--primary-ink);
  height: 100%;
  border-radius: 99px;
  transition: width 500ms cubic-bezier(0.23, 1, 0.32, 1);
}
.progress-team { background: var(--accent); }

/* ---------- 9) شاشة الإدخال ---------- */
.entry-card { padding: var(--sp-6) var(--sp-5); }
.entry-title { color: var(--primary-ink); font-size: 1.25rem; margin-bottom: var(--sp-3); }
.ticket-input {
  font-size: 1.4rem;
  letter-spacing: .15em;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.field-hint { font-size: .85rem; margin-top: .35rem; }
.field-hint-error { color: var(--error-text); font-weight: 600; }

.actions-label { font-weight: 600; margin: var(--sp-4) 0 var(--sp-2); }
.actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 640px) { .actions-grid { grid-template-columns: repeat(2, 1fr); } }

.action-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: .8rem 2.4rem .8rem 1rem;
  min-height: 52px; /* هدف لمس كبير */
  font: inherit;
  font-weight: 600;
  text-align: right;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.action-btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .action-btn:hover { border-color: var(--primary-ink); }
}
.action-btn.selected {
  background: var(--primary-soft);
  border-color: var(--primary-ink);
  color: var(--primary-ink);
  box-shadow: inset 0 0 0 1px var(--primary-ink);
}
/* مؤشر اختيار ثابت المكان — لا يزيح النص عند الاختيار */
.action-btn::after {
  content: "";
  position: absolute;
  right: .9rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%) scale(0.9);
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: transparent no-repeat center / 62%;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.action-btn.selected::after {
  border-color: var(--primary-ink);
  background-color: var(--primary-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.7l4.5-5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: translateY(-50%) scale(1);
}
html[data-theme="dark"] .action-btn.selected::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.7l4.5-5.4' fill='none' stroke='%230f1514' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-radio { position: relative; }
.action-radio input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- 10) التوست ---------- */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 50%;
  transform: translateX(50%) translateY(12px) scale(0.97);
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  padding: .7rem 1.4rem;
  border-radius: 99px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  /* الخروج أسرع من الدخول — النظام يستجيب بسرعة */
  transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1), transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 100;
}
html[data-theme="dark"] .toast { background: #14211e; }
.toast.show {
  opacity: 1;
  transform: translateX(50%) translateY(0) scale(1);
  transition-duration: 300ms;
}

/* ---------- 11) الجداول ---------- */
.table-scroll { overflow-x: auto; margin: -.25rem; padding: .25rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .6rem .7rem; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  background: var(--surface-2);
}
/* زوايا ناعمة لصف الرأس — RTL: الأول يمين والأخير يسار */
th:first-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
th:last-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
td { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
@media (hover: hover) and (pointer: fine) {
  tbody tr:hover td { background: var(--surface-2); }
}
.row-voided td { opacity: .55; text-decoration: line-through; }
.row-voided td.row-actions, .row-voided td:last-child { text-decoration: none; }
.row-actions { display: flex; gap: .3rem; justify-content: flex-end; }

.table-meta { margin-bottom: var(--sp-2); font-size: .9rem; }
.actions-cell { white-space: normal; min-width: 260px; }
.audit-value { white-space: normal; min-width: 320px; }

/* ---------- 12) الفلاتر ---------- */
.filter-card { margin-bottom: var(--sp-4); }
.filter-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  align-items: end;
}
@media (min-width: 720px) { .filter-form { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) { .filter-form-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .filter-form-5 { grid-template-columns: repeat(6, 1fr); } }
.filter-field label { margin-top: 0; font-size: .85rem; color: var(--muted); }
.filter-actions { display: flex; gap: var(--sp-2); }

/* ---------- 13) قوائم التوزيع والتحليلات ---------- */
.dist-list { list-style: none; padding: 0; margin: 0; }
.dist-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .45rem 0;
  border-bottom: 1px dashed var(--border);
}
.dist-list li:last-child { border-bottom: none; }
.dist-count {
  display: inline-block;
  min-width: 2.2rem;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-radius: 99px;
  font-weight: 700;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.analytics-section { margin-bottom: var(--sp-4); }
.analytics-section > h3 { font-size: 1.05rem; }
.analytics-kpi { font-size: 1.05rem; margin: .5rem 0 1rem; }
.kpi-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-ink);
  margin-inline-end: .3rem;
  font-variant-numeric: tabular-nums;
}
.kpi-percent { font-weight: 700; color: var(--warn-strong); }

.small-note { font-size: .85rem; text-align: center; margin: var(--sp-4) 0 var(--sp-6); }

/* ---------- 14) الحالة الفارغة ---------- */
.empty-state {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  color: var(--muted);
}
.empty-state svg { display: block; margin: 0 auto .75rem; color: var(--border-strong); }
.empty-state-title { font-weight: 700; color: var(--text); margin: 0 0 .2rem; }
.empty-state p { margin: 0; font-size: .9rem; }

/* ---------- 15) اللوحة المباشرة ---------- */
.dash-meta { margin: .25rem 0 var(--sp-3); font-size: .88rem; }
.team-total-card { margin-bottom: var(--sp-4); }

.agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (min-width: 560px) { .agent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .agent-grid { grid-template-columns: repeat(3, 1fr); } }

.agent-card { padding: var(--sp-4); }
.agent-name { font-weight: 700; }
.agent-count {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-ink);
  font-variant-numeric: tabular-nums;
}
.agent-sub { font-size: .82rem; }

.dash-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
@media (min-width: 760px) { .dash-columns { grid-template-columns: 1fr 1fr; } }

/* ---------- 16) صفحات المصادقة ---------- */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.auth-card { width: 100%; max-width: 400px; text-align: center; padding: var(--sp-6) 1.75rem; }
.auth-card .brand { font-size: 1.6rem; margin-bottom: .15rem; }
.auth-card > .muted { font-size: .95rem; margin: 0 0 .5rem; }
.auth-card form { text-align: right; margin-top: var(--sp-5); }
.brand { color: var(--primary-ink); font-weight: 800; }

/* ---------- 17) إدارة الفريق والإجراءات ---------- */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin: var(--sp-4) 0;
}
@media (min-width: 760px) { .admin-grid { grid-template-columns: 1fr 1fr; } }

.compact-form label { margin-top: .65rem; }

.team-user-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.team-user-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  background: var(--surface);
}

.team-user-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.team-badges { display: flex; gap: .35rem; flex-wrap: wrap; }

.team-user-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  align-items: end;
}
@media (min-width: 760px) { .team-user-form { grid-template-columns: 2fr 1fr 1fr auto; } }

.team-actions,
.team-activation-form {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}

.team-activation-form { margin-top: var(--sp-3); }

.action-admin-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  align-items: end;
}
@media (min-width: 900px) { .action-admin-form { grid-template-columns: 1fr 3fr 1fr auto auto auto; } }

.checkline {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: .75rem 0 .25rem;
  font-weight: 600;
}

/* ---------- 18) صحة النظام ---------- */
.health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.health-status {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: .2rem;
}
.health-healthy { color: var(--success-text); }
.health-warning { color: var(--warn-strong); }
.health-error { color: var(--error-text); }

.health-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
@media (min-width: 760px) { .health-grid { grid-template-columns: repeat(2, 1fr); } }

.health-card h3 { font-size: 1rem; }
.health-card dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: .25rem;
  margin: .5rem 0 0;
}

.health-card dt {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.health-card dd {
  margin: 0 0 .45rem;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* ---------- 19) تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .action-btn, .btn:active, .action-btn:active, .theme-toggle:active { transition: none; transform: none; }
  .action-btn::after { transition: none; }
  .progress-fill { transition: none; }
  .toast { transition: opacity 200ms ease; transform: translateX(50%); }
  .toast.show { transform: translateX(50%); }
}
