:root{
  --fe-radius-sm:3px;
  --fe-radius-md:9px;
  --fe-radius-lg:20px;
  --fe-shadow-text:2px 2px 4px #000;
  --fe-shadow-heavy:3px 3px 5px rgba(0,0,0,.9);
  --fe-font:'Roboto Condensed', sans-serif;
  --fe-font-alt:'Roboto', sans-serif;
  --fe-transition:.2s ease-in-out;
--footerHeightValue: 50;
--footerHeight: calc(var(--footerHeightValue) * 1px);
--iframeHeight: calc(150px + (var(--footerHeightValue) * 1px));
}

*{transition:filter var(--fe-transition), background-color var(--fe-transition), color var(--fe-transition), opacity var(--fe-transition), transform var(--fe-transition);}

html{ height:100%;}
html,body{ margin:0;  padding:0;  font-family:var(--fe-font);}

body.frontend-shell{  min-height:100%;  height:100%!important;  background:var(--fe-bg,#FF662E)!important;  color:var(--fe-text-invert,#fff);}
body.frontend-page{color:var(--fe-text,#000); background:var(--fe-surface,#fff); text-align:center;}
body.frontend-shell{ height:100%!important; background:var(--fe-bg,#FF662E)!important; color:var(--fe-text-invert,#fff);}

/* Links / icon buttons used in index.php */
.frontend-shell .tit{font-weight:400;font-size:16pt;}
.frontend-shell .subTit{font-weight:900;font-size:13pt;}
.frontend-shell .cat{}
.frontend-shell .medals{height:35pt;width:auto;border:0;margin:1px 5px;}
.frontend-shell .podium,.frontend-shell a.podium:active,.frontend-shell a.podium:hover,.frontend-shell a.podium:visited{ text-decoration:none; color:var(--fe-text-invert,#fff);}
.frontend-shell iframe{ width:100%; height:calc(100% - var(--iframeHeight))!important; border:0; background-color:var(--fe-bg-dark,#000);}
.frontend-shell footer{ text-align:center; width:100%; font-size:10pt; height: var(--footerHeight);}
.frontend-shell .links,.frontend-shell a.links:active,.frontend-shell a.links:hover,
.frontend-shell a.links:visited{ text-decoration:none; color:var(--fe-text,#000); font-weight:700; padding:5px; border-radius:var(--fe-radius-sm);
  margin:5px; font-size:9pt; width:35px; display:inline-block; text-align:center;}
.frontend-shell .pink,.frontend-shell .blue{background-color:var(--fe-surface,#fff);}

.disabled-link{ color:var(--fe-disabled-text,#aaa); font-style:italic; padding:6px 12px; display:inline-block; cursor:not-allowed; text-decoration:none;}

select{ background:var(--fe-surface,#fff); color:var(--fe-text,#000); border:1px solid var(--fe-text,#000); border-radius:var(--fe-radius-lg);
  padding:10px 20px; font-family:var(--fe-font-alt); font-weight:500; height:40px;}

.floating-hint{ position:absolute; top:0; left:26px; width:60px; text-align:center; font-family:var(--fe-font-alt); font-size:11px;
  font-weight:700; color:var(--fe-text-invert,#fff); animation:floaty 2s ease-in-out infinite; z-index:1000; cursor:pointer;}
@keyframes floaty{ 0%{transform:translateY(0);} 50%{transform:translateY(6px);} 100%{transform:translateY(0);}}

/* Shared buttons */
.fe-btn,button{ margin:5px; padding:10px 15px; border:none; border-radius:var(--fe-radius-lg); background:var(--fe-bg-dark,#000);
  color:var(--fe-text-invert,#fff); font-weight:700; cursor:pointer;}
button:hover,button:active,.fe-btn:hover{ background:var(--fe-primary-hover,#FF662E)!important; color:var(--fe-text-invert,#fff)!important;}
button:disabled{ background:var(--fe-disabled-bg,#ccc)!important; color:var(--fe-disabled-text-dark,#666)!important; cursor:not-allowed;}

/* Arquivo */
body.archive-page{ text-align:center; background:var(--fe-surface,#fff);}
.archive-page h1{ margin:70px 40px 0 40px; font-size:28px; font-weight:700; border-top:1px solid var(--fe-text,#000); text-align:left;}
.archive-page h2{
  margin:30px 40px 0 40px;
  font-weight:700;
  text-align:left;
  background:linear-gradient(180deg, var(--fe-surface-soft,#f7f7f7) 0%, var(--fe-surface,#fff) 60%);
  border-radius:var(--fe-radius-lg) var(--fe-radius-lg) 0 0;
  padding:0 10px;
}
.archive-page h2:first-of-type{
  font-weight:200;
  font-size:12pt;
  background:none;
}
.archive-page h3{
  margin:10px 40px;
  font-size:14pt;
  font-weight:200;
  text-align:left;
}
.archive-page .bt1{background-color:var(--fe-bg-dark,#000)!important;}
.archive-page .bt2{background-color:var(--fe-muted-button-bg,#ccc)!important;color:var(--fe-text,#000);}
.archive-page .bt3{ background-color:var(--fe-surface-muted,#f1f1f1)!important; color:var(--fe-text,#000); width:150px; min-width:70px;}
.archive-page .bt3:hover img, .archive-page .bt3.bt-active img{filter:brightness(0) invert(1);}
.archive-page .bt4{ position:relative; font-weight:900; font-size:16pt; margin:5px 10px; background:none; padding:0; color:var(--fe-year-text,#A2A2A2); min-width:70px; width:70px;
  font-family:var(--fe-font-alt);}
.archive-page .bt4:hover{ background:none!important; color:var(--fe-text,#000)!important;}

.archive-page .linha{
  position:absolute;
  top:-5px;
  left:50%;
  width:1px;
  height:10px;
  background:var(--fe-text,#000);
  transform:translate(-50%,-50%);
}
.archive-page .years-bar{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin:0;
  position:sticky;
  top:0;
  background:var(--fe-surface,#fff);
  z-index:10;
  padding:0;
}
.archive-page .bt4.bt-active{ color:var(--fe-text,#000)!important; font-weight:900;}
.archive-page .bt2.bt-active, .archive-page .bt3.bt-active{ background:var(--fe-primary,#FF662E)!important; color:var(--fe-text-invert,#fff)!important;}
.archive-page .bt3:hover{  background:var(--fe-primary,#FF662E)!important; color:var(--fe-text-invert,#fff)!important;}
.archive-page .hidden{display:none;}
.archive-page iframe{
  width:95%;
  height:70vh;
  border:1px solid var(--fe-border,#ccc);
  margin-top:20px;
  border-radius:var(--fe-radius-lg);
}
.archive-page iframe.hidden{display:none;}
.archive-page .button-container{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:10px;
  margin:0 30px;
}
.archive-page .pdf-section{margin-bottom:40px;}


/* Folhas */
body.folhas-page{
  margin:0;
  background:var(--fe-page-muted,#f5f5f5);
  color:var(--fe-text,#000);
  font-family:var(--fe-font);
}

.folhas-page .voltar{
  position:fixed;
  top:15px;
  left:15px;
  z-index:20;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:var(--fe-radius-lg);
  background:var(--fe-bg-dark,#000);
  color:var(--fe-text-invert,#fff);
  text-decoration:none;
  font-weight:700;
  font-size:10pt;
}

.folhas-page .voltar img{  width:18px;  height:auto;  filter:brightness(0) invert(1);}

.folhas-page .download-btn{
  position:fixed;
  top:15px;
  right:15px;
  z-index:20;
  width:44px;
  height:44px;
  padding:10px;
  border-radius:50%;
}

.folhas-page .download-btn img{  width:22px;  height:auto;  filter:brightness(0) invert(1);}

.folhas-page .file-viewer{ width:100%;  height:100vh;  padding-top:70px;  box-sizing:border-box;}

.folhas-page .file-viewer embed,.folhas-page .file-viewer img{  width:100%;  height:calc(100vh - 70px);  border:0;  object-fit:contain;}


/* Erro das folhas */
body.folhas-error-page{
  margin:0;
  padding:20px;
  font-family:var(--fe-font);
  background:var(--fe-page-muted,#f5f5f5);
  text-align:center;
  color:var(--fe-error-text,#333);
}

.folhas-error-page .error-box{
  max-width:520px;
  margin:80px auto;
  padding:30px;
  background:var(--fe-surface,#fff);
  border-radius:var(--fe-radius-lg);
  box-shadow:0 5px 20px rgba(0,0,0,.08);
  font-weight:700;
}

.folhas-error-page small{  font-weight:400;  color:var(--fe-text-muted,#858585);}

.MFstyle{display: flex;font-size: 7pt; font-weight: 300; color: #333; margin: 2px -8px -6px -8px; background: #eee; padding: 3px 0 2px 0; gap: 8px; justify-content: center;height: 13px; align-items: center;}

/* Tatami */
body.tatami-page{ margin:0; min-height:100vh; background:var(--fe-surface,#fff); color:var(--fe-text,#000); font-family:var(--fe-font); text-align:center;}
.tatami-page .container{ min-height:100vh; display:flex; align-items:center; justify-content:center; gap:30px; padding:30px; box-sizing:border-box;}
.tatami-page .column{ display:flex; flex-direction:column; gap:16px; min-width:140px; max-width:220px;}
.tatami-page .tatami-img{ flex:1; display:flex; align-items:center; justify-content:center;}
.tatami-page .tatami-img img{ max-width:100%; max-height:90vh; height:auto;}
.tatami-page .tatami-list{ background:var(--fe-surface-soft,#f7f7f7); border-radius:var(--fe-radius-lg); padding:10px 14px; text-align:left;}
.tatami-page .tatami-list h3{  margin:0 0 8px 0;  font-size:13pt;  font-weight:900;}
.tatami-page .tatami-list ul{  margin:0;  padding-left:18px;}
.tatami-page .tatami-list li{  font-weight:700;  font-size:10pt;  line-height:1.35;}
.tatami-page .all-cats{  display:none;}

@media (max-width:800px){  
  .tatami-page .container{  flex-direction:column; }
  .tatami-page .side{  display:none;  }
  .tatami-page .all-cats{    display:flex;    flex-wrap:wrap;    justify-content:center;    gap:12px;  }
}


/* Classificações gerais */
body.class-page{
  height:100%;
  width:100%;
  background:var(--fe-bg-dark,#000);
  font-family:var(--fe-font);
}
.class-page .container{
  max-width:100%!important;
  padding-left:40px!important;
  padding-right:40px!important;
}
.class-page .card-transparent{opacity:.4;}
.class-page .folha-link{
  font-size:.8rem;
  margin-left:8px;
  float:right;
}
.class-page .folha-link img{
  width:18px;
  vertical-align:middle;
}

/* Jornadas */
body.jornadas-page{ text-align:center; background:var(--fe-surface,#fff); padding-bottom: 10px}
.jornadas-page table{
  border-collapse:collapse;
  margin:10px auto;
}
.jornadas-page th,
.jornadas-page td{
  border:1px solid var(--fe-border,#ccc);
  padding:6px 8px;
  text-align:left;
  color:var(--fe-text,#000);
}
.jornadas-page th{
  background:var(--fe-table-head-bg,#f4f4f4);
  color:var(--fe-text,#000)!important;
}
.jornadas-page .general-table td:first-child,.jornadas-page .general-table th:first-child{ background:var(--fe-surface,#fff); border-top:none; border-left:none;}
.jornadas-page .general-table td.center,.jornadas-page .general-table th.center{text-align:center;}
.jornadas-page .general-table td.right,.jornadas-page .general-table th.right{  text-align:right; font-weight:bold;}
.jornadas-page .general-table tr:last-child td{ font-weight:bold; background:var(--fe-table-head-bg,#f4f4f4);}

.jornadas-page .section{display:block; margin-top:50px;}
.jornadas-page .tabelasHome{width:440px;}
.jornadas-page .aTDtabelasHome{ width:200px; border-left:1px solid var(--fe-border,#ccc)!important;}

.jornadas-page .total{
  margin:40px 0;
  display:flex;
  flex-flow:row wrap;
  justify-content:center;
  align-items:stretch;
}
.jornadas-page .total div{text-align:left;}
.jornadas-page .totClub{
  font-weight:500;
  height:60px;
  border-right:1px solid var(--fe-text,#000);
  margin-bottom:15px;
  padding:0 15px;
  align-content:center;
}
.jornadas-page .debug-box{
  background:var(--fe-debug-bg,#eee);
  padding:10px;
  font-family:monospace;
  margin:10px auto;
  width:max-content;
  text-align:left;
}

/* Próximos combates */
body.nextm-page{
  height:100%;
  width:100%;
  background:var(--fe-bg-dark,#000);
  font-family:var(--fe-font);
}
.nextm-page table{
  width:100%;
  border:0;
}
.nextm-page .tapete{
  color:var(--fe-text-invert,#fff);
  text-align:center;
  font-weight:900;
  flex-grow:1;
}
.nextm-page .combate{
  border-radius:var(--fe-radius-md);
  border:1px solid var(--fe-bg-dark,#000);
  background:var(--fe-surface,#fff);
  vertical-align:top;
  animation:slideUp .6s ease-out forwards;
}
@keyframes slideUp{
  from{transform:translateY(100%);opacity:0;}
  to{transform:translateY(0);opacity:1;}
}
.nextm-page .combNr{font-weight:900;font-size:16pt;}
.nextm-page .cat{font-weight:700;font-size:12pt;margin-left:10px;}
.nextm-page .ult{font-weight:400;font-size:10pt;}
.nextm-page .nome{font-size:15pt;font-weight:700;}
.nextm-page .clube{font-weight:400;}
.nextm-page .judoka{
  padding:5px;
  border:none;
  flex-grow:1;
  width:46%;
  height:65px;
  vertical-align:middle;
}
.nextm-page .mensagem{
  font-size:22pt;
  font-weight:700;
  color:var(--fe-text-invert,#fff);
  text-shadow:var(--fe-shadow-text);
  display:flex;
  height:100%;
  width:100%;
  align-content:center;
  justify-content:center;
  align-items:center;
}
.nextm-page .FINAL{
  display:flex;
  flex-flow:column wrap;
  justify-content:center;
  align-content:center;
  gap:20px;
}
.nextm-page .FINAL div{
  padding:40px 60px;
  background:var(--fe-overlay-bg,rgba(0,0,0,.9));
  border-radius:var(--fe-radius-lg);
}
.nextm-page .FINAL div span{font-weight:100;}
.nextm-page .pulse{animation:pulse 2s infinite;}
@keyframes pulse{
  0%,100%{opacity:.9;}
  50%{opacity:.4;}
}



/* Responsive */
@media (min-width:1200px){ .class-page .col-xl-5{flex:0 0 20%;max-width:20%;}}
@media (min-width:1600px){ .class-page .col-1600-6{flex:0 0 16.6667%;max-width:16.6667%;}}
@media (min-width:1800px){ .class-page .col-1800-7{flex:0 0 14.2857%;max-width:14.2857%;}}
@media (min-width:2000px){ .class-page .col-2000-8{flex:0 0 12.5%;max-width:12.5%;}}
@media (min-width:2200px){ .class-page .col-2200-9{flex:0 0 11.1111%;max-width:11.1111%;}}
@media (max-width:1000px){ .archive-page .bt3{width:120px;}}
@media (max-width:800px){
  .archive-page .bt3{width:100px;}
  .nextm-page .nome{font-size:15pt;}
}
@media (max-width:600px){
  .archive-page iframe{height:60vh;}
  .archive-page .bt3{width:90px;padding:10px 5px;}
  .archive-page button{margin:0;}
  .nextm-page .nome{font-size:14pt;}
}
@media (max-width:300px){
  .class-page .col-12.col-sm-6.col-md-4.col-lg-3.col-xl-5{ flex:0 0 100%; max-width:100%; }
  .class-page .container{ padding-left:20px!important; padding-right:20px!important; }
}
