:root {
    --af-ink: #111316;
    --af-ink-soft: #20242a;
    --af-gold: #d3a33e;
    --af-gold-dark: #9a6b08;
    --af-cream: #f6f2ea;
    --af-paper: #fff;
    --af-line: #ded8cc;
    --af-muted: #6d7078;
    --af-green: #16835f;
    --af-red: #b74040;
    --af-blue: #315f9e;
    --af-radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--af-ink); font-family: Inter, "Segoe UI", Arial, sans-serif; background: var(--af-cream); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.affiliate-wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.af-kicker, .affiliate-auth-card .af-kicker { display: block; margin-bottom: 12px; color: var(--af-gold-dark); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.af-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 12px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease, border .2s ease; }
.af-button:hover { transform: translateY(-2px); }
.af-button-large { min-height: 54px; padding-inline: 26px; }
.af-button-gold { color: #141414; background: var(--af-gold); }
.af-button-dark { color: white; background: var(--af-ink); }
.af-button-light { color: var(--af-ink); border-color: var(--af-line); background: white; }
.af-button-outline { color: white; border-color: rgba(255,255,255,.3); background: transparent; }
.af-alert { max-width: 1180px; margin: 0 auto 16px; padding: 14px 18px; border: 1px solid; border-radius: 12px; font-size: 14px; font-weight: 700; }
.af-alert.success { color: #11694d; border-color: #b4dfd0; background: #eaf8f3; }
.af-alert.warning { color: #855b06; border-color: #ead59e; background: #fff8e6; }
.af-alert.error { color: #a33434; border-color: #e9bcbc; background: #fff0f0; }
.affiliate-auth-card .alert,.affiliate-login-card .alert{align-items:center;border:1px solid;border-radius:10px;display:flex;font-size:12px;gap:9px;margin:14px 0;padding:11px 12px}.affiliate-auth-card .alert button,.affiliate-login-card .alert button{background:transparent;border:0;cursor:pointer;margin-left:auto}.affiliate-auth-card .alert-success,.affiliate-login-card .alert-success{background:#eaf8f3;border-color:#b4dfd0;color:#11694d}.affiliate-auth-card .alert-warning,.affiliate-login-card .alert-warning{background:#fff8e6;border-color:#ead59e;color:#855b06}.affiliate-auth-card .alert-error,.affiliate-login-card .alert-error{background:#fff0f0;border-color:#e9bcbc;color:#a33434}
.cookie-banner{align-items:center;background:#111316;border:1px solid rgba(255,255,255,.12);border-radius:18px;bottom:20px;box-shadow:0 18px 60px rgba(0,0,0,.35);color:#fff;display:flex;gap:20px;left:50%;max-width:960px;padding:18px 20px;position:fixed;transform:translateX(-50%);width:calc(100% - 40px);z-index:120}.cookie-banner[hidden]{display:none}.cookie-banner b{display:block;font-size:15px}.cookie-banner p{color:#b9bdc4;font-size:12px;line-height:1.55;margin:4px 0 0}.cookie-actions{align-items:center;display:flex;flex:0 0 auto;gap:12px}.cookie-actions a{color:#e0bd72;font-size:12px;font-weight:800}.cookie-actions button{background:#d1a84e;border:0;border-radius:999px;color:#17191d;cursor:pointer;font-size:12px;font-weight:900;padding:11px 16px}

/* Página pública */
.affiliate-public { background: #fff; }
.affiliate-public-header { position: sticky; z-index: 20; top: 0; display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 28px; padding: 12px max(24px, calc((100% - 1180px) / 2)); border-bottom: 1px solid rgba(255,255,255,.08); color: white; background: rgba(17,19,22,.97); backdrop-filter: blur(14px); }
.affiliate-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.affiliate-logo img { width: 58px; height: 48px; object-fit: contain; border-radius: 9px; background: white; }
.affiliate-logo span { display: grid; gap: 2px; }
.affiliate-logo b { font-size: 14px; }
.affiliate-logo small { color: #a9adb4; font-size: 11px; }
.affiliate-logo.centered { display: flex; justify-content: center; margin-bottom: 30px; }
.affiliate-public-header nav { display: flex; gap: 30px; }
.affiliate-public-header nav a { color: #bfc1c5; font-size: 13px; font-weight: 700; text-decoration: none; }
.affiliate-public-header nav a:hover { color: white; }
.affiliate-public-header > div { display: flex; gap: 8px; }
.affiliate-hero { overflow: hidden; position: relative; padding: 94px 0; color: white; background: radial-gradient(circle at 73% 18%, rgba(211,163,62,.23), transparent 28%), linear-gradient(125deg, #101214 0%, #181b20 58%, #0e1012 100%); }
.affiliate-hero::before { position: absolute; inset: 0; content: ""; opacity: .3; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 64px 64px; }
.affiliate-hero-grid { position: relative; display: grid; grid-template-columns: 1.13fr .87fr; gap: 70px; align-items: center; }
.affiliate-hero h1 { max-width: 680px; margin: 0; font-size: clamp(48px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; }
.affiliate-hero h1 em, .af-heading h2 em { color: var(--af-gold); font-family: Georgia, serif; font-weight: 400; }
.affiliate-hero > .affiliate-wrap > div:first-child > p { max-width: 650px; margin: 26px 0; color: #bec2c8; font-size: 18px; line-height: 1.75; }
.affiliate-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.affiliate-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; color: #d2d4d7; font-size: 12px; font-weight: 700; }
.affiliate-trust span::before { margin-right: 8px; color: var(--af-gold); content: "✓"; }
.affiliate-earning-card { position: relative; padding: 42px; border: 1px solid rgba(255,255,255,.13); border-radius: 26px; background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035)); box-shadow: 0 30px 80px rgba(0,0,0,.3); backdrop-filter: blur(10px); }
.affiliate-earning-card::after { position: absolute; right: -55px; bottom: -55px; width: 180px; height: 180px; border-radius: 50%; content: ""; background: rgba(211,163,62,.13); filter: blur(2px); }
.earning-label { color: #e4ca91; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.affiliate-earning-card > strong { display: block; margin: 12px 0 0; color: var(--af-gold); font-size: 92px; line-height: 1; letter-spacing: -.07em; }
.affiliate-earning-card > p { margin: 4px 0 30px; color: #d6d8dc; font-size: 15px; }
.earning-example { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; padding: 20px; border-radius: 15px; color: var(--af-ink); background: white; }
.earning-example span { display: grid; gap: 5px; }
.earning-example small { color: var(--af-muted); font-size: 10px; text-transform: uppercase; }
.earning-example b { font-size: 19px; }
.earning-example i { color: var(--af-gold-dark); font-size: 24px; font-style: normal; }
.affiliate-earning-card footer { position: relative; margin-top: 20px; color: #acafb5; font-size: 12px; line-height: 1.6; }
.affiliate-flow, .affiliate-benefits, .affiliate-plans, .affiliate-audience, .affiliate-why { padding: 100px 0; }
.af-heading { margin-bottom: 40px; }
.af-heading.centered { text-align: center; }
.af-heading h2 { max-width: 760px; margin: 0; font-size: clamp(36px, 4.5vw, 58px); line-height: 1.05; letter-spacing: -.045em; }
.af-heading.centered h2 { margin-inline: auto; }
.affiliate-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.affiliate-steps article { padding: 28px; border: 1px solid var(--af-line); border-radius: 18px; background: #faf8f4; }
.affiliate-steps article > b { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #111; background: var(--af-gold); }
.affiliate-steps h3 { margin: 36px 0 10px; font-size: 19px; }
.affiliate-steps p, .benefit-grid p, .affiliate-audience p { color: var(--af-muted); font-size: 14px; line-height: 1.7; }
.affiliate-product { padding: 86px 0; color: white; background: var(--af-ink); }
.affiliate-product-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 90px; align-items: center; }
.affiliate-product h2 { margin: 0 0 22px; font-size: 44px; line-height: 1.05; letter-spacing: -.04em; }
.affiliate-product p { color: #b7bbc1; line-height: 1.8; }
.affiliate-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.affiliate-features span { padding: 17px 18px; border: 1px solid #34383f; border-radius: 12px; color: #e5e6e8; background: #1b1e22; font-size: 13px; font-weight: 700; }
.affiliate-features span::before { margin-right: 10px; color: var(--af-gold); content: "✓"; }
.affiliate-benefits { background: var(--af-cream); }
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.benefit-grid article { min-height: 260px; padding: 32px; border: 1px solid var(--af-line); border-radius: 20px; background: white; }
.benefit-grid article span { color: var(--af-gold-dark); font-size: 34px; font-weight: 900; }
.benefit-grid h3 { margin: 55px 0 10px; font-size: 21px; }
.affiliate-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.affiliate-plan-grid article { padding: 28px; border: 1px solid var(--af-line); border-radius: 20px; background: white; }
.affiliate-plan-grid article.featured { color: white; border-color: var(--af-ink); background: var(--af-ink); }
.affiliate-plan-grid article > small { color: var(--af-gold-dark); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.affiliate-plan-grid h3 { margin: 0 0 8px; font-size: 22px; }
.affiliate-plan-grid p { min-height: 66px; color: var(--af-muted); font-size: 13px; line-height: 1.6; }
.affiliate-plan-grid article.featured p { color: #b7bbc1; }
.affiliate-plan-grid .plan-price { display: block; margin: 22px 0 4px; font-size: 29px; }
.affiliate-plan-grid .plan-commission { display: block; color: var(--af-green); font-size: 13px; font-weight: 800; }
.affiliate-plan-grid article > strong { display: block; margin: 22px 0 7px; font-size: 29px; }
.affiliate-plan-grid article > strong em { color: var(--af-muted); font-size: 11px; font-style: normal; font-weight: 500; }
.affiliate-plan-grid article > span { color: var(--af-green); font-size: 12px; font-weight: 700; }
.affiliate-audience { background: #f2eee5; }
.affiliate-audience-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: center; }
.affiliate-audience h2 { margin: 0 0 18px; font-size: 44px; letter-spacing: -.04em; }
.audience-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.audience-tags span { padding: 14px 17px; border: 1px solid var(--af-line); border-radius: 999px; color: #30333a; background: white; font-size: 13px; font-weight: 700; }
.affiliate-why { text-align: center; }
.affiliate-why h2 { max-width: 850px; margin: 0 auto 35px; font-size: 46px; line-height: 1.08; letter-spacing: -.04em; }
.affiliate-why ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 0; list-style: none; }
.affiliate-why li { padding: 13px 17px; border-radius: 10px; background: var(--af-cream); font-size: 13px; font-weight: 700; }
.affiliate-why > .affiliate-wrap > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.affiliate-why > .affiliate-wrap > div span { padding: 13px 17px; border-radius: 10px; background: var(--af-cream); font-size: 13px; font-weight: 700; }
.affiliate-final-cta { padding: 85px 0; text-align: center; background: var(--af-gold); }
.affiliate-final-cta h2 { max-width: 800px; margin: 0 auto 30px; font-size: 52px; line-height: 1; letter-spacing: -.05em; }
.affiliate-final-cta p { margin: -12px auto 25px; color: #5f481b; }
.affiliate-public-footer { padding: 30px 0; color: #aeb1b6; background: #111316; }
.affiliate-public-footer .affiliate-wrap { display: flex; justify-content: space-between; gap: 20px; }
.affiliate-public-footer div div { display: flex; gap: 20px; }
.affiliate-public-footer a { font-size: 12px; text-decoration: none; }

/* Cadastro e acesso */
.affiliate-auth-body { min-height: 100vh; background: white; }
.affiliate-auth-shell { display: grid; min-height: 100vh; grid-template-columns: 1.08fr .92fr; }
.affiliate-auth-form { padding: 40px max(35px, calc((100vw - 1180px) / 2)); }
.affiliate-auth-form > .affiliate-logo { margin-bottom: 35px; }
.affiliate-auth-card { width: min(590px, 100%); }
.affiliate-auth-card h1, .affiliate-login-card h1 { margin: 0 0 12px; font-size: 42px; line-height: 1.04; letter-spacing: -.045em; }
.affiliate-auth-card > p, .affiliate-login-card > p { color: var(--af-muted); line-height: 1.65; }
.affiliate-form { display: grid; gap: 15px; margin-top: 26px; }
.affiliate-form label, .af-stack-form label, .af-inline-form label, .af-program-settings label { display: grid; gap: 7px; color: #34363b; font-size: 12px; font-weight: 800; }
.affiliate-form input, .affiliate-form select, .af-stack-form input, .af-stack-form select, .af-inline-form input, .af-program-settings input, .af-program-settings select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--af-line); border-radius: 10px; outline: none; background: white; }
.affiliate-form input:focus, .af-stack-form input:focus, .af-stack-form select:focus, .af-inline-form input:focus { border-color: var(--af-gold); box-shadow: 0 0 0 3px rgba(211,163,62,.12); }
.af-form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.affiliate-form .af-check { display: block; color: var(--af-muted); font-weight: 500; line-height: 1.6; }
.af-check input { width: auto; height: auto; margin-right: 7px; }
.af-check a, .af-auth-link a, .af-back-link { color: var(--af-gold-dark); font-weight: 800; }
.affiliate-form .af-button { width: 100%; }
.af-auth-link { text-align: center; font-size: 13px; }
.affiliate-auth-aside { display: grid; padding: 70px; place-items: center; color: white; background: radial-gradient(circle at 80% 20%, rgba(211,163,62,.2), transparent 25%), var(--af-ink); }
.affiliate-auth-aside div { max-width: 540px; }
.affiliate-auth-aside h2 { margin: 0 0 36px; font-size: 54px; line-height: 1.03; letter-spacing: -.05em; }
.affiliate-auth-aside ul { display: grid; gap: 14px; padding: 0; list-style: none; color: #d0d2d6; }
.affiliate-auth-aside li::before { display: inline-grid; width: 24px; height: 24px; margin-right: 12px; place-items: center; border-radius: 50%; color: #111; background: var(--af-gold); content: "✓"; font-size: 11px; font-weight: 900; }
.affiliate-login-shell { display: grid; min-height: 100vh; padding: 35px; place-items: center; background: radial-gradient(circle at 50% -5%, rgba(211,163,62,.22), transparent 28%), var(--af-ink); }
.affiliate-login-card { width: min(480px, 100%); padding: 44px; border-radius: 24px; background: white; box-shadow: 0 35px 90px rgba(0,0,0,.32); }
.affiliate-login-card .affiliate-logo img { width: 86px; height: 70px; }
.affiliate-login-card .af-back-link { display: block; margin-top: 23px; text-align: center; font-size: 12px; text-decoration: none; }

/* Painel do afiliado */
.affiliate-panel { min-height: 100vh; background: #f4f1eb; }
.af-panel-header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 12px max(24px, calc((100% - 1180px) / 2)); color: white; background: var(--af-ink); }
.af-panel-user { display: flex; align-items: center; gap: 22px; }
.af-panel-user > span { display: grid; text-align: right; }
.af-panel-user small { color: #989ca4; font-size: 11px; }
.af-panel-user > a { padding: 10px 14px; border: 1px solid #3a3d43; border-radius: 9px; color: white; font-size: 12px; font-weight: 800; text-decoration: none; }
.af-panel-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 70px; }
.af-dashboard-hero { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 28px; }
.af-dashboard-hero h1 { margin: 0; font-size: 45px; letter-spacing: -.045em; }
.af-dashboard-hero p { margin: 7px 0 0; color: var(--af-muted); }
.af-next-payment { display: grid; max-width: 370px; gap: 5px; padding-left: 25px; border-left: 3px solid var(--af-gold); }
.af-next-payment span { color: var(--af-gold-dark); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.af-next-payment strong { font-size: 20px; }
.af-next-payment small { color: var(--af-muted); line-height: 1.5; }
.af-share-card { display: grid; grid-template-columns: auto 1fr minmax(330px, .85fr); gap: 22px; align-items: center; padding: 25px; border-radius: var(--af-radius); color: white; background: var(--af-ink); }
.af-share-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 15px; color: #111; background: var(--af-gold); font-size: 28px; font-weight: 900; }
.af-share-card > div > span { color: #d9bd7b; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.af-share-card h2 { margin: 4px 0; font-size: 20px; }
.af-share-card p { margin: 0; color: #aeb2b8; font-size: 12px; line-height: 1.5; }
.af-copy-field, .af-admin-copy { display: flex; overflow: hidden; border: 1px solid #3b3e43; border-radius: 11px; background: #1e2126; }
.af-copy-field input, .af-admin-copy input { min-width: 0; flex: 1; padding: 0 13px; border: 0; color: #d7d9dd; outline: none; background: transparent; font-size: 12px; }
.af-copy-field button, .af-copy-field a { display: inline-flex; min-height: 46px; align-items: center; padding: 0 14px; border: 0; color: #111; background: var(--af-gold); font-size: 11px; font-weight: 900; text-decoration: none; cursor: pointer; }
.af-copy-field a { color: white; border-left: 1px solid #3b3e43; background: #292c31; }
.af-metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 18px 0; }
.af-metric-grid article, .af-admin-metrics article { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 19px; border: 1px solid var(--af-line); border-radius: 15px; background: white; }
.af-metric-grid article > span, .af-admin-metrics article > span { display: grid; min-width: 40px; height: 40px; place-items: center; border-radius: 11px; color: var(--af-gold-dark); background: #f4eddd; font-size: 11px; font-weight: 900; }
.af-metric-grid article div, .af-admin-metrics article div { display: grid; min-width: 0; gap: 3px; }
.af-metric-grid small, .af-admin-metrics small { color: var(--af-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.af-metric-grid strong, .af-admin-metrics strong { overflow: hidden; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.af-metric-grid em, .af-admin-metrics em { color: var(--af-green); font-size: 10px; font-style: normal; }
.af-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 18px; margin: 18px 0; }
.af-panel-card { border: 1px solid var(--af-line); border-radius: var(--af-radius); background: white; }
.af-panel-card > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid #e9e4dc; }
.af-panel-card > header span { color: var(--af-gold-dark); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.af-panel-card > header h2 { margin: 4px 0 0; font-size: 20px; }
.af-chart-legend { display: flex; align-items: center; gap: 8px; color: var(--af-muted); font-size: 11px; }
.af-chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: #d8d2c7; }
.af-chart-legend i.conversion { margin-left: 5px; background: var(--af-gold); }
.af-chart { display: grid; height: 280px; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; padding: 30px 25px 20px; }
.af-chart-column { display: grid; height: 100%; grid-template-rows: 22px 1fr 20px; gap: 5px; align-items: end; text-align: center; }
.af-chart-value { overflow: hidden; color: var(--af-green); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.af-chart-bars { display: flex; height: 100%; align-items: end; justify-content: center; gap: 4px; border-bottom: 1px solid var(--af-line); }
.af-chart-bars i { width: 13px; min-height: 4px; border-radius: 5px 5px 1px 1px; background: #d8d2c7; }
.af-chart-bars i.conversion { background: var(--af-gold); }
.af-chart-column > span { color: var(--af-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.af-balance-card header > b { padding: 6px 9px; border-radius: 999px; font-size: 10px; }
.af-balance-card header > b.ok { color: #126449; background: #e0f3ec; }
.af-balance-card header > b.pending { color: #875e0d; background: #fff0c9; }
.af-pix-summary { margin: 20px 22px; padding: 18px; border-radius: 13px; background: #f6f3ed; }
.af-pix-summary small, .af-pix-summary strong { display: block; }
.af-pix-summary small { color: var(--af-muted); font-size: 10px; text-transform: uppercase; }
.af-pix-summary strong { margin-top: 6px; font-size: 18px; }
.af-pix-summary p { color: var(--af-muted); font-size: 11px; line-height: 1.5; }
.af-stack-form { display: grid; gap: 12px; padding: 0 22px 22px; }
.af-table-card { margin: 18px 0; }
.af-table-wrap, .table-scroll { overflow-x: auto; }
.af-table-card table, .data-table { width: 100%; border-collapse: collapse; }
.af-table-card th, .af-table-card td, .data-table th, .data-table td { padding: 14px 18px; border-bottom: 1px solid #ece8e1; text-align: left; vertical-align: middle; font-size: 12px; }
.af-table-card th, .data-table th { color: #777b84; background: #f8f6f2; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.af-table-card td b, .af-table-card td small, .data-table td b, .data-table td small { display: block; }
.af-table-card td small, .data-table td small { margin-top: 4px; color: var(--af-muted); font-size: 10px; }
.af-status { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: #5a5c63; background: #ecebed; font-size: 9px; font-weight: 900; white-space: nowrap; }
.af-status.converted, .af-status.available, .af-status.active { color: #126449; background: #e0f3ec; }
.af-status.trial, .af-status.scheduled, .af-status.pending { color: #875e0d; background: #fff0c9; }
.af-status.paid { color: #215a8d; background: #e5f0fb; }
.af-status.cancelled, .af-status.suspended { color: #a03636; background: #fbe6e6; }
.af-empty { padding: 45px; color: var(--af-muted); text-align: center; }
.af-empty.compact { padding: 28px; }
.af-profile-card { margin-top: 18px; }
.af-inline-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; padding: 22px; }
.af-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px max(24px, calc((100% - 1180px) / 2)); color: #8a8d94; background: #e8e3da; font-size: 11px; }
.af-panel-footer div { display: flex; gap: 18px; }
.af-panel-footer a { text-decoration: none; }

/* Super Admin */
.af-admin { display: grid; gap: 18px; }
.af-admin .page-heading { margin-bottom: 2px; }
.af-admin .page-heading .back-link { display: block; margin-bottom: 12px; color: #7f5c13; font-size: 11px; font-weight: 800; text-decoration: none; }
.af-admin-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.af-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.af-admin .panel-card { border: 1px solid var(--af-line); border-radius: 16px; background: white; }
.af-admin .panel-card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid #e9e4dc; }
.af-admin .panel-card-header h2 { margin: 2px 0; font-size: 18px; }
.af-admin .panel-card-header p { margin: 3px 0 0; color: var(--af-muted); font-size: 11px; }
.af-admin .panel-card-header .counter { padding: 5px 8px; border-radius: 6px; background: #f0eee9; font-size: 9px; font-weight: 800; }
.af-admin-filter { display: grid; grid-template-columns: 1fr 180px auto; gap: 8px; padding: 14px 20px; }
.af-admin-filter input, .af-admin-filter select, .af-pay-form input { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--af-line); border-radius: 8px; background: white; }
.af-program-settings form { display: grid; gap: 16px; padding: 19px; }
.af-program-settings label small { color: var(--af-muted); font-weight: 400; line-height: 1.5; }
.input-suffix { display: flex; overflow: hidden; border: 1px solid var(--af-line); border-radius: 10px; }
.input-suffix input { border: 0 !important; border-radius: 0 !important; }
.input-suffix span { display: grid; min-width: 45px; place-items: center; color: var(--af-muted); background: #f3f0ea; }
.af-rule-note { margin: 0 19px 19px; padding: 15px; border-radius: 11px; color: #63552f; background: #f6eedc; }
.af-rule-note b { font-size: 11px; }
.af-rule-note p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.af-pay-form { display: flex; min-width: 290px; gap: 6px; }
.af-affiliate-summary { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 12px; }
.af-affiliate-summary article { padding: 18px; border: 1px solid var(--af-line); border-radius: 14px; background: white; }
.af-affiliate-summary small, .af-affiliate-summary strong, .af-affiliate-summary em { display: block; }
.af-affiliate-summary > article > small { margin-bottom: 9px; color: var(--af-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.af-affiliate-summary strong { overflow-wrap: anywhere; font-size: 14px; }
.af-affiliate-summary em { margin-top: 5px; color: var(--af-muted); font-size: 10px; font-style: normal; }
.af-admin-copy { border-color: var(--af-line); background: #f6f4ef; }
.af-admin-copy input { color: #333; }
.af-admin-copy .btn { border-radius: 0; }
.btn-block { width: 100%; }

/* Biblioteca de materiais */
.af-header-materials { padding: 10px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: white !important; font-size: 11px; font-weight: 800; text-decoration: none; }
.af-header-materials:hover, .af-header-materials.active { color: var(--af-black) !important; background: var(--af-gold); border-color: var(--af-gold); }
.affiliate-materials-page { background: #f2efe9; }
.af-materials-hero { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 36px; align-items: end; padding: 38px; border-radius: 22px; color: white; background: radial-gradient(circle at 85% 20%, rgba(214,166,65,.25), transparent 32%), #17191c; box-shadow: 0 20px 50px rgba(24,20,12,.12); }
.af-materials-hero h1 { max-width: 720px; margin: 9px 0 13px; font-size: clamp(38px, 5vw, 64px); line-height: .99; letter-spacing: -.055em; }
.af-materials-hero p { max-width: 750px; margin: 0; color: #c7c9cc; font-size: 15px; line-height: 1.7; }
.af-back-dashboard { display: inline-block; margin-bottom: 23px; color: #d8d9da; font-size: 11px; font-weight: 800; text-decoration: none; }
.af-material-link-card { display: grid; gap: 10px; padding: 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.07); }
.af-material-link-card small { color: var(--af-gold); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.af-material-link-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: white; background: rgba(0,0,0,.22); }
.af-material-link-card button { min-height: 44px; border: 0; border-radius: 9px; color: #161719; background: var(--af-gold); font-weight: 900; cursor: pointer; }
.af-material-link-card span { color: #a8abb1; font-size: 10px; }
.af-material-section { margin-top: 42px; }
.af-material-section > header { max-width: 780px; margin-bottom: 20px; }
.af-material-section > header > span { color: #9b6a05; font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.af-material-section > header h2 { margin: 6px 0; font-size: 30px; letter-spacing: -.035em; }
.af-material-section > header p { margin: 0; color: var(--af-muted); font-size: 13px; line-height: 1.6; }
.af-material-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.af-material-card { overflow: hidden; border: 1px solid var(--af-line); border-radius: 18px; background: white; box-shadow: 0 12px 34px rgba(37,31,20,.05); }
.af-material-card.featured { border-color: rgba(207,153,38,.72); box-shadow: 0 16px 38px rgba(167,115,15,.13); }
.af-material-preview { position: relative; display: grid; min-height: 250px; max-height: 420px; overflow: hidden; place-items: center; background: #121416; }
.af-material-preview img, .af-material-preview video { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #121416; }
.af-material-preview > em { position: absolute; top: 13px; right: 13px; padding: 7px 10px; border-radius: 999px; color: #151719; background: var(--af-gold); font-size: 9px; font-style: normal; font-weight: 900; }
.af-document-preview { display: grid; min-height: 260px; place-content: center; text-align: center; color: white; }
.af-document-preview b { font-size: 50px; }
.af-document-preview span { color: #a8abb1; font-size: 12px; }
.af-material-body { display: grid; gap: 10px; padding: 20px; }
.af-material-body > small { color: #9b6a05; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.af-material-body h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.af-material-body > p { min-height: 42px; margin: 0; color: var(--af-muted); font-size: 12px; line-height: 1.55; }
.af-material-body label { color: #555961; font-size: 10px; font-weight: 800; }
.af-material-body textarea { width: 100%; min-height: 115px; margin-top: 6px; padding: 11px; resize: vertical; border: 1px solid var(--af-line); border-radius: 10px; color: #4d5157; background: #f7f5f1; font: 11px/1.5 inherit; }
.af-copy-caption, .af-download-material { min-height: 43px; padding: 0 14px; border-radius: 9px; font-size: 11px; font-weight: 900; cursor: pointer; }
.af-copy-caption { border: 1px solid var(--af-line); background: white; }
.af-download-material { display: grid; place-items: center; color: white; background: #17191c; text-decoration: none; }
.af-admin-material-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 18px; align-items: start; }
.af-admin-material-form { display: grid; gap: 14px; padding: 20px; }
.af-admin-material-form label { display: grid; gap: 6px; color: #35383d; font-size: 10px; font-weight: 800; }
.af-admin-material-form input:not([type=checkbox]), .af-admin-material-form select, .af-admin-material-form textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--af-line); border-radius: 9px; background: white; font: inherit; }
.af-admin-material-form textarea { resize: vertical; }
.af-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 10px; }
.af-form-row:first-of-type { grid-template-columns: 1fr 120px; }
.af-file-field { padding: 13px; border: 1px dashed #c8c1b4; border-radius: 10px; background: #f8f5ef; }
.af-file-field small { color: var(--af-muted); font-weight: 400; line-height: 1.45; }
.af-check-row { display: flex; gap: 20px; }
.af-check-row label { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.af-admin-material-grid { display: grid; gap: 12px; padding: 15px; }
.af-admin-material-grid > article { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--af-line); border-radius: 12px; }
.af-admin-material-thumb { display: grid; height: 100px; overflow: hidden; place-items: center; border-radius: 9px; color: white; background: #17191c; }
.af-admin-material-thumb img, .af-admin-material-thumb video { width: 100%; height: 100%; object-fit: cover; }
.af-admin-material-grid h3 { margin: 3px 0; font-size: 14px; }
.af-admin-material-grid small { color: #9b6a05; font-size: 8px; font-weight: 900; }
.af-admin-material-grid p { margin: 3px 0 8px; color: var(--af-muted); font-size: 10px; }
.af-admin-material-actions { display: grid; min-width: 88px; gap: 6px; }
.af-admin-material-actions form, .af-admin-material-actions button { width: 100%; }

@media (max-width: 1050px) {
    .affiliate-public-header nav { display: none; }
    .affiliate-hero-grid, .affiliate-product-grid { grid-template-columns: 1fr; }
    .affiliate-hero-grid { gap: 45px; }
    .affiliate-steps { grid-template-columns: 1fr 1fr; }
    .affiliate-plan-grid, .benefit-grid { grid-template-columns: 1fr 1fr; }
    .af-metric-grid, .af-admin-metrics { grid-template-columns: repeat(3, 1fr); }
    .af-share-card { grid-template-columns: auto 1fr; }
    .af-copy-field { grid-column: 1 / -1; }
    .af-inline-form { grid-template-columns: 1fr 1fr; }
    .af-inline-form button { min-height: 48px; }
    .af-admin-layout { grid-template-columns: 1fr; }
    .af-material-grid { grid-template-columns: 1fr 1fr; }
    .af-admin-material-layout { grid-template-columns: 1fr; }
    .af-affiliate-summary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .affiliate-wrap, .af-panel-main { width: min(100% - 28px, 1180px); }
    .affiliate-public-header { min-height: 66px; padding: 9px 14px; }
    .affiliate-public-header .affiliate-logo img { width: 46px; height: 40px; }
    .affiliate-public-header .af-button-light { display: none; }
    .affiliate-public-header .af-button { min-height: 40px; padding: 0 13px; font-size: 11px; }
    .affiliate-hero { padding: 65px 0; }
    .affiliate-hero h1 { font-size: 49px; }
    .affiliate-hero > .affiliate-wrap > div:first-child > p { font-size: 16px; }
    .affiliate-earning-card { padding: 27px; }
    .affiliate-earning-card > strong { font-size: 72px; }
    .affiliate-flow, .affiliate-benefits, .affiliate-plans, .affiliate-audience, .affiliate-why { padding: 68px 0; }
    .af-heading h2, .affiliate-product h2, .affiliate-audience h2, .affiliate-why h2, .affiliate-final-cta h2 { font-size: 36px; }
    .affiliate-steps, .benefit-grid, .affiliate-plan-grid, .affiliate-audience-grid, .affiliate-features { grid-template-columns: 1fr; }
    .affiliate-product-grid, .affiliate-audience-grid { gap: 36px; }
    .affiliate-public-footer .affiliate-wrap { align-items: center; flex-direction: column; text-align: center; }
    .affiliate-auth-shell { display: block; }
    .affiliate-auth-form { padding: 25px 18px 50px; }
    .affiliate-auth-aside { display: none; }
    .affiliate-auth-card { margin-inline: auto; }
    .affiliate-auth-card h1, .affiliate-login-card h1 { font-size: 34px; }
    .affiliate-login-shell { padding: 14px; }
    .affiliate-login-card { padding: 29px 22px; }
    .af-form-two { grid-template-columns: 1fr; }
    .af-panel-header { padding: 10px 14px; }
    .af-panel-header .affiliate-logo span { display: none; }
    .af-panel-user > span { display: none; }
    .af-header-materials { padding: 8px 10px; font-size: 9px; }
    .af-panel-main { padding-top: 28px; }
    .af-dashboard-hero { align-items: start; flex-direction: column; }
    .af-dashboard-hero h1 { font-size: 35px; }
    .af-next-payment { max-width: none; }
    .af-share-card { grid-template-columns: 1fr; }
    .af-share-icon { width: 45px; height: 45px; }
    .af-copy-field { display: grid; grid-template-columns: 1fr 1fr; }
    .af-copy-field input { grid-column: 1 / -1; min-height: 43px; }
    .af-metric-grid, .af-admin-metrics { grid-template-columns: 1fr 1fr; }
    .af-metric-grid article:last-child { grid-column: 1 / -1; }
    .af-dashboard-grid { grid-template-columns: 1fr; }
    .af-chart { height: 240px; padding-inline: 13px; }
    .af-panel-card > header { align-items: start; padding: 18px; flex-direction: column; }
    .af-inline-form, .af-admin-filter, .af-affiliate-summary { grid-template-columns: 1fr; }
    .af-panel-footer { align-items: center; flex-direction: column; text-align: center; }
    .af-admin .page-heading { align-items: flex-start; flex-direction: column; }
    .af-materials-hero { grid-template-columns: 1fr; padding: 25px; }
    .af-material-grid { grid-template-columns: 1fr; }
    .af-admin-material-grid > article { grid-template-columns: 92px minmax(0, 1fr); }
    .af-admin-material-actions { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
    .af-form-row, .af-form-row:first-of-type { grid-template-columns: 1fr; }
    .af-admin-metrics article:last-child { grid-column: 1 / -1; }
    .af-pay-form { min-width: 240px; flex-direction: column; }
    .cookie-banner { align-items: stretch; flex-direction: column; }
    .cookie-actions { justify-content: space-between; }
}
