/* ===== ログインページ ===== */

/* CSP対応: インラインstyle代替ユーティリティ */
.ime-disabled { ime-mode: disabled; }

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
}

.header {
    width: 100%;
    margin-bottom: 40px;
    box-sizing: border-box;
    padding: 30px 0 20px 0;
}

.header-content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.system-title {
    margin: 0;
    font-size: 38px;
    color: #333;
    font-weight: 700;
    text-align: left;
    flex-shrink: 0;
    line-height: 1.3;
    white-space: nowrap;
    order: 1;
}

.header-logo {
    max-width: 200px;
    height: auto;
    flex-shrink: 0;
    margin-left: 30px;
    order: 2;
}

.main-content-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.login-error {
    color: #b00020;
    background-color: #fde7e7;
    border: 1px solid #f2b8b5;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input[type="text"],
.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    padding-right: 70px;
}

.form-group + .form-group {
    margin-top: 15px;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #51489d;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 18px;
    text-decoration: none;
    white-space: nowrap;
}

.password-toggle-button:hover {
    color: #8977ad;
    opacity: 0.8;
    text-decoration: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.checkbox-group label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.login-button {
    width: 100%;
    padding: 15px;
    color: #fff;
    background-color: #51489d;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    text-decoration: none;
}

.login-button:hover {
    background-color: #433b82;
}

.links-group {
    text-align: center;
    line-height: 1.8;
    padding-top: 30px;
    padding-bottom: 40px;
}

.links-group p {
    margin: 0;
    padding: 0;
}

.links-group a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.links-group a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* タブレット用のスタイル (769px ～ 1024px) */
@media screen and (max-width: 1024px) {
    .header-content-wrapper {
        max-width: 700px;
        padding: 0 30px;
    }
    .system-title {
        font-size: 32px;
        white-space: normal;
        flex-shrink: 1;
    }
    .header-logo {
        max-width: 150px;
        margin-left: 20px;
    }
    .login-container {
        max-width: 360px;
        padding: 30px;
    }
    .form-group input {
        padding: 10px;
        font-size: 15px;
        padding-right: 65px;
    }
    .password-toggle-button {
        font-size: 16px;
        padding: 5px 8px;
    }
    .login-button {
        padding: 13px;
        font-size: 17px;
    }
    .links-group {
        padding-top: 25px;
        padding-bottom: 30px;
    }
}

/* スマートフォン用のスタイル (～768px) */
@media screen and (max-width: 768px) {
    body {
        background-color: #fff;
        padding: 0;
        justify-content: flex-start;
    }
    .header {
        padding: 15px 0;
        margin-bottom: 30px;
    }
    .header-content-wrapper {
        max-width: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
    }
    .system-title {
        font-size: 24px;
        margin-top: 10px;
        margin-bottom: 0;
        width: 100%;
        white-space: normal;
        flex-shrink: 1;
        order: 2;
    }
    .header-logo {
        max-width: 120px;
        align-self: flex-end;
        margin-left: 0;
        order: 1;
    }
    .main-content-wrapper {
        justify-content: flex-start;
    }
    .login-container {
        width: 100%;
        max-width: none;
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
    }
    .form-group {
        margin-bottom: 15px;
    }
    .form-group input {
        padding: 10px;
        font-size: 14px;
        padding-right: 60px;
    }
    .password-toggle-button {
        font-size: 14px;
        padding: 5px 6px;
        right: 3px;
    }
    .checkbox-group {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .checkbox-group label {
        font-size: 13px;
    }
    .login-button {
        padding: 12px;
        font-size: 16px;
    }
    .links-group {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .links-group a {
        font-size: 13px;
    }
}
