/* ログイン系画面の共通シェル。モック(mockup_UI-01_ログイン.html v12)の <style> を忠実移植 */
/* _LoginLayout で読み込む（ログイン／パスワード再設定・変更推奨で共用）。背景画像の参照のみ wwwroot の配置に合わせて相対パスを変更 */
  /* FAアイコン縦位置補正 */
  i.fa-regular,i.fa-light{vertical-align:-0.125em;}
  :root {
    --bg-card: #FFFFFF;
    --border-default: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --primary: #2563EB;
    --primary-light: #EFF6FF;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0; padding: 0; min-height: 100%;
    color: var(--text-primary);
    font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
  }

  /* ===== 背景（生成済みJPGを使用：他画面と共通の素材） ===== */
  body {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #FFFFFF url('../../img/login/login_bg.jpg') center bottom / cover no-repeat fixed;
    overflow-x: hidden;
  }

  /* ===== メイン ===== */
  .login-main {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 24px;
    gap: 28px;
  }

  /* ロゴ（透過PNG：どの背景にも自然に乗る） */
  .brand-block {
    display: flex; flex-direction: column; align-items: center;
  }
  .brand-logo {
    display: block;
    width: 380px; max-width: 82vw;
    height: auto;
    user-select: none;
    filter: drop-shadow(0 2px 10px rgba(15,23,42,0.10));
  }
  /* ロゴ下のサブタイトル（需給調整市場版） */
  .brand-tagline {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin-top: 14px;
    font-size: 12.5px; font-weight: 700;
    letter-spacing: 0.30em; text-transform: uppercase;
    white-space: nowrap;
    /* 文字を青→水色のグラデーションに */
    background: linear-gradient(90deg, #2563EB 0%, #3B82F6 45%, #38BDF8 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
  .brand-tagline::before, .brand-tagline::after {
    content: ""; width: 46px; height: 1px;
  }
  .brand-tagline::before { background: linear-gradient(90deg, rgba(157,182,222,0), #9DB6DE); }
  .brand-tagline::after  { background: linear-gradient(90deg, #9DB6DE, rgba(157,182,222,0)); }

  /* ===== ログインカード ===== */
  .login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid rgba(226,232,240,0.9);
    border-radius: var(--radius-lg);
    box-shadow:
      0 1px 3px rgba(15,23,42,0.04),
      0 12px 32px rgba(37,99,235,0.10),
      0 30px 60px rgba(15,23,42,0.06);
    padding: 40px 44px 36px;
    backdrop-filter: blur(6px);
  }

  .login-title {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 26px; font-weight: 700; letter-spacing: 0.02em;
    color: var(--primary);
    margin-bottom: 28px;
  }
  .login-title i {font-size:26px;}

  .login-subtitle {
    text-align: center;
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    margin-bottom: 30px;
  }

  /* フォーム */
  .field { margin-bottom: 20px; }
  .field-label {
    display: block;
    font-size: 13px; font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
  }
  .input-wrap { position: relative; }
  .input-wrap > i {font-size:18px;
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted);
    pointer-events: none;
  }
  .field input {
    width: 100%;
    padding: 13px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-sm);
    transition: border-color .18s, box-shadow .18s, background .18s;
  }
  .field input::placeholder { color: #C0C7D1; }
  .field input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  }
  /* 入力エラーの枠（js/base/inline-error.js の markInvalid。サーバーで検証したログインの入力欄は ASP.NET Core が付ける input-validation-error）。
     エラー文字と同じ赤。:focus の指定に負けないよう !important。
     TODO: 暫定（設計書修正依頼リスト UI-06 依頼35「入力エラーのある入力枠を赤くする記載が無い（全画面）」） */
  .field input.input-invalid, .field input.input-validation-error { border-color: #DC2626 !important; }
  .pw-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; cursor: pointer; color: var(--text-muted);
    border-radius: 6px; transition: background .15s, color .15s;
  }
  .pw-toggle:hover { background: #F1F5F9; color: var(--text-secondary); }
  .pw-toggle i {font-size:18px;}

  /* ログインボタン */
  /* ===== ダウンロードボタン（btn-primary）と同一パーツ ===== */
  .btn-login {
    width: 100%;
    margin-top: 8px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff; border: none;
    border-radius: 6px;
    font-size: 16px; font-weight: 700; letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37,99,235,0.3);
    transition: all 0.15s;
  }
  .btn-login:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
    transform: translateY(-1px);
  }
  .btn-login i {font-size:18px;}

  /* 補助リンク */
  .help-link {
    margin-top: 22px;
    text-align: center;
  }
  .help-link a {
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
  }
  .help-link a:hover { color: var(--primary); border-color: var(--primary); }

  /* ===== フッター ===== */
  .login-footer {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 28px 20px 64px;
  }
  .login-footer .foot-logo {
    height: 42px; width: auto; max-width: 92vw;
    opacity: 0.95;
  }
  .login-footer .copyright {
    font-size: 11px; color: #5B6675; letter-spacing: 0.02em;
    text-align: center;
  }

  /* ===== 共通インラインエラー（プロジェクト共通の赤デザイン：mockup_UI-22_パスワード変更・再設定_変更.html と同一） ===== */
  .inln-stack { display:flex; flex-direction:column; gap:8px; margin:0 0 18px 0; }
  .inln-stack:empty { display:none; }
  /* 単項目チェック：入力欄のすぐ上に赤文字（蓄電所設定 .v-req-err と同じ体裁） */
  .req-err { color:#DC2626; font-size:12px; font-weight:600; margin-bottom:4px; }
  .req-err:empty { display:none; }
  .inln-item {
    display:flex; align-items:flex-start; gap:8px;
    border-radius:8px; padding:10px 14px;
    font-size:13px; font-weight:600; line-height:1.5;
    background:#FEF2F2; border:1px solid #FECACA; color:#DC2626;
  }
  .inln-item .inln-ico { flex-shrink:0; width:18px; height:18px; margin-top:1px; }
  /* メッセージ中の改行（"\n"）で改行する（モックは <br>。HTML として出さないため。UI-01 認証失敗の2行） */
  .inln-item > span { flex:1; white-space:pre-line; }
  .inln-item .inln-x { margin-left:8px; cursor:pointer; opacity:.5; flex-shrink:0; width:15px; height:15px; color:#DC2626; }
  .inln-item .inln-x:hover { opacity:1; }

  @media (max-width: 480px) {
    .login-card { padding: 32px 24px 28px; }
    .login-title { font-size: 22px; }
    .brand-logo { width: 250px; }
  }

/* ===== 実装上の追加（モックに無い） ===== */
/* Razor の asp-validation-for は span 固定のため、モックの div.req-err と同じブロック表示にする（空のときは上の :empty で非表示のまま） */
  span.req-err { display: block; }
