#fenixTournamentBarV2{
  display:none;
  height:68px;
  padding:0 24px;
  align-items:center;
  gap:13px;
  background:#fff;
  border-bottom:1px solid #e3e7ed;
  box-shadow:0 2px 10px rgba(16,24,40,.035);
  color:#111a2e;
}

#fenixTournamentBarV2.visible{
  display:flex;
}

.ftb-logo{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #ffd6b2;
  border-radius:11px;
  background:#fff6ed;
  color:#d85c00;
  font-size:10px;
  font-weight:950;
  letter-spacing:.04em;
}

.ftb-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.ftb-info{
  min-width:0;
}

.ftb-name{
  display:block;
  max-width:430px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
  font-weight:950;
  line-height:1.15;
}

.ftb-meta{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:5px;
  color:#697386;
  font-size:10.5px;
  font-weight:650;
}

.ftb-sep{
  color:#c5cad2;
}

.ftb-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-left:8px;
  padding:5px 9px;
  border-radius:999px;
  background:#f2f4f6;
  color:#5d6675;
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}

.ftb-status::before{
  content:'';
  width:7px;
  height:7px;
  border-radius:50%;
  background:#9ba4af;
}

.ftb-status.live{
  background:#fff0ed;
  color:#b73a20;
}

.ftb-status.live::before{
  background:#e6542f;
}

.ftb-spacer{
  flex:1;
}

.ftb-back{
  border:1px solid #dde2e8;
  border-radius:9px;
  padding:8px 11px;
  background:#fff;
  color:#344054;
  font:inherit;
  font-size:10.5px;
  font-weight:850;
  cursor:pointer;
}

.ftb-back:hover{
  background:#f7f8fa;
}

@media(max-width:700px){
  #fenixTournamentBarV2{
    height:60px;
    padding:0 12px;
    gap:9px;
  }

  .ftb-logo{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .ftb-name{
    max-width:52vw;
    font-size:13px;
  }

  .ftb-location,
  .ftb-sport,
  .ftb-back{
    display:none;
  }

  .ftb-status{
    margin-left:auto;
  }
}

/* =====================================================
   FENIX APP SHELL POLISH
   ===================================================== */

/* Actief toernooi staat voortaan in de horizontale header */
#activeTournamentSidebar{
  display:none!important;
}

/* Nieuwe scheiding in sidebar */
.side-nav-divider{
  height:1px;
  margin:10px 12px;
  background:#e7e9ed;
}

/* Extra beheeronderdelen identiek aan hoofdnavigatie */
.side-nav-link{
  width:100%;
  min-height:43px;
  display:flex;
  align-items:center;
  gap:11px;

  padding:9px 13px;

  border:0;
  border-radius:9px;

  background:transparent;
  color:#394457;

  font:inherit;
  font-size:12px;
  font-weight:750;

  text-align:left;
  cursor:pointer;
}

.side-nav-link:hover{
  background:#fff5ec;
  color:#c95700;
}

.side-nav-link .nav-icon{
  width:18px;
  flex:0 0 18px;
  text-align:center;
  color:#6c7686;
}

/* Dubbele terugknop rechtsboven niet meer nodig */
#topTournamentActions #backHomeBtn{
  display:none!important;
}

/* Oude bovenste inschrijvingenknop ook dubbel */
#topTournamentActions button[onclick="openRegistrationManager()"]{
  display:none!important;
}

/* Dashboard heeft al een vaste linkernavigatie */
#plannerStartCard .planner-start-actions button.secondary[onclick="openRegistrationManager()"]{
  display:none!important;
}

/* Tournament bar hoort bij de werkruimte */
#fenixTournamentBarV2{
  margin-left:0;
  height:64px;
  padding-left:20px;
  padding-right:20px;

  border-radius:0;
  box-shadow:none;
}

/* Headernaam iets prominenter */
.ftb-name{
  font-size:16px;
  letter-spacing:-.015em;
}

/* Actief is informatief, niet schreeuwerig */
.ftb-status{
  background:#f2f4f6;
  color:#596273;
}

/* De sportbadge wordt subtieler */
.ftb-logo{
  background:#fff7ef;
  border-color:#ffd9b8;
}

/* Procesbalk sluit visueel direct aan */
#plannerJourney{
  margin-top:0!important;
}

@media(max-width:760px){
  .side-nav-divider{
    margin:8px;
  }
}


#ftbBack{
  display:none!important;
}


/* =====================================================
   TOURNAMENT BAR POSITION FIX
   Header hoort bij de rechter werkruimte, niet onder sidebar
   ===================================================== */

@media(min-width:761px){

  #fenixTournamentBarV2{
    box-sizing:border-box!important;

    /* huidige Fenix sidebar */
    margin-left:140px!important;
    width:calc(100% - 140px)!important;

    height:64px!important;
    padding:0 20px!important;

    position:relative!important;
    z-index:20!important;

    border-left:0!important;
    border-bottom:1px solid #e3e7ed!important;
  }

  .ftb-info{
    min-width:0!important;
  }

  .ftb-name{
    max-width:520px!important;
  }
}

/* Op mobiel weer volledige breedte */
@media(max-width:760px){

  #fenixTournamentBarV2{
    margin-left:0!important;
    width:100%!important;
  }
}


/* Definitieve uitlijning tournament header */
@media(min-width:761px){

  #fenixTournamentBarV2{
    margin-left:0!important;
    width:auto!important;

    /* sidebar is onderdeel van appShell-grid:
       header zelf uitlijnen op de contentkolom */
    padding-left:24px!important;

    min-height:62px!important;
    height:62px!important;

    overflow:visible!important;
  }

  .ftb-name{
    max-width:560px!important;
    font-size:16px!important;
    line-height:1.15!important;
  }

  .ftb-meta{
    margin-top:4px!important;
  }
}


/* =====================================================
   DEFINITIEVE GRID-POSITIE
   ===================================================== */

@media(min-width:761px){

  #fenixTournamentBarV2{
    grid-column:2 / -1!important;
    grid-row:auto!important;

    margin:0!important;
    width:100%!important;
    max-width:none!important;

    height:62px!important;
    min-height:62px!important;

    padding:0 20px!important;

    position:relative!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;

    overflow:visible!important;
    box-sizing:border-box!important;

    border-bottom:1px solid #e3e7ed!important;
  }

  #plannerJourney{
    grid-column:2 / -1!important;
  }
}


/* =====================================================
   FENIX GLOBAL HEADER ALIGNMENT
   Logo links uitlijnen met applicatiesidebar
   ===================================================== */

@media(min-width:761px){

  header{
    padding-left:16px!important;
    padding-right:20px!important;
  }

  header .brandbar{
    width:100%!important;
    max-width:none!important;
    margin:0!important;

    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:16px!important;
  }

  /* Fenix-logo uiterst links */
  header .fenix-public-brand{
    flex:0 0 auto!important;
    margin:0!important;
  }

  /*
   * Account direct na logo.
   * Geen automatische marge meer die het blok wegduwt.
   */
  header .auth-user-area{
    margin-left:18px!important;
    flex:0 0 auto!important;
  }

  /*
   * Undo / redo krijgt de middenzone.
   * Daardoor blijven de rechteracties ook werkelijk rechts.
   */
  header .history-actions{
    margin-left:auto!important;
    margin-right:auto!important;
    flex:0 0 auto!important;
  }

  /* Publieksscherm / Upgrade / Account */
  header .top-tournament-actions{
    margin-left:0!important;
    flex:0 0 auto!important;
    justify-content:flex-end!important;
  }
}


/* Slimme toernooistatus */

.ftb-status.draft{
  background:#f2f4f6;
  color:#596273;
}
.ftb-status.draft::before{
  background:#98a2b3;
}

.ftb-status.published{
  background:#eef4ff;
  color:#315ea8;
}
.ftb-status.published::before{
  background:#4d7fd1;
}

.ftb-status.unlisted{
  background:#fff6e8;
  color:#915600;
}
.ftb-status.unlisted::before{
  background:#e49a22;
}

.ftb-status.registration{
  background:#edf8f2;
  color:#176a45;
}
.ftb-status.registration::before{
  background:#20a367;
}

.ftb-status.live{
  background:#fff0ed;
  color:#b83a20;
}
.ftb-status.live::before{
  background:#e6542f;
}

.ftb-status.completed{
  background:#eef0f3;
  color:#414b5a;
}
.ftb-status.completed::before{
  background:#596273;
}
