.login-card{max-width:510px}.totp-key{padding:16px;background:#eef4ec;border-radius:8px;margin:15px 0}.totp-key code{display:block;word-break:break-all;font-size:17px;letter-spacing:2px;margin-bottom:12px}#restart-login{margin-top:18px}#login-error{color:#a44432;font-size:12px}#recovery-list{display:grid;grid-template-columns:1fr 1fr;gap:9px;list-style:none;padding:12px 0;font:12px/1.8 monospace}#recovery-list li{background:#eff4ed;padding:7px;text-align:center;border-radius:5px}#recovery .button{display:block;width:100%;margin-top:12px}@media(max-width:480px){#recovery-list{grid-template-columns:1fr}.login-card{padding:22px}}


/* CaseSpace protected entry */
body.login-page{display:grid;grid-template-columns:minmax(280px,1fr) minmax(370px,490px);gap:clamp(24px,5vw,100px);place-items:center;min-height:100dvh;padding:clamp(24px,5vw,72px);background:radial-gradient(circle at 70% 10%,#e8efff 0,#f4f6fb 36%,#edf1f8 100%);color:#17243a}
.login-scene{max-width:640px;width:100%;justify-self:end}
.login-scene .login-logo{display:flex;align-items:center;gap:11px;color:#132644;font-size:23px;font-weight:800;letter-spacing:-.045em}
.login-scene .login-logo b{display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:linear-gradient(145deg,#3c7bff,#7657dc);color:#fff;font-size:28px;box-shadow:0 8px 19px #3269e840}
.login-scene .login-kicker{margin:60px 0 14px;color:#3d65b6;font-size:11px;letter-spacing:.16em;font-weight:850}
.login-scene h2{font-size:clamp(35px,4vw,56px);line-height:1.09;letter-spacing:-.055em;color:#10223e;font-weight:800;max-width:11ch}
.login-scene h2 span{color:#245bea}
.login-scene>p:last-child{font-size:16px;color:#62758f;line-height:1.6;max-width:48ch;margin-top:20px}
.login-card{width:100%;max-width:490px;margin:0;justify-self:start;border:1px solid #dfe6f1;border-radius:20px;padding:clamp(23px,3vw,37px);background:#fff;box-shadow:0 22px 65px #1b355522}
.login-card .eyebrow{color:#5071b0;font-size:10px;font-weight:850;letter-spacing:.17em}
.login-card h1{font-size:29px;letter-spacing:-.04em;color:#122440;margin:12px 0 5px}
.login-card>p:not(.eyebrow){color:#677891}
.login-card form{margin:24px 0 13px}
.login-card form label{display:block;color:#3a4e6a;font-size:12px;font-weight:700;margin:0 0 15px}
.login-card form input{display:block;width:100%;min-height:45px;margin:6px 0 0;padding:10px 12px;border:1px solid #d7e0ee;border-radius:9px;background:#fbfcff;color:#17243a;font-size:14px}
.login-card form input:focus{background:#fff;border-color:#7196f0;outline:3px solid #d5e1ff}
.login-card form .button.primary,.login-card #finish-login{width:100%;min-height:45px;border-radius:9px;background:#245bea;border:1px solid #245bea;color:#fff;font-size:13px;font-weight:750;box-shadow:0 6px 14px #245bea2c}
.login-card form .button.primary:hover,.login-card #finish-login:hover{background:#1749c8}
.login-card .hint{color:#7a8aa0;font-size:11px;line-height:1.55}
.totp-key,#recovery-list li{background:#f1f5ff;border:1px solid #e0e9fa;border-radius:9px}
#login-error{color:#b53e39}
@media(max-width:900px){body.login-page{grid-template-columns:1fr;gap:22px;align-content:center;padding:22px}.login-scene{justify-self:center;text-align:center}.login-scene .login-logo{justify-content:center}.login-scene .login-kicker,.login-scene h2,.login-scene>p:last-child{display:none}.login-card{justify-self:center;max-width:510px}}
@media(max-width:480px){.login-card{padding:24px 19px;border-radius:15px}.login-card h1{font-size:26px}.login-scene .login-logo{font-size:20px}}

/* >>> login-apple 20.10.2026: вход в стиле Apple + неоновые акценты пульта; всегда тёмный, текст контрастный */
html[data-sp-theme="dark"] body.login-page{background:#0a0a0f!important;color:#f5f5f7!important;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Inter","Segoe UI",Roboto,sans-serif!important;-webkit-font-smoothing:antialiased;min-height:100vh;position:relative;overflow-x:hidden}
html[data-sp-theme="dark"] body.login-page::before{content:"";position:fixed;inset:-20%;z-index:0;pointer-events:none;background:radial-gradient(40% 35% at 20% 15%,rgba(124,92,255,.35),transparent 70%),radial-gradient(35% 30% at 85% 85%,rgba(54,214,160,.22),transparent 70%),radial-gradient(30% 25% at 90% 10%,rgba(91,140,255,.18),transparent 70%)}
html[data-sp-theme="dark"] body.login-page>*{position:relative;z-index:1}
html[data-sp-theme="dark"] body.login-page .login-scene{color:#f5f5f7!important;background:none!important}
html[data-sp-theme="dark"] body.login-page .login-scene h2,html[data-sp-theme="dark"] body.login-page .login-scene p{color:#d1d1d6!important}
html[data-sp-theme="dark"] body.login-page .login-scene h2 span{background:linear-gradient(90deg,#a98bff,#36d6a0);-webkit-background-clip:text;background-clip:text;color:transparent!important}
html[data-sp-theme="dark"] body.login-page .login-logo{color:#f5f5f7!important;font-weight:700!important;letter-spacing:-.02em}
html[data-sp-theme="dark"] body.login-page .login-logo b{background:linear-gradient(135deg,#7c5cff,#5b8cff)!important;color:#fff!important;box-shadow:0 8px 30px rgba(124,92,255,.45)}
html[data-sp-theme="dark"] body.login-page .login-kicker{color:#a98bff!important;letter-spacing:.12em}
html[data-sp-theme="dark"] body.login-page .login-card{background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.035))!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:24px!important;box-shadow:0 20px 60px rgba(0,0,0,.55),0 0 0 1px rgba(124,92,255,.08) inset!important;-webkit-backdrop-filter:blur(24px) saturate(140%);backdrop-filter:blur(24px) saturate(140%);color:#f5f5f7!important;overflow:hidden;position:relative}
html[data-sp-theme="dark"] body.login-page .login-card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,#7c5cff,#a98bff 35%,#36d6a0 70%,#c8f94a)}
html[data-sp-theme="dark"] body.login-page .login-card .eyebrow{color:#a98bff!important;font-size:12px!important;font-weight:600!important;letter-spacing:.14em!important;opacity:1!important}
html[data-sp-theme="dark"] body.login-page .login-card h1{color:#ffffff!important;font-weight:700!important;letter-spacing:-.025em!important;line-height:1.1!important;-webkit-text-fill-color:#fff!important;background:none!important}
html[data-sp-theme="dark"] body.login-page .login-card p,html[data-sp-theme="dark"] body.login-page .login-card .hint{color:#c7c7cc!important;line-height:1.5!important}
html[data-sp-theme="dark"] body.login-page .login-card label{color:#f5f5f7!important;font-weight:600!important;font-size:15px!important}
html[data-sp-theme="dark"] body.login-page .login-card input{background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:14px!important;color:#fff!important;font-size:17px!important;padding:14px 16px!important;transition:border-color .15s,box-shadow .15s,background .15s;-webkit-text-fill-color:#fff}
html[data-sp-theme="dark"] body.login-page .login-card input:focus{outline:none!important;border-color:#8b6dff!important;background:rgba(255,255,255,.1)!important;box-shadow:0 0 0 4px rgba(124,92,255,.28)!important}
html[data-sp-theme="dark"] body.login-page .login-card input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px #1c1a2b inset!important;-webkit-text-fill-color:#fff!important}
html[data-sp-theme="dark"] body.login-page .login-card .button.primary{background:linear-gradient(135deg,#7c5cff,#5b8cff)!important;border:0!important;border-radius:14px!important;color:#fff!important;font-weight:600!important;font-size:17px!important;padding:15px 18px!important;box-shadow:0 10px 30px rgba(124,92,255,.4)!important;transition:transform .12s,box-shadow .12s,filter .12s}
html[data-sp-theme="dark"] body.login-page .login-card .button.primary:hover{filter:brightness(1.08);box-shadow:0 12px 36px rgba(124,92,255,.55)!important}
html[data-sp-theme="dark"] body.login-page .login-card .button.primary:active{transform:scale(.985)}
html[data-sp-theme="dark"] body.login-page .login-card .text-button,html[data-sp-theme="dark"] body.login-page a{color:#b9a3ff!important;text-decoration:none!important;font-weight:500}
html[data-sp-theme="dark"] body.login-page a:hover{color:#d6c9ff!important;text-decoration:underline!important}
html[data-sp-theme="dark"] body.login-page .login-card small,html[data-sp-theme="dark"] body.login-page .login-card .note,html[data-sp-theme="dark"] body.login-page .login-card footer{color:#a1a1aa!important}
html[data-sp-theme="dark"] body.login-page .login-card code{background:rgba(255,255,255,.08)!important;color:#e5e5ea!important;border-radius:8px;padding:2px 6px}
/* <<< login-apple */

/* >>> login-apple-light 20.10.2026: вход в светлой теме — светлый, в том же стиле */
html[data-sp-theme="light"] body.login-page{background:#f5f5f7!important;color:#1d1d1f!important;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Inter","Segoe UI",Roboto,sans-serif!important;-webkit-font-smoothing:antialiased;min-height:100vh;position:relative;overflow-x:hidden}
html[data-sp-theme="light"] body.login-page::before{content:"";position:fixed;inset:-20%;z-index:0;pointer-events:none;background:radial-gradient(40% 35% at 20% 15%,rgba(124,92,255,.16),transparent 70%),radial-gradient(35% 30% at 85% 85%,rgba(54,214,160,.13),transparent 70%),radial-gradient(30% 25% at 90% 10%,rgba(91,140,255,.12),transparent 70%)}
html[data-sp-theme="light"] body.login-page>*{position:relative;z-index:1}
html[data-sp-theme="light"] body.login-page .login-scene{background:none!important;color:#1d1d1f!important}
html[data-sp-theme="light"] body.login-page .login-scene h2{color:#1d1d1f!important}
html[data-sp-theme="light"] body.login-page .login-scene p{color:#515154!important}
html[data-sp-theme="light"] body.login-page .login-scene h2 span{background:linear-gradient(90deg,#7c5cff,#16a37a);-webkit-background-clip:text;background-clip:text;color:transparent!important}
html[data-sp-theme="light"] body.login-page .login-logo{color:#1d1d1f!important;font-weight:700!important;letter-spacing:-.02em}
html[data-sp-theme="light"] body.login-page .login-logo b{background:linear-gradient(135deg,#7c5cff,#5b8cff)!important;color:#fff!important;box-shadow:0 8px 24px rgba(124,92,255,.35)}
html[data-sp-theme="light"] body.login-page .login-kicker{color:#6d4aff!important;letter-spacing:.12em}
html[data-sp-theme="light"] body.login-page .login-card{background:rgba(255,255,255,.88)!important;border:1px solid rgba(0,0,0,.06)!important;border-radius:24px!important;box-shadow:0 20px 60px rgba(60,40,140,.12),0 1px 2px rgba(0,0,0,.04)!important;-webkit-backdrop-filter:blur(24px) saturate(140%);backdrop-filter:blur(24px) saturate(140%);color:#1d1d1f!important;overflow:hidden;position:relative}
html[data-sp-theme="light"] body.login-page .login-card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,#7c5cff,#a98bff 35%,#36d6a0 70%,#c8f94a)}
html[data-sp-theme="light"] body.login-page .login-card .eyebrow{color:#6d4aff!important;font-size:12px!important;font-weight:600!important;letter-spacing:.14em!important;opacity:1!important}
html[data-sp-theme="light"] body.login-page .login-card h1{color:#1d1d1f!important;-webkit-text-fill-color:#1d1d1f!important;background:none!important;font-weight:700!important;letter-spacing:-.025em!important;line-height:1.1!important}
html[data-sp-theme="light"] body.login-page .login-card p,html[data-sp-theme="light"] body.login-page .login-card .hint{color:#515154!important;line-height:1.5!important}
html[data-sp-theme="light"] body.login-page .login-card label{color:#1d1d1f!important;font-weight:600!important;font-size:15px!important}
html[data-sp-theme="light"] body.login-page .login-card input{background:#fff!important;border:1px solid rgba(0,0,0,.14)!important;border-radius:14px!important;color:#1d1d1f!important;-webkit-text-fill-color:#1d1d1f;font-size:17px!important;padding:14px 16px!important}
html[data-sp-theme="light"] body.login-page .login-card input:focus{outline:none!important;border-color:#7c5cff!important;box-shadow:0 0 0 4px rgba(124,92,255,.18)!important}
html[data-sp-theme="light"] body.login-page .login-card .button.primary{background:linear-gradient(135deg,#7c5cff,#5b8cff)!important;border:0!important;border-radius:14px!important;color:#fff!important;font-weight:600!important;font-size:17px!important;padding:15px 18px!important;box-shadow:0 10px 26px rgba(124,92,255,.32)!important}
html[data-sp-theme="light"] body.login-page .login-card .text-button,html[data-sp-theme="light"] body.login-page a{color:#6d4aff!important;text-decoration:none!important;font-weight:500}
html[data-sp-theme="light"] body.login-page .login-card code{background:#f2f2f7!important;color:#1d1d1f!important;border-radius:8px;padding:2px 6px}
/* <<< login-apple-light */

/* 2026-11-01 Claude: страница входа и регистрации.
   1) CSP сайта (style-src 'self') запрещает inline-стили, поэтому оформление «14 дней»,
      «Написать нам» и подвала (signup.py / legal.py) не применялось — перенесено сюда.
   2) Глобальные nav{display:grid} и footer{display:flex} из style.css ломали подвал.
   3) На телефоне ссылки подвала без переносов растягивали колонку шире экрана. */
body.login-page>a[href="/register"]{display:none!important}
body.login-page .login-card a[href="/register"]{display:block;margin-top:12px;padding:13px 18px;border-radius:14px;border:1.5px solid #7c5cff;background:rgba(124,92,255,.07);color:#4b32c3!important;font-weight:600;font-size:16px;line-height:1.2;text-align:center;text-decoration:none!important}
html[data-sp-theme="dark"] body.login-page .login-card a[href="/register"]{background:rgba(124,92,255,.14);color:#d6c9ff!important}
body.login-page>.cs-reg{grid-column:1/-1;position:static!important;margin:0!important;text-align:center}
body.login-page>.cs-reg a{display:inline-block;padding:11px 20px;border-radius:12px;background:#fff;color:#4b32c3!important;font-weight:600;text-decoration:none!important;box-shadow:0 4px 16px rgba(30,20,80,.12)}
html[data-sp-theme="dark"] body.login-page>.cs-reg a{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#e4dcff!important;box-shadow:none}
body.login-page>.mps-legal{grid-column:1/-1;display:block;width:100%;max-width:760px;margin:0 auto;padding:4px 16px 24px;box-sizing:border-box;text-align:center;font-size:13px;line-height:1.5;color:#8e8e93}
body.login-page>.mps-legal nav{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 18px;margin:0}
body.login-page>.mps-legal nav a{display:inline;margin:0;white-space:nowrap}
body.login-page>.mps-legal .mps-legal-req{margin-top:8px}
@media (max-width:900px){
  body.login-page{grid-template-columns:minmax(0,1fr)!important;padding:16px!important;padding-top:calc(16px + env(safe-area-inset-top))!important;gap:16px!important}
  body.login-page>*{min-width:0;max-width:100%}
  body.login-page .login-card{width:100%;max-width:510px;box-sizing:border-box}
  body.login-page>.mps-legal{padding:4px 0 calc(20px + env(safe-area-inset-bottom))}
}
