        /* Billing: balance + fee cards side-by-side */
        .billing-top-grid {
            display: grid;
            grid-template-columns: 1.4fr 0.6fr;
            gap: 20px;
            align-items: stretch;
            margin-bottom: 20px;
        }

        @media (max-width: 900px) {
            .billing-top-grid {
                grid-template-columns: 1fr;
            }
        }

        .billing-top-grid .card {
            height: 100%;
        }

        .fee-card {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .help-q {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1px solid var(--border-color);
            background: #fff;
            color: var(--primary-dark);
            font-weight: 800;
            cursor: pointer;
            line-height: 1;
        }

        .help-q:hover {
            background-color: var(--light-gray);
        }

        .invoice-btn {
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 6px;
            white-space: nowrap;
        }

        /* Box contents as mini cards */
        .pkg-chip-wrap {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }

        .pkg-chip {
            display: inline-flex;
            align-items: center;
            padding: 7px 10px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: #fff;
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
            font-size: 12px;
            font-weight: 600;
            color: #333;
        }

        /* Transaction history (clean layout) */
        .tx-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin-bottom: 0;
        }

        .tx-table thead th {
            background: #fff;
            border-bottom: 2px solid var(--border-color);
            padding: 18px 16px;
            font-size: 16px;
            font-weight: 640;
            color: #333;
        }

        .tx-table tbody td {
            padding: 18px 16px;
            border-bottom: 1px solid #eee;
            vertical-align: middle;
        }

        .tx-table tbody tr:hover td {
            background: #fcfcfc;
        }

        .tx-expand {
            width: 44px;
        }

        .tx-expand-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 6px 8px;
            border-radius: 8px;
            font-size: 18px;
            color: var(--primary-dark);
        }

        .tx-expand-btn:hover {
            background: var(--light-gray);
        }

        .tx-pill {
            display: inline-flex;
            align-items: center;
            padding: 8px 14px;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 640;
            border: 1px solid var(--border-color);
            background: #f3f3f3;
            color: #444;
            white-space: nowrap;
        }

        .tx-pill.deposit {
            background: rgba(76, 175, 80, 0.12);
            border-color: rgba(76, 175, 80, 0.35);
            color: var(--primary-dark);
        }

        .tx-pill.charge {
            background: rgba(244, 67, 54, 0.10);
            border-color: rgba(244, 67, 54, 0.35);
            color: #b71c1c;
        }

        .tx-pill.adjust {
            background: rgba(255, 193, 7, 0.18);
            border-color: rgba(255, 193, 7, 0.55);
            color: #7a5a00;
        }

        .tx-amount {
            font-weight: 800;
            font-size: 22px;
            letter-spacing: 0.2px;
            white-space: nowrap;
        }

        .tx-amount.neg {
            color: var(--danger-color);
        }

        .tx-amount.pos {
            color: #333;
        }

        .tx-date, .tx-desc {
            color: #555;
        }

        .tx-action {
            text-align: right;
        }

        .tx-invoice-btn {
            background: #fff;
            border: 1px solid var(--border-color);
            color: #555;
        }

        .tx-invoice-btn:hover {
            background: var(--light-gray);
        }

    
        /* Pending payment list */
        .pending-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 12px;
        }

        .pending-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: #fff;
        }

        .pending-meta {
            margin-top: 4px;
            font-size: 13px;
            color: #666;
        }

        .pending-amt {
            font-weight: 800;
            font-size: 18px;
            white-space: nowrap;
        }

    

        /* Billing & Payments redesign */
        .billing-redesign-page {
            width: 100%;
            color: #111827;
        }

        .billing-page-heading {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 20px;
            margin: 4px 0 22px;
        }

        .billing-page-title {
            margin: 0 0 8px;
            font-size: 30px;
            line-height: 1.12;
            letter-spacing: .01em;
            font-weight: 760;
            color: #111827;
        }

        .billing-page-subtitle,
        .billing-muted {
            margin: 0;
            color: #4b5563;
            font-size: 14px;
            line-height: 1.45;
            font-weight: 430;
        }

        .billing-balance-pill {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 11px 16px;
            border: 1px solid rgba(17, 24, 39, .06);
            border-radius: 13px;
            background: #fff;
            box-shadow: 0 10px 26px rgba(17, 24, 39, .07);
            color: #147a21;
            min-width: 190px;
            justify-content: flex-end;
        }

        .billing-balance-pill span {
            font-size: 13px;
            color: #374151;
            white-space: nowrap;
        }

        .billing-balance-pill strong {
            font-size: 23px;
            letter-spacing: .03em;
            font-weight: 780;
            color: #12801f;
            white-space: nowrap;
        }

        .billing-kpi-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 16px;
            margin-bottom: 18px;
        }

        .billing-kpi-card,
        .billing-card {
            background: #fff;
            border: 1px solid rgba(17, 24, 39, .07);
            border-radius: 14px;
            box-shadow: 0 11px 30px rgba(17, 24, 39, .055);
        }

        .billing-kpi-card {
            min-height: 118px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 20px 22px;
            overflow: hidden;
        }

        .billing-kpi-copy {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 0;
        }

        .billing-kpi-copy span {
            color: #111827;
            font-size: 14px;
            font-weight: 720;
            letter-spacing: .01em;
        }

        .billing-kpi-copy strong {
            font-size: 26px;
            line-height: 1;
            letter-spacing: .04em;
            font-weight: 800;
            color: #111827;
            white-space: nowrap;
        }

        .billing-kpi-copy small {
            color: #4b5563;
            font-size: 13px;
            font-weight: 470;
            line-height: 1.35;
        }

        .billing-kpi-green .billing-kpi-copy strong,
        .billing-kpi-green .billing-kpi-copy small { color: #147a21; }
        .billing-kpi-red .billing-kpi-copy strong { color: #dc2626; }
        .billing-kpi-red .billing-kpi-copy small { color: #374151; }

        .billing-kpi-icon,
        .billing-card-art,
        .billing-attention-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
        }

        .billing-kpi-icon {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            color: #147a21;
            background: rgba(56, 184, 3, .12);
            border: 0;
        }

        .billing-kpi-red .billing-kpi-icon { color: #dc2626; background: rgba(239, 68, 68, .11); }
        .billing-kpi-method .billing-method-logo { color: #0a66c2; }
        .billing-kpi-button { cursor: pointer; }
        .billing-kpi-button:hover { filter: brightness(.98); }

        .billing-kpi-method {
            align-items: center;
            justify-content: flex-start;
            position: relative;
        }

        .billing-method-logo {
            width: 52px;
            height: 52px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
        }

        .billing-default-pill {
            position: absolute;
            right: 20px;
            top: 22px;
            padding: 5px 11px;
            border-radius: 999px;
            background: rgba(56, 184, 3, .12);
            color: #147a21;
            font-size: 12px;
            font-weight: 740;
        }

        .billing-action-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
            gap: 18px;
            margin-bottom: 18px;
        }

        .billing-card {
            padding: 22px 24px;
        }

        .billing-card h2 {
            margin: 0 0 7px;
            font-size: 19px;
            line-height: 1.2;
            font-weight: 760;
            color: #111827;
        }

        .billing-card p {
            margin: 0;
            color: #4b5563;
            font-size: 14px;
            line-height: 1.45;
        }

        .billing-card-heading,
        .billing-attention-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 20px;
            margin-bottom: 20px;
        }

        .billing-card-art {
            width: 70px;
            height: 60px;
            border-radius: 15px;
            background: rgba(56, 184, 3, .12);
            color: #147a21;
        }

        .billing-topup-form {
            display: grid;
            grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.2fr) minmax(150px, .9fr);
            gap: 14px;
            align-items: end;
        }

        .billing-topup-form label {
            display: flex;
            flex-direction: column;
            gap: 8px;
            color: #111827;
            font-size: 13px;
            font-weight: 690;
        }

        .billing-topup-form input,
        .billing-topup-form select,
        .billing-search-box input,
        .billing-admin-row input {
            width: 100%;
            height: 44px;
            border: 1px solid #d8dde5;
            border-radius: 8px;
            background: #fff;
            color: #111827;
            font-size: 14px;
            outline: none;
            transition: border-color .16s ease, box-shadow .16s ease;
        }

        .billing-topup-form input:focus,
        .billing-topup-form select:focus,
        .billing-search-box input:focus,
        .billing-admin-row input:focus {
            border-color: rgba(56, 184, 3, .55);
            box-shadow: 0 0 0 3px rgba(56, 184, 3, .10);
        }

        .billing-amount-input {
            height: 44px;
            display: flex;
            align-items: center;
            border: 1px solid #d8dde5;
            border-radius: 8px;
            overflow: hidden;
            background: #fff;
        }

        .billing-amount-input span {
            width: 44px;
            text-align: center;
            border-right: 1px solid #e5e7eb;
            color: #111827;
            font-weight: 700;
        }

        .billing-amount-input input {
            border: 0;
            height: 42px;
            padding: 0 12px;
            box-shadow: none !important;
        }

        .billing-topup-form select {
            padding: 0 14px;
        }

        .billing-add-funds-btn,
        .billing-pay-btn {
            height: 44px;
            border: 0;
            border-radius: 8px;
            background: linear-gradient(180deg, #159421, #087113);
            color: #fff;
            font-weight: 760;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: transform .14s ease, box-shadow .14s ease;
            box-shadow: 0 8px 18px rgba(8, 113, 19, .18);
        }

        .billing-add-funds-btn:hover,
        .billing-pay-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(8, 113, 19, .22);
        }

        .billing-secure-note {
            margin: 11px 24px 0 0;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 5px;
            color: #147a21;
            font-size: 12px;
            font-weight: 560;
        }

        .billing-bank-details {
            margin-top: 16px;
            padding: 14px;
            border-radius: 12px;
            border: 1px solid rgba(56, 184, 3, .18);
            background: rgba(56, 184, 3, .05);
            display: grid;
            gap: 8px;
            font-size: 13px;
        }

        .billing-bank-details div {
            display: flex;
            justify-content: space-between;
            gap: 12px;
        }

        .billing-attention-head {
            align-items: center;
        }

        .billing-review-btn,
        .billing-action-btn,
        .billing-filter-btn,
        .billing-more-btn,
        .billing-pagination button,
        .billing-pagination select {
            border: 1px solid #d8dde5;
            background: #fff;
            color: #111827;
            border-radius: 8px;
            font-weight: 700;
            cursor: pointer;
        }

        .billing-review-btn {
            height: 38px;
            padding: 0 16px;
            white-space: nowrap;
        }

        .billing-attention-body {
            display: grid;
            grid-template-columns: 1fr 1px 1fr;
            gap: 22px;
            align-items: stretch;
        }

        .billing-attention-divider {
            width: 1px;
            background: #e5e7eb;
        }

        .billing-attention-item {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .billing-attention-icon {
            width: 44px;
            height: 44px;
            border-radius: 50%;
        }

        .billing-attention-red .billing-attention-icon { color: #ef4444; background: rgba(239, 68, 68, .11); }
        .billing-attention-orange .billing-attention-icon { color: #f59e0b; background: rgba(245, 158, 11, .14); }
        .billing-attention-item span { color: #dc2626; font-weight: 760; font-size: 13px; }
        .billing-attention-orange span { color: #d97706; }
        .billing-attention-item strong { display: block; margin: 7px 0; font-size: 16px; }
        .billing-attention-item b { display: block; margin-bottom: 5px; font-size: 15px; }
        .billing-attention-item small { color: #4b5563; font-size: 13px; }

        .billing-invoices-card {
            padding: 22px 24px 18px;
        }

        .billing-invoices-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            margin-bottom: 16px;
        }

        .billing-table-controls {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .billing-search-box {
            height: 40px;
            min-width: 330px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0 12px;
            border: 1px solid #d8dde5;
            border-radius: 8px;
            background: #fff;
            color: #111827;
        }

        .billing-search-box input {
            height: 38px;
            padding: 0;
            border: 0;
            box-shadow: none !important;
        }

        .billing-filter-wrap {
            position: relative;
        }

        .billing-filter-btn,
        .billing-more-btn {
            height: 40px;
            padding: 0 13px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .billing-filter-btn.active {
            color: #147a21;
            border-color: rgba(56, 184, 3, .35);
            background: rgba(56, 184, 3, .07);
        }

        .billing-more-btn {
            width: 40px;
            justify-content: center;
            padding: 0;
        }

        .billing-filter-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            z-index: 20;
            min-width: 160px;
            border: 1px solid #d8dde5;
            border-radius: 10px;
            background: #fff;
            box-shadow: 0 16px 34px rgba(17, 24, 39, .14);
            padding: 6px;
        }

        .billing-filter-menu button {
            width: 100%;
            display: block;
            padding: 9px 10px;
            border: 0;
            background: transparent;
            border-radius: 8px;
            text-align: left;
            cursor: pointer;
            font-weight: 620;
            color: #111827;
        }

        .billing-filter-menu button:hover {
            background: rgba(56, 184, 3, .08);
            color: #147a21;
        }

        .billing-invoice-table-wrap {
            overflow-x: auto;
            border: 1px solid #e5e7eb;
            border-radius: 11px;
        }

        .billing-invoice-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 980px;
            background: #fff;
        }

        .billing-invoice-table th,
        .billing-invoice-table td {
            padding: 15px 16px;
            border-bottom: 1px solid #e9ecef;
            text-align: left;
            vertical-align: middle;
            font-size: 14px;
        }

        .billing-invoice-table th {
            background: #fbfcfd;
            color: #111827;
            font-size: 13px;
            font-weight: 760;
        }

        .billing-invoice-table tbody tr:hover td {
            background: #fbfdfb;
        }

        .billing-invoice-table tbody tr:last-child td {
            border-bottom: 0;
        }

        .billing-box-cell,
        .billing-courier-cell {
            display: flex;
            align-items: center;
            gap: 13px;
            min-width: 0;
        }

        .billing-box-cell strong {
            display: block;
            color: #078018;
            font-weight: 800;
            letter-spacing: .03em;
        }

        .billing-box-cell small,
        .billing-courier-cell small,
        .billing-due-helper {
            display: block;
            margin-top: 3px;
            color: #4b5563;
            font-size: 13px;
            line-height: 1.3;
        }

        .billing-box-icon,
        .billing-courier-logo {
            width: 33px;
            height: 33px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            overflow: hidden;
        }

        .billing-box-icon {
            color: #149421;
            background: rgba(56, 184, 3, .08);
            border: 1px solid rgba(56, 184, 3, .18);
        }

        .billing-courier-logo {
            background: #fff;
            border: 1px solid #e2e8f0;
        }

        .billing-courier-logo img {
            max-width: 90%;
            max-height: 80%;
            object-fit: contain;
            display: block;
        }

        .billing-courier-logo-error-icon {
            display: none;
            color: #0ea5e9;
        }

        .billing-courier-logo-load-failed {
            background: rgba(14, 165, 233, .09);
        }

        .billing-courier-logo-load-failed .billing-courier-logo-error-icon {
            display: inline-flex;
        }

        .billing-courier-logo-fallback {
            color: #0ea5e9;
            background: rgba(14, 165, 233, .09);
        }

        .billing-courier-cell strong {
            display: block;
            color: #111827;
            font-weight: 760;
        }

        .billing-due-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 11px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 780;
        }

        .billing-due-badge.due-now { color: #dc2626; background: rgba(239, 68, 68, .12); }
        .billing-due-badge.due-soon { color: #d97706; background: rgba(245, 158, 11, .16); }
        .billing-due-badge.later { color: #147a21; background: rgba(56, 184, 3, .12); }

        .billing-row-amount {
            font-size: 16px;
            font-weight: 800;
            color: #111827;
            white-space: nowrap;
        }

        .billing-row-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
        }

        .billing-action-btn {
            height: 36px;
            padding: 0 13px;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: #0b7017;
            border-color: #d6e4d7;
            white-space: nowrap;
        }

        .billing-action-btn:disabled {
            opacity: .62;
            cursor: not-allowed;
        }

        .billing-pay-btn {
            height: 36px;
            padding: 0 18px;
            white-space: nowrap;
        }

        .billing-empty-state {
            padding: 28px;
            text-align: center;
            color: #4b5563;
            font-weight: 560;
        }

        .billing-table-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 15px 0 0;
            color: #4b5563;
            font-size: 14px;
        }

        .billing-pagination {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .billing-pagination button {
            width: 36px;
            height: 36px;
            font-size: 18px;
        }

        .billing-pagination button:disabled {
            opacity: .45;
            cursor: not-allowed;
        }

        .billing-page-number {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #0b7f18;
            color: #fff;
            font-weight: 800;
        }

        .billing-pagination select {
            height: 36px;
            padding: 0 12px;
        }

        .billing-admin-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 12px;
        }

        .billing-admin-row input {
            max-width: 320px;
            padding: 0 12px;
        }

        @media (max-width: 1200px) {
            .billing-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .billing-action-grid { grid-template-columns: 1fr; }
            .billing-table-controls { flex-wrap: wrap; justify-content: flex-end; }
            .billing-search-box { min-width: 260px; }
        }

        @media (max-width: 760px) {
            .billing-page-heading,
            .billing-invoices-head,
            .billing-card-heading,
            .billing-attention-head,
            .billing-table-footer {
                flex-direction: column;
                align-items: stretch;
            }
            .billing-balance-pill { justify-content: space-between; }
            .billing-kpi-grid { grid-template-columns: 1fr; }
            .billing-topup-form { grid-template-columns: 1fr; }
            .billing-attention-body { grid-template-columns: 1fr; gap: 16px; }
            .billing-attention-divider { display: none; }
            .billing-search-box { min-width: 100%; }
            .billing-table-controls { align-items: stretch; }
            .billing-row-actions { justify-content: flex-start; }
        }

