/* Base: variáveis, reset, layout e navegação. Ícones: Phosphor Duotone (CDN) */

:root {
  --bg: #0a0d14;
  --bg2: #121722;
  --bg3: #1a2130;
  --bg4: #232c3d;
  --borda: #262f40;
  --borda2: #323d52;
  --txt: #e8eef7;
  --txt2: #8695ab;
  --txt3: #5d6b80;

  --rosa: #ff6fb5;
  --roxo: #9d7cf5;
  --ciano: #3ddbd9;
  --verde: #3fd77e;
  --vermelho: #ff5c72;
  --amarelo: #ffc046;
  --azul: #5aa9ff;

  --gradiente: linear-gradient(135deg, #ff6fb5 0%, #9d7cf5 100%);
  --gradiente-suave: linear-gradient(135deg, rgba(255, 111, 181, .14), rgba(157, 124, 245, .14));

  --r: 14px;
  --r-p: 10px;
  --lateral: 244px;
  --topo: 62px;
  --barra-baixo: 64px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sombra: 0 4px 22px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-wrap: break-word;
  background-image:
    radial-gradient(ellipse 620px 420px at 12% -8%, rgba(157, 124, 245, .08), transparent),
    radial-gradient(ellipse 520px 380px at 92% 4%, rgba(255, 111, 181, .06), transparent);
  background-attachment: fixed;
}

a { color: var(--azul); text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--roxo); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--borda2); }

[class*=" ph-"], [class^="ph-"] { line-height: 1; vertical-align: -.13em; }

/* ------------------------------ estrutura ------------------------------ */

.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.lateral {
  width: var(--lateral);
  flex-shrink: 0;
  background: rgba(18, 23, 34, .82);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--borda);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
}

.marca {
  display: flex; align-items: center; gap: 11px;
  height: var(--topo);
  padding: 0 19px;
  border-bottom: 1px solid var(--borda);
  font-weight: 700; font-size: 17px;
  flex-shrink: 0;
  letter-spacing: -.2px;
}
.marca .simbolo-marca {
  width: 33px; height: 33px;
  border-radius: 10px;
  background: var(--gradiente);
  display: grid; place-items: center;
  color: #140f1c; font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(157, 124, 245, .34);
}

.menu { padding: 13px 11px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }

.menu .item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border-radius: var(--r-p);
  color: var(--txt2);
  font-size: 14.5px;
  transition: background .15s, color .15s;
  position: relative;
}
.menu .item i { font-size: 21px; width: 22px; text-align: center; flex-shrink: 0; }
.menu .item:hover { background: var(--bg3); color: var(--txt); }
.menu .item.ativo {
  background: var(--gradiente-suave);
  color: var(--txt);
  font-weight: 600;
}
.menu .item.ativo::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 21px;
  border-radius: 0 3px 3px 0;
  background: var(--gradiente);
}
.menu .item.ativo i { color: var(--roxo); }

.lateral-rodape { padding: 12px; border-top: 1px solid var(--borda); flex-shrink: 0; }

.conteudo { flex: 1; min-width: 0; margin-left: var(--lateral); display: flex; flex-direction: column; }

.cabecalho {
  height: var(--topo);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 22px;
  background: rgba(18, 23, 34, .8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--borda);
  position: sticky; top: 0; z-index: 20;
}
.cabecalho h1 {
  font-size: 17.5px; font-weight: 650; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cabecalho-dir { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

main { padding: 22px; flex: 1; max-width: 1520px; width: 100%; }

/* ------------------------------- conexão ------------------------------- */

.selo {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--borda);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  white-space: nowrap;
}
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--txt3); flex-shrink: 0; }
.selo.on { border-color: rgba(63, 215, 126, .34); }
.selo.on .ponto { background: var(--verde); box-shadow: 0 0 9px var(--verde); animation: pulsa 2.1s ease-in-out infinite; }
.selo.off { border-color: rgba(255, 92, 114, .3); }
.selo.off .ponto { background: var(--vermelho); }
.selo.meio .ponto { background: var(--amarelo); animation: pulsa 1s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .4; } }

.tempo-no-ar { color: var(--txt2); font-size: 12.5px; white-space: nowrap; }

/* ------------------------------ responsivo ------------------------------ */

@media (max-width: 1080px) and (min-width: 721px) {
  :root { --lateral: 70px; }
  .marca span { display: none; }
  .marca { justify-content: center; padding: 0; }
  .menu .item { justify-content: center; padding: 13px 0; }
  .menu .item span { display: none; }
  .lateral-rodape .rotulo { display: none; }
}

@media (max-width: 720px) {
  .lateral {
    inset: auto 0 0 0;
    width: 100%;
    height: var(--barra-baixo);
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--borda);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(18, 23, 34, .96);
  }
  .marca, .lateral-rodape { display: none; }
  .menu { flex-direction: row; padding: 0; gap: 0; width: 100%; overflow: visible; }
  .menu .item {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 9px 2px;
    border-radius: 0;
    font-size: 10.5px;
    text-align: center;
    justify-content: center;
  }
  .menu .item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .menu .item i { font-size: 22px; width: auto; }
  .menu .item.ativo { background: transparent; }
  .menu .item.ativo::before { left: 50%; top: 0; transform: translateX(-50%); width: 26px; height: 3px; border-radius: 0 0 3px 3px; }

  .conteudo { margin-left: 0; padding-bottom: var(--barra-baixo); }
  .cabecalho { padding: 0 15px; }
  .cabecalho h1 { font-size: 16px; }
  .tempo-no-ar { display: none; }
  main { padding: 15px; }
}

@media (max-width: 400px) {
  .selo .rotulo-conexao { display: none; }
  .selo { padding: 6px 10px; }
}
