/* Dark theme for login, sign-up and password pages. Same switch as the public site (localStorage "inv-theme", set by
   invoicy-theme.js); light stays the default and nothing here applies unless html[data-theme="dark"]. */

/* ---- theme button ---- */
.auth-top-r{display:flex;align-items:center;gap:16px}
.auth-theme-btn{display:inline-flex;align-items:center;justify-content:center;flex:none;width:36px;height:36px;padding:0;border:1px solid #cdd6e2;border-radius:999px;background:#fff;color:#334155;font-size:14px;line-height:1;cursor:pointer;transition:color .2s,border-color .2s,background-color .2s,transform .3s cubic-bezier(.16,1,.3,1)}
.auth-theme-btn:hover{color:var(--accent);border-color:var(--accent);transform:rotate(-12deg)}
.auth-theme-btn:active{transform:scale(.94)}
.auth-theme-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.auth-theme-btn .ico-sun{display:none}
html[data-theme="dark"] .auth-theme-btn .ico-sun{display:inline-block}
html[data-theme="dark"] .auth-theme-btn .ico-moon{display:none}
@media (prefers-reduced-motion:reduce){.auth-theme-btn{transition:none}.auth-theme-btn:hover{transform:none}}

/* ---- tokens and page ---- */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#eaf0f8;--ink2:#b4c1d2;--ink3:#8a9bb1;--line:#1f2f46;--soft:#0e1829;--accent-t:rgba(26,159,223,.16);
}
html[data-theme="dark"] body.auth-body{background:#0a111d;color:var(--ink)}
html[data-theme="dark"] ::selection{background:#1a9fdf;color:#fff}
html[data-theme="dark"] .auth-theme-btn{background:#111c2f;border-color:#2a3d59;color:#cbd6e4}
html[data-theme="dark"] .auth-theme-btn:hover{color:#5cc3f2;border-color:#5cc3f2}
html[data-theme="dark"] .auth-back:hover,html[data-theme="dark"] .auth-foot a:hover{color:#5cc3f2}

/* ---- card content ---- */
html[data-theme="dark"] .auth-tabs{background:#0e1829;border-color:#1f2f46}
html[data-theme="dark"] .auth-tabs a:hover{color:#5cc3f2}
html[data-theme="dark"] .auth-tabs a.on{background:#16253b;color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.4)}
html[data-theme="dark"] .auth-msg.bad{background:rgba(239,68,68,.14);color:#fca5a5;border-color:rgba(248,113,113,.3)}
html[data-theme="dark"] .auth-msg.ok{background:rgba(22,163,74,.14);color:#86efac;border-color:rgba(74,222,128,.3)}
html[data-theme="dark"] .auth-msg.info{background:rgba(26,159,223,.14);color:#8fd3f4;border-color:rgba(92,195,242,.28)}
html[data-theme="dark"] .auth-link,html[data-theme="dark"] .auth-alt a,html[data-theme="dark"] .auth-check a{color:#38b6ee}

/* ---- fields ---- */
html[data-theme="dark"] .auth-form input[type=text],html[data-theme="dark"] .auth-form input[type=password],html[data-theme="dark"] .auth-form input[type=email]{background:#0c1626;border-color:#3a4f6c;color:var(--ink);box-shadow:none}
html[data-theme="dark"] .auth-form input:hover{border-color:#5b7396}
html[data-theme="dark"] .auth-form input::placeholder{color:#7b8ea6}
html[data-theme="dark"] .auth-form input:focus{background:#0e1b2f;border-color:var(--accent);box-shadow:0 0 0 4px rgba(26,159,223,.25)}
html[data-theme="dark"] .auth-form input:-webkit-autofill,html[data-theme="dark"] .auth-form input:-webkit-autofill:hover,html[data-theme="dark"] .auth-form input:-webkit-autofill:focus{-webkit-text-fill-color:#eaf0f8;caret-color:#eaf0f8;-webkit-box-shadow:0 0 0 1000px #0c1626 inset;box-shadow:0 0 0 1000px #0c1626 inset;border-color:#3a4f6c}
html[data-theme="dark"] .pw .pw-toggle:hover,html[data-theme="dark"] .pw>i:not(.ic-i):hover{color:#5cc3f2;background:rgba(26,159,223,.16)}
html[data-theme="dark"] .ic .ic-i{color:#7f92aa}
html[data-theme="dark"] .ic:focus-within .ic-i{color:#38b6ee}
html[data-theme="dark"] .auth-btn.dark{background:#16253b;color:#fff}
html[data-theme="dark"] .auth-btn.dark:hover{background:#1d3150}
html[data-theme="dark"] .text-error,html[data-theme="dark"] .af .hint.bad{color:#fca5a5}
html[data-theme="dark"] .af .hint.good{color:#86efac}

/* ---- password meter and rules ---- */
html[data-theme="dark"] .pw-meter span{background:#1f2f46}
html[data-theme="dark"] .pw-rules li:before{border-color:#4a5f7d}
html[data-theme="dark"] .pw-rules li.ok{color:#86efac}
html[data-theme="dark"] .pw-rules li.ok:before{border-color:#22a45d}

/* ---- sign-up sections ---- */
html[data-theme="dark"] .reg-sec h3 i,html[data-theme="dark"] .reg-next li i{background:rgba(26,159,223,.16);color:#38b6ee}
html[data-theme="dark"] .auth-check input{color-scheme:dark}
