/* DataHub screen styles: import wizard, history, export, backup. Logical properties only, so Arabic flips cleanly. */
.dh-wiz { padding: 0; overflow: hidden; }
.dh-body { padding: 28px 32px 32px; }
.dh-h { font: 700 21px/1.2 var(--head); letter-spacing: -.02em; margin-bottom: 4px; }
.stack-lg { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.dh-busy { opacity: .6; pointer-events: none; transition: opacity .15s; }

/* steps */
.dh-steps { display: flex; list-style: none; margin: 0; padding: 14px 24px; gap: 4px; border-bottom: 1px solid var(--line); background: var(--surface2); overflow-x: auto; scrollbar-width: none; }
.dh-steps li { flex: 1 1 0; min-width: 0; position: relative; }
.dh-steps li + li::before { content: ''; position: absolute; inset-inline-start: -2px; top: 50%; width: 4px; height: 1px; background: var(--line-strong); }
.dh-steps button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border-radius: 12px; color: var(--ink3); font-weight: 600; font-size: 13.5px; text-align: start; }
.dh-steps button:disabled { cursor: default; }
.dh-steps li.done button:not(:disabled):hover { background: var(--surface3); color: var(--ink); }
.dh-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--surface3); color: var(--ink3); box-shadow: 0 0 0 1px var(--line2) inset; transition: all .2s; }
.dh-steps li.on .dh-dot { background: var(--grad-btn); color: #fff; box-shadow: var(--glow); }
.dh-steps li.on button { color: var(--ink); }
.dh-steps li.done .dh-dot { background: var(--good-bg); color: var(--good); box-shadow: none; }
.dh-steps li.done button { color: var(--ink2); }
.dh-sl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* type cards */
.dh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dh-cards.sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 18px; }
.dh-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line2); background: var(--surface); text-align: start; transition: border-color .15s, box-shadow .15s, transform .12s, background .15s; box-shadow: var(--sh-1); }
.dh-card:hover:not(:disabled) { border-color: rgba(244,122,32,.5); transform: translateY(-1px); box-shadow: var(--sh-2); }
.dh-card:disabled { opacity: .55; cursor: not-allowed; }
.dh-card.on { border-color: var(--orange); background: var(--grad-soft); box-shadow: var(--ring); }
.dh-ci { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface3); color: var(--ink2); }
.dh-card.on .dh-ci { background: var(--grad-btn); color: #fff; }
.dh-ct { display: grid; gap: 2px; min-width: 0; flex: 1; }
.dh-ct b { font-size: 14.5px; }
.dh-ct small { color: var(--ink3); font-size: 12.5px; line-height: 1.35; }
.dh-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; }
.dh-card .pill { flex: none; max-width: 46%; white-space: normal; height: auto; padding-block: 3px; text-align: center; }
.dh-src-h { display: grid; gap: 2px; margin-bottom: 12px; }
.dh-seg { flex-wrap: wrap; }
.dh-tip { display: flex; align-items: center; gap: 6px; margin-top: 10px; }

/* file step */
.dh-drop { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 30px 20px; border: 2px dashed var(--line-strong); border-radius: 20px; background: var(--surface2); color: var(--ink2); text-align: center; transition: border-color .15s, background .15s; }
.dh-drop.over { border-color: var(--orange); background: var(--grad-soft); }
.dh-drop.has { border-style: solid; border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-bg); color: var(--good); }
.dh-drop.has b { color: var(--ink); }
.dh-paste { min-height: 150px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: auto; }

/* mapping */
.dh-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.dh-map td { vertical-align: middle; }
.dh-map td:nth-child(1) { width: 26%; }
.dh-map td:nth-child(2) { width: 34%; }
.dh-map select { min-width: 160px; }
.dh-req { color: var(--red); font-weight: 800; }
.dh-ex { display: flex; flex-wrap: wrap; gap: 6px; }
.dh-chip { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 9px; border-radius: 8px; background: var(--surface3); font-size: 12.5px; color: var(--ink2); }
.dh-tpl { width: 200px; }

/* review */
.dh-opts { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; }
.dh-filter { max-width: 100%; }
.dh-scroll { max-height: 520px; overflow: auto; }
.dh-rev td { font-size: 13.5px; padding-block: 9px; }
.dh-rev td:nth-child(1) { width: 56px; }
.dh-rev td:nth-child(2) { white-space: nowrap; }
.dh-msg { min-width: 260px; font-size: 12.5px; color: var(--ink2); }
.dh-msg > div + div { margin-top: 2px; }
.dh-msg select { margin-top: 6px; }
.dh-r-error td { background: color-mix(in srgb, var(--bad-bg) 55%, transparent); }
.dh-r-error .dh-msg { color: var(--bad); font-weight: 550; }
.dh-r-warning .dh-msg { color: var(--warn); }
.dh-go { justify-items: end; text-align: end; }

/* done */
.dh-done { text-align: center; justify-items: center; }
.dh-doneh { display: grid; justify-items: center; gap: 6px; }
.dh-bigtick { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); margin-bottom: 8px; animation: rise .5s var(--ease) both; }
.dh-bigtick.brand { background: var(--grad-soft); color: var(--orange); }
.dh-done .stats { width: 100%; text-align: start; }
.dh-donebtns { justify-content: center; }

/* history, export, backup */
.dh-file { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-acts { display: flex; gap: 6px; justify-content: flex-end; }
.dh-bad { color: var(--bad); }
.dh-filters { margin-bottom: 18px; }
.dh-check { display: flex; align-items: center; gap: 8px; align-self: end; height: 42px; font-size: 14px; color: var(--ink2); }
.dh-check input { width: 18px; height: 18px; accent-color: var(--orange); }
.dh-exfoot { padding-top: 16px; border-top: 1px solid var(--line); }
.dh-backup { display: grid; justify-items: center; text-align: center; gap: 10px; max-width: 640px; margin-inline: auto; padding: 36px 28px; }
.dh-backup > p { max-width: 480px; }
.dh-list { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; gap: 8px; text-align: start; color: var(--ink2); font-size: 14px; }
.dh-list li { display: flex; gap: 10px; align-items: baseline; }
.dh-list li::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); transform: translateY(-1px); }

@media (max-width: 760px) {
  .dh-body { padding: 20px 16px 24px; }
  .dh-steps { padding: 10px 12px; }
  .dh-steps li:not(.on) .dh-sl { display: none; }
  .dh-steps li:not(.on) { flex: 0 0 auto; }
  .dh-steps li.on { flex: 1 1 auto; }
  .dh-card .pill { max-width: 38%; }
  .dh-map td { display: block; width: 100% !important; padding-block: 6px; }
  .dh-map thead { display: none; }
  .dh-map tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .dh-map td { border: 0; }
  .dh-map select { width: 100%; }
  .dh-tpl { width: 100%; }
  .dh-go { justify-items: stretch; text-align: start; width: 100%; }
  .dh-go .btn { width: 100%; }
  .dh-opts { gap: 16px; }
}
.dh-hist td:first-child, .dh-hist td:nth-child(4), .dh-hist td:nth-child(9) { white-space: nowrap; }
