/* =========================================================================
   Logix · Componentes — portado do protótipo (Manual de Marca v1.0).
   Construído sobre os tokens --lx-* (tokens.css). O white-label sobrescreve
   apenas as variáveis de marca em runtime; estas classes seguem o tema.
   ========================================================================= */

:root { --lx-ease: cubic-bezier(.22,.61,.36,1); }

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--lx-fonte, 'Inter', system-ui, sans-serif);
  background: var(--lx-fundo);
  color: var(--lx-tinta);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
:focus-visible { outline: 2px solid var(--lx-azul-vivo); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ============================ CASCA (shell) ============================ */
.lx-app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--lx-fundo); }

.lx-side {
  background: linear-gradient(185deg, var(--lx-azul-profundo), var(--lx-navy-950));
  padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; position: relative;
}
.lx-side::after {
  content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(var(--lx-azul-vivo), transparent 60%); opacity: .4;
}
.lx-side-logo { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; }
.lx-side-logo .lx-mono {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lx-azul-vivo), var(--lx-azul-primario));
  color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .02em;
  box-shadow: 0 8px 18px -8px var(--lx-azul-vivo);
}
.lx-side-logo .wm { color: #fff; line-height: 1; }
.lx-side-logo .wm b { font-weight: 800; font-size: 18px; letter-spacing: .01em; display: block; }
.lx-side-logo .wm span { font-size: 9px; letter-spacing: .16em; color: var(--lx-azul-claro); text-transform: uppercase; }

/* Logo do cliente (white-label): sem caixinha, com respiro. */
.lx-mono.tem-logo { background: none !important; box-shadow: none !important; padding: 0; overflow: hidden; }
.lx-mono.tem-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lx-side-logo .lx-mono.tem-logo { width: 44px; height: 44px; border-radius: 10px; }
.lx-login-hero .lx-mono.tem-logo { width: 76px; height: 76px; border-radius: 18px; }

.lx-nav-lbl { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #5f81a8; font-weight: 700; padding: 16px 10px 6px; }
.lx-nav-i {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--lx-raio-sm);
  color: #b9d2ee; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .16s var(--lx-ease), color .16s var(--lx-ease); border: 0; background: none; width: 100%; text-align: left;
}
.lx-nav-i svg { flex: none; opacity: .85; }
.lx-nav-i:hover { background: rgba(55,138,221,.14); color: #fff; }
.lx-nav-i.on { background: rgba(55,138,221,.20); color: #fff; box-shadow: inset 3px 0 0 var(--lx-azul-vivo); }
.lx-nav-i.on svg { opacity: 1; }

.lx-side-user {
  margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: var(--lx-raio-sm);
  background: rgba(181,212,244,.07); border: 1px solid rgba(181,212,244,.1);
}
.lx-side-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--lx-azul-vivo); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.lx-side-user b { color: #fff; font-size: 13px; font-weight: 700; display: block; line-height: 1.2; }
.lx-side-user small { display: block; color: #7f9dc0; font-size: 11px; }
.lx-sair { background: none; border: 0; color: #9cbbdd; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; margin-left: auto; }
.lx-sair:hover { color: #fff; }

.lx-main { display: flex; flex-direction: column; min-width: 0; }
.lx-topbar { background: var(--lx-superficie); border-bottom: 1px solid var(--lx-linha); padding: 16px 26px; display: flex; align-items: center; gap: 18px; }
.lx-topbar h1 { font-size: 18px; font-weight: 800; color: var(--lx-tinta); letter-spacing: -.01em; margin: 0; }
.lx-topbar .sub { color: var(--lx-tinta-2); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.lx-role-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: var(--lx-raio-pill); font-size: 11.5px; font-weight: 700; background: var(--lx-info-bg); color: var(--lx-azul-primario); }
.lx-role-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lx-content { padding: 24px 26px; overflow: auto; flex: 1; }

/* ============================ COMPONENTES ============================ */
.lx-row { display: flex; gap: 18px; }
.lx-grid-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .lx-grid-kpi { grid-template-columns: repeat(2, 1fr); } }

.lx-kpi { position: relative; overflow: hidden; padding: 18px; }
.lx-kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.lx-kpi .k-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--lx-info-bg); color: var(--lx-azul-primario); }
.lx-kpi .k-val { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 14px; color: var(--lx-tinta); line-height: 1; }
.lx-kpi .k-lbl { font-size: 12.5px; color: var(--lx-tinta-2); font-weight: 600; margin-top: 5px; }
.lx-kpi::before { content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(55,138,221,.10), transparent 70%); }

.lx-sec-h { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.lx-sec-h h2 { font-size: 15px; font-weight: 800; color: var(--lx-tinta); letter-spacing: -.01em; margin: 0; }
.lx-sec-h:first-child { margin-top: 0; }

/* faixas de velocidade (assinatura da marca) */
.lx-speed { display: inline-flex; gap: 5px; align-items: center; }
.lx-speed i { height: 3px; border-radius: 2px; background: var(--lx-azul-vivo); display: block; }
.lx-speed i:nth-child(1) { width: 14px; } .lx-speed i:nth-child(2) { width: 22px; } .lx-speed i:nth-child(3) { width: 10px; }
/* variante vertical (hero do login) */
.lx-speed.vertical { flex-direction: column; align-items: flex-start; }
.lx-speed.vertical i:nth-child(1) { width: 18px; } .lx-speed.vertical i:nth-child(2) { width: 28px; } .lx-speed.vertical i:nth-child(3) { width: 14px; }
.lx-login-hero .lx-speed { flex-direction: column; gap: 6px; align-items: flex-start; }
.lx-login-hero .lx-speed i:nth-child(1) { width: 18px; } .lx-login-hero .lx-speed i:nth-child(2) { width: 28px; } .lx-login-hero .lx-speed i:nth-child(3) { width: 14px; }

/* status com bolinha (herda as cores de tokens.css) */
.lx-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* tabela (escopada para não vazar estilo global) */
.lx-table { width: 100%; border-collapse: collapse; }
.lx-table thead th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--lx-tinta-3); font-weight: 700; padding: 0 14px 12px; }
.lx-table tbody td { padding: 13px 14px; border-top: 1px solid var(--lx-linha); font-size: 13px; color: var(--lx-tinta); font-weight: 500; vertical-align: middle; }
.lx-table tbody tr:hover { background: var(--lx-superficie-2); }

/* formulário rico */
.lx-field { margin-bottom: 15px; }
.lx-field label { display: block; font-size: 12px; font-weight: 700; color: var(--lx-tinta); margin-bottom: 7px; }
.lx-field .hint { font-size: 11px; color: var(--lx-tinta-3); margin-top: 5px; }

/* paradas (coleta/destino) */
.lx-stop { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--lx-linha); border-radius: var(--lx-raio-sm); background: var(--lx-superficie-2); }
.lx-stop-num { width: 26px; height: 26px; border-radius: 8px; background: var(--lx-azul-primario); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.lx-stop-num.coleta { background: var(--lx-azul-profundo); }

/* estado vazio — convite à ação, não só texto morto */
.lx-vazio { text-align: center; padding: 40px 20px; color: var(--lx-tinta-2); }
.lx-vazio .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--lx-info-bg); color: var(--lx-azul-primario); display: grid; place-items: center; margin: 0 auto 14px; }
.lx-vazio b { display: block; color: var(--lx-tinta); font-size: 14px; margin-bottom: 4px; }

/* botão com ícone */
.lx-btn { display: inline-flex; align-items: center; gap: 8px; }

/* ============================ LOGIN ============================ */
.lx-login { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; background: var(--lx-fundo); }
.lx-login-hero { position: relative; background: linear-gradient(160deg, var(--lx-navy-800), var(--lx-navy-950)); padding: 54px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: #fff; }
.lx-login-hero .lx-mono { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; }
.lx-login-hero h2 { font-size: 34px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; max-width: 380px; margin-top: 26px; }
.lx-login-hero p { color: var(--lx-azul-claro); font-size: 15px; margin-top: 16px; max-width: 340px; line-height: 1.6; }
.lx-login-hero .feats { display: flex; gap: 24px; flex-wrap: wrap; }
.lx-login-hero .feats div { color: #cfe2f7; font-size: 13px; font-weight: 600; }
.lx-login-form { padding: 54px; display: flex; flex-direction: column; justify-content: center; max-width: 460px; margin: 0 auto; width: 100%; }
.lx-login-form h3 { font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.lx-login-form .lead { color: var(--lx-tinta-2); font-size: 13.5px; margin: 8px 0 24px; }
@media (max-width: 860px) { .lx-login { grid-template-columns: 1fr; } .lx-login-hero { display: none; } }

/* ===== Login premium branded (efeitos + animações; repinta por cliente) ===== */
.lx-login-hero .lx-speedlines { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lx-login-hero .lx-speedlines i { position: absolute; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--lx-azul-vivo)); opacity: .5; animation: lxdash 4.5s linear infinite; }
.lx-login-hero .lx-speedlines i:nth-child(1) { top: 22%; width: 160px; left: -160px; animation-delay: 0s; }
.lx-login-hero .lx-speedlines i:nth-child(2) { top: 38%; width: 110px; left: -110px; animation-delay: 1.2s; opacity: .35; }
.lx-login-hero .lx-speedlines i:nth-child(3) { top: 66%; width: 200px; left: -200px; animation-delay: .6s; opacity: .3; }
.lx-login-hero .lx-speedlines i:nth-child(4) { top: 80%; width: 130px; left: -130px; animation-delay: 2.1s; opacity: .25; }
@keyframes lxdash { 0% { transform: translateX(0); } 100% { transform: translateX(120vw); } }
.lx-login-hero .lx-ghost { position: absolute; right: -90px; bottom: -90px; opacity: .08; z-index: 0; }
.lx-login-hero .lx-mono.tem-logo { width: 84px; height: 84px; border-radius: 20px; }
.lx-login-hero .lx-hero-row { display: flex; align-items: center; gap: 16px; position: relative; z-index: 2; }
.lx-login-hero .lx-hero-name b { font-family: inherit; font-size: 24px; font-weight: 800; letter-spacing: -.02em; display: block; line-height: 1; color: #fff; }
.lx-login-hero .lx-hero-name span { font-size: 10px; letter-spacing: .18em; color: var(--lx-azul-claro); text-transform: uppercase; }
.lx-reveal { opacity: 0; transform: translateY(16px); animation: lxsurge .7s cubic-bezier(.22,.61,.36,1) forwards; }
.lx-d1 { animation-delay: .05s; } .lx-d2 { animation-delay: .18s; } .lx-d3 { animation-delay: .3s; } .lx-d4 { animation-delay: .42s; } .lx-d5 { animation-delay: .52s; }
@keyframes lxsurge { to { opacity: 1; transform: translateY(0); } }
.lx-pop { opacity: 0; transform: scale(.82) rotate(-6deg); animation: lxpop .8s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes lxpop { to { opacity: 1; transform: scale(1) rotate(0); } }

/* Logo gigante centralizada (preenche o vazio do hero) */
.lx-login-hero.lx-hero-grande { justify-content: flex-start; }
.lx-hero-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; position: relative; z-index: 2; }
.lx-hero-bigmark { width: 188px !important; height: 188px !important; border-radius: 40px !important; display: grid; place-items: center; }
.lx-hero-bigmark.tem-logo { background: none !important; box-shadow: none !important; padding: 0; }
.lx-hero-bigmark img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; }
.lx-hero-bigname { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: #fff; line-height: 1.12; max-width: 16ch; }
.lx-hero-biglabel { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--lx-azul-claro); }
.lx-hero-bottom { position: relative; z-index: 2; }
