/* --- Скрываем форму операций (показываем только авторизацию) --- */
#operationCard { display: none !important; }

/* --- iOS стабильность + без «резины» и бегунка --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html { height: -webkit-fill-available; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #71797E 0%, #2D3338 100%);
  
  /* Fallback -> стабильные единицы на iOS -> кастомная переменная для старых iOS */
  min-height: 100vh;
  height: 100svh;           /* iOS 16+: не прыгает при адресной строке */
  min-height: 100svh;
  height: calc(var(--vh, 1svh) * 100); /* fallback для iOS <16 через JS ниже */
  display: grid;
  place-items: center;
  overflow: hidden;               /* без прокрутки страницы */
  overscroll-behavior: none;      /* убираем «резину» */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Скрыть системный скролл-бегунок на всякий случай */
:where(html, body)::-webkit-scrollbar { width: 0; height: 0; }
:where(html, body) { scrollbar-width: none; -ms-overflow-style: none; }

/* Контейнер формы */
.form-container { width: 100%; max-width: 400px; padding: 0 20px; }

/* Заголовок */
.form-header { text-align: center; margin-bottom: 40px; }
.form-header h1 { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.form-header p  { font-size: 16px; color: rgba(255,255,255,0.8); }

/* Поля */
.form-group { margin-bottom: 20px; }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  padding: 16px 18px;
  transition: box-shadow .3s, transform .2s, background .3s;
  will-change: transform; /* сглаживаем анимацию */
}

.input-wrapper:focus-within {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  transform: translateY(-1px); /* поменьше, чтобы не казалось «прыжком» */
}

.input-icon {
  color: #4a5568;
  font-size: 18px;
  margin-right: 12px;
  min-width: 20px;
}

/* 16px+, чтобы iOS не зумил при фокусе */
.form-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #2d3748;
  font-weight: 500;
}

.form-input::placeholder { color: #a0aec0; }

/* Отключаем спиннеры и нативные артефакты iOS */
input, button, textarea, select { -webkit-appearance: none; appearance: none; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Кнопка */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: #fff;
  color: #2d3748;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, box-shadow .3s, background .3s;
  margin-top: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover  { background: #f7fafc; transform: translateY(-1px); box-shadow: 0 8px 25px rgba(0,0,0,.3); }
.btn-primary:active { transform: translateY(0); }

.fade-out { animation: fadeOut .3s forwards; }
@keyframes fadeOut { to { opacity: 0; transform: scale(.95); } }

/* Мобильные поправки */
@media (max-width: 480px) {
  .form-header h1 { font-size: 28px; }
  .input-wrapper { padding: 14px 16px; }
}
