/* © 2026 Dapit Financial Infrastructure. All rights reserved.
   ============================================================================
   GOCROSS PORTAL

   Dark grey, white, purple. The purple is #7250D8, taken out of the logo file
   rather than guessed at, and it is spent in FOUR places only:

     the mark on the rail · the active nav item · the primary action ·
     the approved segment of the payments strip

   Everything else is greyscale. A dashboard where six things are coloured is a
   dashboard where nothing is emphasised, and the one number a merchant needs
   to find in a hurry is their approval rate.

   AN EXTERNAL STYLESHEET, NOT INLINE. The pages carried <style> blocks, which
   meant the CSP had to allow 'unsafe-inline' for styles — a permission granted
   to every script-injected style on the page as well. With this file the
   portal no longer needs it. (pay.php still does; the bank's widget brings its
   own markup.)
   ============================================================================ */

:root{
  /* Surfaces */
  --page:#F5F6F8;
  --card:#FFFFFF;
  /* ── STEEL, AND EVERY VALUE ON IT MEASURED ──────────────────────────────
     The first rail was #22252C — near-black, which reads as heavy rather than
     as dark grey. This is a blue-grey steel, and the greys on top of it were
     chosen by contrast ratio rather than by eye:

       nav link   #CDD4DF   6.99:1   passes AA
       active     #FFFFFF  10.42:1
       group      #AAB3C0   4.92:1   passes AA at 10.5px, which the old grey
                                     did not — it was 3.58:1 and legible only
                                     because nobody had measured it
       sign out   #A6AFBD   4.71:1

     The PURPLE is 1.91:1 on steel, which is unreadable as text — so it stays a
     3px bar marking the active item and never becomes a label. */
  --rail:#39404D;
  --rail-deep:#2E3540;
  --rail-link:#CDD4DF;
  --rail-quiet:#AAB3C0;

  /* Ink */
  --ink:#20232A;
  --mute:#646A76;
  --faint:#9AA1AD;
  --line:#E3E6EB;
  --line-soft:#EDEFF3;

  /* The accent, from the logo */
  --purple:#7250D8;
  --purple-deep:#5B3DBD;
  --purple-wash:#F2EFFD;

  /* Outcomes. Muted on purpose so purple stays the loudest thing here. */
  --good:#1F7A5C;
  --good-wash:#E6F4EF;
  --warn:#8A5A11;
  --warn-wash:#FBF1E1;
  --bad:#A33A32;
  --bad-wash:#FBECEA;

  --r:10px;
  --r-lg:14px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

/* ── THE PAGE MUST NOT MOVE WHEN THE SCROLLBAR ARRIVES ──────────────────────
 *
 * Every centred container here uses `margin:0 auto`, so the width of the
 * viewport decides where the content sits. A short page has no scrollbar and a
 * long one does, and the ~15px the scrollbar takes is split between the two
 * gutters - so moving from a short page to a long one slides everything left by
 * about seven pixels.
 *
 * Reserving the gutter permanently costs nothing and stops the jump on every
 * page at once, rather than per template. The fallback is for browsers without
 * `scrollbar-gutter`, where always showing the track achieves the same thing
 * slightly less gracefully.
 */
html{scrollbar-gutter:stable}
@supports not (scrollbar-gutter:stable){ html{overflow-y:scroll} }
body{
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);background:var(--page);
  -webkit-font-smoothing:antialiased;
}
a{color:var(--purple)}

/* Numbers are the content here, so they line up in columns everywhere. */
.num,td.num,.kpi-v,.strip-n,table td:has(+ td) .n{font-variant-numeric:tabular-nums}

/* ── The rail ────────────────────────────────────────────────────────────── */
.shell{display:flex;min-height:100vh}
.rail{
  width:212px;flex:0 0 auto;background:var(--rail);color:var(--rail-link);
  display:flex;flex-direction:column;padding:20px 0 16px;
}
.rail-mark{padding:0 18px 22px}
.rail-mark img{height:22px;width:auto;display:block}
.rail a{
  display:block;padding:9px 18px;color:var(--rail-link);text-decoration:none;font-size:14px;
  border-left:3px solid transparent;
}
.rail a:hover{color:#fff;background:var(--rail-deep)}
.rail a.on{color:#fff;background:var(--rail-deep);border-left-color:var(--purple);font-weight:600}
.rail .grp{
  padding:18px 18px 6px;font-size:10.5px;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--rail-quiet);
}
.rail .foot{margin-top:auto;padding:0 18px;font-size:12px;color:var(--rail-quiet)}
.rail .foot a{padding:6px 0;border:0;color:#A6AFBD}
.rail .foot a:hover{background:none;color:#fff}

/* ── Page ────────────────────────────────────────────────────────────────── */
main{flex:1;min-width:0;padding:26px 30px 70px}
.head{display:flex;align-items:baseline;gap:14px;margin-bottom:22px}
h1{font-size:23px;margin:0;font-weight:600;letter-spacing:-.5px}
.head .who{margin-left:auto;font-size:13px;color:var(--mute)}
.head .who b{color:var(--ink);font-weight:600}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);
      padding:18px 20px;margin-bottom:16px}
.card > h2{
  font-size:10.5px;text-transform:uppercase;letter-spacing:.09em;color:var(--faint);
  margin:0 0 14px;font-weight:700;
}
.grid{display:grid;gap:16px}
/* `align-items:start` because the default STRETCHES both cards to the taller
   one, and a chart card sitting under 200px of nothing reads as broken rather
   than as tidy. Each card is the height of what it has to say. */
.grid.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
/* ── ON A PHONE ──────────────────────────────────────────────────────────
   The rail became a 64px column, which is wide enough to hold "Payment links"
   only by wrapping it onto two lines and cutting the logo in half. A narrow
   version of a wide thing is not a mobile layout.
   
   It becomes a bar across the top instead: the logo, then the sections in a
   row that scrolls sideways if it must. Vertical space is what a phone is
   short of, and this gives back nearly all of it. */
@media (max-width:900px){
  .grid.two{grid-template-columns:1fr}
  .shell{flex-direction:column}
  .rail{width:auto;flex-direction:row;align-items:center;gap:2px;padding:0 10px;
        overflow-x:auto;-webkit-overflow-scrolling:touch;
        position:sticky;top:0;z-index:5}
  .rail-mark{padding:0 12px 0 4px;flex:0 0 auto}
  .rail-mark img{height:18px}
  .rail .grp{display:none}
  .rail a{flex:0 0 auto;padding:14px 11px;border-left:0;border-bottom:3px solid transparent;
          font-size:13.5px;white-space:nowrap}
  .rail a.on{border-left-color:transparent;border-bottom-color:var(--purple);background:none}
  .rail .foot{margin:0 0 0 auto;padding:0 4px 0 12px;flex:0 0 auto}
  .rail .foot a{padding:14px 4px}

  main{padding:18px 14px 50px}
  h1{font-size:20px}
  .head{flex-wrap:wrap;gap:4px}
  .head .who{margin-left:0;flex-basis:100%}
  .kpis{grid-template-columns:1fr 1fr}
  .kpi-v{font-size:23px}

  /* A table with seven columns on a 390px screen is a table nobody reads.
     The card number and the reference are the two a merchant scans for; the
     rest folds under the date. */
  th.drop,td.drop{display:none}
  table{font-size:13px}
  td,th{padding:9px 6px}
}

/* ── KPIs ────────────────────────────────────────────────────────────────── */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;
      background:var(--line-soft);border-radius:var(--r);overflow:hidden}
.kpi{background:var(--card);padding:15px 17px}
.kpi-k{font-size:11px;color:var(--mute);margin:0 0 6px}
.kpi-v{font-size:27px;font-weight:600;letter-spacing:-.9px;line-height:1.1;margin:0}
.kpi-v .cur{font-size:16px;font-weight:500;color:var(--faint);letter-spacing:0;margin-right:1px}
.kpi-v a{color:inherit;text-decoration:none;border-bottom:2px solid var(--purple)}
.kpi-v a:hover{color:var(--purple)}
.kpi-sub{font-size:11.5px;color:var(--faint);margin:5px 0 0}
.kpi-sub .up{color:var(--good)}
.kpi-sub .down{color:var(--bad)}

/* ── The strip: every attempt this month, in proportion ──────────────────── */
.strip{display:flex;height:12px;border-radius:99px;overflow:hidden;background:var(--line-soft);
       margin:2px 0 14px}
.strip i{display:block;height:100%}
.strip .s-ok{background:var(--purple)}
.strip .s-no{background:#C9CEd8}
.strip .s-wait{background:#E2C99A}
.strip-key{display:flex;flex-wrap:wrap;gap:18px;font-size:12.5px;color:var(--mute)}
.strip-key b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.strip-key i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:6px;
             vertical-align:0}

/* ── Fourteen days ───────────────────────────────────────────────────────── */
.days{display:flex;align-items:flex-end;gap:5px;height:120px;margin-bottom:8px}
.day{flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:2px;height:100%}
.day .b{border-radius:2px;min-height:2px}
.day .b-ok{background:var(--purple)}
.day .b-no{background:#D5D9E1}
.day.none .b{background:var(--line-soft);height:2px}
.day-ax{display:flex;gap:5px;font-size:10px;color:var(--faint)}
.day-ax span{flex:1;text-align:center}

/* ── Why payments failed: sentences, not codes ───────────────────────────── */
.why{margin:0;padding:0;list-style:none}
.why li{display:flex;gap:12px;padding:10px 0;border-top:1px solid var(--line-soft)}
.why li:first-child{border-top:0;padding-top:0}
.why .n{font-size:17px;font-weight:600;min-width:26px;font-variant-numeric:tabular-nums}
.why .t{font-size:13.5px;line-height:1.45}
.why .t b{font-weight:600}
.why .t em{font-style:normal;color:var(--mute);display:block;font-size:12.5px}

/* ── Tables ──────────────────────────────────────────────────────────────── */
table{width:100%;border-collapse:collapse;font-size:13.5px}
th{text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;
   color:var(--faint);padding:0 10px 9px;font-weight:700}
td{padding:10px;border-top:1px solid var(--line-soft);vertical-align:top}
/* In a two-column detail table the left cell is a LABEL, and a label that wraps
   onto three lines beside a one-line value reads as a fault. */
.card table td:first-child:not(.num){color:var(--mute);white-space:nowrap;width:1%}
/* ...but a table of ROWS is not a detail table, so it opts out. */
.card table.grid-t td:first-child{color:inherit;white-space:normal;width:auto}
.card table.grid-t td[style*="nowrap"]{white-space:nowrap}
td.num,th.num{text-align:right}
tr:hover td{background:#FAFAFC}
code{font:12.5px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;
     background:var(--page);padding:2px 5px;border-radius:5px;color:var(--mute)}

.pill{display:inline-block;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:99px;
      letter-spacing:.02em}
.pill.approved{background:var(--good-wash);color:var(--good)}
.pill.declined,.pill.failed{background:var(--bad-wash);color:var(--bad)}
.pill.created,.pill.pending_3ds,.pill.unresolved{background:var(--warn-wash);color:var(--warn)}
.pill.expired,.pill.voided,.pill.refunded{background:#EEF0F3;color:var(--mute)}

/* ── Forms ───────────────────────────────────────────────────────────────── */
label{display:block;font-size:11.5px;font-weight:600;color:var(--mute);margin:0 0 5px}
input[type=text],input[type=email],input[type=password],input[type=url],select{
  width:100%;max-width:420px;font-size:16px;padding:9px 11px;
  border:1px solid var(--line);border-radius:var(--r);background:#fff;color:var(--ink);
}
input:focus,select:focus{outline:2px solid var(--purple);outline-offset:-1px;border-color:var(--purple)}
button{
  font:15px/1 inherit;padding:10px 16px;border-radius:var(--r);cursor:pointer;
  border:1px solid var(--purple);background:var(--purple);color:#fff;font-weight:500;
}
button:hover{background:var(--purple-deep);border-color:var(--purple-deep)}
button.ghost{background:none;color:var(--purple);border-color:var(--line)}
button.ghost:hover{background:var(--purple-wash);border-color:var(--purple)}
button:focus-visible{outline:2px solid var(--purple);outline-offset:2px}

.note{font-size:12.5px;color:var(--mute);margin:6px 0 0}
.msg{padding:11px 13px;border-radius:var(--r);font-size:13.5px;margin-bottom:14px}
.msg.ok{background:var(--good-wash);color:var(--good)}
.msg.err{background:var(--bad-wash);color:var(--bad)}

/* An empty screen is an invitation, so it gets room rather than a grey line. */
.empty{padding:26px 0;color:var(--mute);font-size:13.5px}
.empty b{display:block;color:var(--ink);font-size:15px;font-weight:600;margin-bottom:3px}

@media (prefers-reduced-motion:no-preference){
  .rail a,button{transition:background .12s ease,color .12s ease}
}

/* ── The inspector ────────────────────────────────────────────────────────
   A payment is not one event: a request, an answer, sometimes a challenge the
   payer had to finish, sometimes a second attempt on another account. The
   timeline is the part that explains a status, so it gets the room. */
.insp-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:18px;
          padding-bottom:14px;border-bottom:1px solid var(--line-soft)}

.tl{list-style:none;margin:0;padding:0}
.tl li{display:flex;gap:14px;padding:11px 0 11px 16px;position:relative}
/* The spine, drawn between the dots rather than behind them, so a single-step
   timeline has no line dangling off the end. */
.tl li::before{content:"";position:absolute;left:4px;top:18px;bottom:-11px;width:1px;
               background:var(--line)}
.tl li:last-child::before{display:none}
.tl li::after{content:"";position:absolute;left:0;top:15px;width:9px;height:9px;
              border-radius:50%;background:var(--line);border:2px solid #fff}
.tl li.k-ok::after{background:var(--purple)}
.tl li.k-no::after{background:var(--bad)}
.tl li.k-wait::after{background:#D9A93F}
.tl-t{font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums;
      min-width:62px;padding-top:1px}
.tl-b{font-size:13.5px;line-height:1.5}
.tl-b b{font-weight:600}
.tl-b em{font-style:normal;color:var(--mute);display:block;font-size:12.5px}
.tl-b em.moved{color:var(--warn);margin-top:3px}
