.auth-page { color: var(--text); background: var(--bg); }
.auth-skip { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 10px 14px; color: var(--accent-text); background: var(--accent); border-radius: var(--radius-sm); transform: translateY(-150%); }
.auth-skip:focus { transform: none; }
.auth-masthead { display: grid; grid-template-columns: 196px minmax(120px, 1fr) auto auto; align-items: center; gap: 20px; max-width: 1280px; min-height: 80px; margin: auto; padding: 8px 24px; border-bottom: 1px solid var(--line); }
.auth-brand { display: block; width: 196px; height: 66px; }
.auth-brand__logo { display: block; width: 196px; height: 66px; object-fit: contain; }
.auth-masthead__meta { margin: 0; color: var(--text-secondary); font-size: 13px; text-align: right; }
.auth-masthead__back { white-space: nowrap; }
.theme-control { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.theme-control select { width: auto; min-width: 138px; min-height: 44px; }
.auth-desk { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: clamp(32px, 6vw, 80px); align-items: center; width: min(1160px, 100%); margin: 0 auto; padding: 56px 24px 72px; }
.auth-editorial { min-width: 0; }
.auth-editorial h1 { max-width: 14ch; margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -.035em; }
.auth-editorial__lead { max-width: 55ch; margin: 14px 0 0; color: var(--text-secondary); font-size: 18px; }
.auth-cost-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; }
.auth-cost-chain__node { display: grid; gap: 3px; min-width: 108px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.auth-cost-chain__node--final { border-color: var(--accent); background: var(--selected-bg); }
.auth-cost-chain__label, .auth-cost-chain__hint { color: var(--text-secondary); font-size: 12px; }
.auth-cost-chain__value { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.auth-cost-chain__edge { color: var(--text-secondary); }
.auth-editorial__note { max-width: 62ch; margin: 12px 0 0; color: var(--text-secondary); font-size: 13px; }
.auth-access { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-md); }
.auth-access__inner { display: grid; gap: 16px; }
.auth-access__brand { display: block; width: 224px; height: 175px; margin: 0 auto; }
.auth-access__logo { display: block; width: 224px; height: 175px; object-fit: contain; }
.auth-mode-switch, .auth-tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-raised); border-radius: var(--radius-sm); }
.auth-mode-switch__btn, .auth-tab { flex: 1; min-height: 44px; padding: 8px 12px; color: var(--text-secondary); background: transparent; border: 1px solid transparent; border-radius: 6px; font-weight: 600; }
.auth-mode-switch__btn.is-active, .auth-tab.is-active { color: var(--text); background: var(--surface); border-color: var(--line); }
.auth-form-panel { display: none; }
.auth-form-panel.is-visible { display: grid; gap: 16px; }
.auth-form-heading h2 { margin: 0; font-size: 21px; }
.auth-form-heading p { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }
.auth-form-panel form { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label { font-size: 14px; font-weight: 600; }
.auth-field input { min-height: 48px; }
.auth-field__error { min-height: 0; margin: 0; color: var(--danger); font-size: 13px; }
.auth-field__error:empty { display: none; }
.auth-field__hint { margin: 0; color: var(--text-secondary); font-size: 13px; }
.auth-password { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.auth-password button { min-width: 58px; }
.auth-submit { min-height: 50px; width: 100%; font-size: 15px; font-weight: 700; }
.auth-submit.is-success { background: var(--success); border-color: var(--success); }
.auth-spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-message { display: none; margin: 0; font-size: 14px; }
.auth-message.is-visible { display: block; }
.auth-message--error { color: var(--danger); background: var(--danger-bg); }
.auth-message--warning { color: var(--warning); background: var(--warning-bg); }
.auth-form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--text-secondary); font-size: 13px; }
.auth-form-links a { font-weight: 600; }
.auth-page-footer { width: min(1160px, 100%); margin: auto; padding: 0 24px 28px; color: var(--text-secondary); font-size: 13px; }
.auth-strength { height: 6px; overflow: hidden; background: var(--line); border-radius: var(--radius-pill); }
.auth-strength > span { display: block; width: calc(var(--score, 0) * 25%); height: 100%; background: var(--warning); }

@media (max-width: 850px) {
  .auth-masthead { grid-template-columns: 196px minmax(0, 1fr) auto; gap: 12px; }
  .auth-masthead__meta { display: none; }
  .auth-desk { grid-template-columns: minmax(0, 1fr); gap: 28px; width: min(620px, 100%); padding: 32px 20px 48px; }
  .auth-editorial h1 { max-width: 20ch; font-size: 32px; }
  .auth-cost-chain { margin-top: 20px; }
}

@media (max-width: 560px) {
  .auth-masthead { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 16px; }
  .auth-brand, .auth-brand__logo { width: 180px; height: 61px; }
  .auth-masthead .theme-control { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .auth-masthead__back { grid-column: 2; grid-row: 1; padding: 8px; font-size: 12px; }
  .auth-desk { padding: 24px 16px 36px; }
  .auth-access { padding: 18px 16px; }
  .auth-cost-chain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-cost-chain__edge { display: none; }
  .auth-cost-chain__node--final { grid-column: 1 / -1; }
  .auth-page-footer { padding: 0 16px 24px; }
}

.auth-access { padding: 32px; }
.auth-mode-switch, .auth-tabs { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 5px; }
.auth-tab.is-active { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
.auth-cost-chain__node { box-shadow: var(--shadow-sm); padding: 16px; }
.auth-cost-chain__node--final { color: #F5F7F8; background: #101010; border-color: #343F46; }
.auth-cost-chain__node--final .auth-cost-chain__value { color: #01D5F0; }
.auth-cost-chain__node--final .auth-cost-chain__label, .auth-cost-chain__node--final .auth-cost-chain__hint { color: #B1BCC3; }
@media (prefers-reduced-motion: no-preference) { .auth-access, .auth-editorial { animation: dz-card-in 500ms var(--ease-out) both; } .auth-access { animation-delay: 80ms; } .auth-form-panel.is-visible { animation: dz-card-in 300ms var(--ease-out) both; } }
@media (max-width: 767px) { .auth-access { padding: 24px 18px; } }
