.bun-reseller {
    --br-primary: #1877f2;
    --br-primary-dark: #0864d7;
    --br-navy: #10244a;
    --br-text: #243653;
    --br-muted: #6d7c94;
    --br-line: #dfe6ef;
    --br-soft: #f5f8fc;
    --br-card: #ffffff;
    --br-success: #159447;
    --br-success-bg: #eaf9ef;
    --br-warning: #ad6700;
    --br-warning-bg: #fff6df;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 52px;
    color: var(--br-text);
}

.bun-reseller *,
.bun-reseller *::before,
.bun-reseller *::after {
    box-sizing: border-box;
}

.bun-reseller button,
.bun-reseller input,
.bun-reseller select {
    font: inherit;
}

.bun-reseller__hero {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(560px, 1.4fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
}

.bun-reseller__heading h1,
.bun-reseller__section-heading h2,
.bun-reseller__fund-card h2,
.bun-reseller__plan h3 {
    margin: 0;
    color: var(--br-navy);
}

.bun-reseller__heading h1 {
    margin-top: 5px;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.12;
    font-weight: 750;
    letter-spacing: -.025em;
}

.bun-reseller__heading p,
.bun-reseller__section-heading p,
.bun-reseller__api-create p {
    margin: 8px 0 0;
    color: var(--br-muted);
    line-height: 1.55;
}

.bun-reseller__eyebrow {
    color: var(--br-primary);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .12em;
}

.bun-reseller__summary-grid {
    display: grid;
    grid-template-columns: minmax(235px, .8fr) minmax(360px, 1.2fr);
    gap: 18px;
}

.bun-reseller__balance-card,
.bun-reseller__fund-card,
.bun-reseller__card,
.bun-reseller__plan {
    background: var(--br-card);
    border: 1px solid var(--br-line);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(16, 36, 74, .055);
}

.bun-reseller__balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.bun-reseller__balance-card span:first-child {
    display: block;
    margin-bottom: 7px;
    color: var(--br-navy);
    font-size: 13px;
    font-weight: 650;
}

.bun-reseller__balance-card strong {
    display: block;
    color: var(--br-primary);
    font-size: 29px;
    line-height: 1;
    letter-spacing: -.02em;
}

.bun-reseller__balance-icon {
    display: grid;
    place-items: center;
    flex: 0 0 62px;
    height: 62px;
    color: var(--br-primary);
    background: #edf5ff;
    border-radius: 16px;
}

.bun-reseller__fund-card {
    padding: 18px 20px 20px;
}

.bun-reseller__fund-card h2 {
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 700;
}

.bun-reseller__fund-form {
    display: grid;
    grid-template-columns: minmax(105px, .8fr) minmax(130px, 1fr) auto;
    gap: 10px;
}

.bun-reseller__amount {
    display: grid;
    grid-template-columns: 36px 1fr;
    min-width: 0;
}

.bun-reseller__amount span {
    display: grid;
    place-items: center;
    color: var(--br-text);
    background: var(--br-soft);
    border: 1px solid var(--br-line);
    border-right: 0;
    border-radius: 8px 0 0 8px;
}

.bun-reseller__amount input,
.bun-reseller__payment,
.bun-reseller__status-filter,
.bun-reseller__search input,
.bun-reseller__api-value input {
    width: 100%;
    min-width: 0;
    height: 42px;
    color: var(--br-text);
    background: #fff;
    border: 1px solid var(--br-line);
    outline: none;
}

.bun-reseller__amount input {
    padding: 0 12px;
    border-radius: 0 8px 8px 0;
}

.bun-reseller__payment,
.bun-reseller__status-filter {
    padding: 0 34px 0 12px;
    border-radius: 8px;
    cursor: pointer;
}

.bun-reseller__amount input:focus,
.bun-reseller__payment:focus,
.bun-reseller__status-filter:focus,
.bun-reseller__search input:focus,
.bun-reseller__api-value input:focus {
    border-color: #85b9fb;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, .1);
}

.bun-reseller__primary-btn,
.bun-reseller__generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    color: #fff;
    font-weight: 650;
    background: linear-gradient(135deg, var(--br-primary), #0870eb);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 7px 16px rgba(24, 119, 242, .18);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.bun-reseller__primary-btn:hover,
.bun-reseller__generate-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(24, 119, 242, .24);
}

.bun-reseller__primary-btn:disabled,
.bun-reseller__generate-btn:disabled {
    opacity: .48;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.bun-reseller__message {
    margin-bottom: 24px;
}

.bun-reseller__section {
    margin-top: 26px;
}

.bun-reseller__section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.bun-reseller__section-heading h2 {
    font-size: 18px;
    font-weight: 750;
}

.bun-reseller__section-heading p {
    font-size: 13px;
}

.bun-reseller__plans {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.bun-reseller__plan {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bun-reseller__plan:hover {
    border-color: #bdd8fa;
    box-shadow: 0 12px 28px rgba(16, 36, 74, .09);
    transform: translateY(-2px);
}

.bun-reseller__plan.is-popular {
    border-color: #9ac7ff;
}

.bun-reseller__popular {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    color: #075bc8;
    background: #e8f2ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.bun-reseller__plan-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    margin-bottom: 17px;
}

.bun-reseller__plan-icon {
    display: grid;
    place-items: center;
    flex: 0 0 50px;
    height: 50px;
    color: var(--br-primary);
    background: #edf5ff;
    border-radius: 50%;
}

.bun-reseller__plan small {
    display: block;
    margin-bottom: 2px;
    color: var(--br-muted);
    font-size: 11px;
}

.bun-reseller__plan h3 {
    font-size: 17px;
    font-weight: 750;
}

.bun-reseller__plan strong {
    display: block;
    margin-top: 4px;
    color: var(--br-text);
    font-size: 15px;
}

.bun-reseller__generate-btn {
    width: 100%;
    min-height: 38px;
    margin-top: auto;
    font-size: 13px;
}

.bun-reseller__card {
    margin-top: 26px;
    padding: 18px;
}

.bun-reseller__keys-heading {
    align-items: center;
}

.bun-reseller__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bun-reseller__search {
    position: relative;
    display: block;
    width: 230px;
}

.bun-reseller__search svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    color: #7d8ba0;
    transform: translateY(-50%);
    pointer-events: none;
}

.bun-reseller__search input {
    padding: 0 12px 0 39px;
    border-radius: 8px;
}

.bun-reseller__status-filter {
    width: 150px;
}

.bun-reseller__table-wrap {
    margin-top: 16px;
    border: 1px solid var(--br-line);
    border-radius: 10px;
}

.bun-reseller__table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
}

.bun-reseller__table th {
    padding: 12px 14px;
    color: #65748b;
    background: #f7f9fc;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
}

.bun-reseller__table td {
    padding: 11px 14px;
    color: var(--br-text);
    border-top: 1px solid var(--br-line);
    vertical-align: middle;
}

.bun-reseller__table tbody tr:hover td {
    background: #fbfdff;
}

.bun-reseller__key-code {
    color: var(--br-navy);
    background: transparent;
    font-size: 12px;
    white-space: nowrap;
}

.bun-reseller__status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.bun-reseller__status--pending {
    color: var(--br-warning);
    background: var(--br-warning-bg);
}

.bun-reseller__status--used {
    color: var(--br-success);
    background: var(--br-success-bg);
}

.bun-reseller__used-date {
    margin-left: 6px;
    color: var(--br-muted);
}

.bun-reseller__actions-column {
    width: 74px;
    text-align: center !important;
}

.bun-reseller__delete {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    color: #ee4056;
    border-radius: 7px;
    transition: background .18s ease, color .18s ease;
}

.bun-reseller__delete:hover {
    color: #ce1f37;
    background: #fff0f2;
}

.bun-reseller__empty-filter {
    padding: 28px;
    color: var(--br-muted);
    text-align: center;
}

.bun-reseller__paging {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.bun-reseller__paging:empty {
    display: none;
}

.bun-reseller__api-card {
    margin-bottom: 0;
}

.bun-reseller__api-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 16px;
}

.bun-reseller__api-label {
    color: var(--br-navy);
    font-size: 13px;
    font-weight: 650;
}

.bun-reseller__api-value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.bun-reseller__api-value input {
    padding: 0 13px;
    background: #fbfcfe;
    border-radius: 8px 0 0 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.bun-reseller__copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 15px;
    color: var(--br-navy);
    background: #fff;
    border: 1px solid var(--br-line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.bun-reseller__copy-btn:hover {
    color: var(--br-primary);
    background: #f7fbff;
}

.bun-reseller__api-times {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 13px 0 0 124px;
    color: var(--br-muted);
    font-size: 12px;
}

.bun-reseller__api-times code {
    padding: 3px 7px;
    color: #31557f;
    background: #edf4fb;
    border-radius: 5px;
}

.bun-reseller__api-warning {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 13px 0 0 124px;
    color: #9b6500;
    font-size: 12px;
}

.bun-reseller__api-warning svg {
    flex: 0 0 auto;
}

.bun-reseller__api-create {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 16px;
    padding: 16px;
    background: var(--br-soft);
    border-radius: 10px;
}

.bun-reseller__api-create strong {
    color: var(--br-navy);
}

.bun-reseller__api-create p {
    margin: 4px 0 8px;
    font-size: 12px;
}

.bun-reseller__api-create code {
    color: #31557f;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.bun-reseller__api-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.bun-reseller__modal[hidden] {
    display: none;
}

.bun-reseller__modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.bun-reseller__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 30, 58, 0.55);
    backdrop-filter: blur(3px);
    animation: bun-modal-fade 0.18s ease;
}

.bun-reseller__modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    padding: 28px;
    background: #fff;
    border: 1px solid #e3eaf4;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 35, 70, 0.25);
    animation: bun-modal-open 0.22s ease;
}

.bun-reseller__modal-close {
    position: absolute;
    top: 14px;
    right: 15px;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #7b879b;
    font-size: 24px;
    line-height: 28px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.bun-reseller__modal-close:hover {
    color: #17294c;
    background: #f1f5fa;
}

.bun-reseller__modal-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    color: #ef4444;
    background: #fff0f0;
    border-radius: 50%;
}

.bun-reseller__modal-content h3 {
    margin: 0 0 9px;
    color: #10234a;
    font-size: 21px;
    font-weight: 750;
}

.bun-reseller__modal-content p {
    margin: 0;
    color: #68758b;
    font-size: 14px;
    line-height: 1.6;
}

.bun-reseller__modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
}

.bun-reseller__modal-cancel,
.bun-reseller__modal-delete {
    min-width: 105px;
    padding: 10px 17px;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
}

.bun-reseller__modal-cancel {
    color: #273957;
    background: #fff;
    border: 1px solid #d8e0eb;
}

.bun-reseller__modal-delete {
    color: #fff;
    background: #ef4444;
    border: 1px solid #ef4444;
    box-shadow: 0 7px 18px rgba(239, 68, 68, 0.22);
}

.bun-reseller__modal-delete:hover {
    background: #dc2626;
    border-color: #dc2626;
}

@keyframes bun-modal-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bun-modal-open {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1050px) {
    .bun-reseller__hero {
        grid-template-columns: 1fr;
    }
    .bun-reseller__plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .bun-reseller {
        width: min(100% - 22px, 1180px);
        padding: 22px 0 36px;
    }
    .bun-reseller__summary-grid,
    .bun-reseller__plans {
        grid-template-columns: 1fr;
    }
    .bun-reseller__fund-form {
        grid-template-columns: 1fr;
    }
    .bun-reseller__section-heading,
    .bun-reseller__tools,
    .bun-reseller__api-create {
        align-items: stretch;
        flex-direction: column;
    }
    .bun-reseller__search,
    .bun-reseller__status-filter {
        width: 100%;
    }
    .bun-reseller__api-row {
        grid-template-columns: 1fr;
    }
    .bun-reseller__api-times,
    .bun-reseller__api-warning {
        margin-left: 0;
    }
    .bun-reseller__card {
        padding: 14px;
    }
}

@media (max-width: 440px) {
    .bun-reseller__balance-card strong {
        font-size: 25px;
    }
    .bun-reseller__api-value {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .bun-reseller__api-value input,
    .bun-reseller__copy-btn {
        border: 1px solid var(--br-line);
        border-radius: 8px;
    }
}


/* Premium keys clarity upgrade */

.bun-reseller__keys-heading {
    align-items: center;
    flex-wrap: wrap;
}

.bun-reseller__key-stats {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.bun-reseller__key-stat {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    gap: 6px;
    min-width: 92px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--br-line);
    border-radius: 10px;
}

.bun-reseller__key-stat strong {
    color: var(--br-primary);
    font-size: 18px;
    line-height: 1;
}

.bun-reseller__key-stat span {
    color: var(--br-muted);
    font-size: 12px;
}

.bun-reseller__key-stat--pending strong {
    color: #d99200;
}

.bun-reseller__key-stat--used strong {
    color: var(--br-success);
}

.bun-reseller__duration-filter {
    width: 145px;
    height: 42px;
    padding: 0 34px 0 12px;
    color: var(--br-text);
    background: #fff;
    border: 1px solid var(--br-line);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.bun-reseller__duration-filter:focus {
    border-color: #85b9fb;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, .1);
}

.bun-reseller__table th:first-child {
    width: 38%;
    color: var(--br-navy);
    font-weight: 750;
}

.bun-reseller__key-group {
    display: inline-flex;
    align-items: stretch;
    gap: 8px;
}

.bun-reseller__key-code {
    display: inline-flex;
    align-items: center;
    min-width: 190px;
    padding: 8px 12px;
    color: var(--br-navy);
    background: #f6f9fd;
    border: 1px solid #cfdced;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
}

.bun-reseller__key-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 10px;
    color: var(--br-primary);
    background: #fff;
    border: 1px solid #b9d4f7;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.bun-reseller__key-copy:hover {
    background: #edf5ff;
}

.bun-reseller__key-copy.is-copied {
    color: var(--br-success);
    border-color: #a8dfbc;
    background: var(--br-success-bg);
}

.bun-reseller__date {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.35;
}

.bun-reseller__date small,
.bun-reseller__status-note {
    display: block;
    margin-top: 2px;
    color: var(--br-muted);
    font-size: 11px;
}

.bun-reseller__used-date {
    display: block;
    margin: 3px 0 0;
    color: var(--br-muted);
    font-size: 11px;
}

.bun-reseller__delete {
    color: #e83249;
    background: #fff3f4;
    border: 1px solid #ffd2d8;
}

.bun-reseller__paging {
    margin-top: 12px;
}

@media (max-width: 1050px) {
    .bun-reseller__key-stats {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
    .bun-reseller__tools {
        margin-left: auto;
    }
}

@media (max-width: 700px) {
    .bun-reseller__key-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .bun-reseller__key-stat {
        min-width: 0;
    }
    .bun-reseller__duration-filter {
        width: 100%;
    }
}


/* Premium keys header layout */

.bun-reseller__keys-heading {
    display: block;
}

.bun-reseller__keys-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 16px;
}

.bun-reseller__key-stats {
    margin-left: 0;
}

.bun-reseller__key-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 142px;
    padding: 10px 14px;
}

.bun-reseller__key-stat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    color: #fff;
    background: var(--br-primary);
    border-radius: 50%;
}

.bun-reseller__key-stat--pending .bun-reseller__key-stat-icon {
    background: #f4ae00;
}

.bun-reseller__key-stat--used .bun-reseller__key-stat-icon {
    background: var(--br-success);
}

.bun-reseller__key-stat-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bun-reseller__key-stat-copy small {
    color: var(--br-muted);
    font-size: 12px;
}

.bun-reseller__search {
    width: 290px;
}

.bun-reseller__key-stat-icon svg {
    color: #fff;
    stroke: #fff;
}

.bun-reseller__key-stat-icon svg * {
    stroke: currentColor;
}

@media (max-width: 1050px) {
    .bun-reseller__keys-controls {
        align-items: stretch;
        flex-direction: column;
    }
    .bun-reseller__key-stats {
        order: initial;
        width: auto;
    }
    .bun-reseller__tools {
        margin-left: 0;
    }
}

@media (max-width: 700px) {
    .bun-reseller__key-stat {
        min-width: 0;
        padding: 9px;
    }
    .bun-reseller__key-stat-icon {
        flex-basis: 34px;
        height: 34px;
    }
    .bun-reseller__search {
        width: 100%;
    }
}