:root {
  /* Credivo colours: navy and leaf green from the logo, on a soft warm white */
  --bg: #f6f7f3; --bg2: #eef1ea; --card: #ffffff; --text: #14213d; --muted: #6b7385; --line: #e4e7df;
  --brand: #24336b; --brand2: #1f8a5b; --brand-soft: #eaeef8; --on-brand: #ffffff;
  --danger: #d14343; --danger-soft: #fcecec; --warn: #b45309; --warn-soft: #fdf3e3;
  --ok: #1f8a5b; --ok-soft: #e6f4ec; --sky: #2b6cb0; --sky-soft: #e8f1fa; --violet: #5b5bd6; --violet-soft: #eeeefc;
  --grad: linear-gradient(135deg, #24336b 0%, #2c4486 100%);
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20,33,61,.04), 0 6px 18px -10px rgba(20,33,61,.14);
  --shadow-lg: 0 12px 32px -16px rgba(36,51,107,.4);
  --glass: rgba(255,255,255,.78);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1220; --bg2: #121a2c; --card: #151d31; --text: #e7ebf3; --muted: #94a0b8; --line: #232d45;
    --brand: #93a8ea; --brand2: #4ec08a; --brand-soft: #1b2643; --on-brand: #0d1220;
    --danger: #f08484; --danger-soft: #3a1a1f; --warn: #f2b56b; --warn-soft: #3a2a14;
    --ok: #4ec08a; --ok-soft: #12301f; --sky: #7fb4e8; --sky-soft: #10263b; --violet: #a9a9f2; --violet-soft: #22224a;
    --grad: linear-gradient(135deg, #3a4f96 0%, #2c4486 100%);
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 6px 20px -8px rgba(0,0,0,.6);
    --shadow-lg: 0 14px 40px -14px rgba(0,0,0,.7);
    --glass: rgba(21,29,49,.78);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
body { background-image: radial-gradient(1200px 500px at 100% -10%, rgba(31,138,91,.06), transparent 60%),
  radial-gradient(900px 400px at -10% 0%, rgba(36,51,107,.06), transparent 60%); background-attachment: fixed; min-height: 100vh; }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0 0 12px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
h2 .i { width: 18px; height: 18px; color: var(--brand); }
h3 { font-size: 12px; margin: 0 0 6px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.i { width: 20px; height: 20px; flex: none; }

/* Layout */
.shell { min-height: 100vh; padding-bottom: 100px; }
.topbar { position: sticky; top: 0; z-index: 5; padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.topbar h1 { font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-wrap { min-width: 0; }
.eyebrow { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-sm { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); flex: none; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 12px; flex: none; }
main { padding: 16px; max-width: 1200px; margin: 0 auto; }

/* Floating bottom bar (phone) */
.bottomnav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 6;
  display: flex; padding: 6px; border-radius: 22px; background: var(--glass);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: 0 12px 40px -12px rgba(15,23,42,.35); }
.bottomnav a { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px 6px; color: var(--muted); font-size: 10.5px; font-weight: 600; transition: color .25s; }
.bottomnav a span { white-space: nowrap; }
.bottomnav a .i { width: 22px; height: 22px; }
.bottomnav a.on { color: #fff; }
.bottomnav .pill { position: absolute; left: 0; top: 6px; width: 64px; height: calc(100% - 12px); border-radius: 16px;
  background: var(--grad); box-shadow: var(--shadow-lg); z-index: 0; }
.sidenav { display: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: auto 1fr; padding-bottom: 0; }
  .bottomnav { display: none; }
  .sidenav { display: flex; flex-direction: column; height: 100vh; overflow-y: auto; position: sticky; top: 0; grid-row: 1 / span 2;
    background: #18234a; color: #c9d1e8; padding: 16px 12px; }
  .sidenav .brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; font-weight: 800; font-size: 16px; color: #fff; }
  .sidenav .brand small { display: block; font-size: 11px; font-weight: 500; color: #93a0c4; }
  .logo-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; box-shadow: var(--shadow-lg); flex: none; }
  .side-links { position: relative; display: flex; flex-direction: column; gap: 2px; }
  .sidenav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #a9adc9;
    border-radius: 12px; font-weight: 500; font-size: 14px; transition: color .2s, background .2s; }
  .sidenav a:hover { color: #fff; background: rgba(255,255,255,.05); }
  .sidenav a.on { color: #fff; font-weight: 600; }
  .sidenav a .i { width: 19px; height: 19px; }
  .sidenav .pill { position: absolute; left: 0; right: 0; top: 0; height: 42px; border-radius: 12px; z-index: 0;
    background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 #4ec08a; }
  .topbar { grid-column: 2; grid-row: 1; padding: 14px 28px; }
  .shell > .content { grid-column: 2; grid-row: 2; min-width: 0; }
  main { padding: 24px 28px; }
}

/* Hero card (dashboard) */
.hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; margin-bottom: 14px;
  border-radius: 24px; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.hero::before { width: 220px; height: 220px; right: -60px; top: -90px; }
.hero::after { width: 140px; height: 140px; left: -40px; bottom: -70px; background: rgba(255,255,255,.08); }
.hero-main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hero .lbl { font-size: 13px; opacity: .85; font-weight: 600; }
.hero .val { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; margin: 2px 0; }
.hero .sub { font-size: 12.5px; opacity: .85; }
.hero-chips { position: relative; z-index: 1; flex-basis: 100%; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.hero-chips::-webkit-scrollbar { display: none; }
.hero-chips a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.hero-chips .i { width: 16px; height: 16px; }
.ring { position: relative; width: 104px; height: 104px; flex: none; z-index: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring-bg { stroke: rgba(255,255,255,.22); }
.ring-fg { stroke: #fff; }
.ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-txt b { font-size: 20px; font-weight: 800; }
.ring-txt span { font-size: 9.5px; opacity: .8; line-height: 1.1; }

/* Cards and stats */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.glass { background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; } .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } }
.stat { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); color: var(--text); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
a.stat:hover { border-color: color-mix(in srgb, var(--tone, var(--brand)) 40%, var(--line)); box-shadow: var(--shadow-lg); }
.stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.chip { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand)); flex: none; }
.chip .i { width: 19px; height: 19px; }
.stat .go { width: 16px; height: 16px; color: var(--muted); }
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .val { font-size: 21px; font-weight: 800; margin-top: 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.danger .val, .stat.t-danger .val { color: var(--danger); }
.stat.ok .val, .stat.t-ok .val { color: var(--ok); }
.stat.danger { border-left: 3px solid var(--danger); }
.stat.ok { border-left: 3px solid var(--ok); }
.t-brand { --tone: var(--brand); --tone-soft: var(--brand-soft); }
.t-ok { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.t-danger { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.t-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.t-sky { --tone: var(--sky); --tone-soft: var(--sky-soft); }
.t-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.t-muted { --tone: var(--muted); --tone-soft: var(--bg2); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.grow { flex: 1; min-width: 0; }

/* Tiles (Aur page) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); font-weight: 600; font-size: 14px; }
.tile:hover { box-shadow: var(--shadow-lg); }

/* Lists */
.list { list-style: none; padding: 0; margin: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; margin-bottom: 10px; color: var(--text); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
a.item:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-lg); }
.item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.item .amt { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; letter-spacing: -.01em; }
.item > span:last-child { color: var(--muted); }
.group-head { margin: 18px 0 10px; display: flex; justify-content: space-between; align-items: center; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
th { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: transparent !important; }
td.num, th.num { text-align: right; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--bg2); color: var(--text); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-active, .b-cleared, .b-paid { background: var(--ok-soft); color: var(--ok); }
.b-pending, .b-held, .b-deposited, .b-part { background: var(--warn-soft); color: var(--warn); }
.b-rejected, .b-bounced, .b-overdue { background: var(--danger-soft); color: var(--danger); }
.b-closed, .b-returned { background: var(--bg2); color: var(--muted); }

/* Forms */
label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 12px 0 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input.search { padding-left: 42px; border-radius: 14px; background: var(--card) no-repeat 14px center / 18px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.fields { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.fields > .full { grid-column: 1 / -1; }
.fields > * { min-width: 0; }
input[type=date] { min-width: 0; min-height: 46px; }
input[type=file] { padding: 8px; font-size: 13px; color: var(--muted); }
input[type=file]::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 0; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--text); font-size: 14.5px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg2); border-radius: 14px; }
.seg button { flex: 1; border: 0; border-radius: 10px; background: transparent; color: var(--muted); padding: 9px 4px; box-shadow: none; }
.seg button.on { background: var(--card); color: var(--brand); box-shadow: 0 2px 8px -2px rgba(15,23,42,.18); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 16px; font: inherit; font-weight: 700; font-size: 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; transition: box-shadow .2s, filter .2s, background .2s; }
button:hover, .btn:hover { filter: brightness(1.03); }
button .i, .btn .i { width: 18px; height: 18px; }
button.primary, .btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(36,51,107,.55); }
button.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
button.block { width: 100%; padding: 14px; font-size: 15.5px; border-radius: 14px; }
button.sm, .btn.sm { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
button:disabled { opacity: .55; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; transition: all .2s; }
.filters a.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.preview { background: var(--brand-soft); border-radius: 14px; padding: 14px; margin-top: 14px; font-size: 14px; border: 1px dashed color-mix(in srgb, var(--brand) 35%, transparent); }
.preview b { font-variant-numeric: tabular-nums; }

/* Progress and bars */
.progress { height: 7px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 140px; padding-top: 8px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, #3d5aa8, #24336b); border-radius: 6px 6px 3px 3px; min-height: 3px; transform-origin: bottom; opacity: .9; }
.bars .bar:hover { opacity: 1; filter: brightness(1.15); }
.bars-lbl { display: flex; gap: 5px; font-size: 10px; color: var(--muted); margin-top: 4px; }
.bars-lbl span { flex: 1; text-align: center; }

/* Skeleton while loading */
.skel { border-radius: var(--radius); margin-bottom: 12px; background: linear-gradient(90deg, var(--bg2) 25%, color-mix(in srgb, var(--bg2) 40%, var(--card)) 50%, var(--bg2) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.hero-skel { height: 150px; border-radius: 24px; }
.stat-skel { height: 104px; margin: 0; }
.row-skel { height: 68px; border-radius: 16px; margin-top: 12px; }
.skel-wrap .grid { margin-bottom: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Login */
.login-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: var(--bg); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; animation: float 24s ease-in-out infinite alternate; }
.b1 { width: 340px; height: 340px; background: #9fb3e8; left: -80px; top: -60px; }
.b2 { width: 300px; height: 300px; background: #9fd8b8; right: -90px; top: 30%; animation-delay: -4s; }
.b3 { width: 260px; height: 260px; background: #f1dcb8; left: 20%; bottom: -100px; animation-delay: -8s; opacity: .35; }
@keyframes float { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(24px,18px) scale(1.05); } 100% { transform: translate(-18px,30px) scale(.97); } }
.login { position: relative; z-index: 1; max-width: 400px; margin: 0 auto; padding: 12vh 20px 20px; text-align: center; }
.login h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 16px; }
.login .muted { margin: 6px 0 22px; }
.login form { text-align: left; padding: 20px; border-radius: 22px; }
.login .foot { margin-top: 22px; font-size: 12px; letter-spacing: .04em; }
.logo-big { width: 76px; height: 76px; margin: 0 auto; border-radius: 24px; background: var(--grad); color: #fff; font-size: 40px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); }
.login .logo { width: 64px; height: 64px; margin: 0 auto 12px; display: block; }

/* Modal and toast */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(520px, calc(100vw - 24px)); background: transparent; color: var(--text); overflow: visible; }
dialog::backdrop { background: rgba(15,23,42,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#modal-body { padding: 20px; max-height: 85vh; overflow: auto; background: var(--card); border-radius: 24px; box-shadow: 0 30px 80px -20px rgba(15,23,42,.5); }
#toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 104px; background: #0f172a; color: #fff; padding: 12px 18px;
  border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: 90vw;
  box-shadow: 0 12px 40px -10px rgba(15,23,42,.5); }
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); }
@media (min-width: 900px) { #toast { bottom: 28px; } }
.receipt { border: 1.5px dashed var(--line); border-radius: 14px; padding: 14px; font-size: 14px; background: var(--bg); }
.receipt .row { justify-content: space-between; padding: 3px 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-weight: 500; }
@media print { .bottomnav, .sidenav, .topbar, .noprint { display: none !important; } .shell { display: block; } body { background: #fff; } }

/* Network / offline bar */
.netbar { margin: 10px 16px 0; padding: 10px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.netbar .i { width: 18px; height: 18px; }
.netbar.off { background: var(--warn-soft); color: var(--warn); }
.netbar.sync { background: var(--brand-soft); color: var(--text); }

/* Borrower photo and KYC documents */
.avatar { width: 60px; height: 60px; border-radius: 18px; object-fit: cover; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 28px; flex: none; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.doc { text-align: center; }
.doc img, .doc .pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.doc .pdf { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--danger); }
.doc .s { font-size: 12px; color: var(--muted); margin: 4px 0; }
.col-btns { display: flex; flex-direction: column; gap: 6px; }

/* NOC */
.center { text-align: center; }
.noc { padding: 32px; line-height: 1.7; }
.noc h1 { font-size: 24px; }
@media print { .noc { border: 0; box-shadow: none; } body { background: #fff; color: #000; } }

@media (prefers-reduced-motion: reduce) { .blob, .skel, .spin { animation: none; } }

/* Notice boxes */
[hidden] { display: none !important; }
.alert { display: block; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; line-height: 1.5; }
.alert .i { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; }
.alert a { text-decoration: underline; }
.item-actions { flex-basis: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
.item.wrap { flex-wrap: wrap; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--brand-soft); color: var(--brand); }
.dup { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.log-item .s b { color: var(--text); font-weight: 600; }
.target-bar { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 4px; min-width: 80px; }
.target-bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* Aur page: features grouped under small headings */
.menu-group + .menu-group { margin-top: 22px; }
.menu-head { margin: 0 2px 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.menu-group[data-group="roz"] .menu-head { color: var(--brand, var(--muted)); }
.menu-group .tiles { gap: 10px; }
.menu-group .tile { flex-direction: row; align-items: center; gap: 10px; padding: 12px; font-size: 14px; line-height: 1.25; }
.menu-group .tile .chip { flex: none; }
.menu-group .tile[hidden] { display: none; }

/* New loan form: numbered steps and document photo slots */
.form-step { display: flex; align-items: center; gap: 10px; margin: 26px 0 4px; font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); }
#f > .form-step:first-child { margin-top: 0; }
.form-step span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 13px; }
.muted.small { font-size: 12.5px; margin-top: 6px; }
.more-fields { margin-top: 12px; }
.more-fields summary { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 600; padding: 6px 0; }
.doc-slots { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 10px; }
@media (min-width: 700px) { .doc-slots { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.doc-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; margin: 0; border: 1.5px dashed var(--line); border-radius: 14px;
  background: var(--bg); text-align: center; cursor: pointer; font-weight: 500; color: var(--text); }
.doc-slot .thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--card); color: var(--muted); overflow: hidden; }
.doc-slot .thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-slot .thumb .i { width: 26px; height: 26px; }
.doc-slot .name { font-size: 13.5px; font-weight: 600; }
.doc-slot .name em { font-style: normal; font-size: 11px; color: var(--warn); }
.doc-slot .state { font-size: 12px; color: var(--muted); }
.doc-slot select { padding: 6px 8px; font-size: 13px; }
.doc-slot.picked { border-style: solid; border-color: var(--brand); }
.doc-slot.done { border-style: solid; border-color: var(--ok); }
.doc-slot.done .thumb { color: var(--ok); }

/* loan money to bank (payout.js) */
.po-form .seg button { font-size: 13px; }
.po-form .seg button svg { width: 15px; height: 15px; vertical-align: -3px; }
.po-row { padding: 10px 0; border-top: 1px solid var(--line, rgba(127,127,127,.18)); display: grid; gap: 4px; }
.po-row:first-of-type { border-top: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
/* long URLs in setup steps (webhook links) must wrap on phones */
code { overflow-wrap: anywhere; }

/* Credivo logo: the full logo on the login page, the mark wherever the old ₹ tile was */
.login .brand-logo { width: 280px; max-width: 80%; margin: 0 auto 26px; }
.login .brand-logo img { display: block; width: 100%; height: auto; }
.login .brand-sub { margin-top: 4px; padding-left: 22%; color: var(--brand); font-size: 22px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.logo-big, .logo-mark { background: #fff; overflow: hidden; }
.logo-big img, .logo-mark img { width: 78%; height: 78%; object-fit: contain; }
/* A field with a wrong value: red border and the reason under it (app.js markField) */
input.bad, select.bad, textarea.bad { border-color: var(--danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.field-err { margin-top: 5px; color: var(--danger); font-size: 12.5px; font-weight: 600; line-height: 1.35; }
