/* ---------------------------------------------------------------------------
   look.css — the boards' colours and finish: the welcome, RTGS forms,
   Verification, Fund transfer, Withdrawals and their registers.

   Each board has a colour of its own, set on <body data-board> by setMode()
   in shell.js: RTGS blue, verification teal, transfer violet, withdrawal
   amber, and the brand navy at home. It paints the board's head, its
   buttons, the lit nav pill and the small accents. The banks keep their own
   colours, which still only ever mark a bank beside its logo and name.

   Everything here is for the screen. The printed forms and the printed top
   sheet are styled by form.css and ui.css alone, so nothing in this file can
   move a line on paper.
--------------------------------------------------------------------------- */

@media screen {

/* --- the board colours -------------------------------------------------------
   One pair per place: the colour itself, and a deeper one for gradients and
   for text on a wash of it. Dark mode lifts them so they still read. */

:root {
  --c-home: #1d4c85;     --c-home-deep: #14345c;
  --c-rtgs: #1d4ed8;     --c-rtgs-deep: #1e3a8a;
  --c-verify: #0f766e;   --c-verify-deep: #115e59;
  --c-transfer: #7c3aed; --c-transfer-deep: #5b21b6;
  --c-cash: #b45309;     --c-cash-deep: #92400e;
  --wash-k: 10%;         /* how much of a colour goes into its wash */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-home: #3d83d6;     --c-home-deep: #2f6fbd;
    --c-rtgs: #3b76e8;     --c-rtgs-deep: #2a5bc4;
    --c-verify: #17867c;   --c-verify-deep: #0f6b63;
    --c-transfer: #8257e5; --c-transfer-deep: #6a3fd0;
    --c-cash: #b8650f;     --c-cash-deep: #99510a;
    --wash-k: 18%;
  }
}
:root[data-theme="dark"] {
  --c-home: #3d83d6;     --c-home-deep: #2f6fbd;
  --c-rtgs: #3b76e8;     --c-rtgs-deep: #2a5bc4;
  --c-verify: #17867c;   --c-verify-deep: #0f6b63;
  --c-transfer: #8257e5; --c-transfer-deep: #6a3fd0;
  --c-cash: #b8650f;     --c-cash-deep: #99510a;
  --wash-k: 18%;
}

/* the board on show; the head's own colours are deep in either theme */
body {
  --tone: var(--c-home);
  --tone-deep: var(--c-home-deep);
  --hero-a: #0f2a4d; --hero-b: #1d4c85; --hero-glow: #5b9be6;
}
body[data-board="rtgs"] {
  --tone: var(--c-rtgs); --tone-deep: var(--c-rtgs-deep);
  --hero-a: #172f73; --hero-b: #1d4ed8; --hero-glow: #60a5fa;
  --hero-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 9.5 12 4.5l8.5 5M5 9.5v9M19 9.5v9M9.5 9.5v9M14.5 9.5v9M3 19.5h18'/%3E%3C/svg%3E");
  --hero-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='.7' stroke-opacity='.12' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 9.5 12 4.5l8.5 5M5 9.5v9M19 9.5v9M9.5 9.5v9M14.5 9.5v9M3 19.5h18'/%3E%3C/svg%3E");
}
body[data-board="verify"] {
  --tone: var(--c-verify); --tone-deep: var(--c-verify-deep);
  --hero-a: #0b4743; --hero-b: #0f766e; --hero-glow: #2dd4bf;
  --hero-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 14.3 5l2.9-.2.9 2.7 2.4 1.7-.9 2.8.9 2.8-2.4 1.7-.9 2.7-2.9-.2L12 20.8 9.7 19l-2.9.2-.9-2.7-2.4-1.7.9-2.8-.9-2.8 2.4-1.7.9-2.7 2.9.2z'/%3E%3Cpath d='m8.8 12.2 2.2 2.2 4.3-4.5'/%3E%3C/svg%3E");
  --hero-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='.7' stroke-opacity='.12' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 14.3 5l2.9-.2.9 2.7 2.4 1.7-.9 2.8.9 2.8-2.4 1.7-.9 2.7-2.9-.2L12 20.8 9.7 19l-2.9.2-.9-2.7-2.4-1.7.9-2.8-.9-2.8 2.4-1.7.9-2.7 2.9.2z'/%3E%3Cpath d='m8.8 12.2 2.2 2.2 4.3-4.5'/%3E%3C/svg%3E");
}
body[data-board="transfer"] {
  --tone: var(--c-transfer); --tone-deep: var(--c-transfer-deep);
  --hero-a: #3b1680; --hero-b: #7c3aed; --hero-glow: #c4b5fd;
  --hero-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13.5M14 4.5 17.5 8 14 11.5M20 16H6.5M10 12.5 6.5 16l3.5 3.5'/%3E%3C/svg%3E");
  --hero-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='.7' stroke-opacity='.12' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13.5M14 4.5 17.5 8 14 11.5M20 16H6.5M10 12.5 6.5 16l3.5 3.5'/%3E%3C/svg%3E");
}
body[data-board="cash"] {
  --tone: var(--c-cash); --tone-deep: var(--c-cash-deep);
  --hero-a: #692c08; --hero-b: #b45309; --hero-glow: #fbbf24;
  --hero-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6.5' width='19' height='11' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath d='M6 9.5v5M18 9.5v5'/%3E%3C/svg%3E");
  --hero-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='.7' stroke-opacity='.12' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6.5' width='19' height='11' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath d='M6 9.5v5M18 9.5v5'/%3E%3C/svg%3E");
}

/* Inside a board its colour is the accent, so everything ui.css draws in the
   accent (primary buttons, the KPI chips, the hero tile, the account rows'
   "Write letter") takes the board's colour with no rule of its own. */
.dash {
  --accent: var(--tone-deep);
  --accent-2: var(--tone);
  --accent-wash: color-mix(in srgb, var(--tone) var(--wash-k), var(--card));
}

/* a soft light of the board's colour at the top of the page */
#viewDash {
  background:
    radial-gradient(1100px 480px at 8% -180px, color-mix(in srgb, var(--hero-glow) 15%, transparent), transparent 72%),
    radial-gradient(900px 420px at 96% -160px, color-mix(in srgb, var(--tone) 11%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

/* --- the app bar: frosted, so the page shows through as it scrolls under ----
   The frost is on a layer of its own: a backdrop-filter on the bar itself
   would become the containing block of the phone's fixed tab bar inside it. */

.appbar { background: transparent; border-bottom-color: color-mix(in srgb, var(--line) 80%, transparent); }
.appbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: 0 10px 30px -24px rgba(15, 27, 45, .45);
}
@media (min-width: 1001px) {
  .appnav { background: color-mix(in srgb, var(--card-2) 75%, transparent); }
}
.appnav .navlink.on {
  background: linear-gradient(180deg, var(--tone), var(--tone-deep));
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--tone) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* --- the board's head: its name on its colour, the actions beside it --------- */

.dash-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: center;
  justify-content: flex-start;
  gap: 16px 20px;
  margin: 0 0 -40px;               /* the filters float up over its foot */
  padding: 28px 30px 66px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(120% 170% at 100% 0%, color-mix(in srgb, var(--hero-glow) 40%, transparent), transparent 55%),
    linear-gradient(115deg, var(--hero-a), var(--hero-b));
  box-shadow: 0 24px 46px -28px color-mix(in srgb, var(--hero-a) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, .14);
}
/* the board's mark, in a frosted tile */
.dash-head::before {
  content: "";
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: var(--hero-icon) center / 28px no-repeat, rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24), 0 12px 24px -12px rgba(0, 0, 0, .5);
}
/* the same mark, large and faint, over a fine grid of dots fading in from the left */
.dash-head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    var(--hero-mark) right -46px top -54px / 270px no-repeat,
    radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.6px) 0 0 / 20px 20px;
  -webkit-mask-image: linear-gradient(105deg, transparent 32%, #000 82%);
  mask-image: linear-gradient(105deg, transparent 32%, #000 82%);
}
.dash-head > div:first-child { min-width: 0; }
.dash-head h1 { margin-bottom: 4px; color: #fff; font-size: 28px; font-weight: 750; letter-spacing: -.025em; }
.dash-head p { color: rgba(255, 255, 255, .82); }
.dash-head .head-actions { margin-left: auto; }

.dash-head .btn {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.dash-head .btn:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .6); }
.dash-head .btn.primary {
  color: var(--hero-a);
  background: #fff;
  border-color: #fff;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .55);
}
.dash-head .btn.primary:hover { filter: none; background: color-mix(in srgb, var(--hero-glow) 16%, #fff); border-color: #fff; }
.dash-head .btn:focus-visible { outline-color: #fff; }

/* --- the filters, floating over the head's foot ------------------------------ */

.dash .filters {
  position: relative;
  z-index: 1;
  margin: 0 20px 18px;
  padding: 14px 18px;
  border-color: color-mix(in srgb, var(--line) 75%, transparent);
  box-shadow: var(--shadow-2);
}
.dash .filter select:focus,
.dash .filter input[type="date"]:focus {
  border-color: var(--tone);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent);
}

/* --- the figures ------------------------------------------------------------- */

.dash .kpi { border-color: color-mix(in srgb, var(--line) 80%, transparent); }
.dash .kpi::after {
  height: 3px;
  background: linear-gradient(90deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 30%, transparent) 65%, transparent);
  opacity: .9;
}
.dash .kpi-ic { width: 34px; height: 34px; top: 14px; right: 14px; border-radius: 11px; }
.dash .kpi .value { font-weight: 700; }

/* the first figure leads: its chip filled, an arc of its colour in the corner */
.dash .kpi.hero { isolation: isolate; }
.dash .kpi.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -80px;
  bottom: -80px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 20px solid color-mix(in srgb, var(--accent-2) 9%, transparent);
  pointer-events: none;
}
.dash .kpi.hero .kpi-ic {
  color: #fff;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent-2) 85%, transparent);
}

/* verification: verified and waiting are states, so they wear the state colours */
#secVerify .kpi:nth-child(1) { --accent: var(--good); --accent-2: var(--good); --accent-wash: color-mix(in srgb, var(--good) var(--wash-k), var(--card)); }
#secVerify .kpi:nth-child(2) { --accent: var(--warning); --accent-2: var(--warning); --accent-wash: color-mix(in srgb, var(--warning) var(--wash-k), var(--card)); }

/* --- section heads ------------------------------------------------------------- */

.dash .section-title { margin-top: 30px; }
.dash .section-title h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.dash .section-title h2::before {
  content: "";
  flex: none;
  width: 5px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 45%, #fff), var(--tone));
}
.dash .section-title .meta { margin-left: 0; }
.dash .section-title .meta span {
  color: color-mix(in srgb, var(--tone) 62%, var(--text));
  background: var(--accent-wash);
  border-color: color-mix(in srgb, var(--tone) 24%, transparent);
}

/* the cards' own heads: a dot of the board's colour */
.dash .card-head h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent);
}

/* --- the bank cards ------------------------------------------------------------ */

.dash .bank-card:not(.soon) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--hue) 6%, var(--card)), var(--card) 130px);
}
.dash .bank-card:not(.soon)::before {
  height: 4px;
  background: linear-gradient(90deg, var(--hue), color-mix(in srgb, var(--hue) 30%, transparent));
}
.dash .bank-card .logo-plate { box-shadow: 0 8px 18px -14px rgba(15, 27, 45, .5); }
/* the arrow sits in a disc of the bank's colour, filled under the hand */
.dash .bank-card .go svg {
  box-sizing: content-box;
  padding: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--hue) 12%, transparent);
  transition: transform .2s, background .2s, color .2s;
}
.dash .bank-card:hover .go svg,
.dash .bank-card:focus-visible .go svg { color: #fff; background: var(--hue); }
.dash .bank-card.soon .go svg { background: none; }

/* --- the registers --------------------------------------------------------------- */

.dash table.records th { background: color-mix(in srgb, var(--tone) 5%, var(--card-2)); }
.dash table.records tbody tr { transition: background .15s; }
.dash table.records tbody tr:hover { background: color-mix(in srgb, var(--tone) 6%, var(--card)); }
.dash table.records tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 var(--tone); }
.dash .bar-track i { border-radius: 0 5px 5px 0; }
.dash .empty-state svg { color: color-mix(in srgb, var(--tone) 55%, var(--faint)); }

/* --- the welcome ------------------------------------------------------------------ */

/* each choice in the colour of the place it opens */
.choice { --c: var(--c-rtgs); --c-deep: var(--c-rtgs-deep); }
.choice[href="#/transfers"] { --c: var(--c-transfer); --c-deep: var(--c-transfer-deep); }
.choice[href="#/withdrawals"] { --c: var(--c-cash); --c-deep: var(--c-cash-deep); }

.choice::before { height: 170px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), transparent); }
.choice::after {
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%),
              color-mix(in srgb, var(--c) 16%, transparent), transparent 70%);
}
.choice:hover { border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.choice-ic {
  background: linear-gradient(150deg, var(--c), var(--c-deep));
  box-shadow: 0 10px 22px -10px var(--c), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.choice-go {
  background: linear-gradient(180deg, var(--c), var(--c-deep));
  box-shadow: 0 8px 18px -10px var(--c);
}

/* the top sheet: each total in the colour of its kind */
.dash .ts-tile { --t: var(--c-home); background: linear-gradient(135deg, color-mix(in srgb, var(--t) 9%, var(--card)), var(--card-2) 70%); }
.dash .ts-tile.rtgs { --t: var(--c-rtgs); }
.dash .ts-tile.tr { --t: var(--c-transfer); }
.dash .ts-tile.cw { --t: var(--c-cash); }
.dash .ts-tile.big { --t: var(--faint); }
.dash .ts-tile::before { width: 4px; background: linear-gradient(180deg, var(--t), color-mix(in srgb, var(--t) 45%, transparent)); }
.dash .ts-head h2 { display: inline-flex; align-items: center; gap: 10px; }
.dash .ts-head h2::before {
  content: "";
  flex: none;
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 45%, #fff), var(--tone));
}
.dash .seg button.on {
  color: #fff;
  background: linear-gradient(180deg, var(--tone), var(--tone-deep));
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--tone) 70%, transparent);
}

/* the kind of each transaction, in its place's colour (and always its name) */
.dash .kind { border: 1px solid transparent; }
.dash .kind.rt { --k: var(--c-rtgs); }
.dash .kind.tr { --k: var(--c-transfer); }
.dash .kind.cw { --k: var(--c-cash); }
.dash .kind.rt, .dash .kind.tr, .dash .kind.cw {
  color: color-mix(in srgb, var(--k) 62%, var(--text));
  background: color-mix(in srgb, var(--k) var(--wash-k), var(--card));
  border-color: color-mix(in srgb, var(--k) 26%, transparent);
}

/* --- narrower screens ------------------------------------------------------------ */

@media (max-width: 620px) {
  .dash-head { gap: 14px; margin-bottom: -36px; padding: 20px 18px 58px; border-radius: 18px; }
  .dash-head::before { width: 46px; height: 46px; border-radius: 14px; background-size: 22px, auto; }
  .dash-head::after { background-size: 180px, 20px 20px; background-position: right -40px top -36px, 0 0; }
  .dash-head > div:first-child { flex: 1 1 0; }
  .dash-head h1 { font-size: 22px; }
  .dash-head .head-actions { width: 100%; margin-left: 0; }
  .dash-head .head-actions .btn { flex: 1 1 auto; }
  .dash .filters { margin-left: 10px; margin-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .dash .bank-card .go svg, .dash table.records tbody tr { transition: none; }
}

} /* @media screen */
