.affiliate-layout { background: #f3f6fb; }
.affiliate-registration-page { display: block; }
.affiliate-registration-page .admin-shell { width: min(1080px, calc(100% - 32px)); max-width: 1080px; margin: 0 auto; }
.affiliate-registration-page .affiliate-public-registration { padding: 28px; }
.affiliate-registration-trap { position: fixed !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.affiliate-sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; padding: 28px 20px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
.affiliate-nav-label { margin: 14px 0 -12px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.affiliate-sidebar nav { display: grid; gap: 6px; }
.affiliate-sidebar nav a { padding: 12px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 650; color: #52657e; }
.affiliate-sidebar nav a:hover, .affiliate-sidebar nav a[aria-current] { color: #185adb; background: #edf4ff; }
.affiliate-sidebar-note { margin-top: auto; padding: 16px; border-radius: 12px; background: #f0f5ff; font-size: 12px; }
.affiliate-sidebar-note p { color: var(--muted); margin: 6px 0 0; }
.affiliate-shell { max-width: 1800px; margin-left: 250px; padding: 32px 36px; min-width: 0; }
.affiliate-shell .admin-header { gap: 20px; }
.affiliate-header-identity { min-width: 0; display: flex; align-items: center; gap: 18px; }
.affiliate-header-identity > div { min-width: 0; }
.affiliate-header-avatar { flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: linear-gradient(135deg, #185adb, #7541c1); box-shadow: 0 4px 16px #183e6b24; color: #fff; text-decoration: none; font-size: 25px; font-weight: 800; }
.affiliate-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.affiliate-header-avatar:hover { border-color: #c9dcf9; transform: translateY(-1px); }
.affiliate-shell .panel { padding: 24px; min-width: 0; }
.affiliate-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.affiliate-metric { padding: 22px; background: #fff; border: 1px solid var(--line); border-top: 3px solid #185adb; border-radius: 14px; display: grid; gap: 10px; }
.affiliate-metric > span { font-size: 12px; color: var(--muted); font-weight: 650; }
.affiliate-metric strong { font-size: clamp(20px, 2vw, 29px); line-height: 1.2; overflow-wrap: anywhere; color: #185adb; }
.affiliate-metric small { color: var(--muted); font-size: 11px; }
.metric-green { border-top-color: #159364; }.metric-green strong { color: #11754f; }
.metric-amber { border-top-color: #d7951c; }.metric-amber strong { color: #98610c; }
.metric-purple { border-top-color: #8852d7; }.metric-purple strong { color: #7541c1; }
.affiliate-overview { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; }
.affiliate-link-panel { background: linear-gradient(135deg, #fff, #edf4ff); }
.affiliate-share { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin: 14px 0; }
.affiliate-share label { min-width: 0; margin: 0; font-size: 12px; }
.affiliate-share input { width: 100%; min-width: 0; font-size: 12px; background: #fff; }
.pix-copy textarea { display: block; width: 100%; min-width: 0; box-sizing: border-box; margin-top: 6px; font: inherit; font-size: 12px; line-height: 1.5; background: #fff; resize: vertical; }
.pix-copy input#pix-code { font-family: ui-monospace, Consolas, monospace; }
.pix-panel { border-top: 4px solid #11754f; }
.coupons-panel { border-top: 4px solid #a31575; }
.payouts-panel { border-top: 4px solid #8852d7; }
.payout-table td:nth-child(2) strong { color: #11754f; font-size: 16px; }
.payout-table td:last-child { overflow-wrap: anywhere; }
.coupon-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.coupon-card { display: grid; gap: 8px; align-content: start; padding: 16px; border: 2px dashed #e0a8c9; border-radius: 14px; background: linear-gradient(135deg, #fff, #fdf2f8); min-width: 0; }
.coupon-card p { margin: 0; overflow-wrap: anywhere; }
.coupon-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.coupon-code { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: 1px; color: #6d20c5; overflow-wrap: anywhere; }
.coupon-percent { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; background: #a31575; color: #fff; font-size: 13px; font-weight: 800; }
.coupon-card .affiliate-share { margin: 4px 0 0; }
.coupon-message { width: 100%; box-sizing: border-box; font: inherit; font-size: 12px; line-height: 1.5; background: #fff; resize: vertical; }
.coupon-status { font-size: 12px; color: var(--muted); }
.pix-panel h2 { margin-top: 4px; }
.pix-overview { align-items: start; }
.receipts-list { list-style: none; margin: 12px 0; padding: 0; }
.receipts-list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.receipts-list small { color: var(--muted); font-size: 12px; }
.receipt-form { display: grid; gap: 12px; margin-top: 12px; }
.receipt-form input[type="file"] { display: block; width: 100%; margin-top: 6px; padding: 10px; box-sizing: border-box; border: 1px dashed #a9c6f5; border-radius: 10px; background: #f8fbff; }
.affiliate-share > p, .affiliate-share > noscript { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.affiliate-stage-list { display: grid; gap: 8px; }
.affiliate-stage-list > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
.affiliate-stage-list strong { min-width: 26px; border-radius: 6px; text-align: center; color: #185adb; background: #edf4ff; }
.affiliate-table-wrap { overflow-x: auto; }
.affiliate-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.affiliate-table th { padding: 12px; color: var(--muted); background: #f7f9fd; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.affiliate-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); }
.affiliate-table small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
.affiliate-table td:first-child { min-width: 180px; }
.order-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.order-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #dce5f1; border-radius: 999px; background: #fff; color: #375875; font-size: 13px; font-weight: 650; text-decoration: none; }
.order-tab strong { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #eef3f8; text-align: center; font-size: 12px; }
.order-tab:hover { border-color: #9fb8d2; }
.order-tab[aria-current="page"] { border-color: #185adb; background: #185adb; color: #fff; }
.order-tab[aria-current="page"] strong { background: #ffffff33; color: #fff; }
.order-tab-available:not([aria-current]) strong { background: #edf4ff; color: #185adb; }
.order-tab-paid:not([aria-current]) strong { background: #e9f8ef; color: #11754f; }
.order-tab-cancelled:not([aria-current]) strong { background: #fdecee; color: #a3263a; }
.release-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid; border-radius: 999px; padding: 4px 10px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.release-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.release-paid { color: #11754f; background: #e9f8ef; border-color: #9bd4b2; }
.release-available { color: #185adb; background: #edf4ff; border-color: #a9c6f5; }
.release-waiting { color: #98610c; background: #fff5df; border-color: #e6c77e; }
.release-cancelled { color: #a3263a; background: #fdecee; border-color: #f0b4bd; }
.affiliate-badge { display: inline-block; border-radius: 6px; padding: 4px 8px; color: #24529a; background: #edf4ff; white-space: nowrap; font-size: 11px; font-weight: 650; }
.affiliate-rules { padding: 4px 8px; }
.affiliate-profile-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 22px; align-items: start; }
.affiliate-profile-heading { display: flex; align-items: center; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.affiliate-profile-heading h2 { margin: 4px 0; }
.affiliate-profile-avatar, .affiliate-self-photo-preview { flex: 0 0 auto; width: 112px; height: 112px; overflow: hidden; display: grid; place-items: center; border-radius: 50%; background: #edf4ff; color: #185adb; font-size: 28px; font-weight: 800; }
.affiliate-profile-avatar img, .affiliate-self-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.affiliate-profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.affiliate-profile-details > div { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.affiliate-profile-details dt { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.affiliate-profile-details dd { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 650; }
.affiliate-profile-address { padding: 18px; border-left: 4px solid #185adb; border-radius: 10px; background: #edf4ff; }
.affiliate-profile-address h3 { margin: 0 0 10px; font-size: 15px; }
.affiliate-profile-address address { color: #294563; font-style: normal; line-height: 1.7; }
.affiliate-profile-settings { border-top: 4px solid #8852d7; }
.affiliate-self-photo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 16px; align-items: center; margin: 20px 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.affiliate-self-photo-preview { grid-row: 1 / span 4; width: 92px; height: 92px; font-size: 13px; border: 2px dashed #b7c9e4; }
.affiliate-self-photo > :not(.affiliate-self-photo-preview) { grid-column: 2; margin: 0; }
.affiliate-password-fields { min-width: 0; margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.affiliate-password-fields legend { padding: 0 7px; font-size: 13px; font-weight: 700; }
.affiliate-profile-settings form > button { width: 100%; margin-top: 10px; }
.affiliate-search { display: flex; align-items: end; gap: 12px; }
.affiliate-search label { flex: 1; margin: 0; }
.affiliate-search .affiliate-per-page { flex: 0 0 110px; }
.affiliate-order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.affiliate-products-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.affiliate-product-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.affiliate-product-card h3 { margin: 10px 0 6px; font-size: 15px; }
.affiliate-product-image { display: block; width: 100%; height: 150px; object-fit: contain; padding: 10px; border-radius: 8px; background: #f5f8fc; }
.affiliate-product-placeholder { display: grid; place-items: center; color: #8299ba; font-weight: 750; }
.affiliate-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.affiliate-option input { width: 82px; margin: 0; flex-shrink: 0; }
.affiliate-customer-panel { position: static; scroll-margin-top: 20px; overflow-wrap: anywhere; }
.affiliate-cart-add > button, .affiliate-customer-panel form > button { width: 100%; }
.affiliate-cart-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.affiliate-cart-row > strong, .affiliate-cart-row > small { display: block; }
.affiliate-cart-row > small { color: var(--muted); margin-top: 4px; }
.affiliate-cart-row > p { font-weight: 700; color: #185adb; margin: 8px 0; }
.affiliate-cart-total { background: #edf4ff; border-radius: 10px; padding: 14px; }
.affiliate-cart-clear { margin-top: 16px; }
.affiliate-catalog-layout { padding-bottom: 180px; }
.affiliate-mini-cart { position: fixed; bottom: 20px; right: 24px; width: 340px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow-y: auto; z-index: 20; padding: 18px; border: 1px solid #cddbf1; border-radius: 14px; background: #fff; box-shadow: 0 8px 32px #183e6b29; }
.affiliate-mini-cart summary { cursor: pointer; color: #185adb; font-size: 13px; font-weight: 700; }
.affiliate-mini-preview { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 6px 0; color: #233b5c; }
.affiliate-mini-cart summary small { font-size: 11px; font-weight: 400; }
.affiliate-mini-cart ul { list-style: none; padding: 0; margin: 12px 0; max-height: 180px; overflow-y: auto; }
.affiliate-mini-cart li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.affiliate-mini-cart li span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.affiliate-mini-cart p { margin: 12px 0; }
.affiliate-mini-cart .button { display: block; text-align: center; }
.affiliate-checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.affiliate-checkout-layout > div { min-width: 0; }
.affiliate-checkout-layout button { width: 100%; }
.delivery-fields[hidden] { display: none; }
.delivery-fields > button { margin: 12px 0; }
.delivery-fields textarea { width: 100%; }
.affiliate-customer-panel > button { width: 100%; }
.affiliate-order-note { border-left: 3px solid #185adb; padding: 12px 16px; margin-bottom: 22px; background: #edf4ff; border-radius: 8px; }
@media (min-width: 1600px) { .affiliate-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .affiliate-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.affiliate-order-layout, .affiliate-profile-layout { grid-template-columns: minmax(0, 1fr); }.affiliate-customer-panel { position: static; } }
@media (max-width: 800px) {
    .affiliate-checkout-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .affiliate-mini-cart { right: 16px; bottom: 12px; padding: 14px; }
    .affiliate-sidebar { position: static; width: auto; padding: 18px; gap: 14px; }
    .affiliate-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .affiliate-sidebar-note, .affiliate-nav-label { display: none; }
    .affiliate-sidebar > form { align-self: end; }
    .affiliate-shell { margin: 0; padding: 22px 16px; }
    .affiliate-overview { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .affiliate-shell .admin-header { flex-wrap: wrap; }
}
@media (max-width: 500px) {
    .affiliate-header-identity { align-items: flex-start; gap: 12px; }
    .affiliate-header-avatar { flex-basis: 58px; width: 58px; height: 58px; font-size: 20px; }
    .affiliate-profile-heading { align-items: flex-start; flex-direction: column; }
    .affiliate-profile-details { grid-template-columns: minmax(0, 1fr); }
    .affiliate-self-photo { grid-template-columns: minmax(0, 1fr); }
    .affiliate-self-photo-preview { grid-row: auto; }
    .affiliate-self-photo > :not(.affiliate-self-photo-preview) { grid-column: auto; }
    .affiliate-metrics { gap: 10px; }.affiliate-metric { padding: 15px; }
    .affiliate-products-grid { grid-template-columns: minmax(0, 1fr); }
    .affiliate-shell .panel { padding: 18px; }
    .affiliate-share { grid-template-columns: minmax(0, 1fr); }
    .affiliate-share > button { justify-self: start; }
    .affiliate-search { align-items: stretch; flex-direction: column; }
}
.reset-channel { margin: 18px 0 0; padding: 0; border: 0; display: grid; gap: 10px; }
.reset-channel legend { margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.reset-channel .checkbox { margin: 0; font-weight: 500; cursor: pointer; }
.field-check { display: block; margin: 6px 0 0; font-weight: 500; }
.field-check:empty { display: none; }
.field-check.is-ok { color: #157347; }
.field-check.is-error { color: #b42318; }
.username-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -4px; }
.username-suggestions[hidden] { display: none; }
.username-suggestions span { font-size: 12px; color: var(--muted); }
.username-suggestions .username-chip { min-height: 0; width: auto; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.password-meter { display: block; margin-top: 8px; font-weight: 500; }
.password-meter[hidden] { display: none; }
.password-meter-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.password-meter-bar span { height: 6px; border-radius: 999px; background: #e3e8f2; transition: background .2s; }
.password-meter-text { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.password-meter[data-level="0"] .password-meter-bar span:nth-child(-n+1) { background: #d92d20; }
.password-meter[data-level="1"] .password-meter-bar span:nth-child(-n+1) { background: #f04438; }
.password-meter[data-level="2"] .password-meter-bar span:nth-child(-n+2) { background: #f79009; }
.password-meter[data-level="3"] .password-meter-bar span:nth-child(-n+3) { background: #12b76a; }
.password-meter[data-level="4"] .password-meter-bar span:nth-child(-n+4) { background: #067647; }
.password-meter[data-level="0"] strong, .password-meter[data-level="1"] strong { color: #b42318; }
.password-meter[data-level="2"] strong { color: #b54708; }
.password-meter[data-level="3"] strong, .password-meter[data-level="4"] strong { color: #157347; }
.password-field { position: relative; display: block; margin-top: 7px; }
.password-field input { margin-top: 0; padding-right: 48px; }
.password-field .password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 38px; height: 38px; min-height: 0; margin: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #5b6b85; box-shadow: none; cursor: pointer; }
.password-field .password-toggle:hover { background: #eef3fb; color: #1a5bdc; }
.password-field .password-toggle:focus-visible { outline: 2px solid #1a5bdc; outline-offset: 1px; }
.login-panel .password-field .password-toggle { width: 38px; margin-top: 0; }
