/* =====================================================================
   Konto app kit (round 2). Owner: agent B.
   A true-size rebuild of the Konto app UI, copied from the Flutter code:
     tokens   lib/constants/app_palette.dart (light / dark / amoled roles),
              app_colors.dart, app_text_styles.dart, ui_constants.dart
     widgets  the file named above each block below.
   Gallery of every component, with copy-paste markup: AppKit.dc.html.

   HOW TO USE
   1. Everything lives inside `.app` (390 x 844 logical, the app's real
      size; do not restyle sizes). Themes: `.app` (Light), `.app.dark`,
      `.app.amoled`. Put dir="rtl" on `.app` (or inherit it) for Arabic.
   2. Wrap `.app` in the phone frame and scale the PHONE, never the app:
        <div class="phone" style="--pz:.72">            zoom factor
          <div class="phone-scr">
            <div class="app"> ...screen... </div>
            <div class="phone-sb [light]"><b class="num">10:30</b> <i class="sig"></i><i class="bat"></i></div>
            <i class="phone-hi"></i>
          </div>
        </div>
      `.phone-sb.light` = white status text (use it over the Home header).
      In a phone the app gets --sat (44px status bar) and --sab (14px home
      indicator) so content sits below the status bar, like a real device.
      For a fidelity test render `.app` alone (no phone): --sat/--sab = 0.
   3. Never put `.num` (direction: ltr) on an element that is positioned
      with inline-start/end: logical insets follow the element's own
      direction. Put `.num` on an inner span instead.
   3b. Class prefix `a-` = app kit. Text roles: `.a-t-<role>` (below).
      Amounts and codes always also get `.num` (base.css: LTR isolate).
   4. Icons: app SVGs as <img src="/_blob/<id>"> (ids in kit/blobmap.txt,
      files kit/new/b-*.svg), or inline <svg> when they must take colour.
      Material Rounded glyphs are inline SVG paths (see the gallery).
   5. Motion: classes that animate use the app's durations (ui_constants).
      Toggle state classes (`.on`, `.open`, `.done` ...) from renderVals.
   ===================================================================== */

/* ---------- tokens: AppPalette.light ---------- */
.app {
  --bg: #F4FAFB;            /* background (appBackground) */
  --surface: #FFFFFF;
  --surface-el: #FFFFFF;    /* surfaceElevated */
  --surface-muted: #F3F7F8; /* surfaceMuted (settingsInsetSurface) */
  --surface-subtle: #F6F9FA;
  --border: #E4ECF1;
  --border-subtle: #EEF3F8;
  --divider: rgba(15,29,34,.06);
  --text: #0F1D22;          /* textPrimary */
  --heading: #1A2B3C;       /* AppColors.headingText */
  --text-body: #344A5A;
  --text-2: #4A6275;        /* textSecondary (navy500) */
  --text-muted: #9AA9AE;
  --text-subtle: #6B8290;
  --hint: #8A9BAD;          /* AppColors.hintText */
  --nav: #0A1929;           /* navigationSurface (navy900) */
  --inverse: #0F1D22;
  --disabled-surface: #D8E1EA;
  --disabled-content: #C5D1DC;
  --switch-off: #C5D1DC;
  --switch-thumb-off: #FFFFFF;
  --shadow: rgba(15,60,70,.03);
  --shadow-subtle: rgba(10,25,41,.06);    /* shadowNavySubtle */
  --shadow-elev: rgba(10,25,41,.13);      /* shadowNavyElevated */
  --a50: #F0FAFB; --a100: #D4F1F5; --a200: #A3E4EE; --a300: #7DD8E8;
  --a500: #0BBAD8; --a600: #099AB3; --a700: #06707F; --a800: #054C56; --a900: #033038;
  --p-surface: #F0FAFB;     /* primarySurface */
  --p-surface-strong: #D4F1F5;
  --p-border: #A3E4EE;
  --p-content: #054C56;
  --p-accent: #06707F;      /* primaryAccentContent */
  --p-link: #099AB3;        /* primaryLinkContent */
  --ok: #2ECC71;            /* success500 */
  --ok-surface: #E8F8F0; --ok-border: #A9DFBF; --ok-content: #186A3B; --ok-solid: #229954;
  --bad: #E74C3C;           /* danger500 */
  --bad-surface: #FDECEB; --bad-border: #F5B7B1; --bad-content: #922B21; --bad-solid: #C0392B;
  --warn: #F39C12;          /* warningIndicator / warning500 */
  --warn-surface: #FEF5E7; --warn-strong: #FAD7A0; --warn-border: #FAD7A0; --warn-content: #7E5109;
  --ai: #8B5CF6;            /* enrichment500 */
  --ai-surface: #F5F0FF; --ai-strong: #EDE5FF; --ai-border: #D8C2FF; --ai-content: #7C3AED;
  --teach: #C94F7E;         /* Teach Me pink */
  --qa-fill: var(--bg);     /* quick action circle: background in light, surface in dark */
  --sat: 0px;               /* safe area top (phone frame sets 44px) */
  --sab: 0px;               /* safe area bottom (phone frame sets 14px) */

  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lama Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.3;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  font-kerning: none;        /* Flutter lays Lama Sans out on plain advances: measured against the real frames */
  letter-spacing: .007em;
  isolation: isolate;
}
.app.dark {
  --bg: #111416; --surface: #191D20; --surface-el: #202529; --surface-muted: #282E33; --surface-subtle: #282E33;
  --border: #394047; --border-subtle: #394047; --divider: rgba(255,255,255,.12);
  --text: #F7FAFC; --heading: #F7FAFC; --text-body: #CAD4DD; --text-2: #CAD4DD; --text-muted: #8C9AA6; --text-subtle: #8C9AA6; --hint: #8C9AA6;
  --nav: #252B30; --inverse: #202529;
  --disabled-surface: #30353A; --disabled-content: #77828B; --switch-off: #394047; --switch-thumb-off: #CAD4DD;
  --shadow: rgba(0,0,0,.04);
  --p-surface: #03191D; --p-surface-strong: #05262C; --p-border: #07515D; --p-content: #0BBAD8; --p-accent: #7DD8E8; --p-link: #0BBAD8;
  --ok-surface: #061B0F; --ok-border: #165C32; --ok-content: #2ECC71;
  --bad-surface: #200908; --bad-border: #68231D; --bad-content: #E74C3C;
  --warn-surface: #201405; --warn-strong: #302008; --warn-border: #68450B; --warn-content: #F39C12;
  --ai-surface: #160E25; --ai-strong: #211438; --ai-border: #50358B; --ai-content: #8B5CF6;
  --teach: #C94F7E;
  --qa-fill: var(--surface);
}
.app.amoled {
  --bg: #000000; --surface: #050505; --surface-el: #0B0B0B; --surface-muted: #121212; --surface-subtle: #121212;
  --border: #242424; --border-subtle: #242424; --divider: rgba(255,255,255,.12);
  --text: #F7FAFC; --heading: #F7FAFC; --text-body: #CAD4DD; --text-2: #CAD4DD; --text-muted: #8C9AA6; --text-subtle: #8C9AA6; --hint: #8C9AA6;
  --nav: #1A1F23; --inverse: #0B0B0B;
  --disabled-surface: #171717; --disabled-content: #626C74; --switch-off: #394047; --switch-thumb-off: #CAD4DD;
  --shadow: transparent; --shadow-subtle: transparent;
  --p-surface: #03191D; --p-surface-strong: #05262C; --p-border: #07515D; --p-content: #0BBAD8; --p-accent: #7DD8E8; --p-link: #0BBAD8;
  --ok-surface: #061B0F; --ok-border: #165C32; --ok-content: #2ECC71;
  --bad-surface: #200908; --bad-border: #68231D; --bad-content: #E74C3C;
  --warn-surface: #201405; --warn-strong: #302008; --warn-border: #68450B; --warn-content: #F39C12;
  --ai-surface: #160E25; --ai-strong: #211438; --ai-border: #50358B; --ai-content: #8B5CF6;
  --qa-fill: var(--surface);
}
:where(.app) *, :where(.app) *::before, :where(.app) *::after { box-sizing: border-box; }
:where(.app) :where(p, h1, h2, h3, h4, h5, ul, ol, li, figure, dl, dd) { margin: 0; padding: 0; }
:where(.app) :where(ul, ol) { list-style: none; }
:where(.app) img { display: block; max-width: none; }
:where(.app) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.app) svg { display: block; flex: none; }
.app .num { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-variant-numeric: normal; }

/* ---------- text roles (AppTextStyles) ---------- */
.a-t-metric { font-size: 34px; font-weight: 900; line-height: 1.3; letter-spacing: -1px; }   /* metricHero */
.a-t-hl     { font-size: 21px; font-weight: 700; line-height: 1.2; }                         /* headlineCompact */
.a-t-tl     { font-size: 24px; font-weight: 700; line-height: 1.0; }                         /* titleLarge */
.a-t-tm     { font-size: 20px; font-weight: 600; line-height: 1.0; }                         /* titleMedium */
.a-t-ts     { font-size: 18px; font-weight: 700; line-height: 1.2; }                         /* titleSmall */
.a-t-tc     { font-size: 17px; font-weight: 500; line-height: 1.3; }                         /* titleCompact */
.a-t-bl     { font-size: 18px; font-weight: 400; line-height: 1.55; }                        /* bodyLarge */
.a-t-bm     { font-size: 16px; font-weight: 400; line-height: 1.5; }                         /* bodyMedium */
.a-t-bs     { font-size: 15px; font-weight: 400; line-height: 1.5; }                         /* bodySmall */
.a-t-ll     { font-size: 14px; font-weight: 500; line-height: 1.3; }                         /* labelLarge */
.a-t-lm     { font-size: 13px; font-weight: 500; line-height: 1.25; }                        /* labelMedium */
.a-t-ls     { font-size: 12px; font-weight: 500; line-height: 1.25; }                        /* labelSmall */
.a-t-cm     { font-size: 11.5px; font-weight: 500; line-height: 1.25; }                      /* compactMeta */
.a-t-cap    { font-size: 11px; font-weight: 500; line-height: 1.2; }                         /* caption */
.a-t-badge  { font-size: 10px; font-weight: 600; line-height: 1.2; }                         /* badge */
.a-w4 { font-weight: 400; } .a-w5 { font-weight: 500; } .a-w6 { font-weight: 600; } .a-w7 { font-weight: 700; } .a-w8 { font-weight: 800; } .a-w9 { font-weight: 900; }
.a-c-text { color: var(--text); } .a-c-2 { color: var(--text-2); } .a-c-muted { color: var(--text-muted); }
.a-c-ok { color: var(--ok); } .a-c-bad { color: var(--bad); } .a-c-acc { color: var(--a500); } .a-c-ai { color: var(--ai); }

/* =====================================================================
   PHONE FRAME (website only; no brand). Scale with --pz (zoom).
   ===================================================================== */
.phone {
  --pz: 1;
  zoom: var(--pz);
  position: relative;
  width: 414px;               /* 390 screen + 12px bezel each side */
  height: 868px;
  padding: 12px;
  border-radius: 64px;
  background: linear-gradient(145deg, #2B3A44 0%, #101A21 46%, #1D2A33 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.14),
    inset 0 0 0 4px #0A1117,
    0 2px 4px rgba(6,20,28,.18),
    0 30px 60px -12px rgba(6,20,28,.38),
    0 60px 120px -30px rgba(6,20,28,.30);
  flex: none;
  direction: ltr;
}
.phone::before, .phone::after {          /* side keys */
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #1B262E;
}
.phone::before { inset-inline-start: -2px; top: 170px; height: 64px; box-shadow: 0 86px 0 #1B262E; }
.phone::after  { inset-inline-end: -2px; top: 210px; height: 96px; }
.phone-scr {
  position: relative;
  width: 390px; height: 844px;
  border-radius: 52px;
  overflow: hidden;
  background: #000;
  transform: translateZ(0);      /* clip children with the radius */
}
.phone-scr > .app { --sat: 44px; --sab: 14px; }
.phone-sb {                       /* status bar */
  position: absolute; inset: 0 0 auto; height: 44px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 30px 0 34px;
  color: #0F1D22; pointer-events: none; direction: ltr;
}
.phone-sb.light { color: #FFFFFF; }
.phone-sb b { font: 600 15px/1 'Lama Sans', system-ui, sans-serif; letter-spacing: -.2px; }
.phone-sb .r { display: flex; align-items: center; gap: 6px; }
.phone-sb .sig { width: 17px; height: 11px; background:
  linear-gradient(currentColor,currentColor) 0 8px/3px 3px no-repeat,
  linear-gradient(currentColor,currentColor) 4.6px 5.5px/3px 5.5px no-repeat,
  linear-gradient(currentColor,currentColor) 9.2px 3px/3px 8px no-repeat,
  linear-gradient(currentColor,currentColor) 13.8px 0/3px 11px no-repeat; }
.phone-sb .wifi { width: 15px; height: 11px; border-radius: 15px 15px 0 0 / 13px 13px 0 0;
  background: radial-gradient(circle at 50% 100%, currentColor 0 2.6px, transparent 3px 5px, currentColor 5.2px 7.4px, transparent 7.7px 9.8px, currentColor 10px 12.4px, transparent 12.7px); }
.phone-sb .bat { position: relative; width: 25px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px currentColor; opacity: .95; }
.phone-sb .bat::before { content: ""; position: absolute; inset: 2px; width: calc(var(--bat, 80%) - 4px); border-radius: 2px; background: currentColor; }
.phone-sb .bat::after { content: ""; position: absolute; inset-inline-end: -3px; top: 4px; width: 1.5px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; opacity: .5; }
.phone-isl { position: absolute; top: 10px; left: 50%; width: 112px; height: 32px; margin-left: -56px; border-radius: 20px; background: #000; z-index: 51; }
.phone-hi { position: absolute; bottom: 7px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(255,255,255,.86); z-index: 50; pointer-events: none; }
.phone-hi.dark { background: rgba(15,29,34,.82); }
.phone-glare { position: absolute; inset: 12px; border-radius: 52px; pointer-events: none; z-index: 60;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 26%, rgba(255,255,255,0) 70%, rgba(255,255,255,.04) 100%); }

/* =====================================================================
   HOME  (lib/widgets/home/home_header_flexible_space.dart,
          home_header_gradient.dart, home_header_balance.dart,
          home_balance_currency_switcher.dart, home_quick_actions.dart)
   ===================================================================== */
.a-home { position: absolute; inset: 0; display: flex; flex-direction: column; }
/* header: kHomeHeader* ; gradient stops .58/.86 with lerps .72/.94 */
.a-hh {
  position: relative; flex: none;
  height: calc(312px + var(--sat));
  background: linear-gradient(180deg in srgb,
    var(--a500) 0%,
    color-mix(in srgb, var(--a500) 28%, var(--bg)) 58%,
    color-mix(in srgb, var(--a500) 6%, var(--bg)) 86%,
    var(--bg) 100%);
  color: #fff;
  z-index: 2;
}
.a-hh-pat {                                  /* background-pattern-logo, 210 x 234, top 60, end edge, mirrored in LTR */
  position: absolute; top: calc(60px + var(--sat)); inset-inline-end: 0;
  width: 140.8px; height: 234px; opacity: .85; object-fit: contain;   /* drawn at 234/231 with its x=0 on the screen edge */
  transform: scaleX(-1); pointer-events: none;
}
.app[dir="rtl"] .a-hh-pat, [dir="rtl"] .app .a-hh-pat { transform: none; }
.a-hh-in { position: relative; padding: calc(32px + var(--sat)) 20px 0; }
.a-hh-greet { font-size: 13px; font-weight: 500; line-height: 1.25; color: rgba(255,255,255,.65); }
.a-hh-name { margin-top: 4px; min-height: 25.2px; font-size: 21px; font-weight: 800; line-height: 1.2; color: #fff; }
.a-hh-cap {                                  /* HomeBalanceHeldCaption: labelSmall 600, onDarkHigh */
  margin-top: 12px; height: 10px; position: relative;
}
.a-hh-cap > span { position: absolute; inset-inline-start: 0; bottom: -4px; font-size: 12px; font-weight: 600; line-height: 14px; color: rgba(255,255,255,.9); white-space: nowrap; }
.a-hh-row { display: flex; align-items: center; gap: 10px; height: 48px; }
.a-hh-bal { flex: 1; min-width: 0; display: flex; align-items: center; height: 48px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(to var(--a-end, right), #000 calc(100% - 64px), transparent);
          mask-image: linear-gradient(to var(--a-end, right), #000 calc(100% - 64px), transparent); }
.app[dir="rtl"] .a-hh-bal, [dir="rtl"] .app .a-hh-bal { --a-end: left; }
.a-hh-pg {                                  /* one currency page: 252 wide (viewport 304 - peek reserve 52), 8 trailing */
  flex: none; width: 252px; height: 48px; padding-inline-end: 8px; display: flex; align-items: center;
}
.a-hh-fit { display: flex; align-items: center; zoom: var(--fit, 1); }   /* FittedBox.scaleDown: set --fit = 244 / (amount + 36) */
.app[dir="rtl"] .a-hh-fit, [dir="rtl"] .app .a-hh-fit { transform: translateX(6px); }
.a-hh-amt { padding-inline-end: 6px; font-size: 34px; font-weight: 900; line-height: 1.3; letter-spacing: -1px; color: #fff; }
.a-hh-chev { width: 24px; height: 24px; padding: 2px; margin-inline-start: 6px; color: #fff; }
.a-hh-pg.peek { opacity: .34; transform: scale(.92); transform-origin: var(--a-startx, left) center; }
.app[dir="rtl"] .a-hh-pg.peek, [dir="rtl"] .app .a-hh-pg.peek { --a-startx: right; }
.a-hh-eye { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.a-hh-eye svg { width: 30px; height: 30px; }
.a-hh-sel { margin-top: 2px; height: 34px; display: flex; align-items: center; gap: 10px; }
.a-hh-dots { display: flex; gap: 5px; align-items: center; }
.a-hh-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.45); transition: width .32s cubic-bezier(.2,.8,.2,1), background .32s; }
.a-hh-dots i.on { width: 18px; background: #fff; }
.a-hh-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1.2; color: rgba(255,255,255,.9); }
.a-hh-hint svg { width: 16px; height: 16px; }
.a-help {                                    /* Teach Me entry: 40 px at header top spacing, end edge */
  position: absolute; top: calc(32px + var(--sat)); inset-inline-end: 20px; width: 40px; height: 40px;
}
.a-help svg { width: 40px; height: 40px; }

/* quick actions: 72 px circles, 34 px icons, badge 22 px (warningSurfaceStrong) */
.a-qa {
  position: absolute; inset-inline: 0; bottom: -28px; height: 148px;
  padding: 15px 20px; display: flex; justify-content: space-between; z-index: 3;
}
.a-qa-i { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; color: var(--text); }
.a-qa-c {
  position: relative; width: 72px; height: 72px; border-radius: 50%;
  background: var(--qa-fill); padding: 19px; box-shadow: 0 2px 12px rgba(10,25,41,.06);
}
.a-qa-c > img { width: 34px; height: 34px; }
.a-qa-n {
  position: absolute; top: -2px; inset-inline-end: -4px; min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--warn-strong); box-shadow: inset 0 0 0 1px var(--warn-border); color: var(--warn-content);
  font-size: 10px; font-weight: 600; line-height: 1;
}
.a-qa-l { margin-top: 5px; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--text); text-align: center; white-space: nowrap; }

/* =====================================================================
   TRANSACTION LIST (home_transaction_header.dart, transaction_history_card.dart,
   party_label.dart, transaction_history_metadata.dart)
   ===================================================================== */
.a-txs { position: relative; flex: 1; min-height: 0; overflow: hidden; z-index: 1; }
.a-txh { height: 46px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a-txh-t { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 600; line-height: 1; color: var(--text); white-space: nowrap; }
.a-txh-t img, .a-txh-t svg { width: 14px; height: 14px; }
.a-txh-v { display: flex; align-items: center; gap: 4px; padding: 6px 4px; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--a500); white-space: nowrap; }
.a-txh-v svg { width: 11px; height: 11px; }
.app[dir="rtl"] .a-txh-v svg, [dir="rtl"] .app .a-txh-v svg { transform: scaleX(-1); }   /* matchTextDirection */
.a-txl { padding: 0 16px; }
.a-tx { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.a-tx:last-child { border-bottom: 0; }
.a-tx-av { position: relative; width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--p-surface); }
.a-tx-av > img { width: 22px; height: 22px; }
.a-tx-av.sale, .a-tx-av.inc { background: var(--ok-surface); }
.a-tx-av.exp { background: var(--bad-surface); }
.a-tx-av.debt, .a-tx-av.buy { background: var(--p-surface); }
.a-tx-av.whole { background: var(--ai-surface); }
.a-tx-av.move { background: var(--surface-muted); }
.a-tx-av .a-tx-sh {                       /* shared-record mark */
  position: absolute; inset-inline-end: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center;
}
.a-tx-av .a-tx-sh img { width: 11px; height: 11px; }
.a-tx-b { flex: 1; min-width: 0; position: relative; top: 1px; }   /* Flutter puts line leading by ascent:descent (760:250) */
.a-tx-r1, .a-tx-r2 { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.a-tx-r2 { margin-top: 4px; gap: 4px; }
.a-tx-nm { font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--text); min-width: 0; }
.a-tx-amt { font-size: 18px; font-weight: 800; line-height: 1.2; white-space: nowrap; direction: ltr; unicode-bidi: isolate; color: var(--bad); }
.a-tx-amt.in { color: var(--ok); }
.a-tx-amt.flat { color: var(--text); }
.a-tx-amt.off { color: var(--text-muted); }
.a-tx-labs { display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; }
.a-tx-time { font-size: 11px; font-weight: 500; line-height: 1.2; color: var(--text-muted); white-space: nowrap; flex: none; }
.a-tx-edge { position: absolute; inset-inline: 4px 5px; bottom: 0; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.a-tx-edge > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 2px; background: var(--ok); transition: width .6s cubic-bezier(.65,0,.35,1); }
.a-tx-edge.bad > i { background: var(--bad); }
.a-tx-edge.seg { background: none; display: flex; gap: 3px; overflow: visible; }
.a-tx-edge.seg > i { position: static; flex: 1; background: var(--border); }
.a-tx-edge.seg > i.on { background: var(--ok); }

/* PartyLabel: 13 px tag icon (label.svg, palette-mapped) + caption 700 textMuted */
.a-lab { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--text-muted); white-space: nowrap; }
.a-lab svg { width: 13px; height: 13px; }
.a-lab svg .s { fill: var(--ls, #9ADFE9); }
.a-lab svg .p { fill: var(--lp, #16B6CF); }
.a-lab.cyan   { --lp: #16B6CF; --ls: #9ADFE9; }
.a-lab.blue   { --lp: #4C8FE8; --ls: #BCD5F5; }
.a-lab.purple { --lp: #8B6BE8; --ls: #D0C4F4; }
.a-lab.pink   { --lp: #D96F9C; --ls: #F0C4D5; }
.a-lab.teal   { --lp: #43A99A; --ls: #B9DED8; }
.a-lab.indigo { --lp: #6476D6; --ls: #C5CCEF; }
.a-lab.orange { --lp: #E69A43; --ls: #F4D5AD; }
.a-lab.slate  { --lp: #647D8C; --ls: #C8D3D9; }
/* palettes by seed (FNV-1a in lib/utils/icon_palette.dart):
   type Sale purple, Expense blue, Income purple, Debt orange, Purchase purple,
   Wholesale pink, Transfer purple; category Expense(general) teal,
   Purchases purple, Courier fees slate; status Waiting to send indigo,
   Completed/Paid teal, Delivered slate, Sent orange, Cancelled blue,
   Returned teal, In progress indigo, Partially paid orange. */

/* =====================================================================
   BOTTOM BAR + FAB (lib/widgets/bottom_nav_bar/bottom_nav_bar.dart)
   75 px, navy900; icons 28; caption 11; FAB 80 with a 5 px ring, 20 px over the body
   ===================================================================== */
.a-nav {
  position: relative; flex: none; z-index: 4;
  height: calc(75px + var(--sab)); padding: 0 16px var(--sab);
  background: var(--nav);
  display: flex; align-items: stretch;
}
.a-nav-i { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding-top: 1px; color: #fff; font-size: 11px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.a-nav-i.w2 { flex-grow: 2; }
.a-nav-i.on { color: var(--a500); font-weight: 600; }
.a-nav-ic { position: relative; width: 28px; height: 28px; display: grid; place-items: center; }
.a-nav-ic img { width: 28px; height: 28px; object-fit: contain; }
.a-nav-dot { position: absolute; top: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 1.5px solid var(--nav); }
.a-nav-gap { flex: none; width: 80px; }
.a-fab {
  position: absolute; left: 50%; top: -20px; width: 80px; height: 80px; margin-left: -40px;
  border-radius: 50%; background: var(--a500) padding-box; border: 5px solid var(--nav);
  display: grid; place-items: center; color: #fff;
}
.a-fab svg { width: 60px; height: 60px; }
.a-fab.glow { border-color: #078093; animation: a-fab-breath 1.4s ease-in-out infinite alternate; }   /* FAB glow state (bottom_nav_bar.dart _kFabGlow*) */
@keyframes a-fab-breath { from { box-shadow: 0 0 0 1.6px rgba(163,228,238,.75), 0 0 18px 0 rgba(11,186,216,.18) } to { box-shadow: 0 0 0 2.2px rgba(163,228,238,.85), 0 0 26px 1px rgba(11,186,216,.24) } }

/* =====================================================================
   BOTTOM DRAWER (lib/widgets/common/app_bottom_drawer.dart)
   radius 16 top; handle 25 (40 x 5, divider); header 52 (titleMedium,
   close glyph at start, Teach Me at end); footer 91 = 17 + 57 + 17
   ===================================================================== */
.a-scrim { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .32s ease-out; z-index: 20; pointer-events: none; }
.a-scrim.on { opacity: .55; }
.a-sheet {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 21;
  max-height: calc(100% - 24px - var(--sat));
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px var(--shadow-elev);
  transform: translateY(105%); transition: transform .32s cubic-bezier(0,0,.58,1);   /* 320 ms easeOut */
}
.a-sheet.open { transform: none; }
.a-sheet.closing { transition-timing-function: cubic-bezier(.42,0,1,1); }
.a-sheet-hd { height: 25px; display: grid; place-items: center; flex: none; }
.a-sheet-hd::before { content: ""; width: 40px; height: 5px; border-radius: 16px; background: var(--divider); }
.a-sheet-h {                               /* AppBottomDrawerHeader: 52 tall, 16 bottom padding (58 / 8 with a subtitle) */
  position: relative; flex: none; height: 52px; padding: 0 20px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.a-sheet-h.sub { height: 58px; padding-bottom: 8px; }
.a-sheet-t { padding: 0 40px; font-size: 20px; font-weight: 800; line-height: 1; color: var(--heading); text-align: center; white-space: nowrap; }
.a-sheet-s { margin-top: 2px; font-size: 13px; font-weight: 400; line-height: 1.25; color: var(--hint); text-align: center; white-space: nowrap; }
.a-sheet-x, .a-sheet-tm { position: absolute; top: calc((100% - 16px - 48px) / 2); width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-2); }
.a-sheet-h.sub .a-sheet-x, .a-sheet-h.sub .a-sheet-tm { top: calc((100% - 8px - 48px) / 2); }
.a-sheet-x { inset-inline-start: 20px; }
.a-sheet-tm { inset-inline-end: 20px; }
.a-sheet-x svg { width: 22px; height: 22px; }
.a-sheet-x.back svg { width: 22px; height: 22px; }
.app[dir="rtl"] .a-sheet-x.back svg, [dir="rtl"] .app .a-sheet-x.back svg { transform: scaleX(-1); }
.a-sheet-tm svg { width: 40px; height: 40px; }
.a-sheet-b { flex: 1; min-height: 0; overflow: hidden; padding: 0 20px 16px; }
.a-sheet-f { flex: none; padding: 17px 20px calc(17px + var(--sab)); border-top: 1px solid var(--border); background: var(--surface); display: flex; gap: 12px; }
.app .a-btn {                                   /* footer primary: 57 tall, radius 16, titleCompact on accent */
  flex: 1; height: 57px; border-radius: 16px; background: var(--a500); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 17px; font-weight: 500; line-height: 1.3; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.app .a-btn:disabled, .app .a-btn.off { background: var(--disabled-surface); color: var(--text-2); }
.app .a-btn:active { transform: scale(.98); }
.app .a-dbtn {                                  /* TransactionDrawerButton: 48 tall, radius 16, 15/600 */
  flex: 1; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: var(--a500); color: #fff;
}
.app .a-dbtn.tonal { background: var(--p-surface); color: var(--p-content); }
.app .a-dbtn.muted { background: var(--surface-muted); color: var(--text-2); }
.app .a-dbtn.danger { background: var(--bad-solid); color: #fff; }
.app .a-dbtn.icon { flex: 0 0 48px; }
.a-dbtn img, .a-dbtn svg { width: 20px; height: 20px; }

/* =====================================================================
   CARDS, FIELD HEADERS, INPUTS (app_input_field.dart, app_field_state_style.dart)
   ===================================================================== */
.a-card { background: var(--surface); border-radius: 16px; border: 1px solid var(--border); }
.a-card.flat { border-color: transparent; background: var(--surface-muted); }
.a-card.sh { border-color: transparent; box-shadow: 0 2px 8px var(--shadow-subtle); }
.a-fh {                                    /* FieldHeaderIconLabel: icon + labelLarge */
  display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--text);
}
.a-fh img, .a-fh svg { width: 18px; height: 18px; }
.a-fh.req { color: var(--text); } .a-fh.req svg { color: var(--warn); }
.a-fh.fill svg { color: var(--a500); }
.a-fh.ai svg { color: var(--ai); }
.a-in {                                    /* AppInputField: 48 tall, radius 16, border 1.5, shadow 0 2 8 */
  position: relative; height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--border), 0 2px 8px var(--shadow-subtle);
  font-size: 14px; font-weight: 400; line-height: 1.3; color: var(--text);
  transition: box-shadow .16s, background .16s;
}
.a-in.flat { background: var(--surface-muted); box-shadow: none; }
.a-in .ph { color: var(--text-muted); font-size: 13px; }
.a-in .v { flex: 1; min-width: 0; white-space: nowrap; }
.a-in.big .v { font-size: 22px; font-weight: 700; }
.a-in.req { box-shadow: inset 0 0 0 1.5px var(--warn), 0 2px 8px var(--shadow-subtle); }          /* required + empty */
.a-in.fill { box-shadow: inset 0 0 0 1.5px var(--a500), 0 2px 8px var(--shadow-subtle); }         /* required + filled */
.a-in.ai { box-shadow: inset 0 0 0 1.7px var(--ai), 0 2px 8px var(--shadow-subtle); background: var(--surface); }   /* enriched (purple) */
.a-in.focus { box-shadow: inset 0 0 0 1.5px var(--ok-content), 0 2px 8px var(--shadow-subtle); }
.a-in.ring { box-shadow: inset 0 0 0 1.7px var(--ai), 0 0 0 4px var(--ai-surface); }
.a-in .caret { width: 2px; height: 20px; background: var(--a500); animation: a-caret 1s steps(1) infinite; }
@keyframes a-caret { 50% { opacity: 0 } }
.a-ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ai-content); }
.a-ai-tag svg { width: 12px; height: 12px; }

/* chips and pills */
.app .a-chip {                                  /* AppChoiceChip-like selectable pill */
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.app .a-chip.on { background: var(--a500); box-shadow: none; color: #fff; }
.a-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; background: var(--p-surface); color: var(--p-accent); }
.a-pill.ok { background: var(--ok-surface); color: var(--ok-content); }
.a-pill.bad { background: var(--bad-surface); color: var(--bad-content); }
.a-pill.warn { background: var(--warn-surface); color: var(--warn-content); }
.a-pill.ai { background: var(--ai-surface); color: var(--ai-content); }
.a-pill.code { width: 44px; justify-content: center; padding: 0; font-weight: 800; }   /* CurrencyCodePill */

/* KontoSwitch (konto_switch.dart): size 22 -> 37.4 x 22, inset 2.2, thumb 17.6; travel 410 ms */
.a-sw { --h: 22px; position: relative; width: calc(var(--h) * 1.7); height: var(--h); border-radius: 999px; background: var(--switch-off); overflow: hidden; flex: none; }
.a-sw::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--a500); transform: scaleX(0); transform-origin: var(--a-start, left) center; transition: transform .26s cubic-bezier(.4,0,.2,1); }
.a-sw::after { content: ""; position: absolute; top: calc(var(--h) * .1); left: calc(var(--h) * .1); width: calc(var(--h) * .8); height: calc(var(--h) * .8); border-radius: 50%; background: var(--switch-thumb-off); box-shadow: 0 1px 2px var(--shadow); transition: transform .41s cubic-bezier(.2,.9,.25,1.15); }
.a-sw.on::before { transform: scaleX(1); transition-duration: .38s; }
.a-sw.on::after { background: #fff; transform: translateX(calc(var(--h) * .7)); }
.app[dir="rtl"] .a-sw::after, [dir="rtl"] .app .a-sw::after { left: auto; right: calc(var(--h) * .1); }
.app[dir="rtl"] .a-sw.on::after, [dir="rtl"] .app .a-sw.on::after { transform: translateX(calc(var(--h) * -.7)); }
.app[dir="rtl"] .a-sw, [dir="rtl"] .app .a-sw { --a-start: right; }
.a-sw.sm { --h: 18px; }

/* success check (SuccessAnimationHero, Done_small.json final frame): green disc, white check, pulse */
.a-ok { position: relative; width: 76px; height: 76px; flex: none; }
.a-ok i { position: absolute; inset: 0; border-radius: 50%; background: var(--ok); transform: scale(0); }
.a-ok svg { position: absolute; inset: 22%; width: 56%; height: 56%; color: #fff; }
.a-ok svg path { stroke-dasharray: 30; stroke-dashoffset: 30; }
.a-ok b { position: absolute; inset: -10px; border-radius: 50%; background: var(--ok); opacity: 0; }
.a-ok.on i { animation: a-ok-pop .52s cubic-bezier(.34,1.56,.64,1) forwards; }
.a-ok.on svg path { animation: a-ok-draw .36s .26s cubic-bezier(.65,0,.35,1) forwards; }
.a-ok.on b { animation: a-ok-pulse 1.6s .7s ease-out infinite; }
@keyframes a-ok-pop { 0% { transform: scale(0) } 70% { transform: scale(1.08) } 100% { transform: scale(1) } }
@keyframes a-ok-draw { to { stroke-dashoffset: 0 } }
@keyframes a-ok-pulse { 0% { opacity: .28; transform: scale(.86) } 100% { opacity: 0; transform: scale(1.18) } }
.a-ok.sm { width: 22px; height: 22px; }

/* OrderStatusTrack (order_status_track.dart): surfaceMuted card, 22 px marks, 2 px rail */
.a-ost { padding: 14px; border-radius: 16px; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--border); }
.a-ost-s { position: relative; display: flex; gap: 12px; min-height: 36px; }
.a-ost-s + .a-ost-s { margin-top: 14px; }
.a-ost-m { position: relative; width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--border); color: #fff; transition: background .3s, box-shadow .3s; }
.a-ost-m svg { width: 14px; height: 14px; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.34,1.56,.64,1); }
.a-ost-s::after { content: ""; position: absolute; inset-inline-start: 10px; top: 22px; bottom: -14px; width: 2px; background: var(--border); }
.a-ost-s:last-child::after { display: none; }
.a-ost-s.done::after { background: var(--a500); }
.a-ost-s.done .a-ost-m, .a-ost-s.cur .a-ost-m { background: var(--a500); box-shadow: none; }
.a-ost-s.done .a-ost-m svg, .a-ost-s.cur .a-ost-m svg { opacity: 1; transform: none; }
.a-ost-s.end .a-ost-m { background: var(--bad-content); box-shadow: none; }
.a-ost-l { padding-top: 1px; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--text-muted); }
.a-ost-s.done .a-ost-l, .a-ost-s.cur .a-ost-l { color: var(--text); }
.a-ost-s.cur .a-ost-l { font-weight: 700; }
.a-ost-w { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--text-muted); }

/* party row + avatar (party list card; party_avatar_style.dart) + KontoUserBadge */
.a-party { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.a-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--av-bg, var(--p-surface-strong)); color: var(--av-fg, var(--p-content)); font-size: 15px; font-weight: 700; line-height: 1; }
.a-av.sm { width: 36px; height: 36px; font-size: 13px; }
.a-party-b { flex: 1; min-width: 0; }
.a-party-n, .a-party-s { display: block; }
.a-party-n { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); }
.a-party-s { margin-top: 2px; font-size: 12px; font-weight: 500; line-height: 1.25; color: var(--text-muted); }
.a-party-a { text-align: end; }
.a-party-a b { display: block; font-size: 15px; font-weight: 800; line-height: 1.2; }
.a-party-a small { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.a-kb {                                    /* KontoUserBadge: teal disc, white Konto mark, small teal shadow */
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: #0BBAD8; box-shadow: 0 2px 6px rgba(11,186,216,.35);
}
.a-kb img { width: 58%; height: 58%; }
.a-kb.sm { width: 15px; height: 15px; box-shadow: 0 1px 3px rgba(11,186,216,.35); }
.a-kb.pro { background: linear-gradient(140deg, #F1D79A, #B77A16); box-shadow: none; }

/* currency switcher (cart_currency_selector.dart): 32 px pill, labelMedium 700 accent,
   tap cycles (code rolls), hold opens a 112 px menu of 48 px rows */
.app .a-ccy { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--p-surface); color: var(--a500); font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.app .a-ccy.text { background: none; padding: 8px 4px; height: auto; text-decoration: underline; text-underline-offset: 3px; }
.a-ccy-roll { position: relative; display: inline-block; height: 16px; overflow: hidden; }
.a-ccy-roll > span { display: block; height: 16px; line-height: 16px; transition: transform .36s cubic-bezier(.2,.8,.2,1); }
.a-ccy-roll.next > span { transform: translateY(-16px); }
.a-ccy img, .a-ccy svg { width: 14px; height: 14px; }
.a-ccy-menu { position: absolute; z-index: 30; top: calc(100% + 12px); inset-inline-start: 0; width: 112px; border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 1px var(--border), 0 12px 24px var(--shadow-elev);
  transform-origin: top center; transform: scale(.85); opacity: 0; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s; }
.a-ccy-menu.open { transform: none; opacity: 1; }
.a-ccy-menu > span { display: grid; place-items: center; height: 48px; font-size: 13px; font-weight: 700; color: var(--text); }
.a-ccy-menu > span.hl { background: var(--p-surface); color: var(--a500); }

/* list rows used in settings-like screens */
.a-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; }
.a-row + .a-row { border-top: 1px solid var(--border); }
.a-row-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; color: var(--text); }

/* screen header (AppScreenHeader): back glyph, title 20/600 */
.a-sh { height: 56px; padding: 0 8px; display: flex; align-items: center; gap: 4px; padding-top: 0; }
.a-sh-b { width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-2); }
.a-sh-b svg { width: 22px; height: 22px; }
.app[dir="rtl"] .a-sh-b.back svg, [dir="rtl"] .app .a-sh-b.back svg { transform: scaleX(-1); }
.a-sh-t { flex: 1; font-size: 20px; font-weight: 600; line-height: 1; color: var(--text); }


/* palette classes for app artwork recoloured by IconPalette (label tag, party icons):
   put .pl-<name> on an ancestor; svg parts use .p (primary) and .s (secondary) */
.pl-cyan { --lp: #16B6CF; --ls: #9ADFE9; } .pl-blue { --lp: #4C8FE8; --ls: #BCD5F5; } .pl-purple { --lp: #8B6BE8; --ls: #D0C4F4; }
.pl-pink { --lp: #D96F9C; --ls: #F0C4D5; } .pl-teal { --lp: #43A99A; --ls: #B9DED8; } .pl-indigo { --lp: #6476D6; --ls: #C5CCEF; }
.pl-orange { --lp: #E69A43; --ls: #F4D5AD; } .pl-slate { --lp: #647D8C; --ls: #C8D3D9; }
.app svg .p { fill: var(--lp, #099AB3); } .app svg .s { fill: var(--ls, #A3E4EE); }

/* =====================================================================
   SCREEN HEADER (app_screen_header.dart): 8 top / 4 bottom, 16 sides,
   back 48 box at start, title titleSmall heavy centred, Teach Me + more at end
   ===================================================================== */
.a-scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.a-scr-b { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.a-hd { position: relative; flex: none; height: calc(60px + var(--sat)); padding: calc(8px + var(--sat)) 16px 4px; display: flex; align-items: center; }
.a-hd-back { width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-2); flex: none; }
.a-hd-back svg { width: 22px; height: 22px; }
.app[dir="rtl"] .a-hd-back svg, [dir="rtl"] .app .a-hd-back svg { transform: scaleX(-1); }
.a-hd-t { position: absolute; inset-inline: 104px; top: calc(8px + var(--sat)); height: 48px; display: grid; place-items: center; font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--text); white-space: nowrap; }
.a-hd-end { margin-inline-start: auto; display: flex; align-items: center; }
.a-hd-tm { width: 48px; height: 48px; display: grid; place-items: center; }
.a-hd-tm svg { width: 40px; height: 40px; margin: -8px 0 0 4px; }
.a-hd-more { width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-muted); }
.a-hd-more svg { width: 24px; height: 24px; }
.a-scroll { position: absolute; inset-inline-end: 4px; width: 4px; border-radius: 2px; background: var(--a200); opacity: .9; }

/* list sort / filter pills (debts_filter_sort_bar.dart) */
.a-lbar { display: flex; gap: 8px; padding: 0 16px; }
.a-lpill { flex: 1 1 0; height: 38px; border-radius: 999px; background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.a-lpill.f { font-weight: 500; color: var(--text-2); }
.a-lpill svg { width: 18px; height: 18px; color: var(--text-2); }
.a-lpill .dir { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--p-surface-strong); color: var(--p-link); font-size: 12px; font-weight: 700; }
.a-lpill .dir svg { width: 14px; height: 14px; color: currentColor; }

/* =====================================================================
   DEBTS: summary card (debts_net_position_summary_card.dart,
   debts_summary_components.dart) and party cards (debt_party_expandable_card.dart,
   debt_direction_count_badge.dart)
   ===================================================================== */
.a-dsum { position: relative; margin: 6px 16px 0; padding: 12px 16px; border-radius: 20px;
  background: linear-gradient(to bottom var(--a-endx, right) in srgb, #DDF6E8, #EDFAF2 50%, #F7FCF9); }
.a-dsum.neg { background: linear-gradient(to bottom var(--a-endx, right) in srgb, #FCE3E0, #FDF0EE 50%, #FFF8F7); }
.app[dir="rtl"] .a-dsum, [dir="rtl"] .app .a-dsum { --a-endx: left; }
.app.dark .a-dsum, .app.amoled .a-dsum { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-dsum-h { height: 26px; display: flex; align-items: center; gap: 6px; }
.a-dsum-d { font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--text-body); white-space: nowrap; }
.a-dsum-sep { width: 1px; height: 12px; background: #C8D3D9; flex: none; }
.a-dsum-c { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 4px; }
.a-dsum-c b { width: 36px; font-size: 16px; font-weight: 800; line-height: 1; color: #5B7383; }
.a-dsum-c img { width: 21px; height: 21px; }
.a-dsum-att { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--warn-content); font-size: 13px; font-weight: 800; }
.a-dsum-att i { width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; }
.a-dsum-r { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-dsum-a { font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; color: var(--ok); white-space: nowrap; }
.a-dsum.neg .a-dsum-a { color: var(--bad); }
.a-dsum-x { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 700; color: #3D6C86; white-space: nowrap; }
.a-dsum-x svg { width: 16px; height: 16px; }
.a-dlist { padding: 0 16px; display: grid; gap: 10px; }
.a-dpc { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-dpc.open { box-shadow: inset 0 0 0 1px var(--p-border); }
.a-dpc-av { position: relative; width: 42px; height: 42px; border-radius: 14px; background: var(--surface-subtle); display: grid; place-items: center; flex: none; }
.app:not(.dark):not(.amoled) .a-dpc-av { background: #F2F5F8; }
.a-dpc-av svg { width: 20px; height: 20px; }
.a-dpc-av .dot { position: absolute; top: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 1.5px solid var(--surface); }
.a-dpc-b { flex: 1; min-width: 0; }
.a-dpc-n { display: block; height: 22px; font-size: 14px; font-weight: 500; line-height: 22px; color: var(--text); white-space: nowrap; }
.a-dpc-m { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; line-height: 1.25; color: var(--text-muted); white-space: nowrap; }
.a-cap2 { display: flex; gap: 1px; flex: none; }
.a-cap2 > span { height: 28px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; line-height: 1; }
.a-cap2 > span:first-child { padding-inline: 9px 8px; border-start-start-radius: 16px; border-end-start-radius: 16px; }
.a-cap2 > span:last-child { padding-inline: 8px 9px; border-start-end-radius: 16px; border-end-end-radius: 16px; }
.a-cap2 svg { width: 12px; height: 12px; fill: currentColor; }
.a-cap2 .out { background: var(--bad-surface); color: var(--bad-content); }
.a-cap2 .in { background: var(--ok-surface); color: var(--ok-content); }
.a-cap2 .z { background: var(--disabled-surface); color: var(--disabled-content); }

/* DebtObligationCard, compact (Select Debts step, a party's debts) */
.a-dsec { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--text); }
.a-chk { position: relative; width: 19px; height: 19px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--disabled-content); flex: none; transition: background .2s, box-shadow .2s; }
.a-chk.okc { box-shadow: inset 0 0 0 1.5px var(--ok-border); }
.a-chk.badc { box-shadow: inset 0 0 0 1.5px var(--bad-border); }
.a-chk::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) scale(0); transition: transform .22s cubic-bezier(.34,1.56,.64,1); }
.a-chk.on { background: var(--ok-solid); box-shadow: inset 0 0 0 1.5px var(--ok); }
.a-chk.on::after { transform: rotate(45deg) scale(1); }
.a-ob { position: relative; padding: 12px 15px 12px; border-radius: 16px; background: var(--surface-el); box-shadow: inset 0 0 0 1px var(--border), 0 2px 1px var(--border); transition: box-shadow .25s, background .25s, opacity .4s, transform .4s; }
.a-ob.sel { background: var(--p-surface); box-shadow: inset 0 0 0 1px var(--p-border), 0 2px 1px var(--border); }
.a-ob-r1, .a-ob-r2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-ob-t { font-size: 15px; font-weight: 600; line-height: 22px; color: var(--text); white-space: nowrap; min-width: 0; }
.a-ob-a { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; line-height: 22px; white-space: nowrap; color: var(--ok); }
.a-ob-a.bad { color: var(--bad); }
.a-ob-r2 { margin-top: 4px; height: 18px; }
.a-ob-k { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--warn-content); }
.a-ob-k img { width: 14px; height: 14px; }
.a-ob-d { font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.a-ob-rail { position: relative; margin-top: 12px; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.a-ob-rail > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; background: var(--ok); transition: width .9s cubic-bezier(.65,0,.35,1); }
.a-ob-rail.bad > i { background: var(--bad); }

/* OverlayAmountCard: label + big amount + currency at the end, state-coloured */
.a-amt { position: relative; padding: 14px 16px 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); }
.a-amt.req { background: var(--bad-surface); box-shadow: inset 0 0 0 1.5px var(--warn); }
.a-amt.okk { background: var(--ok-surface); box-shadow: inset 0 0 0 1.5px var(--a500); }
.a-amt-l { font-size: 13px; font-weight: 500; line-height: 1.25; color: var(--ok-content); }
.a-amt.req .a-amt-l { color: var(--bad); }
.a-amt-r { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-amt-v { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--text); white-space: nowrap; }
.a-amt.req .a-amt-v { color: var(--bad-content); }
.a-amt-c { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 500; color: var(--a600); }
.a-amt-c img { width: 18px; height: 18px; }
/* info note (tinted row with an info glyph) */
.a-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--p-surface); color: var(--p-content); font-size: 12px; font-weight: 500; line-height: 1.45; }
.a-note svg { width: 18px; height: 18px; flex: none; color: var(--a600); }
/* SmartSolver breakdown card */
.a-bk { padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-bk-id { display: flex; align-items: center; gap: 10px; }
.a-bk-av { width: 38px; height: 38px; border-radius: 16px; display: grid; place-items: center; background: #F2F5F8; flex: none; }
.a-bk-av svg { width: 18px; height: 18px; }
.a-bk-n { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--text); }
.a-bk-s { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.a-bk-hr { height: 1px; margin: 12px 0; background: var(--divider); }
.a-bk-cols { display: flex; gap: 12px; }
.a-bk-col { flex: 1 1 0; min-width: 0; }
.a-bk-col + .a-bk-col { padding-inline-start: 12px; box-shadow: inset 1px 0 0 var(--divider); }
.app[dir="rtl"] .a-bk-col + .a-bk-col, [dir="rtl"] .app .a-bk-col + .a-bk-col { box-shadow: inset -1px 0 0 var(--divider); }
.a-bk-ch { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--ok-content); }
.a-bk-col.bad .a-bk-ch { color: var(--bad-content); }
.a-bk-ch svg { width: 14px; height: 14px; fill: currentColor; }
.a-bk-v { margin-top: 8px; font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--ok-content); white-space: nowrap; }
.a-bk-col.bad .a-bk-v { color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { transition-duration: .001s !important; animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}
/* party avatar glyph: person by default, company with .co (party_avatar_icon.dart) */
.a-dpc-av .co-i, .a-bk-av .co-i { display: none; }
.a-dpc-av.co .co-i, .a-bk-av.co .co-i { display: block; }
.a-dpc-av.co .pe-i, .a-bk-av.co .pe-i { display: none; }

/* party card preview when tapped (debt_party_preview_card.dart): currency table + View debts / Smart Settle */
.a-dpc { flex-wrap: wrap; }
.a-dpv { flex: 0 0 calc(100% + 28px); margin: 0 -14px -14px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s cubic-bezier(.2,.8,.2,1), opacity .3s, margin .4s; }
.a-dpv.on { max-height: 200px; opacity: 1; margin-top: 14px; box-shadow: inset 0 1px 0 var(--border); }
.a-dpv-h, .a-dpv-r { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 0 14px; }
.a-dpv-h { height: 40px; padding-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-muted); }
.a-dpv-h > span:not(:first-child), .a-dpv-r > span:not(:first-child) { text-align: end; justify-self: end; }
.a-dpv-h .bad { color: var(--bad); } .a-dpv-h .ok { color: var(--ok-solid); }
.a-dpv-r { height: 50px; font-size: 16px; font-weight: 600; }
.a-dpv-r .ok { color: var(--ok-solid); }
.a-dpv-r .dash { width: 16px; height: 2px; border-radius: 1px; background: var(--disabled-content); margin-inline-end: 8px; }
.a-dpv-r .a-pill.code { width: 40px; height: 22px; font-size: 11px; color: var(--p-accent); background: var(--p-surface); }
.a-dpv-a { display: flex; gap: 8px; padding: 6px 14px 14px; }
.a-dpv-b { flex: 1 1 0; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; transition: transform .15s, filter .15s; }
.a-dpv-b svg { width: 18px; height: 18px; }
.app[dir="rtl"] .a-dpv-b svg, [dir="rtl"] .app .a-dpv-b svg { transform: scaleX(-1); }
.a-dpv-b.pri { background: var(--a500); color: #fff; box-shadow: 0 3px 0 var(--p-surface-strong); }
.a-dpv-b.press { transform: scale(.95); filter: brightness(.92); }
/* Smart Settlement calculation card (smart_solver_calc_card.dart) */
.a-calc { padding: 2px 18px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-calc-k { margin-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-muted); }
.a-calc-d { margin-top: 12px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ok-content); }
.a-calc-r { display: flex; align-items: center; gap: 10px; height: 40px; margin-top: 6px; font-size: 15px; }
.a-calc-r .chev { color: var(--text-muted); font-size: 16px; width: 10px; }
.a-calc-r b { font-weight: 700; color: var(--text); }
.a-calc-r b:last-child { margin-inline-start: auto; }
.a-calc-s { display: flex; align-items: center; height: 36px; margin-top: 4px; padding-inline-start: 10px; box-shadow: inset 1.5px 0 0 var(--border); font-size: 14px; color: var(--text-muted); }
.app[dir="rtl"] .a-calc-s, [dir="rtl"] .app .a-calc-s { box-shadow: inset -1.5px 0 0 var(--border); }
.a-calc-s b { margin-inline-start: auto; font-weight: 700; color: var(--ok-content); }
/* amount card states from the real frames: .in = they pay you (green), .out = you pay (red) */
.a-amt { min-height: 87px; padding: 15px 16px 9px; box-shadow: inset 0 0 0 1.5px var(--a500); }
.a-amt-l { font-size: 14px; }
.a-amt-v { font-size: 34px; font-weight: 800; }
.a-amt-c { font-size: 20px; gap: 6px; }
.a-amt-c img { width: 17px; height: 14px; }
.a-amt.in { background: var(--ok-surface); } .a-amt.in .a-amt-l { color: var(--ok-solid); } .a-amt.in .a-amt-v { color: var(--ok-solid); } .a-amt.in .a-amt-c { color: var(--ok-solid); }
.a-amt.out { background: var(--bad-surface); } .a-amt.out .a-amt-l, .a-amt.out .a-amt-v, .a-amt.out .a-amt-c { color: var(--bad); }
.a-note { font-size: 14px; line-height: 1.45; color: var(--p-link); background: #EEF8FA; padding: 14px 16px; }
.app.dark .a-note, .app.amoled .a-note { background: var(--p-surface); }
.a-note svg { width: 20px; height: 20px; margin-top: 1px; color: var(--p-link); }
/* drawer subtitle as bodySmall textSecondary; header glyph close / back */
.a-sheet-s.b { font-size: 15px; color: var(--text-2); }
.a-sheet-x .gb { display: none; }
.a-sheet-x.back .gx { display: none; } .a-sheet-x.back .gb { display: block; }
.app[dir="rtl"] .a-sheet-x.back .gb, [dir="rtl"] .app .a-sheet-x.back .gb { transform: scaleX(-1); }

/* =====================================================================
   PRODUCT DETAIL (product detail screen, product_stock_card.dart,
   product_warehouse_distribution_card.dart, financials card)
   ===================================================================== */
.a-pd { padding: 12px 16px 0; display: grid; gap: 12px; align-content: start; }
.a-pdh { border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.a-pdh-t { display: flex; align-items: center; gap: 14px; padding: 13px 16px 13px; }
.a-pdh-img { position: relative; width: 54px; height: 54px; border-radius: 16px; background: #F2F5F8; display: grid; place-items: center; flex: none; }
.app.dark .a-pdh-img, .app.amoled .a-pdh-img { background: var(--surface-muted); }
.a-pdh-img img { width: 32px; height: 32px; }
.a-pdh-img i { position: absolute; top: -5px; inset-inline-end: -5px; width: 18px; height: 18px; border-radius: 50%; background: #229954; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px var(--surface); }
.a-pdh-b { flex: 1; min-width: 0; }
.a-pdh-n { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--text); white-space: nowrap; }
.a-pdh-c { display: block; margin-top: 4px; font-size: 15px; font-weight: 400; line-height: 1.3; color: var(--text-2); }
.a-pdh-m { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; letter-spacing: .12em; color: var(--text-muted); white-space: nowrap; }
.a-pdh-bc { width: 30px; height: 26px; flex: none; }
.a-pdh-f { height: 37px; display: grid; place-items: center; background: var(--surface-muted); box-shadow: inset 0 1px 0 var(--border); font-size: 13px; font-weight: 500; color: var(--text-2); }
.a-tabs { display: flex; padding: 4px; height: 51px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-tabs > span { flex: 1 1 0; display: grid; place-items: center; border-radius: 22px; font-size: 17px; font-weight: 500; color: var(--text-2); }
.a-tabs > span.on { background: var(--a500); color: #fff; font-weight: 700; }
.a-stk { border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-stk-s { padding: 12px 16px 12px; }
.a-stk-h { display: flex; align-items: center; gap: 8px; height: 30px; }
.a-stk-h .t { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.a-stk-h .c { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1; color: var(--ok-content); }
.a-stk-h .c.low { color: var(--warn-content); } .a-stk-h .c.out { color: var(--bad-content); }
.a-stk-h .u { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.a-stk-h svg { width: 20px; height: 20px; color: var(--text-muted); transition: transform .3s; }
.a-stk.open .a-stk-h svg { transform: rotate(180deg); }
.a-stk-bar { position: relative; margin-top: 10px; height: 14px; }
.a-stk-bar .tr { position: absolute; inset-inline: 0; top: 4px; height: 6px; border-radius: 3px; background: var(--surface-muted); }
.a-stk-bar .fl { position: absolute; inset-inline-start: 0; top: 4px; height: 6px; border-radius: 3px; background: linear-gradient(to var(--a-endx, right) in srgb, var(--a500), var(--ok)); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.app[dir="rtl"] .a-stk-bar .fl, [dir="rtl"] .app .a-stk-bar .fl { --a-endx: left; }
.a-stk-bar .fl.low { background: var(--warn); }
.a-stk-bar .mk { position: absolute; top: 0; width: 4px; height: 14px; margin-inline-start: -2px; border-radius: 2px; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }
.a-stk-l { margin-top: 3px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.a-stk-l .al { font-weight: 700; color: var(--warn-content); }
.a-stk-x { box-shadow: inset 0 1px 0 var(--divider); padding: 12px 16px 14px; }
.a-dist-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.a-dist-h img { width: 18px; height: 18px; }
.a-dist-r { margin-top: 12px; }
.a-dist-r .row { display: flex; align-items: center; gap: 8px; }
.a-dist-r .nm { flex: 1; min-width: 0; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.a-dist-r .pr { height: 18px; padding: 0 7px; border-radius: 999px; background: var(--p-surface-strong); color: var(--p-accent); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; }
.a-dist-r .q { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; transition: color .3s; }
.a-dist-r .q.flash { color: var(--ok-content); }
.a-dist-r .pc { width: 30px; text-align: end; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.a-dist-r .bar { position: relative; margin-top: 6px; height: 4px; border-radius: 2px; background: var(--surface-muted); overflow: hidden; }
.a-dist-r .bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 2px; background: var(--a500); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.a-fin { border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.a-fin-h { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; box-shadow: inset 0 -1px 0 var(--border); }
.a-fin-h .t { flex: 1; font-size: 15px; font-weight: 700; color: var(--text); }
.a-fin-h .pu { font-size: 13px; color: var(--text-muted); }
.a-fin-h .cc { font-size: 15px; font-weight: 800; color: var(--a500); }
.a-fin-h img { width: 18px; height: 18px; }
.a-fin-g { display: grid; grid-template-columns: 1fr 1fr; }
.a-fin-g > div { padding: 14px 16px; }
.a-fin-g > div + div { box-shadow: inset 1px 0 0 var(--border); }
.app[dir="rtl"] .a-fin-g > div + div, [dir="rtl"] .app .a-fin-g > div + div { box-shadow: inset -1px 0 0 var(--border); }
.a-fin-g p { font-size: 13px; color: var(--text-muted); }
.a-fin-g b { display: block; margin-top: 4px; font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; }
.app .a-order { height: 48px; border-radius: 24px; background: var(--a500); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 600; }
.a-order img { width: 22px; height: 22px; filter: brightness(0) invert(1); }

/* =====================================================================
   TRANSFER STOCK drawer (stock_transfer_overlay.dart, transfer_stock_card.dart)
   ===================================================================== */
.a-whs { display: flex; align-items: flex-end; gap: 8px; }
.a-whs-c { flex: 1 1 0; min-width: 0; }
.a-whs-l { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--text-muted); }
.a-whs-b { margin-top: 6px; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px; border-radius: 16px; background: var(--p-surface); box-shadow: inset 0 0 0 1px var(--a500); transition: background .3s, box-shadow .3s; }
.a-whs-c.to .a-whs-b { background: var(--ai-surface); box-shadow: inset 0 0 0 1px var(--ai); }
.a-whs-b img { width: 16px; height: 16px; flex: none; }
.a-whs-b > span { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.a-whs-b svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.a-whs-sw { width: 34px; height: 34px; margin-bottom: 6px; border-radius: 16px; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center; color: var(--text-2); flex: none; }
.a-whs-sw svg { width: 18px; height: 18px; }
.a-trc { padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), 0 2px 8px var(--shadow-subtle); }
.a-trc-h { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; box-shadow: inset 0 -1px 0 var(--border); font-size: 13px; font-weight: 700; color: var(--text); }
.a-trc-h svg { width: 18px; height: 18px; }
.a-trc-r { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 0; }
.a-trc-r .ic { width: 36px; height: 36px; border-radius: 12px; background: #F2F5F8; display: grid; place-items: center; flex: none; }
.a-trc-r .ic img { width: 22px; height: 22px; }
.a-trc-r .b { flex: 1; min-width: 0; }
.a-trc-r .n { display: block; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.a-trc-r .av { display: block; margin-top: 2px; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.a-step { display: flex; align-items: center; gap: 2px; }
.a-step > i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--a600); background: var(--p-surface); font-style: normal; font-size: 18px; font-weight: 700; line-height: 1; transition: transform .12s; }
.a-step > i.press { transform: scale(.86); }
.a-step > b { width: 28px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text); }
.a-all { height: 30px; width: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--border); font-size: 10px; font-weight: 700; color: var(--text-2); }
.a-search { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border), 0 2px 8px var(--shadow-subtle); font-size: 13px; color: var(--text-muted); }
.a-search svg { width: 20px; height: 20px; color: var(--text-muted); }

/* Konto Personal workspace accent (AppPalette.personalLight / personalDark / personalAmoled):
   add .personal to .app (combine with .dark / .amoled). Business is the default cyan. */
.app.personal { --a50: #F3F8FF; --a100: #DEECFE; --a200: #BEDAFE; --a300: #A3CBFE; --a500: #6EA9F5; --a600: #5A8CCB; --a700: #416593; --a800: #2B4465; --a900: #192B41;
  --p-surface: #F3F8FF; --p-surface-strong: #DEECFE; --p-border: #BEDAFE; --p-content: #2B4465; --p-accent: #416593; --p-link: #5A8CCB; }
.app.personal.dark, .app.personal.amoled { --p-surface: #192B41; --p-surface-strong: #142233; --p-border: #2E496B; --p-content: #A3CBFE; --p-accent: #A3CBFE; --p-link: #6EA9F5; }

/* =====================================================================
   TRANSACTION RECORD DRAWER (transaction_record_drawer.dart, transaction_drawer_hero.dart,
   transaction_flow_card.dart, transaction_drawer_section.dart, transaction_details_footer.dart)
   Used by Review Sale, a saved record and the incoming Konto record.
   ===================================================================== */
.a-rec { display: grid; gap: 12px; align-content: start; }
.a-rec-hero { display: grid; justify-items: center; padding-top: 2px; }
.a-rec-tile { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--p-surface); }
.a-rec-tile > img { width: 28px; height: 28px; }
.a-rec-tile.ok { background: var(--ok-surface); } .a-rec-tile.warn { background: var(--warn-surface); }
.a-rec-tile .a-ok { position: absolute; inset-inline-end: -12px; bottom: -10px; width: 26px; height: 26px; }
.a-rec-amt { margin-top: 10px; display: flex; align-items: baseline; gap: 6px; }
.a-rec-amt b { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; color: var(--text); }
.a-rec-amt > span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.a-flow { padding: 12px; border-radius: 20px; background: var(--surface-muted); }
.a-flow-n { display: flex; align-items: center; gap: 12px; }
.a-flow-t { position: relative; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; }
.a-flow-t svg, .a-flow-t > img { width: 20px; height: 20px; }
.a-flow-t .a-kb { position: absolute; inset-inline-end: -6px; bottom: -6px; width: 17px; height: 17px; box-shadow: 0 0 0 2px var(--surface-muted); }
.a-flow-b { flex: 1; min-width: 0; }
.a-flow-nm { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); white-space: nowrap; }
.a-flow-m { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-2); white-space: nowrap; }
.a-flow-m .bf { color: var(--text-muted); }
.a-flow-m .af { font-weight: 700; color: var(--text); }
.a-flow-m .af.neg { color: var(--bad); }
.a-flow-m svg { width: 14px; height: 14px; color: var(--ok); }
.app[dir="rtl"] .a-flow-m svg, [dir="rtl"] .app .a-flow-m svg { transform: scaleX(-1); }
.a-flow-ar { width: 40px; height: 22px; display: grid; place-items: center; color: var(--a500); }
.a-flow-ar svg { width: 16px; height: 16px; }
.a-sec { padding: 12px 16px 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-sec-h { display: flex; align-items: center; gap: 10px; height: 30px; }
.a-sec-h img { width: 22px; height: 22px; }
.a-sec-h .t { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.a-sec-h .s { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.a-sec-h svg { width: 18px; height: 18px; color: var(--text-2); }
.a-sec-w { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.a-sec-w img { width: 14px; height: 14px; }
.a-line { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.a-line .ti { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #F7EEF4; flex: none; }
.a-line .ti img { width: 24px; height: 24px; }
.a-line .ti b { position: absolute; inset-inline-end: -6px; bottom: -6px; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; background: #0F1D22; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 0 0 2px var(--surface); }
.a-line .b { flex: 1; min-width: 0; }
.a-line .n { display: block; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.a-line .e { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.a-line .v { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.a-line .chg { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ok-content); }
.a-kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; font-size: 14px; color: var(--text-2); }
.a-kv + .a-kv { box-shadow: inset 0 1px 0 var(--divider); }
.a-kv b { font-weight: 700; color: var(--text); white-space: nowrap; }
.a-kv b.bad { color: var(--bad); }
.a-seg { display: flex; padding: 4px; border-radius: 16px; background: var(--surface-muted); }
.a-seg > span { flex: 1 1 0; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.a-seg > span.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(10,25,41,.12); font-weight: 700; }
/* the footer row of a saved record: QR icon, Send (Konto), redo */
.a-recf { display: flex; gap: 10px; }
.app .a-dbtn.ai { position: relative; background: var(--a500); }
.app .a-dbtn.ai::before { content: ""; position: absolute; inset: -3px; border-radius: 19px; padding: 2px; background: conic-gradient(from var(--ai-a, 0deg), #8B5CF6, #0BBAD8, #D96F9C, #8B5CF6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: a-ai-spin 3s linear infinite; }
@property --ai-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes a-ai-spin { to { --ai-a: 360deg; } }
.app .a-dbtn .km { width: 18px; height: 18px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.app .a-dbtn .km img { width: 12px; height: 12px; filter: none; }
/* ActionChoiceCard (share method step) */
.a-choice { position: relative; flex: 1 1 0; height: 152px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); display: grid; align-content: start; gap: 8px; }
.a-choice.on { background: var(--p-surface); box-shadow: inset 0 0 0 1.5px var(--a500); }
.a-choice .m { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--a500); }
.a-choice .m img { width: 22px; height: 22px; }
.a-choice .m.f { background: var(--p-surface-strong); }
.a-choice b { font-size: 14px; font-weight: 700; color: var(--text); }
.a-choice p { font-size: 11.5px; line-height: 1.35; color: var(--text-2); }
.a-choice .ck { position: absolute; top: 12px; inset-inline-end: 12px; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border); }
.a-choice.on .ck { background: var(--a500); box-shadow: none; }
.a-choice.on .ck::after { content: ""; position: absolute; left: 8px; top: 4px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* in-app banner (notification arriving at the top) */
.a-banner { position: absolute; z-index: 30; top: calc(var(--sat) + 8px); inset-inline: 10px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--surface-el); box-shadow: 0 12px 30px rgba(10,25,41,.22), inset 0 0 0 1px var(--border);
  transform: translateY(-140%); transition: transform .5s cubic-bezier(.2,.9,.25,1.1); }
.a-banner.on { transform: none; }
.a-banner .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--a500); flex: none; }
.a-banner .ic img { width: 22px; height: 22px; }
.a-banner b { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.a-banner > span > span { display: block; margin-top: 1px; font-size: 12px; color: var(--text-2); }
/* toast / pill message at the bottom of a drawer */
.a-toast { position: absolute; z-index: 25; inset-inline: 20px; bottom: calc(var(--sab) + 104px); padding: 12px 14px; border-radius: 16px; background: var(--inverse); color: #fff; font-size: 13px; line-height: 1.4; display: flex; gap: 10px; align-items: center;
  opacity: 0; transform: translateY(14px); transition: opacity .3s, transform .45s cubic-bezier(.2,.9,.25,1.1); }
.a-toast.on { opacity: 1; transform: none; }
.a-toast .a-ok { width: 22px; height: 22px; flex: none; }

/* record reference chips under the hero (transaction_drawer_hero.dart): own number + Konto reference */
.a-refs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; }
.a-own { padding: 5px 12px; border-radius: 16px; background: var(--p-surface); box-shadow: inset 0 0 0 1px var(--p-border); font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--p-content); white-space: nowrap; }
.a-ref { padding: 6px 10px; border-radius: 16px; background: var(--surface-muted); font-size: 13px; font-weight: 500; color: var(--p-accent); white-space: nowrap; }
/* share step (transaction_share_step.dart): document cards with paper previews, format chips, QR switch, destinations */
.a-docs { display: flex; gap: 10px; }
.a-doc { flex: 1 1 0; padding: 10px 10px 12px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--border); transition: box-shadow .25s, background .25s; }
.a-doc.on { box-shadow: inset 0 0 0 2px var(--a500); background: var(--p-surface); }
.a-doc-pv { height: 124px; border-radius: 12px; background: var(--surface-muted); display: grid; place-items: center; padding-top: 14px; overflow: hidden; }
.a-paper { width: 88px; height: 110px; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(10,25,41,.12); padding: 10px 9px; display: grid; gap: 5px; align-content: start; }
.a-paper.roll { width: 62px; }
.a-paper i { display: block; height: 3px; border-radius: 2px; background: #DCE3E8; }
.a-paper i.t { width: 30px; height: 5px; background: #0F1D22; }
.a-paper i.a { width: 44px; } .a-paper i.b { width: 38px; } .a-paper i.c { background: #0BBAD8; width: 24px; }
.a-doc b { display: block; margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text); }
.a-fmt { display: flex; gap: 8px; }
.app .a-fmt .a-chip { height: 34px; flex: 1 1 0; justify-content: center; }
.a-dest { display: flex; justify-content: center; gap: 12px; padding-top: 6px; }   /* TransactionShareFooter: 52 circles, 60 wide, 12 apart */
.a-dest > span { width: 60px; display: grid; justify-items: center; gap: 6px; font-size: 11px; font-weight: 600; line-height: 1.25; color: var(--text-2); }
.a-dest i { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center; font-style: normal; color: var(--text-2); transition: transform .12s, filter .12s; }
.a-dest i img { width: 26px; height: 26px; }

/* =====================================================================
   ACCOUNTS (accounts list screen): total balance with the currency switcher,
   currency groups, account cards
   ===================================================================== */
.a-acc-top { position: relative; padding: 10px 20px 0; }
.a-acc-k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.app[dir="rtl"] .a-acc-k, [dir="rtl"] .app .a-acc-k { letter-spacing: 0; }
.a-acc-tot { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; }
.a-acc-tot b { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -1.5px; color: var(--text); white-space: nowrap; }
.app .a-acc-cc { position: relative; display: inline-flex; align-items: center; gap: 3px; font-size: 18px; font-weight: 500; color: var(--text); white-space: nowrap; }
.a-acc-cc svg { width: 18px; height: 18px; }
.a-acc-cc .a-ccy-menu { top: calc(100% + 10px); }
.a-acc-meta { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-muted); white-space: nowrap; }
.a-acc-meta i { width: 1px; height: 18px; background: var(--border); }
.a-acc-meta svg { width: 18px; height: 18px; }
.a-acc-att { position: absolute; top: 14px; inset-inline-end: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 900; box-shadow: 0 0 0 3px #FAD7A0; }
.a-acc-grp { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 34px; margin-top: 20px; }
.a-acc-grp .c { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--text-muted); }
.a-acc-grp .c::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); }
.a-acc-grp b { font-size: 15px; font-weight: 600; color: var(--text-2); }
.a-acc-l { display: grid; gap: 9px; padding: 6px 20px 0; }
.a-acc-c { position: relative; display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.a-acc-ic { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--p-surface); }
.a-acc-ic img, .a-acc-ic svg { width: 32px; height: 32px; }
.a-acc-ic .dot { position: absolute; top: -3px; inset-inline-end: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 1.5px solid var(--surface); }
.a-acc-b { flex: 1; min-width: 0; }
.a-acc-n { display: block; font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--text); white-space: nowrap; }
.a-acc-code { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; letter-spacing: .06em; color: var(--text-muted); }
.a-acc-code svg { width: 13px; height: 13px; color: var(--a600); }
.a-acc-v { text-align: end; }
.a-acc-v b { display: block; font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.a-acc-v b.neg { color: var(--bad); }
.a-acc-v small { display: block; margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.a-roll2 { display: inline-block; height: 1.05em; overflow: hidden; vertical-align: bottom; }
.a-roll2 > span { display: block; transition: transform .38s cubic-bezier(.2,.8,.2,1); }
.a-roll2.b > span { transform: translateY(-100%); }

/* SuccessBadgeHero, record size (registry row 9): 76 px tile, the check lands on its bottom-end corner */
.a-rec-tile.big { width: 76px; height: 76px; border-radius: 22px; }
.a-rec-tile.big > img { width: 44px; height: 44px; }
.a-rec-tile.big .a-ok { width: 30px; height: 30px; inset-inline-end: -8px; bottom: -8px; }
.a-rec-tile.big .a-ok i { box-shadow: 0 0 0 3px var(--surface); }
