:root {
  --auth-bg-1: #d6ebfb;
  --auth-bg-2: #f7d9e8;
  --auth-card: rgba(255, 255, 255, 0.62);
  --auth-card-inner: rgba(255, 255, 255, 0.34);
  --auth-text: #3b3556;
  --auth-muted: #7e7894;
  --auth-line: #c9bfd7;
  --auth-primary: #3b3556;
  --auth-primary-hover: #312c49;
  --auth-white: #ffffff;
  --auth-shadow: 0 30px 70px rgba(83, 71, 111, 0.18);
  --auth-radius-lg: 34px;
  --auth-radius-md: 26px;
  --auth-radius-sm: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.auth-page {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 35%),
    linear-gradient(135deg, var(--auth-bg-1) 0%, #e6edf9 45%, var(--auth-bg-2) 100%);
}

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 630px;
  padding: 30px 30px 28px;
  border-radius: var(--auth-radius-lg);
  background: var(--auth-card);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
}

.auth-tab {
  position: relative;
  border: none;
  background: transparent;
  padding: 0 0 10px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: #a6a0bd;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-tab:hover {
  color: var(--auth-text);
}

.auth-tab.is-active {
  color: var(--auth-text);
}

.auth-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: var(--auth-primary);
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-form {
  background: var(--auth-card-inner);
  border-radius: var(--auth-radius-md);
  padding: 26px 24px 24px;
}

.field + .field {
  margin-top: 16px;
}

.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--auth-muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--auth-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--auth-text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input {
  height: 58px;
  padding: 0 18px;
}

.field textarea {
  min-height: 110px;
  padding: 16px 18px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9892ab;
}

.field input:focus,
.field textarea:focus {
  border-color: #a99fc4;
  box-shadow: 0 0 0 4px rgba(169, 159, 196, 0.16);
  background: rgba(255, 255, 255, 0.45);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.password-toggle:hover {
  background: rgba(59, 53, 86, 0.08);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  min-height: 58px;
  border-radius: 999px;
  padding: 0 34px;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  border: none;
  background: var(--auth-primary);
  color: var(--auth-white);
  cursor: pointer;
  min-width: 170px;
}

.btn-primary:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
}

.btn-primary--wide {
  min-width: 240px;
}

.btn-secondary {
  border: 1.5px solid var(--auth-line);
  background: transparent;
  color: #6f6984;
  min-width: 150px;
}

.btn-secondary:hover {
  border-color: #b4abc6;
  color: var(--auth-text);
  transform: translateY(-1px);
}

.auth-message {
  min-height: 22px;
  margin: 14px 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #b44f6b;
}

.auth-message.is-success {
  color: #4d7d57;
}

.auth-note {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #7d7691;
}

.auth-policy {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #8a849b;
}

@media (max-width: 720px) {
  .auth {
    padding: 16px;
  }

  .auth-card {
    padding: 22px 18px 20px;
    border-radius: 26px;
  }

  .auth-tabs {
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }

  .auth-tab {
    font-size: 18px;
    padding-bottom: 8px;
  }

  .auth-tab.is-active::after {
    width: 54px;
    height: 3px;
  }

  .auth-form {
    padding: 18px 16px 18px;
    border-radius: 22px;
  }

  .field input {
    height: 54px;
  }

  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-primary--wide,
  .btn-secondary {
    width: 100%;
    min-width: 0;
  }
}