/* ═══════════════════════════════════════════════════════════════════════════════
   SokoniMerchantDashboard — premium, emoji-forward, unmistakably SOKONI
   ═══════════════════════════════════════════════════════════════════════════════
   Premium fintech with personality: large intentional emoji, generous type, deep colour,
   restrained motion. Not a children's app, not a Bootstrap dashboard.

   IT INHERITS THE SHELL'S TOKENS. Colours come from --sk-* / --txt / --bg where the shell
   defines them, with fallbacks so the module still renders standalone. One override
   surface, per the design system — this file adds no global resets and no !important.

   MOTION IS OPT-OUT. Every animation sits behind prefers-reduced-motion, and the pulse is
   additionally gated in JS so an unknown value never moves. Delight a merchant cannot
   switch off is noise.
   ═══════════════════════════════════════════════════════════════════════════════ */

.sd {
  --sd-r: 20px;
  --sd-gap: 14px;
  --sd-ink: var(--txt, #0d1117);
  --sd-sub: var(--txt3, #6b7280);
  --sd-card: var(--card, #fff);
  --sd-line: var(--line, rgba(0,0,0,.07));
  display: flex; flex-direction: column; gap: 22px;
  padding: 4px 0 28px;
  color: var(--sd-ink);
}

/* ── Greeting ─────────────────────────────────────────────────────────────── */
.sd-hi-t {
  font-size: clamp(21px, 5.2vw, 27px); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.2;
}
.sd-hi-s { margin-top: 3px; font-size: 14px; color: var(--sd-sub); font-weight: 600; }

/* ── HERO ─────────────────────────────────────────────────────────────────────
   The day's money. Deep gradient so it reads as the centre of gravity — and a visibly
   quieter treatment when the figure is unknown, so "we don't know" never wears the same
   confident skin as a real number. */
.sd-hero {
  position: relative; overflow: hidden;
  border-radius: var(--sd-r);
  padding: 22px 20px 18px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, #2b6cf6 0%, transparent 55%),
    radial-gradient(120% 140% at 0% 100%, #7b3fe4 0%, transparent 55%),
    linear-gradient(135deg, #101a35 0%, #17224a 100%);
  box-shadow: 0 14px 34px rgba(16,26,53,.24);
}
.sd-hero::after {                      /* the slow SOKONI shimmer — decoration only */
  content: ''; position: absolute; inset: -40% -10% auto -10%; height: 70%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
  transform: translateX(-60%); animation: sd-sheen 7s ease-in-out infinite;
  pointer-events: none;
}
.sd-hero-unknown {
  background: linear-gradient(135deg, #1b2130 0%, #232a3b 100%);
  box-shadow: 0 10px 26px rgba(16,26,53,.16);
}
.sd-hero-unknown::after { animation: none; }

.sd-hero-l { font-size: 13px; font-weight: 700; letter-spacing: .04em;
             text-transform: uppercase; opacity: .82; }
.sd-hero-l span { font-size: 15px; }
.sd-hero-v {
  margin-top: 6px;
  font-size: clamp(34px, 9.4vw, 50px); font-weight: 850;
  letter-spacing: -.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.sd-hero-unknown .sd-hero-v { opacity: .55; font-weight: 700; }
.sd-trend { margin-top: 4px; font-size: 14px; font-weight: 700; color: #6ee7a8; }
/* The reason a figure is unknown, said plainly rather than hidden in a tooltip. */
.sd-why  { margin-top: 6px; font-size: 12.5px; font-weight: 600; opacity: .62; }

.sd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(255,255,255,.11);
  font-size: 13px; font-weight: 650;
}
.sd-chip-e { font-size: 11px; }
.sd-chip b { font-variant-numeric: tabular-nums; font-weight: 800; }
.sd-chip-unknown { opacity: .5; }
.sd-part {
  margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,.16); font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.sd-h {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: 12.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--sd-sub);
}
.sd-h span { font-size: 15px; }

/* ── Quick actions ────────────────────────────────────────────────────────── */
.sd-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sd-gap); }
@media (max-width: 360px) { .sd-acts { grid-template-columns: repeat(2, 1fr); } }

.sd-act {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 18px 8px 15px;
  border: 1px solid var(--sd-line); border-radius: 18px;
  background: var(--sd-card); color: var(--sd-ink);
  font: inherit; cursor: pointer;
  /* 44px minimum touch target, comfortably exceeded */
  min-height: 92px;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s ease;
  animation: sd-rise .42s cubic-bezier(.2,.8,.3,1) backwards;
  animation-delay: calc(var(--i, 0) * 42ms);
}
.sd-act::before {                     /* the tone wash, per action */
  content: ''; position: absolute; inset: 0; opacity: .1;
  background: var(--sd-tone, #2b6cf6); transition: opacity .18s ease;
}
.sd-act:hover  { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16,26,53,.10); }
.sd-act:active { transform: translateY(0) scale(.97); }
.sd-act:active::before { opacity: .2; }
.sd-act:focus-visible { outline: 3px solid #2b6cf6; outline-offset: 2px; }
.sd-act-e { position: relative; font-size: 27px; line-height: 1; }
.sd-act-l { position: relative; font-size: 13px; font-weight: 750; letter-spacing: -.01em; }

.sd-ta { --sd-tone: #16a34a; }   /* Sell     */
.sd-tb { --sd-tone: #2b6cf6; }   /* Orders   */
.sd-tc { --sd-tone: #7b3fe4; }   /* Products */
.sd-td { --sd-tone: #e0791b; }   /* Messages */
.sd-te { --sd-tone: #0891b2; }   /* Track    */
.sd-tf { --sd-tone: #c2410c; }   /* Payments */

/* ── Your shop today ──────────────────────────────────────────────────────── */
.sd-ins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.sd-in {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--sd-line); border-radius: 15px;
  background: var(--sd-card);
  animation: sd-slide .44s cubic-bezier(.2,.8,.3,1) backwards;
  animation-delay: calc(var(--i, 0) * 65ms);
}
.sd-in[data-go] { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.sd-in[data-go]:hover { transform: translateX(2px); box-shadow: 0 6px 16px rgba(16,26,53,.08); }
.sd-in[data-go]:focus-visible { outline: 3px solid #2b6cf6; outline-offset: 2px; }
.sd-in-e { font-size: 21px; line-height: 1; flex: 0 0 auto; }
.sd-in-t { font-size: 14.5px; font-weight: 650; line-height: 1.35; }
/* D7: the quiet "N products don’t track stock" note under the low-stock line */
.sd-in-note { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--sd-sub); }

.sd-empty {
  margin: 0; padding: 18px 16px;
  border: 1px dashed var(--sd-line); border-radius: 15px;
  font-size: 14px; font-weight: 600; color: var(--sd-sub); line-height: 1.45;
}

/* ── Motion ───────────────────────────────────────────────────────────────── */
@keyframes sd-rise  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sd-slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes sd-sheen { 0%, 62% { transform: translateX(-60%); } 100% { transform: translateX(160%); } }

@media (prefers-reduced-motion: reduce) {
  .sd-act, .sd-in { animation: none; }
  .sd-hero::after { animation: none; }
  .sd-act:hover, .sd-in[data-go]:hover { transform: none; }
  .sd-act, .sd-in { transition: none; }
}

/* ── Dark ─────────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .sd {
    --sd-ink: var(--txt, #e6e9ef);
    --sd-sub: var(--txt3, #98a2b3);
    --sd-card: var(--card, #161b26);
    --sd-line: var(--line, rgba(255,255,255,.09));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   💰 MONEY — visually distinct from operational metrics, on purpose
   ═══════════════════════════════════════════════════════════════════════════════
   A merchant must be able to tell at a glance what SOKONI earned from what THEY earned.
   So commission gets its own card with its own colour identity — warm, not the blue of
   the operational hero — and the deduction is styled as a deduction while the net is
   styled as theirs. Nothing here shares a treatment with a partial count. */

.sd-per {
  margin-left: auto; padding: 2px 8px; border-radius: 999px;
  background: var(--sd-line); font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; color: var(--sd-sub); text-transform: none;
}

.sd-comm {
  position: relative; overflow: hidden;
  border-radius: var(--sd-r); padding: 20px 18px 16px;
  color: #fff;
  background:
    radial-gradient(120% 150% at 0% 0%, #f0a020 0%, transparent 58%),
    linear-gradient(135deg, #7a3a10 0%, #4a2109 100%);
  box-shadow: 0 12px 30px rgba(122,58,16,.26);
}
.sd-comm-l { font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
             text-transform: uppercase; opacity: .85; }
.sd-comm-v {
  margin-top: 5px; font-size: clamp(28px, 7.4vw, 38px); font-weight: 850;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.08;
}
.sd-comm-r { margin-top: 3px; font-size: 12.5px; font-weight: 650; opacity: .74; }

/* The flow: pays → commission → receives. An ordered list because it IS an order. */
.sd-flow { list-style: none; margin: 16px 0 0; padding: 0;
           border-top: 1px solid rgba(255,255,255,.15); }
.sd-flow-i {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sd-flow-i:last-child { border-bottom: 0; }
.sd-flow-e { font-size: 15px; line-height: 1; }
.sd-flow-k { font-weight: 600; opacity: .9; }
.sd-flow-v { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.sd-flow-cut .sd-flow-v { color: #ffc9a3; }          /* a deduction reads as a deduction */
.sd-flow-net { padding-top: 12px; }
.sd-flow-net .sd-flow-k { font-weight: 750; opacity: 1; }
.sd-flow-net .sd-flow-v { color: #86efac; font-size: 16px; }  /* the merchant's own */

.sd-comm-a {
  margin-top: 14px; width: 100%;
  padding: 11px 14px; min-height: 44px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 12px;
  background: rgba(255,255,255,.1); color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.sd-comm-a:hover  { background: rgba(255,255,255,.17); }
.sd-comm-a:active { transform: scale(.985); }
.sd-comm-a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Pending payout / available balance — quieter than commission, still money. */
.sd-money2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sd-gap); margin-top: var(--sd-gap); }   /* minmax(0,…): see .sd-pulse */
@media (max-width: 340px) { .sd-money2 { grid-template-columns: minmax(0, 1fr); } }
.sd-mt {
  padding: 15px 15px 13px;
  border: 1px solid var(--sd-line); border-radius: 16px;
  background: var(--sd-card);
}
.sd-mt-l { font-size: 12px; font-weight: 700; color: var(--sd-sub); letter-spacing: .02em; }
.sd-mt-v {
  margin-top: 5px; font-size: clamp(18px, 4.6vw, 22px); font-weight: 800;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.sd-mt-unknown .sd-mt-v { opacity: .45; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .sd-comm-a { transition: none; }
  .sd-comm-a:active { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🔥 BUSINESS PULSE · period chips · areas · Merchant V2
   ═══════════════════════════════════════════════════════════════════════════════ */

/* minmax(0, 1fr), not 1fr: a 1fr track's minimum is its content's min-content, and an unknown
   tile's reason line is ONE ellipsised line on phones (white-space: nowrap) — so a long reason
   widened its column past the screen (measured: page 715px wide at 360px, browser gate
   test-metric-pages-browser.js M360-E-O). With a 0 minimum the ellipsis does its job. */
.sd-pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 460px) { .sd-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sd-pt {
  padding: 15px 12px 13px;
  border: 1px solid var(--sd-line); border-radius: 16px;
  background: var(--sd-card);
  animation: sd-rise .4s cubic-bezier(.2,.8,.3,1) backwards;
}
.sd-pt:nth-child(1) { animation-delay: 0ms; }
.sd-pt:nth-child(2) { animation-delay: 55ms; }
.sd-pt:nth-child(3) { animation-delay: 110ms; }
.sd-pt:nth-child(4) { animation-delay: 165ms; }
.sd-pt-e { font-size: 19px; line-height: 1; }
.sd-pt-v {
  margin-top: 7px; font-size: clamp(19px, 5vw, 24px); font-weight: 850;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.05;
}
.sd-pt-l { margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--sd-sub); }
/* The reason a pulse figure is unknown, on the tile — not hidden in a tooltip a
   merchant on a phone can never open. */
.sd-pt-w { margin-top: 5px; font-size: 10.5px; font-weight: 600; color: var(--sd-sub);
           opacity: .8; line-height: 1.3; }
.sd-pt-unknown .sd-pt-v { opacity: .4; font-weight: 700; }
/* The reason ANY unknown figure carries (chips, money flow, money tiles, sparkline) —
   visible on the figure itself, because phones have no hover. 2026-10-04. */
.sd-w { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; line-height: 1.3;
        opacity: .72; overflow-wrap: anywhere; white-space: normal; }
.sd-chip { flex-wrap: wrap; }
.sd-chip-w { flex-basis: 100%; margin-top: 2px; }
.sd-flow-i { flex-wrap: wrap; }
.sd-flow-w { flex-basis: 100%; }
.sd-sparkwrap[data-spark="unknown"] { display: block; }
.sd-pt .sd-part { background: var(--sd-line); color: var(--sd-sub); }

/* ── Commission period ────────────────────────────────────────────────────── */
.sd-pers { display: flex; gap: 6px; margin: -4px 0 12px; }
.sd-perb {
  flex: 1; min-height: 38px; padding: 8px 10px;
  border: 1px solid var(--sd-line); border-radius: 10px;
  background: var(--sd-card); color: var(--sd-sub);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sd-perb:hover { color: var(--sd-ink); }
.sd-perb-on {
  background: var(--sd-ink); color: var(--sd-card);
  border-color: var(--sd-ink);
}
.sd-perb:focus-visible { outline: 3px solid #2b6cf6; outline-offset: 2px; }

/* ── The areas ────────────────────────────────────────────────────────────── */
.sd-nav {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  padding: 14px 10px;
  border: 1px solid var(--sd-line); border-radius: 18px;
  background: var(--sd-card);
}
@media (max-width: 460px) { .sd-nav { grid-template-columns: repeat(3, 1fr); } }
.sd-navi {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-height: 58px; padding: 7px 4px;
  border: 0; border-radius: 12px; background: transparent; color: var(--sd-ink);
  font: inherit; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.sd-navi:hover  { background: var(--sd-line); }
.sd-navi:active { transform: scale(.94); }
.sd-navi:focus-visible { outline: 3px solid #2b6cf6; outline-offset: 2px; }
.sd-navi-e { font-size: 22px; line-height: 1; }
.sd-navi-l { font-size: 11px; font-weight: 700; letter-spacing: -.01em; }

/* ── Into the operating environment ───────────────────────────────────────── */
.sd-deeper {
  width: 100%; min-height: 50px; padding: 14px 18px;
  border: 1px solid var(--sd-line); border-radius: 15px;
  background: var(--sd-card); color: var(--sd-ink);
  font: inherit; font-size: 14px; font-weight: 750; cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.sd-deeper:hover  { background: var(--sd-line); }
.sd-deeper:active { transform: scale(.99); }
.sd-deeper:focus-visible { outline: 3px solid #2b6cf6; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .sd-pt { animation: none; }
  .sd-perb, .sd-navi, .sd-deeper { transition: none; }
  .sd-navi:active, .sd-deeper:active { transform: none; }
}

/* ── The seven-day shape ──────────────────────────────────────────────────────
   Movement, not values. No axis and no labels: the vertical scale is relative to the
   window's own maximum, so reading a figure off it would be reading a number that is
   not there. */
.sd-sparkwrap { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.sd-spark { width: 108px; height: 26px; color: #6ee7a8; flex: 0 0 auto; opacity: .95; }
.sd-hero-unknown .sd-spark { color: rgba(255,255,255,.42); }
.sd-sparkl { font-size: 11px; font-weight: 650; opacity: .6; letter-spacing: .02em; }
