/*
 * WP Mike Affiliates: partner portal branding.
 * Static file, no build step. Loaded only by the portal panel (PortalPanelProvider, head.end hook),
 * every rule is scoped to .fi-panel-portal so the admin panel stays untouched.
 */

@font-face {
    font-family: "Manrope";
    src: url("../fonts/portal/manrope.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/portal/space-grotesk.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

.fi-panel-portal {
    --wpm-bg: #F6F6FB;
    --wpm-surface: #FFFFFF;
    --wpm-ink: #12111F;
    --wpm-ink-soft: #3A3950;
    --wpm-muted: #5C5B70;
    --wpm-line: #E3E2EE;
    --wpm-primary: #5B3DF5;
    --wpm-primary-hover: #4A2EE0;
    --wpm-primary-ink: #3B23C4;
    --wpm-primary-soft: #ECE8FF;
    --wpm-accent: #D9FF5B;
    --wpm-night: #0D0B1F;
    --wpm-night-text: #CFCCE6;
    --wpm-night-muted: #A9A5CC;
    --wpm-display: "Space Grotesk", "Manrope", system-ui, sans-serif;

    /* Filament derives its palette from the brand colour; pin the shades it uses for buttons and focus. */
    --primary-600: #5B3DF5;
    --primary-700: #4A2EE0;

    background: var(--wpm-bg);
    color: var(--wpm-ink);
}

/* ---------- Filament chrome ---------- */

.fi-panel-portal .fi-topbar {
    box-shadow: none;
    border-bottom: 1px solid var(--wpm-line);
}

.fi-panel-portal .fi-topbar-item-btn {
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 999px;
}

.fi-panel-portal .fi-topbar-item-btn > .fi-icon {
    display: none;
}

.fi-panel-portal .fi-topbar-item-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--wpm-ink-soft);
}

.fi-panel-portal .fi-topbar-item.fi-active .fi-topbar-item-btn {
    background: var(--wpm-primary-soft);
}

.fi-panel-portal .fi-topbar-item.fi-active .fi-topbar-item-label {
    color: var(--wpm-primary-ink);
}

.fi-panel-portal .fi-btn {
    min-height: 44px;
    padding-inline: 20px;
    border-radius: 999px;
    font-weight: 800;
}

.fi-panel-portal .fi-btn.fi-color-primary {
    background: var(--wpm-primary);
    color: #FFFFFF;
}

.fi-panel-portal .fi-btn.fi-color-primary:hover {
    background: var(--wpm-primary-hover);
}

.fi-panel-portal .fi-section:not(.fi-section-not-contained):not(.fi-aside),
.fi-panel-portal .fi-ta-ctn {
    border-radius: 18px;
    box-shadow: none;
    border: 1px solid var(--wpm-line);
}

.fi-panel-portal .fi-header-heading,
.fi-panel-portal .fi-simple-header-heading,
.fi-panel-portal .fi-section-header-heading {
    font-family: var(--wpm-display);
    letter-spacing: -0.02em;
}

.fi-panel-portal .fi-input-wrp {
    min-height: 46px;
    align-items: center;
    border-radius: 12px;
    background: var(--wpm-bg);
    box-shadow: inset 0 0 0 1.5px var(--wpm-line);
}

.fi-panel-portal .fi-input-wrp:not(.fi-disabled):focus-within {
    box-shadow: inset 0 0 0 2px var(--wpm-primary);
}

.fi-panel-portal .fi-fo-field .fi-fo-field-label-content {
    font-weight: 700;
}

.fi-panel-portal .fi-link {
    color: var(--wpm-primary);
    font-weight: 700;
}

.fi-panel-portal .fi-simple-main {
    border-radius: 22px;
}

.fi-panel-portal .fi-simple-header-subheading {
    color: var(--wpm-muted);
}

/* ---------- Shared pieces ---------- */

.wpm-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.wpm-logo img {
    width: 30px;
    height: 30px;
}

.wpm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.wpm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.wpm-btn:focus-visible,
.wpm-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.wpm-btn-primary {
    background: var(--wpm-primary);
    color: #FFFFFF;
}

.wpm-btn-primary:hover {
    background: var(--wpm-primary-hover);
}

.wpm-btn-accent {
    min-height: 48px;
    padding: 0 24px;
    background: var(--wpm-accent);
    color: var(--wpm-ink);
}

.wpm-btn-ghost-light {
    padding: 0 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-weight: 700;
}

.wpm-btn-ghost-light:hover {
    border-color: #FFFFFF;
}

.wpm-chip {
    display: inline-block;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--wpm-accent);
    color: var(--wpm-ink);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.wpm-link {
    color: var(--wpm-primary);
    font-weight: 800;
    text-decoration: none;
}

.wpm-link:hover {
    color: var(--wpm-primary-hover);
    text-decoration: underline;
}

.wpm-muted {
    margin: 0;
    color: var(--wpm-muted);
    font-size: 15px;
}

.wpm-strong {
    font-weight: 800;
}

.wpm-program-logo {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: #FFFFFF;
    color: var(--wpm-ink);
    font-weight: 800;
}

.wpm-program-logo img {
    height: 26px;
    width: auto;
    max-width: 220px;
}

.wpm-form-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.wpm-form-stack > * {
    width: 100%;
}

.wpm-form-stack > .fi-btn {
    width: auto;
}

.wpm-notice {
    border-color: var(--wpm-primary);
    align-items: flex-start;
}

.wpm-missing {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
    font-size: 15px;
}

/* ---------- Registration page ---------- */

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) {
    display: grid;
    grid-template-columns: minmax(5%, 1fr) minmax(0, 700px) minmax(0, 480px) minmax(5%, 1fr);
    grid-template-rows: auto auto 1fr;
    align-items: start;
    min-height: 100dvh;
}

.wpm-reg-bg {
    grid-column: 1 / -1;
    grid-row: 1 / 3;
    align-self: stretch;
    background:
        radial-gradient(900px 600px at 85% -10%, rgba(91, 61, 245, 0.55), rgba(91, 61, 245, 0) 70%),
        radial-gradient(500px 360px at 10% 110%, rgba(217, 255, 91, 0.14), rgba(217, 255, 91, 0) 70%),
        var(--wpm-night);
}

.wpm-reg-header {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.wpm-reg-intro {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
    padding: 64px 48px 120px 0;
    color: #FFFFFF;
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-main-ctn {
    grid-column: 3;
    grid-row: 2;
    display: block;
    padding: 64px 0 120px;
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 30px;
    border-radius: 22px;
    background: var(--wpm-surface);
    box-shadow: 0 30px 80px rgba(13, 11, 31, 0.45);
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-header {
    align-items: flex-start;
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-header-heading {
    font-size: 26px;
    text-align: start;
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-header-subheading {
    text-align: start;
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-btn[type="submit"] {
    min-height: 52px;
    font-size: 17px;
}

.fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-fo-field-label-content a {
    color: var(--wpm-primary);
    font-weight: 700;
    text-decoration: underline;
}

.wpm-eyebrow {
    margin: 0;
    color: var(--wpm-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wpm-reg-title {
    margin: 0;
    font-family: var(--wpm-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.wpm-reg-title span {
    color: var(--wpm-night-muted);
}

.wpm-reg-lead {
    margin: 0;
    color: var(--wpm-night-text);
    font-size: 18px;
    line-height: 1.6;
}

.wpm-reg-note {
    margin: 0;
    color: var(--wpm-night-muted);
    font-size: 14px;
}

.wpm-program {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.wpm-program-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wpm-program-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.wpm-program-text {
    margin: 0;
    color: var(--wpm-night-text);
    line-height: 1.6;
}

.wpm-terms {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr);
    gap: 14px 10px;
    margin: 0;
}

.wpm-terms dt {
    color: var(--wpm-night-muted);
    font-size: 13px;
}

.wpm-terms dd {
    margin: 4px 0 0;
    font-family: var(--wpm-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.wpm-terms small {
    display: block;
    margin-top: 2px;
    color: var(--wpm-night-muted);
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.wpm-reg-steps {
    grid-column: 2 / 4;
    grid-row: 3;
    margin-top: -64px;
    padding-bottom: 64px;
}

.wpm-reg-steps ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpm-reg-steps li {
    padding: 22px;
    border: 1px solid var(--wpm-line);
    border-radius: 18px;
    background: var(--wpm-surface);
}

.wpm-reg-steps li span {
    display: block;
    margin-bottom: 8px;
    color: var(--wpm-primary);
    font-family: var(--wpm-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.wpm-reg-steps li strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
}

.wpm-reg-steps li p {
    margin: 0;
    color: var(--wpm-muted);
    font-size: 15px;
}

@media (max-width: 960px) {
    .fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) {
        grid-template-columns: 5% minmax(0, 1fr) 5%;
        grid-template-rows: auto;
    }

    .wpm-reg-bg {
        grid-row: 1 / 4;
    }

    .wpm-reg-intro {
        padding: 40px 0 32px;
    }

    .fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-main-ctn {
        grid-column: 2;
        grid-row: 3;
        padding: 0 0 104px;
    }

    .fi-panel-portal .fi-simple-layout:has(.wpm-reg-intro) .fi-simple-main {
        padding: 22px;
    }

    .wpm-reg-steps {
        grid-column: 2;
        grid-row: 4;
    }

    .wpm-reg-steps ol {
        grid-template-columns: minmax(0, 1fr);
    }

    .wpm-terms {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Dashboard ---------- */

.wpm-dash {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wpm-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px;
    border-radius: 24px;
    background:
        radial-gradient(700px 420px at 95% -20%, rgba(91, 61, 245, 0.6), rgba(91, 61, 245, 0) 70%),
        radial-gradient(420px 300px at 0% 120%, rgba(217, 255, 91, 0.14), rgba(217, 255, 91, 0) 70%),
        var(--wpm-night);
    color: #FFFFFF;
}

.wpm-hero-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.wpm-hero-title {
    margin: 0;
    font-family: var(--wpm-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.wpm-hero-text {
    max-width: 62ch;
    margin: 0;
    color: var(--wpm-night-text);
    font-size: 17px;
    line-height: 1.6;
}

.wpm-hero-note {
    margin: 0;
    color: var(--wpm-night-muted);
    font-size: 14px;
}

.wpm-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.wpm-share-heading {
    margin: 0;
    font-family: var(--wpm-display);
    font-size: 18px;
    font-weight: 600;
}

.wpm-share-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpm-share > div {
    flex: 999 1 380px;
    min-width: 0;
}

.wpm-share-url {
    margin: 0;
    font-family: var(--wpm-display);
    font-size: 20px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wpm-share-terms {
    margin: 4px 0 0;
    color: var(--wpm-night-text);
    font-size: 14px;
    line-height: 1.5;
}

.wpm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.wpm-stat,
.wpm-card {
    padding: 20px;
    border: 1px solid var(--wpm-line);
    border-radius: 18px;
    background: var(--wpm-surface);
}

.wpm-stat-label {
    margin: 0;
    color: var(--wpm-muted);
    font-size: 14px;
}

.wpm-stat-value {
    margin: 6px 0 0;
    font-family: var(--wpm-display);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.wpm-stat-note {
    margin: 2px 0 0;
    color: var(--wpm-muted);
    font-size: 13px;
}

.wpm-stat-primary {
    border-color: var(--wpm-primary);
    background: var(--wpm-primary);
    color: #FFFFFF;
}

.wpm-stat-primary .wpm-stat-label,
.wpm-stat-primary .wpm-stat-note {
    color: #FFFFFF;
}

.wpm-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpm-card-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wpm-card-row > div {
    flex: 999 1 300px;
    min-width: 0;
}

.wpm-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wpm-card-heading {
    margin: 0;
    font-family: var(--wpm-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.wpm-card-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
}

.wpm-table-wrap {
    overflow-x: auto;
}

.wpm-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 15px;
}

.wpm-table th {
    padding: 10px 8px;
    border-bottom: 1px solid var(--wpm-line);
    color: var(--wpm-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: start;
}

.wpm-table td {
    padding: 14px 8px;
    border-bottom: 1px solid #EFEEF6;
}

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

.wpm-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #EFEEF6;
    color: var(--wpm-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.wpm-pill-pending {
    background: var(--wpm-primary-soft);
    color: var(--wpm-primary-ink);
}

.wpm-pill-approved {
    background: var(--wpm-accent);
    color: var(--wpm-ink);
}

.wpm-pill-paid {
    background: #DDF3E4;
    color: #14532D;
}
