﻿/*=============================
  File: /Content/BillingSchedule.css
=============================*/
.billing-schedule {
    --bs-card-bg: #fff;
    --bs-border: #e9eef5;
    --bs-text: #111827;
    --bs-muted: #6b7280;
    --bs-blue: #5865ff;
    --bs-green: #22c55e;
    --bs-yellow: #ffc107;
    --bs-shadow: 0 10px 25px rgba(16,24,40,.10);
    width: min(1120px, 100%);
    margin: 24px auto 0;
    padding: 0 16px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    color: var(--bs-text);
}

    /* Card/Header */
    .billing-schedule .bs-card {
        background: var(--bs-card-bg);
        border: 1px solid var(--bs-border);
        border-radius: 14px;
        box-shadow: var(--bs-shadow);
        overflow: hidden;
    }

    .billing-schedule .bs-card__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
        border-bottom: 1px solid var(--bs-border);
        gap: 12px;
    }

    .billing-schedule .bs-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 700;
        font-size: 16px;
        flex: 0 0 auto;
    }

    .billing-schedule .bs-title__icon {
        width: 26px;
        height: 26px;
        display: grid;
        place-items: center;
        border-radius: 8px;
        background: #eef2ff;
        color: var(--bs-blue);
        font-weight: 800;
        line-height: 1;
    }

    .billing-schedule .bs-header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 14px;
        flex: 1 1 auto;
        min-width: 280px;
        flex-wrap: wrap;
    }

    /* Legend */
    .billing-schedule .bs-legend-top {
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--bs-muted);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }

    .billing-schedule .bs-dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        display: inline-block;
    }

    .billing-schedule .bs-dot--blue {
        background: var(--bs-blue);
    }

    .billing-schedule .bs-dot--green {
        background: var(--bs-green);
    }
    .billing-schedule .bs-dot--yellow {
        background: var(--bs-yellow);
    }
    /* Year control */
    .billing-schedule .bs-year {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .billing-schedule .bs-year-label {
        font-size: 12px;
        color: var(--bs-muted);
        font-weight: 800;
        white-space: nowrap;
    }

    .billing-schedule .bs-year-text {
        font-weight: 800;
        color: var(--bs-text);
        background: #fff;
        border: 1px solid var(--bs-border);
        border-radius: 10px;
        padding: 8px 10px;
        font-size: 13px;
        line-height: 1;
        white-space: nowrap;
    }

    .billing-schedule .bs-toggle {
        display: inline-flex;
        border: 1px solid var(--bs-border);
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 4px 12px rgba(16,24,40,.06);
        white-space: nowrap;
    }

    .billing-schedule .bs-toggle__btn {
        appearance: none;
        border: 0;
        background: transparent;
        padding: 9px 12px;
        font-weight: 900;
        font-size: 13px;
        cursor: pointer;
        color: var(--bs-muted);
        min-width: 70px;
    }

        .billing-schedule .bs-toggle__btn + .bs-toggle__btn {
            border-left: 1px solid var(--bs-border);
        }

        .billing-schedule .bs-toggle__btn.is-active {
            background: #eef2ff;
            color: var(--bs-blue);
        }

        .billing-schedule .bs-toggle__btn.is-loading {
            opacity: .65;
            cursor: wait;
        }

    /* Table */
    .billing-schedule .bs-table-wrap {
        width: 100%;
        overflow: auto;
    }

    .billing-schedule table.bs-table {
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        min-width: 980px;
        table-layout: fixed;
    }

    .billing-schedule .bs-table th,
    .billing-schedule .bs-table td {
        display: table-cell !important;
        padding: 14px 12px !important;
        border-bottom: 1px solid var(--bs-border) !important;
        text-align: center !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        font-size: 14px;
        color: var(--bs-text);
    }

    .billing-schedule .bs-table thead th {
        background: var(--bs-card-bg) !important;
        position: sticky;
        top: 0;
        z-index: 1;
        font-weight: 700;
        color: #374151;
    }

    .billing-schedule .bs-th--left,
    .billing-schedule .bs-td--left {
        text-align: left !important;
        width: 180px;
        min-width: 180px;
        position: sticky;
        left: 0;
        background: var(--bs-card-bg);
        z-index: 2;
    }

    .billing-schedule thead .bs-th--left {
        z-index: 3;
    }

    .billing-schedule .bs-row-label {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 700;
    }

    .billing-schedule .bs-bar {
        width: 4px;
        height: 26px;
        border-radius: 999px;
        flex: 0 0 auto;
    }

    .billing-schedule .bs-bar--blue {
        background: var(--bs-blue);
    }

    .billing-schedule .bs-bar--green {
        background: var(--bs-green);
    }

    .billing-schedule .bs-bar--yellow {
        background: var(--bs-yellow);
    }
    .billing-schedule .bs-billing {
        color: var(--bs-blue) !important;
        font-weight: 900;
        letter-spacing: .2px;
    }

    .billing-schedule .bs-payment {
        color: var(--bs-text) !important;
        font-weight: 900;
        letter-spacing: .2px;
    }

    /* Footer */
    .billing-schedule .bs-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 18px;
        color: var(--bs-muted);
        font-size: 12px;
        flex-wrap: wrap;
    }

    .billing-schedule .bs-legend-bottom {
        display: flex;
        align-items: center;
        gap: 16px;
        font-weight: 600;
    }

    .billing-schedule .bs-legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
    }

@media (max-width: 520px) {
    .billing-schedule .bs-card__header {
        align-items: flex-start;
    }

    .billing-schedule .bs-header-right {
        justify-content: flex-start;
    }
}
