/* AFT – MLM structure */
.aft-net-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-bottom: 20px; }
.aft-net-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.aft-net-card h3 { margin-top: 0; }
.aft-net-card h4 { margin: 18px 0 6px; }
.aft-net-form select, .aft-net-form input[type=text], .aft-net-form input[type=email] { max-width: 100%; }
.aft-net-levels th { text-align: left; padding: 4px 12px 4px 0; font-weight: 600; }
.aft-net-levels td { padding: 4px 6px 4px 0; }

.aft-net-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.aft-net-box { border: 1px solid #e3e3e3; border-radius: 6px; padding: 12px 14px; background: #fafafa; }
.aft-net-label { font-size: 11px; text-transform: uppercase; color: #666; margin-bottom: 4px; letter-spacing: .03em; }
.aft-net-link { display: flex; gap: 6px; margin: 4px 0; }
.aft-net-link input { flex: 1; min-width: 0; font-size: 12px; }
.aft-net-level-table { margin-bottom: 18px; }

.aft-net-tree, .aft-net-children { list-style: none; margin: 0; padding: 0; }
.aft-net-children { margin-left: 22px; border-left: 1px dashed #ccc; padding-left: 10px; }
.aft-net-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 4px; border-bottom: 1px solid #f0f0f0; }
.aft-net-toggle { width: 24px; height: 24px; border: 1px solid #ccc; border-radius: 4px; background: #fff; cursor: pointer; line-height: 1; padding: 0; font-size: 12px; }
.aft-net-toggle:hover { border-color: #007cba; color: #007cba; }
.aft-net-toggle-spacer { display: inline-block; width: 24px; }
.aft-net-name { font-weight: 600; }
.aft-net-count { color: #007cba; font-weight: 600; }
.aft-net-meta { color: #777; font-size: 12px; }
.aft-net-earn { margin-left: auto; font-size: 13px; }
.aft-net-tag { font-size: 11px; background: #eef6fb; color: #00669b; border-radius: 10px; padding: 1px 8px; }
.aft-net-badge { font-size: 11px; border-radius: 10px; padding: 1px 8px; }
.aft-net-badge.is-active { background: #e6f4ea; color: #1e7e34; }
.aft-net-badge.is-inactive { background: #fdecea; color: #b32d2e; }
.aft-net-empty { color: #777; padding: 8px 4px; }

.aft-net-register-form input[type=text], .aft-net-register-form input[type=email], .aft-net-register-form input[type=password] { width: 100%; max-width: 420px; }
.aft-net-errors { background: #fdecea; border: 1px solid #f5c2c0; color: #8a1f1f; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; }
.aft-net-errors ul { margin: 0; padding-left: 18px; }
.aft-net-notice { background: #fff8e5; border: 1px solid #f0d68a; border-radius: 6px; padding: 12px 14px; }

@media (max-width: 600px) {
    .aft-net-earn { margin-left: 30px; width: 100%; }
    .aft-net-children { margin-left: 10px; }
}
.aft-net-top > .aft-net-row { background: #f6f7f7; border-radius: 6px; }
.aft-net-tree > .aft-net-top > .aft-net-children { margin-left: 12px; }

/* Account status colours */
.aft-net-node.aft-st-active > .aft-net-row { border-left: 4px solid #2e9e4f; }
.aft-net-node.aft-st-suspended > .aft-net-row { border-left: 4px solid #e08a00; background: #fff7e6; }
.aft-net-node.aft-st-lost > .aft-net-row { border-left: 4px solid #c62828; background: #fdecea; }
.aft-net-node.aft-st-lost > .aft-net-row .aft-net-name { color: #8a1f1f; text-decoration: line-through; }
.aft-net-badge.aft-badge-active { background: #e6f4ea; color: #1e7e34; }
.aft-net-badge.aft-badge-suspended { background: #fff1d6; color: #9a5b00; }
.aft-net-badge.aft-badge-lost { background: #fdecea; color: #b32d2e; }
.aft-st-box-active { border-color: #2e9e4f; }
.aft-st-box-suspended { border-color: #e08a00; background: #fff7e6; }
.aft-st-box-lost { border-color: #c62828; background: #fdecea; }

/* Status box: one compact row across the full width */
.aft-net-summary .aft-net-box-wide { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 10px 14px; }
.aft-net-box-wide .aft-net-label { margin: 0; }
.aft-net-box-wide > div, .aft-net-box-wide > small { margin: 0; }
.aft-net-box-wide > small { flex-basis: 100%; color: #555; }

/* Levels table – columns aligned regardless of theme styles */
.aft-net table.aft-net-level-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 18px; }
.aft-net table.aft-net-level-table th,
.aft-net table.aft-net-level-table td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left !important; vertical-align: middle; font-size: 13px; }
.aft-net table.aft-net-level-table th:nth-child(1), .aft-net table.aft-net-level-table td:nth-child(1) { width: 40%; }
.aft-net table.aft-net-level-table th:nth-child(n+2), .aft-net table.aft-net-level-table td:nth-child(n+2) { width: 20%; text-align: right !important; }
.aft-net table.aft-net-level-table thead th { font-weight: 600; color: #555; font-size: 12px; }
.aft-net table.aft-net-level-table tfoot th { border-bottom: 0; font-weight: 700; }
.aft-net table.aft-net-level-table tfoot th:first-child { text-align: left !important; }

/* Partner registration form: card layout consistent with the partner panel. */
.aft-net-register { max-width: 560px; margin: 0 0 32px; padding: 28px 30px; background: #fff; border: 1px solid #e1e7ef; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.04); box-sizing: border-box; }
.aft-net-register .aft-net-invited { margin: 0 0 18px; color: #555; }
.aft-net-register-form p { margin: 0 0 14px; }
.aft-net-register-form label { display: block; font-weight: 600; font-size: 14px; color: #1d1b3a; }
.aft-net-register-form input[type=text], .aft-net-register-form input[type=email], .aft-net-register-form input[type=password] { display: block; width: 100%; max-width: none; margin-top: 6px; padding: 11px 14px; border: 1px solid #cfd6e0; border-radius: 10px; font-size: 15px; line-height: 1.4; background: #fff; box-sizing: border-box; }
.aft-net-register-form input[type=text]:focus, .aft-net-register-form input[type=email]:focus, .aft-net-register-form input[type=password]:focus { outline: none; border-color: #00b3ff; box-shadow: 0 0 0 3px rgba(0,179,255,.18); }
.aft-net-register-form label:has(input[type=checkbox]) { display: block; position: relative; padding-left: 28px; font-weight: 400; font-size: 14px; line-height: 1.5; }
.aft-net-register-form input[type=checkbox] { position: absolute; left: 0; top: 3px; margin: 0; }
.aft-net-register-form button.button { display: inline-block; margin-top: 6px; padding: 12px 26px; border: 0; border-radius: 999px; background: #00b3ff; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.aft-net-register-form button.button:hover { background: #0096d6; color: #fff; }
.aft-net-register .aft-net-errors { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #ffd0d1; background: #fff5f5; border-radius: 12px; }
.aft-net-register .aft-net-errors ul { margin: 0; padding-left: 18px; }
