
  :root {
    color-scheme: light;
    --page: #F2F5F4;
    --surface: #FFFFFF;
    --input-bg: #FFFFFF;
    --ink: #16232A;
    --ink-soft: #4A5C61;
    --muted: #566A6F;
    --border: #D5DEDD;
    --border-strong: #9AABAD;
    --hover: #EAF0EF;
    --brand: #0B4A52;
    --on-brand: #F2F7F6;
    --on-brand-muted: rgba(242, 247, 246, .76);
    --primary: #0B4A52;
    --primary-hover: #083B42;
    --on-primary: #FFFFFF;
    --link: #0B4A52;
    --focus: #2E8B96;
    --focus-ring: rgba(46, 139, 150, .28);
    --amber: #E0A93E;
    --danger: #B3261E;
    --danger-ring: rgba(179, 38, 30, .2);
    --notice-bg: #FFF6E3;
    --notice-border: #D99A2B;
    --notice-ink: #5B4210;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      color-scheme: dark;
      --page: #0D1618;
      --surface: #121F21;
      --input-bg: #0E191B;
      --ink: #E2EBEA;
      --ink-soft: #B7C6C8;
      --muted: #93A6A9;
      --border: #26373A;
      --border-strong: #4A5F62;
      --hover: #1B2B2E;
      --brand: #0A3C42;
      --on-brand: #E6F0EF;
      --on-brand-muted: rgba(230, 240, 239, .72);
      --primary: #4FB0BA;
      --primary-hover: #6CC2CB;
      --on-primary: #04191C;
      --link: #6CC2CB;
      --focus: #6CC2CB;
      --focus-ring: rgba(108, 194, 203, .3);
      --danger: #F2B8B5;
      --danger-ring: rgba(242, 184, 181, .22);
      --notice-bg: #2B2214;
      --notice-border: #C9952F;
      --notice-ink: #F1D9A6;
    }
  }

  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }

  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0;
    font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
  }

  a { color: var(--link); text-underline-offset: 3px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* ---------- Бренд-панель ---------- */

  .brand {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px 56px 56px;
    background: var(--brand);
    color: var(--on-brand);
    overflow: hidden;
  }

  .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
  }
  .brand-logo:focus-visible { outline-color: var(--on-brand); }

  .logo-mark { width: 36px; height: 36px; flex: none; }
  .logo-bg { fill: var(--on-brand); }
  .logo-fg { fill: var(--brand); }

  .brand-art {
    position: relative;
    flex: 1 1 auto;
    min-height: 200px;
    margin: 32px -56px;
    overflow: hidden;
    color: var(--on-brand);
  }

  .brand-art svg {
    position: absolute;
    top: 24px;
    left: 56px;
    width: calc(100% - 112px);
    height: calc(100% - 48px);
    overflow: visible;
  }

  .art-guides line {
    stroke: currentColor;
    stroke-width: 1;
    opacity: .2;
    vector-effect: non-scaling-stroke;
  }
  .art-fill { fill: url(#hatch); opacity: .3; }
  .art-outline {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    opacity: .8;
  }

  @media (prefers-reduced-motion: no-preference) {
    .art-guides { animation: fade .7s ease-out both; }
    .art-outline {
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation: draw 1.6s cubic-bezier(.45, .05, .2, 1) .2s forwards;
    }
    .art-fill { animation: fade 1s ease-out 1.2s both; }
  }

  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { from { opacity: 0; } }

  .brand-title {
    margin: 0;
    max-width: 20ch;
    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.012em;
  }

  .brand-lead {
    margin: 16px 0 0;
    max-width: 42ch;
    font-size: 17px;
    color: var(--on-brand-muted);
  }

  .status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 32px 0 0;
    font-size: 14px;
    color: var(--on-brand-muted);
  }

  .status-dot {
    width: 8px;
    height: 8px;
    flex: none;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px rgba(224, 169, 62, .22);
  }

  /* ---------- Форма входа ---------- */

  .auth {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 40px 56px 32px;
    background: var(--surface);
  }

  .auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
  }

  .auth-inner { width: 100%; max-width: 392px; }

  .auth-title {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.01em;
  }

  .auth-sub {
    margin: 0 0 32px;
    font-size: 15px;
    color: var(--muted);
  }

  .notice {
    display: flex;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px 16px;
    background: var(--notice-bg);
    border-left: 3px solid var(--notice-border);
    border-radius: 8px;
    color: var(--notice-ink);
    font-size: 14px;
  }
  .notice svg {
    width: 20px; height: 20px; flex: none; margin-top: 1px;
    fill: none; stroke: var(--notice-border); stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .notice p { margin: 0; }
  .notice-title { font-weight: 600; margin-bottom: 2px !important; }

  @media (prefers-reduced-motion: no-preference) {
    .notice { animation: notice-in .25s ease-out; }
  }
  @keyframes notice-in { from { opacity: 0; transform: translateY(-4px); } }

  .field { margin-bottom: 20px; }

  .label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
  }

  .input-wrap { position: relative; }

  .input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
  }
  .input::placeholder { color: var(--muted); opacity: .7; }
  .input:hover { border-color: var(--ink-soft); }
  .input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
  .input[aria-invalid="true"] { border-color: var(--danger); }
  .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-ring); }
  .input--password { padding-right: 52px; }

  .reveal {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }
  .reveal:hover { color: var(--ink); background: var(--hover); }
  .reveal svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .reveal .icon-hide { display: none; }
  .reveal[aria-pressed="true"] .icon-show { display: none; }
  .reveal[aria-pressed="true"] .icon-hide { display: block; }

  .field-error, .field-hint { margin: 6px 0 0; font-size: 14px; }
  .field-error { color: var(--danger); }
  .field-hint { color: var(--ink-soft); }

  .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 4px 0 24px;
    font-size: 15px;
  }

  .check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }
  .check input {
    width: 18px; height: 18px; margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
  }
  .btn svg {
    width: 20px; height: 20px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
  }

  .btn--primary {
    border: 0;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
  }
  .btn--primary:hover { background: var(--primary-hover); }
  .btn--primary[disabled] { cursor: progress; opacity: .85; }

  .btn--secondary {
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--ink);
  }
  .btn--secondary:hover { background: var(--hover); border-color: var(--ink-soft); }

  .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
  }
  .is-loading .spinner { display: inline-block; }
  @keyframes spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

  .divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    font-size: 14px;
    color: var(--muted);
  }
  .divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  .auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
  }
  .auth-footer p { margin: 0; }

  /* ---------- Планшеты и телефоны ---------- */

  @media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .brand { padding: 16px 24px 18px; }
    .brand-art, .brand-title, .brand-lead { display: none; }
    .status { margin-top: 12px; }
    .auth { padding: 32px 24px 24px; }
    .auth-body { align-items: flex-start; padding: 8px 0 40px; }
    .auth-title { font-size: 26px; }
  }

