/* ===== ОБЁРТКА ===== */
.form-wrapper {
  position: relative;
  min-height: 100vh;
  display: block;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  /*background: var(--bg);*/
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;  font-family: Futura PT;
}
.page-wrapper {
  width: 100%;
  height: 100%;
  background-size: cover;
}


.modal-wrapper-form
 {
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  -webkit-transition: all 0.25s ease-in-out;
  transition: all 0.25s ease-in-out;
  /* background: rgba(0, 0, 0, 0.5); */
  z-index: 1001;
}

.modal-wrapper-form.open 
{
  opacity: 1;
  visibility: visible;
}

.modal-form
{
  width: 100%;
  max-width:480px;
  max-height:441px;
  display: block;
  margin: 30% 0 0 -250px;
  position: relative;
  top: 50%; 
  left: 40%;
  opacity: 0;
  -webkit-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
  background: #fafafa;
}

.modal-wrapper-form.open .modal-form 
{
  margin-top: -400px;
  opacity: 1;
}

.head-form
{
  width: 100%;
  height: 100%;
  margin: 0 0 14px;
  padding: 5px 30px;
  overflow: hidden;
  position: absolute;
}

.form_modal_form{
  max-width: 70%;
  display: flex;
  flex-direction: column;
  margin: auto;
}

/* ===== КАРТОЧКА ===== */
/* ===== КАРТОЧКА ===== */
.form-card 
{
  margin-top: -300px !important;
  
  /*position: fixed;
  top: 20px;
  right: 20px;
  width: 220px;*/         /* компактнее по ширине */
  min-height: auto;    /* уменьшена высота */
  display: flex;
  flex-direction: column;
  border-radius: 12px;  /* чуть меньше радиус */
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  animation: loginFadeUp .25s ease;
  overflow: hidden;
}

/* Оранжевый акцент рамки */
.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(255,122,34,0.9),
    rgba(255,122,34,0.25)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===== ШАПКА ===== */
.form-header {
  height: 70px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #2a3b59 0%, #3a507a 100%);
  gap: 12px;
}

/* ===== ЛОГО ===== */
.form-logo {
  max-height: 70px;
  width: auto;
  display: block;
}

/* ===== НАЗВАНИЕ ===== */
.form-title {
  padding: 4px 10px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== КОНТЕНТ ===== */
.form-card .card-info {
  padding: 10px 12px;        /* уменьшили внутренние отступы */
  display: flex;
  flex-direction: column;
  gap: 8px;            /* чуть меньше расстояние между полями */
}

/* Лейблы */
.form-label {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Инпуты */
.form-input {
  height: 28px;         /* ниже и компактнее */
  padding: 0 8px;
  border-radius: 6px;
  font-size: 14px;      /* чуть меньше шрифт */
}

.form-input:focus {
  outline: none;
  background: rgba(0,0,0,0.1);
}

/* ===== ОШИБКА ===== */
.form-error {
  background: rgba(255, 122, 34, 0.14);
  color: #b94a00;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  margin: 8px 12px;
}

/* ===== КНОПКИ ===== */
.form-card .actions-card {
  /* padding: 0 28px 28px 28px; */
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
}

.form-wrapper .btn-main {
  height: 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  background: #ff7a22;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-bottom: 0px;
  margin-top: -10px;
}

.form-wrapper .btn-main:hover {
  background: #e06214;
}

.register{
  align-self: center;
  color: #ff7a22;
}
.register:hover {
  text-decoration: none;
  color: #e06214;
}

/* ===== АНИМАЦИЯ ===== */
@keyframes formFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== МОБИЛЬНЫЙ ===== */
@media (max-width: 768px) {

  .form-card {
    position: fixed;

    top: 50%;
    left: 50%;

    width: calc(100% - 32px);
    max-width: 360px;
    height: auto;

    transform: translate(-50%, -50%);

    margin: 0;
    right: auto;
    bottom: auto;

    border-radius: 16px;
  }

  .form-card .card-info {
    padding: 16px;
    gap: 12px;
  }

  .form-card .actions-card {
    padding: 16px;
  }

  .form-input {
    height: 42px;
    font-size: 16px;
  }

  .form-wrapper .btn-main {
    height: 44px;
    font-size: 15px;
  }
}

/* Анимация снизу */
@keyframes formSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
