/*
 * Teyo Player reseller portal.
 * Same brand tokens as the rest of the site; a violet accent marks this as the
 * partner area rather than the owner's admin panel.
 */

.reseller-body {
    --reseller-accent: #8b7cf6;
    --reseller-accent-soft: rgba(139, 124, 246, 0.14);
    margin: 0;
}

.reseller-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

/* Sidebar --------------------------------------------------------------- */

.reseller-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.reseller-nav-close,
.reseller-nav-backdrop {
    display: none;
}

.reseller-sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 18px;
    background: var(--background-soft);
    border-right: 1px solid var(--border);
}

.reseller-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}
.reseller-brand strong { display: block; font-size: 14px; letter-spacing: 0.07em; font-weight: 850; }
.reseller-brand small { display: block; color: var(--reseller-accent); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; font-weight: 700; }

.balance-chip {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--reseller-accent-soft);
    border: 1px solid rgba(139, 124, 246, 0.35);
}
.balance-chip span { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.balance-chip strong { display: block; margin-top: 4px; font-size: 28px; font-weight: 800; line-height: 1; }
.balance-chip.is-low { background: rgba(255, 209, 109, 0.12); border-color: rgba(255, 209, 109, 0.4); }
.balance-chip.is-low strong { color: var(--warning); }

.reseller-sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.reseller-sidebar nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 13px; border-radius: 10px;
    color: var(--muted); text-decoration: none;
    font-size: 14px; font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.reseller-sidebar nav a svg { width: 19px; height: 19px; flex: 0 0 19px; }
.reseller-sidebar nav a:hover { background: var(--panel); color: var(--text); }
.reseller-sidebar nav a.active { background: var(--reseller-accent-soft); color: var(--text); }

.reseller-user { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; }
.reseller-user span { display: block; font-weight: 700; }
.reseller-user small { display: block; color: var(--muted); margin-bottom: 8px; }
.reseller-user a { color: var(--muted); font-size: 13px; }
.reseller-user a:hover { color: var(--danger); }

/* Main ------------------------------------------------------------------ */

.reseller-main { padding: 24px 28px 64px; min-width: 0; }

.reseller-topbar {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 26px; flex-wrap: wrap;
}
.reseller-topbar h1 { margin: 4px 0 0; font-size: 26px; }
.reseller-topbar > a { margin-left: auto; }

.nav-toggle, .nav-button { display: none; }

/* Stats ----------------------------------------------------------------- */

.stat-grid {
    display: grid; gap: 14px; margin-bottom: 22px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.stat-card {
    padding: 20px; border: 1px solid var(--border);
    border-radius: 16px; background: var(--panel);
}
.stat-card span { display: block; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.stat-card strong { display: block; margin: 8px 0 4px; font-size: 30px; font-weight: 800; line-height: 1; }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-card.is-primary { border-color: var(--reseller-accent); background: var(--reseller-accent-soft); }

.reseller-columns {
    display: grid; gap: 16px; margin-bottom: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.announcement { display: flex; flex-direction: column; gap: 4px; }
.announcement strong { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Account list ---------------------------------------------------------- */

.account-list { margin: 0; display: grid; gap: 10px; }
.account-list > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.account-list dt { color: var(--muted); font-size: 13px; }
.account-list dd { margin: 0; font-weight: 650; font-size: 14px; text-align: right; }

.mini-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mini-log li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.mini-log small { color: var(--muted); margin-left: auto; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.status-dot.ok { background: var(--success); }
.status-dot.bad { background: var(--danger); }

.text-link { display: inline-block; margin-top: 12px; color: var(--reseller-accent); font-size: 13px; }

/* Ledger ---------------------------------------------------------------- */

.ledger-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ledger-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ledger-list li:last-child { border-bottom: 0; }
.ledger-amount { flex: 0 0 62px; text-align: right; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.ledger-amount.is-credit { color: var(--success); }
.ledger-amount.is-debit { color: var(--muted); }
.ledger-body strong { display: block; font-size: 14px; }
.ledger-body small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Confirmation ---------------------------------------------------------- */

.confirm-summary {
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--background-soft); padding: 4px 18px; margin-bottom: 20px;
}
.confirm-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.confirm-row:last-child { border-bottom: 0; }
.confirm-row > span { color: var(--muted); font-size: 13px; }
.confirm-row strong { text-align: right; font-size: 15px; }
.confirm-row strong small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
.confirm-row.is-cost strong { color: var(--reseller-accent); font-size: 22px; font-weight: 800; }

.confirm-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.confirm-form .primary-button { flex: 1 1 260px; }

.receipt-list { display: grid; gap: 0; margin: 0 0 20px; }
.receipt-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.receipt-list > div:last-child { border-bottom: 0; }
.receipt-list dt { color: var(--muted); font-size: 13px; }
.receipt-list dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }

button[data-submit-once][disabled] { opacity: 0.6; cursor: progress; }

/* Responsive ------------------------------------------------------------ */

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

    .reseller-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 39;
        display: block;
        background: rgba(2, 8, 16, 0.68);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .reseller-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(300px, 86vw);
        z-index: 40;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 18px 0 48px rgba(0, 0, 0, 0.36);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .nav-toggle:checked ~ .reseller-nav-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-toggle:checked ~ .reseller-sidebar { transform: translateX(0); }

    .reseller-nav-close {
        display: grid;
        place-items: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.035);
        color: var(--text);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .reseller-nav-close:hover,
    .reseller-nav-close:focus-visible {
        color: var(--reseller-accent);
        border-color: rgba(139, 124, 246, 0.55);
        background: var(--reseller-accent-soft);
        outline: none;
    }

    .reseller-nav-close svg { width: 21px; height: 21px; }

    .nav-button {
        display: grid; place-items: center;
        width: 42px; height: 42px; border-radius: 10px;
        border: 1px solid var(--border); background: var(--panel);
        color: var(--text); cursor: pointer;
    }
    .nav-button svg { width: 20px; height: 20px; }
    .reseller-main { padding: 18px 16px 56px; }
    .reseller-topbar > a { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .confirm-form .primary-button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .reseller-sidebar, .reseller-sidebar nav a, .reseller-nav-backdrop { transition: none; }
}

/* Print-friendly receipts ------------------------------------------------ */

@media print {
    .reseller-sidebar, .reseller-topbar, .table-actions, .nav-button, .reseller-nav-backdrop, .reseller-nav-close { display: none !important; }
    .reseller-layout { display: block; }
    .reseller-main { padding: 0; }
    body { background: #fff; color: #000; }
    .panel-card { border: 1px solid #ccc; box-shadow: none; }
}

/* Shared table helpers used by both portals -------------------------------- */

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-bar input, .filter-bar select { flex: 1 1 180px; min-width: 0; }
.filter-bar button { flex: 0 0 auto; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pagination a {
    min-width: 36px; padding: 7px 10px; text-align: center;
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--muted); text-decoration: none; font-size: 13px;
}
.pagination a:hover { color: var(--text); border-color: var(--reseller-accent); }
.pagination a.active { background: var(--reseller-accent-soft); color: var(--text); border-color: var(--reseller-accent); }

.amount-credit { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-debit { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }

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

/* v0.17.0 partner features ---------------------------------------------- */

/* Tier badges are deliberately distinct at a glance. */
.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 10px;
    border: 1px solid rgba(166, 180, 198, 0.24);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(166, 180, 198, 0.08);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.tier-badge.tier-starter {
    color: #b9c8da;
    border-color: rgba(185, 200, 218, 0.28);
    background: rgba(185, 200, 218, 0.08);
}

.tier-badge.tier-standard {
    color: #67c7ff;
    border-color: rgba(103, 199, 255, 0.34);
    background: rgba(103, 199, 255, 0.1);
}

.tier-badge.tier-pro {
    color: #c7b8ff;
    border-color: rgba(139, 124, 246, 0.45);
    background: rgba(139, 124, 246, 0.14);
    box-shadow: 0 0 22px rgba(139, 124, 246, 0.08);
}

.tier-badge.tier-distributor {
    color: #ffd16d;
    border-color: rgba(255, 209, 109, 0.42);
    background: rgba(255, 209, 109, 0.11);
    box-shadow: 0 0 22px rgba(255, 209, 109, 0.07);
}

.reseller-user small .tier-badge {
    margin-top: 6px;
    margin-bottom: 8px;
}

/* A real, persistent sign-out control rather than a text link. */
.reseller-user .signout-button {
    width: 100%;
    min-height: 41px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 12px;
    color: #ffd8dc;
    border: 1px solid rgba(255, 125, 138, 0.32);
    border-radius: 10px;
    background: rgba(255, 125, 138, 0.08);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.reseller-user .signout-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.reseller-user .signout-button:hover {
    color: #fff;
    border-color: rgba(255, 125, 138, 0.58);
    background: rgba(255, 125, 138, 0.16);
    transform: translateY(-1px);
}

/* Sub-reseller and credit-request actions. */
.request-decision-form {
    min-width: 230px;
    display: grid;
    gap: 8px;
}

.request-decision-form .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.inline-transfer-form,
.inline-status-form {
    min-width: 170px;
    display: grid;
    gap: 7px;
}

.inline-transfer-form input,
.inline-status-form select,
.request-decision-form input {
    width: 100%;
    min-width: 0;
}

.inline-transfer-form button,
.inline-status-form button {
    width: 100%;
}

/* API key and hostname tools. */
.api-secret-card {
    border-color: rgba(255, 209, 109, 0.4);
    background: rgba(255, 209, 109, 0.06);
}

.api-token {
    padding: 16px;
    border: 1px dashed rgba(255, 209, 109, 0.4);
    border-radius: 12px;
    background: rgba(7, 17, 31, 0.55);
    overflow-x: auto;
}

.api-token code {
    color: #ffe29a;
    user-select: all;
    overflow-wrap: anywhere;
}

.hostname-tool-card {
    border-color: rgba(139, 124, 246, 0.34);
}

.hostname-tool-card .confirm-summary {
    margin-top: 16px;
}

/* Tables can contain several controls; keep them usable on narrow screens. */
.panel-table td form {
    margin: 0;
}

@media (max-width: 900px) {
    .reseller-user .signout-button { min-height: 44px; }
}

@media (max-width: 640px) {
    .request-decision-form,
    .inline-transfer-form,
    .inline-status-form { min-width: 150px; }
}

/* v0.17.3 — reseller permission controls --------------------------------- */
/*
 * The reseller portal does not load teyo-panel.css, where switch-row was
 * originally styled. Without these rules the generic input styles turn each
 * checkbox into a large text-field-sized square and the title/help text runs
 * together on one line.
 */
.switch-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 66px;
    padding: 15px 16px;
    border: 1px solid rgba(166, 180, 198, 0.16);
    border-radius: 12px;
    background: rgba(7, 17, 31, 0.42);
    cursor: pointer;
}

.switch-row:hover:not(.is-disabled) {
    border-color: rgba(37, 215, 169, 0.34);
    background: rgba(37, 215, 169, 0.045);
}

.switch-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    accent-color: var(--reseller-accent);
    cursor: pointer;
}

.switch-row > span {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.switch-row > span strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 760;
    line-height: 1.35;
}

.switch-row > span small {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}

.switch-row.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.switch-row.is-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

@media (max-width: 560px) {
    .switch-row {
        min-height: 62px;
        padding: 13px 14px;
    }
}

/* v0.17.4 — mobile device list ----------------------------------------- */

.table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.devices-table {
    min-width: 760px;
}

@media (max-width: 700px) {
    .devices-table {
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
        white-space: normal;
    }

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

    .devices-table tbody {
        display: grid;
        gap: 12px;
    }

    .devices-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        padding: 14px 15px;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--background-soft);
    }

    .devices-table tbody td {
        max-width: none;
        min-width: 0;
        display: block;
        padding: 10px 0;
        overflow-wrap: anywhere;
        border-bottom: 1px solid var(--border);
        white-space: normal;
    }

    .devices-table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--muted);
        font-size: 9px;
        font-weight: 850;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    .devices-table tbody td:first-child,
    .devices-table tbody td:last-child {
        grid-column: 1 / -1;
    }

    .devices-table tbody td:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .devices-table code {
        display: block;
        max-width: 100%;
        font-size: 13px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .devices-table .status-badge {
        max-width: 100%;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
    }

    .devices-table .row-actions {
        width: 100%;
        align-items: stretch;
    }

    .devices-table .row-actions > a,
    .devices-table .row-actions > form {
        flex: 1 1 auto;
    }

    .devices-table .row-actions > a,
    .devices-table .row-actions button {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .devices-table .row-actions form {
        max-width: 100%;
    }

    .devices-table .row-actions .confirm-mac-input {
        width: 100%;
        max-width: none;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .devices-table tbody tr {
        grid-template-columns: 1fr;
    }

    .devices-table tbody td,
    .devices-table tbody td:first-child,
    .devices-table tbody td:last-child {
        grid-column: auto;
    }

    .devices-table tbody td:nth-last-child(2) {
        border-bottom: 1px solid var(--border);
    }

    .devices-table tbody td:last-child {
        border-bottom: 0;
    }

    .filter-bar input {
        flex-basis: 100%;
    }
}

/* v0.17.5 — notification center ----------------------------------------- */
.reseller-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reseller-topbar-actions .secondary-button {
    width: auto;
    flex: 0 0 auto;
}

.notification-bell {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(7, 17, 31, 0.52);
    text-decoration: none;
}

.notification-bell:hover {
    color: var(--text);
    border-color: rgba(139, 124, 246, 0.5);
    background: rgba(139, 124, 246, 0.1);
}

.notification-bell svg { width: 20px; height: 20px; }

.notification-bell > span {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    color: #08111e;
    border: 2px solid #07111f;
    border-radius: 999px;
    background: var(--warning);
    font-size: 9px;
    font-weight: 900;
}

.reseller-sidebar nav a .nav-count {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 6px;
    color: #08111e;
    border-radius: 999px;
    background: var(--warning);
    font-size: 9px;
    font-weight: 900;
}

.notification-filter-bar { align-items: center; }
.notification-mark-all { margin-left: auto; }
.notification-mark-all .secondary-button { width: auto; }
.notification-center-card { overflow: hidden; }
.notification-list { display: grid; gap: 10px; }

.notification-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--background-soft);
}

.notification-item.is-unread {
    border-color: rgba(139, 124, 246, 0.45);
    background: rgba(139, 124, 246, 0.07);
}

.notification-item.is-read { opacity: .72; }
.notification-status-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: #67c7ff;
    box-shadow: 0 0 0 4px rgba(103, 199, 255, .1);
}
.notification-success .notification-status-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(37, 215, 169, .1); }
.notification-warning .notification-status-dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(255, 209, 109, .1); }
.notification-danger .notification-status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 125, 138, .1); }
.notification-copy { min-width: 0; }
.notification-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.notification-title-row h3 { margin: 0; font-size: 14px; }
.notification-new {
    padding: 3px 6px;
    color: #07111f;
    border-radius: 999px;
    background: var(--reseller-accent);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
}
.notification-copy p { margin: 5px 0 7px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.notification-copy small { color: var(--muted); font-size: 10px; }
.notification-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.notification-actions form { margin: 0; }
.notification-delete {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}
.notification-delete:hover { color: var(--danger); border-color: rgba(255, 125, 138, .38); background: rgba(255, 125, 138, .08); }

@media (max-width: 900px) {
    .reseller-topbar-actions {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
    }
    .reseller-topbar-actions .secondary-button { flex: 1 1 auto; }
}

@media (max-width: 700px) {
    .notification-item { grid-template-columns: 12px minmax(0, 1fr); }
    .notification-actions { grid-column: 2; justify-content: flex-start; }
    .notification-mark-all { width: 100%; margin-left: 0; }
    .notification-mark-all .secondary-button { width: 100%; }
}

/* v0.18.7 — compact professional activation plan selector -----------------------
 * v0.18.2 accidentally replaced the reseller stylesheet with a version
 * that did not include these rules. Without them, the radio inputs remain
 * screen-reader-only and the option content collapses into one text line.
 */
.activation-plan-picker {
    min-width: 0;
    margin: 18px 0 22px;
    padding: 0;
    border: 0;
}

.activation-plan-picker > legend {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: var(--text, #f6f8fc);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.3;
}

.activation-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.activation-plan-choice {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.activation-plan-choice > input.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.activation-plan-card {
    position: relative;
    box-sizing: border-box;
    display: flex;
    min-height: 118px;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 17px;
    overflow: hidden;
    border: 1px solid var(--border, #29435f);
    border-radius: 15px;
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 177, 0.13), transparent 45%),
        var(--background-soft, #0a192a);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    transition: transform 160ms ease, border-color 160ms ease,
        box-shadow 160ms ease, background 160ms ease;
}

.activation-plan-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: transparent;
    transition: background 160ms ease;
}

.activation-plan-card.is-lifetime {
    background:
        radial-gradient(circle at 100% 0%, rgba(139, 124, 246, 0.21), transparent 48%),
        var(--background-soft, #0a192a);
}

.activation-plan-choice:hover .activation-plan-card {
    transform: translateY(-2px);
    border-color: rgba(45, 212, 177, 0.5);
}

.activation-plan-choice > input:focus-visible + .activation-plan-card {
    outline: 3px solid rgba(45, 212, 177, 0.25);
    outline-offset: 3px;
}

.activation-plan-choice > input:checked + .activation-plan-card {
    border-color: var(--accent, #2dd4b1);
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 177, 0.24), transparent 50%),
        rgba(45, 212, 177, 0.06);
    box-shadow: 0 0 0 1px rgba(45, 212, 177, 0.26),
        0 12px 28px rgba(0, 0, 0, 0.18);
}

.activation-plan-choice > input:checked + .activation-plan-card::before {
    background: var(--accent, #2dd4b1);
}

.activation-plan-choice > input:checked + .activation-plan-card.is-lifetime {
    border-color: var(--reseller-accent, #8b7cf6);
    background:
        radial-gradient(circle at 100% 0%, rgba(139, 124, 246, 0.3), transparent 50%),
        rgba(139, 124, 246, 0.08);
    box-shadow: 0 0 0 1px rgba(139, 124, 246, 0.28),
        0 12px 28px rgba(0, 0, 0, 0.18);
}

.activation-plan-choice > input:checked + .activation-plan-card.is-lifetime::before {
    background: var(--reseller-accent, #8b7cf6);
}

.activation-plan-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.activation-plan-card-top > span:first-child {
    display: block;
    min-width: 0;
}

.activation-plan-card-top > span:first-child small,
.activation-cost-copy small,
.activation-cost-balance small {
    display: block;
    color: var(--muted, #91a2b8);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.11em;
    line-height: 1.2;
}

.activation-plan-card-top > span:first-child strong {
    display: block;
    margin-top: 4px;
    color: var(--text, #f6f8fc);
    font-size: clamp(18px, 1.7vw, 22px);
    font-weight: 850;
    line-height: 1.12;
}

.activation-plan-price {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid rgba(45, 212, 177, 0.34);
    border-radius: 999px;
    color: var(--accent, #2dd4b1);
    background: rgba(45, 212, 177, 0.1);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.activation-plan-card.is-lifetime .activation-plan-price {
    color: #c9bdff;
    border-color: rgba(139, 124, 246, 0.46);
    background: rgba(139, 124, 246, 0.15);
}

.activation-plan-price b {
    font-size: 17px;
    line-height: 1;
}

.activation-plan-description {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 38rem;
    padding-right: 30px;
    color: var(--muted, #91a2b8);
    font-size: 12px;
    line-height: 1.55;
}

.activation-plan-selected {
    position: absolute;
    right: 13px;
    bottom: 13px;
    z-index: 2;
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border-radius: 50%;
    color: #041510;
    background: var(--accent, #2dd4b1);
    font-size: 13px;
    font-weight: 950;
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 150ms ease, transform 150ms ease;
}

.activation-plan-choice > input:checked + .activation-plan-card .activation-plan-selected {
    opacity: 1;
    transform: scale(1);
}

.activation-plan-choice > input:checked + .activation-plan-card.is-lifetime .activation-plan-selected {
    color: #0b071b;
    background: #ad9cff;
}

.activation-cost-preview {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 13px 15px;
    border: 1px solid rgba(45, 212, 177, 0.3);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(45, 212, 177, 0.1), rgba(139, 124, 246, 0.08));
}

.activation-cost-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #031612;
    background: var(--accent, #2dd4b1);
    font-size: 17px;
    font-weight: 950;
    box-shadow: 0 10px 26px rgba(45, 212, 177, 0.2);
}

.activation-cost-copy,
.activation-cost-balance {
    display: block;
    min-width: 0;
}

.activation-cost-copy strong,
.activation-cost-balance strong {
    display: block;
    margin-top: 4px;
    color: var(--text, #f6f8fc);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.2;
}

.activation-cost-copy > span {
    display: block;
    margin-top: 4px;
    color: var(--muted, #91a2b8);
    font-size: 12px;
    line-height: 1.4;
}

.activation-cost-balance {
    min-width: 100px;
    padding-left: 14px;
    border-left: 1px solid var(--border, #29435f);
    text-align: right;
}

.field-grid.mac-only-grid {
    grid-template-columns: minmax(0, 1fr);
}

.field-grid.mac-only-grid > label {
    width: 100%;
}

@media (max-width: 760px) {
    .activation-plan-grid {
        grid-template-columns: 1fr;
    }

    .activation-plan-card {
        min-height: 112px;
        padding: 15px;
    }
}

@media (max-width: 560px) {
    .activation-plan-card-top {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .activation-plan-price {
        align-self: flex-start;
    }

    .activation-cost-preview {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 15px;
    }

    .activation-cost-balance {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        padding: 13px 0 0;
        border-top: 1px solid var(--border, #29435f);
        border-left: 0;
        text-align: left;
    }

    .activation-cost-balance strong {
        margin-top: 0;
    }
}
