/* RedData — tema alinhado ao site institucional (reddata.redmaxx.com.br).
   Muda só tipografia, cores de cromo, cantos e a tela de entrada.
   As cores das séries dos gráficos (tokens.css) continuam as validadas para daltonismo. */
@font-face{font-family:"Inter";src:url("../vendor/fonts/inter-latin-wght.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Plus Jakarta Sans";src:url("../vendor/fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");font-weight:200 800;font-style:normal;font-display:swap}

:root{
  --font:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-display:"Plus Jakarta Sans","Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  /* fundo e textos do site; o vermelho do produto continua #CE343D (regra do projeto) */
  --ink:#121212;--muted:#5f6672;--line:#e4e4e7;--bg:#f8f8f9;
  font-family:var(--font);
}
:root,[data-reddata-theme="light"]{--page:#f8f8f9;--r-control:8px;--r-card:14px;--r-panel:16px}

h1,h2,h3,.page-head h1,.auth-brand h1,.auth-inner h1{font-family:var(--font-display);letter-spacing:-.02em}
button,input,select,textarea{border-radius:8px}

/* Entrada: mesma composição de antes, com a cara do site (fundo claro, título em duas cores). */
.auth{background:#ffffff}
.auth-brand{background:var(--bg);color:var(--ink);border-right:1px solid var(--line)}
.auth-brand .auth-logo{content:url("../reddata-logo.png")}
.auth-brand h1{color:var(--ink);font-weight:700;letter-spacing:-.03em}
.auth-brand h1 .accent{color:var(--red)}
.auth-brand p{color:var(--muted)}
.auth-line{color:var(--muted);border-top-color:var(--line)}
.auth-inner small{color:var(--red-text);letter-spacing:.08em;font-weight:600}

/* Link de volta ao site, só quando o app roda dentro do site (ex.: /bi). */
.site-back{font-size:13px;color:var(--muted);text-decoration:none;white-space:nowrap}
.site-back:hover{color:var(--red-text)}
.auth-site-back{display:block;margin-bottom:20px}

@media (prefers-color-scheme:dark){
  html:not([data-theme=light]) .auth{background:#141414}
  html:not([data-theme=light]) .auth-brand{background:#1b1b1b;color:#e6e6e6;border-right-color:#2c2c2c}
  html:not([data-theme=light]) .auth-brand .auth-logo{content:url("../reddata-logo-white.png")}
  html:not([data-theme=light]) .auth-brand h1{color:#e6e6e6}
}
html[data-theme=dark] .auth{background:#141414}
html[data-theme=dark] .auth-brand{background:#1b1b1b;color:#e6e6e6;border-right-color:#2c2c2c}
html[data-theme=dark] .auth-brand .auth-logo{content:url("../reddata-logo-white.png")}
html[data-theme=dark] .auth-brand h1{color:#e6e6e6}

/* tela de entrada: tela real do produto sobre a faixa inclinada da marca */
.auth-preview{margin:0;max-width:520px;width:100%}
.auth-preview img{display:block;width:100%;height:auto;border-radius:12px;border:1.5px solid var(--ink);box-shadow:0 24px 60px rgba(16,16,20,.22)}
.auth-preview figcaption{margin:0 0 10px;font-size:11.5px;color:var(--muted)}
.auth-slab{display:none}
@media(max-height:700px),(max-width:900px){.auth-preview{display:none}}
@media(min-width:901px) and (min-height:701px){
  .auth{grid-template-columns:minmax(0,57%) minmax(0,43%)}
  .auth-brand{position:sticky;top:0;height:100vh;box-sizing:border-box;overflow:hidden;justify-content:flex-start;gap:26px;padding:56px 64px 0}
  .auth-brand>.logo,.auth-brand>div,.auth-brand .auth-line,.auth-preview img,.auth-preview figcaption{position:relative;z-index:1}
  .auth-brand>.logo{order:0}
  .auth-brand .auth-line{order:1;border-top:0;padding-top:0;margin-top:18px;font-weight:600;letter-spacing:.16em}
  .auth-brand>div:not(.logo):not(.auth-line){order:2}
  .auth-brand h1{font-size:clamp(44px,4.9vw,72px);max-width:none;line-height:.98;font-weight:800;letter-spacing:-.04em;margin:0 0 18px}
  .auth-brand p{max-width:360px;font-size:17px;line-height:1.5;margin:0}
  .auth-preview{order:3;max-width:none;width:calc(100% + 150px);margin:auto -150px 0 0}
  .auth-preview img{border-radius:12px 12px 0 0;border-bottom:0}
  .auth-preview figcaption{display:inline-block;padding:3px 8px;border-radius:6px;background:var(--bg)}
  .auth-slab{display:block;position:absolute;z-index:0;top:-5%;bottom:-5%;right:1%;width:36%;background:var(--red);transform:skewX(-17deg)}
}
@media(min-width:901px) and (min-height:701px) and (prefers-reduced-motion:no-preference){
  @keyframes auth-sobe{from{opacity:0;transform:translateY(22px)}}
  @keyframes auth-faixa{from{opacity:0;transform:skewX(-17deg) translateX(90px)}}
  .auth-slab{animation:auth-faixa .6s cubic-bezier(.2,.7,.2,1) both}
  .auth-preview img{animation:auth-sobe .6s cubic-bezier(.2,.7,.2,1) .1s both}
}

/* escolha do workspace depois da senha, para quem participa de mais de um */
.workspace-choice{max-width:720px;margin:0 auto;padding:72px 16px;text-align:center}
.workspace-choice h1{margin:28px 0 8px;font-size:30px}
.workspace-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:28px 0 20px}
.workspace-option{display:grid;gap:6px;justify-items:center;padding:28px 20px;border:1px solid var(--border);border-radius:18px;background:var(--surface-raised);color:var(--ink);cursor:pointer;transition:border-color .12s,box-shadow .12s,transform .12s}
.workspace-option:hover:not(:disabled),.workspace-option:focus-visible{border-color:var(--brand);box-shadow:0 8px 28px rgba(16,16,20,.10);transform:translateY(-2px);outline:0}
.workspace-option:disabled{opacity:.6;cursor:progress}
.workspace-option svg{width:40px;height:40px;fill:none;stroke:var(--brand);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;margin-bottom:6px}
.workspace-option strong{font-size:20px}
.workspace-option span{font-size:13.5px;color:var(--ink-muted)}
.workspace-option small{margin-top:8px;font-size:12px;color:var(--ink-2);padding:3px 10px;border-radius:999px;background:var(--page)}
@media(prefers-reduced-motion:reduce){.workspace-option{transition:none}.workspace-option:hover:not(:disabled){transform:none}}
/* marca da RedMaxx na tela de entrada: discreta, no canto superior direito do lado do formulário */
.auth-form{position:relative}
.auth-maker{position:absolute;top:28px;right:32px;width:64px;height:64px;border-radius:14px;box-shadow:0 6px 18px rgba(16,16,20,.12)}
@media(max-width:900px){.auth-maker{top:16px;right:16px;width:44px;height:44px;border-radius:10px}}
body[data-public-brand=true] .auth-maker{display:none}

/* tela de entrada: lado do formulário em cartão, com campos e botão maiores */
.auth-form{background:var(--bg)}
.auth-inner{max-width:428px;padding:40px 40px 30px;border-radius:20px;background:var(--surface-raised,#fff);border:1px solid var(--line);box-shadow:0 1px 2px rgba(16,16,20,.04),0 18px 50px rgba(16,16,20,.08)}
.auth-inner h1{font-size:30px;line-height:1.1;margin:14px 0 6px;letter-spacing:-.03em}
.auth-inner form{margin-top:26px}
.auth-inner .field{font-size:13px;gap:8px;margin-bottom:18px}
.auth-inner .field input{height:48px;padding:0 14px;font-size:16px;border-radius:12px}
.auth-pass{position:relative}
.auth-inner .auth-pass input{padding-right:96px}
.auth-eye{position:absolute;right:6px;bottom:6px;height:36px;min-width:0;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer}
.auth-eye:hover{background:var(--bg);color:var(--ink)}
.auth-eye:focus-visible{outline:2px solid var(--red);outline-offset:1px}
.auth-inner button.primary{height:50px;border-radius:12px;font-size:16px;font-weight:700;margin-top:4px}
.auth-inner #sso-options button{height:46px;border-radius:12px}
@media(max-width:680px){.auth-form{padding:16px}.auth-inner{padding:28px 20px 22px;border-radius:16px}.auth-inner h1{font-size:26px}}
/* no celular o bloco da marca encolhe e a marca da RedMaxx desce para baixo do cartão */
@media(max-width:680px){
  .auth-brand{min-height:0;padding:20px 20px 18px;gap:12px}
  .auth-brand .auth-logo{width:190px}
  .auth-form{flex-direction:column;align-items:center;justify-content:flex-start;gap:18px}
  .auth-inner{box-sizing:border-box}
  .auth-maker{position:static;order:2;width:40px;height:40px;border-radius:10px}
}
@media (prefers-color-scheme:dark){
  html:not([data-theme=light]) .auth-form{background:#141414}
  html:not([data-theme=light]) .auth-inner{background:#1b1b1b;border-color:#2c2c2c;box-shadow:none}
  html:not([data-theme=light]) .auth-eye:hover{background:#2a2a2a;color:#e6e6e6}
}
html[data-theme=dark] .auth-form{background:#141414}
html[data-theme=dark] .auth-inner{background:#1b1b1b;border-color:#2c2c2c;box-shadow:none}
html[data-theme=dark] .auth-eye:hover{background:#2a2a2a;color:#e6e6e6}
