:root{--bg:#1f1f1e;--card:#262624;--card2:#2b2b28;--border:rgba(250,249,245,.10);--text:#faf9f5;
--muted:#c2beb2;--faint:#8c8880;--accent:#faf9f5;--btn-face:#ffffff;--btn-ink:#1f1f1e;--btn-face-hover:#ebebe8;--bad:#d97066;
--sans:"Anthropic Sans","WallSoft Sans","Inter",-apple-system,"Segoe UI",sans-serif;}
*{box-sizing:border-box;}
html,body{height:100%;margin:0;}
body{background:var(--bg);color:var(--text);font-family:var(--sans);display:flex;align-items:center;justify-content:center;padding:20px;}
.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:32px;width:360px;max-width:100%;}
h1{font-size:18px;margin:0 0 16px;font-weight:600;}

label{display:block;font-size:12px;color:var(--faint);margin:0 0 6px;letter-spacing:.02em;}
input{width:100%;padding:10px 12px;border-radius:8px;border:1px solid var(--border);background:var(--field,#171716);color:var(--text);font-family:var(--sans);font-size:14px;margin-bottom:14px;}
input:focus{outline:none;border-color:var(--accent);}
button{width:100%;padding:11px;border-radius:8px;border:none;background:var(--btn-face);color:var(--btn-ink);font-family:var(--sans);font-size:14px;font-weight:600;cursor:pointer;}
button:hover:not(:disabled){filter:brightness(1.08);}
button:disabled{opacity:.55;cursor:default;}

/* Пустая строка ошибки держала под подзаголовком 29 точек пустоты — свои
   12 отступа и 17 запаса на текст, которого нет. Место резервировалось,
   чтобы окно не прыгало при ошибке; но дыру видно всегда, а ошибку —
   один раз из ста. Пусто — значит и места не занимает. */
/* Ошибка стоит под кнопкой — там, куда смотрят после нажатия. Пустая ничего
   не занимает: место под текст, которого нет, держало дыру наверху окна. */
.err{color:var(--bad);font-size:13px;margin-top:12px;min-height:17px;line-height:1.4;
  text-align:center;}
.err:empty{display:none;}
.foot{margin-top:18px;padding-top:16px;border-top:1px solid var(--border);font-size:13px;color:var(--muted);text-align:center;}
.foot a{color:var(--accent);text-decoration:none;}
.foot a:hover{text-decoration:underline;}

/* the warning that matters most on this page: a lost password is unrecoverable */
.warn{background:var(--card2);border:1px solid var(--border);border-left:2px solid var(--bad);border-radius:8px;padding:11px 13px;font-size:12.5px;color:var(--muted);line-height:1.5;margin:0 0 16px;}
.warn b{color:var(--text);font-weight:600;}
::selection{background:var(--accent);color:var(--bg);}

/* ---- light theme ----
   These three pages carried a hardcoded dark palette, so choosing light in the
   vault and then logging out landed you on a black login screen. Same tokens,
   same two triggers as index.css: an explicit choice stamped on <html> by
   theme.js, and the system preference when there is no choice. */
:root[data-theme="light"]{
  --bg:#faf9f5;--card:#ffffff;--card2:#f0efea;--border:rgba(31,31,30,.12);
  --text:#1f1f1e;--muted:#5c584f;--faint:#6f6b62;--accent:#1f1f1e;--btn-face:#1f1f1e;--btn-ink:#faf9f5;--btn-face-hover:#353533;--bad:#b23a2f;--good:#5f7a3a;
  --field:#ffffff;
}
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#faf9f5;--card:#ffffff;--card2:#f0efea;--border:rgba(31,31,30,.12);
    --text:#1f1f1e;--muted:#5c584f;--faint:#6f6b62;--accent:#1f1f1e;--btn-face:#1f1f1e;--btn-ink:#faf9f5;--btn-face-hover:#353533;--bad:#b23a2f;--good:#5f7a3a;
    --field:#ffffff;
  }
}
