/* Faried Transfer — one centered card on a quiet field; same tokens for upload and download pages */
:root {
  --bg: #eef2f1;
  --card: #ffffff;
  --fg: #142019;
  --muted: #5c6b64;
  --line: #d6dfdb;
  --accent: #0b6e55;
  --accent-ink: #ffffff;
  --accent-soft: #dff0e9;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --field: #f6f8f7;
  --f-display: "Reem Kufi", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1210; --card: #141c19; --fg: #e2ebe6; --muted: #92a39b; --line: #27332e;
    --accent: #43c39a; --accent-ink: #06231a; --accent-soft: #15302a; --danger: #ff8a80; --danger-soft: #3a1714; --field: #101815;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; line-height: 1.7;
  display: grid; align-content: start; justify-items: center; gap: 20px;
  padding-block: 40px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 1.35rem; color: var(--fg); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.card { width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 16px; }
h1 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.35; text-wrap: balance; }
p { margin: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.drop {
  display: grid; justify-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 12px;
  background: var(--field); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 1rem; }
.drop svg { width: 34px; height: 34px; color: var(--accent); }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; unicode-bidi: plaintext; }
.files .size { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.total { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
label { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; }
input, textarea, select {
  font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; width: 100%;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=email] { direction: ltr; text-align: right; }
.btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn:focus-visible, .icon-btn:focus-visible, .drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.bar { height: 10px; background: var(--field); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.stats { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.big { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.link-row { display: flex; gap: 8px; }
.link-row input { direction: ltr; text-align: left; font-size: .9rem; }
.done-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.done-mark svg { width: 28px; height: 28px; }
.note { white-space: pre-wrap; background: var(--field); border-radius: 8px; padding: 10px 12px; }
.dl-list li { gap: 8px; }
.dl-list a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .9rem; }
.dl-list a:hover { text-decoration: underline; }
footer { color: var(--muted); font-size: .8rem; text-align: center; max-width: 480px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
