/** * Copyright since 2025 Mifos Initiative * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ :host { --r-navy: #1a237e; --r-blue: #1d4ed8; --r-blue-l: #eff6ff; --r-green: #15803d; --r-green-l: #dcfce7; --r-amber: #b45309; --r-amber-l: #fef3c7; --r-red: #c0392b; --r-red-l: #fdecea; --r-violet: #6d28d9; --r-violet-l: #f3e8ff; --r-g50: #f8fafc; --r-g100: #f1f5f9; --r-g200: #e2e8f0; --r-g300: #cbd5e1; --r-g500: #64748b; --r-g700: #334155; --r-g900: #0f172a; display: block; font-family: 'DM Sans', system-ui, sans-serif; background: var(--r-g50); color: var(--r-g900); font-size: 14px; line-height: 1.5; } .rr-root { padding: 18px 22px; max-width: 1800px; margin: 0 auto; } /* HEADER */ .rr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; } .rr-head-left { display: flex; align-items: flex-start; gap: 14px; } .rr-head-ic { font-size: 26px; color: var(--r-navy); margin-top: 3px; } .rr-head-t { margin: 0; font-size: 18px; font-weight: 700; } .rr-head-s { font-size: 12px; color: var(--r-g500); max-width: 900px; } /* BUTTONS */ .rr-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border: 1px solid var(--r-g300); background: #fff; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--r-g700); cursor: pointer; font-family: inherit; transition: all 0.15s; &:hover:not(:disabled) { background: var(--r-g50); border-color: var(--r-g500); } &:disabled { opacity: 0.55; cursor: not-allowed; } &--primary { background: var(--r-green); border-color: var(--r-green); color: #fff; &:hover:not(:disabled) { background: #12692f; border-color: #12692f; color: #fff; } } &--slim { padding: 5px 11px; font-size: 11.5px; white-space: nowrap; } } .rr-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } /* BANNER */ .rr-banner { display: flex; align-items: center; gap: 11px; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 14px; span { flex: 1; } } /* FILTERS */ .rr-filters { background: #fff; border: 1px solid var(--r-g200); border-radius: 11px; padding: 12px 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; } .rr-filter-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; } .rr-modes { display: flex; gap: 6px; flex-wrap: wrap; } .rr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--r-g300); background: #fff; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--r-g700); cursor: pointer; font-family: inherit; &:hover { border-color: var(--r-navy); } &.active { background: var(--r-navy); border-color: var(--r-navy); color: #fff; } } .rr-field { display: flex; flex-direction: column; gap: 3px; span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--r-g500); } input, select { padding: 7px 10px; border: 1px solid var(--r-g300); border-radius: 7px; font-size: 13px; font-family: inherit; background: #fff; color: var(--r-g900); &:focus { outline: none; border-color: var(--r-navy); } &:disabled { background: var(--r-g100); color: var(--r-g500); } } &--grow { flex: 1; min-width: 260px; input { width: 100%; } } } .rr-resolved { font-size: 12px; color: var(--r-g500); padding-bottom: 8px; } .rr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--r-g700); padding-bottom: 8px; cursor: pointer; } .rr-scope-note { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--r-amber); background: var(--r-amber-l); border: 1px solid #fcd34d; border-radius: 7px; padding: 6px 11px; } /* LOADING */ .rr-loading { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 60px; color: var(--r-g500); font-size: 13px; background: #fff; border: 1px solid var(--r-g200); border-radius: 11px; } /* KPIs */ .rr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; } /* The verdict, on the row. Colour carries the same meaning as the section it sits under, so a reviewer scanning the middle of a long table does not have to look back up to the heading. */ .rr-move { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; &--up { background: #fef3c7; color: #92400e; } &--down { background: #dbeafe; color: #1e40af; } &--same { background: #f1f5f9; color: var(--r-g500); } } /* A button, so the tile is reachable by keyboard and reads as the control it is. The type defaults that come with that — centred text, the button font, the UA border — are undone here so it still looks like the panel it replaced. */ .rr-kpi { display: block; width: 100%; background: #fff; border: 1px solid var(--r-g200); border-left: 4px solid var(--r-navy); border-radius: 11px; padding: 12px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: box-shadow 0.15s ease, border-color 0.15s ease; &:hover { box-shadow: 0 1px 6px rgb(15 23 42 / 12%); } &:focus-visible { outline: 2px solid var(--r-blue); outline-offset: 2px; } &--blue { border-left-color: var(--r-blue); } &--amber { border-left-color: var(--r-amber); } &--red { border-left-color: var(--r-red); } &--dim { border-left-color: var(--r-g300); /* Nothing to narrow to, so the tile says so rather than accepting a click that does nothing. */ cursor: default; &:hover { box-shadow: none; } } /* The filter this tile applies is currently on. */ &--on { border-color: var(--r-navy); box-shadow: inset 0 0 0 1px var(--r-navy); } } .rr-kpi-n { font-size: 22px; font-weight: 700; font-family: 'DM Mono', monospace; } .rr-kpi-l { font-size: 12px; font-weight: 600; color: var(--r-g700); } .rr-kpi-sub { font-size: 11px; color: var(--r-g500); } /* RULE MIX */ .rr-mix { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; } .rr-mix-t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--r-g500); margin-right: 2px; } .rr-mix-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid var(--r-g200); background: #fff; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--r-g700); cursor: pointer; font-family: inherit; strong { font-family: 'DM Mono', monospace; color: var(--r-navy); } &:hover { border-color: var(--r-navy); } &.active { background: var(--r-navy); border-color: var(--r-navy); color: #fff; strong { color: #fff; } } } /* VIEW SWITCH */ .rr-views { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .rr-spacer { flex: 1; } .rr-count { font-size: 12px; color: var(--r-g500); font-weight: 600; } /* VERDICT GROUPS — the section heading carries the verdict, so rows need not repeat it. */ .rr-group { margin-bottom: 14px; } .rr-group-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: #fff; border: 1px solid var(--r-g200); border-left: 4px solid var(--r-g300); border-radius: 10px; cursor: pointer; text-align: left; font: inherit; } .rr-group-t { font-size: 14px; font-weight: 700; } /* The count sits next to the title so a reviewer sees the size of each pile at a glance. */ .rr-group-n { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--r-g100, #f1f5f9); font-size: 12px; font-weight: 700; text-align: center; } .rr-group-h { flex: 1; font-size: 12px; color: var(--r-g500); } /* One colour per verdict, matched to the arrows already used in the rows. */ .rr-group--str .rr-group-head { border-left-color: #dc2626; } .rr-group--str .rr-group-n { background: #fee2e2; color: #991b1b; } .rr-group--up .rr-group-head { border-left-color: #ea580c; } .rr-group--up .rr-group-n { background: #ffedd5; color: #9a3412; } .rr-group--down .rr-group-head { border-left-color: #16a34a; } .rr-group--down .rr-group-n { background: #dcfce7; color: #166534; } .rr-group--hold .rr-group-head { border-left-color: var(--r-g300); } .rr-group .rr-table-wrap { margin-top: 6px; } /* TABLE */ .rr-table-wrap { background: #fff; border: 1px solid var(--r-g200); border-radius: 11px; overflow-x: auto; } .rr-table { width: 100%; border-collapse: collapse; font-size: 12.5px; th { text-align: left; padding: 9px 10px; background: var(--r-g100); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--r-g700); white-space: nowrap; border-bottom: 1px solid var(--r-g200); } td { padding: 11px 10px; border-bottom: 1px solid var(--r-g100); /* Middle rather than top: one cell in the row carries a two-line reason, and top alignment left every other value floating against the row above it. */ vertical-align: middle; } .num { text-align: right; font-family: 'DM Mono', monospace; } .strong { font-weight: 700; } tbody tr:hover:not(.rr-detail) { background: var(--r-g50); } } .rr-cust { cursor: pointer; &.open { background: var(--r-blue-l); } } .rr-row--escalated { background: var(--r-red-l); } .rr-detail { background: #fcfcfe; td { padding: 12px 16px 16px; /* The expanded block is a panel, not a value, so it starts at the top of its cell. */ vertical-align: top; } } .rr-subtable { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; border: 1px solid var(--r-g200); border-radius: 8px; overflow: hidden; th { text-align: left; padding: 7px 10px; background: var(--r-g50); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--r-g500); white-space: nowrap; } td { padding: 7px 10px; border-top: 1px solid var(--r-g100); vertical-align: top; } .num { text-align: right; font-family: 'DM Mono', monospace; } .strong { font-weight: 700; } } /* One alert inside an expanded customer: rule, why, entries, outcome. */ .rr-case { background: #fff; border: 1px solid var(--r-g200); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; &:last-child { margin-bottom: 0; } } .rr-case-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; } .rr-case-id { font-size: 11px; color: var(--r-g500); } .rr-case-amt { font-size: 13px; font-weight: 700; } .rr-case-why { display: flex; align-items: baseline; gap: 7px; font-size: 11.5px; color: #78350f; background: var(--r-amber-l); border-radius: 6px; padding: 5px 10px; margin-bottom: 8px; } .rr-case-foot { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--r-g200); } .rr-case-remark { font-size: 11.5px; color: var(--r-g700); } /* Channel of a single entry */ .rr-chan { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; background: var(--r-g100); color: var(--r-g700); white-space: nowrap; } /* Position of an entry within a multi-leg pattern alert */ .rr-leg { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; background: var(--r-blue-l); color: var(--r-blue); white-space: nowrap; } .rr-leg--ctr { background: var(--r-red-l); } .cr { color: var(--r-green); font-weight: 700; } .dr { color: var(--r-red); font-weight: 700; } /* Rule cell */ .rr-rules-cell { min-width: 230px; max-width: 340px; } .rr-rule { display: inline-block; margin: 0 5px 3px 0; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--r-violet-l); color: var(--r-violet); } .rr-rule-cat { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; background: var(--r-g100); color: var(--r-g700); } .rr-rule-desc { font-size: 11px; color: var(--r-g500); margin-top: 2px; } .rr-suggest { font-size: 11px; color: var(--r-blue); margin-top: 3px; display: flex; align-items: baseline; gap: 5px; } .rr-by { font-size: 10.5px; color: var(--r-g500); margin-top: 2px; } /* Risk rating badge */ .rr-risk { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; &--low { background: var(--r-green-l); color: var(--r-green); } &--medium { background: var(--r-amber-l); color: var(--r-amber); } &--high { background: var(--r-red-l); color: var(--r-red); } &--none { background: var(--r-g100); color: var(--r-g500); } } /* Review status badge */ .rr-status { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; &--open { background: var(--r-g100); color: var(--r-g700); } &--progress { background: var(--r-blue-l); color: var(--r-blue); } &--ok { background: var(--r-green-l); color: var(--r-green); } &--warn { background: var(--r-amber-l); color: var(--r-amber); } &--danger { background: var(--r-red-l); color: var(--r-red); } } /* What the report says should happen to the rating */ /* The verdict and the sentence behind it. Wide enough that the reason wraps to two readable lines instead of a narrow ragged column. */ .rr-move-cell { min-width: 250px; max-width: 330px; } /* Just the button, so the column is only as wide as the control it holds. */ .rr-action-cell { width: 1%; white-space: nowrap; } .rr-verdict-cell { min-width: 210px; max-width: 300px; } .rr-verdict { display: inline-block; font-size: 11px; font-weight: 600; color: var(--r-g500); white-space: nowrap; &--up { color: var(--r-amber); } /* A rating coming down is good news, not a warning. */ &--down { color: var(--r-green); } &--str { color: var(--r-red); font-weight: 700; } } .rr-verdict-why { font-size: 11px; line-height: 1.45; color: var(--r-g500); margin-top: 4px; white-space: normal; } /* Where the rating should land, read straight off the Current Risk column beside it. */ .rr-move-cell { min-width: 150px; max-width: 190px; } .rr-move { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; &--up { background: var(--r-red-l); color: var(--r-red); } /* Coming down is a relief, not an alarm — same green the verdict uses. */ &--down { background: var(--r-green-l); color: var(--r-green); } &--hold { background: var(--r-g100); color: var(--r-g500); } } .rr-move-why { font-size: 10px; color: var(--r-g500); margin-top: 3px; white-space: normal; } /* Drill from the verdict into the KYC screen, where the rating is actually moved. */ .rr-kyc-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 9px; border: 1px solid var(--r-g300); border-radius: 5px; background: #fff; font: inherit; font-size: 10.5px; font-weight: 600; color: var(--r-g500); white-space: nowrap; cursor: pointer; &:hover { border-color: var(--r-blue); color: var(--r-blue); } /* A rating that has to move gets the emphasis; a settled row stays quiet. */ &--act { border-color: var(--r-blue); color: var(--r-blue); } } .rr-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; background: var(--r-g100); color: var(--r-g700); white-space: nowrap; &--ctr { background: var(--r-red-l); color: var(--r-red); } } .mono { font-family: 'DM Mono', monospace; font-size: 11.5px; } .rr-empty { padding: 44px; text-align: center; color: var(--r-g500); font-size: 13px; } .rr-legend { font-size: 11.5px; color: var(--r-g500); margin: 10px 2px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } /* TOAST */ .rr-toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--r-navy); color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 13px; box-shadow: 0 6px 20px rgb(0 0 0 / 25%); opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 1500; &.show { opacity: 1; transform: translateX(-50%) translateY(0); } } @media (width <= 1200px) { .rr-kpis { grid-template-columns: 1fr 1fr; } }