/* Visual das telas existentes /acesso e /login; isolado do restante do sistema. */
body.auth-page{--auth-bg:#101925;--auth-panel:#162230;--auth-text:#eef5f7;--auth-muted:#a7b9c7;--auth-line:#364653;--auth-input:#111d29;--auth-soft:#193b33;--auth-accent:#39d4a6;--auth-button:#087d60;background:var(--auth-bg);color:var(--auth-text);color-scheme:dark}
html[data-theme="ice"] body.auth-page{--auth-bg:#f5f7f9;--auth-panel:#fff;--auth-text:#172b36;--auth-muted:#5d707b;--auth-line:#dbe4e8;--auth-input:#fff;--auth-soft:#eaf7f2;--auth-accent:#087d60;color-scheme:light}
html[data-theme="warm"] body.auth-page{--auth-bg:#f5f3ee;--auth-panel:#fffefa;--auth-text:#29251f;--auth-muted:#706454;--auth-line:#d9d2c5;--auth-input:#fffefa;--auth-soft:#eaf7f2;--auth-accent:#087d60;color-scheme:light}
.auth-page>div.fixed{display:none}
.auth-page main{max-width:1160px;padding:clamp(20px,5vh,64px) 24px}
.auth-page [data-flash]{max-width:1112px;margin-inline:auto}
/* templates/base.html aplica `html[data-theme="warm"/"ice"] aside{background:...!important}` para a barra
   lateral do sistema; como .auth-story tambem e um <aside>, o painel perdia o fundo escuro e o texto (cores
   claras fixas) ficava ilegivel. Reforca a especificidade so para o painel do login. */
html[data-theme="warm"] #auth-login .auth-story,
html[data-theme="ice"] #auth-login .auth-story{background:#0b2827!important;border-color:transparent!important}
#auth-login{display:grid;grid-template-columns:46% 54%;min-height:660px;background:var(--auth-bg);color:var(--auth-text);border:1px solid var(--auth-line);border-radius:18px;overflow:hidden;box-shadow:0 22px 60px #00000012}
#auth-login *{box-sizing:border-box}
#auth-login [hidden]{display:none!important}
#auth-login button,#auth-login input{font:inherit}
#auth-login button{cursor:pointer}
#auth-login button:focus-visible,#auth-login a:focus-visible,#auth-login input:focus-visible{outline:3px solid var(--auth-accent);outline-offset:3px}
#auth-login .auth-story{background:#0b2827;color:#f1faf7;padding:42px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;isolation:isolate}
#auth-login .auth-story:before{content:'';position:absolute;z-index:-1;width:500px;height:500px;border-radius:50%;bottom:-260px;left:-140px;border:1px solid #24514b;box-shadow:0 0 0 65px #163d3633,0 0 0 66px #24514b66,0 0 0 132px #143b3633,0 0 0 133px #24514b44}
#auth-login .auth-brand{display:flex;align-items:center;gap:12px}
#auth-login .auth-mark{width:43px;height:43px;display:grid;place-items:center;background:linear-gradient(140deg,#35d6a8,#0aa97e);color:#062b22;border-radius:11px;font-weight:700;font-size:25px;box-shadow:inset 0 0 0 1px #ffffff22}
#auth-login .auth-word{font-size:27px;font-weight:700;letter-spacing:-1px;line-height:1}
#auth-login .auth-word>span{color:#3de2b2}
#auth-login .auth-word small{display:block;font-size:10px;letter-spacing:2.7px;font-weight:500;margin-top:9px;color:#aac7bf}
#auth-login .auth-overline{font-size:11px;letter-spacing:2px;font-weight:600;color:#89c7b6;margin:48px 0 17px}
#auth-login h1{font-size:clamp(30px,3.3vw,43px);line-height:1.18;font-weight:600;letter-spacing:-1.5px;margin:0 0 22px;color:#f1faf7}
#auth-login h1 em{font-style:normal;color:#7ae2bc}
#auth-login .auth-intro{font-size:14px;color:#b7cec9;max-width:320px;margin:0;line-height:1.8}
#auth-login .auth-features{display:flex;flex-wrap:wrap;gap:22px;margin-top:32px;padding-top:22px;border-top:1px solid #31544a;font-size:12px;color:#cae3da}
#auth-login .auth-features span:before{content:'·';color:#7ae2bc;margin-right:8px}
#auth-login .auth-story-foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:11px;color:#8ead9f;margin-top:45px}
#auth-login .auth-access{padding:26px 48px 22px;display:flex;flex-direction:column;min-width:0}
#auth-login .auth-top{display:flex;justify-content:flex-end;align-items:center;gap:16px;margin-bottom:32px;color:var(--auth-muted);font-size:12px}
#auth-login .auth-theme{background:var(--auth-panel);border:1px solid var(--auth-line);border-radius:8px;color:var(--auth-text);padding:7px 12px;min-width:65px;font-size:12px}
#auth-login .auth-content{width:100%;max-width:380px;margin:auto;padding-bottom:28px}
#auth-login .auth-steps{display:flex;align-items:center;gap:10px;margin-bottom:28px;font-size:12px;color:var(--auth-muted)}
#auth-login .auth-step{display:flex;align-items:center;gap:8px;white-space:nowrap}
#auth-login .auth-step b{display:grid;place-items:center;border-radius:50%;width:25px;height:25px;border:1px solid var(--auth-line);font-size:11px;font-weight:600}
#auth-login .auth-step.is-active{color:var(--auth-accent);font-weight:600}
#auth-login .auth-step.is-active b{background:var(--auth-soft);border-color:var(--auth-accent)}
#auth-login .auth-step-line{height:1px;background:var(--auth-line);flex:1;max-width:38px}
#auth-login .auth-welcome-icon{width:44px;height:44px;display:grid;place-items:center;background:var(--auth-soft);color:var(--auth-accent);border-radius:12px;margin-bottom:17px}
#auth-login .auth-welcome-icon svg{width:23px;height:23px}
#auth-login h2{font-size:28px;letter-spacing:-.8px;font-weight:600;line-height:1.3;margin:0 0 10px;color:var(--auth-text)}
#auth-login .auth-subtitle{color:var(--auth-muted);font-size:13px;line-height:1.7;margin:0 0 24px}
#auth-login .auth-form label{display:block;font-size:13px;font-weight:600;margin:18px 0 8px;color:var(--auth-text)}
#auth-login .auth-form input:not([type="hidden"]){width:100%;height:49px;border:1px solid var(--auth-line);background:var(--auth-input);border-radius:9px;color:var(--auth-text);padding:12px 14px;font-size:14px;box-shadow:0 2px 3px #00000003}
#auth-login .auth-form input::placeholder{color:var(--auth-muted);opacity:.85}
#auth-login .auth-form input:autofill{box-shadow:0 0 0 1000px var(--auth-input) inset;-webkit-text-fill-color:var(--auth-text)}
#auth-login .auth-password{position:relative}
#auth-login .auth-password input{padding-right:80px!important}
#auth-login .auth-reveal{position:absolute;right:5px;top:5px;min-width:66px;height:39px;border:0;background:transparent;color:var(--auth-accent);border-radius:6px;font-size:11px}
#auth-login .auth-hint{font-size:12px;line-height:1.65;color:var(--auth-muted);margin:10px 0 22px}
#auth-login .auth-submit{display:flex;align-items:center;justify-content:center;gap:13px;background:var(--auth-button);color:#fff;border:0;border-radius:9px;width:100%;padding:13px 18px;font-size:14px;font-weight:600;box-shadow:0 4px 12px #087d601f;margin-top:22px}
#auth-login .auth-submit:hover{filter:brightness(1.1)}
#auth-login .auth-submit span{font-size:20px;line-height:1}
#auth-login .auth-admin,#auth-login .auth-secondary{display:block;margin-top:22px;text-align:center;color:var(--auth-muted);font-size:12px;text-decoration:underline;text-underline-offset:4px}
#auth-login .auth-foot{border-top:1px solid var(--auth-line);padding-top:16px;text-align:center;font-size:11px;color:var(--auth-muted)}
#auth-login .auth-tenant{display:flex;align-items:center;gap:12px;margin-bottom:22px;background:var(--auth-panel);border:1px solid var(--auth-line);padding:12px;border-radius:10px}
#auth-login .auth-tenant-logo{display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;border-radius:9px;background:var(--auth-soft);color:var(--auth-accent);font-size:18px;font-weight:700;overflow:hidden}
#auth-login .auth-tenant-logo img{width:100%;height:100%;object-fit:contain;background:#fff;padding:3px}
#auth-login .auth-tenant-name{min-width:0;flex:1;overflow-wrap:anywhere}
#auth-login .auth-tenant strong{display:block;font-size:13px;font-weight:600}
#auth-login .auth-tenant small{display:block;font-size:11px;color:var(--auth-muted)}
#auth-login .auth-switch{color:var(--auth-accent);font-size:11px;text-decoration:underline;max-width:60px}
@media(max-width:850px){#auth-login{grid-template-columns:40% 60%}#auth-login .auth-story{padding:27px}#auth-login .auth-access{padding:24px}#auth-login h1{font-size:32px}}
@media(max-width:600px){.auth-page main{padding:16px 12px}#auth-login{grid-template-columns:1fr;min-height:0;border-radius:12px}#auth-login .auth-story{padding:22px}#auth-login .auth-story-main,#auth-login .auth-story-foot{display:none}#auth-login .auth-access{padding:20px}#auth-login .auth-top{margin-bottom:24px}#auth-login .auth-form input:not([type="hidden"]){font-size:16px}#auth-login .auth-word{font-size:24px}}
/* A entrada fica visível imediatamente, sem a animação das telas internas. */
#auth-login{animation:none}
.auth-page [data-auth-flash]{animation:none;background:var(--auth-panel)!important;color:var(--auth-text)!important;border-color:var(--auth-line)!important;border-left:3px solid var(--auth-accent)!important}
.auth-page [data-auth-flash="danger"],.auth-page [data-auth-flash="warning"]{border-left-color:#d97706!important}
.auth-page main.stagger>*{animation:none}
