/* Вход сотрудников Deep. Токены — как в backoffice-ui (светлая и тёмная тема). */
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/onest-cyrillic-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f3f4f6; --surface: #ffffff; --surface-muted: #f7f8fa; --line: #e2e5ea;
  --text: #0f1217; --muted: #566070; --faint: #8a93a3;
  --accent: #2740d6; --accent-soft: #e8ecff; --accent-ink: #1a2ea8;
  --bad: #b3261e; --bad-soft: #fbe7e5; --good: #13703f; --good-soft: #e2f4ea; --warn: #8f5200; --warn-soft: #fdf0da;
  --bar: #0f1217; --bar-text: #b9c0cc;
  --radius: 16px; --radius-md: 12px; --radius-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e12; --surface: #15181e; --surface-muted: #1a1e25; --line: #262b33;
    --text: #eceef2; --muted: #a3abb8; --faint: #7c8594;
    --accent: #7d92ff; --accent-soft: #1d2442; --accent-ink: #b8c4ff;
    --bad: #f08a80; --bad-soft: #331816; --good: #57c98a; --good-soft: #14281d; --warn: #e8b261; --warn-soft: #30240f;
    --bar: #06070a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.deep-body { font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.deep-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Каркас: бренд слева, карточка справа; на узком экране — бренд сверху. */
.deep-login { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 44%) 1fr; }
.deep-brand { background: var(--bar); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.deep-brand::after { content: ""; position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgb(39 64 214 / 55%), transparent 65%); pointer-events: none; }
.deep-brand__logo { display: flex; align-items: center; }
.deep-brand__logo img { display: block; width: 110px; height: auto; }
.deep-brand__text { max-width: 420px; position: relative; z-index: 1; }
.deep-brand__title { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.deep-brand__foot { margin: 0; color: var(--bar-text); font-size: 13px; position: relative; z-index: 1; }

.deep-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 18px; }
.deep-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: 0 16px 40px -24px rgb(15 18 23 / 35%); }
.deep-card__head { margin-bottom: 18px; }
.deep-title { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.deep-lead { margin: -6px 0 4px; color: var(--muted); }
.deep-help { margin: 0; max-width: 420px; text-align: center; color: var(--faint); font-size: 13px; }

/* Кто входит (шаги после логина: второй фактор, смена пароля). */
.deep-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-muted); width: fit-content; max-width: 100%; }
.deep-who__avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.deep-who__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deep-who__change { font-size: 13px; margin-left: 4px; }

/* Формы: собственная разметка и разметка базовых шаблонов через классы темы. */
form, .deep-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.deep-field { display: flex; flex-direction: column; gap: 6px; }
.deep-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.deep-label { font-size: 13px; font-weight: 600; color: var(--text); }
.deep-input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.deep-textarea { min-height: 96px; padding: 10px 14px; }
.deep-input:hover { border-color: var(--faint); }
.deep-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.deep-input[aria-invalid="true"], .deep-field--error .deep-input { border-color: var(--bad); }
.deep-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--bad-soft); }
.deep-input-group { position: relative; display: flex; }
.deep-input-group .deep-input { padding-right: 48px; }
.deep-reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.deep-reveal:hover { color: var(--text); background: var(--surface-muted); }
.deep-error { color: var(--bad); font-size: 13px; }
.deep-hint { color: var(--faint); font-size: 13px; margin: 0; }
.required { color: var(--bad); }

.deep-check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); font-size: 14px; }
.deep-check__input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

.deep-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: opacity .15s, border-color .15s; }
.deep-button:hover { border-color: var(--faint); }
.deep-button--primary { background: var(--text); border-color: var(--text); color: var(--surface); }
.deep-button--primary:hover { opacity: .9; border-color: var(--text); }
.deep-button--block { width: 100%; }
.deep-button:disabled, .deep-button--disabled { opacity: .55; cursor: not-allowed; }
input[type="submit"].deep-button { -webkit-appearance: none; appearance: none; }
.deep-buttons, .deep-buttons__row { display: flex; flex-direction: column; gap: 10px; }
.deep-settings, .deep-options { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.deep-options__links a, .deep-link { font-size: 14px; }
.deep-link { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.deep-link:hover, a:hover { text-decoration: underline; }
.deep-another { margin-top: 14px; display: flex; justify-content: center; }
.deep-info-area { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

.deep-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 16px; font-size: 14px; }
.deep-alert--error { background: var(--bad-soft); color: var(--bad); }
.deep-alert--warning { background: var(--warn-soft); color: var(--warn); }
.deep-alert--success { background: var(--good-soft); color: var(--good); }
.deep-alert .pf-c-alert__icon { display: none; }

/* Выбор способа входа и списки OTP-устройств. */
.deep-choices { display: flex; flex-direction: column; gap: 8px; }
.deep-choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; }
.deep-choice:hover { border-color: var(--accent); }
.deep-choice__icon { color: var(--accent); }
.deep-choice__body, .deep-choice__fill { flex: 1; }
.deep-choice__title { font-weight: 600; }
.deep-choice__text { color: var(--muted); font-size: 13px; }
input:checked + .deep-choice, .deep-choices input:checked + label { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.deep-codes { columns: 2; font-family: ui-monospace, Menlo, monospace; padding-left: 18px; }

.deep-social { margin-top: 18px; }
.deep-social__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.deep-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 0 0 12px; }
.deep-divider::before, .deep-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.deep-locale { display: none; }

/* Иконки: SVG-маска окрашивается цветом текста. */
.deep-icon { display: inline-block; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--deep-icon) center / contain no-repeat; mask: var(--deep-icon) center / contain no-repeat; flex: none; }
.deep-icon--eye { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/><circle cx='12' cy='12' r='3'/></svg>"); }
.deep-icon--eye-off { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.7 5.1A10.7 10.7 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-2.2 3.2'/><path d='M6.6 6.6A16.8 16.8 0 0 0 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6'/><path d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/><path d='m2 2 20 20'/></svg>"); }
.deep-icon--error { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 8v4'/><path d='M12 16h.01'/></svg>"); }
.deep-icon--warning { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21.7 18-8-14a2 2 0 0 0-3.4 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3z'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>"); }
.deep-icon--success { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m9 12 2 2 4-4'/></svg>"); }
.deep-icon--info { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4'/><path d='M12 8h.01'/></svg>"); }
.deep-icon--key { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='7.5' cy='15.5' r='5.5'/><path d='m21 2-9.6 9.6'/><path d='m15.5 7.5 3 3L22 7l-3-3'/></svg>"); }
.deep-icon--next { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m9 18 6-6-6-6'/></svg>"); }
.deep-icon--back { --deep-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m15 18-6-6 6-6'/></svg>"); }

@media (max-width: 860px) {
  .deep-login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .deep-brand { padding: 20px; gap: 12px; justify-content: flex-start; }
  .deep-brand__logo img { width: 84px; }
  .deep-brand__title { font-size: 22px; }
  .deep-brand__foot { display: none; }
  .deep-brand::after { display: none; }
  .deep-main { padding: 24px 16px 40px; justify-content: flex-start; }
  .deep-card { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
