.yc365-affiliate-center {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 72px;
    color: var(--text-color);
}

.yc365-affiliate-center * {
    box-sizing: border-box;
}

.yc365-affiliate-hero,
.yc365-affiliate-panel,
.yc365-affiliate-metric {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.yc365-affiliate-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    padding: 28px;
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(171, 199, 255, 0.14), rgba(255, 107, 160, 0.08)),
        var(--surface-color);
}

.yc365-affiliate-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.yc365-affiliate-hero h1,
.yc365-affiliate-panel h2 {
    margin: 0;
    color: var(--text-color);
    line-height: 1.15;
}

.yc365-affiliate-hero h1 {
    font-size: 34px;
}

.yc365-affiliate-hero p,
.yc365-affiliate-panel p {
    margin: 10px 0 0;
    max-width: 660px;
    color: var(--text-muted);
    font-size: 15px;
}

.yc365-affiliate-hero-actions,
.yc365-affiliate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.yc365-affiliate-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.yc365-affiliate-btn:hover,
.yc365-affiliate-btn:focus {
    color: var(--on-secondary-container);
    border-color: var(--outline-color);
    text-decoration: none;
}

.yc365-affiliate-btn.is-primary {
    border-color: transparent;
    background: var(--primary-color);
    color: var(--bg-color);
}

.yc365-affiliate-panel {
    padding: 22px;
}

.yc365-affiliate-split,
.yc365-affiliate-link-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.yc365-affiliate-link-panel {
    align-items: flex-start;
    margin-bottom: 18px;
}

.yc365-affiliate-status {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(171, 199, 255, 0.16);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.yc365-affiliate-status.is-active,
.yc365-affiliate-status.is-approved,
.yc365-affiliate-status.is-confirmed {
    background: rgba(52, 211, 153, 0.14);
    color: #34d399;
}

.yc365-affiliate-copy-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    width: min(520px, 100%);
}

.yc365-affiliate-copy-row input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-text-fill-color: var(--text-color);
    padding: 0 16px;
    font: inherit;
}

.yc365-affiliate-copy-row input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.yc365-affiliate-metrics,
.yc365-affiliate-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.yc365-affiliate-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yc365-affiliate-grid {
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
}

.yc365-affiliate-metric {
    padding: 18px;
}

.yc365-affiliate-metric span,
.yc365-affiliate-metric small {
    display: block;
    color: var(--text-muted);
}

.yc365-affiliate-metric strong {
    display: block;
    margin: 8px 0;
    color: var(--text-color);
    font-size: 24px;
    line-height: 1;
}

.yc365-affiliate-facts {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.yc365-affiliate-facts div,
.yc365-affiliate-queue-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.yc365-affiliate-facts dt {
    color: var(--text-muted);
}

.yc365-affiliate-facts dd {
    margin: 0;
    color: var(--text-color);
    font-weight: 800;
    text-align: right;
}

.yc365-affiliate-empty {
    padding: 14px 0 0;
}

.yc365-affiliate-queue {
    display: grid;
    gap: 2px;
    margin-top: 12px;
}

.yc365-affiliate-queue-row:last-child,
.yc365-affiliate-facts div:last-child {
    border-bottom: 0;
}

.yc365-affiliate-queue-row strong,
.yc365-affiliate-queue-row span,
.yc365-affiliate-queue-row small {
    display: block;
}

.yc365-affiliate-queue-row span,
.yc365-affiliate-queue-row small {
    color: var(--text-muted);
}

.yc365-affiliate-queue-row > div:last-child {
    text-align: right;
}

.yc365-wpam-page #yc-app-content,
.yc-app-content:has(#wpam-reg-form),
.yc-app-content:has(.wpam-login-form) {
    color: var(--text-color);
}

.yc365-wpam-page #yc-app-content {
    padding: 28px clamp(16px, 4vw, 64px) calc(var(--yc-player-height, 84px) + 80px);
}

.yc365-wpam-page #yc-app-content > :not(style):not(script) {
    width: min(980px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.yc365-wpam-page #yc-app-content > ul:first-of-type,
.yc365-wpam-page #yc-app-content .wpam-nav,
.yc365-wpam-page #yc-app-content .wpam-creative-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 auto 20px;
    padding: 0;
    list-style: none;
}

.yc365-wpam-page #yc-app-content > ul:first-of-type li,
.yc365-wpam-page #yc-app-content .wpam-nav li {
    margin: 0;
}

.yc365-wpam-page #yc-app-content > ul:first-of-type a,
.yc365-wpam-page #yc-app-content .wpam-nav a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    font-weight: 800;
    padding: 8px 14px;
    text-decoration: none;
}

.yc365-wpam-page #yc-app-content > ul:first-of-type a:hover,
.yc365-wpam-page #yc-app-content .wpam-nav a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.yc365-wpam-page #yc-app-content h1,
.yc365-wpam-page #yc-app-content h2,
.yc365-wpam-page #yc-app-content h3,
.yc365-wpam-page #yc-app-content h4 {
    color: var(--text-color);
    line-height: 1.15;
    letter-spacing: 0;
}

.yc365-wpam-page #yc-app-content h2,
.yc365-wpam-page #yc-app-content h3 {
    margin: 22px auto 12px;
}

.yc365-wpam-page #yc-app-content p,
.yc365-wpam-page #yc-app-content label,
.yc365-wpam-page #yc-app-content dt,
.yc365-wpam-page #yc-app-content dd {
    color: var(--text-color);
}

.yc365-wpam-page #yc-app-content table {
    width: min(980px, 100%);
    margin: 14px auto 22px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
}

.yc365-wpam-page #yc-app-content th,
.yc365-wpam-page #yc-app-content td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    text-align: left;
    vertical-align: top;
}

.yc365-wpam-page #yc-app-content th {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.yc365-wpam-page #yc-app-content tr:last-child th,
.yc365-wpam-page #yc-app-content tr:last-child td {
    border-bottom: 0;
}

.yc365-wpam-page #yc-app-content input[type="text"],
.yc365-wpam-page #yc-app-content input[type="email"],
.yc365-wpam-page #yc-app-content input[type="password"],
.yc365-wpam-page #yc-app-content input[type="url"],
.yc365-wpam-page #yc-app-content input[type="date"],
.yc365-wpam-page #yc-app-content textarea,
.yc365-wpam-page #yc-app-content select {
    width: min(100%, 520px);
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-text-fill-color: var(--text-color);
    caret-color: var(--primary-color);
    font: inherit;
    padding: 9px 12px;
}

.yc365-wpam-page #yc-app-content textarea {
    min-height: 96px;
}

.yc365-wpam-page #yc-app-content input[type="text"]:focus,
.yc365-wpam-page #yc-app-content input[type="email"]:focus,
.yc365-wpam-page #yc-app-content input[type="password"]:focus,
.yc365-wpam-page #yc-app-content input[type="url"]:focus,
.yc365-wpam-page #yc-app-content input[type="date"]:focus,
.yc365-wpam-page #yc-app-content textarea:focus,
.yc365-wpam-page #yc-app-content select:focus {
    border-color: var(--primary-color);
    outline: 2px solid rgba(171, 199, 255, 0.22);
    outline-offset: 2px;
}

.yc365-wpam-page #yc-app-content input[type="submit"],
.yc365-wpam-page #yc-app-content button,
.yc365-wpam-page #yc-app-content .button,
.yc365-wpam-page #yc-app-content .pure-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--bg-color);
    -webkit-text-fill-color: var(--bg-color);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 18px;
    text-decoration: none;
}

.yc365-wpam-page #yc-app-content a {
    color: var(--primary-color);
    font-weight: 800;
}

.yc365-wpam-page #yc-app-content dl,
.yc365-wpam-page #yc-app-content form,
.yc365-wpam-page #yc-app-content .wpam-account-summary,
.yc365-wpam-page #yc-app-content .wpam-creatives,
.yc365-wpam-page #yc-app-content .wpam-payment-history {
    width: min(980px, 100%);
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
}

.yc365-wpam-page .entry-content,
.yc-app-content #wpam-reg-form,
.yc-app-content .wpam-login-form,
.yc-app-content .wpam_form_errors {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
}

.yc-app-content #wpam-reg-form,
.yc-app-content .wpam-login-form {
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(171, 199, 255, 0.1), rgba(255, 215, 94, 0.08)),
        var(--surface-color);
}

.yc-app-content .wpam_form_errors {
    margin-bottom: 14px;
    color: var(--danger-color);
}

.yc-app-content #wpam-reg-form *,
.yc-app-content .wpam-login-form * {
    box-sizing: border-box;
}

.yc-app-content #wpam-reg-form form,
.yc-app-content .wpam-login-form form {
    display: grid;
    gap: 14px;
    margin: 0;
}

.yc-app-content #wpam-reg-form fieldset,
.yc-app-content .wpam-login-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.yc-app-content #wpam-reg-form legend,
.yc-app-content .wpam-login-form legend {
    margin-bottom: 14px;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.yc-app-content #wpam-reg-form label,
.yc-app-content .wpam-login-form label {
    display: block;
    margin: 0 0 7px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 800;
}

.yc-app-content #wpam-reg-form input[type="text"],
.yc-app-content #wpam-reg-form input[type="email"],
.yc-app-content #wpam-reg-form input[type="password"],
.yc-app-content #wpam-reg-form input[type="url"],
.yc-app-content #wpam-reg-form textarea,
.yc-app-content #wpam-reg-form select,
.yc-app-content .wpam-login-form input[type="text"],
.yc-app-content .wpam-login-form input[type="email"],
.yc-app-content .wpam-login-form input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-text-fill-color: var(--text-color);
    caret-color: var(--primary-color);
    font: inherit;
    padding: 10px 13px;
}

.yc-app-content #wpam-reg-form textarea {
    min-height: 120px;
    resize: vertical;
}

.yc-app-content #wpam-reg-form input:focus,
.yc-app-content #wpam-reg-form textarea:focus,
.yc-app-content #wpam-reg-form select:focus,
.yc-app-content .wpam-login-form input:focus {
    border-color: var(--primary-color);
    outline: 2px solid rgba(171, 199, 255, 0.22);
    outline-offset: 2px;
}

.yc-app-content #wpam-reg-form .pure-control-group,
.yc-app-content #wpam-reg-form p,
.yc-app-content .wpam-login-form p {
    margin: 0;
}

.yc-app-content #wpam-reg-form .pure-button,
.yc-app-content #wpam-reg-form input[type="submit"],
.yc-app-content .wpam-login-form input[type="submit"] {
    display: inline-flex;
    min-height: 48px;
    width: auto;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--bg-color);
    -webkit-text-fill-color: var(--bg-color);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 24px;
}

.yc-app-content #wpam-reg-form a,
.yc-app-content .wpam-login-form a {
    color: var(--primary-color);
    font-weight: 800;
}

.yc-app-content .wpam-lost-password {
    margin-top: 14px;
}

.yc-app-content #termsAgreeWarning {
    color: var(--danger-color);
    font-weight: 800;
}

.yc-app-content #tncDialog {
    max-width: min(100%, 640px);
    color: var(--text-color);
    background: var(--surface-color);
}

@media (max-width: 980px) {
    .yc365-affiliate-hero,
    .yc365-affiliate-split,
    .yc365-affiliate-link-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .yc365-affiliate-metrics,
    .yc365-affiliate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .yc365-affiliate-copy-row {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .yc365-affiliate-center {
        width: min(100% - 20px, 1180px);
        padding: 18px 0 48px;
    }

    .yc365-affiliate-hero,
    .yc365-affiliate-panel {
        padding: 18px;
    }

    .yc365-affiliate-hero h1 {
        font-size: 28px;
    }

    .yc365-affiliate-hero-actions,
    .yc365-affiliate-actions,
    .yc365-affiliate-copy-row,
    .yc365-affiliate-metrics,
    .yc365-affiliate-grid {
        grid-template-columns: 1fr;
    }

    .yc365-affiliate-btn {
        width: 100%;
    }

    .yc365-affiliate-facts div,
    .yc365-affiliate-queue-row {
        display: grid;
        gap: 4px;
    }

    .yc365-affiliate-facts dd,
    .yc365-affiliate-queue-row > div:last-child {
        text-align: left;
    }

    .yc365-wpam-page .entry-content,
    .yc-app-content #wpam-reg-form,
    .yc-app-content .wpam-login-form,
    .yc-app-content .wpam_form_errors {
        width: min(100% - 20px, 760px);
    }

    .yc-app-content #wpam-reg-form,
    .yc-app-content .wpam-login-form {
        padding: 18px;
    }

    .yc365-wpam-page #yc-app-content {
        padding: 18px 10px calc(var(--yc-player-height, 84px) + var(--yc-mobile-footer, 68px) + 34px);
    }

    .yc365-wpam-page #yc-app-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .yc365-wpam-page #yc-app-content > ul:first-of-type a,
    .yc365-wpam-page #yc-app-content .wpam-nav a {
        width: 100%;
    }

    .yc365-wpam-page #yc-app-content > ul:first-of-type,
    .yc365-wpam-page #yc-app-content .wpam-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .yc-app-content #wpam-reg-form input[type="submit"],
    .yc-app-content .wpam-login-form input[type="submit"] {
        width: 100%;
    }
}
