/* ============================================
   Figma ログインページ 1:1 像素级还原
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #f5f4f3;
  min-height: 100vh;
}

.page-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 85px;
}

/* ===== Main / Login Box ===== */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px 80px;
}

.loginbox {
  width: 100%;
  max-width: 635px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ebebeb;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  padding: 44px 40px 48px;
}

.login-auth-wrap {
  max-width: 100%;
  margin: 0 auto;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #5c5c5c;
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.login-back-arrow {
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  opacity: 0.85;
}

.login-back:hover {
  color: #ff3600;
}

.login-header {
  margin-bottom: 28px;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.login-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: #828282;
  margin-bottom: 20px;
  line-height: 1.5;
}

.form-field {
  margin-bottom: 22px;
}

.form-field:last-of-type {
  margin-bottom: 0;
}

/* 覆盖 style.css 中 .form-label 的 position:absolute（浮动标签布局），否则会与输入框重叠或跑出卡片 */
.login-form .form-label {
  display: block;
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
  pointer-events: auto;
  gap: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.login-form .required {
  color: red;
}

.login-form .form-input {
  width: 100%;
  height: 48px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 24px;
  color: #1a1a1a;
  transition: border-color 0.2s, background 0.2s;
}

.login-form .form-field .form-input,
.login-form .form-input-wrap .form-input,
.login-form .form-input-code {
  margin-bottom: 0;
}

.login-form .form-input::placeholder {
  color: #b0b0b0;
}

.login-form .form-input:focus {
  outline: none;
  border-color: #ff3600;
  background: #fff;
}

/* 認証コード + 配信/再配信 */
.form-code-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.form-input-code {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}

.btn-send,
.btn-resend {
  flex-shrink: 0;
  width: 121px;
  height: 49px;
  padding: 0;
  background: #242424;
  border: 1px solid #242424;
  border-radius: 2px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-send:hover:not(:disabled),
.btn-resend:hover {
  background: #333;
  border-color: #333;
}

.btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.code-countdown {
  flex-shrink: 0;
  width: 121px;
  height: 49px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #f4f4f4;
  border-radius: 2px;
  color: #828282;
  font-size: 14px;
}

.code-countdown.is-visible {
  display: flex;
}

.form-input-wrap {
  position: relative;
  margin-bottom: 0;
}

.form-input-wrap .form-input {
  margin-bottom: 0;
  padding-right: 48px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b6b6b;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.btn-toggle-pwd:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.04);
}

.btn-toggle-pwd:focus-visible {
  outline: 2px solid #ff3600;
  outline-offset: 2px;
}

/* 表示中は「目線」アイコン、非表示時は「目」アイコン */
.btn-toggle-pwd .pwd-eye {
  display: block;
  flex-shrink: 0;
}

.btn-toggle-pwd .pwd-eye-hide {
  display: none;
}

.btn-toggle-pwd.is-visible .pwd-eye-show {
  display: none;
}

.btn-toggle-pwd.is-visible .pwd-eye-hide {
  display: block;
}

.pwd-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.forgot-link {
  display: inline-block;
  font-size: 14px;
  color: #ff3600;
  text-decoration: none;
  margin-top: 16px;
  margin-bottom: 28px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.forgot-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.btn-login-submit {
  width: 100%;
  height: 50px;
  background: #ff3600;
  border: 1px solid #ff3600;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(255, 54, 0, 0.25);
  margin-top: 10px;
}

.btn-login-submit:hover {
  background: #e03000;
  border-color: #e03000;
}

.register-prompt {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #efefef;
  font-size: 14px;
  font-weight: 500;
  color: #828282;
  text-align: center;
  line-height: 1.6;
}

.register-link {
  color: #ff3600;
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.register-link:hover {
  text-decoration: none;
}

/* Footer 由主站 ../style.css 提供 */

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .page-login {
    padding-top: 70px;
  }

  .loginbox {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .page-login {
    padding-top: 60px;
  }

  .main {
    padding: 40px 16px 60px;
  }

  .loginbox {
    padding: 24px 20px;
  }

  .login-title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .form-code-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .form-input-code {
    min-width: 0;
  }

  .btn-send,
  .btn-resend,
  .code-countdown {
    width: 100%;
  }
}
