:root {
  color-scheme: dark;
  /* palette sampled from designs-dark (primary reference) */
  --bg: #0b1220; --bg-deep: #070d18; --surface: #121c30; --surface-2: #0f192b; --surface-3: #182238;
  --line: #1f2c45; --ink: #e9eef8; --muted: #93a1bd; --gold: #b8924a; --gold-soft: #d9b866;
  --green: #14301f; --green-ink: #8fd39e; --red: #3a1620; --red-ink: #ff9aa6;
  --info: #16283f; --info-ink: #a9c7f0;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e8; --surface: #ffffff; --surface-2: #faf7ef; --line: #e4ddca;
  --ink: #16233a; --muted: #5c677c; --gold: #a87f27; --gold-soft: #c39a3f;
  --green: #e2f3e6; --green-ink: #1d6b33; --red: #fde7ea; --red-ink: #a11b2b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Cairo, "Noto Sans SC", sans-serif; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
a { color: var(--gold-soft); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin: 0 0 18px; }
.btn { font: inherit; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer;
  background: var(--gold); color: #1a1405; font-weight: 600; margin: 4px 6px 4px 0; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { font: inherit; padding: 11px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); width: 100%; }
.error { background: var(--red); color: var(--red-ink); padding: 10px 12px; border-radius: 9px;
  margin-bottom: 14px; display: none; }
.ok { background: var(--green); color: var(--green-ink); padding: 10px 12px; border-radius: 9px; margin-bottom: 12px; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); margin-inline-start: 8px; }
.tag.EG { color: #ffd9a8; } .tag.CN { color: #ffc0c4; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(430px, 100%); text-align: start; }
.login h1 { margin: 0 0 4px; font-size: 26px; }
.login p { margin: 0 0 18px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.top .who > div:first-child { font-weight: 600; }
.top .who a { font-size: 12px; text-decoration: none; }
.top-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.langs { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.langs button { font: inherit; font-size: 12px; font-weight: 600; background: none; border: 0;
  color: var(--muted); cursor: pointer; padding: 4px 9px; border-radius: 6px; }
.langs button[aria-pressed="true"] { color: #1a1405; background: var(--gold); }

.page { max-width: 1080px; margin: 0 auto; padding: 22px; }

.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: start; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; }
.grid td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: middle; }
.grid tr:hover td { background: var(--surface-2); }
.row-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

/* ---------------------------------------------------------------- login (design 00-login-dark) */
/* Three zones per mockup at 1440x810: navy Klastos 0-395px (#070D18),
   form band 395-1045px (#0B1220), green Hongxing 1045-1440px (#0A1F20). */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

.login-page {
  --lp-navy: #070d18; --lp-band: #0b1220; --lp-green: #0a1f20;
  --lp-card: #121c30; --lp-input: #0b1424; --lp-line: #2a3a55;
  --lp-ink: #e6eaf2; --lp-muted: #9aa6ba; --lp-gold: #b8924a;
  min-height: 100vh; display: grid; place-items: center; padding: 40px 24px;
  background: var(--lp-band); color: var(--lp-ink);
  font: 14px/1.45 Helvetica, Arial, "Noto Sans Arabic", "Droid Sans Fallback", "Noto Sans CJK SC", sans-serif;
}
html[data-theme="light"] .login-page {
  --lp-navy: #f0eee8; --lp-band: #f7f5f0; --lp-green: #e9efec;
  --lp-card: #ffffff; --lp-input: #fbfaf7; --lp-line: #e5e1d8;
  --lp-ink: #0f1b2d; --lp-muted: #6b7280; --lp-gold: #a87f27;
}

.lp-shell { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 650px) minmax(0, 1fr); width: 100%; }
.lp-side { display: grid; align-content: center; justify-items: center; align-self: stretch; gap: 0; padding: 0 16px; }
.lp-side.left { background: var(--lp-navy); margin-left: calc(-50vw + 50%); padding-left: calc(50vw - 50%); }
.lp-side.right { background: var(--lp-green); margin-right: calc(-50vw + 50%); padding-right: calc(50vw - 50%); }
.lp-mark { display: grid; justify-items: center; gap: 4px; }
.lp-mark img { width: 96px; height: 96px; display: block; }
.lp-wordmark { font-size: 38px; font-weight: 700; letter-spacing: .05em; line-height: 1.15; margin-top: 16px; text-align: center; }
.lp-tagline { font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--lp-gold); margin-top: 6px; text-align: center; text-transform: uppercase; }
.lp-wordmark.copper { letter-spacing: .03em; }
.lp-tagline.copper { color: #c08a5b; letter-spacing: .12em; }
.lp-side img.lp-hex { width: 112px; height: 112px; }

.lp-theme { position: absolute; top: -66px; left: 0; display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--lp-navy); border: 1px solid var(--lp-line); }
.lp-theme button { font: inherit; font-size: 12px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--lp-muted); padding: 5px 10px; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; }
.lp-theme button[aria-pressed="true"] { background: var(--lp-gold); color: #0b1220; font-weight: 600; }
.lp-theme svg { width: 12px; height: 12px; }

.lp-center { background: var(--lp-band); display: grid; justify-items: center; align-content: center; padding: 0 0 0 0; }

.lp-card {
  position: relative; width: min(330px, calc(100vh - 398px)); max-width: 100%;
  background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 10px;
  padding: 26px 22px 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.lp-card::before { content: ""; position: absolute; top: 12px; inset-inline-start: 14px; width: 44px; height: 2px; background: var(--lp-gold); border-radius: 2px; }

.lp-head { text-align: center; direction: rtl; margin-bottom: 20px; }
.lp-head h1 { font-size: 28px; font-weight: 700; margin: 0 0 6px; color: #ffffff; line-height: 1.25; }
html[data-theme="light"] .lp-head h1 { color: #0f1b2d; }
.lp-en { font-size: 12px; color: var(--lp-muted); direction: ltr; }
.lp-sub1 { font-size: 13px; color: var(--lp-ink); margin-top: 6px; }
.lp-sub2 { font-size: 11px; color: var(--lp-muted); direction: ltr; margin-top: 2px; }

.lp-field { display: grid; gap: 0; margin-bottom: 12px; direction: rtl; }
.lp-field label { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .07em; color: var(--lp-muted); text-transform: uppercase; margin-bottom: 5px; white-space: nowrap; }
.lp-field label .lp-dot { color: var(--lp-muted); opacity: .8; }
.lp-field label .ar { font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--lp-muted); }
.lp-field input {
  font: inherit; font-size: 13px; width: 100%; height: 34px; padding: 0 10px; direction: ltr;
  background: var(--lp-input); color: var(--lp-ink);
  border: 1px solid var(--lp-line); border-radius: 5px;
}
html[data-theme="dark"] .lp-field input { background: #0b1220; }
.lp-field input:focus { outline: 2px solid rgba(184,146,74,.45); outline-offset: 0; border-color: var(--lp-gold); }

/* image-selection captcha: 3x3 tile grid inside the card */
.lp-capbox { display: grid; gap: 7px; direction: ltr; }
.lp-capq { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--lp-muted); }
.lp-capq .lp-capinst { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
html[dir="rtl"] .lp-capq { direction: rtl; }
.lp-captarget { color: var(--lp-gold); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.lp-captarget.ar { font-size: 14px; letter-spacing: 0; text-transform: none; }
.lp-capgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.lp-captile {
  position: relative; padding: 0; aspect-ratio: 1 / 1; border-radius: 5px; overflow: hidden;
  border: 1px solid var(--lp-line); background: #0b1220; cursor: pointer; line-height: 0;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
html[data-theme="light"] .lp-captile { background: #fbfaf7; }
.lp-captile img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.lp-captile:hover { border-color: rgba(184,146,74,.6); }
.lp-captile:focus-visible { outline: 2px solid var(--lp-gold); outline-offset: 1px; }
.lp-captile.on { border-color: var(--lp-gold); box-shadow: inset 0 0 0 2px var(--lp-gold), 0 0 0 1px rgba(184,146,74,.35); }
.lp-captile.on::after {
  content: "¹3"; position: absolute; top: 3px; inset-inline-end: 3px; width: 16px; height: 16px;
  display: grid; place-items: center; border-radius: 50%; background: var(--lp-gold);
  color: #0b1220; font-size: 11px; font-weight: 700; line-height: 1;
}
.lp-capfoot { display: flex; justify-content: flex-end; }
.lp-capref {
  display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 10px;
  color: var(--lp-muted); background: none; border: 0; padding: 0; cursor: pointer;
  letter-spacing: .04em; text-transform: uppercase;
}
.lp-capref:hover { color: var(--lp-gold); }
.lp-capref-ico { font-size: 13px; line-height: 1; }

.lp-submit {
  display: grid; justify-items: center; gap: 1px; width: 100%; margin-top: 6px;
  background: var(--lp-gold); color: #0b1220; border: 0; border-radius: 5px;
  padding: 9px 12px 10px; cursor: pointer; font: inherit; font-weight: 700;
}
.lp-submit .ar { font-size: 17px; line-height: 1.2; }
.lp-submit .en { font-size: 10px; letter-spacing: .14em; font-weight: 600; }
.lp-submit:disabled { opacity: .6; cursor: wait; }

.lp-links { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 12px; color: var(--lp-ink); margin-top: 12px; padding-bottom: 2px; }
.lp-links button { font: inherit; font-size: 12px; background: none; border: 0; color: #ffffff; cursor: pointer; padding: 0; }
.lp-links button[aria-pressed="true"] { color: #ffffff; font-weight: 600; }
.lp-links .sep { width: 1px; height: 12px; background: var(--lp-line); }

.lp-err { display: none; font-size: 12px; color: #ff9aa6; background: #3a1620; border-radius: 5px; padding: 6px 8px; margin-bottom: 10px; text-align: start; direction: ltr; }
.lp-err.show { display: block; }
.lp-ok { font-size: 12px; color: #8fd39e; background: #14301f; border-radius: 5px; padding: 6px 8px; margin-bottom: 10px; }
.lp-unlock { background: none; border: 0; color: var(--lp-muted); font: inherit; font-size: 11px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; margin: 4px auto 0; display: block; }

.lp-bekam {
  display: grid; justify-items: center; gap: 2px; width: 316px; max-width: 100%; margin-top: 28px;
  background: #121c30; border: 1px solid #6b5524; border-radius: 8px; padding: 11px 14px; text-align: center;
  color: var(--lp-ink); text-decoration: none; direction: rtl;
}
html[data-theme="dark"] .lp-bekam { background: #1c1a12; }
.lp-bekam .ar { font-size: 13px; font-weight: 700; color: #d9b96a; }
.lp-bekam .en { direction: ltr; font-size: 11px; color: var(--lp-muted); }
.lp-bekam .url { direction: ltr; font-size: 10px; color: var(--lp-muted); opacity: .85; }

@media (max-width: 1000px) {
  .lp-shell { grid-template-columns: 130px minmax(0, 1fr) 130px; }
  .lp-wordmark { font-size: 16px; letter-spacing: .04em; }
  .lp-tagline { font-size: 8px; letter-spacing: .1em; }
  .lp-mark img { width: 46px; height: 46px; }
  .lp-side img.lp-hex { width: 52px; height: 52px; }
}
@media (max-width: 760px) {
  .login-page { padding: 20px 12px; }
  .lp-shell { grid-template-columns: minmax(0, 1fr); }
  .lp-side { display: none; }
  .lp-theme { top: -54px; }
}


.lp-side.left { margin-left: calc(-50vw + 50%); padding-left: calc(50vw - 50%); }
.lp-side { align-self: stretch; }
.lp-shell { grid-auto-rows: 1fr; min-height: 100vh; }
.lp-center { padding: 74px 0; }
.lp-field label { flex-direction: row-reverse; justify-content: flex-start; direction: rtl; }
.lp-field label > span:first-child { order: 3; }
.lp-field label .lp-dot { order: 2; }
.lp-field label .ar { order: 1; }
.lp-field label { justify-content: flex-end; }
.lp-mark img:not(.lp-hex) { width: 96px; height: 96px; }
.lp-side img.lp-hex { width: 92px; height: 92px; }
.lp-unlock { display: none; }
.lp-card { padding-top: 24px; }
.lp-head { margin-bottom: 16px; }
.lp-head h1 { font-size: 27px; }

.login-page { padding: 0; display: block; min-height: 100vh; }
.login-page::-webkit-scrollbar { display: none; }
.lp-side.left { background-clip: border-box; }
.lp-shell { height: 100vh; align-content: stretch; }
.lp-side { height: 100%; }
.lp-theme { top: 18px; left: 30px; }
.lp-center { padding: 0; }
.lp-card { margin: 0; }
.lp-bekam { margin-top: 10px; }
.lp-shell { align-items: center; }
.lp-side { display: flex; flex-direction: column; justify-content: center; }
.lp-head h1 { font-size: 30px; margin-bottom: 2px; }
.lp-sub1, .lp-field + .lp-field { }
.lp-sub1b { font-size: 13px; color: var(--lp-ink); direction: rtl; text-align: center; margin-top: 7px; }
.lp-sub2 { margin-top: 2px; }
.lp-card { padding: 24px 22px 12px 22px; }
.lp-field { margin-bottom: 10px; }
.lp-card::before { top: 34px; inset-inline-start: auto; inset-inline-end: auto; left: auto; right: auto; margin: 0 auto; width: 33px; }
.lp-card { padding-top: 14px; }
.lp-head { padding-top: 30px; }
.lp-card { padding: 12px 20px 10px; }
/* the grid makes the card taller than the mockup's; tighten the rest a touch */
.lp-head { margin-bottom: 8px; padding-top: 24px; }
.lp-head h1 { font-size: 25px; }
.lp-en, .lp-sub2 { font-size: 11px; }
.lp-field { margin-bottom: 7px; }
.lp-field label { margin-bottom: 3px; }
.lp-submit { margin-top: 2px; padding: 7px 12px 8px; }
.lp-side .lp-mark { transform: translateY(-6px); }
@media (max-width: 1000px) and (min-width: 761px) {
  .lp-shell { grid-template-columns: minmax(0, 1fr); }
  .lp-side { display: none; }
  .login-page { padding: 24px 16px; }
  .lp-theme { top: -52px; left: 0; }
}
/* layout guards: avoid horizontal overflow from full-bleed side panels */
html, body { max-width: 100%; overflow-x: hidden; }
.login-page { width: 100%; overflow-x: clip; }
.lp-shell { width: 100%; }
.lp-side.left { margin-left: -9999px; padding-left: 9999px; }
.lp-side.right { margin-right: -9999px; padding-right: 9999px; }
.lp-side { overflow: hidden; }
@media (max-width: 1000px) {
  .lp-shell { grid-template-columns: 150px minmax(0,1fr) 150px; }
  .lp-wordmark.copper, .lp-tagline.copper { max-width: 140px; text-align: center; }
}
@media (max-width: 760px) {
  .login-page { padding: 84px 14px 28px; }
  .lp-shell { grid-template-columns: minmax(0,1fr); }
  .lp-mark img:not(.lp-hex) { width: 54px; height: 54px; }
  .lp-wordmark { font-size: 22px; margin-top: 8px; }
  .lp-card, .lp-bekam { width: 100%; max-width: 330px; }
  .lp-head h1 { font-size: 25px; }
  .lp-theme { top: 18px; left: 14px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .lp-side { display: none; }
  .login-page { padding: 84px 16px 28px; }
  .lp-theme { top: 20px; left: 0; }
}
@media (max-width: 760px) {
  .login-page { display: flex; flex-direction: column; }
  .lp-shell { order: 2; }
  .lp-side.right { display: flex; order: 3; background: none; margin: 28px 0 0; padding: 0; }
  .lp-side.right .lp-mark { gap: 2px; }
  .lp-side.right img.lp-hex { width: 54px; height: 54px; }
  .lp-side.right .lp-wordmark.copper { font-size: 15px; margin-top: 4px; }
  .lp-side.right .lp-tagline.copper { font-size: 8px; letter-spacing: .1em; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .login-page { display: flex; justify-content: center; align-items: flex-start; }
  .lp-shell { width: auto; }
}


/* ============================================================ app shell
   Egypt surface: dark navy side rail (gold active bar), light content band,
   as in 01-egypt-orders-list / 13b-egypt-side-menu. */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.app-main { min-width: 0; display: flex; flex-direction: column; }

.sb { background: #070d18; border-inline-end: 1px solid #16203a; display: flex;
  flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden; }
.sb-brand { display: grid; gap: 12px; padding: 26px 18px 20px; text-decoration: none; border-bottom: 1px solid #16203a; }
.sb-mark { display: flex; align-items: center; justify-content: center; gap: 10px; }
.sb-mark img { width: 34px; height: 34px; display: block; }
.sb-kl { color: #f2f4f8; font-size: 20px; font-weight: 800; letter-spacing: .12em; }
.sb-mark-gz { gap: 8px; }
.sb-gz-name { color: #f2f4f8; font-size: 17px; font-weight: 800; letter-spacing: .1em; text-align: end; }
.sb-gz-sub { color: var(--gold); font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-align: end; margin-top: 2px; }
.sb-mark-gz .sb-hex { width: 36px; height: 36px; }

.sb-nav { display: block; padding: 10px 0; flex: 1; }
.sb-item { position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 22px; color: #cfd6e4; text-decoration: none; font-size: 15px; }
.sb-item:hover { color: #fff; background: #0d1626; }
.sb-item.on { background: #12203a; color: #fff; font-weight: 600; }
.sb-item.on::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px;
  width: 3px; background: var(--gold); border-radius: 2px; }
.sb-ico { color: var(--gold); font-size: 15px; width: 18px; text-align: center; }
.sb-out { padding: 6px 0 4px; border-top: 1px solid #16203a; }
.sb-who { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 16px 20px 18px; border-top: 1px solid #16203a; }
.sb-who-name { color: #f2f4f8; font-weight: 600; font-size: 14px; }
.sb-who-sub { color: #8b97ad; font-size: 12px; }

/* header */
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
html[data-theme="light"] .app-top { background: #fff; }
.app-top-left { display: flex; align-items: center; gap: 10px; }
.app-top .langs.pill { border-radius: 8px; }
.theme-pill { font: inherit; background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; width: 34px; height: 30px; cursor: pointer; display: grid; place-items: center; }
.theme-pill:hover { color: var(--gold); border-color: var(--gold); }
.app-top-mid { display: grid; justify-items: center; gap: 2px; }
.who-l { font-weight: 600; font-size: 14px; }
.ask-line { font-size: 12px; text-decoration: none; }
.app-top-r { font-size: 13px; }

/* page */
.page-body { padding: 26px 28px 90px; max-width: 1180px; width: 100%; margin: 0 auto; }
.pg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.pg-sub { font-size: 12px; color: var(--muted); max-width: 46%; }
.pg-title { text-align: end; }
.pg-h1 { font-size: 30px; font-weight: 800; line-height: 1.2; }
.pg-h1-en { font-size: 13px; color: var(--muted); margin-top: 4px; }
html[dir="rtl"] .pg-h1 { font-family: Cairo, system-ui, sans-serif; }
.pg-caption { font-size: 12px; color: var(--muted); margin: 0 0 12px; display: flex; gap: 8px; align-items: baseline; }
.pg-sub-en { font-size: 11px; opacity: .85; }
.line-ar { display: block; }
.line-en { display: block; font-size: 10px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
html[dir="rtl"] .line-en { direction: ltr; text-align: start; }

/* orders card + table */
.ord-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
html[data-theme="light"] .ord-card { background: #fff; border-color: #e8e2d4; }
.ord-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.btn-new { display: inline-flex; align-items: center; gap: 8px; background: #16233b; color: #fff;
  border: 1px solid var(--gold); border-radius: 8px; padding: 11px 18px; text-decoration: none; font-weight: 600; }
.btn-new:hover { background: var(--gold); color: #17110a; }
.ord-searchbox { width: min(320px, 100%); }
.ord-search { width: 100%; font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); }
.ord-search-en { font-size: 11px; margin-top: 5px; }
html[dir="rtl"] .ord-search-en { direction: ltr; }

.ord-scroll { overflow-x: auto; }
.ord-table { min-width: 760px; }
.ord-row { display: grid; grid-template-columns: 1.15fr 1fr 1.1fr 1.6fr 1fr 1fr; gap: 12px;
  align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ord-row:hover { background: var(--surface-2); }
.ord-head { background: #0d1626; border-radius: 8px; border-bottom: 0; padding: 10px 12px; }
.ord-head .ord-c { font-size: 12px; font-weight: 600; color: #dfe5ef; }
html[data-theme="light"] .ord-head { background: #16233b; }
html[data-theme="light"] .ord-head .ord-c { color: #f1f4f9; }
.ord-head .line-en { color: #9aa7bd; letter-spacing: .08em; text-transform: uppercase; font-size: 9.5px; }
html[data-theme="light"] .ord-head .line-en { color: #b9c3d4; }
.ord-c { font-size: 13px; min-width: 0; }
.ord-c.c0 { font-weight: 700; letter-spacing: .02em; }
.ord-no { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.ord-when-en { font-size: 11px; }
.st-pill { display: inline-grid; justify-items: center; gap: 0; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; }
.st-pill .line-en { font-size: 9.5px; margin-top: 1px; letter-spacing: 0; }
.st-wait { background: #3a3018; color: #f0cf8a; }
.st-run { background: #17293f; color: #a9c7f0; }
.st-ok { background: #13301f; color: #8fd39e; }
html[data-theme="light"] .st-wait { background: #fdf0d2; color: #7a5a12; }
html[data-theme="light"] .st-run { background: #e4eefc; color: #1f4d86; }
html[data-theme="light"] .st-ok { background: #e2f3e6; color: #1d6b33; }
.ord-empty { padding: 40px 14px; text-align: center; }
.ord-empty-t { font-size: 15px; font-weight: 600; margin-bottom: 4px; }

/* new request */
.nr-head { margin-bottom: 10px; }
.nr-sub-en { font-size: 11.5px; margin: -14px 0 18px; }
.nr-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.nr-tab { display: block; text-decoration: none; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
html[data-theme="light"] .nr-tab { background: #fff; border-color: #e8e2d4; }
.nr-tab:hover { border-color: var(--gold); }
.nr-tab.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
html[data-theme="light"] .nr-tab.on { background: #fdf8ec; }
.nr-tab-ar { font-weight: 700; font-size: 15px; }
.nr-tab-en { font-size: 11px; color: var(--muted); margin-top: 2px; }
html[dir="rtl"] .nr-tab { text-align: start; }

.nr-form { display: grid; gap: 16px; }
.nr-section { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
html[data-theme="light"] .nr-section { background: #fff; border-color: #e8e2d4; }
.nr-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.nr-sec-h .line-ar { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nr-sec-h .line-en { display: inline; font-size: 10.5px; }
.nr-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; margin-bottom: 10px; }
.nr-f { display: grid; gap: 5px; min-width: 0; }
.nr-f label { display: flex; align-items: baseline; gap: 7px; font-size: 11px; color: var(--muted); }
.nr-f label .line-ar { font-weight: 600; }
.nr-f label .line-en { display: inline; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.nr-f input, .nr-f select { font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); width: 100%; min-width: 0; }
html[data-theme="light"] .nr-f input, html[data-theme="light"] .nr-f select { background: #fbfaf7; }
.nr-f input:focus, .nr-f select:focus { outline: 2px solid rgba(184,146,74,.4); border-color: var(--gold); }
.nr-f.req label .line-ar { color: var(--ink); }
.nr-f.req input { border-color: rgba(184,146,74,.55); }
.nr-f input.rl { opacity: .8; }
.nr-hint label { font-size: 10.5px; }
.nr-note { font-size: 12px; margin: -4px 0 12px; display: flex; gap: 8px; align-items: baseline; color: var(--gold-soft); }
.nr-items { display: grid; gap: 10px; margin-bottom: 12px; }
.nr-item { display: grid; grid-template-columns: 1.4fr .9fr .7fr .6fr .7fr 1.3fr 32px; gap: 10px; align-items: end;
  padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
html[dir="rtl"] .nr-item { grid-template-columns: 32px 1.3fr .7fr .6fr .7fr .9fr 1.4fr; }
.nr-item-del { width: 30px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: none;
  color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.nr-item-del:hover { color: var(--red-ink); border-color: var(--red-ink); }
.nr-add { font: inherit; font-size: 13px; background: none; border: 1px dashed var(--gold); color: var(--gold-soft);
  border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.nr-drop { position: relative; display: grid; justify-items: center; gap: 2px; padding: 22px; border-radius: 10px;
  border: 1px dashed var(--line); cursor: pointer; text-align: center; }
.nr-drop:hover, .nr-drop:focus-within { border-color: var(--gold); }
.nr-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.nr-drop-ar { font-size: 13px; }
.nr-drop-en { font-size: 11px; }
.nr-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.nr-file { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.nr-actions { display: flex; justify-content: flex-end; }
.nr-send { display: grid; justify-items: center; gap: 1px; background: #16233b; color: #fff; border: 1px solid var(--gold);
  border-radius: 8px; padding: 10px 30px; cursor: pointer; font: inherit; font-weight: 700; }
.nr-send:hover { background: var(--gold); color: #17110a; }
.nr-send:disabled { opacity: .6; cursor: wait; }
.nr-send .ar { font-size: 16px; }
.nr-send .en { font-size: 10px; letter-spacing: .14em; }
.nr-saved { display: grid; gap: 8px; }

/* Ask Grandizer pill */
.g-fab { position: fixed; inset-inline-start: 26px; bottom: 22px; z-index: 20; display: inline-flex; align-items: center;
  gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px; background: #0f1a2d; color: #fff;
  border: 1px solid #2a3750; cursor: pointer; font: inherit; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
html[dir="rtl"] .g-fab { padding: 6px 6px 6px 18px; }
.g-fab img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.g-fab-t { display: grid; text-align: start; }
.g-fab-ar { font-size: 13px; font-weight: 700; }
.g-fab-en { font-size: 10px; color: #b9c3d4; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; z-index: 15; overflow-x: auto; }
  .sb-brand { padding: 10px 14px; border-bottom: 0; border-inline-end: 1px solid #16203a; }
  .sb-mark { gap: 6px; }
  .sb-mark img { width: 24px; height: 24px; }
  .sb-kl { font-size: 14px; }
  .sb-gz-name { font-size: 12px; }
  .sb-gz-sub { display: none; }
  .sb-nav { display: flex; flex: 1; padding: 0; }
  .sb-item { padding: 12px 12px; font-size: 13px; white-space: nowrap; }
  .sb-item.on::before { inset-inline-start: auto; left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 2px; }
  .sb-out, .sb-who { border-top: 0; padding: 0 10px; }
  .sb-who div { display: none; }
  .page-body { padding: 18px 14px 110px; }
  .pg-head { flex-direction: column-reverse; align-items: flex-start; }
  .pg-sub { max-width: 100%; }
  .pg-title { text-align: start; }
  .pg-h1 { font-size: 24px; }
  .nr-tabs, .nr-grid3 { grid-template-columns: minmax(0, 1fr); }
  .nr-item, html[dir="rtl"] .nr-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nr-item-del { grid-column: 1 / -1; width: 100%; }
  .g-fab { inset-inline-start: 14px; bottom: 14px; }
  .app-top { flex-wrap: wrap; }
  .app-top-mid { order: 3; width: 100%; justify-items: start; }
}

/* side rail: fill the viewport and keep the footer clear of the floating pill */
.sb { min-height: 100vh; }
.sb-who { margin-bottom: 74px; }
@media (max-width: 900px) { .sb { min-height: 0; } .sb-who { margin-bottom: 0; } }


/* ------------------------------------------------- request sent (06-egypt) */
.rs .pg-head { margin-bottom: 6px; }
.rs-caption { font-size: 12px; margin: 0 0 14px; }
.rs-banner { display: flex; flex-direction: column; gap: 10px; border-radius: 8px; margin: 0 0 18px;
  padding: 16px 20px 14px; background: #DAF0E2; color: #0B1220; }
html[dir="rtl"] .rs-banner { align-items: flex-end; }
.rs-banner-ar { font-size: 15px; font-weight: 600; color: #0B1220; }
.rs-banner-en { font-size: 12px; color: #16794a; }
html[dir="rtl"] .rs-banner-ar { direction: rtl; unicode-bidi: plaintext; }
html[dir="rtl"] .rs-banner-en { direction: ltr; }
.rs-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); gap: 18px; align-items: start; }
.rs-card { background: #121C30; border: 1px solid #22304A; border-radius: 10px; overflow: hidden; }
.rs-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 15px 18px 12px; border-bottom: 1px solid var(--line); }
.rs-h-ar { color: var(--gold); font-weight: 700; font-size: 15px; }
.rs-h-en { color: var(--muted); font-size: 10.5px; letter-spacing: .14em; font-weight: 700; }
.rs-card-body { padding: 16px 18px 18px; }
.rs-status { display: grid; gap: 14px; justify-items: start; }
.rs-status .st-pill { font-size: 12px; }
.rs-tl { display: grid; gap: 0; width: 100%; }
.rs-tl-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: var(--muted); font-size: 13px; }
.rs-tl-row.on { color: var(--ink); }
.rs-tl-row .rs-when { min-width: 76px; font-size: 12px; color: var(--muted); }
html[dir="rtl"] .rs-tl-row .rs-when { order: 3; text-align: start; min-width: 0; }
.rs-tl-lbl { display: grid; flex: 1; gap: 1px; }
.rs-tl-lbl .line-en { font-size: 10.5px; color: var(--muted); }
.rs-check { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #2c3b56;
  display: grid; place-items: center; font-size: 11px; line-height: 1; color: transparent; }
.rs-check.on { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.rs-notice { font-size: 12px; margin-top: 2px; }
.rs-summary .rs-sum-ar { font-size: 17px; font-weight: 600; line-height: 1.45; }
.rs-cust { margin-top: 18px; display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.rs-cust-lbl { display: grid; gap: 0; }
.rs-cust-lbl .line-en { font-size: 10.5px; color: var(--muted); }
html[dir="rtl"] .rs-grid { grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr); }
@media (max-width: 900px) { .rs-grid, html[dir="rtl"] .rs-grid { grid-template-columns: 1fr; } }
/* Arabic pages print English under Arabic, as in the mockups: keep the English
   reference line beneath its Arabic partner in either writing direction. */
html[dir="rtl"] .line-en { direction: ltr; text-align: inherit; }
.rs-tl-row .rs-tl-lbl { direction: inherit; }
.rs-banner.en .rs-banner-ar { font-size: 13px; }

/* ---------------------------------------------------- China surface (20-*) */
.app > .sb.cn { order: 0; }
.sb.cn .sb-brand { grid-template-columns: 1fr; gap: 10px; justify-items: start; }
.sb.cn .sb-mark:first-child { justify-content: flex-start; }
.sb.cn .sb-mark-gz { flex-direction: row; }
.sb.cn .sb-gz-name, .sb.cn .sb-gz-sub { text-align: start; }
.sb.cn .sb-item { justify-content: flex-start; gap: 12px; }
.cn-top { justify-content: space-between; }
.app-top-l { font-size: 13px; }
.app-top-right { display: flex; align-items: center; gap: 14px; }
.cn-who { text-align: end; }
.ask-mini { font-size: 11px; color: var(--muted); }
.ask-mini a { color: var(--gold-soft); }
.theme-pill.round { border-radius: 999px; width: 30px; height: 30px; }
.cn-page { max-width: 1320px; padding-top: 18px; }
.cn-head { margin: 0 0 18px; }
.cn-rule { width: 36px; height: 3px; background: var(--gold); border-radius: 2px; margin: 0 0 14px; }
.cn-h1 { font-size: 30px; font-weight: 800; margin: 0 0 2px; line-height: 1.15; }
.cn-sub { color: var(--muted); font-size: 13px; }
.cn-wrap { max-width: 1010px; }
.cn-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
.cn-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px 18px; }
.cn-stat-l { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.cn-stat-v { font-size: 30px; font-weight: 800; margin-top: 8px; line-height: 1.05; }
.cn-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cn-table { display: block; }
.cn-row { display: grid; grid-template-columns: 150px 150px 1fr 1.6fr 70px 80px 110px 80px;
  align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--line); }
.cn-thead { background: #0a1424; border-top: 0; padding: 13px 18px; }
html[data-theme="light"] .cn-thead { background: #f2ede1; }
.cn-thead .cn-c { font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--muted); }
.cn-row .cn-c { font-size: 13.5px; min-width: 0; }
.cn-open { display: inline-block; padding: 6px 16px; border-radius: 7px; border: 1px solid #3a4a68;
  color: var(--ink); text-decoration: none; font-size: 13px; }
.cn-open.gold { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 700; }
.st-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.st-badge.is-new { background: #3a1620; color: #ff8d99; }
html[data-theme="light"] .st-badge.is-new { background: #b02a37; color: #fff; }
.st-badge.is-run { background: #16283f; color: #a9c7f0; border: 1px solid #2c4a72; }
.cn-empty { padding: 26px 18px; }
.cn-foot { text-align: center; font-size: 12px; margin-top: 20px; padding-bottom: 30px; }
@media (max-width: 1100px) {
  .cn-row { grid-template-columns: 120px 120px 1fr 1fr 60px 70px 90px 70px; gap: 8px; }
}
@media (max-width: 860px) {
  .cn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cn-thead { display: none; }
  .cn-row { grid-template-columns: 1fr auto; grid-auto-rows: auto; padding: 14px 16px; row-gap: 4px; }
  .cn-row .cn-c { font-size: 13px; }
  .cn-row .cn-c0 { font-weight: 700; }
  .cn-row .cn-c1, .cn-row .cn-c3, .cn-row .cn-c4, .cn-row .cn-c5 { display: none; }
  .cn-row .cn-c2 { color: var(--muted); }
  .cn-row .cn-c6 { grid-row: 2; }
  .cn-row .cn-c7 { grid-row: 1; grid-column: 2; }
}
