/* Jayaam ERP Pro: the portal's own look on top of Filament, and the custom styles of its pages. Plain CSS, no build step. */

/* ---------- Fonts ---------- */
/* Inter (loaded in AdminPanelProvider) for text, tables and figures; Plus Jakarta Sans for headings and big amounts. */
:root { --ja-font-display: 'Plus Jakarta Sans', var(--font-family), ui-sans-serif, system-ui, sans-serif; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: normal; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
.fi-header-heading, .fi-modal-heading, .fi-simple-header-heading, .fi-section-header-heading, .fi-ta-header-heading,
.fi-wi-stats-overview-stat-value, .ja-acct-amt, .ja-emi-amt, .ja-lost-amt, .ja-recv-amt, .ja-lostbox-total, .ja-spend-centre strong,
.ja-stats strong { font-family: var(--ja-font-display); }
/* Figures line up under each other in tables and cards. */
.fi-ta-table, .fi-ta-text, .ja-table, .ja-costs, .fi-wi-stats-overview-stat-value, .ja-acct-amt, .ja-emi-amt, .ja-lost-amt, .ja-recv-amt,
.ja-lostbox-total, .ja-stats strong, .ja-due-amt, .ja-recv-tile strong, .ja-lost-val, .ja-spend-amt, .ja-recv-row .amt,
.fi-fo-field input { font-variant-numeric: tabular-nums; }

/* ---------- The frame: top bar and side menu in deep ink (like the sign-in page), content on a soft grey ---------- */
:root { --ja-ink: #0b0f1a; --ja-ink-hi: rgb(255 255 255 / .07); --ja-red: #e11d27; }
.fi-body { background: #f3f5f9; }
.dark .fi-body { background: #050811; }
::selection { background: rgb(225 29 39 / .18); }
html { scrollbar-color: rgb(100 116 139 / .4) transparent; }

.fi-topbar { background: var(--ja-ink); box-shadow: 0 1px 0 rgb(255 255 255 / .06), 0 10px 30px -18px rgb(2 6 23 / .7); }
.dark .fi-topbar { background: #070b15; }
/* The light-text logo on the ink bar and in the phone menu, in light mode too. */
.fi-topbar .fi-logo-light, .fi-sidebar .fi-logo-light { display: none !important; }
.fi-topbar .fi-logo-dark, .fi-sidebar .fi-logo-dark { display: flex !important; }
/* Buttons on the bar (menu, bell); not the ones inside its drop-down menus. */
.fi-topbar .fi-icon-btn:not(.fi-dropdown-panel *) { color: rgb(255 255 255 / .72); }
.fi-topbar .fi-icon-btn:not(.fi-dropdown-panel *):hover, .fi-topbar .fi-icon-btn:not(.fi-dropdown-panel *):focus-visible { background: rgb(255 255 255 / .08); color: #fff; }
.fi-topbar .fi-icon-btn:not(.fi-dropdown-panel *) .fi-icon { color: inherit; }
.fi-topbar .fi-user-avatar { box-shadow: 0 0 0 2px rgb(255 255 255 / .16); }
/* Search box on the bar */
.fi-topbar .fi-global-search-field .fi-input-wrp { background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
.fi-topbar .fi-global-search-field .fi-input-wrp:focus-within { background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18), 0 0 0 3px rgb(225 29 39 / .35); }
.fi-topbar .fi-global-search-field .fi-input { color: #fff; }
.fi-topbar .fi-global-search-field .fi-input::placeholder { color: rgb(255 255 255 / .45); }
.fi-topbar .fi-global-search-field .fi-input-wrp-prefix .fi-icon, .fi-topbar .fi-global-search-field .fi-input-wrp-suffix { color: rgb(255 255 255 / .5); }

/* Side menu */
.fi-sidebar { background: var(--ja-ink); }
.dark .fi-sidebar { background: #070b15; box-shadow: 1px 0 0 rgb(255 255 255 / .05); }
.fi-sidebar-nav { scrollbar-color: rgb(255 255 255 / .16) transparent; scrollbar-width: thin; }
.fi-sidebar-group-label { color: rgb(255 255 255 / .42); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fi-sidebar-group-btn .fi-icon-btn, .fi-sidebar-group-btn .fi-icon, .fi-sidebar-group-icon { color: rgb(255 255 255 / .38); }
.fi-sidebar-group-btn .fi-icon-btn:hover { background: rgb(255 255 255 / .06); color: rgb(255 255 255 / .8); }
.fi-sidebar-item-btn { border-radius: .65rem; color: rgb(255 255 255 / .72); transition: background-color .15s ease, color .15s ease; }
.fi-sidebar-item-label { color: inherit; font-weight: 500; }
.fi-sidebar-item-icon { color: rgb(255 255 255 / .46); transition: color .15s ease; }
.fi-sidebar-item-btn:hover, .fi-sidebar-item-btn:focus-visible { background: rgb(255 255 255 / .06); color: #fff; }
.fi-sidebar-item-btn:hover .fi-sidebar-item-icon { color: rgb(255 255 255 / .8); }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { position: relative; background: linear-gradient(90deg, rgb(225 29 39 / .3), rgb(225 29 39 / .07)); color: #fff; }
/* A short glowing red bar at the left edge of the open screen's item. */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::before {
    content: '';
    position: absolute;
    top: 25%;
    bottom: 25%;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #ff4b55;
    box-shadow: 0 0 10px rgb(255 75 85 / .75);
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label { font-weight: 600; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon { color: #ff7a80; }
.fi-sidebar-item-grouped-border-part, .fi-sidebar-item-grouped-border-part-not-first, .fi-sidebar-item-grouped-border-part-not-last { background: rgb(255 255 255 / .14); }
.fi-sidebar .fi-badge { background: rgb(225 29 39 / .24); color: #ffc4c7; box-shadow: none; }
.fi-sidebar .fi-sidebar-close-btn, .fi-sidebar .fi-sidebar-header .fi-icon-btn { color: rgb(255 255 255 / .72); }
.fi-sidebar-header { background: transparent; box-shadow: none; }

/* ---------- Content: page titles, cards, tables, buttons ---------- */
.fi-header-heading { letter-spacing: -.025em; }
.fi-header-subheading { color: #64748b; }
.dark .fi-header-subheading { color: #94a3b8; }

/* Cards: a hairline edge and a soft shadow, slightly rounder. */
.fi-section:not(.fi-section-not-contained):not(.fi-aside), .fi-wi-stats-overview-stat, .fi-ta-ctn, .fi-tabs:not(.fi-contained) {
    border-radius: 1rem;
    box-shadow: 0 0 0 1px rgb(15 23 42 / .06), 0 1px 2px rgb(15 23 42 / .04), 0 12px 32px -20px rgb(15 23 42 / .28);
}
.dark .fi-section:not(.fi-section-not-contained):not(.fi-aside), .dark .fi-wi-stats-overview-stat, .dark .fi-ta-ctn, .dark .fi-tabs:not(.fi-contained) {
    box-shadow: 0 0 0 1px rgb(255 255 255 / .07), 0 14px 34px -20px rgb(0 0 0 / .9);
}
.fi-section .fi-section:not(.fi-section-not-contained):not(.fi-aside) { box-shadow: 0 0 0 1px rgb(15 23 42 / .07); }
.dark .fi-section .fi-section:not(.fi-section-not-contained):not(.fi-aside) { box-shadow: 0 0 0 1px rgb(255 255 255 / .08); }
.fi-section-header-heading { font-weight: 650; letter-spacing: -.01em; }
.fi-wi-stats-overview-stat-label { font-weight: 500; }
.fi-wi-stats-overview-stat-value { letter-spacing: -.02em; }

/* Tables: a tinted header row and roomier rows. */
.fi-ta-header-cell { background: #f8fafc; color: #475569; font-weight: 600; }
.dark .fi-ta-header-cell { background: rgb(255 255 255 / .025); color: #cbd5e1; }
.fi-ta-row { transition: background-color .12s ease; }
.fi-ta-row:hover { background: #fafbfd; }
.dark .fi-ta-row:hover { background: rgb(255 255 255 / .025); }

/* Main buttons: the brand red with a soft sheen and shadow. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) {
    background-image: linear-gradient(180deg, rgb(255 255 255 / .13), rgb(255 255 255 / 0));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 1px 2px rgb(127 10 16 / .25), 0 8px 18px -10px rgb(225 29 39 / .75);
}
.fi-btn { border-radius: .65rem; }
.fi-input-wrp { border-radius: .65rem; }
.fi-badge { border-radius: 999px; }
.fi-modal-window { border-radius: 1.25rem; }
.fi-dropdown-panel { border-radius: .9rem; box-shadow: 0 0 0 1px rgb(15 23 42 / .07), 0 22px 48px -20px rgb(15 23 42 / .4); }
.dark .fi-dropdown-panel { box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 22px 48px -20px rgb(0 0 0 / .9); }
.fi-no-notification { border-radius: 1rem; }

.ja-list { margin: -8px -12px; }
.ja-list > * + * { border-top: 1px solid rgba(0,0,0,.06); }
.dark .ja-list > * + * { border-top-color: rgba(255,255,255,.06); }
.ja-due { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; transition: background .15s; }
.ja-due:hover { background: rgba(0,0,0,.03); }
.dark .ja-due:hover { background: rgba(255,255,255,.04); }
.ja-due-icon { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.ja-due-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ja-due-title { font-size: .875rem; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dark .ja-due-title { color: #fff; }
.ja-due-sub { font-size: .75rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-due-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; }
.ja-due-amt { font-size: .875rem; font-weight: 700; }
.ja-due-when { font-size: .75rem; color: #64748b; }
.ja-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.ja-filters > * { min-width: 180px; }
.ja-totals { text-align: right; font-size: .75rem; line-height: 1.4rem; color: #64748b; }
.ja-empty { padding: 40px 0; text-align: center; }

/* Statement / report tables */
.ja-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ja-stats > div { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 4px; }
.dark .ja-stats > div { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.ja-stats span { font-size: .8rem; color: #64748b; }
.ja-stats strong { font-size: 1.2rem; }
.ja-table-wrap { overflow-x: auto; margin: -8px -12px; }
.ja-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ja-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.ja-table td { padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.05); vertical-align: top; }
.dark .ja-table th, .dark .ja-table td { border-color: rgba(255,255,255,.07); }
.ja-table .r { text-align: right; white-space: nowrap; }
.ja-sub { font-size: .75rem; color: #64748b; }
.ja-muted-row td { color: #64748b; font-style: italic; }
.ja-total-row td { font-weight: 700; border-top: 2px solid rgba(0,0,0,.12); }
.ja-group-row td { font-weight: 700; background: rgba(225,29,39,.05); }
.ja-indent { padding-left: 28px !important; }
.ja-grand td { font-weight: 800; font-size: 1rem; background: rgba(0,0,0,.03); }
.dark .ja-grand td { background: rgba(255,255,255,.05); }
.ja-note { font-size: .8rem; color: #64748b; }
.ja-filters { align-items: center; }
.ja-filters > .fi-btn { min-width: 0; }
.ja-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ja-filters > .ja-sub { min-width: 0; }
.ja-alert { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 14px; font-size: .875rem; }
.dark .ja-alert { background: rgba(251,146,60,.1); border-color: rgba(251,146,60,.3); color: #fdba74; }
.ja-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; list-style: decimal; }
.ja-check { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; min-width: 0 !important; }
.ja-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ja-form-grid label { display: flex; flex-direction: column; gap: 4px; }
.ja-upload input { padding: 10px; border: 2px dashed rgba(225,29,39,.35); border-radius: 12px; background: rgba(225,29,39,.03); }

/* Dashboard: loan EMI card (same look as the phone app's) */
.ja-emi { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; border-radius: 16px; color: #fff; text-decoration: none; transform: translateZ(0);
  background: radial-gradient(120% 140% at 100% 0%, #ff6b73 0%, rgba(255,107,115,0) 45%), linear-gradient(140deg, #f0333d 0%, #c8121c 50%, #7d0c16 100%);
  box-shadow: 0 10px 24px rgba(200,18,28,.25); transition: transform .15s; }
.ja-emi:hover { transform: translateZ(0) translateY(-1px); }
.ja-emi.calm { background: linear-gradient(140deg, #1e293b, #0f172a); box-shadow: 0 8px 20px rgba(15,23,42,.2); }
.ja-emi.late { background: linear-gradient(140deg, #7f1d1d, #450a0a); box-shadow: 0 10px 24px rgba(127,29,29,.35); }
.ja-emi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ja-emi-tag { font-size: .68rem; font-weight: 700; letter-spacing: .08em; background: rgba(255,255,255,.16); padding: 3px 9px; border-radius: 999px; }
.ja-emi-when { font-size: .75rem; font-weight: 700; background: #fff; color: #b3111b; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ja-emi.calm .ja-emi-when { color: #0f172a; }
.ja-emi.late .ja-emi-when { color: #7f1d1d; }
.ja-emi-amt { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; line-height: 1.2; }
.ja-emi-what { font-size: .85rem; opacity: .95; }
.ja-emi-funds { margin-top: 10px; font-size: .78rem; background: rgba(255,255,255,.13); padding: 8px 10px; border-radius: 10px; }
.ja-emi-funds.bad { background: #fff; color: #991b1b; font-weight: 600; }
.ja-emi-alert { margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; font-size: .85rem; font-weight: 600; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.dark .ja-emi-alert { color: #fca5a5; background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.35); }

/* ---------- Global footer: one copyright line ---------- */
.ja-footer { margin: 2rem 1rem 1rem; padding: .9rem 0 .1rem; border-top: 1px solid rgb(226 232 240); text-align: center;
    font-size: .78rem; line-height: 1.5; color: rgb(100 116 139); }
.ja-footer strong { color: rgb(51 65 85); font-weight: 600; }
.ja-footer-simple, .fi-simple-layout .ja-footer { margin: 1.5rem auto 0; padding: 0 0 1.25rem; border-top: 0; max-width: 28rem; }
.dark .ja-footer { border-top-color: rgb(255 255 255 / .08); color: rgb(148 163 184); }
.dark .ja-footer strong { color: rgb(226 232 240); }

/* ---------- Dashboard, money lost, receivables (agent "dashboard") ---------- */
/* Bank / cash / card cards at the top of the dashboard */
.ja-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.ja-acct { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 2px; min-height: 150px; min-width: 0;
    padding: 16px 18px; border-radius: 18px; color: #fff; text-decoration: none;
    box-shadow: 0 12px 24px -14px rgba(15,23,42,.55); transition: transform .15s ease, box-shadow .15s ease; }
.ja-acct::before { content: ''; position: absolute; top: -45%; right: -25%; width: 75%; height: 130%; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(255,255,255,.2), rgba(255,255,255,0)); }
.ja-acct::after { content: ''; position: absolute; right: -40px; bottom: -56px; width: 150px; height: 150px; border-radius: 50%; z-index: -1; pointer-events: none;
    border: 20px solid rgba(255,255,255,.07); }
.ja-acct:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -16px rgba(15,23,42,.6); }
.ja-acct:focus-visible { outline: 3px solid rgba(225,29,39,.5); outline-offset: 3px; }
.ja-acct-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ja-acct-icon { flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.18); }
.ja-acct-icon svg { width: 19px; height: 19px; color: #fff; }
.ja-acct-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ja-acct-name { font-weight: 700; font-size: .92rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-acct-sub { font-size: .72rem; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-acct-chip { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .6rem; font-weight: 700; letter-spacing: .05em; padding: 3px 8px;
    border-radius: 999px; background: rgba(0,0,0,.2); white-space: nowrap; }
.ja-acct-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 14px;
    font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.88); }
.ja-acct-amt { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-acct-foot { margin-top: 4px; font-size: .74rem; line-height: 1.35; opacity: .9; }
.ja-acct-foot.strong { font-weight: 700; opacity: 1; }
.ja-acct-meter { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; }
.ja-acct-meter > span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.ja-acct.total { background: radial-gradient(120% 140% at 100% 0%, #ff6b73 0%, rgba(255,107,115,0) 48%), linear-gradient(140deg, #f0333d 0%, #e11d27 42%, #8f0d17 100%);
    box-shadow: 0 14px 30px -14px rgba(200,18,28,.65); }
.ja-acct.crimson { background: linear-gradient(140deg, #dc2626 0%, #b91c1c 55%, #7f1d1d 100%); }
.ja-acct.plum { background: linear-gradient(140deg, #c026d3 0%, #86198f 55%, #4a044e 100%); }
.ja-acct.amber { background: linear-gradient(140deg, #c2410c 0%, #9a3412 55%, #7c2d12 100%); }
.ja-acct.indigo { background: linear-gradient(140deg, #6366f1 0%, #4338ca 55%, #1e1b4b 100%); }
.ja-acct.rose { background: linear-gradient(140deg, #e11d48 0%, #be123c 55%, #881337 100%); }
.ja-acct.teal { background: linear-gradient(140deg, #0f766e 0%, #115e59 55%, #134e4a 100%); }
.ja-acct.card { background: radial-gradient(90% 120% at 100% 0%, rgba(225,29,39,.55) 0%, rgba(225,29,39,0) 55%), linear-gradient(140deg, #334155 0%, #1e293b 50%, #0b1120 100%); }
.dark .ja-acct { box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 12px 24px -16px rgba(0,0,0,.8); }
.dark .ja-acct:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 18px 30px -16px rgba(0,0,0,.9); }
.dark .ja-acct::before { background: radial-gradient(closest-side, rgba(255,255,255,.1), rgba(255,255,255,0)); }
.dark .ja-acct.total { background: radial-gradient(120% 140% at 100% 0%, rgba(255,107,115,.4) 0%, rgba(255,107,115,0) 48%), linear-gradient(140deg, #c81e28 0%, #9b111b 45%, #4c0a10 100%); }
.dark .ja-acct.crimson { background: linear-gradient(140deg, #b91c1c 0%, #7f1d1d 55%, #450a0a 100%); }
.dark .ja-acct.plum { background: linear-gradient(140deg, #a21caf 0%, #701a75 55%, #3b0764 100%); }
.dark .ja-acct.amber { background: linear-gradient(140deg, #9a3412 0%, #7c2d12 55%, #431407 100%); }
.dark .ja-acct.indigo { background: linear-gradient(140deg, #4f46e5 0%, #3730a3 55%, #1e1b4b 100%); }
.dark .ja-acct.rose { background: linear-gradient(140deg, #be123c 0%, #9f1239 55%, #4c0519 100%); }
.dark .ja-acct.teal { background: linear-gradient(140deg, #0f766e 0%, #115e59 55%, #042f2e 100%); }
.dark .ja-acct.card { background: radial-gradient(90% 120% at 100% 0%, rgba(225,29,39,.4) 0%, rgba(225,29,39,0) 55%), linear-gradient(140deg, #1f2937 0%, #111827 55%, #030712 100%); }

/* Phones: the cards become a strip you swipe sideways, so the rest of the dashboard is not pushed far down */
@media (max-width: 639px) {
    .ja-accts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 80%); overflow-x: auto;
        scroll-snap-type: x mandatory; padding: 4px 4px 12px; margin: -4px -4px 0; scrollbar-width: thin; }
    .ja-acct { scroll-snap-align: start; min-height: 136px; }
    .ja-acct:hover { transform: none; }
}

/* Number cards (profit so far, bills to pay, received / spent this month): each card is sized by its own width,
   so the amount shrinks to fit a narrow card instead of spilling out of it (how many cards share a row is set in
   StatsOverview::getColumns()). A very long amount wraps rather than being cut off. */
.fi-wi-stats-overview-stat { container-type: inline-size; }
.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-value { font-size: clamp(1.125rem, 13cqi, 1.875rem); line-height: 1.2; overflow-wrap: anywhere; }

/* Shared bits */
.ja-kicker { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #64748b; }
.ja-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; background: var(--c); }
.dark .ja-dot { background: var(--cd, var(--c)); }
.ja-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(100,116,139,.12); }
.ja-seg button { border: 0; background: transparent; font: inherit; font-size: .72rem; font-weight: 600; line-height: 1.2; color: #475569;
    padding: 5px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.ja-seg button:hover { color: #0f172a; }
.ja-seg button.on { background: #fff; color: #b91c1c; box-shadow: 0 1px 2px rgba(15,23,42,.15); }
.dark .ja-seg { background: rgba(255,255,255,.06); }
.dark .ja-seg button { color: #94a3b8; }
.dark .ja-seg button:hover { color: #e2e8f0; }
.dark .ja-seg button.on { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }

/* Loan EMIs card extras */
.ja-emi-month { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 12px;
    background: rgba(225,29,39,.06); font-size: .82rem; color: #475569; }
.ja-emi-month strong { color: #b91c1c; font-size: .95rem; white-space: nowrap; }
.dark .ja-emi-month { background: rgba(248,113,113,.09); color: #cbd5e1; }
.dark .ja-emi-month strong { color: #fca5a5; }
.ja-emi-none { display: flex; align-items: center; gap: 10px; padding: 18px 2px; color: #64748b; font-size: .875rem; }
.ja-emi-none-icon { width: 26px; height: 26px; color: #16a34a; flex-shrink: 0; }

/* Money lost card */
.ja-lost, .ja-recv { display: flex; flex-direction: column; gap: 14px; }
.ja-lost-hero, .ja-recv-hero { display: flex; flex-direction: column; gap: 2px; }
.ja-lost-amt, .ja-recv-amt { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.ja-lost-amt { color: #b91c1c; }
.ja-recv-amt { color: #0f172a; }
.dark .ja-lost-amt { color: #f87171; }
.dark .ja-recv-amt { color: #fff; }
.ja-lost-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(100,116,139,.15); }
.ja-lost-bar > span { min-width: 4px; background: var(--c); }
.dark .ja-lost-bar > span { background: var(--cd, var(--c)); }
.ja-lost-rows { list-style: none; margin: 0; padding: 0; }
.ja-lost-rows li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .875rem; border-bottom: 1px dashed rgba(100,116,139,.22); }
.ja-lost-rows li:last-child { border-bottom: 0; }
.ja-lost-label { flex: 1; min-width: 0; color: #334155; }
.ja-lost-val { font-weight: 700; white-space: nowrap; color: #0f172a; }
.ja-lost-val.zero { color: #94a3b8; font-weight: 500; }
.dark .ja-lost-label { color: #cbd5e1; }
.dark .ja-lost-val { color: #f1f5f9; }
.dark .ja-lost-val.zero { color: #64748b; }
.ja-lost-tip { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: .78rem; color: #64748b; background: rgba(225,29,39,.05); }
.ja-lost-tip strong { color: #334155; }
.dark .ja-lost-tip { color: #94a3b8; background: rgba(248,113,113,.08); }
.dark .ja-lost-tip strong { color: #e2e8f0; }

/* Receivables card */
.ja-recv-meter { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(22,163,74,.2); }
.ja-recv-meter .late { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e11d27, #f43f5e); }
.ja-recv-tiles { display: grid; gap: 8px; }
.ja-recv-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'label amount' 'sub amount'; align-items: center; column-gap: 10px;
    padding: 8px 12px; border-radius: 12px; border-left: 4px solid #94a3b8; background: rgba(100,116,139,.07); }
.ja-recv-tile span { grid-area: label; font-size: .8rem; font-weight: 600; color: #334155; }
.ja-recv-tile em { grid-area: sub; font-style: normal; font-size: .7rem; color: #64748b; }
.ja-recv-tile strong { grid-area: amount; font-size: .95rem; font-weight: 800; white-space: nowrap; }
.ja-recv-tile.late { border-left-color: #e11d27; background: rgba(225,29,39,.06); }
.ja-recv-tile.late strong { color: #b91c1c; }
.ja-recv-tile.soon { border-left-color: #f2a600; background: rgba(242,166,0,.09); }
.ja-recv-tile.soon strong { color: #92400e; }
.ja-recv-tile.later { border-left-color: #257de0; background: rgba(37,125,224,.07); }
.ja-recv-tile.later strong { color: #1e40af; }
.dark .ja-recv-tile { background: rgba(255,255,255,.04); }
.dark .ja-recv-tile span { color: #e2e8f0; }
.dark .ja-recv-tile em { color: #94a3b8; }
.dark .ja-recv-tile.late { background: rgba(248,113,113,.09); }
.dark .ja-recv-tile.late strong { color: #fca5a5; }
.dark .ja-recv-tile.soon { background: rgba(242,166,0,.1); }
.dark .ja-recv-tile.soon strong { color: #fcd34d; }
.dark .ja-recv-tile.later { background: rgba(51,140,237,.1); }
.dark .ja-recv-tile.later strong { color: #93c5fd; }
.ja-recv-top { display: flex; flex-direction: column; gap: 2px; }
.ja-recv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 7px 0; border-bottom: 1px dashed rgba(100,116,139,.22); font-size: .84rem; }
.ja-recv-row:last-child { border-bottom: 0; }
.ja-recv-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.ja-recv-row .amt { font-weight: 700; white-space: nowrap; color: #0f172a; }
.ja-recv-row .late { grid-column: 1 / -1; font-size: .72rem; color: #b91c1c; }
.dark .ja-recv-row .name { color: #cbd5e1; }
.dark .ja-recv-row .amt { color: #f1f5f9; }
.dark .ja-recv-row .late { color: #fca5a5; }

/* "Where the money went": doughnut with the total in the centre, list beside it on wide cards */
.ja-spend .fi-section-content-ctn { container-type: inline-size; }
.ja-spend-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; }
@container (min-width: 520px) { .ja-spend-body { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; } }
.ja-spend-chart { position: relative; width: 100%; max-width: 240px; margin: 0 auto; }
.ja-spend-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.ja-spend-centre span { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.ja-spend-centre strong { font-size: 1.05rem; font-weight: 800; color: #0f172a; line-height: 1.25; }
.dark .ja-spend-centre strong { color: #fff; }
.ja-spend-legend { list-style: none; margin: 0; padding: 0; }
.ja-spend-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3.1rem; align-items: center; gap: 10px; padding: 6px 0; font-size: .82rem;
    border-bottom: 1px dashed rgba(100,116,139,.22); }
.ja-spend-legend li:last-child { border-bottom: 0; }
.ja-spend-name { overflow-wrap: anywhere; line-height: 1.3; color: #334155; }
.ja-spend-amt { font-weight: 700; white-space: nowrap; color: #0f172a; }
.ja-spend-pct { text-align: right; font-size: .75rem; color: #64748b; }
.dark .ja-spend-name { color: #cbd5e1; }
.dark .ja-spend-amt { color: #f1f5f9; }

/* Profit & Loss: "Money lost" box */
.ja-lostbox { border-radius: 16px; padding: 16px 18px; border: 1px solid rgba(225,29,39,.22);
    background: linear-gradient(135deg, rgba(225,29,39,.07) 0%, rgba(242,166,0,.05) 100%); }
.ja-lostbox-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.ja-lostbox-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; color: #991b1b; }
.ja-lostbox-title svg { width: 20px; height: 20px; }
.ja-lostbox-total { font-size: 1.5rem; font-weight: 800; color: #b91c1c; white-space: nowrap; }
.ja-lostbox-note { margin: 4px 0 10px; font-size: .8rem; color: #64748b; }
.ja-lostbox-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 28px; }
.ja-lostbox-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px dashed rgba(225,29,39,.2); font-size: .875rem; }
.ja-lostbox-row small { display: block; font-size: .72rem; color: #64748b; }
.ja-lostbox-row strong { white-space: nowrap; }
.dark .ja-lostbox { border-color: rgba(248,113,113,.3); background: linear-gradient(135deg, rgba(248,113,113,.1) 0%, rgba(242,166,0,.05) 100%); }
.dark .ja-lostbox-title { color: #fca5a5; }
.dark .ja-lostbox-total { color: #f87171; }
.dark .ja-lostbox-row { border-top-color: rgba(248,113,113,.2); }
.dark .ja-lostbox-row small, .dark .ja-lostbox-note { color: #94a3b8; }

/* Contract-wise P&L, the tender page breakdown and the software warnings */
[x-cloak] { display: none !important; }
.ja-pos { color: #16a34a; }
.ja-neg { color: #dc2626; }
.dark .ja-pos { color: #4ade80; }
.dark .ja-neg { color: #f87171; }
.ja-link { color: #e11d27; text-decoration: underline; text-underline-offset: 2px; }
.dark .ja-link { color: #f87171; }
.ja-ul { list-style: disc; padding-left: 1.25rem; margin-top: .25rem; }
.ja-cp-row { cursor: pointer; }
.ja-cp-row:hover > td { background: rgba(100,116,139,.05); }
.ja-cp-toggle { border: 0; background: transparent; padding: 2px; margin: -2px 2px 0 -4px; border-radius: 6px; color: #64748b; vertical-align: middle; display: inline-flex; cursor: pointer; }
.ja-cp-toggle:hover, .ja-cp-toggle:focus-visible { background: rgba(100,116,139,.15); outline: none; }
.ja-cp-chev { width: 16px; height: 16px; transition: transform .15s ease; }
.ja-cp-row.is-open .ja-cp-chev { transform: rotate(90deg); }
.ja-cp-name { font-weight: 600; color: inherit; }
.ja-cp-name:hover { text-decoration: underline; text-underline-offset: 2px; }
.ja-cp-warn { width: 16px; height: 16px; color: #dc2626; display: inline-block; vertical-align: -3px; margin-left: 4px; }
.ja-cp-detail > td { background: rgba(100,116,139,.06); }
.dark .ja-cp-detail > td { background: rgba(255,255,255,.03); }
.ja-cp-break { padding: 2px 4px 6px 26px; }
.ja-cp-head { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 6px; }
.ja-costs { width: 100%; max-width: 680px; border-collapse: collapse; font-size: .85rem; }
.ja-costs td { padding: 5px 8px 5px 0; border-bottom: 1px dashed rgba(0,0,0,.08); vertical-align: top; }
.ja-costs .r { text-align: right; white-space: nowrap; padding-left: 12px; }
.ja-costs-total td { font-weight: 700; border-bottom: 0; border-top: 1px solid rgba(0,0,0,.15); }
.dark .ja-costs td { border-bottom-color: rgba(255,255,255,.08); }
.dark .ja-costs-total td { border-top-color: rgba(255,255,255,.2); }
.ja-cp-note-warn { margin: 8px 0 0; font-size: .8rem; color: #b91c1c; }
.dark .ja-cp-note-warn { color: #fca5a5; }
.ja-cp-alert ul, .ja-attn-list, .ja-cp-unlinked ul { margin: .35rem 0 .35rem 1.15rem; list-style: disc; }
.ja-cp-alert a, .ja-cp-unlinked a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ja-cp-unlinked { margin-top: 14px; padding: 10px 12px; border: 1px dashed rgba(100,116,139,.4); border-radius: 10px; font-size: .85rem; }
.ja-soft-warn { margin: 0; padding: 0; list-style: none; }
.ja-soft-warn > li { padding: 8px 0; }
.ja-soft-warn > li + li { border-top: 1px solid rgba(0,0,0,.06); }
.dark .ja-soft-warn > li + li { border-top-color: rgba(255,255,255,.06); }
.ja-soft-warn-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ja-soft-warn-name { font-weight: 700; color: #b91c1c; text-decoration: underline; text-underline-offset: 2px; }
.dark .ja-soft-warn-name { color: #fca5a5; }
.ja-soft-warn-tenders { margin: 4px 0 0 1.15rem; list-style: disc; font-size: .85rem; }
.ja-cp-status { display: inline-block; white-space: nowrap; font-size: .72rem; font-weight: 600; line-height: 1.2; padding: 3px 8px; border-radius: 999px; background: rgba(100,116,139,.12); color: #475569; }
.ja-cp-status.is-success { background: rgba(22,163,74,.12); color: #15803d; }
.ja-cp-status.is-info { background: rgba(37,99,235,.12); color: #1d4ed8; }
.ja-cp-status.is-warning { background: rgba(217,119,6,.14); color: #b45309; }
.ja-cp-status.is-danger { background: rgba(220,38,38,.12); color: #b91c1c; }
.dark .ja-cp-status { background: rgba(255,255,255,.08); color: #cbd5e1; }
.dark .ja-cp-status.is-success { color: #4ade80; }
.dark .ja-cp-status.is-info { color: #93c5fd; }
.dark .ja-cp-status.is-warning { color: #fbbf24; }
.dark .ja-cp-status.is-danger { color: #fca5a5; }
