*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
  color: #222;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
}

.logo-link {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-bottom: 24px;
  text-align: center;
}

.site-logo {
  display: inline-block;
  height: 3.5rem;
  width: auto;
  max-width: 100%;
}

.site-logo--mobi {
  height: 3.5rem;
  max-width: 180px;
  object-fit: contain;
  border-radius: 10px;
}

.site-logo-text {
  display: inline-block;
  color: #141760;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-logo-text__prefix {
  color: #00afe6;
  font-weight: 500;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.provider-card {
  margin-bottom: 20px;
  text-align: center;
}

.provider-card__subtitle {
  margin: 0 0 6px;
  color: #757575;
  font-size: 14px;
  font-weight: 500;
}

.provider-card__title {
  margin: 0;
  color: #222;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.form-message {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
}

.form-message--error {
  color: #c62828;
  text-align: center;
}

.provider-list {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.provider-tile {
  position: relative;
  display: block;
  cursor: pointer;
}

.provider-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.provider-tile__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 156px;
  padding: 22px 14px;
  border: 2px solid #e3e3e3;
  border-radius: 12px;
  background: #fafafa;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.provider-tile:hover .provider-tile__box {
  border-color: #9fd4f1;
}

.provider-tile:has(input:checked) .provider-tile__box {
  border-color: #5eb8ea;
  background: #f0f9fd;
  box-shadow: 0 0 0 1px #5eb8ea;
}

.provider-tile__logo {
  display: block;
  width: 100%;
  max-width: 132px;
  height: 2.5rem;
  object-fit: contain;
}

.provider-tile__logo--mobi {
  max-width: 100%;
  height: 3.25rem;
  border-radius: 10px;
}

.provider-tile__name {
  color: #222;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.login-form {
  width: 100%;
  max-width: 420px;
}

.form-intro {
  margin: 0 0 20px;
  color: #616161;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.form-intro__value {
  display: block;
  margin-top: 4px;
  color: #222;
  font-weight: 500;
  word-break: break-word;
}

.card-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-form__row .field {
  margin-bottom: 18px;
}

.field__input--code {
  letter-spacing: 0.2em;
  text-align: center;
}

.success-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.success-title {
  margin: 0 0 12px;
  color: #222;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.success-text {
  margin: 0;
  color: #616161;
  font-size: 15px;
  line-height: 1.5;
}

.loading-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 20px;
  text-align: center;
}

.loading-card__text {
  margin: 0 0 28px;
  color: #616161;
  font-size: 15px;
  line-height: 1.6;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 3px solid #e3f4fc;
  border-top-color: #5eb8ea;
  border-radius: 50%;
  animation: telekom-spin 0.9s linear infinite;
}

.loading-dots {
  display: inline-flex;
  gap: 8px;
}

.loading-dots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5eb8ea;
  animation: telekom-dot 1.2s ease-in-out infinite;
}

.loading-dots__dot:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots__dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes telekom-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes telekom-dot {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.field {
  margin-bottom: 18px;
}

.field__box {
  position: relative;
  background: #f3f3f3;
  border: 1px solid #e3e3e3;
  border-bottom: 2px solid #bdbdbd;
  border-radius: 4px 4px 0 0;
  padding: 10px 48px 8px 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.field__label {
  display: block;
  margin-bottom: 2px;
  color: #757575;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.field__input {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
}

.field__input::placeholder {
  color: #9e9e9e;
}

.field__box--phone {
  padding-right: 48px;
}

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-input__prefix {
  flex-shrink: 0;
  color: #222;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.phone-input__number {
  flex: 1;
  min-width: 0;
}

.field__message {
  display: none;
  margin: 6px 0 0;
  padding-left: 2px;
  color: #c62828;
  font-size: 12px;
  line-height: 1.3;
}

.field__error-icon {
  display: none;
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.field[data-field="password"] .field__error-icon {
  right: 44px;
}

.field__toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  cursor: pointer;
}

.field__toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.field.is-invalid .field__box {
  border-bottom-color: #c62828;
}

.field.is-invalid .field__label {
  color: #c62828;
}

.field.is-invalid .field__message,
.field.is-invalid .field__error-icon {
  display: block;
}

.field.is-invalid[data-field="password"] .field__toggle {
  right: 40px;
}

.btn-login {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 15px 24px;
  border: 0;
  border-radius: 999px;
  background: #5eb8ea;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-login:hover {
  background: #49aadf;
}

.btn-login:active {
  transform: scale(0.99);
}

.btn-login:disabled {
  background: #b8dff3;
  cursor: not-allowed;
  transform: none;
}

.btn-login:disabled:hover {
  background: #b8dff3;
}

@media (max-width: 480px) {
  .page {
    padding-top: 24px;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .provider-tile__box {
    min-height: 132px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 18px 16px;
    text-align: left;
  }

  .provider-tile__logo {
    width: auto;
    max-width: 108px;
    height: 2rem;
    flex-shrink: 0;
  }

  .provider-tile__logo--mobi {
    max-width: 120px;
    height: 2.75rem;
  }

  .field__box {
    padding-right: 52px;
  }

  .card-form__row {
    grid-template-columns: 1fr;
  }
}
