/* Nav Bar */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: medium;
}

body{
    min-height: 100vh;
    display: flex;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 40%, #000 100%);
    color: #e5e7eb;
}

main{
    padding: 20px;
}

#sidebar{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #021f12;
    height: 100vh;
    border-radius: 0px 18px 18px 0px;
    position: relative;
}

#sidebar_content{
    padding: 24px;
}

#user{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

#user_avatar{
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

#user_infos{
    display: flex;
    flex-direction: column;
}

#user_infos samp:last-child {
    color: #6b6b6b;
    font-size: 30px;
}

#side_items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.side-item{
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
}

.side-item.active {
    background: #5049b5;
}

.side-item:hover:not(.active),
#logout_btn:hover{
    background-color: #e3e9f7;
}

.side-item a{
    text-decoration: none;
    display: flex;
    gap: 14px;
    color: #181818;
}

.side-item.active a{
    color: #e3e9f7;
}

.side-item a i{
    display: flex;
    
}

#logout{
    border-top: 2px solid #e3e9f7;
    padding: 12px;
}

#logout_btn{
    border: none;
    padding: 12px;
    font-size: 14px;
    display: flex;
    gap: 5px;
    align-items: center;
    border-right: 8px;
    text-align: start;
    cursor: pointer;
    background-color: transparent;

}

#open_btn{
    position: absolute;
    top: 30px;
    right: -10px;
    background-color: #a8a7ba;
    color: #e3e9f7;
    border-radius: 100%;
    width: 35px;
    height: 35px;
    border: 10px;
    cursor: pointer;
}

#open_btn_icon {
    transition: transform .3s ease;
}

.open-sidebar #open_btn_icon {
    transform: rotate(180deg);
}

/* aquie exixte um problema de recuo do buton apos clicar*/
.item-description {
    width: 3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 20px;
    transition: width .6s;
    height: 0px;
}

#sidebar.open-sidebar {
    min-width: 15%;
    background-color: rgb(23, 28, 28);
}

#sidebar.open-sidebar .item-description {
    width: 150px;
    height: auto;
}


/*********Inicio do CSS para o controle de Botoes da pagina Dispositivos********/

/* Reset */
* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
}

body {
  font-size: 1.6rem;
  font-family: sans-serif;
}

body,
html {
  height: 100%;
}

/* Apenas o container */
.container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  min-height: 100%;
}

/* Aqui comença o Toggler On/Off */
.toggle-wrapper {
  display: flex;
  align-items: center;
}

/* Texto que decidi adicionar como exemplo */
.toggle-wrapper .description {
  margin-left: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.2rem;
  font-size: 1.4rem;
}

/* Esconde o checkbox */
.switch > .hidden-toggle {
  display: none;
}

/* Caixinha onde o botão desliza */
.switch > .slider {
  background: #e0e2db;
  border: 0.5rem solid #bbb;
  cursor: pointer;
  border-radius: 3rem;
  transition: all 300ms ease-in-out;
  width: 12rem;/* Comprimento do botão */
  height: 6rem;/* Altura do botão */
  position: relative;
  box-shadow: inset -0.5rem 0.5rem 0.5rem rgba(0, 0, 0, 0.2),
    0 0 1rem rgba(0, 0, 0, 0.1);
}

/* O botão redondinho */
.switch > .slider > .button {
  content: "";
  position: absolute;
  width: 4.5rem;
  height: 4.3rem; /* Tamanho do botão interno */
  background: #690b0b;
  top: 0.4rem;
  left: 0.5rem;
  transition: all 300ms ease-in-out;
  border-radius: 50%;
  z-index: 2;
  box-shadow: inset -0.5rem 0.5rem 0.5rem rgba(0, 0, 0, 0.2);
}

/* Texto ON ou OFF (começa off) */
.switch > .slider:after {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translate(0, -50%);
  font-size: 2.3rem;
  line-height: 2.3rem;
  color: #444;
  font-weight: bold;
  z-index: 1;
  transition: all 300ms ease-in-out;
  content: "OFF";
}

/* Slider ON */
.switch > .hidden-toggle:checked ~ .slider {
  background: #4615b2;
  box-shadow: inset 0.5rem 0.5rem 0.5rem rgba(0, 0, 0, 0.2),
    0 0 1rem rgba(50, 0, 150, 0.2);
}

/* Botão ON */
.switch > .hidden-toggle:checked ~ .slider > .button {
  left: 6.1rem;/* deslocamento do botao interno */
  box-shadow: inset 0.5rem 0.5rem 0.5rem rgba(0, 0, 0, 0.2);
  background: #0df415;
}

/* Texto ON */
.switch > .hidden-toggle:checked ~ .slider:after {
  right: 6.4rem;/* deslocamento do descritivo ON interno */
  color: #f1f1ff;
  content: "ON";
}
/*********Fim do CSS para o controle de Botoes da pagina Dispositivos********/


/*********Inicio do CSS para os Gauges ********/
.gauges{display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;margin-top:18px}
.gauge-card{background:#0b1f16;
  border:1px solid rgba(46,204,113,.25);
  border-radius:14px;
  padding:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.25)}
.gauge-title{color:#dff7ea;
  font:600 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial;
  margin-bottom:12px;
  letter-spacing:.2px}
.gauge{width:100%;
  max-width:320px}
.gauge__body{width:100%;
  aspect-ratio:2/1;
  background:rgba(255,255,255,.06);
  border-radius:999px 999px 0 0;
  position:relative;overflow:hidden}
.gauge__fill{position:absolute;
  inset:0;transform-origin:center bottom;
  transform:rotate(0turn);
  background:linear-gradient(90deg,#16a34a,#22c55e,#84cc16);
  transition:transform .6s ease}
.gauge__cover{width:78%;
  height:78%;
  background:#07160f;
  border-radius:999px 999px 0 0;
  position:absolute;top:22%;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  padding:0 0 18px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.gauge__value{color:#eafff3;
  font:700 28px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial}
.gauge__meta{margin-top:6px;
  color:rgba(234,255,243,.7);
  font:500 12px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial}
  
  
  :root{
 --bg:#070A12;
 --card:rgba(255,255,255,.06);
 --stroke:rgba(255,255,255,.12);
 --text:rgba(255,255,255,.92);
 --muted:rgba(255,255,255,.65);
 --cyan:#3CF2FF;
 --lime:#7CFF6B;
 --red:#FF4D6D;
 --shadow: 0 18px 60px rgba(0,0,0,.45);
}

main.app{
 color:var(--text);
 background:
 radial-gradient(1200px 700px at 15% 10%, rgba(60,242,255,.18), transparent 60%),
 radial-gradient(900px 600px at 85% 20%, rgba(124,255,107,.10), transparent 55%),
 linear-gradient(180deg, #050713, #070A12 55%, #050713);
 min-height: 100vh;
 padding: 28px;
}

.hero{
 display:flex;
 align-items:flex-end;
 justify-content:space-between;
 gap:18px;
 margin-bottom:18px;
}

.hero h1{ margin:0; letter-spacing:.5px; font-weight:800; }
.subtitle{ margin:.35rem 0 0; color:var(--muted); }

.card{
 background:var(--card);
 border:1px solid var(--stroke);
 border-radius:18px;
 box-shadow:var(--shadow);
 padding:18px;
 backdrop-filter: blur(10px);
}

.muted{ color:var(--muted); }

.outputs-table{
 width:100%;
 border-collapse: collapse;
 margin-top: 12px;
 overflow:hidden;
 border-radius:14px;
}

.outputs-table th, .outputs-table td{
 padding:12px 12px;
 border-bottom:1px solid rgba(255,255,255,.10);
}

.outputs-table thead th{
 text-align:left;
 font-weight:700;
 color:rgba(255,255,255,.85);
 background: rgba(255,255,255,.05);
}

.state{
 font-weight:700;
}
.state.on{ color: var(--lime); }
.state.off{ color: rgba(255,255,255,.70); }

.btn-on, .btn-off{
 border:1px solid var(--stroke);
 padding:10px 14px;
 border-radius:12px;
 cursor:pointer;
 color:var(--text);
 background: rgba(255,255,255,.06);
 transition: .15s ease;
}
.btn-on{
 border-color: rgba(60,242,255,.30);
 box-shadow: 0 0 0 0 rgba(60,242,255,.35);
}
.btn-on:hover{
 background: rgba(60,242,255,.12);
}
.btn-off{
 border-color: rgba(255,77,109,.30);
}
.btn-off:hover{
 background: rgba(255,77,109,.10);
}
.btn-on:disabled,.btn-off:disabled{
 opacity:.6; cursor:not-allowed;
}