/* ============================================================
   XINGUZINHO_NOTAS_DASHBOARD_V2_SAFE_CSS
   XINGUZINHO_NOTAS_DASHBOARD_PERIODO_CSS_V1
   ============================================================ */

.xnd2-wrap{
  margin-top:16px;
}

.xnd2-loading{
  padding:28px;
  text-align:center;
  color:var(--tema-secundario);
}

.xnd2-periodo-panel{
  margin-top:16px;
}

.xnd2-periodo-body{
  padding:14px 16px;
  display:flex;
  align-items:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.xnd2-periodo-body label{
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:12px;
  font-weight:600;
}

.xnd2-periodo-body input{
  min-width:160px;
}

.xnd2-periodo-info{
  margin-left:auto;
  align-self:center;
  font-size:12px;
  color:var(--tema-secundario);
}

.xnd2-cards{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
}

.xnd2-card{
  border:1px solid rgba(127,127,127,.18);
  border-radius:12px;
  padding:14px;
  background:rgba(127,127,127,.025);
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.xnd2-card span{
  display:block;
  font-size:11px;
  color:var(--tema-secundario);
}

.xnd2-card strong{
  display:block;
  margin-top:5px;
  font-size:26px;
  line-height:1;
}

.xnd2-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:16px;
}

.xnd2-body{
  padding:18px;
}

.xnd2-title{
  font-weight:800;
}

.xnd2-subtitle{
  margin-top:3px;
  color:var(--tema-secundario);
  font-size:12px;
}

.xnd2-bars{
  height:300px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  align-items:end;
  padding-top:18px;
}

.xnd2-bar-item{
  height:100%;
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:center;
  cursor:pointer;
}

.xnd2-bar-value{
  font-size:12px;
  font-weight:800;
  margin-bottom:7px;
}

.xnd2-bar-track{
  width:min(78px,80%);
  height:220px;
  display:flex;
  align-items:flex-end;
  border-radius:9px 9px 3px 3px;
  overflow:hidden;
  background:rgba(127,127,127,.07);
}

.xnd2-bar{
  display:block;
  width:100%;
  min-height:4px;
  border-radius:9px 9px 0 0;
}

.xnd2-bar-label{
  margin-top:9px;
  max-width:120px;
  text-align:center;
  font-size:11px;
  font-weight:700;
}

.xnd2-pie-wrap{
  display:flex;
  justify-content:center;
  padding:20px 0;
}

.xnd2-pie{
  width:220px;
  height:220px;
  border-radius:50%;
  position:relative;
  box-shadow:
    inset 0 0 0 1px rgba(127,127,127,.12);
}

.xnd2-pie::after{
  content:"";
  position:absolute;
  inset:29%;
  border-radius:50%;
  background:#fff;
  box-shadow:
    0 0 0 1px rgba(127,127,127,.10);
}

html[data-theme="dark"]
.xnd2-pie::after{
  background:#111827;
}

.xnd2-legend{
  display:grid;
  gap:8px;
}

.xnd2-legend-row{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  width:100%;
  border:0;
  background:transparent;
  color:inherit;
  padding:5px 0;
  cursor:pointer;
  text-align:left;
}

.xnd2-dot{
  width:10px;
  height:10px;
  border-radius:50%;
}

.xnd2-legend-row span,
.xnd2-legend-row strong{
  font-size:12px;
}

@media(max-width:1100px){

  .xnd2-cards{
    grid-template-columns:
      repeat(3,minmax(0,1fr));
  }

  .xnd2-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:720px){

  .xnd2-periodo-body{
    align-items:stretch;
  }

  .xnd2-periodo-body label,
  .xnd2-periodo-body input,
  .xnd2-periodo-body button{
    width:100%;
  }

  .xnd2-periodo-info{
    width:100%;
    margin-left:0;
  }

  .xnd2-cards{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .xnd2-bars{
    height:250px;
    gap:8px;
  }

  .xnd2-bar-track{
    height:175px;
    width:min(54px,85%);
  }

  .xnd2-bar-label{
    font-size:10px;
  }

  .xnd2-pie{
    width:190px;
    height:190px;
  }
}
