/* =====================================================================
   Loans: products, application, one loan, all loans
   (file: public/css/sacco-loans.css)
   ===================================================================== */

.ln {
    --ln-ink: #0F172A;
    --ln-muted: #5B6B86;
    --ln-border: #E6EBF5;
    --ln-soft: #F8FAFD;
    --ln-line: #EEF1F7;
    --ln-blue: #2563EB;
    --ln-cobalt: #1E40AF;
    --ln-purple: #6D28D9;
    --ln-purple-hi: #7C3AED;

    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--ln-ink);
    font-family: Manrope, system-ui, sans-serif;
}

.ln h1, .ln h2 { margin: 0; font-family: Sora, Manrope, sans-serif; letter-spacing: -0.01em; }
.ln h1 { font-size: 24px; }
.ln h2 { font-size: 17px; }
.ln h1 a { color: inherit; text-decoration: none; }
.ln h1 a:hover { color: var(--ln-blue); }
.ln a { color: var(--ln-blue); }

.ln-muted { color: var(--ln-muted); font-size: 13px; }
.ln-crumb { font-size: 13px; color: var(--ln-muted); }
.ln-crumb a { color: inherit; text-decoration: none; }
.ln-crumb a:hover { color: var(--ln-blue); }
.ln-lead { margin: 0; max-width: 680px; font-size: 15px; color: #334155; }
.ln-center { text-align: center; }
.ln-nowrap { white-space: nowrap; }
.ln .is-blue { color: var(--ln-cobalt); }
.ln .is-purple { color: var(--ln-purple); }

.ln-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.ln-head-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ln-title-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* ---------- cards ---------- */
.ln-card {
    background: #fff;
    border: 1px solid var(--ln-border);
    border-radius: 22px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.ln-card.is-tight { padding: 18px 20px; gap: 10px; }
.ln-card.is-list { padding: 10px 10px 14px; gap: 8px; }
.ln-card.is-warn { background: #FFF7ED; border-color: #FED7AA; color: #7C2D12; }
.ln-card.is-warn p { margin: 0; font-size: 14px; line-height: 1.5; }
.ln-card > .ln-head h2 { align-self: center; }

.ln-split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.ln-main { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ln-side { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- buttons ---------- */
.ln-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 46px; padding: 0 20px; border-radius: 13px;
    border: 1px solid var(--ln-border); background: #fff; color: var(--ln-ink);
    font: 700 14px Manrope, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .12s, box-shadow .12s;
}
.ln a.ln-btn { color: var(--ln-ink); }
.ln-btn:hover { background: #F1F5FD; }
.ln-btn.is-primary, .ln a.ln-btn.is-primary {
    border: 0; color: #fff;
    background: linear-gradient(135deg, var(--ln-purple), var(--ln-purple-hi));
    box-shadow: 0 8px 18px rgba(109, 40, 217, .22);
}
.ln-btn.is-primary:hover { background: linear-gradient(135deg, #5B21B6, var(--ln-purple)); }
.ln-btn.is-danger { color: #B91C1C; border-color: #FECACA; }
.ln-btn.is-danger:hover { background: #FEF2F2; }
.ln-card.is-warn .ln-btn.is-danger { background: #B91C1C; color: #fff; border: 0; }
.ln-btn.is-small { height: 36px; padding: 0 13px; border-radius: 10px; font-size: 13px; }
.ln-btn.is-block { width: 100%; height: 54px; font-size: 15px; border-radius: 15px; }
.ln-btn:disabled { background: #E4E9F2 !important; color: var(--ln-muted) !important; box-shadow: none !important; cursor: not-allowed; border: 0; }
.ln-btn:focus-visible, .ln-pills button:focus-visible, .ln-choices button:focus-visible, .ln-tabs button:focus-visible { outline: 3px solid #F5B841; outline-offset: 2px; }

.ln-link { background: none; border: 0; padding: 0; font: 700 13px Manrope, sans-serif; color: var(--ln-blue); cursor: pointer; text-decoration: none; }
.ln-link.is-danger { color: #B91C1C; }
.ln-icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--ln-border); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ln-muted); }
.ln-icon-btn:hover { color: #B91C1C; border-color: #FECACA; }

.ln-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.ln-actions .ln-muted { margin-right: auto; }
.ln-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ln-row .ln-input { flex: 1 1 240px; }

/* ---------- fields ---------- */
.ln-label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 700; min-width: 0; }
.ln-label-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ln-label-row small { font-weight: 600; color: var(--ln-muted); font-size: 13px; }
.ln-input {
    height: 48px; box-sizing: border-box; width: 100%;
    border: 1px solid var(--ln-border); border-radius: 13px; background: var(--ln-soft);
    padding: 0 14px; font: 500 15px Manrope, sans-serif; color: var(--ln-ink);
}
.ln-textarea { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.ln-input:focus, .ln-money:focus-within { outline: none; background: #fff; border-color: var(--ln-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.ln-money {
    display: flex; align-items: center; gap: 10px; height: 48px; box-sizing: border-box; max-width: 360px;
    border: 1px solid var(--ln-border); border-radius: 13px; background: var(--ln-soft); padding: 0 14px;
}
.ln-money b { font-weight: 800; color: var(--ln-muted); font-size: 13.5px; }
.ln-money input { border: 0; background: transparent; outline: none; width: 100%; min-width: 0; font: 700 16px Manrope, sans-serif; color: var(--ln-ink); padding: 0; box-shadow: none; }
.ln-money.is-big { height: 54px; }
.ln-money.is-big input { font-size: 20px; font-weight: 800; }
.ln-money.is-small { height: 40px; max-width: 220px; border-radius: 11px; }
.ln-money.is-small input { font-size: 14.5px; }
.ln-hint { font-size: 12.5px; color: var(--ln-muted); font-weight: 500; }
.ln-error { font-size: 12.5px; color: #B91C1C; font-weight: 700; }
.ln-check { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.ln-check input { width: 18px; height: 18px; accent-color: var(--ln-blue); }
.ln-range { width: 100%; accent-color: var(--ln-blue); }

.ln-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 18px; }
.ln-span-2 { grid-column: span 2; }

.ln-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ln-pills button {
    height: 40px; padding: 0 15px; border-radius: 999px; cursor: pointer;
    border: 1px solid #D5DEEC; background: #fff; color: var(--ln-ink); font: 700 13.5px Manrope, sans-serif;
}
.ln-pills button.is-on { border: 2px solid var(--ln-blue); background: #EEF4FF; color: var(--ln-cobalt); }

.ln-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.ln-choices button {
    flex: 1 1 170px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
    padding: 12px 15px; border-radius: 16px; border: 1px solid var(--ln-border); background: #fff; cursor: pointer;
    font: 14px Manrope, sans-serif; color: var(--ln-ink);
}
.ln-choices button b { font-weight: 800; }
.ln-choices button span { font-size: 12px; font-weight: 600; color: var(--ln-muted); }
.ln-choices button.is-on { border: 2px solid var(--ln-blue); background: #EEF4FF; }

.ln-results { display: flex; flex-direction: column; border: 1px solid var(--ln-border); border-radius: 16px; overflow: hidden; }
.ln-results button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
    padding: 11px 15px; border: 0; border-bottom: 1px solid var(--ln-line); background: #fff; cursor: pointer; font: 14px Manrope, sans-serif; color: var(--ln-ink);
}
.ln-results button:last-child { border-bottom: 0; }
.ln-results button:hover { background: #F5F8FF; }
.ln-results span { font-size: 12.5px; color: var(--ln-muted); }

/* ---------- badges ---------- */
.ln-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: #F1F5F9; color: var(--ln-muted); }
.ln-badge.is-big { padding: 8px 14px; font-size: 13px; }
.ln-badge.is-green { background: #DCFCE7; color: #15803D; }
.ln-badge.is-amber { background: #FEF3C7; color: #B45309; }
.ln-badge.is-purple { background: #EDE9FE; color: #6D28D9; }
.ln-badge.is-red { background: #FEE2E2; color: #B91C1C; }
.ln-badge.is-orange { background: #FFEDD5; color: #9A3412; }
.ln-badge.is-blue { background: #DBEAFE; color: #1E40AF; }
.ln-badge.is-grey { background: #F1F5F9; color: var(--ln-muted); }

/* ---------- notes ---------- */
.ln-info, .ln-warn, .ln-quote {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5;
}
.ln-info { background: #F5F3FF; color: #4C1D95; }
.ln-info svg { flex: none; margin-top: 1px; }
.ln-warn { background: #FFF7ED; color: #9A3412; flex-direction: column; gap: 2px; }
.ln-warn.is-red { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; font-size: 14px; }
.ln-quote { display: block; background: var(--ln-soft); border: 1px solid var(--ln-line); font-size: 14px; white-space: pre-line; }
.ln-example { padding: 12px 14px; border-radius: 14px; background: #EEF4FF; color: var(--ln-cobalt); font-size: 13.5px; }
.ln-empty { padding: 32px; text-align: center; color: var(--ln-muted); background: #fff; border: 1px dashed #C5CFE2; border-radius: 22px; font-size: 14px; }

.ln-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ln-checks li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.ln-checks li > span { width: 22px; height: 22px; flex: none; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ln-checks li.is-ok > span { background: #DCFCE7; color: #15803D; }
.ln-checks li.is-bad > span { background: #FEE2E2; color: #B91C1C; }
.ln-checks li.is-bad { font-weight: 700; }

/* ---------- products ---------- */
.ln-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ln-product.is-off { opacity: .7; }
.ln-product-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.ln-product-top > div { display: flex; flex-direction: column; gap: 3px; }
.ln-title { font-family: Sora, sans-serif; font-size: 19px; }
.ln-rate { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: 16px; background: #EEF4FF; color: var(--ln-cobalt); }
.ln-rate b { font-family: Sora, sans-serif; font-size: 30px; }
.ln-rate span { font-size: 13.5px; font-weight: 700; }
.ln-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; font-size: 13.5px; }
.ln-facts div { display: flex; flex-direction: column; gap: 2px; }
.ln-facts dt { color: var(--ln-muted); }
.ln-facts dd { margin: 0; font-weight: 800; }
.ln-product-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--ln-line); padding-top: 14px; font-size: 13px; color: var(--ln-muted); }
.ln-two { display: flex; flex-wrap: wrap; gap: 16px; }
.ln-explain { flex: 1 1 340px; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--ln-soft); border: 1px solid var(--ln-line); font-size: 14px; line-height: 1.5; }

/* ---------- member strip ---------- */
.ln-member { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; }
.ln-avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-family: Sora, sans-serif; font-weight: 700; font-size: 18px; background: #EDE9FE; color: var(--ln-purple); flex: none; }
.ln-member-name { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.ln-member-name a { color: inherit; text-decoration: none; font-family: Sora, sans-serif; font-size: 18px; }
.ln-member-name span { font-size: 13px; color: var(--ln-muted); }
.ln-member-facts { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; font-size: 13px; }
.ln-member-facts div { display: flex; flex-direction: column; }
.ln-member-facts dt { color: var(--ln-muted); }
.ln-member-facts dd { margin: 0; font-weight: 800; font-size: 15px; }

/* ---------- guarantors / holds ---------- */
.ln-guarantor { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--ln-line); }
.ln-guarantor.is-ok { border-color: #BBF7D0; background: #F0FDF4; }
.ln-guarantor.is-off { opacity: .6; }
.ln-guarantor-name { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; min-width: 0; }
.ln-guarantor-name strong { font-size: 14.5px; }
.ln-guarantor-name span { font-size: 12.5px; color: var(--ln-muted); }
.ln-hold { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ln-line); font-size: 13.5px; }
.ln-hold:last-child { border-bottom: 0; }
.ln-hold span { display: flex; flex-direction: column; }
.ln-hold small { color: var(--ln-muted); font-size: 12px; }
.ln-hold.is-off { opacity: .55; }

/* ---------- summary (gradient) ---------- */
.ln-hero {
    border-radius: 22px; padding: 22px 24px; color: #fff; display: flex; flex-direction: column; gap: 12px;
    background: linear-gradient(135deg, #1E40AF, #6D28D9);
}
.ln-hero > span { font-size: 13px; opacity: .85; }
.ln-hero > b { font-family: Sora, sans-serif; font-size: 34px; letter-spacing: -0.02em; line-height: 1.1; }
.ln-hero dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; font-size: 13px; }
.ln-hero dl div { display: flex; flex-direction: column; }
.ln-hero dt { opacity: .8; }
.ln-hero dd { margin: 0; font-weight: 800; font-size: 15px; }
.ln-hero small { font-size: 12.5px; opacity: .88; }
.ln-hero .ln-hero-warn { opacity: 1; background: rgba(255, 255, 255, .16); padding: 8px 10px; border-radius: 10px; font-weight: 700; }

.ln-sum { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--ln-soft); border: 1px solid var(--ln-line); font-size: 14px; }
.ln-sum > div { display: flex; justify-content: space-between; gap: 10px; }
.ln-sum .is-amber { color: #B45309; }
.ln-sum .is-total { border-top: 1px solid var(--ln-border); padding-top: 8px; font-size: 16px; font-weight: 800; }
.ln-sum small { color: var(--ln-muted); font-size: 12.5px; }
.ln-sum .ln-sum-head { font-weight: 800; letter-spacing: .05em; font-size: 11.5px; }

/* ---------- pipeline ---------- */
.ln-steps { list-style: none; margin: 0; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border: 1px solid var(--ln-border); border-radius: 22px; }
.ln-steps li { flex: 1 1 160px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; min-width: 0; }
.ln-steps li.is-now { background: #EEF4FF; border-color: #BFD3FB; }
.ln-step-dot { width: 30px; height: 30px; flex: none; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #F1F5F9; color: #94A3B8; }
.ln-steps li.is-done .ln-step-dot { background: var(--ln-blue); color: #fff; }
.ln-steps li.is-now .ln-step-dot { background: #fff; color: var(--ln-blue); border: 2px solid var(--ln-blue); }
.ln-step-text { display: flex; flex-direction: column; min-width: 0; }
.ln-step-text b { font-size: 14px; }
.ln-step-text small { font-size: 12px; color: var(--ln-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tables ---------- */
.ln-scroll { max-height: 380px; overflow: auto; }
.ln-scroll.is-x { max-height: none; overflow-x: auto; }
.ln-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ln-table th { text-align: left; padding: 9px 10px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ln-muted); background: var(--ln-soft); white-space: nowrap; }
.ln-table td { padding: 10px; border-top: 1px solid var(--ln-line); vertical-align: middle; }
.ln-table .r { text-align: right; }
.ln-table.is-compact th, .ln-table.is-compact td { padding: 7px 6px; font-size: 13px; }
.ln-table.is-list { min-width: 760px; font-size: 14px; }
.ln-table tr.is-struck td { color: #94A3B8; text-decoration: line-through; }
.ln-table tr.is-struck td:last-child { text-decoration: none; }
.ln-table tr.is-link { cursor: pointer; }
.ln-table tr.is-link:hover td { background: #F7FAFF; }
.ln-loan-no { font-weight: 800; color: var(--ln-cobalt); white-space: nowrap; }
.ln-empty-row { text-align: center; padding: 28px 10px !important; color: var(--ln-muted); }

/* ---------- list page ---------- */
.ln-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ln-kpi { background: #fff; border: 1px solid var(--ln-border); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.ln-kpi span { font-size: 13px; color: var(--ln-muted); }
.ln-kpi b { font-family: Sora, sans-serif; font-size: 26px; }
.ln-kpi small { font-size: 12.5px; color: var(--ln-muted); }
.ln-kpi small.is-green { color: #15803D; font-weight: 700; }
.ln-kpi.is-warn { background: #FFF7ED; border-color: #FED7AA; }
.ln-kpi.is-warn span, .ln-kpi.is-warn b, .ln-kpi.is-warn small { color: #9A3412; }

.ln-aging { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ln-aging > div { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--ln-soft); border: 1px solid var(--ln-line); }
.ln-aging span { font-size: 12.5px; color: var(--ln-muted); font-weight: 700; }
.ln-aging b { font-size: 18px; }
.ln-aging small { font-size: 12px; color: var(--ln-muted); }
.ln-bar { display: block; height: 6px; border-radius: 999px; background: var(--ln-border); overflow: hidden; }
.ln-bar i { display: block; height: 100%; border-radius: 999px; }

.ln-list-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 4px; }
.ln-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ln-tabs button { height: 40px; padding: 0 14px; border-radius: 12px; border: 0; cursor: pointer; display: flex; align-items: center; gap: 8px; font: 800 14px Manrope, sans-serif; background: transparent; color: var(--ln-muted); }
.ln-tabs button span { padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #F1F5F9; color: var(--ln-muted); }
.ln-tabs button.is-on { background: #EEF4FF; color: var(--ln-cobalt); }
.ln-tabs button.is-on span { background: var(--ln-blue); color: #fff; }
.ln-search { max-width: 320px; height: 42px; border-radius: 999px; }

.ln-menu { position: relative; }
.ln-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; background: #fff; border: 1px solid var(--ln-border); border-radius: 14px; box-shadow: 0 14px 36px rgba(23, 37, 84, .14); padding: 6px; display: flex; flex-direction: column; }
.ln-menu-list button { text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 10px; font: 700 13.5px Manrope, sans-serif; color: var(--ln-ink); cursor: pointer; }
.ln-menu-list button:hover { background: #F1F5FD; }

/* ---------- history ---------- */
.ln-history { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; }
.ln-history > div { display: flex; gap: 10px; font-size: 13px; }
.ln-when { color: var(--ln-muted); white-space: nowrap; min-width: 92px; }
.ln-history span:last-child { display: flex; flex-direction: column; }
.ln-history small { color: var(--ln-muted); }

/* ---------- phones ---------- */
@media (max-width: 760px) {
    .ln-card { padding: 18px; border-radius: 18px; }
    .ln-span-2 { grid-column: auto; }
    .ln-hero > b { font-size: 28px; }
    .ln-search { max-width: none; flex: 1 1 100%; }
    .ln-steps li { flex: 1 1 140px; }
    .ln-member-facts { gap: 14px; }
    .ln h1 { font-size: 20px; }
}

/* =====================================================================
   Accounting: the books, expenses & journals, reports, year end
   ===================================================================== */

.ln-kpi.is-good { background: #ECFDF3; border-color: #BBF7D0; }
.ln-kpi.is-good span, .ln-kpi.is-good small { color: #15803D; }
.ln-kpi.is-good b { color: #14532D; }
.ln-kpis.is-small { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ln-kpis.is-small .ln-kpi { padding: 12px 14px; border-radius: 14px; background: var(--ln-soft); }
.ln-kpis.is-small .ln-kpi b { font-size: 18px; }

.ln-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; font-size: 14px; }
.ln-banner.is-blue { background: #EEF4FF; color: #1E40AF; }
.ln-banner.is-green { background: #ECFDF3; color: #15803D; font-weight: 700; }
.ln-banner.is-red { background: #FEF2F2; color: #B91C1C; font-weight: 700; }
.ln-checks li.is-maybe > span { background: #FEF3C7; color: #B45309; }

.ln-tabs.is-boxed { background: #fff; border: 1px solid var(--ln-border); border-radius: 14px; padding: 4px; }
.ln-tabs.is-boxed button { height: 38px; }

.ln-upload { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border-radius: 13px; border: 1.5px dashed #BFD3FB; background: #F5F8FF; color: var(--ln-cobalt); font-weight: 700; font-size: 14px; cursor: pointer; text-align: center; }
.ln-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.ln-table td.is-in, .rp-table td.is-in { color: #15803D; }
.ln-table td.is-out, .rp-table td.is-out { color: #B91C1C; }

/* ---------- the books ---------- */
.bk-group { display: flex; flex-direction: column; }
.bk-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 14px 8px; border-bottom: 1px solid var(--ln-border); }
.bk-group-head span { display: flex; flex-direction: column; gap: 2px; }
.bk-group-head strong { font-family: Sora, sans-serif; font-size: 16px; }
.bk-group-head small { font-size: 12.5px; color: var(--ln-muted); }
.bk-row { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--ln-line); }
.bk-row.is-open { background: #F5F8FF; }
.bk-row.is-off { opacity: .55; }
.bk-row-main { flex: 1 1 320px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 11px 14px; border: 0; background: transparent; cursor: pointer; text-align: left; font: 14px Manrope, sans-serif; color: var(--ln-ink); min-width: 0; }
.bk-row-main:hover { background: #F7FAFF; }
.bk-code { width: 52px; font-weight: 800; color: var(--ln-cobalt); }
.bk-name { flex: 1 1 200px; display: flex; flex-direction: column; min-width: 0; }
.bk-name small { font-size: 12px; color: var(--ln-muted); }
.bk-balance { min-width: 130px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.bk-tools { padding: 0 14px; font-size: 13px; white-space: nowrap; }
.bk-rename { padding: 10px 14px; background: #F5F8FF; }
.bk-ledger { padding: 4px 14px 14px; background: #F5F8FF; border-bottom: 1px solid var(--ln-border); display: flex; flex-direction: column; gap: 6px; }
.bk-ledger .ln-table { background: #fff; border-radius: 12px; overflow: hidden; }

/* ---------- expenses & journals ---------- */
.sp-item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ln-line); }
.sp-item-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.sp-item-main small { color: var(--ln-muted); font-size: 12.5px; }
.sp-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-journal { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; }
.sp-journal .ln-table { background: var(--ln-soft); border-radius: 12px; }
.jv-select { min-width: 240px; height: 42px; padding: 0 10px; }
.jv-amount { width: 150px; height: 42px; text-align: right; font-weight: 700; }
.ln-table tr.jv-total td { border-top: 2px solid var(--ln-ink); }

/* ---------- reports ---------- */
.rp-dates { justify-content: flex-end; }
.rp-dates .ln-label { flex-direction: row; align-items: center; gap: 8px; }
.rp-dates .ln-input { width: 170px; }
.rp-nav { flex: 1 1 230px; max-width: 290px; padding: 10px; gap: 2px; }
.rp-nav-head { padding: 12px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8A97AE; }
.rp-nav button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; font: 14px Manrope, sans-serif; color: var(--ln-ink); }
.rp-nav button span { font-size: 12px; color: var(--ln-muted); font-weight: 600; }
.rp-nav button:hover { background: #F7FAFF; }
.rp-nav button.is-on { background: #EEF4FF; color: var(--ln-cobalt); }
.rp-paper { padding: 24px 26px; }
.rp-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 2px solid var(--ln-ink); padding-bottom: 14px; }
.rp-top > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.rp-top h2 { font-size: 22px; }
.rp-sacco { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--ln-muted); }
.rp-text { margin: 0; font-size: 14px; color: #334155; line-height: 1.55; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rp-table.is-wide { min-width: 640px; font-size: 13.5px; }
.rp-table th { text-align: left; padding: 8px 6px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ln-muted); }
.rp-table td { padding: 8px 6px; border-top: 1px solid #F1F5F9; }
.rp-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-table tr.is-head td { padding-top: 18px; border-top: 0; font-family: Sora, sans-serif; font-size: 15px; font-weight: 700; }
.rp-table td.is-item { padding-left: 22px; }
.rp-table tr.is-total td { border-top: 1px solid #94A3B8; font-weight: 800; }
.rp-table tr.is-grand td { border-top: 2px solid var(--ln-ink); border-bottom: 3px double var(--ln-ink); font-weight: 800; }
.rp-code { color: var(--ln-cobalt); font-weight: 700; white-space: nowrap; }
.rp-rate { width: 74px; height: 38px; text-align: right; font-weight: 700; display: inline-block; }

/* ---------- year end ---------- */
.ye-line { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ln-line); }
.ye-line > span { display: flex; flex-direction: column; gap: 2px; }
.ye-line small { font-size: 12.5px; color: var(--ln-muted); }
.ye-line > b { font-size: 16px; font-variant-numeric: tabular-nums; }
.ye-line .ln-range { grid-column: 1 / -1; }
.ye-line.is-fixed { background: var(--ln-soft); }
.ye-line.is-good { background: #ECFDF3; border-color: #BBF7D0; color: #14532D; }
.ye-line.is-bad { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.ye-line.is-good small, .ye-line.is-bad small { color: inherit; }
.ye-attach { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 760px) {
    .rp-nav { max-width: none; }
    .bk-balance { min-width: 0; }
    .bk-tools { padding: 0 14px 10px 76px; }
    .jv-select { min-width: 180px; }
}

/* =====================================================================
   Savings tools: interest, fixed deposits, standing orders, transfers, exits
   ===================================================================== */

.sv-who { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sv-who .ln-member-name a { font-size: 17px; }
.sv-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sv-party { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ln-border); border-radius: 16px; background: var(--ln-soft); }
.sv-party > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sv-party span { font-size: 12.5px; color: var(--ln-muted); font-weight: 600; }
.sv-picked { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 14px; border-radius: 14px; background: #EEF4FF; }
.sv-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ln-line); font-size: 13.5px; }
.sv-line:last-child { border-bottom: 0; }
.sv-line.is-button { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.sv-line.is-button:hover { color: var(--ln-blue); }
.sv-dim td { color: var(--ln-muted); }
.sv-rate { display: inline-flex; width: 92px; height: 38px; }
.sv-rate input { text-align: right; }
.sv-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 12px 4px; padding: 10px 14px; border-radius: 14px; background: #F5F3FF; color: #4C1D95; font-size: 13px; font-weight: 600; }
.sv-savebar span { flex: 1 1 240px; }
.sv-plans button { align-items: flex-start; }
.sv-plan-rate { font-family: Sora, sans-serif; font-size: 22px; color: var(--ln-cobalt); }
.sv-cert { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1.5px dashed #C7D2FE; border-radius: 14px; background: #FBFCFF; font-size: 13px; }
.sv-cert > b { font-size: 11.5px; letter-spacing: .08em; color: var(--ln-cobalt); }
.sv-cert div { display: flex; justify-content: space-between; gap: 10px; }
.sv-cert span { color: var(--ln-muted); }
.sv-filter { max-width: 260px; height: 40px; margin-left: auto; }
.sv-select { height: 36px; padding: 0 10px; min-width: 130px; }
.sv-ref { height: 36px; max-width: 190px; display: inline-block; margin-right: 6px; }
.sv-day { color: var(--ln-cobalt); font-size: 16px; }
.sv-total { border-top: 1px solid var(--ln-border); padding-top: 10px; margin-top: 4px; font-size: 15px; }
.sv-total b { font-family: Sora, sans-serif; font-size: 18px; }
.sv-check-text { display: flex; flex-direction: column; }
.sv-check-text small { font-weight: 500; color: var(--ln-muted); font-size: 12.5px; }
.sv-modal { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
@media (max-width: 640px) {
    .sv-filter { max-width: none; margin-left: 0; width: 100%; }
}

/* Settings: the "Pause withdrawals" switch */
.st-pause { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid #E6EBF5; background: #F8FAFD; }
.st-pause > div { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.st-pause small { color: #5B6B86; font-size: 12.5px; }
.st-pause.is-paused { background: #FEF2F2; border-color: #FECACA; }
.st-pause.is-paused strong { color: #B91C1C; }
.st-switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; border: 0; background: #CBD5E1; cursor: pointer; transition: background .15s; }
.st-switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.st-switch.is-on { background: #DC2626; }
.st-switch.is-on span { transform: translateX(22px); }

/* =====================================================================
   Staff roles: who can do what
   ===================================================================== */

.sr-table { min-width: 980px; }
.sr-table th, .sr-table td { vertical-align: middle; }
.sr-first { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 260px; text-align: left; font-weight: 600; }
.sr-table thead .sr-first { background: var(--ln-soft); }
.sr-role { text-align: center; min-width: 128px; text-transform: none !important; letter-spacing: 0 !important; }
.sr-role b { display: block; font-size: 13.5px; color: var(--ln-ink); }
.sr-role small { display: block; font-size: 11.5px; font-weight: 600; color: var(--ln-muted); margin: 2px 0 4px; }
.sr-role .ln-link { font-size: 11.5px; }
.sr-group td { background: #F5F3FF; color: #4C1D95; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.sr-cell { text-align: center; }
.sr-cell.is-changed { background: #FEF9C3; }
.sr-tick { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid #CBD5E1; background: #fff; display: inline-grid; place-items: center; font-weight: 900; color: #fff; cursor: pointer; }
.sr-tick.is-on { background: var(--ln-blue); border-color: var(--ln-blue); }
.sr-tick.is-locked { background: #E2E8F0; border-color: #E2E8F0; color: #475569; cursor: default; }
.sr-tick.is-off { border-style: dashed; color: #94A3B8; cursor: default; }
.sr-tick:disabled { cursor: default; }
.sr-bar { position: sticky; bottom: 12px; z-index: 5; box-shadow: 0 10px 30px rgba(15, 23, 42, .15); margin: 0; }
