/* v2 login page adapter
 * - Keep login.html unchanged as much as possible
 * - Provide login-only layout without relying on legacy CSS
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;900&display=swap');

/* 「ログイン」見出しと同一フォントスタックをフォーム・左パネルまで明示的に統一 */
body.login-page,
body.login-page input,
body.login-page button,
body.login-page label,
body.login-page select,
body.login-page textarea,
body.login-page a {
  font-family: 'Noto Sans JP', 'メイリオ', 'Meiryo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body.login-page {
  height: 100vh;
  overflow: hidden;
  display: block;
  background: var(--login-right-bg);
  color: var(--text);
  --grad-start: var(--header-bg);
  --grad-end: var(--blue-dark);
  --gradient: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-end) 100%);
}

/* login: ヒンシツ大学ブランド（モックのグリーン・右ペイン背景(#f4f7fa)） */
body.login-page {
  --brand: #1a9141;
  --brand-dark: #148536;
  --brand-light: #e8f5eb;
  --brand-grad-start: rgba(26, 145, 65, 1);
  --brand-grad-end: rgba(26, 145, 65, 1);
  --header-bg: var(--brand);
  --blue: var(--brand);
  --blue-dark: var(--brand-dark);
  --blue-light: var(--brand-light);
  --grad-start: var(--brand-grad-start);
  --grad-end: var(--brand-grad-end);
  --gradient: var(--brand);
  --login-shadow: rgba(26, 145, 65, 0.32);
  --login-shadow-strong: rgba(26, 145, 65, 0.4);
  --login-focus: rgba(26, 145, 65, 0.14);
  --login-right-bg: #f4f7fa;
  --login-input-bg: #eef2f8;
}

body.login-page > header.login-header {
  display: none;
}

body.login-page .login-header {
  display: none;
}

body.login-page .login-header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  min-height: 56px;
}

body.login-page .login-header__logo {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  vertical-align: middle;
}

body.login-page .login-header__fallback {
  display: none;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

body.login-page main.login-main {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  display: block;
  /* shell.css はヘッダー分の padding を付けるため、ログインでは打ち消す */
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.login-page .page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: 100vh;
  min-height: 600px;
}

body.login-page .brand-panel {
  position: relative;
  background: var(--brand);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  overflow: hidden;
  padding: 52px 56px 40px;
}

body.login-page .brand-panel__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.login-page .bg-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}
body.login-page .bg-circle--1 { width: 420px; height: 420px; top: -120px; right: -100px; }
body.login-page .bg-circle--2 { width: 260px; height: 260px; bottom: 60px; left: -80px; }
body.login-page .bg-circle--3 { width: 140px; height: 140px; bottom: 220px; right: 60px; }

body.login-page .brand-panel__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.login-page .brand-heading-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.login-page .brand-logo { margin-bottom: 52px; }
body.login-page .brand-logo__set {
  display: flex;
  align-items: center;
  gap: 18px;
}
body.login-page .brand-logo__mark {
  height: 56px; /* 70px の約80% */
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
body.login-page .brand-logo__img {
  height: 64px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
body.login-page .brand-logo__fallback {
  display: none;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.06em;
}

body.login-page .brand-catch { margin-bottom: 45px; }
body.login-page .brand-catch__body {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 2;
  letter-spacing: 0.06em;
  margin: 0;
}

body.login-page .brand-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
}
body.login-page .brand-features__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.06em;
}
body.login-page .brand-features__icon {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.login-page .brand-panel__footer {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
body.login-page .brand-panel__site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.06em;
  transition: var(--transition);
}
body.login-page .brand-panel__site-link:hover { color: #fff; }
body.login-page .brand-panel__site-link .material-symbols-outlined { font-size: 14px; }

body.login-page .form-panel {
  background: var(--login-right-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}
body.login-page .form-panel__inner {
  width: 100%;
  max-width: 420px;
}

body.login-page .form-header {
  text-align: center;
  margin-bottom: 40px;
}
body.login-page .form-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px var(--login-shadow);
}
body.login-page .form-header__badge .material-symbols-outlined { font-size: 14px; }
body.login-page .form-header__title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.12em;
  margin: 0 0 10px;
}
body.login-page .form-header__sub {
  font-size: 13px;
  color: var(--text-mid);
  letter-spacing: 0.05em;
  line-height: 1.7;
  margin: 0;
}

body.login-page .alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  animation: loginFadeIn 0.25s ease;
  font-family: inherit;
}
body.login-page .alert--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
body.login-page .alert__icon { font-size: 18px; flex-shrink: 0; }

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

body.login-page .form-group { margin-bottom: 20px; }
body.login-page .form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

body.login-page .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
body.login-page .input-icon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: var(--text-light);
  pointer-events: none;
  transition: var(--transition);
  z-index: 1;
}
body.login-page .form-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: var(--login-input-bg);
  border: 1.5px solid transparent;
  border-radius: 8px;
  outline: none;
  transition: var(--transition);
  letter-spacing: 0.04em;
  box-shadow: none;
}
body.login-page .form-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
  font-size: 14px;
}
body.login-page .form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--login-focus);
  background: #fff;
}
body.login-page .input-wrap:focus-within .input-icon { color: var(--blue); }

body.login-page .input-wrap--pw .form-input { padding-right: 48px; }
body.login-page .pw-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 52px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}
body.login-page .pw-toggle:hover { color: var(--blue); }
body.login-page .pw-toggle .material-symbols-outlined { font-size: 20px; }

body.login-page .form-forgot {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 28px;
}
body.login-page .forgot-link {
  font-size: 13px;
  color: #1a9e7a;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}
body.login-page .forgot-link:hover {
  color: #148f6c;
  border-bottom-color: #148f6c;
}

body.login-page .btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: var(--gradient);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.14em;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--login-shadow);
  position: relative;
  overflow: hidden;
}
body.login-page .btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.25s ease;
}
body.login-page .btn-login:hover::after { background: rgba(255, 255, 255, 0.08); }
body.login-page .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--login-shadow-strong);
}
body.login-page .btn-login:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(26, 145, 65, 0.28);
}
body.login-page .btn-login__icon,
body.login-page .btn-login__text {
  position: relative;
  z-index: 1;
}
body.login-page .btn-login__icon { font-size: 22px; }

body.login-page .form-footer {
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
body.login-page .form-footer .footer { position: static; top: 0; }
body.login-page .form-footer .footer-content {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.06em;
}

@media (max-width: 960px) {
  body.login-page {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }
  body.login-page main.login-main {
    height: auto;
    min-height: 100vh;
  }
  body.login-page > header.login-header {
    display: flex !important;
  }
  body.login-page .login-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--gradient);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1.5rem;
    box-sizing: border-box;
  }
  body.login-page main.login-main {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    height: auto;
  }
  body.login-page .page-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 56px);
  }
  body.login-page .brand-panel { display: none; }
  body.login-page .form-panel { padding: 32px 18px; }
}

