:root {
  --vermelho: #d80202; --vermelho-vivo: #e10606; --vermelho-esc: #a30000; --preto: #0b0b0b; --grafite: #181818;
  --fundo: #f4f4f6; --linha: #e7e7ea; --texto: #1a1a1a; --suave: #70707a;
  --titulo: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --degrade: linear-gradient(135deg, #ee0a0a, #a30000);
  --lateral: 280px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--fundo); color: var(--texto); }
a { color: inherit; }
h1, h2, h3, .titulo { font-family: var(--titulo); font-weight: 800; letter-spacing: .03em; margin: 0; }
.ic { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Estrutura ---------- */
.app { display: grid; grid-template-columns: var(--lateral) 1fr; min-height: 100vh; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.fundo-menu { display: none; }

/* ---------- Barra lateral ---------- */
.lateral { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--preto); padding: 1.6rem 1rem; z-index: 30; }
.lateral::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none;
  background: linear-gradient(200deg, transparent 38%, rgba(216,2,2,.9) 39%, rgba(120,0,0,.75) 55%, rgba(30,0,0,0) 100%);
  clip-path: polygon(0 100%, 0 40%, 100% 100%); opacity: .95; }
.lateral > * { position: relative; z-index: 1; }
.lateral-logo { display: block; padding: .2rem .6rem 1.6rem; }
.lateral-logo img { width: 100%; max-width: 210px; display: block; margin: 0 auto; }
.lateral nav { display: flex; flex-direction: column; gap: .35rem; }
.item { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border-radius: 12px; color: #e7e7ea; text-decoration: none; font-size: .95rem; cursor: pointer; list-style: none; }
.item::-webkit-details-marker { display: none; }
.item:hover { background: #1b1b1b; }
.item.on { background: var(--degrade); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(216,2,2,.35); }
.grupo .seta { margin-left: auto; display: grid; transition: transform .2s; }
.grupo[open] .seta { transform: rotate(180deg); }
.sub-itens { display: flex; flex-direction: column; padding: .3rem 0 .6rem 1rem; border-bottom: 1px solid #262626; margin-bottom: .6rem; }
.sub { --cor: var(--vermelho); display: flex; align-items: center; gap: .85rem; padding: .65rem 1rem; border-radius: 10px; color: #dcdce0; text-decoration: none; font-size: .92rem; }
.sub:hover { background: #1b1b1b; color: #fff; }
.sub.on { background: #1f1f1f; color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--vermelho); }
.ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--cor, var(--vermelho)); flex: none; display: inline-block; }

/* ---------- Topo ---------- */
.topo-app { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.1rem; padding: .9rem 1.6rem; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--linha); }
.hamb { background: none; border: 0; padding: .3rem; cursor: pointer; color: #222; display: grid; }
.hamb .ic { width: 1.7rem; height: 1.7rem; }
.topo-titulo b { display: block; font-family: var(--titulo); font-weight: 800; font-size: 1.2rem; color: var(--preto); letter-spacing: .02em; }
.topo-titulo span { font-size: .85rem; color: var(--suave); }
.topo-dir { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.sino { position: relative; display: grid; color: #222; }
.sino .ic { width: 1.5rem; height: 1.5rem; }
.sino i { position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--vermelho); border: 2px solid #fff; }
.online { display: flex; align-items: center; gap: .55rem; background: var(--degrade); color: #fff; padding: .6rem 1.1rem; border-radius: 12px; font-size: .88rem; font-weight: 500; box-shadow: 0 6px 16px rgba(216,2,2,.3); }
.online i { width: 10px; height: 10px; border-radius: 50%; background: #22e04f; box-shadow: 0 0 0 3px rgba(34,224,79,.3); }
.sair { display: flex; align-items: center; gap: .5rem; padding-left: 1.2rem; border-left: 1px solid var(--linha); text-decoration: none; color: #222; font-size: .92rem; }
.sair:hover { color: var(--vermelho); }

/* ---------- Centro ---------- */
.centro { padding: 1.4rem 1.6rem 3rem; max-width: 1280px; width: 100%; }

/* Banner */
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 2.4rem 1rem 2.2rem; text-align: center; color: #fff;
  background: radial-gradient(120% 140% at 85% 0%, #7d0000 0%, #3a0000 40%, #120000 100%); box-shadow: 0 10px 30px rgba(120,0,0,.25); }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; }
.hero::before { right: -8%; top: -40%; width: 55%; height: 200%; transform: rotate(18deg); background: linear-gradient(180deg, rgba(255,40,40,.0), rgba(255,40,40,.55) 50%, rgba(255,40,40,0)); filter: blur(2px); opacity: .55; }
.hero::after { left: -6%; bottom: -60%; width: 50%; height: 120%; transform: rotate(-24deg); background: linear-gradient(180deg, rgba(255,0,0,.0), rgba(216,2,2,.45)); }
.hero > * { position: relative; z-index: 1; }
.hero img { width: min(430px, 70%); display: block; margin: 0 auto; }
.hero p { margin: 1.2rem 0 .7rem; font-family: var(--titulo); font-weight: 700; letter-spacing: .55em; font-size: clamp(.7rem, 1.6vw, 1rem); padding-left: .55em; }
.traco { display: block; width: 120px; height: 3px; margin: 0 auto; background: var(--vermelho); border-radius: 2px; box-shadow: 0 0 12px var(--vermelho); }

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.kpi { display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 1.4rem; background: #fff; border: 1px solid var(--linha); border-left: 4px solid var(--vermelho); border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.05); color: var(--vermelho); }
.kpi .ic { width: 2.6rem; height: 2.6rem; stroke-width: 1.6; }
.kpi b { display: block; font-family: "Inter", sans-serif; font-weight: 800; font-size: 2.1rem; line-height: 1; color: var(--preto); }
.kpi span { display: block; margin-top: .3rem; font-size: .88rem; color: #333; text-transform: uppercase; letter-spacing: .02em; }

/* Título de seção com marcador */
.secao { display: flex; align-items: center; gap: .7rem; margin: 2rem 0 1rem; font-family: "Inter", sans-serif; font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase; color: var(--preto); }
.secao i { width: 26px; height: 12px; background: var(--vermelho); transform: skewX(-30deg); border-radius: 2px; }

/* Cartões */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.card { background: #fff; border: 1px solid var(--linha); border-radius: 16px; padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; box-shadow: 0 4px 16px rgba(0,0,0,.05); transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.1); transform: translateY(-2px); }
.card-topo { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .9rem; }
.tile { width: 56px; height: 56px; border-radius: 14px; background: var(--degrade); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(216,2,2,.3); }
.tile .ic { width: 1.7rem; height: 1.7rem; }
.empresa { --cor: var(--vermelho); display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 700; color: var(--vermelho); text-transform: uppercase; letter-spacing: .03em; }
.card h3 { margin: .25rem 0 .55rem; font-size: 1.15rem; color: var(--preto); letter-spacing: .01em; }
.card p { margin: 0 0 .9rem; font-size: .95rem; line-height: 1.45; color: #3a3a40; }
.card .origem { display: flex; align-items: flex-start; gap: .55rem; font-size: .85rem; color: #55555d; margin-top: auto; }
.card .origem .ic { margin-top: .1rem; }
.status { font-size: .78rem; padding: .3rem .8rem; border-radius: 999px; font-weight: 500; }
.status.ativa { background: #dcfce7; color: #166534; }
.status.em-migracao { background: #fef3c7; color: #92400e; }
.status.planejada { background: #ececef; color: #4b4b52; }
.abrir { align-self: flex-start; display: inline-flex; align-items: center; gap: .6rem; margin-top: .4rem; padding: .65rem 1.2rem; border-radius: 12px; background: var(--degrade); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; box-shadow: 0 6px 14px rgba(216,2,2,.28); }
.abrir:hover { filter: brightness(1.08); }

.trilha { margin: .3rem 0 0; font-size: .85rem; color: var(--suave); }
.trilha a { color: var(--vermelho); text-decoration: none; }
.painel { background: #fff; border: 1px solid var(--linha); border-radius: 16px; padding: 1.5rem; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.painel .origem { font-size: .85rem; color: #999; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(120% 140% at 85% 0%, #8a0000 0%, #3a0000 45%, #0b0000 100%); }
.login form { background: #fff; padding: 2rem 2rem 1.6rem; border-radius: 18px; width: 100%; max-width: 360px; box-shadow: 0 16px 50px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: .8rem; }
.login .logo { background: var(--preto); border-radius: 12px; padding: 1.1rem; display: grid; place-items: center; }
.login .logo img { width: 100%; max-width: 230px; }
.login .sub { text-align: center; margin: 0; color: var(--suave); font-size: .9rem; }
.login input, .login button { padding: .8rem; border-radius: 10px; font-size: 1rem; border: 1px solid #cfcfd4; font-family: inherit; }
.login input:focus { outline: 2px solid var(--vermelho); border-color: var(--vermelho); }
.login button { background: var(--degrade); color: #fff; border: 0; cursor: pointer; font-family: var(--titulo); font-weight: 700; letter-spacing: .05em; box-shadow: 0 6px 14px rgba(216,2,2,.3); }
.login button:hover { filter: brightness(1.08); }
.erro { color: var(--vermelho-esc); margin: 0; font-size: .85rem; }

/* ---------- Menu recolhível ---------- */
@media (min-width: 901px) {
  .app.alt { grid-template-columns: 1fr; }
  .app.alt .lateral { display: none; }
}

/* ---------- Celular e tablet: o menu vira gaveta ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 0; width: min(290px, 84vw); transform: translateX(-102%); transition: transform .25s; }
  .app.alt .lateral { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.4); }
  .app.alt .fundo-menu { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .topo-app { padding: .7rem 1rem; gap: .7rem; }
  .topo-titulo b { font-size: 1rem; }
  .online { display: none; }
  .sair span { display: none; } .sair { padding-left: .8rem; }
  .centro { padding: 1rem 1rem 2.5rem; }
  .hero { padding: 1.6rem .8rem 1.4rem; }
  .hero p { letter-spacing: .3em; }
  .kpis { gap: .6rem; } .kpi { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .9rem; }
  .kpi .ic { width: 1.8rem; height: 1.8rem; } .kpi b { font-size: 1.6rem; } .kpi span { font-size: .7rem; }
}
