.page-billing #main-content {
    background: var(--waker-current-page-bg);
}

body.page-billing {
    position: static;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

body.page-billing.sa-modal-open {
    overflow: hidden;
}

body.page-billing #main-content {
    height: auto !important;
    min-height: calc(100dvh - var(--waker-desktop-header-height));
    overflow: visible !important;
    padding-bottom: 64px;
}

.billing-page {
    min-height: auto;
}

.billing-shell {
    padding: var(--waker-space-9) var(--waker-space-9) 72px;
}

.billing-top {
    display: block;
}

.billing-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--waker-space-7);
    min-width: 0;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--waker-border-soft);
}

.billing-title-row {
    display: flex;
    align-items: center;
    gap: var(--waker-space-5);
    min-width: 0;
}

.billing-title-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--waker-color-primary-border);
    border-radius: var(--waker-radius-md);
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-title-icon svg,
.billing-actions svg,
.billing-top-actions svg,
.billing-quick-actions svg,
#billing_portal svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-top-actions {
    margin-left: auto;
}

.billing-quick-actions {
    display: flex;
    align-items: center;
    gap: var(--waker-space-3);
    flex-wrap: wrap;
    padding-top: 18px;
}

.billing-select-wrap {
    position: relative;
    min-width: 240px;
}

.billing-select-wrap.is-locked {
    opacity: 0.78;
}

.billing-company-identity {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--waker-space-4);
    padding: 0 var(--waker-space-5);
    border: 1px solid var(--waker-color-border);
    border-radius: var(--waker-radius-md);
    background: var(--waker-color-surface);
    color: var(--waker-color-ink-strong);
    box-shadow: var(--waker-shadow-panel);
}

.billing-company-identity__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: var(--waker-radius-sm);
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-company-identity__icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-company-identity__name {
    font-size: var(--waker-font-size-md);
    font-weight: var(--waker-weight-bold);
    white-space: nowrap;
}

.billing-select {
    appearance: none;
    -webkit-appearance: none;
}

.billing-select-chevron {
    position: absolute;
    right: var(--waker-space-5);
    top: 50%;
    width: 18px;
    height: 18px;
    color: var(--waker-color-ink-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.billing-select-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--waker-space-6);
}

.billing-summary-card {
    min-height: 126px;
    padding: var(--waker-space-7);
    min-width: 0;
}

.billing-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--waker-space-4);
}

.billing-summary-label {
    color: var(--waker-color-ink-muted);
    font-size: var(--waker-font-size-sm);
    font-weight: var(--waker-weight-bold);
    text-transform: uppercase;
}

.billing-summary-corner {
    flex: 0 0 auto;
    margin-top: -2px;
}

.billing-summary-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid var(--waker-status-neutral-border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: var(--waker-weight-bold);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.billing-summary-pill--blue {
    border-color: #c8dcf5;
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-summary-pill--green {
    border-color: var(--waker-status-success-border);
    background: var(--waker-status-success-bg);
    color: var(--waker-status-success-text);
}

.billing-summary-value {
    margin-top: var(--waker-space-4);
    color: var(--waker-color-ink-strong);
    font-size: 28px;
    font-weight: var(--waker-weight-strong);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.billing-summary-value--company {
    font-size: 24px;
}

.billing-summary-meta {
    margin-top: var(--waker-space-4);
    color: var(--waker-color-ink-muted);
    font-size: var(--waker-font-size-sm);
    min-height: 28px;
}

.billing-summary-action {
    min-height: 36px;
    padding-inline: var(--waker-space-4);
}

.billing-summary-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-action-notice {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: var(--waker-space-4) var(--waker-space-5);
    border: 1px solid var(--waker-color-border);
    border-radius: var(--waker-radius-md);
    background: var(--waker-color-surface);
    color: var(--waker-color-ink-strong);
    font-size: var(--waker-font-size-sm);
    font-weight: var(--waker-weight-bold);
}

.billing-action-notice[hidden] {
    display: none;
}

.billing-action-notice--info {
    border-color: var(--waker-color-primary-border);
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-action-notice--success {
    border-color: rgba(21, 146, 38, 0.32);
    background: rgba(21, 146, 38, 0.1);
    color: var(--waker-color-success);
}

.billing-action-notice--warning {
    border-color: rgba(240, 123, 0, 0.34);
    background: rgba(240, 123, 0, 0.11);
    color: var(--waker-color-warning);
}

.billing-action-notice--danger {
    border-color: rgba(201, 75, 75, 0.34);
    background: rgba(201, 75, 75, 0.1);
    color: var(--waker-color-danger);
}
body.page-billing.sa-modal-open .billing-action-notice {
    visibility: hidden;
}

.billing-modal-notice {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 11px 14px;
    border: 1px solid var(--waker-color-border);
    border-radius: var(--waker-radius-md);
    background: var(--waker-color-surface-soft);
    color: var(--waker-color-ink-strong);
    font-size: var(--waker-font-size-sm);
    font-weight: var(--waker-weight-bold);
    line-height: 1.25;
}

.billing-modal-notice[hidden] {
    display: none;
}

.billing-modal-notice--info {
    border-color: var(--waker-color-primary-border);
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-modal-notice--success {
    border-color: rgba(21, 146, 38, 0.32);
    background: rgba(21, 146, 38, 0.1);
    color: var(--waker-color-success);
}

.billing-modal-notice--warning {
    border-color: rgba(240, 123, 0, 0.34);
    background: rgba(240, 123, 0, 0.11);
    color: var(--waker-color-warning);
}

.billing-modal-notice--danger {
    border-color: rgba(201, 75, 75, 0.34);
    background: rgba(201, 75, 75, 0.1);
    color: var(--waker-color-danger);
}

.billing-company-info-dialog {
    width: min(760px, 100%);
}

.billing-review-dialog {
    width: min(800px, 100%);
}

.billing-company-info-dialog .billing-company-info-fields {
    padding-top: 0;
}

.billing-month-fields,
.billing-company-info-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--waker-space-6);
}

.billing-company-type-help {
    color: var(--waker-color-text-muted);
    font-size: var(--waker-font-size-sm);
    line-height: 1.45;
}

[data-billing-company-only][hidden],
#company_cvr_lookup[hidden] {
    display: none !important;
}

.billing-wide {
    grid-column: 1 / -1;
}

.billing-review-heading {
    display: flex;
    align-items: center;
    gap: var(--waker-space-3);
    flex-wrap: wrap;
}

.billing-review-status {
    display: inline-flex;
    align-items: center;
    transform: translateY(-2px);
}

.billing-review-line {
    display: grid;
    grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
    gap: var(--waker-space-5);
    align-items: end;
}

.billing-review-line--prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-switch-row {
    align-content: start;
}

.billing-actions {
    display: flex;
    align-items: center;
    gap: var(--waker-space-4);
    flex-wrap: wrap;
    border-top: 1px solid var(--waker-border-soft);
}

.billing-danger-action {
    margin-right: auto;
}

.billing-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--waker-space-6);
}

.billing-table-actions,
.billing-add-month {
    display: flex;
    align-items: end;
    gap: var(--waker-space-3);
    flex-wrap: wrap;
}

.billing-table-actions {
    justify-content: flex-end;
}

.billing-add-month {
    padding: var(--waker-space-2);
    border: 1px solid var(--waker-border-soft);
    border-radius: var(--waker-radius-md);
    background: var(--waker-color-surface-soft);
}

.billing-add-month__field {
    width: 170px;
}

.billing-add-month .wk-input {
    min-height: 38px;
}

.billing-table-body {
    padding-top: var(--waker-space-4);
}

.billing-owner-card .wk-table-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.billing-table {
    --billing-compact-column-width: 86px;
    border-collapse: separate;
    border-spacing: 0 8px;
    table-layout: fixed;
}

.billing-table th,
.billing-table td {
    border: 0;
    width: var(--billing-compact-column-width);
    min-width: var(--billing-compact-column-width);
    max-width: var(--billing-compact-column-width);
}

.billing-table th {
    padding: 0 6px 8px;
    background: transparent;
    color: var(--waker-color-ink-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    line-height: 1.06;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

.billing-table td {
    padding: 10px 6px;
    border-top: 1px solid var(--waker-border-soft);
    border-bottom: 1px solid var(--waker-border-soft);
    background: var(--waker-color-surface);
    color: var(--waker-color-ink-strong);
    font-size: var(--waker-font-size-sm);
    line-height: 1.2;
    text-align: left;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

.billing-table tbody tr td:first-child {
    border-left: 1px solid var(--waker-border-soft);
    border-radius: var(--waker-radius-md) 0 0 var(--waker-radius-md);
}

.billing-table tbody tr td:last-child {
    border-right: 1px solid var(--waker-border-soft);
    border-radius: 0 var(--waker-radius-md) var(--waker-radius-md) 0;
}

.billing-table td:first-child,
.billing-table th:first-child {
    min-width: var(--billing-compact-column-width);
}

.billing-month-row {
    cursor: default;
}

.billing-month-row:hover td {
    background: var(--waker-color-surface-hover);
}

.billing-month-row.is-selected td {
    background: var(--waker-color-surface);
    border-color: var(--waker-border-soft);
}

.billing-month-row.is-selected td:first-child {
    box-shadow: inset 4px 0 0 var(--waker-color-primary);
}

.billing-review-button {
    min-height: 34px;
    padding: 0 var(--waker-space-4);
}

.billing-invoice-links {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 24px;
    width: 100%;
}

.billing-invoice-links a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--waker-color-primary);
    font-weight: var(--waker-weight-bold);
    line-height: 1;
    text-decoration: none;
}

.billing-empty-cell {
    padding: var(--waker-space-9);
    color: var(--waker-color-ink-muted);
    text-align: center;
}

.billing-mobile-only {
    display: none;
}

.billing-mobile-month-list {
    display: none;
}

@media (min-width: 1024px) {
    .billing-owner-card {
        margin-bottom: 50vh;
    }
}

@media (max-width: 1380px) {
    .billing-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .billing-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    body.page-billing {
        margin: 0 !important;
        padding: 0 !important;
        width: 100%;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--waker-color-header-mobile) !important;
        color: var(--sa-mobile-text);
        font-family: var(--sa-mobile-font);
    }

    body.page-billing > form:first-of-type,
    body.page-billing #header1 {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
    }

    body.page-billing.sa-modal-open {
    overflow: hidden;
}

body.page-billing #main-content {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 100vh;
        margin: 0 !important;
        padding: 0 0 max(28px, env(safe-area-inset-bottom)) !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        background: var(--waker-color-header-mobile) !important;
        -webkit-overflow-scrolling: touch;
    }

    .billing-mobile-only {
        display: block;
    }

    .billing-page {
        min-height: 100vh;
        background: var(--waker-color-header-mobile);
    }

    .billing-mobile-shell {
        min-height: 0 !important;
        background: transparent !important;
    }

    .billing-shell {
        min-height: calc(100vh - var(--waker-mobile-header-height));
        padding: 0 0 calc(var(--waker-space-10) + 44px);
        gap: var(--waker-space-7);
        background: var(--waker-color-page-mobile);
    }

    .billing-top {
        margin: 0;
        padding: 18px 16px 0;
        border: 0;
        border-radius: 0;
        background: var(--waker-color-page-mobile);
        box-shadow: none;
    }

    .billing-header-row {
        align-items: stretch;
        flex-direction: column;
        gap: var(--waker-space-4);
        padding-bottom: 0;
        border-bottom: 0;
    }

    .billing-title-row {
        gap: 0;
    }

    .billing-title-icon {
        display: none;
    }

    .billing-top .wk-page-header__subtitle {
        margin-top: var(--waker-space-5);
        color: var(--waker-color-ink-muted);
        font-size: var(--waker-font-size-lg);
        line-height: 1.35;
    }

    .billing-top-actions {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-select-wrap {
        min-width: 0;
        width: 100%;
    }

    .billing-company-picker.sa-mobile-selector {
        height: var(--waker-mobile-selector-height);
    }

    .billing-company-identity {
        width: 100%;
        min-height: var(--waker-mobile-selector-height);
        border-color: var(--waker-border-mobile);
        border-radius: var(--waker-mobile-selector-radius);
        box-shadow: var(--waker-shadow-panel);
    }

    .billing-company-identity__name {
        color: var(--waker-color-ink);
        font-size: var(--waker-mobile-selector-font-size);
        font-weight: var(--waker-weight-medium);
    }

    .billing-summary-grid,
    .billing-action-notice,
    .billing-owner-card,
    .billing-ledger-card {
        margin-inline: var(--waker-space-6);
    }

    .billing-quick-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--waker-space-5);
        padding-top: 0;
        margin: var(--waker-space-7) 0 0;
    }

    .billing-quick-actions .wk-button {
        width: 100%;
        min-height: var(--waker-mobile-action-height);
        border-radius: var(--waker-mobile-action-radius);
        font-family: var(--sa-mobile-font);
        font-size: var(--waker-mobile-action-font-size);
        font-weight: var(--waker-mobile-action-font-weight);
    }

    .billing-summary-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--waker-space-5);
    }

    .billing-summary-card {
        min-height: 106px;
        padding: 15px;
        border-radius: var(--waker-radius-mobile-card);
    }

    .billing-summary-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: var(--waker-space-1);
    }

    .billing-summary-label {
        min-width: 0;
        font-size: var(--waker-font-size-xs);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .billing-summary-corner {
        min-width: 0;
        justify-self: end;
    }

    .billing-summary-value {
        margin-top: 10px;
        font-size: 24px;
    }

    .billing-summary-value--company {
        font-size: 24px;
    }

    .billing-summary-meta {
        margin-top: 8px;
        min-height: 0;
        font-size: 13px;
    }

    .billing-summary-pill {
        min-height: 22px;
        padding-inline: var(--waker-space-1);
        font-size: 10px;
    }

    .billing-month-fields,
    .billing-company-info-fields {
        grid-template-columns: 1fr;
    }

    .billing-review-line {
        grid-template-columns: 1fr;
    }

    .billing-danger-action {
        margin-right: 0;
    }

    .billing-table-head {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .billing-table-actions,
    .billing-add-month {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-add-month__field,
    .billing-table-actions .wk-button {
        width: 100%;
    }

    .billing-add-month {
        padding: 12px;
        border-radius: 18px;
    }

    .billing-add-month .wk-input,
    .billing-add-month .wk-button {
        min-height: 54px;
        height: 54px;
        border-radius: 14px;
        font-size: 16px;
    }

    .billing-table-body {
        padding: 0 18px 18px;
    }

    .billing-owner-card .wk-table-wrap {
        display: none;
    }

    .billing-mobile-month-list {
        display: grid;
        gap: 12px;
    }

    .billing-mobile-empty {
        padding: 22px 18px;
        border: 1px solid var(--waker-border-mobile);
        border-radius: 18px;
        background: var(--waker-color-surface);
        color: var(--waker-color-ink-muted);
        font-size: 15px;
        text-align: center;
    }

    .billing-mobile-month-card {
        display: grid;
        gap: 14px;
        padding: 16px;
        border: 1px solid var(--waker-border-mobile);
        border-radius: 20px;
        background: var(--waker-color-surface);
        box-shadow: 0 8px 18px rgba(25, 50, 93, 0.06);
    }

    .billing-mobile-month-card.is-selected {
        border-color: var(--waker-color-primary-border);
        box-shadow: inset 4px 0 0 var(--waker-color-primary), 0 8px 18px rgba(25, 50, 93, 0.06);
    }

    .billing-mobile-month-card__top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .billing-mobile-month-card__identity {
        min-width: 0;
        display: grid;
        gap: 8px;
    }

    .billing-mobile-month-card__month {
        color: var(--waker-color-ink);
        font-size: 20px;
        font-weight: var(--waker-weight-strong);
        line-height: 1.1;
    }

    .billing-mobile-month-card__total {
        min-width: 112px;
        display: grid;
        justify-items: end;
        gap: 5px;
        text-align: right;
    }

    .billing-mobile-month-card__total span,
    .billing-mobile-month-card__grid dt {
        color: var(--waker-color-ink-muted);
        font-size: 11px;
        font-weight: var(--waker-weight-bold);
        line-height: 1.1;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .billing-mobile-month-card__total strong {
        color: var(--waker-color-ink);
        font-size: 22px;
        font-weight: var(--waker-weight-strong);
        line-height: 1.05;
    }

    .billing-mobile-month-card__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0;
        padding-top: 12px;
        border-top: 1px solid var(--waker-border-subtle);
    }

    .billing-mobile-month-card__grid div {
        min-width: 0;
        display: grid;
        gap: 4px;
    }

    .billing-mobile-month-card__grid dt,
    .billing-mobile-month-card__grid dd {
        margin: 0;
        min-width: 0;
    }

    .billing-mobile-month-card__grid dd {
        color: var(--waker-color-ink-soft);
        font-size: 15px;
        font-weight: var(--waker-weight-semibold);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .billing-mobile-month-card__actions {
        display: grid;
        gap: 10px;
        padding-top: 2px;
    }

    .billing-mobile-invoice-links {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        min-height: 34px;
    }

    .billing-mobile-invoice-link,
    .billing-mobile-review-button {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--waker-border-mobile);
        border-radius: 13px;
        background: var(--waker-color-primary-soft);
        color: var(--waker-color-primary-text);
        padding: 0 14px;
        font-family: var(--sa-mobile-font);
        font-size: 15px;
        font-weight: var(--waker-weight-semibold);
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
    }

    .billing-mobile-review-button {
        width: 100%;
        min-height: 48px;
        border-color: transparent;
        background: linear-gradient(180deg, var(--sa-mobile-primary) 0%, var(--sa-mobile-primary-dark) 100%);
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(32, 92, 210, 0.18);
    }

    .billing-mobile-muted {
        color: var(--waker-color-ink-muted);
        font-size: 14px;
        font-weight: var(--waker-weight-medium);
    }

    .billing-table th,
    .billing-table td {
        padding: var(--waker-space-5);
        font-size: var(--waker-font-size-sm);
    }

    .billing-company-info-dialog,
    .billing-review-dialog {
        width: 100%;
        max-height: calc(100dvh - 28px);
        overflow: auto;
    }

    .billing-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .billing-actions .wk-button,
    .billing-actions .sa-modal-button {
        width: 100%;
    }

}

@media (max-width: 520px) {
    .billing-summary-grid {
        margin-inline: 12px;
    }

    .billing-owner-card,
    .billing-action-notice,
    .billing-ledger-card {
        margin-inline: 12px;
    }

    .billing-quick-actions {
        margin-inline: 0;
    }

    .billing-mobile-month-card__top {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-mobile-month-card__total {
        justify-items: start;
        text-align: left;
    }
}

/* billingdesktopselector1 */
@media (min-width: 1024px) {
    .billing-company-picker.is-enhanced > .sa-mobile-selector__button,
    .billing-company-picker.is-enhanced > .sa-mobile-selector__menu {
        display: none !important;
    }

    .billing-company-picker.is-enhanced > .sa-mobile-selector__control {
        position: static !important;
        width: 100% !important;
        height: 44px !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .billing-company-picker.is-enhanced > .sa-mobile-selector__chevron {
        display: inline-flex;
    }
}

/* billingbuttonweight1 */
@media (min-width: 1024px) {
    .billing-page .wk-button {
        font-weight: 400 !important;
    }
}

.billing-credit-shell {
    display: grid;
    gap: 18px;
}

.billing-credit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.billing-credit-panel .wk-card__body,
.billing-credit-actions,
.billing-auto-topup-form,
.billing-admin-form {
    display: grid;
    gap: 12px;
}

.billing-package-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(74px, 1fr));
    gap: 8px;
}

.billing-package-button {
    min-height: 44px;
}

.billing-custom-buy-row,
.billing-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.billing-auto-topup-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.billing-auto-topup-form .wk-button {
    min-height: 44px;
}

.billing-auto-topup-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    color: var(--waker-color-ink-strong);
    font-size: var(--waker-font-size-sm);
    font-weight: var(--waker-weight-bold);
    cursor: pointer;
    user-select: none;
}

.billing-auto-topup-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.billing-auto-topup-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    box-sizing: border-box;
    border: 1px solid #c8d1dc;
    border-radius: 999px;
    background: #e4e9ef;
    box-shadow: inset 0 1px 2px rgba(15, 35, 65, 0.08);
    transition: background 0.14s ease, border-color 0.14s ease;
}

.billing-auto-topup-switch::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 35, 65, 0.18);
    transform: translateY(-50%);
    transition: transform 0.14s ease;
}

.billing-auto-topup-checkbox:checked + .billing-auto-topup-switch {
    border-color: #39ae50;
    background: #48c05c;
}

.billing-auto-topup-checkbox:checked + .billing-auto-topup-switch::before {
    transform: translate(18px, -50%);
}

.billing-auto-topup-toggle:focus-within {
    border-radius: 999px;
    box-shadow: var(--sa-focus-ring);
}

.billing-credit-admin,
.billing-ledger-card {
    min-width: 0;
}

.billing-ledger-card {
    margin-bottom: 24px;
}

.billing-ledger-table th,
.billing-ledger-table td {
    white-space: nowrap;
}

.billing-ledger-table td:last-child {
    min-width: 220px;
    white-space: normal;
}

@media (max-width: 860px) {
    .billing-credit-grid,
    .billing-custom-buy-row,
    .billing-admin-grid,
    .billing-auto-topup-form {
        grid-template-columns: 1fr;
    }

    .billing-package-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .billing-credit-grid,
    .billing-credit-admin,
    .billing-ledger-card {
        margin-inline: 12px;
    }

    .billing-package-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.billing-panel-button {
    min-height: 40px;
    padding-inline: 16px;
}

.billing-action-dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    overflow: auto;
}

.billing-action-dialog--wide {
    width: min(840px, calc(100vw - 32px));
}

.billing-modal-body {
    display: grid;
    gap: 16px;
    padding-bottom: 24px;
}

.billing-action-modal .billing-credit-actions {
    display: grid;
    gap: 12px;
}

.billing-action-modal .billing-package-row {
    grid-template-columns: repeat(5, minmax(74px, 1fr));
}

.billing-action-modal .billing-admin-grid {
    align-items: start;
}

@media (max-width: 860px) {
    .billing-action-modal {
        padding: 14px;
    }

    .billing-action-dialog,
    .billing-action-dialog--wide {
        width: 100%;
        max-height: calc(100dvh - 28px);
    }

    .billing-action-modal .billing-package-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .billing-panel-button {
        width: 100%;
    }

    .billing-action-modal .billing-package-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.billing-summary-card--action {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-summary-footer {
    margin-top: auto;
    padding-top: 4px;
}

.billing-card-action {
    width: 100%;
    min-height: 38px;
    padding-inline: 12px;
}

.billing-modal-detail,
.billing-protect-details {
    display: grid;
    gap: 10px;
}

.billing-modal-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--waker-border-soft);
    border-radius: var(--waker-radius-sm);
    background: var(--waker-color-primary-soft);
}

.billing-modal-metric span {
    color: var(--waker-color-ink-muted);
    font-size: var(--waker-font-size-sm);
    font-weight: var(--waker-weight-bold);
    text-transform: uppercase;
}

.billing-modal-metric strong {
    color: var(--waker-color-ink-strong);
    font-size: var(--waker-font-size-lg);
    font-weight: var(--waker-weight-strong);
    text-align: right;
}

.billing-modal-muted {
    margin: 0;
    color: var(--waker-color-ink-muted);
    font-size: var(--waker-font-size-sm);
    line-height: 1.4;
}

@media (max-width: 520px) {
    .billing-modal-metric {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .billing-modal-metric strong {
        text-align: left;
    }
}
/* Billing ledger filters and Alerts-style ledger table */
.billing-ledger-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--waker-border-soft);
}

.billing-ledger-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--waker-border-soft);
    background: #ffffff;
}

.billing-ledger-toolbar-left,
.billing-ledger-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.billing-ledger-toolbar-right {
    justify-content: flex-end;
    margin-left: auto;
}

.billing-ledger-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 44px;
}

.billing-ledger-filter-chip {
    height: 44px;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #cdd9e7;
    border-radius: 7px;
    background: #ffffff;
    color: #17315f;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
}

.billing-ledger-filter-chip:hover,
.billing-ledger-filter-chip:focus-visible,
.billing-ledger-filter-chip.is-active {
    border-color: #c8dcf5;
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
    outline: none;
}

.billing-ledger-field {
    display: grid;
    gap: 5px;
    min-width: 138px;
}

.billing-ledger-field--type {
    min-width: 210px;
}

.billing-ledger-field--limit {
    min-width: 94px;
}

.billing-ledger-field span {
    color: var(--waker-color-ink-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.billing-ledger-field .wk-input,
.billing-ledger-field .wk-select,
#billing_reset_ledger_filters,
#billing_refresh_ledger {
    min-height: 44px;
}

.billing-ledger-body {
    padding-top: 0;
    padding-inline: 0;
}

.billing-ledger-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.billing-ledger-table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.billing-ledger-table thead th {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #cdd7e3;
    background: #e9eef5;
    color: #111111;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.billing-ledger-table thead th + th {
    border-left: 1px solid #d7e0ea;
}

.billing-ledger-table tbody td {
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #dce4ee;
    background: #ffffff;
    color: #17315f;
    font-size: 14px;
    line-height: 1.3;
    vertical-align: middle;
    white-space: nowrap;
}

.billing-ledger-table tbody td + td {
    border-left: 1px solid #edf2f7;
}

.billing-ledger-table tbody tr:hover td {
    background: #f8fafc;
}

.billing-ledger-date {
    min-width: 170px;
}

.billing-ledger-table td:nth-child(2) {
    min-width: 170px;
}

.billing-ledger-table td:nth-child(3),
.billing-ledger-table td:nth-child(4),
.billing-ledger-table td:nth-child(5) {
    min-width: 100px;
}

.billing-ledger-table .billing-ledger-reason {
    min-width: 280px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.billing-ledger-type,
.billing-ledger-change,
.billing-ledger-shift,
.billing-ledger-muted {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f7faff;
    color: #17315f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.billing-ledger-type--paid-purchase,
.billing-ledger-type--auto-topup {
    border-color: var(--waker-status-success-border);
    background: var(--waker-status-success-bg);
    color: var(--waker-status-success-text);
}

.billing-ledger-type--shift-consumption {
    border-color: rgba(240, 123, 0, 0.3);
    background: rgba(240, 123, 0, 0.1);
    color: #8a5515;
}

.billing-ledger-type--manual-adjustment {
    border-color: #c8dcf5;
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-ledger-type--shift-credit-return,
.billing-ledger-type--free-trial {
    border-color: #dbe5f0;
    background: #f7faff;
    color: #4f6d96;
}

.billing-ledger-change {
    min-width: 50px;
    justify-content: center;
}

.billing-ledger-change--positive {
    border-color: var(--waker-status-success-border);
    background: var(--waker-status-success-bg);
    color: var(--waker-status-success-text);
}

.billing-ledger-change--negative {
    border-color: rgba(201, 75, 75, 0.28);
    background: rgba(201, 75, 75, 0.08);
    color: var(--waker-color-danger);
}

.billing-ledger-change--neutral,
.billing-ledger-muted {
    color: var(--waker-color-ink-muted);
}

.billing-ledger-balance {
    font-weight: 700;
}

@media (max-width: 1180px) {
    .billing-ledger-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-ledger-toolbar-right {
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    .billing-ledger-head,
    .billing-ledger-toolbar-left,
    .billing-ledger-toolbar-right,
    .billing-ledger-filter-group {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-ledger-field,
    .billing-ledger-field--type,
    .billing-ledger-field--limit,
    .billing-ledger-filter-chip,
    #billing_reset_ledger_filters,
    #billing_refresh_ledger {
        width: 100%;
    }

    .billing-ledger-table thead th,
    .billing-ledger-table tbody td {
        padding: 10px 12px;
    }
}
/* Billing ledger action-chip filters v2 */
.billing-ledger-toolbar {
    align-items: center;
    gap: 12px;
    padding: 16px 18px 14px;
}

.billing-ledger-toolbar-left {
    flex: 1 1 auto;
}

.billing-ledger-filter-group {
    gap: 8px;
    min-height: 44px;
}

.billing-ledger-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-height: 44px;
    padding: 0 13px;
    border-radius: 7px;
    background: #ffffff;
    color: #17315f;
    font-size: 14px;
    font-weight: 400;
    box-shadow: none;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.billing-ledger-filter-chip:hover,
.billing-ledger-filter-chip:focus-visible {
    outline: none;
}

.billing-ledger-filter-chip--all,
.billing-ledger-filter-chip--all:hover,
.billing-ledger-filter-chip--all:focus-visible {
    border-color: #bfcbda;
    background: #ffffff;
    color: #4f6d96;
}

.billing-ledger-filter-chip--all.is-active {
    border-color: #9fb3cc;
    background: #edf3fb;
    color: #17315f;
    box-shadow: inset 0 0 0 1px rgba(79, 109, 150, 0.14);
}

.billing-ledger-filter-chip--topups,
.billing-ledger-filter-chip--paid-purchase,
.billing-ledger-filter-chip--auto-topup,
.billing-ledger-filter-chip--topups:hover,
.billing-ledger-filter-chip--paid-purchase:hover,
.billing-ledger-filter-chip--auto-topup:hover,
.billing-ledger-filter-chip--topups:focus-visible,
.billing-ledger-filter-chip--paid-purchase:focus-visible,
.billing-ledger-filter-chip--auto-topup:focus-visible {
    border-color: var(--waker-status-success-border);
    background: var(--waker-status-success-bg);
    color: var(--waker-status-success-text);
}

.billing-ledger-filter-chip--topups.is-active,
.billing-ledger-filter-chip--paid-purchase.is-active,
.billing-ledger-filter-chip--auto-topup.is-active {
    border-color: #66b77a;
    background: #d8f0df;
    color: #116127;
    box-shadow: inset 0 0 0 1px rgba(21, 146, 38, 0.16);
}

.billing-ledger-filter-chip--shift-consumption,
.billing-ledger-filter-chip--shift-consumption:hover,
.billing-ledger-filter-chip--shift-consumption:focus-visible {
    border-color: #edc98d;
    background: #fff7e8;
    color: #8a5515;
}

.billing-ledger-filter-chip--shift-consumption.is-active {
    border-color: #d8a24a;
    background: #f6e3bc;
    color: #6f430d;
    box-shadow: inset 0 0 0 1px rgba(171, 108, 21, 0.12);
}

.billing-ledger-filter-chip--manual-adjustment,
.billing-ledger-filter-chip--manual-adjustment:hover,
.billing-ledger-filter-chip--manual-adjustment:focus-visible {
    border-color: #c8dcf5;
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
}

.billing-ledger-filter-chip--manual-adjustment.is-active {
    border-color: #8fb5e6;
    background: #dfeeff;
    color: #1754ad;
    box-shadow: inset 0 0 0 1px rgba(31, 96, 190, 0.13);
}

.billing-ledger-filter-chip--shift-credit-return,
.billing-ledger-filter-chip--free-trial,
.billing-ledger-filter-chip--shift-credit-return:hover,
.billing-ledger-filter-chip--free-trial:hover,
.billing-ledger-filter-chip--shift-credit-return:focus-visible,
.billing-ledger-filter-chip--free-trial:focus-visible {
    border-color: #dbe5f0;
    background: #f7faff;
    color: #4f6d96;
}

.billing-ledger-filter-chip--shift-credit-return.is-active,
.billing-ledger-filter-chip--free-trial.is-active {
    border-color: #b8c9de;
    background: #e9f0f8;
    color: #314e76;
    box-shadow: inset 0 0 0 1px rgba(79, 109, 150, 0.12);
}

.billing-ledger-field--date {
    min-width: 178px;
}

.billing-ledger-date-trigger {
    position: relative;
    width: 100%;
    height: 44px;
    min-height: 44px;
    border: 1px solid #bfcbda;
    border-radius: 6px;
    background: #ffffff;
    color: #15315f;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
}

.billing-ledger-date-trigger:hover {
    border-color: #aebed2;
    background: #fafcfe;
}

.billing-ledger-date-trigger:focus-within {
    border-color: #7ea0cd;
    box-shadow: inset 0 0 0 1px rgba(76, 112, 174, 0.12);
}

.billing-ledger-input-icon,
.billing-ledger-input-tail {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    pointer-events: none;
}

.billing-ledger-input-icon {
    left: 12px;
    width: 22px;
    height: 22px;
    color: #5e7ca6;
}

.billing-ledger-input-tail {
    right: 12px;
    width: 14px;
    height: 14px;
    color: #6780a8;
}

.billing-ledger-input-icon svg,
.billing-ledger-input-tail svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-ledger-date-trigger input {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    padding: 0 38px 0 44px;
    background: transparent;
    color: #15315f;
    font: inherit;
    line-height: 44px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.billing-ledger-date-trigger input:focus {
    outline: none;
}

.billing-ledger-date-trigger input::-webkit-calendar-picker-indicator {
    display: none;
}

.billing-ledger-field--limit {
    min-width: 96px;
}

.billing-ledger-field--limit .wk-select,
#billing_reset_ledger_filters,
#billing_refresh_ledger {
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    .billing-ledger-date-trigger,
    .billing-ledger-field--date,
    .billing-ledger-field--limit {
        width: 100%;
    }
}
/* Billing ledger date-left toolbar and bottom pagination v3 */
.billing-ledger-toolbar {
    justify-content: flex-start;
    align-items: flex-start;
}

.billing-ledger-toolbar-flow {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.billing-ledger-date-range {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.billing-ledger-date-range--mobile {
    display: none;
}

.billing-ledger-calendar-nav-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.billing-ledger-calendar-nav-icon svg {
    width: 100%;
    height: 100%;
}

.billing-ledger-calendar-nav-icon--prev {
    transform: rotate(90deg);
}

.billing-ledger-calendar-nav-icon--next {
    transform: rotate(-90deg);
}

.billing-ledger-filter-group {
    align-self: flex-end;
}

.billing-ledger-reset {
    align-self: flex-end;
}

.billing-ledger-body {
    padding-bottom: 0;
}

.billing-ledger-pagination {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
}

@media (max-width: 1180px) {
    .billing-ledger-toolbar-flow,
    .billing-ledger-date-range,
    .billing-ledger-filter-group {
        align-items: stretch;
    }
}

@media (max-width: 1023px) {
    .billing-ledger-date-range--desktop {
        display: none;
    }

    .billing-ledger-date-range--mobile {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--waker-space-3);
        width: 100%;
        margin-bottom: var(--waker-space-5);
    }

    .billing-ledger-mobile-date-field {
        display: grid;
        grid-template-columns: var(--waker-space-14) minmax(0, 1fr);
        align-items: center;
        column-gap: var(--waker-space-4);
        width: 100%;
        min-width: 0;
    }

    .billing-ledger-mobile-date-field > .sa-mobile-field-label {
        margin: 0;
    }

    .billing-ledger-mobile-calendar {
        width: 100%;
        min-width: 0;
    }

    .billing-ledger-mobile-calendar > .sa-mobile-calendar {
        right: 0;
        left: auto;
        width: min(
            var(--waker-mobile-calendar-width),
            calc(100% + var(--waker-space-14) + var(--waker-space-4))
        );
    }
}

@media (max-width: 720px) {
    .billing-ledger-toolbar-flow {
        flex-direction: column;
    }

    .billing-ledger-filter-group {
        width: 100%;
        align-self: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--waker-space-3);
    }

    .billing-ledger-filter-chip {
        width: 100%;
    }

    .billing-ledger-reset {
        width: 100%;
    }
}
/* Combined promo/referral redemption modal */
.billing-code-redeem-body {
    gap: 18px;
}

.billing-code-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.billing-code-option {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--waker-border-soft);
    border-radius: var(--waker-radius-sm);
    background: var(--waker-color-surface);
}

.billing-code-option__head {
    display: grid;
    gap: 4px;
}

.billing-code-option__head h3 {
    margin: 0;
    color: var(--waker-color-ink-strong);
    font-size: var(--waker-font-size-lg);
    font-weight: var(--waker-weight-strong);
    line-height: 1.2;
}
.billing-code-option-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.billing-code-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--waker-border-soft);
    border-radius: 999px;
    background: var(--waker-color-primary-soft);
    color: var(--waker-color-primary);
    font-size: 12px;
    font-weight: var(--waker-weight-strong);
    line-height: 1;
    cursor: help;
}

.billing-code-info:hover,
.billing-code-info:focus-visible {
    border-color: var(--waker-color-primary);
    background: var(--waker-color-primary);
    color: #fff;
    outline: none;
}

.billing-code-info-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 20;
    width: min(260px, calc(100vw - 48px));
    padding: 9px 11px;
    border: 1px solid var(--waker-border-soft);
    border-radius: var(--waker-radius-sm);
    background: var(--waker-color-ink-strong);
    color: #fff;
    font-size: var(--waker-font-size-sm);
    font-weight: var(--waker-weight-medium);
    line-height: 1.35;
    text-align: left;
    text-transform: none;
    transform: translate(-50%, 4px);
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--waker-shadow-md);
    transition: opacity 120ms ease, transform 120ms ease;
}

.billing-code-info-bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 10px;
    height: 10px;
    background: var(--waker-color-ink-strong);
    transform: translate(-50%, -5px) rotate(45deg);
}

.billing-code-info:hover .billing-code-info-bubble,
.billing-code-info:focus-visible .billing-code-info-bubble {
    opacity: 1;
    transform: translate(-50%, 0);
}

.billing-code-option .wk-button {
    width: 100%;
}

@media (max-width: 760px) {
    .billing-code-choice-grid {
        grid-template-columns: 1fr;
    }
}
/* billing-code-row-layout */
.billing-code-choice-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: visible;
}

.billing-code-option {
    grid-template-columns: minmax(124px, 0.75fr) minmax(0, 1fr) minmax(122px, auto);
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.billing-code-option__head,
.billing-code-field {
    min-width: 0;
}

.billing-code-field {
    margin: 0;
}

.billing-code-field .wk-input {
    width: 100%;
    min-width: 0;
}

.billing-code-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.billing-code-option .wk-button {
    width: auto;
    min-width: 122px;
    white-space: nowrap;
}

.billing-code-redeem-hint {
    margin-top: -4px;
}

@media (max-width: 700px) {
    .billing-code-option {
        grid-template-columns: 1fr;
    }

    .billing-code-option .wk-button {
        width: 100%;
    }
}
/* billing-header-counters */
.billing-header-row {
    align-items: flex-start;
}

.billing-top-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.billing-header-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(142px, 1fr));
    gap: 10px;
    width: min(760px, 58vw);
}

.billing-header-stat {
    min-width: 0;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid var(--waker-color-border);
    border-radius: var(--waker-radius-sm);
    background: var(--waker-color-surface);
}

.billing-header-stat__icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--waker-color-primary);
}

.billing-header-stat__icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.billing-header-stat__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.billing-header-stat__label {
    color: var(--waker-color-ink-muted);
    font-size: 11px;
    font-weight: var(--waker-weight-bold);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-header-stat__value {
    color: var(--waker-color-ink-strong);
    font-size: 18px;
    font-weight: var(--waker-weight-strong);
    line-height: 1.05;
    white-space: nowrap;
}

.billing-header-stat--warning .billing-header-stat__icon {
    color: #d97706;
}

.billing-header-stat--success .billing-header-stat__icon {
    color: var(--waker-color-success);
}

@media (max-width: 1380px) {
    .billing-header-stats {
        grid-template-columns: repeat(2, minmax(152px, 1fr));
        width: min(520px, 48vw);
    }
}

@media (max-width: 1023px) {
    .billing-top-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .billing-header-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .billing-header-stat {
        min-height: 62px;
        padding: 11px 12px;
        border-color: var(--waker-border-mobile);
        border-radius: var(--waker-radius-mobile-card);
        box-shadow: var(--waker-shadow-panel);
    }

    .billing-header-stat__value {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    .billing-header-stats {
        grid-template-columns: 1fr;
    }
}
/* billing-alerts-style-header */
body.page-billing .billing-top-actions {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
}

body.page-billing .billing-top-actions .app-save-state {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

body.page-billing .billing-header-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(152px, 1fr));
    gap: 12px;
    width: min(720px, 100%);
    min-width: 720px;
}

body.page-billing .billing-header-stat {
    min-width: 0;
    min-height: 72px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d6dee8;
    border-radius: 6px;
    background: #f6f8fb;
    box-shadow: none;
}

body.page-billing .billing-header-stat__icon {
    width: 28px;
    height: 28px;
    color: #5f7ea8;
}

body.page-billing .billing-header-stat__icon svg {
    width: 22px;
    height: 22px;
}

body.page-billing .billing-header-stat__copy {
    display: block;
    min-width: 0;
}

body.page-billing .billing-header-stat__label {
    display: block;
    margin-bottom: 4px;
    color: #7085a6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

body.page-billing .billing-header-stat__value {
    display: block;
    color: #10254d;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

body.page-billing .billing-header-stat--warning .billing-header-stat__icon {
    color: #c98718;
}

body.page-billing .billing-header-stat--success .billing-header-stat__icon {
    color: #3f9562;
}

@media (max-width: 1520px) {
    body.page-billing .billing-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    body.page-billing .billing-top-actions {
        width: 100%;
    }

    body.page-billing .billing-header-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 1023px) {
    body.page-billing .billing-header-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body.page-billing .billing-header-stats {
        grid-template-columns: 1fr;
    }
}
/* billing-header-counter-width */
body.page-billing .billing-header-stats {
    grid-template-columns: repeat(4, minmax(184px, 1fr));
    width: min(860px, 100%);
    min-width: 820px;
}

body.page-billing .billing-header-stat {
    padding-inline: 14px;
}

body.page-billing .billing-header-stat__label {
    white-space: nowrap;
}

@media (max-width: 1520px) {
    body.page-billing .billing-header-stats {
        grid-template-columns: repeat(4, minmax(164px, 1fr));
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 1180px) {
    body.page-billing .billing-header-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body.page-billing .billing-header-stats {
        grid-template-columns: 1fr;
    }

    body.page-billing .billing-header-stat__label {
        white-space: normal;
    }
}
/* billing-header-icon-colors */
body.page-billing .billing-header-stat__icon {
    border-radius: 8px;
    background: #eef4ff;
}

body.page-billing .billing-header-stat--unprotected .billing-header-stat__icon {
    background: #fff7ed;
    color: #d97706;
}

body.page-billing .billing-header-stat--month .billing-header-stat__icon {
    background: #eff6ff;
    color: #2563eb;
}

body.page-billing .billing-header-stat--spent .billing-header-stat__icon {
    background: #eef2ff;
    color: #4f46e5;
}

body.page-billing .billing-header-stat--total .billing-header-stat__icon {
    background: #ecfdf3;
    color: #159238;
}
/* Stripe portal branded button */
body.page-billing .billing-quick-actions #billing_portal {
    border-color: transparent !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #b83cff 0%, #635bff 48%, #0a2f9f 100%) !important;
    box-shadow: 0 8px 18px rgba(99, 91, 255, 0.24) !important;
}

body.page-billing .billing-quick-actions #billing_portal:hover,
body.page-billing .billing-quick-actions #billing_portal:focus-visible {
    border-color: transparent !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #c24aff 0%, #6d65ff 48%, #123bb8 100%) !important;
    box-shadow: 0 10px 22px rgba(99, 91, 255, 0.3) !important;
}

body.page-billing .billing-quick-actions #billing_portal:disabled {
    color: rgba(255, 255, 255, 0.76) !important;
    background: linear-gradient(135deg, #b9a6dc 0%, #9290dd 48%, #6073bd 100%) !important;
    box-shadow: none !important;
}
/* End Stripe portal branded button */


/* Smaller labels inside Billing redeem-code rows */
body.page-billing .billing-code-option__head .billing-code-option-title {
    font-size: 15.33px;
    line-height: 1.12;
}

body.page-billing .billing-code-option-title .billing-code-info {
    width: 20px;
    height: 20px;
    font-size: 11px;
}
/* End smaller Billing redeem-code labels */
/* Billing referral earn callout */
.billing-referral-earn-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #cfe0ff;
    border-radius: var(--waker-radius-sm);
    background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    box-shadow: 0 1px 3px rgba(32, 77, 176, 0.06);
}

.billing-referral-earn-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.billing-referral-earn-copy strong {
    color: #10254d;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.billing-referral-earn-copy span {
    color: #48628a;
    font-size: 13px;
    line-height: 1.35;
}

.billing-referral-earn-link {
    flex: 0 0 auto;
    min-width: 142px;
    text-decoration: none !important;
    white-space: nowrap;
}

.billing-referral-earn-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 700px) {
    .billing-referral-earn-card {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-referral-earn-link {
        width: 100%;
        justify-content: center;
    }
}
/* End Billing referral earn callout */
