/* =========================================================
   AUTH (login by code)
   ========================================================= */

.auth { padding: 18px 0 28px; }

.auth__wrap{
  display: flex;
  justify-content: center;
}

.auth-card{
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  overflow: hidden;
}

.auth-card__head{
  padding: 16px 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.auth-card__title{
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.auth-card__subtitle{
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0,0,0,.65);
}

.auth-form{
  padding: 14px;
}

.auth-group{
  margin-top: 12px;
}

.auth-label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.auth-hint{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0,0,0,.62);
}

.auth-input{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 12px;
  background: #fff;
  outline: none;
}

.auth-input:focus{
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.auth-input[readonly]{
  background: rgba(0,0,0,.03);
}

.auth-input--hidden{
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.auth-tabs{
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}

.auth-tab{
  display: inline-flex;
  align-items: center;
}

.auth-tab__input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-tab__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid transparent;
  color: rgba(0,0,0,.75);
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.auth-tab__input:checked + .auth-tab__btn{
  background: #fff;
  border-color: rgba(0,0,0,.12);
  color: rgba(0,0,0,.92);
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
}

.auth-tab__input:disabled + .auth-tab__btn{
  opacity: .6;
  cursor: not-allowed;
}

/* Alerts */
.auth-alert{
  margin: 12px 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  font-size: 13px;
}

.auth-alert--ok{
  background: rgba(0, 200, 90, .08);
  border-color: rgba(0, 200, 90, .25);
}

.auth-alert--err{
  background: rgba(255, 0, 0, .06);
  border-color: rgba(255, 0, 0, .20);
}

.auth-alert__list{
  margin: 0;
  padding-left: 18px;
}

/* OTP */
.auth-otp{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.auth-otp__cell{
  text-align: center;
  font-size: 18px;
  padding: 12px 0;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.18);
  outline: none;
}

.auth-otp__cell:focus{
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.auth-otp__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.auth-otp__timer{
  font-size: 12px;
  color: rgba(0,0,0,.60);
}

/* Buttons (локальные, чтобы не конфликтовать с вашими, если есть) */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  font-weight: 600;
  font-size: 14px;
}

.btn--primary{
  background: rgba(0,0,0,.88);
  color: #fff;
  border-color: rgba(0,0,0,.88);
}

.btn--primary:hover{
  background: rgba(0,0,0,.92);
}

.btn--ghost{
  background: transparent;
}

.btn[disabled],
.btn[aria-disabled="true"]{
  opacity: .6;
  cursor: not-allowed;
}

/* link-button */
.auth-link{
  border: 0;
  background: transparent;
  padding: 0;
  color: #0077cc;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.auth-link[disabled]{
  opacity: .55;
  cursor: not-allowed;
  text-decoration: none;
}

.auth-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

/* Mobile tweaks */
@media (max-width: 420px){
  .auth-card__title{ font-size: 18px; }
  .auth-actions{ grid-template-columns: 1fr; }
  .auth-otp{ gap: 6px; }
  .auth-otp__cell{ font-size: 16px; padding: 11px 0; border-radius: 11px; }
}
