:root {
  --midnight: #070b18;
  --midnight-2: #101932;
  --tigris: #1657ff;
  --tigris-600: #0f43cf;
  --violet: #7a3cff;
  --gold: #ffb020;
  --paper: #f2f5fb;
  --card: #ffffff;
  --ink: #0d1424;
  --muted: #5c6880;
  --line: #e3e8f3;
  --line-strong: #c9d4ee;
  --surface-2: #eef2fb;
  --surface-3: #fafbff;
  --field-bg: #ffffff;
  --field-border: #d7deee;
  --text-2: #3a4258;
  --topbar-bg: rgba(255, 255, 255, .92);
  --ok: #0f9d6b;
  --ok-bg: #e6f6ef;
  --warn: #b47500;
  --warn-bg: #fdf3e0;
  --bad: #cf2f3c;
  --bad-bg: #fdecee;
  --info: #1657ff;
  --info-bg: #e8eeff;
  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow-s: 0 1px 2px rgba(13, 20, 36, .06);
  --shadow: 0 2px 6px rgba(13, 20, 36, .05), 0 14px 34px rgba(13, 20, 36, .07);
  --shadow-lift: 0 8px 18px rgba(13, 20, 36, .08), 0 26px 54px rgba(13, 20, 36, .12);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Sora", var(--sans);
}

html[dir="rtl"] {
  --sans: "Cairo", system-ui, "Segoe UI", sans-serif;
  --display: "Cairo", var(--sans);
}

* { box-sizing: border-box; }

html, body { padding: 0; margin: 0; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tigris); text-decoration: none; }
a:hover { color: var(--tigris-600); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.2; letter-spacing: -.015em; }

:focus-visible {
  outline: 3px solid rgba(22, 87, 255, .45);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { width: min(1220px, 92vw); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--topbar-bg);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img, .brand .brand-mark {
  width: 38px; height: 38px; border-radius: 11px; object-fit: cover;
  background: linear-gradient(135deg, var(--tigris), var(--violet));
  color: #fff; display: grid; place-items: center; font-size: 16px;
}
.brand span.accent { color: var(--tigris); }
.brand small {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--muted); align-self: flex-end; padding-bottom: 4px;
}

.mainnav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.mainnav a, .drop-btn {
  padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 14.5px;
}
.mainnav a:hover, .drop-btn:hover { background: var(--surface-2); color: var(--ink); }
.drop-btn { font-family: inherit; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.drop-btn i { width: 7px; height: 7px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(45deg); margin-block-start: -4px; }
.has-drop { position: relative; }
.drop {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; min-width: 224px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 8px; display: none; z-index: 70;
}
.has-drop.is-open .drop { display: block; }
.drop a { display: block; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.drop a:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a.is-active { color: var(--tigris); background: var(--info-bg); }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.mainnav + .topbar-actions { margin-inline-start: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: 13px; color: var(--ink); background: var(--card);
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: block; }

.nav-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-s);
  padding: 10px 16px; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--tigris), #3d6bff); color: #fff; box-shadow: 0 6px 16px rgba(22, 87, 255, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 22px rgba(22, 87, 255, .34); transform: translateY(-1px); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; background: #182338; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { color: #fff; background: #0c8a5d; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-bad:hover { color: #fff; background: #b32833; }
.btn-sm { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(122, 60, 255, .55), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(22, 87, 255, .45), transparent 62%),
    linear-gradient(160deg, #070b18 0%, #0d1730 55%, #101021 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px;
  padding: 68px 0 76px; align-items: center;
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; margin-bottom: 18px; }
.hero p { color: #b8c2dd; max-width: 56ch; font-size: 16px; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .24); color: #fff; }
.hero-cta .btn-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 34px; }
.hero-facts div { max-width: 170px; }
.hero-facts strong { display: block; font-family: var(--display); font-size: 22px; }
.hero-facts span { font-size: 13px; color: #9aa6c6; line-height: 1.45; display: block; }

.flow-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-l);
  padding: 22px;
  backdrop-filter: blur(6px);
}
.flow-card h3 { font-size: 15px; color: #dfe6f8; font-weight: 600; margin-bottom: 16px; }
.flow-step { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.flow-step:first-of-type { border-top: 0; }
.flow-step i {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: rgba(22, 87, 255, .28); color: #cfd9ff; font-style: normal; font-size: 13px; font-weight: 700;
}
.flow-step b { display: block; font-size: 14px; font-weight: 600; color: #fff; }
.flow-step small { color: #93a0c2; font-size: 12.5px; }
.flow-code {
  margin-top: 14px; background: rgba(4, 7, 16, .6); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: #a9ffd8; overflow-x: auto; direction: ltr; text-align: left;
}

.notice-strip {
  background: var(--card); border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted); padding: 10px 0;
}
.notice-strip b { color: var(--ink); }

.section { padding: 44px 0 6px; }
.section:last-of-type { padding-bottom: 40px; }
.section-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.section-icon {
  width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-s); padding: 8px;
}
.section-head h2 { font-size: 23px; font-weight: 700; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.section-head .link-all { margin-inline-start: auto; font-weight: 600; font-size: 14px; white-space: nowrap; }

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px;
}

.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  text-align: center;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.product:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.product-img { width: 54px; height: 54px; margin-inline: auto; object-fit: contain; }
.product h3 { font-size: 15.5px; font-weight: 650; }
.product .sku { font-size: 11.5px; color: #93a0b8; font-family: ui-monospace, Menlo, monospace; direction: ltr; }
.product .price {
  font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em;
  display: inline-flex; align-items: baseline; gap: 6px; justify-content: center; direction: ltr;
}
.product .price em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--tigris); background: var(--info-bg); padding: 3px 7px; border-radius: 6px; }
.product .btn { margin-top: auto; }
.product.is-out { opacity: .72; }
.product .flag {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg);
  padding: 3px 8px; border-radius: 999px;
}

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.panel-head h2, .panel-head h3 { font-size: 16.5px; font-weight: 650; }
.panel-head .spacer { margin-inline-start: auto; }
.panel-body { padding: 20px; }

.page-head { padding: 30px 0 6px; }
.page-head h1 { font-size: 28px; font-weight: 700; }
.page-head p { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }

.alert { border-radius: var(--radius-s); padding: 12px 15px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: #0a6b48; border-color: #b9e6d3; }
.alert-error { background: var(--bad-bg); color: #9b1f2a; border-color: #f4c6ca; }
.alert-info { background: var(--info-bg); color: #123ea8; border-color: #c7d6ff; }
.alert-warn { background: var(--warn-bg); color: #8a5900; border-color: #f0dcb2; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field span small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 500; color: var(--ink);
  border: 1px solid var(--field-border); background: var(--field-bg); border-radius: var(--radius-s);
  padding: 11px 13px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--tigris); box-shadow: 0 0 0 3px rgba(22, 87, 255, .14); outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.form-note { font-size: 13px; color: var(--muted); }

.auth-body { background: linear-gradient(160deg, #070b18, #14203f 60%, #1b1440); min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 40px 18px; }
.auth-card { width: min(430px, 100%); background: var(--card); border-radius: var(--radius-l); padding: 32px; box-shadow: 0 30px 80px rgba(4, 8, 20, .45); }
.auth-title { font-size: 24px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.auth-foot { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-back { display: block; text-align: center; margin-top: 20px; color: #b9c4e0; font-size: 13.5px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; white-space: nowrap; }
table.data th { font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface-3); }
table.data tbody tr:hover { background: var(--surface-3); }
table.data td.wrap-cell { white-space: normal; min-width: 220px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; direction: ltr; unicode-bidi: embed; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: #0a6b48; }
.badge-warn { background: var(--warn-bg); color: #8a5900; }
.badge-bad { background: var(--bad-bg); color: #9b1f2a; }
.badge-info { background: var(--info-bg); color: #123ea8; }
.badge-muted { background: var(--surface-2); color: var(--muted); }

.pager { display: flex; gap: 6px; padding: 14px 20px; }
.pager a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 13.5px; font-weight: 600; background: var(--card); }
.pager a.is-current { background: var(--tigris); color: #fff; border-color: var(--tigris); }

.layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; padding: 28px 0 60px; align-items: start; }
.side-nav { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-s); position: sticky; top: 88px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.is-active { background: var(--tigris); color: #fff; }
.side-balance { padding: 16px; border-radius: 12px; background: linear-gradient(135deg, #0d1730, #23306a); color: #fff; margin-bottom: 10px; }
.side-balance span { font-size: 12.5px; color: #a8b4d6; }
.side-balance strong { display: block; font-family: var(--display); font-size: 26px; direction: ltr; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-s); }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-family: var(--display); font-size: 26px; margin-top: 4px; direction: ltr; text-align: start; }
.stat.accent { background: linear-gradient(135deg, #0d1730, #262f66); color: #fff; border-color: transparent; }
.stat.accent span { color: #a8b4d6; }

.wallet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.wallet-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--card); }
.wallet-card h3 { font-size: 16px; margin-bottom: 4px; }
.wallet-card .net { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.qr-box { width: 164px; height: 164px; margin-inline: auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; }
.qr-box img, .qr-box canvas { width: 100%; height: 100%; display: block; }
.qr-box table { border-collapse: collapse; }
.qr-fallback { font-size: 12px; color: #5c6880; text-align: center; padding: 0 10px; }
.qr-box img + .qr-fallback, .qr-box canvas + .qr-fallback { display: none; }
.qr-box:not(.qr-failed) .qr-fallback { display: none; }
.addr {
  margin-top: 14px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.addr code { flex: 1; font-size: 12px; word-break: break-all; direction: ltr; }

.code-block {
  background: #0b1120; color: #d8e3ff; border-radius: 12px; padding: 16px 18px;
  overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.8px; line-height: 1.65; direction: ltr; text-align: left; margin: 0 0 16px;
}
.code-block .k { color: #7fd1ff; }
.code-block .s { color: #a5f3c4; }

.docs { display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: start; }
.docs-nav { position: sticky; top: 88px; border-inline-start: 2px solid var(--line); padding-inline-start: 14px; }
.docs-nav a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.docs-nav a:hover { color: var(--tigris); }
.docs-body h2 { font-size: 22px; margin: 34px 0 10px; scroll-margin-top: 90px; }
.docs-body h3 { font-size: 16.5px; margin: 24px 0 8px; scroll-margin-top: 90px; }
.docs-body p { color: var(--text-2); max-width: 74ch; }
.docs-body ul { color: var(--text-2); padding-inline-start: 20px; }
.endpoint {
  display: inline-flex; align-items: center; gap: 10px; background: #0b1120; color: #fff;
  border-radius: 10px; padding: 8px 14px; font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  direction: ltr; margin-bottom: 10px;
}
.endpoint b { color: var(--gold); font-weight: 700; }

.site-footer { background: var(--midnight); color: #98a4c2; margin-top: 50px; padding: 44px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.site-footer a { color: #98a4c2; display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 28px; padding-top: 18px; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }
.chain-pill { display: inline-block; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 4px 11px; font-size: 12px; margin-inline-end: 6px; }

.admin { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.admin-side { background: var(--midnight); color: #97a3c4; padding: 20px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #fff; margin-bottom: 22px; }
.admin-side .brand small { color: #6f7ca0; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; color: #a4b0d0; font-weight: 600; font-size: 14px; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-side nav a.is-active { background: linear-gradient(135deg, var(--tigris), #4d78ff); color: #fff; }
.admin-side .side-foot { margin-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 16px; font-size: 13px; }
.admin-main { padding: 26px 30px 60px; background: var(--paper); min-width: 0; }
.admin-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-head h1 { font-size: 24px; }
.admin-head .spacer { margin-inline-start: auto; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { min-width: 170px; }
.inline-form { display: inline; }

.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill-tabs a { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.pill-tabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.picker label {
  border: 2px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; cursor: pointer;
  display: block; background: var(--card); font-size: 11.5px; color: var(--muted);
}
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.picker img { width: 40px; height: 40px; margin-inline: auto; margin-bottom: 6px; object-fit: contain; }
.picker input:checked + span { color: var(--tigris); font-weight: 700; }
.picker label:has(input:checked) { border-color: var(--tigris); box-shadow: 0 0 0 3px rgba(22, 87, 255, .12); }

.track-panel .panel-body { padding: 34px 20px 26px; }
.track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-block-end: 8px;
}
.track-step { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; position: relative; z-index: 2; }
.track-icon { font-size: 30px; line-height: 1; filter: grayscale(1) opacity(.45); transition: filter .25s ease, transform .25s ease; }
.track-label { font-family: var(--display); font-weight: 700; font-size: 15.5px; color: var(--muted); transition: color .25s ease; }
.track-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--line);
  display: grid; place-items: center; color: #fff;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.track-step.is-done .track-icon, .track-step.is-current .track-icon { filter: none; transform: translateY(-2px); }
.track-step.is-done .track-label { color: var(--ok); }
.track-step.is-done .track-dot { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 6px var(--ok-bg); }
.track-step.is-current .track-label { color: var(--warn); }
.track-step.is-current .track-dot {
  background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 0 0 rgba(255, 176, 32, .55);
  animation: track-pulse 1.8s ease-out infinite;
}
.track-line {
  position: absolute;
  inset-inline: calc(16.6% + 19px);
  inset-block-end: 19px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  transform: translateY(50%);
  overflow: hidden;
  z-index: 1;
}
.track-line span {
  display: block; height: 100%; width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--ok), #38c98d);
  border-radius: 999px;
  transition: width .5s ease;
}
.track.is-cancelled .track-line span { background: var(--bad); }
.track.is-cancelled .track-dot { border-color: var(--bad); }
@keyframes track-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 176, 32, .5); }
  70% { box-shadow: 0 0 0 14px rgba(255, 176, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0); }
}

.delivered-box { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 18px; }
.delivered-box h3 { font-size: 15px; margin-bottom: 10px; }
.delivered-code {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; font-size: 14px;
}
.receipt-large { display: block; max-width: 320px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.track-link { font-size: 12px; font-weight: 600; }

.receipt-thumb {
  display: inline-block; width: 46px; height: 46px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
}
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.receipt-thumb:hover { border-color: var(--tigris); }
.receipt-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 17px; margin-bottom: 6px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.summary-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.summary-line:last-child { border-bottom: 0; font-size: 17px; font-weight: 700; font-family: var(--display); }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 44px 0 52px; }
  .layout, .docs { grid-template-columns: 1fr; }
  .side-nav, .docs-nav { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { display: flex; flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; margin-inline-start: auto; background: var(--card); border: 1px solid var(--line); color: var(--ink);
    border-radius: 10px; padding: 8px 11px; cursor: pointer;
  }
  .mainnav {
    position: absolute; inset-inline: 0; top: 68px; flex-direction: column; align-items: stretch;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 5vw 16px; display: none; gap: 2px;
  }
  .topbar-inner.is-open .mainnav { display: flex; }
  .drop-btn { display: none; }
  .drop { position: static; display: block; border: 0; box-shadow: none; padding: 0; background: none; min-width: 0; }
  .drop a { padding-inline-start: 22px; }
  .topbar-inner.is-open .topbar-actions { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn { padding: 8px 11px; font-size: 13px; }
  .grid-products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .track { grid-template-columns: 1fr; gap: 0; }
  .track-step { flex-direction: row; gap: 12px; text-align: start; padding: 12px 0; }
  .track-dot { order: -1; flex: none; }
  .track-icon { order: 2; }
  .track-label { flex: 1; }
  .track-line { inset-inline: auto; inset-inline-start: 18px; inset-block: 26px 26px; width: 6px; height: auto; transform: none; }
  .track-line span { width: 100%; height: var(--fill, 0%); background: linear-gradient(180deg, var(--ok), #38c98d); }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 20px 5vw 50px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #080d1a;
  --card: #111a2e;
  --ink: #e9eefb;
  --muted: #93a0bd;
  --text-2: #c2cbe1;
  --line: #24304a;
  --line-strong: #3a4a70;
  --surface-2: #1a2440;
  --surface-3: #16203a;
  --field-bg: #0d1526;
  --field-border: #2c3956;
  --topbar-bg: rgba(12, 19, 35, .9);
  --ok-bg: rgba(15, 157, 107, .18);
  --warn-bg: rgba(255, 176, 32, .16);
  --bad-bg: rgba(207, 47, 60, .18);
  --info-bg: rgba(22, 87, 255, .22);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .45);
  --shadow-lift: 0 10px 24px rgba(0, 0, 0, .5), 0 28px 60px rgba(0, 0, 0, .55);
}

html[data-theme="dark"] .alert-success, html[data-theme="dark"] .badge-ok { color: #56d3a0; border-color: rgba(86, 211, 160, .3); }
html[data-theme="dark"] .alert-error, html[data-theme="dark"] .badge-bad { color: #ff8b96; border-color: rgba(255, 139, 150, .3); }
html[data-theme="dark"] .alert-info, html[data-theme="dark"] .badge-info { color: #8fb0ff; border-color: rgba(143, 176, 255, .3); }
html[data-theme="dark"] .alert-warn, html[data-theme="dark"] .badge-warn { color: #ffc861; border-color: rgba(255, 200, 97, .3); }
html[data-theme="dark"] .btn-dark { background: #2a3654; color: #fff; }
html[data-theme="dark"] .btn-dark:hover { background: #35446a; }
html[data-theme="dark"] .pill-tabs a.is-active { background: var(--tigris); border-color: var(--tigris); color: #fff; }
html[data-theme="dark"] .product .sku { color: var(--muted); }
html[data-theme="dark"] .notice-strip { background: var(--card); }
html[data-theme="dark"] .admin-main { background: var(--paper); }
html[data-theme="dark"] .admin-side, html[data-theme="dark"] .site-footer { background: #060a15; }
html[data-theme="dark"] .code-block, html[data-theme="dark"] .endpoint { background: #060c1a; border: 1px solid var(--line); }
html[data-theme="dark"] .field input::placeholder, html[data-theme="dark"] .field textarea::placeholder { color: #64718f; }
