/* Регистрация / вход владельца — палитра лендинга и client-dashboard */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

body.platform-auth-page {
  --pa-accent: #bceb4c;
  --pa-accent-hover: #a8d93f;
  --pa-text: #000;
  --pa-muted: #5a5a5a;
  --pa-bg: #fff;
  --pa-surface: #f9f9f9;
  --pa-surface-hover: #f0f0f0;
  --pa-dark: #000;
  --pa-dark-2: #1a1a1a;
  --pa-border: rgba(0, 0, 0, 0.08);
  --pa-radius: 12px;
  --pa-radius-lg: 20px;
  --pa-radius-pill: 999px;
  --pa-font: 'Manrope', system-ui, -apple-system, sans-serif;
  --pa-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);

  margin: 0;
  min-height: 100vh;
  font-family: var(--pa-font);
  background: var(--pa-bg);
  color: var(--pa-text);
  line-height: 1.5;
}

body.platform-auth-page a {
  color: inherit;
  text-decoration: none;
}

.platform-auth {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 960px) {
  body.platform-auth-page {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
  }

  .platform-auth {
    grid-template-columns: minmax(320px, 42%) 1fr;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .platform-auth-aside {
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

/* —— Брендовая панель —— */
.platform-auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 2rem;
  color: #fff;
  background: var(--pa-dark);
  overflow: hidden;
}

.platform-auth-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    var(--platform-auth-bg, none),
    linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 45%, #0d1208 100%);
  background-size: cover, auto;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.platform-auth-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.platform-auth-aside-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.platform-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 2.5rem;
  transition: opacity 0.2s;
}

.platform-auth-logo:hover {
  opacity: 0.9;
}

.platform-auth-logo-img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.platform-auth-aside-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.platform-auth-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pa-accent);
}

.platform-auth-aside-title {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.platform-auth-aside-lead {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 36ch;
}

.platform-auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.platform-auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.platform-auth-benefit-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--pa-accent);
  color: var(--pa-dark);
}

.platform-auth-aside-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.platform-auth-aside-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.platform-auth-aside-footer a:hover {
  color: var(--pa-accent);
}

/* —— Форма —— */
.platform-auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.25rem 2rem;
  background: var(--pa-bg);
  min-height: 0;
  overflow-x: hidden;
}

/* margin: auto — по центру, если форма ниже экрана; иначе прокрутка сверху */
.platform-auth-main-inner {
  width: 100%;
  max-width: 520px;
  margin: auto;
  flex-shrink: 0;
}

@media (min-width: 960px) {
  .platform-auth-main {
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 1.5rem 1.75rem 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* Компактнее на странице регистрации — длинная форма */
.platform-auth-page--register .platform-auth-head {
  margin-bottom: 1.25rem;
}

.platform-auth-page--register .platform-auth-head-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.65rem;
}

.platform-auth-page--register .platform-auth-title {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}

.platform-auth-page--register .platform-auth-form {
  gap: 0.95rem;
}

.platform-auth-page--register .platform-auth-fields {
  gap: 0.7rem;
}

.platform-auth-page--register .platform-auth-fields-row {
  gap: 0.7rem;
}

.platform-auth-page--register .platform-auth-field input,
.platform-auth-page--register .platform-auth-field select,
.platform-auth-page--register .platform-auth-field textarea {
  padding: 0.65rem 0.85rem;
}

.platform-auth-page--register .platform-auth-consents {
  gap: 0.7rem;
  padding: 0.85rem;
}

.platform-auth-page--register .platform-auth-submit {
  padding: 0.85rem 1.15rem;
}

.platform-auth-page--register .platform-auth-footer {
  margin-top: 1rem;
}

.platform-auth-main-inner--narrow {
  max-width: 420px;
}

.platform-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--pa-muted);
  transition: color 0.15s;
}

.platform-auth-back:hover {
  color: var(--pa-text);
}

.platform-auth-back--desktop {
  display: none;
}

@media (min-width: 960px) {
  .platform-auth-back--mobile {
    display: none;
  }
  .platform-auth-back--desktop {
    display: inline-flex;
  }
}

.platform-auth-head {
  margin-bottom: 1.75rem;
}

.platform-auth-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pa-accent) 35%, #fff);
  color: var(--pa-dark);
}

.platform-auth-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.platform-auth-lead {
  margin: 0;
  font-size: 0.95rem;
  color: var(--pa-muted);
  line-height: 1.45;
}

.platform-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.platform-auth-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.platform-auth-fields-row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .platform-auth-fields-row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.platform-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.platform-auth-field > span:first-child {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pa-text);
}

.platform-auth-field input,
.platform-auth-field select,
.platform-auth-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--pa-border);
  border-radius: var(--pa-radius);
  font: inherit;
  font-size: 0.95rem;
  background: var(--pa-surface);
  color: var(--pa-text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.platform-auth-field input:hover,
.platform-auth-field select:hover,
.platform-auth-field textarea:hover {
  border-color: rgba(0, 0, 0, 0.14);
}

.platform-auth-field input:focus,
.platform-auth-field select:focus,
.platform-auth-field textarea:focus {
  outline: none;
  border-color: var(--pa-accent);
  background: var(--pa-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pa-accent) 40%, transparent);
}

.platform-auth-field .help {
  font-size: 0.8rem;
  color: var(--pa-muted);
  line-height: 1.4;
}

.platform-auth-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.platform-auth-forgot {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pa-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.platform-auth-forgot:hover {
  color: var(--pa-text);
  text-decoration-color: var(--pa-accent);
}

.platform-auth-submit--link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.platform-auth-page .password-field input {
  padding-right: 2.75rem;
}

.platform-auth-page .password-toggle {
  color: var(--pa-muted);
}

.platform-auth-page .password-toggle:hover {
  color: var(--pa-text);
  background: rgba(0, 0, 0, 0.05);
}

.platform-auth-page .password-toggle:focus-visible {
  outline: 2px solid var(--pa-accent);
  outline-offset: 2px;
}

.platform-auth-consents {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--pa-radius);
  background: var(--pa-surface);
  border: 1px solid var(--pa-border);
}

.platform-auth-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  cursor: pointer;
}

.platform-auth-consent input[type='checkbox'] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
  accent-color: var(--pa-accent);
}

.platform-auth-consent-label {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--pa-text);
}

.platform-auth-consent-label a {
  color: var(--pa-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}

.platform-auth-consent-label a:hover {
  text-decoration-color: var(--pa-accent);
}

.platform-auth-errors {
  padding: 0.85rem 1rem;
  border-radius: var(--pa-radius);
  background: color-mix(in srgb, #c1121f 8%, #fff);
  border: 1px solid color-mix(in srgb, #c1121f 25%, transparent);
  color: #9b2226;
  font-size: 0.9rem;
  line-height: 1.45;
}

.platform-auth-page .field-error {
  color: #c1121f;
  font-size: 0.82rem;
}

.platform-auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: var(--pa-radius-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: var(--pa-accent);
  color: var(--pa-text);
  transition: background 0.2s, transform 0.12s;
}

.platform-auth-submit:hover {
  background: var(--pa-accent-hover);
}

.platform-auth-submit:active {
  transform: scale(0.99);
}

.platform-auth-submit:focus-visible {
  outline: 2px solid var(--pa-dark);
  outline-offset: 3px;
}

.platform-auth-footer {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--pa-muted);
}

.platform-auth-footer a {
  font-weight: 700;
  color: var(--pa-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0, 0, 0, 0.2);
}

.platform-auth-footer a:hover {
  text-decoration-color: var(--pa-accent);
}

@media (max-width: 959px) {
  body.platform-auth-page {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .platform-auth {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    height: auto;
  }

  .platform-auth-aside {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.15rem;
  }

  .platform-auth-logo {
    margin-bottom: 0.85rem;
  }

  .platform-auth-aside-content {
    justify-content: flex-start;
  }

  .platform-auth-eyebrow {
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
  }

  .platform-auth-aside-title {
    font-size: 1.2rem;
    margin-bottom: 0;
  }

  .platform-auth-aside-lead,
  .platform-auth-benefits {
    display: none;
  }

  .platform-auth-aside-footer {
    display: none;
  }

  .platform-auth-main {
    flex: 1 0 auto;
    width: 100%;
    min-height: auto;
    max-height: none;
    height: auto;
    overflow: visible;
    align-items: stretch;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .platform-auth-main-inner {
    margin-top: 0;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
  }
}
