/* Complementos da edição offline modular. */
.escudo-preview-caf{display:flex;align-items:center;gap:10px;margin-top:4px;padding:9px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg3);color:var(--text3)}
.escudo-preview-caf img{width:52px;height:52px;box-sizing:border-box;object-fit:contain;object-position:center;padding:6px;border-radius:50%;background:#f5f5f5;border:1px solid var(--border2)}
.team-logo,.team-logo-tbl{box-sizing:border-box;object-fit:contain;object-position:center;padding:3px;background:#f5f5f5}
.team-logo{width:30px;height:30px}
.team-logo.team-logo-sm{width:22px;height:22px}
.team-logo-tbl{width:28px;height:28px}
.escudo-field-actions{display:flex;gap:6px;align-items:stretch}
.escudo-field-actions .form-control{min-width:0;flex:1;color:var(--text3);cursor:default}
.escudo-field-actions .btn{white-space:nowrap}
.modal-seletor-escudo{width:min(920px,94vw);max-width:920px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden}
.escudo-search-row{display:flex;gap:10px;align-items:center;margin-bottom:9px}
.escudo-search-box{position:relative;flex:1}
.escudo-search-box>i{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--text4);pointer-events:none}
.escudo-search-box .form-control{padding-left:38px}
.escudo-lista-info{margin:0 0 10px;font-size:.76rem;line-height:1.45}
.escudo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));gap:10px;padding:3px 3px 12px;min-height:190px;max-height:50vh;overflow:auto;align-content:start}
.escudo-gallery-card{position:relative;display:flex;min-width:0;min-height:170px;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:13px 9px;border:1px solid var(--border2);border-radius:var(--radius);background:var(--bg3);color:var(--text);cursor:pointer;transition:border-color .16s,background .16s,transform .16s,box-shadow .16s;font-family:var(--font-cond)}
.escudo-gallery-card:hover,.escudo-gallery-card:focus-visible{border-color:var(--red);background:var(--bg4);transform:translateY(-2px);outline:none}
.escudo-gallery-card.selected{border-color:var(--red);box-shadow:0 0 0 1px var(--red),0 8px 20px rgba(227,6,32,.14);background:rgba(227,6,32,.06)}
.escudo-gallery-card img{width:86px;height:86px;box-sizing:border-box;object-fit:contain;object-position:center;padding:10px;border:1px solid rgba(0,0,0,.12);border-radius:50%;background:#f5f5f5;filter:drop-shadow(0 5px 7px rgba(0,0,0,.4))}
.escudo-gallery-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;font-size:.84rem;font-weight:700;letter-spacing:.6px}
.escudo-gallery-card small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text4);font-size:.62rem;text-transform:none}
.escudo-gallery-check{display:none;position:absolute;right:8px;top:8px;color:var(--red);font-size:1.05rem;background:#fff;border-radius:50%}
.escudo-gallery-card.selected .escudo-gallery-check{display:block}
.escudo-gallery-card.arquivo-ausente{opacity:.5}
.escudo-gallery-empty{grid-column:1/-1;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--text4);font-family:var(--font-cond);letter-spacing:.5px}
.escudo-gallery-empty i{font-size:1.8rem}
#caf-mobile-menu{display:none;position:fixed;left:12px;bottom:14px;z-index:510;width:46px;height:46px;border-radius:50%;border:1px solid var(--red);background:var(--red);color:#fff;box-shadow:var(--shadow);cursor:pointer}
#caf-mobile-overlay{display:none;position:fixed;inset:58px 0 0;background:rgba(0,0,0,.58);z-index:398}
@media(max-width:700px){
  #caf-mobile-menu{display:block}
  #sidebar.mobile-open{width:235px!important;overflow:visible!important;position:fixed!important;left:0;top:58px;bottom:0;z-index:500;box-shadow:10px 0 30px rgba(0,0,0,.65)}
  #caf-mobile-overlay.active{display:block}
  #app-header{height:auto;min-height:58px;padding:7px 10px;align-items:flex-start}
  #header-nav{max-height:92px;overflow:auto}
  .escudo-field-actions{flex-wrap:wrap}
  .escudo-field-actions .form-control{flex-basis:100%}
  .modal-seletor-escudo{width:96vw;max-height:92vh;padding:14px}
  .escudo-search-row{align-items:stretch;flex-direction:column}
  .escudo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));max-height:52vh}
  .escudo-gallery-card{min-height:145px;padding:10px 6px}
  .escudo-gallery-card img{width:72px;height:72px;padding:8px}
}

/* Padronização CAF: nomes de técnicos, times e competições sempre em maiúsculo. */
#inp-jogador-nome, #inp-jogador-time, #inp-comp-nome,
.comp-name, .match-team, .rank-name, .player-cell,
.mm-select, .bracket-team, .beirao-slot-name, .sidebar-comp-name {
  text-transform: uppercase;
}

/* Organização da galeria de escudos por país ou categoria */
.escudo-categories{display:flex;gap:7px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:thin;flex:0 0 auto}
.escudo-category-btn{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;border:1px solid var(--border2);border-radius:999px;padding:7px 11px;background:var(--bg3);color:var(--text3);font-family:var(--font-cond);font-size:.72rem;font-weight:700;letter-spacing:.5px;cursor:pointer;transition:border-color .16s,background .16s,color .16s}
.escudo-category-btn:hover,.escudo-category-btn:focus-visible{border-color:var(--red);color:var(--text);outline:none}
.escudo-category-btn.active{border-color:var(--red);background:var(--red);color:#fff}
.escudo-category-btn small{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:rgba(255,255,255,.12);font-size:.62rem;color:inherit}
.escudo-category-btn:not(.active) small{background:var(--bg4);color:var(--text4)}
