/* Login da versão WEB — portal corporativo ILUMAC. Tudo escopado em html.origem-web:
   sem essa classe nada aqui tem efeito, então o login interno (rede da empresa) não muda. */
html.origem-web {
  --lw-brand: #B01E26; --lw-brand-hover: #961920; --lw-brand-dark: #7D1016; --lw-brand-deep: #4D090D;
  --lw-text: #18181B; --lw-muted: #5F5F68; --lw-soft: #686871; --lw-border: #D9D9DE; --lw-input-bg: #FAFAFB;
  --lw-bg: #fff; --lw-line: #E6E6EA; --lw-label: #3a3a42; --lw-tab-on-bg: #FDF2F2; --lw-error-bg: #FDECEC; --lw-error-text: #9B1C22;
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --lw-brand-w: clamp(360px, 34vw, 560px);   /* largura da coluna de marca: acompanha monitores pequenos e grandes */
}
html.origem-web body {
  position: relative; background: var(--lw-bg); padding: 0; min-height: 100vh; min-height: 100dvh; overflow: auto;
  flex-direction: row; align-items: stretch; justify-content: flex-start;
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif; color: var(--lw-text);
}
html.origem-web body::before, html.origem-web body::after { display: none; }
/* sem "pisca": só mostra o formulário/botão depois de saber o que o servidor exige */
html.origem-web:not(.lw-pronto) #loginForm, html.origem-web:not(.lw-pronto) #ssoBox { visibility: hidden; }

/* ── coluna do formulário ── */
html.origem-web .login-card {
  flex: 1; min-width: 0; max-width: none; border: 0; border-radius: 0; box-shadow: none; animation: none;
  background: var(--lw-bg); padding: clamp(24px, 5vh, 56px) clamp(24px, 5vw, 72px) clamp(92px, 17vh, 160px); display: flex; flex-direction: column; justify-content: center; align-items: center;
}
html.origem-web .login-card > * { width: 100%; max-width: 400px; }
html.origem-web .logo-area { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 clamp(20px, 3.5vh, 30px); }
html.origem-web .lw-logo { height: clamp(46px, 6.5vh, 66px); width: auto; max-width: 100%; object-fit: contain; object-position: left center; margin-bottom: clamp(26px, 5vh, 46px); }
html.origem-web .lw-titulo { font-size: clamp(26px, 3.2vh + 10px, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0; color: var(--lw-text); }
html.origem-web .lw-sub { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--lw-muted); }

/* ── entrada principal: Microsoft ── */
html.origem-web #ssoBox { margin: 0 !important; }
html.origem-web #btn_sso {
  height: 52px; border-radius: 12px; background: var(--lw-bg); color: var(--lw-text); border: 1px solid var(--lw-border);
  box-shadow: 0 1px 2px rgba(24, 24, 27, .06); font: 600 15px 'DM Sans', 'Segoe UI', sans-serif;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
html.origem-web #btn_sso:hover { border-color: var(--lw-brand); color: var(--lw-text); background: var(--lw-bg); box-shadow: 0 8px 20px rgba(176, 30, 38, .13); transform: translateY(-1px); }
html.origem-web #btn_sso:focus-visible { outline: 3px solid rgba(176, 30, 38, .35); outline-offset: 2px; }

/* ── campos e botão principal (usuário e senha / código) ── */
html.origem-web .form-group label { font-size: 13.5px; font-weight: 600; color: var(--lw-label); }
html.origem-web .form-group input[type="text"], html.origem-web .form-group input[type="password"],
html.origem-web .lw-painel input[type="text"]:not(.lw-hp) {
  height: 50px; padding: 0 16px; font: inherit; font-size: 15px; color: var(--lw-text); width: 100%;
  background: var(--lw-bg); border: 1px solid var(--lw-border); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
html.origem-web .form-group input:focus, html.origem-web .form-group input:focus-visible, html.origem-web .lw-painel input[type="text"]:focus {
  outline: none; border-color: var(--lw-brand); box-shadow: 0 0 0 3px rgba(176, 30, 38, .15);
}
html.origem-web .remember-me input[type="checkbox"] { accent-color: var(--lw-brand); }
html.origem-web .forgot-link:hover { color: var(--lw-brand); }
html.origem-web .btn-login { height: 50px; border-radius: 12px; background: var(--lw-brand); color: #fff; font: 700 15px 'DM Sans', 'Segoe UI', sans-serif; border: 0; box-shadow: none; }
html.origem-web .btn-login:hover { background: var(--lw-brand-hover); box-shadow: none; }
html.origem-web .error-msg { background: var(--lw-error-bg); color: var(--lw-error-text); border-radius: 8px; }

/* ── "ou entre de outra forma": abas + painel (formato do portal) ── */
html.origem-web .lw-alt { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
html.origem-web .lw-alt[hidden] { display: none; }
html.origem-web .lw-ou { display: flex; align-items: center; gap: 12px; width: 100%; padding: 4px 0; background: none; border: 0; cursor: pointer; font: inherit; color: var(--lw-soft); font-size: 12.5px; }
html.origem-web .lw-ou:hover, html.origem-web .lw-ou:focus-visible { color: var(--lw-brand); }
html.origem-web .lw-ou:focus-visible { outline: 2px solid rgba(176, 30, 38, .5); outline-offset: 2px; border-radius: 8px; }
html.origem-web .lw-seta { width: 7px; height: 7px; margin: -3px 0 0 -4px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform .2s; }
html.origem-web .lw-ou[aria-expanded="true"] .lw-seta { transform: rotate(-135deg); margin-top: 3px; }
html.origem-web .lw-corpo { display: flex; flex-direction: column; gap: 14px; }
html.origem-web .lw-corpo[hidden] { display: none; }
html.origem-web .lw-ou::before, html.origem-web .lw-ou::after { content: ""; flex: 1; height: 1px; background: var(--lw-line); }
html.origem-web .lw-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
html.origem-web .lw-tab {
  min-height: 56px; padding: 8px 10px; border: 1px solid var(--lw-border); border-radius: 12px; background: var(--lw-bg); color: var(--lw-text);
  font: 600 13.5px/1.25 'DM Sans', 'Segoe UI', sans-serif; text-align: center; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
html.origem-web .lw-tab:hover { border-color: var(--lw-brand); color: var(--lw-brand); }
html.origem-web .lw-tab.on { border-color: var(--lw-brand); color: var(--lw-brand); background: var(--lw-tab-on-bg); box-shadow: inset 0 0 0 1px var(--lw-brand); }
html.origem-web .lw-tab:focus-visible { outline: 2px solid rgba(176, 30, 38, .5); outline-offset: 2px; }
html.origem-web .lw-painel { display: flex; flex-direction: column; gap: 12px; }
html.origem-web .lw-painel[hidden], html.origem-web .lw-painel [hidden] { display: none !important; }
html.origem-web #codPasso1, html.origem-web #codPasso2 { display: flex; flex-direction: column; gap: 12px; }
html.origem-web .lw-ajuda { margin: 0; font-size: 13px; line-height: 1.5; color: var(--lw-muted); }
html.origem-web .lw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.origem-web .lw-cod-msg { margin: 0; font-size: 13.5px; color: var(--lw-muted); line-height: 1.45; }
html.origem-web #codDigitos { font: 700 24px ui-monospace, Consolas, monospace !important; letter-spacing: 8px; text-align: center; }
html.origem-web .lw-cod-links { display: flex; justify-content: space-between; }
html.origem-web .lw-cod-link { background: none; border: 0; padding: 4px 0; font: 500 13px 'DM Sans', 'Segoe UI', sans-serif; color: var(--lw-muted); cursor: pointer; text-decoration: underline; }
html.origem-web .lw-cod-link:hover:not(:disabled) { color: var(--lw-brand); }
html.origem-web .lw-cod-link:disabled { opacity: .6; cursor: default; text-decoration: none; }
html.origem-web .lw-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none; }   /* isca anti-robô */
/* interruptor "Lembrar meu usuário neste dispositivo" (só guarda o nome do usuário no navegador; nada de senha nem de sessão) */
html.origem-web .lw-sw { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--lw-muted); cursor: pointer; user-select: none; }
html.origem-web .lw-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
html.origem-web .lw-sw-trilho { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: #CFCFD6; transition: background .2s; }
html.origem-web .lw-sw-trilho::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
html.origem-web .lw-sw input:checked + .lw-sw-trilho { background: var(--lw-brand); }
html.origem-web .lw-sw input:checked + .lw-sw-trilho::after { transform: translateX(18px); }
html.origem-web .lw-sw input:focus-visible + .lw-sw-trilho { outline: 2px solid rgba(176, 30, 38, .5); outline-offset: 2px; }

/* ── rodapé discreto ── */
html.origem-web .divider { display: none; }
html.origem-web .card-footer { margin-top: 22px; }
html.origem-web .version-text { font-size: 11.5px; line-height: 1.5; color: var(--lw-soft); text-align: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 4px; }
html.origem-web .lw-seguro { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
html.origem-web .lw-ico { flex: none; opacity: .85; }
html.origem-web .page-footer { position: absolute; left: 0; bottom: 18px; width: calc(100% - var(--lw-brand-w) - 32px); display: flex; justify-content: center; gap: 18px; }
html.origem-web .page-footer a, html.origem-web .page-footer button.link-rodape { color: var(--lw-soft); font-size: 12px; }
html.origem-web .page-footer a:hover, html.origem-web .page-footer a:focus-visible,
html.origem-web .page-footer button.link-rodape:hover, html.origem-web .page-footer button.link-rodape:focus-visible { color: var(--lw-brand); }
html.origem-web .tech-btn { display: none !important; }   /* a configuração técnica (wizard) é do acesso interno */

/* ── coluna de marca (direita) ── */
html.origem-web .lw-brand {
  position: relative; overflow: hidden; width: var(--lw-brand-w); flex-shrink: 0; margin: 16px; border-radius: 22px; padding: clamp(28px, 3vw, 44px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; color: #fff;
  background: radial-gradient(120% 90% at 85% 8%, #9d1820 0%, var(--lw-brand-dark) 45%, var(--lw-brand-deep) 100%);
}
html.origem-web .lw-brand::before { content: ""; position: absolute; right: -90px; bottom: -70px; width: 430px; height: 536px; background: url(/assets/web/marca-dagua.svg) no-repeat center / contain; opacity: .5; pointer-events: none; }
html.origem-web .lw-brand > * { position: relative; }
html.origem-web .lw-brand-tag { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
html.origem-web .lw-brand-txt h2 { margin: 0 0 10px; font-size: clamp(32px, 3vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
html.origem-web .lw-brand-txt > p { margin: 0; max-width: 350px; font-size: 16px; line-height: 1.6; color: #F5D7D8; }
html.origem-web .lw-brand-foot { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255, 255, 255, .72); }

@media (max-width: 1023px) {
  html.origem-web .lw-brand { display: none; }
  html.origem-web .login-card { padding: 28px 24px 84px; }
  html.origem-web .lw-logo { object-position: center; align-self: center; margin-bottom: 20px; }
  html.origem-web .logo-area { align-items: center; text-align: center; }
  html.origem-web .page-footer { width: 100%; }
}
@media (max-width: 440px) { html.origem-web .lw-tabs { grid-auto-flow: row; grid-auto-columns: auto; } html.origem-web .lw-tab { min-height: 48px; } }
/* telas baixas (celular deitado, notebook pequeno): sem espaço sobrando e sem o rodapé sobre o formulário */
@media (max-height: 640px) {
  html.origem-web .login-card { padding-top: 20px; padding-bottom: 72px; justify-content: flex-start; }
  html.origem-web .lw-logo { height: 40px; margin-bottom: 18px; }
}
/* monitores grandes (QHD/4K): o conteúdo cresce um pouco em vez de ficar minúsculo no meio */
@media (min-width: 1800px) and (min-height: 900px) {
  html.origem-web .login-card > * { max-width: 440px; }
  html.origem-web .lw-sub { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html.origem-web #btn_sso, html.origem-web .lw-sw-trilho, html.origem-web .lw-sw-trilho::after { transition: none; }
}

/* esta tela é sempre clara: ignora o tema escuro do navegador/sistema */
html.origem-web { color-scheme: light only; }
html.origem-web .remember-me, html.origem-web .remember-me span, html.origem-web .caps-aviso { color: var(--lw-muted); }
html.origem-web .forgot-link { color: var(--lw-muted); }
