body {
    min-height: 100vh;
}

.form-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: 32px 20px;
}

.form-block a {
    font-size: 14px;
}

.text-area {
    position: relative;
    width: 320px;
}

.text-area input {
    width: 100%;
    padding: 12px 40px 12px 24px;
    border: 1px solid rgba(45, 51, 58, 0.75);
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    margin-bottom: 12px;
    height: 50px;
}

.text-area button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;

    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.text-area span {
    position: absolute;
    left: 0;
    padding: 16px 24px;
    pointer-events: none;
    font-size: 16px;
    transition: 0.2s;
}

.text-area input:valid ~ span,
.text-area input:focus ~ span {
    color: #092a6e;
    transform: translateX(10px) translateY(-7px);
    font-size: 12px;
    padding: 0 14px;
    border-left: 1px solid #092a6e;
    border-right: 1px solid #092a6e;
    background-color: #fff;
}

.text-area input:valid,
.text-area input:focus {
    border: 1px solid #092a6e;
}

.forgot-link {
    width: 100%;
    display: flex;
    justify-content: baseline;
}

.form-button {
    width: 320px;
    height: 50px;
    padding: 12px 24px;
    margin: 20px 0px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.form-button::before {
    content: '';
    background: #092a6e;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    z-index: -1;
    transition: width 0.5s ease;
}

.form-button:hover::before {
    width: 100%;
}

.form-button:hover {
    color: white;
}

.response {
    color: red;
}

.passforgot {
    color: #092a6e;
}

.response, .passforgot {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 32px;
    /* BUG FIX: фикс. ширина 320px + центрирование текста — иначе длинное
       сообщение растягивает форму и поля «съезжают» влево */
    width: 320px;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.5;
    margin-left: auto;
    margin-right: auto;
}

.other-page {
    text-align: center;
    margin-bottom: 20px;
}

.text-area.has-toggle input {
  padding-right: 48px;
}

.text-area button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-icons {
  position: relative;
  width: 20px;
  height: 20px;
}

.pw-icon {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;

  transition: opacity .22s ease, transform .22s ease;
}

.pw-icon-off {
  opacity: 1;
  transform: scale(1);
}

.pw-icon-on {
  opacity: 0;
  transform: scale(.8);
}

.pw-toggle[data-state="shown"] .pw-icon-off {
  opacity: 0;
  transform: scale(.8);
}

.pw-toggle[data-state="shown"] .pw-icon-on {
  opacity: 1;
  transform: scale(1);
}

.field-hints {
    display: flex;
    flex-direction: column;
    align-self: flex-start;

    margin: 6px 0 16px;

    gap: 4px;

    max-height: 0;
    opacity: 0;
    overflow: hidden;

    transform: translateY(-4px);

    transition:
        max-height 0.25s ease,
        opacity 0.2s ease 0.05s,
        transform 0.2s ease;
}

.field-hints.is-visible {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
}

.hint-item {
    font-size: 12px;
    line-height: 1.3;

    opacity: 0;
    transform: translateY(-2px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
}

.field-hints.is-visible .hint-item {
    opacity: 1;
    transform: translateY(0);
}

.hint-invalid {
    color: #d93025;
}

.hint-valid {
    color: #188038;
}

/* ===== BUTTON ===== */

.form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hint-item::before {
    content: "• ";
}
/* ── Login header: логотип + заголовок рядом ── */
.login-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.login-logo {
  height: 160px;
  width: auto;
  flex-shrink: 0;
}

.login-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.login-header-text h1 {
  font-size: 24px;
  font-weight: 800;
  color: #101010;
  line-height: 1.2;
  margin: 0;
}

.login-sub {
  font-size: 13px;
  color: #888;
  line-height: 1.4;
  margin: 0;
}

/* Логотип на форме входа/регистрации */
.form-logo {
    height: 160px;
    width: auto;
    display: block;
    margin: 0 auto 16px;
}

.title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.title h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1c1917;
    margin: 0;
    text-align: center;
}

/* ── Баннер успешной регистрации ── */
.register-success {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 320px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 13px;
    line-height: 1.5;
}

.register-success svg {
    flex-shrink: 0;
    color: #16a34a;
}

/* BUG FIX: response без фиксированной ширины растягивал форму,
   из-за чего поля "съезжали" при появлении сообщения об ошибке */
.response {
    width: 320px;
    box-sizing: border-box;
    text-align: center;
}

/* ── Блок email не подтверждён ── */
.unverified-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 320px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.unverified-block > svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #d97706;
}

.unverified-body {
    flex: 1;
    min-width: 0;
}

.unverified-body strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.unverified-body p {
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 6px;
}

.unverified-hint {
    font-size: 12px;
    color: #b45309;
    margin-bottom: 12px !important;
}

.resend-form { margin-top: 4px; }

.resend-btn {
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    background: #d97706;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.resend-btn:hover { background: #b45309; }
