/* ログイン系画面（login / password_login / forgot_password / set_password）共通の新デザイン
   各テンプレートの <style> の後に読み込んで上書きする */
:root {
  --bg: #07072a;
  --bg-2: #14143d;
  --card: #11113a;
  --row: #191948;
  --field: #0a0a2e;
  --ink-soft: #b4b6d2;
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.24);
  --teal: #12c2bf;
  --pink: #ff4778;
  --purple: #6b4cff;
}

html { background: var(--bg); overflow-x: hidden; }
body {
  position: relative;
  background: var(--bg) !important;
  color: #fff;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", "Yu Gothic UI", "Meiryo UI", "Meiryo",
               "Hiragino Sans", "Hiragino Kaku Gothic ProN", Roboto, sans-serif !important;
  font-size: 17px;
  overflow-x: hidden;
  padding: 32px 0;
}
/* 背景の図形 */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: 0;
  background: var(--bg-2);
  pointer-events: none;
}
body::before {
  top: -140px; right: -200px; width: 720px; height: 900px;
  border-radius: 42% 58% 55% 45% / 38% 40% 60% 62%;
  transform: rotate(-18deg);
}
body::after {
  bottom: -260px; left: -220px; width: 640px; height: 520px;
  border-radius: 60% 40% 50% 50%;
  opacity: .7;
}
body > .container { position: relative; z-index: 1; }

/* カード */
.card {
  background: var(--card) !important;
  color: #fff;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: none !important;
  overflow: hidden;
}
.card-header {
  position: relative;
  overflow: hidden;
  background: transparent !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 2.2rem 2rem 1.8rem !important;
}
/* 上のカラーライン */
.card-header::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--purple) 55%, var(--pink));
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: .9rem !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  letter-spacing: .16em;
  line-height: 1.3;
  text-align: left;
}
.logo .mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--teal) 0 45%, var(--pink) 45% 80%, transparent 80% 100%);
  -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px);
          mask: radial-gradient(circle, transparent 9px, #000 10px);
}
.logo .brand-text { display: grid; }
.subtitle {
  opacity: 1 !important;
  font-size: 1.6rem !important;
  font-weight: 800;
  letter-spacing: .14em;
}
.subtitle small {
  display: block;
  margin-top: 4px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

/* 入力 */
.form-label { color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.form-control {
  min-height: 54px;
  background: var(--field) !important;
  color: #fff !important;
  border: 1px solid var(--line-2) !important;
  border-radius: 8px !important;
  font-size: 1.05rem !important;
}
.form-control::placeholder { color: #6e7099; }
.form-control:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(18, 194, 191, 0.2) !important;
}
.form-control[readonly] { color: var(--ink-soft) !important; background: var(--row) !important; }
#togglePassword { color: var(--ink-soft) !important; }

/* ボタン */
.btn-primary {
  min-height: 58px;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--teal), var(--purple) 55%, var(--pink)) !important;
  font-weight: 800 !important;
  letter-spacing: .06em;
  box-shadow: 0 14px 32px rgba(107, 76, 255, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; }
.btn-secondary {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid var(--line-2) !important;
  border-radius: 999px !important;
  padding: .5rem 1.4rem !important;
}
.btn-secondary:hover { border-color: #fff !important; }
.btn-link { color: var(--ink-soft) !important; }
.btn-link:hover { color: #fff !important; }

/* メッセージ・補足 */
.alert { border-radius: 8px !important; border: 1px solid !important; }
.alert-danger { background: rgba(255, 107, 107, 0.12) !important; color: #ff8a8a !important; border-color: #ff6b6b !important; }
.alert-success { background: rgba(61, 220, 151, 0.12) !important; color: #3ddc97 !important; border-color: #3ddc97 !important; }
.alert-success h5 { color: #3ddc97; }
.user-info, .info-box, .features {
  background: var(--row) !important;
  color: #fff;
  border-left: 4px solid var(--teal) !important;
  border-radius: 8px !important;
}
.text-muted { color: #8e90b3 !important; }
.strength-bar { background: var(--row) !important; }
.requirement.unmet { color: #8e90b3 !important; }
.requirement.met { color: #3ddc97 !important; }
.text-white { color: var(--ink-soft) !important; }

@media (max-width: 576px) {
  body { padding: 16px 0; }
  .card-header { padding: 1.8rem 1.4rem 1.4rem !important; }
  .subtitle { font-size: 1.35rem !important; }
}
