/* AFM Scambi V2 — live frontend, layout is inspired by the approved HTML.
   Scoped so other AFM pages, loan UI and shared navigation remain untouched. */
body.afm-trades.afm-scambi-v2{
  --s2-ink:#162b48;--s2-muted:#71819a;--s2-blue:#1767d9;
  --s2-purple:#8748d9;--s2-line:#dfe6f4;--s2-bg:#edf2ff;
  background:var(--s2-bg)!important;color:var(--s2-ink)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
body.afm-trades.afm-scambi-v2 *{box-sizing:border-box}
body.afm-trades.afm-scambi-v2 .afm-page-watermark{display:none!important}
body.afm-scambi-v2 .afm-v2-shell{
  width:min(100%,960px)!important;max-width:960px!important;margin:0 auto!important;
  padding:0 11px 270px!important;display:block!important;min-height:100dvh!important;
  background:linear-gradient(180deg,#f5f8ff 0%,#eaf0ff 60%,#eef2fe 100%)!important;
  color:var(--s2-ink)!important
}
body.afm-scambi-v2 .afm-v2-header{
  position:relative;z-index:2;padding:14px 4px 8px;
}
body.afm-scambi-v2 .afm-v2-topline{display:flex;align-items:center;gap:10px;min-height:44px}
body.afm-scambi-v2 .afm-v2-topline>div{flex:1;min-width:0}
body.afm-scambi-v2 .afm-v2-topline small{display:block;color:#7787a4;font-size:10px;font-weight:800;letter-spacing:1px}
body.afm-scambi-v2 .afm-v2-topline h1{font-size:21px!important;line-height:1.12!important;letter-spacing:-.55px!important;margin:3px 0!important;color:#152a4a!important;font-weight:850!important}
body.afm-scambi-v2 .afm-v2-back,body.afm-scambi-v2 .afm-v2-reset{
  display:grid!important;place-items:center!important;flex:none;text-decoration:none!important;
  width:40px!important;height:40px!important;min-height:40px!important;
  border-radius:50%!important;border:1px solid #e2e9f5!important;
  background:#fff!important;color:#324765!important;font-size:24px!important;font-weight:800!important;
  padding:0!important;box-shadow:0 2px 11px rgba(40,69,109,.055)!important
}
body.afm-scambi-v2 .afm-v2-reset{font-size:26px!important}
body.afm-scambi-v2 .afm-v2-info{font-size:11px!important;line-height:1.4!important;color:#6c7c98!important;margin:7px 3px 2px!important}
body.afm-scambi-v2 .trade-rule-state{
  font-size:11px!important;line-height:1.38!important;margin:6px 0!important;padding:8px 11px!important;
  border-radius:10px!important;background:#f2f5fc!important;color:#536585!important;
  border:1px solid #dce5f4!important;max-width:100%!important
}
body.afm-scambi-v2 .trade-rule-state.ok{background:#ebf9f1!important;border-color:#b7e5ce!important;color:#257351!important}
body.afm-scambi-v2 .trade-rule-state.bad{background:#fff0f1!important;border-color:#f0c2cb!important;color:#9c3655!important}
body.afm-scambi-v2 .afm-v2-create{
  background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;
  min-width:0!important;display:block!important;overflow:visible!important
}
body.afm-scambi-v2 #tradeCreate[hidden]{display:none!important}
body.afm-scambi-v2 #tradeCreate>summary{
  cursor:pointer;display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:7px 7px 10px!important;list-style:none!important;color:#243b61!important;
  font-size:13px!important;font-weight:850!important;min-height:35px!important
}
body.afm-scambi-v2 #tradeCreate>summary::-webkit-details-marker{display:none}
body.afm-scambi-v2 #tradeCreate>summary:after{content:'⌄';font-size:18px;color:#7586a1}
body.afm-scambi-v2 #tradeCreate[open]>summary:after{content:'⌃'}
body.afm-scambi-v2 #tradeCreate>summary small{font-size:10px;color:#8a98ae;font-weight:500;margin-left:auto;margin-right:10px}
body.afm-scambi-v2 .afm-v2-create-body{min-width:0!important;display:block!important;padding:0!important}
body.afm-scambi-v2 .afm-v2-clubs{
  display:grid!important;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr)!important;
  align-items:center!important;gap:4px!important;padding:7px!important;border-radius:17px!important;
  border:1px solid #e3e8f4!important;background:#fff!important;
  box-shadow:0 5px 18px rgba(51,82,143,.065)!important
}
body.afm-scambi-v2 .afm-v2-club{
  display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;
  min-height:60px!important;padding:7px 6px!important;border-radius:12px!important;
  background:#eff3fc!important
}
body.afm-scambi-v2 .afm-v2-club>div{flex:1;min-width:0}
body.afm-scambi-v2 .afm-v2-club label{display:block!important;margin:0 0 4px!important;font-weight:900!important;font-size:9px!important;letter-spacing:.3px!important;color:#8190a8!important}
body.afm-scambi-v2 .afm-v2-crest{
  flex:0 0 32px!important;width:32px!important;height:32px!important;
  border:2px solid #fff!important;border-radius:50%!important;display:grid!important;place-items:center!important;
  font-size:14px!important;font-weight:900!important;color:#fff!important;background:#1689bd!important;
  box-shadow:0 0 0 1px #d5dfef!important
}
body.afm-scambi-v2 .afm-v2-crest-b{background:linear-gradient(135deg,#6c3da5,#9b58df)!important}
body.afm-scambi-v2 .afm-v2-swap{text-align:center;color:#b7c2d5;font-size:23px;font-weight:800}
body.afm-scambi-v2 .afm-v2-club select,
body.afm-scambi-v2 .afm-v2-side select,
body.afm-scambi-v2 .afm-v2-dialog select{
  color:#243b59!important;background:#fff!important;border:1px solid #dbe4f2!important;
  border-radius:9px!important;padding:7px 22px 7px 8px!important;
  font-size:11px!important;font-weight:750!important;min-width:0!important;
  min-height:38px!important;height:38px!important;width:100%!important;
  margin:0!important;appearance:auto!important;-webkit-appearance:menulist!important
}
body.afm-scambi-v2 .afm-v2-hint{
  padding:10px 3px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:8px!important;color:#7a8ca6!important;font-size:10px!important
}
body.afm-scambi-v2 .afm-v2-hint i{
  display:inline-block;vertical-align:middle;width:7px;height:7px;margin-right:5px;border-radius:50%;background:#9c59e4
}
body.afm-scambi-v2 .afm-v2-hintpill{
  display:inline-block;border-radius:25px;border:1px solid #e0e3f5;background:#fff;
  padding:4px 8px;color:#8064b8;font-size:9px;font-weight:800;white-space:nowrap
}
body.afm-scambi-v2 .afm-v2-sides{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;align-items:start!important;min-width:0!important
}
body.afm-scambi-v2 .afm-v2-side{min-width:0!important;display:flex!important;flex-direction:column!important;gap:7px!important}
body.afm-scambi-v2 .afm-v2-side>header{
  border:1px solid #e0e7f3;background:#fafcff;border-radius:14px;padding:9px!important;
  min-width:0;display:block!important
}
body.afm-scambi-v2 .afm-v2-side-title{display:flex;align-items:center;justify-content:space-between;gap:3px;margin-bottom:8px}
body.afm-scambi-v2 .afm-v2-side-title b{font-size:12px;font-weight:850;color:#1b3150;white-space:nowrap}
body.afm-scambi-v2 .afm-v2-side-title small{
  border-radius:30px;background:#e9eefa;color:#7786a1;font-size:9px;
  font-weight:800;padding:3px 5px;max-width:70%;text-align:center;line-height:1.15
}
body.afm-scambi-v2 .afm-v2-filters{display:flex;gap:5px;min-width:0}
body.afm-scambi-v2 .afm-v2-filters select{flex:1;width:calc(100% - 40px)!important;min-height:38px!important}
body.afm-scambi-v2 .afm-v2-search-toggle{
  display:grid!important;place-items:center!important;width:37px!important;min-width:37px!important;
  height:38px!important;min-height:38px!important;margin:0!important;padding:0!important;
  border:1px solid #dbe4f2!important;border-radius:9px!important;
  background:#fff!important;color:#7385a0!important;font-size:25px!important
}
body.afm-scambi-v2 .afm-v2-search{
  display:block;width:100%!important;min-width:0!important;height:36px!important;min-height:36px!important;
  margin:7px 0 0!important;padding:7px 9px!important;font-size:11px!important;
  color:#1e3554!important;background:#fff!important;border:1px solid #d9e3f1!important;
  border-radius:9px!important
}
body.afm-scambi-v2 .afm-v2-search[hidden]{display:none!important}
body.afm-scambi-v2 .afm-v2-players{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  gap:7px!important;overflow-y:auto!important;overflow-x:hidden!important;
  max-height:min(48dvh,470px)!important;min-height:180px!important;padding:0 1px 6px!important;
  overscroll-behavior:contain!important;scrollbar-width:thin!important
}
body.afm-scambi-v2 .afm-v2-players:empty:before{
  content:"Seleziona entrambi i club";display:block;text-align:center;
  padding:25px 5px;border:1px dashed #ccd6e9;border-radius:12px;
  font-size:11px;color:#8798ae;background:#f9fbff
}
body.afm-scambi-v2 .afm-v2-player{
  position:relative!important;display:flex!important;align-items:flex-start!important;gap:7px!important;
  width:100%!important;min-width:0!important;min-height:102px!important;flex:none!important;
  margin:0!important;padding:9px 7px 23px!important;border-radius:13px!important;
  background:#fff!important;color:#182c49!important;border:1.5px solid #e4eaf5!important;
  box-shadow:0 4px 12px rgba(51,70,119,.045)!important;cursor:pointer!important;
  touch-action:manipulation!important;overflow:hidden!important;
  transition:background .12s ease,border-color .12s ease,box-shadow .12s ease
}
body.afm-scambi-v2 .afm-v2-player:has(input:checked){
  background:#f2e9ff!important;border-color:#9256df!important;
  box-shadow:0 0 0 1px rgba(143,73,225,.13),0 5px 15px rgba(143,73,225,.08)!important
}
body.afm-scambi-v2 .afm-v2-player:has(input:checked):after{
  content:"✓";position:absolute;top:4px;left:4px;background:#914fe4;color:#fff;
  width:16px;height:16px;border-radius:50%;display:grid;place-items:center;font-size:10px;font-weight:900;
  box-shadow:0 0 0 2px white
}
body.afm-scambi-v2 .afm-v2-player:focus-within{outline:2px solid #9a65e6;outline-offset:1px}
body.afm-scambi-v2 .afm-v2-player input[type=checkbox]{
  position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;min-height:1px!important;
  margin:0!important;pointer-events:none!important
}
body.afm-scambi-v2 .afm-v2-player.afm-role-hidden,
body.afm-scambi-v2 .afm-v2-player.afm-search-hidden{display:none!important}
body.afm-scambi-v2 .afm-v2-player:has(input:disabled){opacity:.45;cursor:not-allowed!important}
body.afm-scambi-v2 .afm-v2-avatar{
  width:40px!important;height:43px!important;min-width:40px!important;flex:0 0 40px!important;
  position:relative!important;display:grid!important;place-items:center!important;
  border:2px solid white!important;border-radius:50%!important;
  background:linear-gradient(135deg,#a2c6f2,#e6f0ff)!important;
  box-shadow:0 0 0 1px #dee6f0!important;color:#34516d!important;
  isolation:isolate!important
}
body.afm-scambi-v2 .afm-v2-avatar-letter{display:grid;place-items:center;font-size:13px;font-weight:900;line-height:1}
body.afm-scambi-v2 .afm-v2-avatar img{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  object-fit:cover!important;object-position:center 14%!important;border-radius:50%!important;z-index:1!important
}
body.afm-scambi-v2 .afm-v2-role{
  position:absolute;top:-6px;right:-5px;z-index:2;display:grid;place-items:center;
  width:19px;min-height:19px;border-radius:50%;border:2px solid white;
  font-size:9px;font-weight:900;font-style:normal;background:#568bdb;color:#fff
}
body.afm-scambi-v2 .afm-v2-role.role-P{background:#c3a04b}
body.afm-scambi-v2 .afm-v2-role.role-D{background:#4fa96a}
body.afm-scambi-v2 .afm-v2-role.role-C{background:#5c8adf}
body.afm-scambi-v2 .afm-v2-role.role-A{background:#e16d83}
body.afm-scambi-v2 .afm-v2-player-info{
  flex:1!important;min-width:0!important;display:flex!important;flex-direction:column!important;
  gap:4px!important;text-align:left!important
}
body.afm-scambi-v2 .afm-v2-player-info b{
  font-size:11px!important;line-height:1.13!important;font-weight:850!important;color:#1b2e48!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:100%!important
}
body.afm-scambi-v2 .afm-v2-player-info span{
  font-size:9.5px!important;color:#657590!important;white-space:nowrap!important;
  overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important
}
body.afm-scambi-v2 .afm-v2-player-info small{
  font-size:8.5px!important;color:#8795ab!important;line-height:1.2!important;
  overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important
}
body.afm-scambi-v2 .afm-v2-player-info em{
  color:#b18c54!important;font-style:normal!important;font-size:8.5px!important;font-weight:800!important
}
body.afm-scambi-v2 .afm-v2-fmv{
  position:absolute;right:8px;bottom:7px;font-size:10px;font-weight:900;color:#354d73
}
body.afm-scambi-v2 .afm-v2-preview{font-size:12px;margin:7px 0}
body.afm-scambi-v2 .afm-v2-actionbar{
  position:fixed!important;z-index:18!important;bottom:74px!important;left:50%!important;transform:translateX(-50%)!important;
  width:min(100%,560px)!important;max-width:100%!important;padding:8px 11px 10px!important;
  background:linear-gradient(180deg,rgba(236,242,255,.94),#eaf0ff 28%)!important;
  border-top:1px solid #dce5f5!important;box-shadow:0 -4px 24px rgba(62,85,147,.07)!important
}
body.afm-scambi-v2 .afm-v2-summary{
  display:flex;justify-content:space-between;align-items:center;gap:9px;
  background:#fff;padding:10px 12px;border-radius:13px;border:1px solid #e3e9f4;
  box-shadow:0 3px 12px rgba(32,58,106,.045)
}
body.afm-scambi-v2 .afm-v2-summary>div{flex:1;min-width:0}
body.afm-scambi-v2 .afm-v2-summary b{font-size:12px;color:#193454;font-weight:850}
body.afm-scambi-v2 .afm-v2-summary b span{color:#8243d3}
body.afm-scambi-v2 .afm-v2-summary small{display:block;color:#7c8ba2;font-size:10px;margin-top:2px;line-height:1.23}
body.afm-scambi-v2 .afm-v2-summary strong{color:#60689f;font-size:11px;white-space:nowrap}
body.afm-scambi-v2 .afm-v2-trade-value{display:none!important}
body.afm-scambi-v2 #tradeRuleState{
  margin:5px 2px 7px!important;padding:5px 9px!important;
  font-size:10px!important;min-height:24px!important;max-height:48px!important;overflow-y:auto!important;
  border:0!important;background:transparent!important;color:#61718c!important
}
body.afm-scambi-v2 #tradeRuleState.ok{color:#267957!important}
body.afm-scambi-v2 #tradeRuleState.bad{color:#ae4252!important}
body.afm-scambi-v2 .afm-v2-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
body.afm-scambi-v2 .afm-v2-primary,body.afm-scambi-v2 .afm-v2-secondary{
  min-width:0!important;min-height:46px!important;border-radius:25px!important;
  border:0!important;padding:10px 9px!important;margin:0!important;font-size:13px!important;font-weight:850!important
}
body.afm-scambi-v2 .afm-v2-primary{background:#1567d9!important;color:white!important;box-shadow:0 6px 14px rgba(24,102,215,.18)!important}
body.afm-scambi-v2 .afm-v2-secondary{background:#ead8fe!important;color:#7138b8!important;box-shadow:none!important}
body.afm-scambi-v2 .afm-v2-primary:disabled{background:#b5c5e2!important;color:#f7f9ff!important;box-shadow:none!important;opacity:1!important;cursor:not-allowed!important}
body.afm-scambi-v2 .afm-v2-history{
  margin:25px 0 12px!important;background:#fff!important;border:1px solid #e3e9f3!important;
  border-radius:15px!important;padding:14px!important;box-shadow:0 4px 14px rgba(40,69,116,.045)!important
}
body.afm-scambi-v2 .afm-v2-history h2{font-size:16px!important;margin:0 0 12px!important;color:#1b3353!important}
body.afm-scambi-v2 .afm-v2-history h2 small{font-size:12px!important;color:#7789a2!important}
body.afm-scambi-v2 .afm-v2-history .status{
  color:#304863!important;background:#f6f8fe!important;border:1px solid #e0e8f2!important;
  border-radius:11px!important;font-size:11px!important;line-height:1.4!important;padding:12px!important;margin:8px 0!important
}
body.afm-scambi-v2 .afm-v2-history .status.pending{border-left:3px solid #ceac5a!important}
body.afm-scambi-v2 .afm-v2-history .status.approved{border-left:3px solid #4db88d!important}
body.afm-scambi-v2 .afm-v2-history .status.rejected,
body.afm-scambi-v2 .afm-v2-history .status.cancelled{border-left:3px solid #cc8193!important}
body.afm-scambi-v2 .afm-v2-history .status b,
body.afm-scambi-v2 .afm-v2-history .status strong{color:#203952!important}
body.afm-scambi-v2 .afm-v2-history .status small{font-size:11px!important;color:#697b94!important}
body.afm-scambi-v2 .afm-v2-history details summary{cursor:pointer;color:#355471;font-size:11px;font-weight:800}
body.afm-scambi-v2 .afm-v2-history .afm-trade-offer-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.afm-scambi-v2 .afm-v2-history .afm-trade-offer-side ul{padding-left:16px;font-size:10px}
body.afm-scambi-v2 .afm-v2-history button{
  background:#edf1fc!important;border:1px solid #dce4f3!important;color:#2b4c72!important;
  padding:10px 12px!important;min-height:40px!important;border-radius:9px!important;
  font-size:11px!important;cursor:pointer
}
body.afm-scambi-v2 .afm-v2-history button[data-accept]{background:#e8f7ee!important;color:#267656!important;border-color:#bfe5cf!important}
body.afm-scambi-v2 .afm-archive-panel{
  margin-top:18px!important;border:1px solid #e0e6f3!important;border-radius:12px!important;
  padding:0 12px 12px!important;background:#f7f9fe!important
}
body.afm-scambi-v2 .afm-archive-panel[hidden]{display:none!important}
body.afm-scambi-v2 .afm-archive-panel>summary{padding:14px 0!important;font-size:12px;color:#8062a2!important;font-weight:850!important;cursor:pointer}
body.afm-scambi-v2 .afm-archive-hint{font-size:11px!important;line-height:1.4!important;color:#7b8ba1!important}
body.afm-scambi-v2 .afm-v2-closed[hidden]{display:none!important}
body.afm-scambi-v2 .afm-v2-closed{
  background:#fff!important;padding:24px!important;margin:12px 0!important;
  border:1px solid #dce4f1!important;border-radius:17px!important;text-align:center!important
}
body.afm-scambi-v2 .afm-v2-closed>span{font-size:29px}
body.afm-scambi-v2 .afm-v2-closed h2{font-size:19px!important;color:#253954!important;margin:7px 0!important}
body.afm-scambi-v2 .afm-v2-closed p{font-size:12px!important;color:#72829a!important;line-height:1.5!important}
body.afm-scambi-v2 .afm-v2-overlay{
  position:fixed!important;z-index:10000!important;inset:0!important;
  display:flex!important;justify-content:center!important;align-items:flex-end!important;
  padding:13px!important;background:rgba(16,30,56,.52)!important
}
body.afm-scambi-v2 .afm-v2-overlay[hidden]{display:none!important}
body.afm-scambi-v2.afm-v2-modal-open{overflow:hidden!important}
body.afm-scambi-v2 .afm-v2-dialog{
  width:min(100%,510px)!important;max-height:90dvh!important;overflow-y:auto!important;
  background:#fff!important;color:#1e3554!important;border-radius:23px!important;
  box-shadow:0 22px 70px rgba(18,33,65,.23)!important;padding:20px!important
}
body.afm-scambi-v2 .afm-v2-dialog header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:10px}
body.afm-scambi-v2 .afm-v2-dialog h2{font-size:21px!important;color:#1b3050!important;margin:0!important}
body.afm-scambi-v2 .afm-v2-dialog p{font-size:12px!important;color:#647590!important;line-height:1.5!important}
body.afm-scambi-v2 .afm-v2-close{
  width:35px!important;min-height:35px!important;border:0!important;background:#edf1f8!important;
  border-radius:50%!important;color:#465a77!important;font-size:25px!important;padding:0!important;margin:0!important
}
body.afm-scambi-v2 .afm-v2-dialog label{display:block;font-size:12px!important;font-weight:800!important;color:#354e6e!important;margin:13px 0 6px!important}
body.afm-scambi-v2 .afm-v2-dialog input,
body.afm-scambi-v2 .afm-v2-dialog textarea{
  width:100%!important;color:#1b314e!important;border:1px solid #d5dfef!important;
  border-radius:11px!important;background:#f7faff!important;
  padding:12px!important;font-size:14px!important;min-height:44px!important
}
body.afm-scambi-v2 .afm-v2-dialog-actions{display:flex;gap:9px;margin-top:18px;align-items:center}
body.afm-scambi-v2 .afm-v2-dialog-actions>button{flex:1;min-width:0}
body.afm-scambi-v2 .afm-v2-ghost{
  min-height:45px!important;background:#edf1f7!important;color:#506483!important;
  border:0!important;border-radius:12px!important;padding:10px!important;font-size:12px!important;font-weight:800!important
}
body.afm-scambi-v2 .afm-v2-dialog-actions>.afm-v2-primary{border-radius:12px!important}
body.afm-scambi-v2 .afm-v2-reviewcols{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.afm-scambi-v2 .afm-v2-reviewcols>div{min-width:0}
body.afm-scambi-v2 .afm-v2-reviewcols h3{font-size:12px!important;color:#254264!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 0 8px}
body.afm-scambi-v2 .afm-v2-reviewcols ul{list-style:none;padding:0;margin:0;display:grid;gap:6px}
body.afm-scambi-v2 .afm-v2-reviewcols li{
  display:block;font-size:11px;background:#f1f5fc;border-radius:9px;padding:8px 9px;min-width:0
}
body.afm-scambi-v2 .afm-v2-reviewcols li b{display:block;font-size:12px;color:#263e5f;word-break:break-word}
body.afm-scambi-v2 .afm-v2-reviewcols li span{display:block;font-size:10px;color:#7183a0;margin-top:3px}
body.afm-scambi-v2 .afm-v2-reviewcash{font-weight:850!important;color:#3d5c87!important;background:#f4f7ff!important;border-radius:10px!important;padding:9px 10px!important}
body.afm-scambi-v2 .afm-v2-reviewrule{
  border-left:3px solid #78bb97!important;background:#ecf8f0!important;
  padding:9px 10px!important;border-radius:8px!important;color:#2b795a!important
}
body.afm-scambi-v2 .afm-v2-review-info{font-size:11px!important;color:#7c88a1!important}
@media(max-width:380px){
 body.afm-scambi-v2 .afm-v2-shell{padding-left:8px!important;padding-right:8px!important}
 body.afm-scambi-v2 .afm-v2-club{padding:5px 4px!important;gap:4px!important}
 body.afm-scambi-v2 .afm-v2-crest{width:27px!important;min-width:27px!important;flex-basis:27px!important;height:27px!important;font-size:12px!important}
 body.afm-scambi-v2 .afm-v2-sides{gap:6px!important}
 body.afm-scambi-v2 .afm-v2-side>header{padding:7px!important}
 body.afm-scambi-v2 .afm-v2-player{gap:5px!important;padding:8px 5px 22px!important;min-height:99px!important}
 body.afm-scambi-v2 .afm-v2-avatar{width:34px!important;height:37px!important;min-width:34px!important;flex-basis:34px!important}
 body.afm-scambi-v2 .afm-v2-player-info b{font-size:10px!important}
 body.afm-scambi-v2 .afm-v2-player-info span{font-size:9px!important}
 body.afm-scambi-v2 .afm-v2-player-info small{font-size:8px!important}
 body.afm-scambi-v2 .afm-v2-club select,body.afm-scambi-v2 .afm-v2-side select{font-size:10px!important}
 body.afm-scambi-v2 .afm-v2-topline h1{font-size:18px!important}
 body.afm-scambi-v2 .afm-v2-actionbar{bottom:70px!important}
}
@media(min-width:720px){
 body.afm-scambi-v2 .afm-v2-shell{max-width:900px!important;padding:14px 26px 120px!important;border-radius:18px!important}
 body.afm-scambi-v2 .afm-v2-header{padding-top:18px}
 body.afm-scambi-v2 .afm-v2-sides{gap:15px!important}
 body.afm-scambi-v2 .afm-v2-players{max-height:450px!important}
 body.afm-scambi-v2 .afm-v2-player{min-height:85px!important}
 body.afm-scambi-v2 .afm-v2-actionbar{position:sticky!important;transform:none!important;left:auto!important;bottom:12px!important;width:100%!important;border-radius:17px!important;margin-top:15px!important;border:1px solid #dce5f5!important}
 body.afm-scambi-v2 .afm-v2-overlay{align-items:center!important}
 body.afm-scambi-v2 .afm-v2-dialog{max-height:85dvh!important}
}

/* v1421: RIPRISTINO PALETTE AFM CLASSICA — solo Scambi V2.
   Layout, logica e accessibilità invariati. */
body.afm-trades.afm-scambi-v2{
 --s2-ink:#f2f6fa;--s2-muted:#a0b2c2;--s2-blue:#2292d4;
 --s2-purple:#d8af55;--s2-line:#294559;--s2-bg:#051320;
 background:#051320!important;color:#f2f6fa!important;
}
html:has(body.afm-scambi-v2){background:#051320!important}
body.afm-scambi-v2 .afm-v2-shell{
 background:linear-gradient(180deg,#071a2a 0%,#061724 53%,#04101c 100%)!important;
 color:#f2f6fa!important;
}
body.afm-scambi-v2 .afm-v2-topline small{color:#d7ab4b!important}
body.afm-scambi-v2 .afm-v2-topline h1{color:#f6f8fa!important}
body.afm-scambi-v2 .afm-v2-back,
body.afm-scambi-v2 .afm-v2-reset{
 background:#0a2234!important;color:#d8ae54!important;
 border-color:#415063!important;box-shadow:none!important;
}
body.afm-scambi-v2 .afm-v2-info{color:#a0b0c1!important}
body.afm-scambi-v2 .trade-rule-state{
 background:#0b2536!important;color:#c2d2df!important;
 border-color:#25455b!important;
}
body.afm-scambi-v2 .trade-rule-state.ok{
 background:#0a2f2b!important;border-color:#27715a!important;color:#9ee1c5!important;
}
body.afm-scambi-v2 .trade-rule-state.bad{
 background:#351d29!important;border-color:#875067!important;color:#ffadb5!important;
}
body.afm-scambi-v2 #tradeCreate>summary{color:#f0f4f7!important}
body.afm-scambi-v2 #tradeCreate>summary small{color:#9dabb8!important}
body.afm-scambi-v2 #tradeCreate>summary:after{color:#d9b058!important}
body.afm-scambi-v2 .afm-v2-clubs{
 background:#091e30!important;border-color:#284158!important;box-shadow:0 8px 23px rgba(0,0,0,.16)!important;
}
body.afm-scambi-v2 .afm-v2-club{background:#0c293d!important}
body.afm-scambi-v2 .afm-v2-club label{color:#9db0c1!important}
body.afm-scambi-v2 .afm-v2-crest{
 border-color:#17374b!important;background:#126e9b!important;box-shadow:0 0 0 1px #37647b!important;
}
body.afm-scambi-v2 .afm-v2-crest-b{background:linear-gradient(135deg,#9d752d,#ddad4b)!important}
body.afm-scambi-v2 .afm-v2-swap{color:#d5b25f!important}
body.afm-scambi-v2 .afm-v2-club select,
body.afm-scambi-v2 .afm-v2-side select,
body.afm-scambi-v2 .afm-v2-dialog select{
 background:#071b2c!important;color:#f0f5f8!important;border-color:#36536a!important;
 color-scheme:dark!important;
}
body.afm-scambi-v2 .afm-v2-hint{color:#a0b1c2!important}
body.afm-scambi-v2 .afm-v2-hint i{background:#d6ae53!important}
body.afm-scambi-v2 .afm-v2-hintpill{
 background:#102a3c!important;color:#e7be63!important;border-color:#385268!important;
}
body.afm-scambi-v2 .afm-v2-side>header{
 background:#0a2133!important;border-color:#2b485f!important;
}
body.afm-scambi-v2 .afm-v2-side-title b{color:#f0f4f8!important}
body.afm-scambi-v2 .afm-v2-side-title small{
 background:#17354a!important;color:#becbd5!important;
}
body.afm-scambi-v2 .afm-v2-search-toggle{
 background:#0b2537!important;color:#d8b363!important;border-color:#345269!important;
}
body.afm-scambi-v2 .afm-v2-search{
 background:#061a2a!important;color:#eef5f9!important;border-color:#345269!important;
 color-scheme:dark!important;
}
body.afm-scambi-v2 .afm-v2-search::placeholder{color:#92a4b5!important}
body.afm-scambi-v2 .afm-v2-players:empty:before{
 background:#081c2b!important;color:#94a7b9!important;border-color:#284b61!important;
}
body.afm-scambi-v2 .afm-v2-player{
 background:#091e30!important;color:#e9f0f6!important;border-color:#28465b!important;
 box-shadow:0 4px 12px rgba(0,0,0,.12)!important;
}
body.afm-scambi-v2 .afm-v2-player:has(input:checked){
 background:#163746!important;border-color:#d8ae53!important;
 box-shadow:0 0 0 1px rgba(216,174,83,.23),0 7px 18px rgba(0,0,0,.16)!important;
}
body.afm-scambi-v2 .afm-v2-player:has(input:checked):after{
 background:#d9ac4b!important;color:#081a27!important;box-shadow:0 0 0 2px #112d3d!important;
}
body.afm-scambi-v2 .afm-v2-player:focus-within{
 outline-color:#edc778!important;
}
body.afm-scambi-v2 .afm-v2-avatar{
 background:linear-gradient(135deg,#174264,#274e67)!important;border-color:#29485c!important;
 box-shadow:0 0 0 1px #385d73!important;color:#ecf4f9!important;
}
body.afm-scambi-v2 .afm-v2-role{border-color:#102b3b!important}
body.afm-scambi-v2 .afm-v2-player-info b{color:#f6f8fa!important}
body.afm-scambi-v2 .afm-v2-player-info span{color:#b4c5d2!important}
body.afm-scambi-v2 .afm-v2-player-info small{color:#9babba!important}
body.afm-scambi-v2 .afm-v2-player-info em{color:#e1b75f!important}
body.afm-scambi-v2 .afm-v2-fmv{color:#e6ba5c!important}
body.afm-scambi-v2 .afm-v2-actionbar{
 background:linear-gradient(180deg,rgba(5,19,32,.96),#061826 27%)!important;
 border-top-color:#2d475c!important;box-shadow:0 -8px 25px rgba(0,0,0,.3)!important;
}
body.afm-scambi-v2 .afm-v2-summary{
 background:#0a2133!important;border-color:#2f4b62!important;
 box-shadow:0 4px 12px rgba(0,0,0,.16)!important;
}
body.afm-scambi-v2 .afm-v2-summary b{color:#f1f5f8!important}
body.afm-scambi-v2 .afm-v2-summary b span{color:#e7be60!important}
body.afm-scambi-v2 .afm-v2-summary small{color:#a6b7c7!important}
body.afm-scambi-v2 .afm-v2-summary strong{color:#d5b364!important}
body.afm-scambi-v2 #tradeRuleState{
 color:#b2c3d0!important;
}
body.afm-scambi-v2 #tradeRuleState.ok{color:#99d9b8!important}
body.afm-scambi-v2 #tradeRuleState.bad{color:#ff9eab!important}
body.afm-scambi-v2 .afm-v2-primary{
 background:linear-gradient(180deg,#caa244,#a77829)!important;color:#081826!important;
 box-shadow:0 5px 14px rgba(0,0,0,.2)!important;
}
body.afm-scambi-v2 .afm-v2-secondary{
 background:#0e3046!important;color:#e5c16d!important;
 border:1px solid #3b5666!important;box-shadow:none!important;
}
body.afm-scambi-v2 .afm-v2-primary:disabled{
 background:#263e50!important;color:#778e9d!important;box-shadow:none!important;
}
body.afm-scambi-v2 .afm-v2-history{
 background:#081d2d!important;border-color:#29485e!important;box-shadow:0 5px 18px rgba(0,0,0,.14)!important;
}
body.afm-scambi-v2 .afm-v2-history h2{color:#eef4f7!important}
body.afm-scambi-v2 .afm-v2-history h2 small{color:#abbac9!important}
body.afm-scambi-v2 .afm-v2-history .status{
 background:#0b2638!important;color:#d0dbe5!important;border-color:#2e4b5f!important;
}
body.afm-scambi-v2 .afm-v2-history .status b,
body.afm-scambi-v2 .afm-v2-history .status strong{color:#f1f5f8!important}
body.afm-scambi-v2 .afm-v2-history .status small{color:#acbdca!important}
body.afm-scambi-v2 .afm-v2-history details summary{color:#e0b65e!important}
body.afm-scambi-v2 .afm-v2-history .afm-trade-offer-side li{color:#c2d1dc!important}
body.afm-scambi-v2 .afm-v2-history button{
 background:#113046!important;color:#dce8ef!important;border-color:#38576d!important;
}
body.afm-scambi-v2 .afm-v2-history button[data-accept]{
 background:#133b32!important;color:#a7e3c5!important;border-color:#337b60!important;
}
body.afm-scambi-v2 .afm-archive-panel{
 background:#0a2232!important;border-color:#315165!important;
}
body.afm-scambi-v2 .afm-archive-panel>summary{color:#e7bd67!important}
body.afm-scambi-v2 .afm-archive-hint{color:#a2b6c5!important}
body.afm-scambi-v2 .afm-v2-closed{
 background:#0a2233!important;border-color:#2c4e64!important;
}
body.afm-scambi-v2 .afm-v2-closed h2{color:#eef4f8!important}
body.afm-scambi-v2 .afm-v2-closed p{color:#a8bbca!important}
body.afm-scambi-v2 .afm-v2-overlay{background:rgba(0,5,12,.80)!important}
body.afm-scambi-v2 .afm-v2-dialog{
 background:#0a2233!important;color:#e8f1f6!important;border:1px solid #35536a!important;
 box-shadow:0 22px 70px rgba(0,0,0,.54)!important;
}
body.afm-scambi-v2 .afm-v2-dialog h2{color:#f2f6f9!important}
body.afm-scambi-v2 .afm-v2-dialog p{color:#b1c3d0!important}
body.afm-scambi-v2 .afm-v2-close{background:#173547!important;color:#e7bc61!important}
body.afm-scambi-v2 .afm-v2-dialog label{color:#d0deea!important}
body.afm-scambi-v2 .afm-v2-dialog input,
body.afm-scambi-v2 .afm-v2-dialog textarea{
 background:#071b2b!important;color:#ecf3f8!important;border-color:#36556c!important;
 color-scheme:dark!important;
}
body.afm-scambi-v2 .afm-v2-ghost{
 background:#16374a!important;color:#e6edf3!important;border:1px solid #395467!important;
}
body.afm-scambi-v2 .afm-v2-reviewcols h3{color:#e7bb63!important}
body.afm-scambi-v2 .afm-v2-reviewcols li{
 background:#102e41!important;color:#e7eef5!important;
}
body.afm-scambi-v2 .afm-v2-reviewcols li b{color:#f6f8fb!important}
body.afm-scambi-v2 .afm-v2-reviewcols li span{color:#adc0ce!important}
body.afm-scambi-v2 .afm-v2-reviewcash{background:#13354a!important;color:#e7c076!important}
body.afm-scambi-v2 .afm-v2-reviewrule{
 background:#11362f!important;color:#a4e1c7!important;border-left-color:#4baf88!important;
}
body.afm-scambi-v2 .afm-v2-review-info{color:#b1c0cb!important}
@media(min-width:720px){
 body.afm-scambi-v2 .afm-v2-actionbar{
  background:linear-gradient(180deg,#081b2b,#071827)!important;
  border-color:#2e4a60!important;
 }
}

/* AFM V1422 — Mobile two-roster UX.
   One continuous vertical page scroll; no nested scroll containers.
   Compact market chrome and actionable footer. Theme and desktop untouched. */
@media(max-width:719px){
  html:has(body.afm-scambi-v2){scroll-behavior:auto!important;overflow-x:hidden!important}
  body.afm-trades.afm-scambi-v2{overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  body.afm-scambi-v2 .afm-v2-shell{
    padding:2px 9px 146px!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  /* AFM already provides the club and Scambi heading in its app header. */
  body.afm-scambi-v2 .afm-v2-header{padding:2px 1px 0!important}
  body.afm-scambi-v2 .afm-v2-topline{display:none!important}
  body.afm-scambi-v2 .afm-v2-info{display:none!important}
  body.afm-scambi-v2 #marketState{
    margin:5px 0 8px!important;
    padding:7px 10px!important;
    font-size:11px!important;
    min-height:0!important;
  }
  body.afm-scambi-v2 #tradeCreate>summary{
    padding:5px 3px 8px!important;
    min-height:31px!important;
    font-size:13px!important;
  }
  body.afm-scambi-v2 #tradeCreate>summary small{display:none!important}
  body.afm-scambi-v2 .afm-v2-clubs{padding:5px!important;border-radius:13px!important;gap:3px!important}
  body.afm-scambi-v2 .afm-v2-club{min-height:50px!important;padding:5px 4px!important;gap:5px!important;border-radius:9px!important}
  body.afm-scambi-v2 .afm-v2-club label{font-size:9px!important;margin-bottom:3px!important}
  body.afm-scambi-v2 .afm-v2-club select{
    min-height:35px!important;height:35px!important;
    padding:5px 19px 5px 6px!important;
    font-size:11px!important;
  }
  body.afm-scambi-v2 .afm-v2-swap{font-size:18px!important}
  body.afm-scambi-v2 .afm-v2-hint{padding:6px 3px!important;font-size:10px!important}
  body.afm-scambi-v2 .afm-v2-hintpill{display:none!important}
  body.afm-scambi-v2 .afm-v2-sides{gap:7px!important;align-items:start!important}
  body.afm-scambi-v2 .afm-v2-side{min-width:0!important;gap:5px!important}
  body.afm-scambi-v2 .afm-v2-side>header{padding:7px 6px!important;border-radius:11px!important}
  body.afm-scambi-v2 .afm-v2-side-title{margin-bottom:5px!important}
  body.afm-scambi-v2 .afm-v2-side-title b{font-size:12px!important}
  body.afm-scambi-v2 .afm-v2-side-title small{font-size:9px!important;padding:2px 5px!important}
  body.afm-scambi-v2 .afm-v2-filters select{min-height:36px!important;height:36px!important;font-size:11px!important}
  body.afm-scambi-v2 .afm-v2-search-toggle{height:36px!important;min-height:36px!important;width:34px!important;min-width:34px!important}
  /* Critical: let the entire document respond to one vertical finger gesture. */
  body.afm-scambi-v2 .afm-v2-players{
    max-height:none!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
    -webkit-overflow-scrolling:auto!important;
    padding:0 0 5px!important;
    gap:6px!important;
    touch-action:pan-y!important;
  }
  body.afm-scambi-v2 .afm-v2-player{
    min-height:86px!important;
    padding:8px 6px 21px!important;
    gap:6px!important;
    border-radius:11px!important;
    touch-action:pan-y!important;
    user-select:none!important;
    -webkit-user-select:none!important;
    -webkit-tap-highlight-color:transparent!important;
  }
  body.afm-scambi-v2 .afm-v2-player:active:not(:has(input:disabled)){
    border-color:#d0a64d!important;
    background:#153344!important;
  }
  body.afm-scambi-v2 .afm-v2-player-info{gap:3px!important}
  body.afm-scambi-v2 .afm-v2-player-info b{
    white-space:normal!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    font-size:11px!important;
    line-height:1.15!important;
  }
  body.afm-scambi-v2 .afm-v2-player-info small{white-space:nowrap!important;font-size:8px!important}
  body.afm-scambi-v2 .afm-v2-player-info em{font-size:9px!important}
  body.afm-scambi-v2 .afm-v2-fmv{font-size:10px!important}
  body.afm-scambi-v2 .afm-v2-preview:empty{display:none!important}
  /* Compact 2-line control instead of the old 300px overlay. */
  body.afm-scambi-v2 .afm-v2-actionbar{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:calc(74px + env(safe-area-inset-bottom,0px))!important;
    transform:none!important;
    z-index:18!important;
    width:100%!important;
    max-width:none!important;
    min-height:64px!important;
    height:auto!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    padding:7px max(10px,env(safe-area-inset-left,0px)) 7px!important;
    background:rgba(5,20,33,.98)!important;
    border-top:1px solid #2b4559!important;
    box-shadow:0 -4px 14px rgba(0,0,0,.18)!important;
  }
  body.afm-scambi-v2 .afm-v2-summary{
    flex:1 1 auto!important;
    min-width:0!important;
    display:block!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:none!important;
    box-shadow:none!important;
  }
  body.afm-scambi-v2 .afm-v2-summary>div{min-width:0!important}
  body.afm-scambi-v2 .afm-v2-summary b{font-size:11px!important;line-height:1.1!important}
  body.afm-scambi-v2 .afm-v2-summary small{
    margin-top:4px!important;
    font-size:9px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.afm-scambi-v2 #afmV2CashSummary{display:none!important}
  body.afm-scambi-v2 #afmV2Diff{display:none!important}
  body.afm-scambi-v2 .afm-v2-trade-value{display:none!important}
  body.afm-scambi-v2 #tradeRuleState{
    display:none!important;
  }
  body.afm-scambi-v2 #tradeRuleState.bad{
    display:block!important;
    position:absolute!important;
    bottom:100%!important;
    left:8px!important;
    right:8px!important;
    z-index:19!important;
    margin:0!important;
    padding:6px 9px!important;
    max-height:45px!important;
    overflow:auto!important;
    border-radius:9px 9px 0 0!important;
    background:rgba(48,20,34,.96)!important;
    color:#ffd0d2!important;
    font-size:10px!important;
    line-height:1.3!important;
  }
  body.afm-scambi-v2 .afm-v2-actions{
    flex:0 0 auto!important;
    display:flex!important;
    width:auto!important;
    gap:6px!important;
    align-items:center!important;
  }
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-secondary,
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-primary{
    min-height:44px!important;
    height:44px!important;
    min-width:0!important;
    border-radius:11px!important;
    padding:8px!important;
    margin:0!important;
    box-shadow:none!important;
  }
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-secondary{
    width:62px!important;
    font-size:0!important;
  }
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-secondary:after{
    content:"＋ FM";
    font-size:12px!important;
    letter-spacing:0!important;
    font-weight:900!important;
  }
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-primary{
    width:91px!important;
    font-size:12px!important;
  }
  body.afm-scambi-v2 .afm-v2-history{margin-top:16px!important}
}
@media(max-width:375px){
  body.afm-scambi-v2 .afm-v2-player{min-height:80px!important;padding:6px 4px 19px!important;gap:4px!important}
  body.afm-scambi-v2 .afm-v2-avatar{width:31px!important;height:34px!important;min-width:31px!important;flex-basis:31px!important}
  body.afm-scambi-v2 .afm-v2-player-info b{font-size:10px!important}
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-primary{width:80px!important}
  body.afm-scambi-v2 .afm-v2-actions .afm-v2-secondary{width:53px!important}
}