/* =========================================================
   Balligo BSoft — Wallet Ledger
   Clean Premium Glass UI
   Scope: Wallet Ledger only
   ========================================================= */

.bbs-ledger-wrapper {
    --ledger-ink: #172747;
    --ledger-muted: #5c6b86;
    --ledger-border: rgba(104, 126, 175, .20);
    --ledger-surface: rgba(255, 255, 255, .96);
    --ledger-blue: #1764ef;
    --ledger-purple: #8c35e9;

    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px;
    box-sizing: border-box;
    color: var(--ledger-ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.bbs-ledger-wrapper *,
.bbs-ledger-wrapper *::before,
.bbs-ledger-wrapper *::after {
    box-sizing: border-box;
}

/* Main card */
.bbs-ledger-card {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--ledger-border);
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        rgba(255,255,255,.98),
        rgba(242,246,255,.96)
    );
    box-shadow: 0 8px 26px rgba(38,61,119,.09);
}

/* Header */
.bbs-ledger-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 15px 16px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    background: linear-gradient(
        115deg,
        #1764ef 0%,
        #5541f2 55%,
        #9838eb 100%
    );
    box-shadow: 0 5px 14px rgba(79,70,229,.16);
}

.bbs-ledger-heading {
    min-width: 0;
}

.bbs-ledger-kicker {
    display: block;
    margin-bottom: 3px;
    color: rgba(255,255,255,.92);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}

.bbs-ledger-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    line-height: 1.35;
}

.bbs-ledger-heading p {
    margin: 4px 0 0;
    color: rgba(255,255,255,.96);
    font-size: 12px;
    line-height: 1.5;
}

.bbs-ledger-icon {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,.14);
    font-size: 19px;
}

/* Balance card */
.bbs-ledger-balance {
    position: relative;
    overflow: hidden;
    margin: 0 0 16px;
    padding: 15px 17px 12px;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(
        115deg,
        #1764ef 0%,
        #4b42f2 58%,
        #8c35e9 100%
    );
    box-shadow: 0 5px 16px rgba(65,74,216,.15);
}

.bbs-ledger-balance-top,
.bbs-ledger-balance-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bbs-ledger-balance-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.bbs-ledger-status-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #63f4c4;
    box-shadow: 0 0 0 3px rgba(99,244,196,.16);
}

.bbs-ledger-balance-badge {
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 6px;
    color: #fff;
    background: rgba(255,255,255,.13);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.bbs-ledger-balance-value {
    position: relative;
    z-index: 1;
    display: block;
    margin: 8px 0 10px;
    border: 0;
    box-shadow: none;
    color: #fff;
    font-size: clamp(25px, 3.5vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* Available balance — bordered row, no separator line */
.bbs-ledger-wrapper .bbs-ledger-balance-footer {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 6px;
    color: rgba(255,255,255,.96);
    background: rgba(255,255,255,.06);
    box-shadow: none;
    font-size: 11px;
}

.bbs-ledger-balance-footer strong {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.bbs-ledger-balance::before,
.bbs-ledger-balance::after,
.bbs-ledger-balance-footer::before,
.bbs-ledger-balance-footer::after {
    content: none !important;
    display: none !important;
}

/* Recent transactions heading */
.bbs-ledger-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
    padding: 0 1px;
}

.bbs-ledger-section-heading h3 {
    margin: 0;
    color: var(--ledger-ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.bbs-ledger-section-heading p {
    margin: 2px 0 0;
    color: var(--ledger-muted);
    font-size: 11px;
    line-height: 1.45;
}

.bbs-ledger-count {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid rgba(94,91,230,.16);
    border-radius: 7px;
    color: #4038a8;
    background: #efedff;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* Transaction list */
.bbs-ledger-list {
    display: grid;
    gap: 7px;
}

.bbs-ledger-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--ledger-border);
    border-radius: 9px;
    background: var(--ledger-surface);
    box-shadow: 0 2px 7px rgba(38,61,119,.035);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.bbs-ledger-item:hover {
    border-color: rgba(74,91,226,.35);
    box-shadow: 0 4px 12px rgba(38,61,119,.07);
}

.bbs-ledger-item-icon {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 800;
}

.bbs-ledger-item-icon.is-credit {
    color: #087d5a;
    background: #dcf9eb;
}

.bbs-ledger-item-icon.is-debit {
    color: #bd294b;
    background: #ffeaee;
}

.bbs-ledger-item-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bbs-ledger-item-title {
    color: var(--ledger-ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bbs-ledger-reference {
    color: var(--ledger-muted);
    font-size: 10px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bbs-ledger-item-amount {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    max-width: 42%;
    text-align: right;
}

.bbs-ledger-item-amount strong {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bbs-ledger-item-amount.is-credit strong {
    color: #087d5a;
}

.bbs-ledger-item-amount.is-debit strong {
    color: #bd294b;
}

.bbs-ledger-status {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #d9e5f8;
    border-radius: 5px;
    color: #294c83;
    background: #edf4ff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
}

/* Empty state */
.bbs-ledger-empty {
    padding: 22px 14px;
    border: 1px dashed #cbd6e9;
    border-radius: 9px;
    background: rgba(255,255,255,.75);
    text-align: center;
}

.bbs-ledger-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 7px;
    border-radius: 10px;
    color: #4b45cf;
    background: #eeedff;
    font-size: 19px;
}

.bbs-ledger-empty h3 {
    margin: 0;
    color: var(--ledger-ink);
    font-size: 15px;
    font-weight: 800;
}

.bbs-ledger-empty p {
    margin: 5px 0 0;
    color: var(--ledger-muted);
    font-size: 12px;
}

/* Tablet */
@media (max-width: 768px) {
    .bbs-ledger-wrapper {
        padding: 9px;
    }

    .bbs-ledger-card {
        padding: 12px;
    }

    .bbs-ledger-header {
        padding: 13px 11px;
    }

    .bbs-ledger-balance {
        padding: 13px;
        margin-bottom: 13px;
    }

    .bbs-ledger-item {
        gap: 8px;
        padding: 9px 10px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .bbs-ledger-wrapper {
        padding: 7px;
        font-size: 13px;
    }

    .bbs-ledger-card {
        padding: 9px;
        border-radius: 10px;
    }

    .bbs-ledger-header {
        gap: 8px;
        padding: 12px 9px;
        margin-bottom: 9px;
        border-radius: 9px;
    }

    .bbs-ledger-icon {
        flex-basis: 31px;
        width: 31px;
        height: 31px;
        font-size: 16px;
    }

    .bbs-ledger-kicker {
        font-size: 9px;
    }

    .bbs-ledger-heading h2 {
        font-size: 20px;
    }

    .bbs-ledger-heading p {
        font-size: 11px;
    }

    .bbs-ledger-balance {
        padding: 11px;
        margin-bottom: 12px;
    }

    .bbs-ledger-balance-label {
        font-size: 11px;
    }

    .bbs-ledger-balance-badge {
        padding: 3px 6px;
        font-size: 8px;
    }

    .bbs-ledger-balance-value {
        margin: 8px 0 10px;
        font-size: 27px;
    }

    .bbs-ledger-wrapper .bbs-ledger-balance-footer {
        gap: 8px;
        padding: 8px;
        font-size: 10px;
    }

    .bbs-ledger-balance-footer strong {
        font-size: 12px;
    }

    .bbs-ledger-section-heading {
        align-items: flex-start;
        gap: 6px;
    }

    .bbs-ledger-section-heading h3 {
        font-size: 15px;
    }

    .bbs-ledger-section-heading p {
        font-size: 10px;
    }

    .bbs-ledger-count {
        padding: 3px 6px;
        font-size: 9px;
    }

    .bbs-ledger-list {
        gap: 6px;
    }

    .bbs-ledger-item {
        gap: 7px;
        padding: 8px;
        border-radius: 8px;
    }

    .bbs-ledger-item-icon {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
        border-radius: 7px;
        font-size: 15px;
    }

    .bbs-ledger-item-title {
        font-size: 12px;
    }

    .bbs-ledger-reference {
        font-size: 9px;
    }

    .bbs-ledger-item-amount {
        max-width: 40%;
    }

    .bbs-ledger-item-amount strong {
        font-size: 11px;
    }

    .bbs-ledger-status {
        padding: 2px 5px;
        font-size: 9px;
    }
}
