/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background-color: #f4f6f8;
  color: #333;
}

/* ========== ナビゲーション ========== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.logo { height: 40px; }

.nav-text {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
}

/* ========== カード ========== */
.login-container {
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  padding: 32px 28px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #2c3e50;
  letter-spacing: .02em;
}

/* ========== フォーム ========== */
label {
  display: block;
  font-size: 14px;
  color: #2c3e50;
}

label + .password-field,
label + input[type="text"]{
  margin-bottom: 10px;
}
label + input[type="password"] {
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #d7dfe6;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #4f86ff;
  box-shadow: 0 0 0 3px rgba(79,134,255,0.15);
}

/* ========== パスワード表示トグル ========== */
/* コンテナでボタンを右端に重ねる */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 84px; /* トグル分の余白 */
}

/* 一般ボタンの赤スタイルはやめて、まずリセット */
.login-container button {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* トグルボタンは小さな幽霊ボタンに */
.password-field .toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #d7dfe6;
  border-radius: 6px;
  background: #fafbfc;
  color: #2c3e50;
  line-height: 1;
}

.password-field .toggle:hover {
  background: #f1f4f7;
}

.password-field .toggle:active {
  background: #e9eef3;
}

/* ========== 送信ボタン（ここだけ赤＆フル幅） ========== */
button[type="submit"] {
  width: 100%;
  padding: 13px 16px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  background-color: #e53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  transition: background-color .2s ease, transform .02s ease-in-out;
}

button[type="submit"]:hover { background-color: #d83632; }
button[type="submit"]:active { transform: translateY(1px); }
button[type="submit"]:disabled { background: #e0e0e0; cursor: not-allowed; }

/* ========== メッセージ類 ========== */
.error {
  color: #e53935;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.warn { color: #a15c00; font-size: 13px; }
.info { color: #2c3e50; font-size: 14px; }

/* ========== 補助リンク ========== */
.forgot-password {
  text-align: center;
  margin-top: 14px;
}

.forgot-password a {
  color: #e53935;
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover { text-decoration: underline; }

/* ========== モバイル ========== */
@media (max-width: 768px) {
  .login-container {
    max-width: 92vw;
    margin: 24px auto;
    padding: 24px 20px;
    border-radius: 10px;
  }
  .login-container h2 { font-size: 20px; margin-bottom: 18px; }
  label { font-size: 14px; }
  input[type="text"],
  input[type="password"] { width: 100%; font-size: 16px; padding: 12px; }
  .password-field .toggle { padding: 6px 10px; font-size: 12px; }
  button[type="submit"] { font-size: 16px; padding: 14px; }
  .forgot-password a { font-size: 13px; }
}
