/* The orders table of a made-up shop's admin panel, alone on black. The skeleton bars share one gradient as big as the
   table body: each bar shows its own slice of it (background-size = the body, background-position = minus the bar's
   place), so a single diagonal light crosses every row together. GSAP moves --wave on the body. A GSAP element never
   has a transform in the CSS. */
:root {
  --page: #000000;            /* the page */
  --card-top: #121216;        /* the top of the panel */
  --card-bottom: #0a0a0c;     /* the bottom of the panel */
  --line: rgba(255, 255, 255, 0.07); /* the row lines and the panel edge */
  --ink: #f2f1f5;             /* the values */
  --muted: #85838f;           /* the small words */
  --bone: #1d1d23;            /* the skeleton bars */
  --light: rgba(214, 222, 255, 0.2); /* the wave of light on the bars */
  --paid: #4fdc9f;            /* Paid */
  --shipped: #84a9ff;         /* Shipped */
  --refunded: #f3ad66;        /* Refunded */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  height: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
}

.card {
  --rowh: clamp(34px, 8.6vh, 46px);
  position: relative;
  width: min(580px, calc(100vw - 24px));
  border-radius: 18px;
  padding: clamp(12px, 3.2vh, 20px) clamp(12px, 3.4vw, 22px) clamp(8px, 2vh, 12px);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px var(--line),
    0 1px 1px rgba(255, 255, 255, 0.02),
    0 30px 80px -30px rgba(110, 130, 255, 0.16);
  overflow: hidden;
  isolation: isolate;
}
.card__glow {
  position: absolute; inset: -40% -10% auto auto;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(140, 160, 255, 0.09), transparent 70%);
  pointer-events: none; z-index: -1;
}
.card__grain {
  position: absolute; inset: 0; pointer-events: none; z-index: -1; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* head */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: clamp(8px, 2.2vh, 14px); }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); letter-spacing: 0.01em; margin-bottom: 3px; }
.crumb svg { width: 6px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.6; }
.title { font-size: clamp(17px, 2.4vw, 20px); font-weight: 600; font-stretch: 108%; letter-spacing: -0.01em; }
.head__side { display: flex; align-items: center; gap: 10px; }

.count { position: relative; height: 18px; min-width: 112px; overflow: hidden; font-size: 12px; color: var(--muted); text-align: right; }
.count__in { position: absolute; right: 0; top: 0; line-height: 18px; white-space: nowrap; }
.count__done { opacity: 0; color: var(--ink); }
.count__word { color: var(--muted); margin-left: 4px; }
.ell i { font-style: normal; display: inline-block; }

.reload {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px 0 9px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--ink);
  background: linear-gradient(180deg, #202027, #17171c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 10px -4px rgba(0, 0, 0, 0.8);
  transition: box-shadow 0.25s, color 0.25s;
}
.reload__ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reload:focus-visible { outline: 2px solid var(--shipped); outline-offset: 3px; }
.reload:disabled { cursor: default; }
@media (hover: hover) {
  .reload:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 14px -4px rgba(0, 0, 0, 0.8); }
  .body .row:hover { background: rgba(255, 255, 255, 0.025); }
}

/* table */
.table { font-size: clamp(11.5px, 1.9vw, 13px); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 0.8fr 1.9fr 1.1fr 1.15fr;
  align-items: center;
  gap: 10px;
  height: var(--rowh);
  padding: 0 6px;
  border-radius: 10px;
  transition: background 0.25s;
}
.row--head { height: 28px; color: var(--muted); font-size: 11px; letter-spacing: 0.02em; }
.row--head::after, .row__line { content: ""; position: absolute; left: 6px; right: 6px; bottom: 0; height: 1px; background: var(--line); }
.row__line { transform-origin: left center; }
.body .row:last-child .row__line { display: none; }
.c--amt { text-align: right; justify-self: end; }
.c--st { justify-self: end; }

.cell { position: relative; display: flex; align-items: center; min-width: 0; height: 100%; }
.c--amt.cell, .c--st.cell { justify-content: flex-end; justify-self: stretch; }
.body .row:nth-child(2) { --w1: 0.84; --w2: 0.78; --w3: 1.2; }
.body .row:nth-child(3) { --w1: 0.94; --w2: 1.08; --w3: 0.72; }
.body .row:nth-child(4) { --w1: 0.88; --w2: 0.7; --w3: 0.95; }
.body .row:nth-child(5) { --w1: 0.96; --w2: 0.9; --w3: 0.85; }

/* the skeleton bars: one gradient as big as the body, each bar shows its slice */
.sk {
  position: absolute; top: 50%; height: 9px; margin-top: -4.5px; border-radius: 99px;
  background-color: var(--bone);
  background-image: linear-gradient(118deg,
    transparent calc(var(--wave, -30%) - 14%),
    var(--light) var(--wave, -30%),
    transparent calc(var(--wave, -30%) + 14%));
  background-size: var(--bw, 100%) var(--bh, 100%);
  background-position: calc(var(--bx, 0px) * -1) calc(var(--by, 0px) * -1);
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.c--id .sk { left: 0; width: calc(72% * var(--w1, 1)); }
.c--who .sk { left: 30px; width: calc(58% * var(--w2, 1)); }
.c--amt .sk, .c--st .sk { right: 0; }
.c--amt .sk { width: calc(52% * var(--w3, 1)); }
.sk--av { left: 0 !important; width: 20px !important; height: 20px !important; margin-top: -10px !important; }

.val { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; opacity: 0; }
.c--id .val { color: var(--muted); font-variant-numeric: tabular-nums; }
.who__name { overflow: hidden; text-overflow: ellipsis; }
.av {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 8.5px; font-weight: 600; letter-spacing: 0.02em; color: #0a0a0c;
  background: linear-gradient(150deg, var(--a1), var(--a2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.amt { font-weight: 500; font-variant-numeric: tabular-nums; }

/* rolling digits */
.num { display: inline-flex; font-variant-numeric: tabular-nums; line-height: 1.3em; height: 1.3em; }
.dg__s { display: inline-block; height: 1.3em; line-height: 1.3em; vertical-align: top; }
.dg { position: relative; display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; vertical-align: top; }
.dg__w { visibility: hidden; }
.dg__strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; text-align: center; }
.dg__strip b { font-weight: inherit; height: 1.3em; }

/* status pill */
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px 0 7px; border-radius: 99px; font-size: 11px; font-weight: 500;
  color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 26%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden; min-width: 80px; justify-content: center;
}
.pill svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill .sk.pill__fill { inset: 0; top: 0; height: auto; margin: 0; border-radius: inherit; transform-origin: right center; z-index: 1; }
.pill__in { position: relative; display: inline-flex; align-items: center; gap: 5px; }
.pill--paid { --tint: var(--paid); }
.pill--shipped { --tint: var(--shipped); }
.pill--refunded { --tint: var(--refunded); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 420px) {
  .row { gap: 6px; padding: 0 2px; grid-template-columns: 0.75fr 1.7fr 1.15fr 1.25fr; }
  .row--head::after, .row__line { left: 2px; right: 2px; }
  .count { min-width: 92px; font-size: 11px; }
  .reload { padding: 0 9px 0 8px; }
  .reload__word { display: none; }
  .pill { padding: 0 7px 0 6px; font-size: 10.5px; }
  .pill { min-width: 68px; }
}
