/* Окно входа в стиле «Intelligent», шаг 2 линии «Дизайн кабинета» (решения владельца 13.10):
   вход «RS Compliance», принят 15.10: фото переговорной 62 % ширины, по центру знак + RS COMPLIANCE + Results | Systems; справа лист (/media/img/login-rs-ramp.jpg, уже на сервере), половина — лист с полями-линиями
   и одной прямоугольной кнопкой; знак «ось двух сторон», под именем «RS Project Review». Всегда светлый, как сайт.
   Только при <html data-style="intelligent"> (?style=intelligent; ставит login.js). Без флага ничего не меняет.
   Разметка login.html и формы проходной (gate.py) не меняются: пароль, код, второй шаг, «забыли пароль», заявка.
   Макет: rspr/docs/Дизайн-новый-кабинет/Кабинет — экраны/02-вход.html */
@font-face { font-family: "IBM Plex Sans"; font-weight: 300; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-cyrillic-300-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 300; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 500; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-condensed-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 500; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 600; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-condensed-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 600; font-display: swap; src: url("/admin/assets/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root[data-style="intelligent"] {
  color-scheme: light;
  --sand: #FFFFFF; --ink: #141413; --ink-muted: #6A6862; --ink-faint: #6A6862;
  --line: rgba(20, 20, 19, .15); --border-light: rgba(20, 20, 19, .82);
  --clay: #141413; --clay-light: #2A2A28; --clay-deep: #A3271C; --calm: #141413;
  --cinnabar: #A3271C;
  --display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
  --text: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --side: clamp(24px, 5vw, 72px);
  /* знак «ось двух сторон», пропорции И */
  --rs-sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2.86 4.9'%3E%3Crect x='0.1' y='1.25' width='0.8' height='0.8' fill='none' stroke='black' stroke-width='0.2'/%3E%3Crect x='1.33' y='0' width='0.2' height='4.9' fill='black'/%3E%3Crect x='1.86' y='2.75' width='1' height='1' fill='black'/%3E%3C/svg%3E");
}

:root[data-style="intelligent"] body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: #FFFFFF; background-image: none; color: var(--ink); font-family: var(--text); font-weight: 300; padding: 0; }
:root[data-style="intelligent"] .lg { flex: 1; display: grid; grid-template-columns: 1.6fr 1fr; min-height: 0; }

/* левая панель: фото переговорной, ч/б, лёгкое затемнение; логотип по центру на полосе стены */
:root[data-style="intelligent"] .lg-photo { position: relative; overflow: hidden; background: #1B1B1A url("/admin/assets/img/login-bg.jpg") 50% 12% / cover no-repeat; color: #FFFFFF; }
:root[data-style="intelligent"] .lg-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,17,17,.22), rgba(17,17,17,.12) 45%, rgba(17,17,17,.3)); }
:root[data-style="intelligent"] .lg-brand { position: absolute; left: 0; right: 0; top: 36%; transform: translateY(-50%); display: grid; justify-items: center; gap: 10px; text-shadow: 0 1px 14px rgba(0,0,0,.5); animation: in-fade .6s ease-out; }
:root[data-style="intelligent"] .lg-brand svg { width: 52px; height: 52px; margin-bottom: 6px; color: #FFFFFF; }
:root[data-style="intelligent"] .lg-brand svg .c { animation: rs-breath 2.6s ease-in-out infinite; }
:root[data-style="intelligent"] .lg-brand b { font: 500 26px/1 var(--display); letter-spacing: .3em; text-transform: uppercase; padding-left: .3em; }
:root[data-style="intelligent"] .lg-brand small { font: 300 12px "IBM Plex Mono", ui-monospace, Menlo, monospace; letter-spacing: .18em; color: #D9D9D4; padding-left: .18em; }
:root[data-style="intelligent"] .lg-brand .lg-sub { margin: 8px 0 0; font: 300 13.5px/1.45 var(--text); color: rgba(255, 255, 255, .82); text-align: center; max-width: 38ch; padding: 0 24px; }
@keyframes rs-breath { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes in-fade { from { opacity: 0; } to { opacity: 1; } }

/* правая панель: чистая карточка входа в стиле эталона 28.11 (как на стенде) */
:root[data-style="intelligent"] .lg-form { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; max-width: none; margin: 0; padding: clamp(28px, 5vh, 56px) var(--side); background: #F4F5F7; border: 0; box-sizing: border-box; }
:root[data-style="intelligent"] .lg-card { width: min(400px, 100%); background: #FFFFFF; border: 1px solid #E2E5EB; border-radius: 8px; padding: 32px 30px; box-sizing: border-box; box-shadow: 0 12px 34px rgba(18, 20, 23, .05); }
:root[data-style="intelligent"] .lg-kicker { margin: 0 0 6px; font: 500 10.5px var(--display); letter-spacing: .14em; text-transform: uppercase; color: #6B7280; }
:root[data-style="intelligent"] .lg-title { margin: 0 0 18px; font: 400 24px/1.2 var(--display); letter-spacing: -.02em; text-transform: none; color: #121417; text-wrap: balance; }
:root[data-style="intelligent"] .door-k { display: block; margin: 0 0 18px; font: 400 13px var(--text); letter-spacing: 0; text-transform: none; color: #6B7280; }
:root[data-style="intelligent"] .door-k::first-letter { text-transform: uppercase; }
:root[data-style="intelligent"] .door-k i { display: none; }
:root[data-style="intelligent"] .door-note { margin: -8px 0 18px; font-size: 13px; line-height: 1.5; color: #6B7280; max-width: none; }
:root[data-style="intelligent"] .door-ok { margin: 0 0 18px; padding-inline-start: 12px; border-inline-start: 2px solid #1F3F86; font-size: 13px; color: #121417; }

:root[data-style="intelligent"] form, :root[data-style="intelligent"] form.one, :root[data-style="intelligent"] form.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: none; }
:root[data-style="intelligent"] form label { display: grid; gap: 6px; font: 500 10.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: #6B7280; }
:root[data-style="intelligent"] input { height: 40px; padding: 0 12px; background: #FFFFFF; border: 1px solid #CBD1DC; border-radius: 6px; color: #121417; font: 400 14px var(--text); box-sizing: border-box; transition: border-color .14s ease; }
:root[data-style="intelligent"] input::placeholder { color: #6B7280; opacity: .65; }
:root[data-style="intelligent"] input:focus { outline: 0; border-color: #1F3F86; box-shadow: 0 0 0 2px rgba(31, 63, 134, .12); }
:root[data-style="intelligent"] input[name="code"] { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; letter-spacing: .3em; }
:root[data-style="intelligent"] label.agree { display: flex; gap: 10px; align-items: flex-start; font: 400 12.5px/1.45 var(--text); letter-spacing: 0; text-transform: none; color: #3A404B; }
:root[data-style="intelligent"] label.agree input { appearance: none; flex: none; width: 15px; height: 15px; padding: 0; margin-top: 2px; border: 1px solid #CBD1DC; border-radius: 3px; background: #FFFFFF; }
:root[data-style="intelligent"] label.agree input:checked { background: #1F3F86; border-color: #1F3F86; box-shadow: inset 0 0 0 3px #FFFFFF; }
:root[data-style="intelligent"] label.agree a { color: #1F3F86; }

/* одна главная генциановая кнопка на всю ширину карточки */
:root[data-style="intelligent"] button { justify-self: stretch; width: 100%; height: 42px; padding: 0 20px; border: 1px solid #1F3F86; border-radius: 7px; background: #1F3F86; color: #FFFFFF;
  font: 500 14px/1 var(--text); letter-spacing: 0; text-transform: none; cursor: pointer; transition: background-color .16s ease, border-color .16s ease; }
:root[data-style="intelligent"] button:hover { background: #18326D; border-color: #18326D; color: #FFFFFF; }
:root[data-style="intelligent"] button:active { background: #142959; color: #FFFFFF; }
:root[data-style="intelligent"] :focus-visible { outline: 2px solid #1F3F86; outline-offset: 2px; }

/* ошибка — киноварью, единственное красное на экране */
:root[data-style="intelligent"] .err { margin: 14px 0 0; font: 400 13px var(--text); color: #B3261E; }
:root[data-style="intelligent"] .forgot { display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid #E2E5EB; font: 400 12.5px var(--text); letter-spacing: 0; text-transform: none; }
:root[data-style="intelligent"] .forgot a { color: #6B7280; text-decoration: none; }
:root[data-style="intelligent"] .forgot a:hover { color: #1F3F86; }
:root[data-style="intelligent"] .log-note { opacity: 1; margin: 16px 0 0; font-size: 11.5px; line-height: 1.45; color: #6B7280; }

:root[data-style="intelligent"] .foot { border-top: 1px solid var(--line); }
:root[data-style="intelligent"] .foot .shell { max-width: none; padding: 14px var(--side) 18px; font: 400 12px var(--text); letter-spacing: 0; text-transform: none; color: var(--ink-muted); }
:root[data-style="intelligent"] .foot a { color: var(--ink-muted); }

/* телефон: фото полосой 220 px сверху с логотипом, лист ниже */
@media (max-width: 860px) {
  :root[data-style="intelligent"] .lg { grid-template-columns: 1fr; }
  :root[data-style="intelligent"] .lg-photo { height: 220px; background-image: url("/admin/assets/img/login-bg-m.jpg"); background-size: cover; background-position: 50% 30%; }
  :root[data-style="intelligent"] .lg-brand { top: 50%; }
  :root[data-style="intelligent"] .lg-brand svg { width: 40px; height: 40px; }
  :root[data-style="intelligent"] .lg-brand b { font-size: 20px; }
  :root[data-style="intelligent"] .lg-form { justify-content: flex-start; padding: 28px 20px 32px; }
  :root[data-style="intelligent"] .lg-form > * { width: 100%; }
  :root[data-style="intelligent"] .foot .shell { padding: 14px 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { :root[data-style="intelligent"] .lg-brand, :root[data-style="intelligent"] .lg-brand svg .c { animation: none; } :root[data-style="intelligent"] button { transition: none; } }

/* обзор входов 18.10 (владелец «ок»): крупно — шаг («Вход в кабинет», «Код из бота», «Второй шаг входа»…), мелкая
   строка шага над формой больше не нужна; ошибка — квадрат киновари и чёрный текст, как во входе в админку */
:root[data-style="intelligent"] .door-k { display: none; }
:root[data-style="intelligent"] .err { color: var(--ink); }
:root[data-style="intelligent"] .err:not(:empty)::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 9px; background: var(--cinnabar); vertical-align: 1px; }

/* тёмная тема карточки входа (как на стенде 28.11) */
:root[data-style="intelligent"][data-theme="dark"] {
  color-scheme: dark;
  --sand: #0D0F13; --ink: #F2F4F8; --ink-muted: #98A0B0; --ink-faint: #7E8799;
  --line: rgba(255, 255, 255, .10); --cinnabar: #E5604A;
}
:root[data-style="intelligent"][data-theme="dark"] body { background: #0D0F13; color: #F2F4F8; }
:root[data-style="intelligent"][data-theme="dark"] .lg-form { background: #0D0F13; }
:root[data-style="intelligent"][data-theme="dark"] .lg-card { background: #14171D; border-color: #252A36; box-shadow: 0 18px 44px rgba(0, 0, 0, .42); }
:root[data-style="intelligent"][data-theme="dark"] .lg-kicker,
:root[data-style="intelligent"][data-theme="dark"] .door-note,
:root[data-style="intelligent"][data-theme="dark"] .log-note,
:root[data-style="intelligent"][data-theme="dark"] form label { color: #98A0B0; }
:root[data-style="intelligent"][data-theme="dark"] .lg-title,
:root[data-style="intelligent"][data-theme="dark"] .door-ok { color: #F2F4F8; }
:root[data-style="intelligent"][data-theme="dark"] input { background: #0F1218; border-color: #2B3242; color: #F2F4F8; }
:root[data-style="intelligent"][data-theme="dark"] input::placeholder { color: #6F788C; }
:root[data-style="intelligent"][data-theme="dark"] input:focus { border-color: #6E8EE6; box-shadow: 0 0 0 2px rgba(110, 142, 230, .2); }
:root[data-style="intelligent"][data-theme="dark"] button { background: #5F82E2; border-color: #5F82E2; color: #0B1020; font-weight: 600; }
:root[data-style="intelligent"][data-theme="dark"] button:hover { background: #7394EC; border-color: #7394EC; color: #0B1020; }
:root[data-style="intelligent"][data-theme="dark"] .forgot { border-top-color: #252A36; }
:root[data-style="intelligent"][data-theme="dark"] .forgot a { color: #98A0B0; }
:root[data-style="intelligent"][data-theme="dark"] .forgot a:hover { color: #8AA7F5; }
:root[data-style="intelligent"][data-theme="dark"] label.agree { color: #C2C8D4; }
:root[data-style="intelligent"][data-theme="dark"] label.agree input { background: #0F1218; border-color: #2B3242; }
:root[data-style="intelligent"][data-theme="dark"] label.agree input:checked { background: #5F82E2; border-color: #5F82E2; box-shadow: inset 0 0 0 3px #0F1218; }
:root[data-style="intelligent"][data-theme="dark"] label.agree a { color: #8AA7F5; }
