* =========================================================
   RESET & BASIC
   ========================================================= */
/* ログイン時は main の余白無し */
body.login-page main.content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
/* ================================================
   ログインページでは header/nav/footer を非表示
   ================================================ */
body.login-page header,
body.login-page nav,
body.login-page footer,
body.password-reset-page header,
body.password-reset-page nav,
body.password-reset-page footer {
    display: none !important;
}

body.login-page .sidebar,
body.login-page .sidebar-overlay,
body.login-page .main-header,
body.login-page .global-footer,
body.password-reset-page .sidebar,
body.password-reset-page .sidebar-overlay,
body.password-reset-page .main-header,
body.password-reset-page .global-footer {
    display: none !important;
}

/* main の余白だけ除去（表示は残す） */
body.login-page main,
body.password-reset-page main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* ログイン専用レイアウト（画面全体使用） */
body.login-page,
body.password-reset-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #ecf5e3;
    height: 100vh;
    overflow: hidden;
}

/* login-wrapper を強制表示 */
body.login-page .login-wrapper,
body.password-reset-page .login-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 60px;
        padding-top: 80px;
}

body.login-page main.container,
body.password-reset-page main.container {
    max-width: none !important;
}

/* ==== レイアウト全体 === */
.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}


/* ==== 左カラム ==== */
.login-left {
    flex: 1;
    background: #f6fbf3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.login-left h1 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #558d1d;  /* 濃いめの緑 */
}

.login-left img {
    width: 330px;
    max-width: 70%;
}

/* ==== 右カラム ==== */
.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ecf5e3;
}

.login-box {
    width: 380px;
    background: #fff;
    padding: 40px;
    border-radius: 6px;  /* ← 12px → 6px */
    box-shadow: 0 3px 12px rgba(0,0,0,0.06); /* ← 少し控えめ */
}

.login-box h2 {
    text-align: center;
    margin-bottom: 28px;
    font-size: 23px;
    font-weight: 700;
    color: #558d1d;
}

body.login-page h2,
body.password-reset-page h2 {
    border-left: none !important;
    padding-left: 0 !important;
}

body.password-reset-page h2 {
    margin-bottom: 15px;
    margin-top: 15px;
}

/* ==== 入力欄（UIキット風）==== */

.input-wrapper {
    margin-bottom: 20px;
}

.input-wrapper label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #5c5c5c;
    font-weight: 600;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px;
    border: 1.8px solid #bddb8d; /* 柔らか緑 */
    border-radius: 6px;
    font-size: 15px;
    transition: 0.2s;
    background: #fdfdfd;
}

.input-wrapper input:focus {
    border-color: #90c31f;
    box-shadow: 0 0 8px rgba(144,195,31,0.35);
    outline: none;
}

/* パスワード目アイコン */
.password-field {
    position: relative;
}
/* ==== パスワードの目アイコン ==== */
.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 68%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #4d4d4d;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0; /* ←これが最重要!!! */
    height: 20px;
    width: 20px;
}

button.login-btn {
    width: 100%;
    background: #90c31f;  /* Theme Color */
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 600;
    transition: 0.2s;
}

button.login-btn:hover {
    background: #7cab1a;
}


.login-copy {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* ==== パスワード忘れリンク ==== */
.password-reset-link {
    margin-top: 15px;
    text-align: right;
}

.password-reset-link a {
    color: #2a55cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.external-icon {
    font-size: 12px;
    margin-left: 4px;
}

/* ===============================
   LOGIN — リセット & 競合排除
=============================== */
.login-title,
.login-title *,
.title-text,
.title-text * {
    all: unset;
}

.login-title,
.title-text {
    display: block;
}

/* ===============================
   LOGIN — PC レイアウト
=============================== */
.login-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.login-title .logo {
    width: 330px;
    max-width: 330px;
    flex-shrink: 0;
}

.title-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    white-space: nowrap;
}

.title-text .subtitle {
    font-size: 20px;
    color: #558d1d;
    font-weight: 700;
    margin-bottom: 4px;
}

.title-text .maintitle {
    font-size: 34px;
    color: #558d1d;
    font-weight: 800;
    font-family: "Noto Sans JP", "Rounded Mplus 1c", sans-serif;
}

/* ================================================
   パスワードリセットページでは header/nav/footer を非表示
   ================================================ */
body.password-reset-page header,
body.password-reset-page nav,
body.password-reset-page footer,
body.password-reset-page .sidebar,
body.password-reset-page .sidebar-overlay,
body.password-reset-page .main-header,
body.password-reset-page .global-footer {
    display: none !important;
}

/* main の余白だけ除去（表示は残す） */
body.password-reset-page main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* パスワードリセット専用レイアウト（画面全体使用） */
body.password-reset-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #ecf5e3;
    min-height: 100vh;
    overflow-y: auto;
}

body.password-reset-page .login-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ===============================
   LOGIN — SP（〜767px）
=============================== */
@media (max-width: 767px) {

    .login-title {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
        margin-bottom: 10px;
    }

    .login-title .logo {
        width: 28%;
        max-width: 90px;
        flex-shrink: 0;
    }

    .title-text {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
        white-space: nowrap;
    }

    .title-text .subtitle {
        font-size: 14px;
        font-weight: 650;
        color: #558d1d;
        margin-bottom: 2px;
    }

    .title-text .maintitle {
        font-size: 22px;
        font-weight: 750;
        color: #558d1d;
        font-family: "Noto Sans JP", "Rounded Mplus 1c", sans-serif;
    }
}

/* ================================================
    ▼ログインページのレスポンシブ調整
   ================================================ */

@media (max-width: 991px) {
    .login-wrapper {
        flex-direction: column;
        height: auto;
        padding: 40px 20px;
    }

    .login-left {
        padding: 20px;
    }

    .login-box {
        width: 100%;
        max-width: 420px;
        margin-top: 30px;
    }

    body.login-page,
    body.password-reset-page {
        overflow-y: auto; /* スマホはスクロール可 */
    }
}
/* スマホ縦（〜767px） */
@media (max-width: 767px) {

    /* 左側の高さを縮める */
    /* 左側の高さを縮める */
    .login-left {
        padding: 8px 10px;
        height: 26vh; /* ここを縮めてログインBOXを上へ */
        display: flex;
        justify-content: center;
        align-items: center;
        background: initial;
    }

    .login-left img {
        width: 60%;      /* 画像小さめに */
        max-width: 120px;
    }

    .login-left h1 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .login-right {
        flex: none;
        margin-top: 20px;
        background: transparent;
    }

    .login-box {
        width: 100%;
        max-width: 360px;
        padding: 30px;
        margin: 0 auto;
    }


    /* SP版を表示 */
    /* タイトルを横並びに変更 */
    .login-title {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        margin-bottom: 10px;
    }

    /* 画像もっと小さく */
    .login-title .logo {
        width: 28%;
        max-width: 90px;
        flex-shrink: 0;
    }

    /* SPテキスト */
    .title-text .subtitle {
        font-size: 14px;
        color: #558d1d;
        font-weight: 650;
    }

    .title-text .maintitle {
        font-size: 22px;
        font-weight: 750;
        color: #558d1d;
        font-family: "Noto Sans JP", "Rounded Mplus 1c", sans-serif;
    }

    /* テキスト部分 */
    .title-text {
        display: flex;
        flex-direction: column;
        white-space: nowrap;
        line-height: 1.15;
    }

    /* サブタイトル */
    .title-text .subtitle {
        font-size: 14px;      /* ← 少し大きく */
        font-weight: 650;     /* 太字寄り */
        color: #558d1d;
        margin-bottom: 2px;
    }

    /* メインタイトル */
    .title-text-sp .maintitle {
        font-size: 22px;      /* ← このくらいがちょうどよい */
        font-weight: 750;
        color: #558d1d;
        font-family: "Noto Sans JP", "Rounded Mplus 1c", sans-serif;
    }

    /* ログインBOXの位置を上に */
    .login-right {
        margin-top: -10px;
        padding-top: 0;
    }

    /* SPレイアウト全体を圧縮 */
    /* 左ブロックをかなり小さく */
    .login-left {
        height: 22vh;
        padding: 10px 12px;
        justify-content: center;
    }
    .login-wrapper {
        padding-top: 20px;
    }

    .login-box {
        margin-top: 0;
        padding: 26px 22px;
    }

    .logo-pc {
        display: none;
    }

    /* ページ全体がスクロールしない問題も解決 */
    body.login-page,
    body.password-reset-page {
        height: auto;
        overflow-y: auto;
    }
}

@media (max-width: 575px) {
    .login-left .maintitle {
        font-size: 30px;
    }

    .login-left .subtitle {
        font-size: 16px;
    }

    /* .login-left img {
        width: 200px;
    } */

    .login-box {
        padding: 30px 20px;
    }
}

/* 横並び2カラム（PC） */
body.login-page .login-wrapper,
body.password-reset-page .login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    padding: 60px 0;
    width: 100%;
}


/* 左のロゴ部分 */
/* body.login-page .login-left,
body.password-reset-page .login-left {
    width: 360px;
    text-align: center;
} */

body.login-page .login-left,
body.password-reset-page .login-left {
    text-align: center;
}


body.login-page #owlAnim {
    display: none !important;
}

body.login-page #partnerLogo {
    opacity: 1 !important;
    transform: none !important;
}


@media (max-width: 768px) {
    body.login-page .login-wrapper,
    body.password-reset-page .login-wrapper {
        flex-direction: column;
        gap: 30px;
        padding: 40px 20px;
        min-height: auto;
    }

    body.login-page .login-left,
    body.login-page .login-right,
    body.password-reset-page .login-left,
    body.password-reset-page .login-right {
        width: 100%;
        max-width: 360px;
    }
}

/* PC: 左右2カラム（左50% / 右固定） */
@media (min-width: 768px) {
    .login-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 60px;
        padding-top: 80px;
    }

    .login-left {
        flex: 1;
        max-width: 50%;
        min-height: 400px;
    }

    .login-right {
        flex: 0 0 360px;
    }
}

/* SP: 縦1カラム */
@media (max-width: 767px) {
    .login-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
    }
}
/* =========================================
   LOGIN 最終レイアウト（PC版）
   ・login-left = 画面の左半分
   ・login-right = 画面の右半分
   ========================================= */
@media (min-width: 992px) {

    /* メイン領域をフル幅にする */
    body.login-page main.content-wrapper,
    body.password-reset-page main.content-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        width: 100vw !important;
    }

    /* ラッパー自体を横一杯に広げる */
    body.login-page .login-wrapper {
        display: flex !important;
        width: 100vw !important;
        height: 100vh;
        margin: 0;
        padding: 0;
        justify-content: stretch;
        align-items: center;
        gap: 0;
    }

    /* 左右をきっちり 1/2 に固定 */
    body.login-page .login-left,
    body.login-page .login-right {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        height: 100%;
    }

    /* 左側：薄い背景の中にロゴを中央寄せ */
    body.login-page .login-left {
        display: flex;
        justify-content: center;
        align-items: center;
        background: #f6fbf3;
        text-align: center;
    }

    /* 右側：中央にログインBOX */
    body.login-page .login-right {
        display: flex;
        justify-content: center;
        align-items: center;
        background: transparent;
    }

    /* ログインボックスの幅はカードだけ固定 */
    body.login-page .login-box {
        width: 420px;
        max-width: 420px;
    }
}

/* ログインエラーメッセージ用 */
.error-message {
    color: #d32f2f;
    font-size: 0.7rem;
    background: #fff0f0;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    padding: 0.7em 1em;
    margin-bottom: 1em;
    text-align: left;
}

.error-message  p {
    margin-bottom: 0;
}

/* パスワードリセット説明文 */
.password-reset-description {
    font-size: 14px;
    color: #5c5c5c;           /* ラベルと同じ落ち着いたグレー */
    margin-bottom: 14px;      /* 入力欄との適切なスペース */
    line-height: 1.6;
    text-align: left;         /* フォームのUIと統一 */
}

.password-reset-description .note {
    display: block;
    font-size: 13px;         /* 少し控えめ */
    color: #777;             /* 薄めグレーで注意書きっぽく */
    margin-top: 6px;
}

/* =========================================
   パスワードリセット画面 PC最終レイアウト
   ・左右は画面高いっぱい
   ・フォーム部分だけスクロール
========================================= */
@media (min-width: 992px) {

    body.password-reset-page {
        height: 100vh;
        min-height: 0;
        overflow: hidden;
    }

    body.password-reset-page main.content-wrapper {
        width: 100vw !important;
        height: 100vh;
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        overflow: hidden;
    }

    body.password-reset-page .login-wrapper {
        display: flex !important;
        width: 100vw !important;
        height: 100vh;
        min-height: 0;
        margin: 0;
        padding: 0;
        gap: 0;
        align-items: stretch;
    }

    body.password-reset-page .login-left,
    body.password-reset-page .login-right {
        flex: 0 0 50% !important;
        width: 50%;
        max-width: 50% !important;
        height: 100vh;
        min-height: 0;
        box-sizing: border-box;
    }

    body.password-reset-page .login-left {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: #f6fbf3;
    }

    body.password-reset-page .login-right {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        overflow: hidden;
        background: #ecf5e3;
    }

    body.password-reset-page .login-box {
        display: flex;
        flex-direction: column;
        width: 500px;
        max-width: 100%;
        max-height: calc(100vh - 48px);
        margin: 0;
        padding: 28px;
        box-sizing: border-box;
        overflow: hidden;
    }

    body.password-reset-page .input-wrapper {
    margin-bottom: 10px;
    }

    body.password-reset-page .password-reset-form-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 10px;
        padding-left: 10px;
        max-height: 315px;
    }
}